Add days schedule trigger (#10800)

<img width="1470" alt="image"
src="https://github.com/user-attachments/assets/660d79ba-60c7-4874-aa82-80a7575366ba"
/>
This commit is contained in:
martmull
2025-03-12 16:25:07 +01:00
committed by GitHub
parent bfc542290b
commit 1b0413bf8b
10 changed files with 244 additions and 5 deletions

View File

@ -150,14 +150,26 @@ export const workflowManualTriggerSchema = baseTriggerSchema.extend({
export const workflowCronTriggerSchema = baseTriggerSchema.extend({
type: z.literal('CRON'),
settings: z.discriminatedUnion('type', [
z.object({
type: z.literal('DAYS'),
schedule: z.object({
day: z.number().min(1),
hour: z.number().min(0).max(23),
minute: z.number().min(0).max(59),
}),
outputSchema: z.object({}).passthrough(),
}),
z.object({
type: z.literal('HOURS'),
schedule: z.object({ hour: z.number(), minute: z.number() }),
schedule: z.object({
hour: z.number().min(1),
minute: z.number().min(0).max(59),
}),
outputSchema: z.object({}).passthrough(),
}),
z.object({
type: z.literal('MINUTES'),
schedule: z.object({ minute: z.number() }),
schedule: z.object({ minute: z.number().min(1) }),
outputSchema: z.object({}).passthrough(),
}),
z.object({