twenty/packages/twenty-shared/src/workflow/schemas/manual-trigger-schema.ts
Abdul Rahman 3cada58908
Migrate from Zod v3 to v4 (#14639)
Closes [#1526](https://github.com/twentyhq/core-team-issues/issues/1526)

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-09-24 18:29:05 +02:00

20 lines
824 B
TypeScript

import { z } from 'zod';
import { baseTriggerSchema } from './base-trigger-schema';
export const workflowManualTriggerSchema = baseTriggerSchema
.extend({
type: z.literal('MANUAL'),
settings: z.object({
objectType: z.string().optional(),
outputSchema: z
.looseObject({})
.describe(
'Schema defining the output data structure. When a record is selected, it is accessible via {{trigger.record.fieldName}}. When no record is selected, no data is available.',
),
icon: z.string().optional(),
isPinned: z.boolean().optional(),
}),
})
.describe(
'Manual trigger that can be launched by the user. If a record is selected when launched, it is accessible via {{trigger.record.fieldName}}. If no record is selected, no data context is available.',
);