mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 20:40:43 +00:00
refactor: trim tlon helper exports
This commit is contained in:
@@ -4,7 +4,7 @@ import { z } from "openclaw/plugin-sdk/zod";
|
||||
const ShipSchema = z.string().min(1);
|
||||
const ChannelNestSchema = z.string().min(1);
|
||||
|
||||
export const TlonChannelRuleSchema = z.object({
|
||||
const TlonChannelRuleSchema = z.object({
|
||||
mode: z.enum(["restricted", "open"]).optional(),
|
||||
allowedShips: z.array(ShipSchema).optional(),
|
||||
});
|
||||
@@ -39,7 +39,7 @@ const tlonCommonConfigFields = {
|
||||
ownerShip: ShipSchema.optional(), // Ship that receives approval requests and can approve/deny
|
||||
} satisfies z.ZodRawShape;
|
||||
|
||||
export const TlonAccountSchema = z.object({
|
||||
const TlonAccountSchema = z.object({
|
||||
...tlonCommonConfigFields,
|
||||
});
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ export type TlonSettingsStore = {
|
||||
pendingApprovals?: PendingApproval[];
|
||||
};
|
||||
|
||||
export type TlonSettingsState = {
|
||||
type TlonSettingsState = {
|
||||
current: TlonSettingsStore;
|
||||
loaded: boolean;
|
||||
};
|
||||
@@ -285,7 +285,7 @@ function applySettingsUpdate(
|
||||
return next;
|
||||
}
|
||||
|
||||
export type SettingsLogger = {
|
||||
type SettingsLogger = {
|
||||
log?: (msg: string) => void;
|
||||
error?: (msg: string) => void;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ function tlonChannelId() {
|
||||
return "tlon" as const;
|
||||
}
|
||||
|
||||
export type TlonSetupInput = ChannelSetupInput & TlonAccountFieldsInput;
|
||||
type TlonSetupInput = ChannelSetupInput & TlonAccountFieldsInput;
|
||||
|
||||
function isConfigured(account: TlonResolvedAccount): boolean {
|
||||
return Boolean(account.ship && account.url && account.code);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type TlonTarget =
|
||||
type TlonTarget =
|
||||
| { kind: "dm"; ship: string }
|
||||
| { kind: "group"; nest: string; hostShip: string; channelName: string };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user