f60817a1e1
This PR follows the multiSelect PR merged previously. It will enable morph relation Many to One to be handled from the table, using a singleSelect picker Main point : I decided to change the singleSelect API to take an array of **objectMetadataName** instead of only one to deal with both our usecases. --------- Co-authored-by: Charles Bochet <charles@twenty.com>
32 lines
871 B
TypeScript
32 lines
871 B
TypeScript
import { z } from 'zod';
|
|
|
|
export const baseWorkflowActionSchema = z.object({
|
|
id: z
|
|
.string()
|
|
.describe(
|
|
'Unique identifier for the workflow step. Must be unique within the workflow.',
|
|
),
|
|
name: z
|
|
.string()
|
|
.describe(
|
|
'Human-readable name for the workflow step. Should clearly describe what the step does.',
|
|
),
|
|
valid: z
|
|
.boolean()
|
|
.describe(
|
|
'Whether the step configuration is valid. Set to true when all required fields are properly configured.',
|
|
),
|
|
nextStepIds: z
|
|
.array(z.string())
|
|
.optional()
|
|
.nullable()
|
|
.describe(
|
|
'Array of step IDs that this step connects to. Leave empty or null for the final step.',
|
|
),
|
|
position: z
|
|
.object({ x: z.number(), y: z.number() })
|
|
.optional()
|
|
.nullable()
|
|
.describe('Position coordinates for the step in the workflow diagram.'),
|
|
});
|