mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-27 09:02:15 +00:00
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import {
|
|
AllowFromListSchema,
|
|
buildCatchallMultiAccountChannelSchema,
|
|
DmPolicySchema,
|
|
GroupPolicySchema,
|
|
} from "openclaw/plugin-sdk/compat";
|
|
import { MarkdownConfigSchema, ToolPolicySchema } from "openclaw/plugin-sdk/zalouser";
|
|
import { z } from "zod";
|
|
|
|
const groupConfigSchema = z.object({
|
|
allow: z.boolean().optional(),
|
|
enabled: z.boolean().optional(),
|
|
requireMention: z.boolean().optional(),
|
|
tools: ToolPolicySchema,
|
|
});
|
|
|
|
const zalouserAccountSchema = z.object({
|
|
name: z.string().optional(),
|
|
enabled: z.boolean().optional(),
|
|
markdown: MarkdownConfigSchema,
|
|
profile: z.string().optional(),
|
|
dangerouslyAllowNameMatching: z.boolean().optional(),
|
|
dmPolicy: DmPolicySchema.optional(),
|
|
allowFrom: AllowFromListSchema,
|
|
historyLimit: z.number().int().min(0).optional(),
|
|
groupAllowFrom: AllowFromListSchema,
|
|
groupPolicy: GroupPolicySchema.optional(),
|
|
groups: z.object({}).catchall(groupConfigSchema).optional(),
|
|
messagePrefix: z.string().optional(),
|
|
responsePrefix: z.string().optional(),
|
|
});
|
|
|
|
export const ZalouserConfigSchema = buildCatchallMultiAccountChannelSchema(zalouserAccountSchema);
|