mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 04:03:42 +00:00
refactor(protocol): dedupe cron/config schemas
This commit is contained in:
@@ -11,7 +11,7 @@ export const ConfigSetParamsSchema = Type.Object(
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConfigApplyParamsSchema = Type.Object(
|
||||
const ConfigApplyLikeParamsSchema = Type.Object(
|
||||
{
|
||||
raw: NonEmptyString,
|
||||
baseHash: Type.Optional(NonEmptyString),
|
||||
@@ -22,16 +22,8 @@ export const ConfigApplyParamsSchema = Type.Object(
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const ConfigPatchParamsSchema = Type.Object(
|
||||
{
|
||||
raw: NonEmptyString,
|
||||
baseHash: Type.Optional(NonEmptyString),
|
||||
sessionKey: Type.Optional(Type.String()),
|
||||
note: Type.Optional(Type.String()),
|
||||
restartDelayMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
export const ConfigApplyParamsSchema = ConfigApplyLikeParamsSchema;
|
||||
export const ConfigPatchParamsSchema = ConfigApplyLikeParamsSchema;
|
||||
|
||||
export const ConfigSchemaParamsSchema = Type.Object({}, { additionalProperties: false });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user