@@ -13,9 +13,6 @@ const baseOptions = z.object({
|
||||
const basicSetVariableOptionsSchema = baseOptions.extend({
|
||||
type: z.enum([
|
||||
'Today',
|
||||
'Now',
|
||||
'Yesterday',
|
||||
'Tomorrow',
|
||||
'Moment of the day',
|
||||
'Empty',
|
||||
'Environment name',
|
||||
@@ -26,6 +23,11 @@ const basicSetVariableOptionsSchema = baseOptions.extend({
|
||||
]),
|
||||
})
|
||||
|
||||
const dateSetVariableOptionsSchema = baseOptions.extend({
|
||||
type: z.enum(['Now', 'Yesterday', 'Tomorrow']),
|
||||
timeZone: z.string().optional(),
|
||||
})
|
||||
|
||||
const initialSetVariableOptionsSchema = baseOptions.extend({
|
||||
type: z.undefined().openapi({ type: 'string' }),
|
||||
expressionToEvaluate: z.string().optional(),
|
||||
@@ -56,6 +58,7 @@ const appendItemToListOptionsSchema = baseOptions.extend({
|
||||
|
||||
export const setVariableOptionsSchema = z.discriminatedUnion('type', [
|
||||
initialSetVariableOptionsSchema,
|
||||
dateSetVariableOptionsSchema,
|
||||
basicSetVariableOptionsSchema,
|
||||
customSetVariableOptionsSchema,
|
||||
mapListItemsOptionsSchema,
|
||||
|
||||
Reference in New Issue
Block a user