mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 15:24:32 +00:00
fix(line): build config schema from common base
This commit is contained in:
@@ -29,17 +29,13 @@ const LineGroupConfigSchema = z
|
|||||||
})
|
})
|
||||||
.strict();
|
.strict();
|
||||||
|
|
||||||
const LineAccountConfigSchema = z
|
const LineAccountConfigSchema = LineCommonConfigSchema.extend({
|
||||||
.extend({
|
groups: z.record(z.string(), LineGroupConfigSchema.optional()).optional(),
|
||||||
groups: z.record(z.string(), LineGroupConfigSchema.optional()).optional(),
|
}).strict();
|
||||||
})
|
|
||||||
.strict();
|
|
||||||
|
|
||||||
export const LineConfigSchema = z
|
export const LineConfigSchema = LineCommonConfigSchema.extend({
|
||||||
.extend({
|
accounts: z.record(z.string(), LineAccountConfigSchema.optional()).optional(),
|
||||||
accounts: z.record(z.string(), LineAccountConfigSchema.optional()).optional(),
|
groups: z.record(z.string(), LineGroupConfigSchema.optional()).optional(),
|
||||||
groups: z.record(z.string(), LineGroupConfigSchema.optional()).optional(),
|
}).strict();
|
||||||
})
|
|
||||||
.strict();
|
|
||||||
|
|
||||||
export type LineConfigSchemaType = z.infer<typeof LineConfigSchema>;
|
export type LineConfigSchemaType = z.infer<typeof LineConfigSchema>;
|
||||||
|
|||||||
Reference in New Issue
Block a user