@wise/dynamic-flow-types 3.3.4 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,42 +2,44 @@
2
2
  import { z } from 'zod';
3
3
  import type {
4
4
  JsonElement,
5
- ModalResponseBody,
6
- Layout,
5
+ ArraySchemaList,
7
6
  Schema,
7
+ PersistAsync,
8
+ AlertLayout,
9
+ IntegerSchema,
8
10
  AllOfSchema,
9
- ArraySchema,
10
- BlobSchema,
11
- BooleanSchema,
12
11
  ConstSchema,
13
- IntegerSchema,
14
- NumberSchema,
12
+ ArraySchema,
13
+ ArraySchemaTuple,
15
14
  ObjectSchema,
16
- OneOfSchema,
17
15
  StringSchema,
18
- PersistAsync,
19
- AlertLayout,
20
- ArraySchemaList,
21
- ArraySchemaTuple,
22
- AdditionalInfo,
23
- Behavior,
24
- DecisionLayoutOption,
16
+ OneOfSchema,
17
+ BlobSchema,
18
+ NumberSchema,
19
+ BooleanSchema,
20
+ ModalResponseBody,
21
+ Layout,
25
22
  ListLayoutItem,
23
+ AdditionalInfo,
24
+ StatusListLayoutItem,
26
25
  ItemCallToAction,
27
- BoxLayout,
28
26
  AlertLayoutCallToAction,
29
- ButtonLayout,
30
- ReviewLayout,
31
- ReviewLayoutField,
32
- ReviewLayoutCallToAction,
33
- ColumnsLayout,
27
+ Behavior,
28
+ BoxLayout,
34
29
  DecisionLayout,
30
+ DecisionLayoutOption,
31
+ ColumnsLayout,
32
+ SectionLayout,
33
+ SectionLayoutCallToAction,
35
34
  ListLayout,
36
- ModalLayout,
35
+ ListLayoutCallToAction,
36
+ ReviewLayoutCallToAction,
37
37
  StatusListLayout,
38
- StatusListLayoutItem,
38
+ ModalLayout,
39
39
  ModalLayoutContent,
40
- ListLayoutCallToAction,
40
+ ReviewLayout,
41
+ ReviewLayoutField,
42
+ ButtonLayout,
41
43
  Step,
42
44
  Polling,
43
45
  LinkHandler,
@@ -45,33 +47,6 @@ import type {
45
47
  PollingOnError,
46
48
  } from '../next';
47
49
 
48
- export const imageSchema = z.object({
49
- text: z.string().optional(),
50
- url: z.string().optional(),
51
- uri: z.string().optional(),
52
- accessibilityDescription: z.string().optional(),
53
- });
54
-
55
- export const httpMethodSchema = z.union([
56
- z.literal('GET'),
57
- z.literal('POST'),
58
- z.literal('PUT'),
59
- z.literal('PATCH'),
60
- z.literal('DELETE'),
61
- ]);
62
-
63
- export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
64
- z
65
- .union([
66
- z.string(),
67
- z.number(),
68
- z.boolean(),
69
- z.record(jsonElementSchema),
70
- z.array(jsonElementSchema),
71
- ])
72
- .nullable(),
73
- );
74
-
75
50
  export const stringSchemaFormatSchema = z.union([
76
51
  z.literal('date'),
77
52
  z.literal('email'),
@@ -81,12 +56,12 @@ export const stringSchemaFormatSchema = z.union([
81
56
  z.literal('base64url'),
82
57
  ]);
83
58
 
84
- export const autocapitalizationTypeSchema = z.union([
85
- z.literal('none'),
86
- z.literal('characters'),
87
- z.literal('sentences'),
88
- z.literal('words'),
89
- ]);
59
+ export const imageSchema = z.object({
60
+ text: z.string().optional(),
61
+ url: z.string().optional(),
62
+ uri: z.string().optional(),
63
+ accessibilityDescription: z.string().optional(),
64
+ });
90
65
 
91
66
  export const summaryProviderSchema = z.object({
92
67
  providesTitle: z.boolean().optional(),
@@ -95,14 +70,6 @@ export const summaryProviderSchema = z.object({
95
70
  providesImage: z.boolean().optional(),
96
71
  });
97
72
 
98
- export const validateAsyncSchema = z.object({
99
- param: z.string(),
100
- method: httpMethodSchema,
101
- url: z.string(),
102
- });
103
-
104
- export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
105
-
106
73
  export const autocompleteTokenSchema = z.union([
107
74
  z.literal('on'),
108
75
  z.literal('name'),
@@ -173,28 +140,45 @@ export const helpSchema = z.object({
173
140
  markdown: z.string(),
174
141
  });
175
142
 
176
- export const iconTextSchema = z.object({
177
- text: z.string(),
178
- });
143
+ export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
144
+ z
145
+ .union([
146
+ z.string(),
147
+ z.number(),
148
+ z.boolean(),
149
+ z.record(jsonElementSchema),
150
+ z.array(jsonElementSchema),
151
+ ])
152
+ .nullable(),
153
+ );
179
154
 
180
- export const contextSchema = z.union([
181
- z.literal('positive'),
182
- z.literal('neutral'),
183
- z.literal('warning'),
184
- z.literal('negative'),
185
- z.literal('success'),
186
- z.literal('failure'),
187
- z.literal('info'),
188
- z.literal('primary'),
155
+ export const autocapitalizationTypeSchema = z.union([
156
+ z.literal('none'),
157
+ z.literal('characters'),
158
+ z.literal('sentences'),
159
+ z.literal('words'),
189
160
  ]);
190
161
 
191
- export const supportingValuesSchema = z.object({
192
- value: z.string().optional(),
193
- subvalue: z.string().optional(),
162
+ export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
163
+
164
+ export const errorResponseBodySchema = z.object({
165
+ refreshFormUrl: z.string().optional(),
166
+ analytics: z.record(z.string()).optional(),
167
+ error: z.string().optional(),
168
+ validation: jsonElementSchema.optional(),
169
+ refreshUrl: z.string().optional(),
194
170
  });
195
171
 
196
- export const iconNamedSchema = z.object({
197
- name: z.string(),
172
+ export const httpMethodSchema = z.union([
173
+ z.literal('GET'),
174
+ z.literal('POST'),
175
+ z.literal('PUT'),
176
+ z.literal('PATCH'),
177
+ z.literal('DELETE'),
178
+ ]);
179
+
180
+ export const formLayoutSchemaReferenceSchema = z.object({
181
+ $ref: z.string(),
198
182
  });
199
183
 
200
184
  export const sizeSchema = z.union([
@@ -205,45 +189,15 @@ export const sizeSchema = z.union([
205
189
  z.literal('xl'),
206
190
  ]);
207
191
 
208
- export const inlineAlertSchema = z.object({
209
- content: z.string(),
210
- context: contextSchema.optional(),
211
- });
212
-
213
- export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
214
-
215
- export const instructionsLayoutItemSchema = z.object({
216
- text: z.string(),
217
- context: contextSchema,
218
- tag: z.string().optional(),
219
- });
220
-
221
- export const formLayoutSchemaReferenceSchema = z.object({
222
- $ref: z.string(),
223
- });
224
-
225
192
  export const listLayoutStatusSchema = z.union([
226
193
  z.literal('warning'),
227
194
  z.literal('neutral'),
228
195
  z.literal('positive'),
229
196
  ]);
230
197
 
231
- export const imageLayoutSchema = z.object({
232
- type: z.literal('image'),
233
- text: z.string().optional(),
234
- url: z.string().optional(),
235
- accessibilityDescription: z.string().optional(),
236
- content: imageSchema.optional(),
237
- size: sizeSchema.optional(),
238
- control: z.string().optional(),
239
- margin: sizeSchema.optional(),
240
- align: alignSchema.optional(),
241
- });
242
-
243
- export const dividerLayoutSchema = z.object({
244
- type: z.literal('divider'),
245
- control: z.string().optional(),
246
- margin: sizeSchema.optional(),
198
+ export const supportingValuesSchema = z.object({
199
+ value: z.string().optional(),
200
+ subvalue: z.string().optional(),
247
201
  });
248
202
 
249
203
  export const statusListLayoutStatusSchema = z.union([
@@ -252,18 +206,28 @@ export const statusListLayoutStatusSchema = z.union([
252
206
  z.literal('done'),
253
207
  ]);
254
208
 
255
- export const headingLayoutSchema = z.object({
256
- type: z.literal('heading'),
257
- text: z.string(),
258
- size: sizeSchema.optional(),
259
- align: alignSchema.optional(),
260
- control: z.string().optional(),
261
- margin: sizeSchema.optional(),
262
- });
209
+ export const columnsLayoutBiasSchema = z.union([
210
+ z.literal('none'),
211
+ z.literal('left'),
212
+ z.literal('right'),
213
+ ]);
263
214
 
264
- export const infoLayoutSchema = z.object({
265
- type: z.literal('info'),
266
- markdown: z.string(),
215
+ export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
216
+
217
+ export const contextSchema = z.union([
218
+ z.literal('positive'),
219
+ z.literal('neutral'),
220
+ z.literal('warning'),
221
+ z.literal('negative'),
222
+ z.literal('success'),
223
+ z.literal('failure'),
224
+ z.literal('info'),
225
+ z.literal('primary'),
226
+ ]);
227
+
228
+ export const markdownLayoutSchema = z.object({
229
+ type: z.literal('markdown'),
230
+ content: z.string(),
267
231
  align: alignSchema.optional(),
268
232
  control: z.string().optional(),
269
233
  margin: sizeSchema.optional(),
@@ -276,17 +240,22 @@ export const loadingIndicatorLayoutSchema = z.object({
276
240
  margin: sizeSchema.optional(),
277
241
  });
278
242
 
279
- export const markdownLayoutSchema = z.object({
280
- type: z.literal('markdown'),
281
- content: z.string(),
282
- align: alignSchema.optional(),
243
+ export const imageLayoutSchema = z.object({
244
+ type: z.literal('image'),
245
+ text: z.string().optional(),
246
+ url: z.string().optional(),
247
+ accessibilityDescription: z.string().optional(),
248
+ content: imageSchema.optional(),
249
+ size: sizeSchema.optional(),
283
250
  control: z.string().optional(),
284
251
  margin: sizeSchema.optional(),
252
+ align: alignSchema.optional(),
285
253
  });
286
254
 
287
- export const paragraphLayoutSchema = z.object({
288
- type: z.literal('paragraph'),
255
+ export const headingLayoutSchema = z.object({
256
+ type: z.literal('heading'),
289
257
  text: z.string(),
258
+ size: sizeSchema.optional(),
290
259
  align: alignSchema.optional(),
291
260
  control: z.string().optional(),
292
261
  margin: sizeSchema.optional(),
@@ -303,35 +272,40 @@ export const searchLayoutSchema = z.object({
303
272
  margin: sizeSchema.optional(),
304
273
  });
305
274
 
275
+ export const dividerLayoutSchema = z.object({
276
+ type: z.literal('divider'),
277
+ control: z.string().optional(),
278
+ margin: sizeSchema.optional(),
279
+ });
280
+
306
281
  export const modalLayoutTriggerSchema = z.object({
307
282
  title: z.string(),
308
283
  });
309
284
 
310
- export const columnsLayoutBiasSchema = z.union([
311
- z.literal('none'),
312
- z.literal('left'),
313
- z.literal('right'),
314
- ]);
315
-
316
- export const externalSchema = z.object({
317
- url: z.string(),
285
+ export const paragraphLayoutSchema = z.object({
286
+ type: z.literal('paragraph'),
287
+ text: z.string(),
288
+ align: alignSchema.optional(),
289
+ control: z.string().optional(),
290
+ margin: sizeSchema.optional(),
318
291
  });
319
292
 
320
- export const stepErrorSchema = z.object({
321
- error: z.string().optional(),
322
- validation: jsonElementSchema.optional(),
293
+ export const iconNamedSchema = z.object({
294
+ name: z.string(),
323
295
  });
324
296
 
325
- export const linkSchema = z.object({
297
+ export const iconTextSchema = z.object({
298
+ text: z.string(),
299
+ });
300
+
301
+ export const externalSchema = z.object({
326
302
  url: z.string(),
327
303
  });
328
304
 
329
- export const navigationStackBehaviorSchema = z.union([
330
- z.literal('default'),
331
- z.literal('remove-previous'),
332
- z.literal('remove-all'),
333
- z.literal('replace-current'),
334
- ]);
305
+ export const stepErrorSchema = z.object({
306
+ error: z.string().optional(),
307
+ validation: jsonElementSchema.optional(),
308
+ });
335
309
 
336
310
  export const dismissBehaviorSchema = z.object({
337
311
  type: z.literal('dismiss'),
@@ -342,6 +316,17 @@ export const linkBehaviorSchema = z.object({
342
316
  url: z.string(),
343
317
  });
344
318
 
319
+ export const navigationStackBehaviorSchema = z.union([
320
+ z.literal('default'),
321
+ z.literal('remove-previous'),
322
+ z.literal('remove-all'),
323
+ z.literal('replace-current'),
324
+ ]);
325
+
326
+ export const linkSchema = z.object({
327
+ url: z.string(),
328
+ });
329
+
345
330
  export const actionTypeSchema = z.union([
346
331
  z.literal('primary'),
347
332
  z.literal('secondary'),
@@ -352,6 +337,23 @@ export const actionTypeSchema = z.union([
352
337
 
353
338
  export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
354
339
 
340
+ export const summarySummariserSchema = z.object({
341
+ defaultTitle: z.string().optional(),
342
+ defaultDescription: z.string().optional(),
343
+ defaultIcon: iconSchema.optional(),
344
+ defaultImage: imageSchema.optional(),
345
+ providesTitle: z.boolean().optional(),
346
+ providesDescription: z.boolean().optional(),
347
+ providesIcon: z.boolean().optional(),
348
+ providesImage: z.boolean().optional(),
349
+ });
350
+
351
+ export const validateAsyncSchema = z.object({
352
+ param: z.string(),
353
+ method: httpMethodSchema,
354
+ url: z.string(),
355
+ });
356
+
355
357
  export const actionSchema = z.object({
356
358
  title: z.string().optional(),
357
359
  type: actionTypeSchema.optional(),
@@ -375,36 +377,25 @@ export const searchSearchRequestSchema = z.object({
375
377
  query: z.string(),
376
378
  });
377
379
 
378
- export const errorResponseBodySchema = z.object({
379
- refreshFormUrl: z.string().optional(),
380
- analytics: z.record(z.string()).optional(),
381
- error: z.string().optional(),
382
- validation: jsonElementSchema.optional(),
383
- refreshUrl: z.string().optional(),
384
- });
385
-
386
- export const actionResponseBodySchema = z.object({
387
- action: actionSchema,
380
+ export const searchResultActionSchema = z.object({
381
+ type: z.literal('action'),
382
+ title: z.string(),
383
+ description: z.string().optional(),
384
+ icon: iconSchema.optional(),
385
+ image: imageSchema.optional(),
386
+ value: actionSchema,
388
387
  });
389
388
 
390
- export const summarySummariserSchema = z.object({
391
- defaultTitle: z.string().optional(),
392
- defaultDescription: z.string().optional(),
393
- defaultIcon: iconSchema.optional(),
394
- defaultImage: imageSchema.optional(),
395
- providesTitle: z.boolean().optional(),
396
- providesDescription: z.boolean().optional(),
397
- providesIcon: z.boolean().optional(),
398
- providesImage: z.boolean().optional(),
389
+ export const searchResultSearchSchema = z.object({
390
+ type: z.literal('search'),
391
+ title: z.string(),
392
+ description: z.string().optional(),
393
+ icon: iconSchema.optional(),
394
+ image: imageSchema.optional(),
395
+ value: searchSearchRequestSchema,
399
396
  });
400
397
 
401
- export const instructionsLayoutSchema = z.object({
402
- type: z.literal('instructions'),
403
- title: z.string().optional(),
404
- items: z.array(instructionsLayoutItemSchema),
405
- control: z.string().optional(),
406
- margin: sizeSchema.optional(),
407
- });
398
+ export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
408
399
 
409
400
  export const formLayoutSchema = z.object({
410
401
  type: z.literal('form'),
@@ -414,19 +405,31 @@ export const formLayoutSchema = z.object({
414
405
  margin: sizeSchema.optional(),
415
406
  });
416
407
 
417
- export const containerBehaviorSchema = z.object({
418
- action: actionSchema.optional(),
419
- link: linkSchema.optional(),
408
+ export const inlineAlertSchema = z.object({
409
+ content: z.string(),
410
+ context: contextSchema.optional(),
420
411
  });
421
412
 
422
- export const navigationBackBehaviorSchema = z.object({
423
- title: z.string().optional(),
424
- action: actionSchema,
413
+ export const infoLayoutSchema = z.object({
414
+ type: z.literal('info'),
415
+ markdown: z.string(),
416
+ align: alignSchema.optional(),
417
+ control: z.string().optional(),
418
+ margin: sizeSchema.optional(),
425
419
  });
426
420
 
427
- export const actionBehaviorSchema = z.object({
428
- type: z.literal('action'),
429
- action: actionSchema,
421
+ export const instructionsLayoutItemSchema = z.object({
422
+ text: z.string(),
423
+ context: contextSchema,
424
+ tag: z.string().optional(),
425
+ });
426
+
427
+ export const instructionsLayoutSchema = z.object({
428
+ type: z.literal('instructions'),
429
+ title: z.string().optional(),
430
+ items: z.array(instructionsLayoutItemSchema),
431
+ control: z.string().optional(),
432
+ margin: sizeSchema.optional(),
430
433
  });
431
434
 
432
435
  export const suggestionsValueSchema = z.object({
@@ -437,73 +440,69 @@ export const suggestionsValueSchema = z.object({
437
440
  tag: z.string().optional(),
438
441
  });
439
442
 
440
- export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
441
-
442
- export const searchResultActionSchema = z.object({
443
+ export const actionBehaviorSchema = z.object({
443
444
  type: z.literal('action'),
444
- title: z.string(),
445
- description: z.string().optional(),
446
- icon: iconSchema.optional(),
447
- image: imageSchema.optional(),
448
- value: actionSchema,
445
+ action: actionSchema,
449
446
  });
450
447
 
451
- export const searchResultSearchSchema = z.object({
452
- type: z.literal('search'),
453
- title: z.string(),
454
- description: z.string().optional(),
455
- icon: iconSchema.optional(),
456
- image: imageSchema.optional(),
457
- value: searchSearchRequestSchema,
448
+ export const containerBehaviorSchema = z.object({
449
+ action: actionSchema.optional(),
450
+ link: linkSchema.optional(),
451
+ });
452
+
453
+ export const navigationBackBehaviorSchema = z.object({
454
+ title: z.string().optional(),
455
+ action: actionSchema,
458
456
  });
459
457
 
458
+ export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
459
+
460
460
  export const suggestionsSchema = z.object({
461
461
  values: z.array(suggestionsValueSchema),
462
462
  });
463
463
 
464
- export const navigationSchema = z.object({
465
- backButton: navigationBackBehaviorSchema.optional(),
466
- back: navigationBackBehaviorSchema.optional(),
467
- stackBehavior: navigationStackBehaviorSchema.optional(),
464
+ export const actionResponseBodySchema = z.object({
465
+ action: actionSchema,
468
466
  });
469
467
 
470
- export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
471
-
472
468
  export const searchResponseBodySchema = z.object({
473
469
  results: z.array(searchResultSchema),
474
470
  });
475
471
 
476
- export const modalResponseBodySchema: z.ZodSchema<ModalResponseBody> = z.lazy(() =>
472
+ export const navigationSchema = z.object({
473
+ backButton: navigationBackBehaviorSchema.optional(),
474
+ back: navigationBackBehaviorSchema.optional(),
475
+ stackBehavior: navigationStackBehaviorSchema.optional(),
476
+ });
477
+
478
+ export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
477
479
  z.object({
480
+ type: z.literal('array'),
481
+ promoted: z.boolean().optional(),
482
+ $id: z.string().optional(),
483
+ items: schemaSchema,
484
+ addItemTitle: z.string(),
485
+ editItemTitle: z.string(),
486
+ minItems: z.number().optional(),
487
+ maxItems: z.number().optional(),
488
+ placeholder: z.string().optional(),
478
489
  title: z.string().optional(),
479
- content: z.array(layoutSchema),
490
+ description: z.string().optional(),
491
+ control: z.string().optional(),
492
+ hidden: z.boolean().optional(),
493
+ icon: iconSchema.optional(),
494
+ image: imageSchema.optional(),
495
+ keywords: z.array(z.string()).optional(),
496
+ summary: summarySummariserSchema.optional(),
497
+ analyticsId: z.string().optional(),
498
+ persistAsync: persistAsyncSchema.optional(),
499
+ validationAsync: validateAsyncSchema.optional(),
500
+ alert: alertLayoutSchema.optional(),
501
+ validationMessages: z.record(z.string()).optional(),
502
+ disabled: z.boolean().optional(),
480
503
  }),
481
504
  );
482
505
 
483
- export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
484
- z.union([
485
- alertLayoutSchema,
486
- boxLayoutSchema,
487
- buttonLayoutSchema,
488
- columnsLayoutSchema,
489
- decisionLayoutSchema,
490
- dividerLayoutSchema,
491
- formLayoutSchema,
492
- headingLayoutSchema,
493
- imageLayoutSchema,
494
- infoLayoutSchema,
495
- instructionsLayoutSchema,
496
- listLayoutSchema,
497
- loadingIndicatorLayoutSchema,
498
- markdownLayoutSchema,
499
- modalLayoutSchema,
500
- paragraphLayoutSchema,
501
- reviewLayoutSchema,
502
- searchLayoutSchema,
503
- statusListLayoutSchema,
504
- ]),
505
- );
506
-
507
506
  export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
508
507
  z.union([
509
508
  allOfSchemaSchema,
@@ -519,80 +518,77 @@ export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
519
518
  ]),
520
519
  );
521
520
 
522
- export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
521
+ export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
523
522
  z.object({
524
- disabled: z.boolean().optional(),
525
- promoted: z.boolean().optional(),
526
- allOf: z.array(schemaSchema),
527
- $id: z.string().optional(),
528
- title: z.string().optional(),
529
- description: z.string().optional(),
530
- control: z.string().optional(),
531
- hidden: z.boolean().optional(),
532
- icon: iconSchema.optional(),
533
- image: imageSchema.optional(),
534
- keywords: z.array(z.string()).optional(),
535
- summary: summaryProviderSchema.optional(),
536
- analyticsId: z.string().optional(),
537
- alert: alertLayoutSchema.optional(),
523
+ param: z.string(),
524
+ idProperty: z.string(),
525
+ schema: schemaSchema,
526
+ url: z.string(),
527
+ method: httpMethodSchema,
538
528
  }),
539
529
  );
540
530
 
541
- export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
542
- z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
531
+ export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
532
+ z.object({
533
+ type: z.literal('alert'),
534
+ markdown: z.string(),
535
+ context: contextSchema.optional(),
536
+ control: z.string().optional(),
537
+ margin: sizeSchema.optional(),
538
+ callToAction: alertLayoutCallToActionSchema.optional(),
539
+ }),
543
540
  );
544
541
 
545
- export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
542
+ export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
546
543
  z.object({
547
- type: z.literal('blob'),
544
+ type: z.literal('integer'),
545
+ autofillProvider: z.string().optional(),
548
546
  promoted: z.boolean().optional(),
547
+ refreshFormOnChange: z.boolean().optional(),
548
+ refreshUrl: z.string().optional(),
549
+ refreshFormUrl: z.string().optional(),
550
+ placeholder: z.string().optional(),
551
+ minimum: z.number().optional(),
552
+ maximum: z.number().optional(),
549
553
  $id: z.string().optional(),
550
554
  title: z.string().optional(),
551
555
  description: z.string().optional(),
552
556
  control: z.string().optional(),
557
+ default: z.number().optional(),
553
558
  hidden: z.boolean().optional(),
559
+ disabled: z.boolean().optional(),
554
560
  icon: iconSchema.optional(),
555
561
  image: imageSchema.optional(),
556
562
  keywords: z.array(z.string()).optional(),
557
563
  summary: summaryProviderSchema.optional(),
558
564
  analyticsId: z.string().optional(),
565
+ persistAsync: persistAsyncSchema.optional(),
566
+ refreshStepOnChange: z.boolean().optional(),
559
567
  validationAsync: validateAsyncSchema.optional(),
560
568
  validationMessages: z.record(z.string()).optional(),
561
569
  alert: alertLayoutSchema.optional(),
562
- cameraConfig: jsonElementSchema.optional(),
563
- accepts: z.array(z.string()).optional(),
564
- maxSize: z.number().optional(),
565
- source: uploadSourceSchema.optional(),
566
- disabled: z.boolean().optional(),
570
+ autocompleteHint: z.array(autocompleteTokenSchema).optional(),
571
+ autofillKey: z.string().optional(),
572
+ help: helpSchema.optional(),
567
573
  }),
568
574
  );
569
575
 
570
- export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
576
+ export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
571
577
  z.object({
572
- type: z.literal('boolean'),
573
- autofillProvider: z.string().optional(),
578
+ disabled: z.boolean().optional(),
574
579
  promoted: z.boolean().optional(),
575
- refreshFormOnChange: z.boolean().optional(),
576
- refreshUrl: z.string().optional(),
577
- refreshFormUrl: z.string().optional(),
580
+ allOf: z.array(schemaSchema),
578
581
  $id: z.string().optional(),
579
582
  title: z.string().optional(),
580
583
  description: z.string().optional(),
581
584
  control: z.string().optional(),
582
- default: z.boolean().optional(),
583
585
  hidden: z.boolean().optional(),
584
- disabled: z.boolean().optional(),
585
586
  icon: iconSchema.optional(),
586
587
  image: imageSchema.optional(),
587
588
  keywords: z.array(z.string()).optional(),
588
589
  summary: summaryProviderSchema.optional(),
589
590
  analyticsId: z.string().optional(),
590
- persistAsync: persistAsyncSchema.optional(),
591
- refreshStepOnChange: z.boolean().optional(),
592
- validationAsync: validateAsyncSchema.optional(),
593
591
  alert: alertLayoutSchema.optional(),
594
- autofillKey: z.string().optional(),
595
- help: helpSchema.optional(),
596
592
  }),
597
593
  );
598
594
 
@@ -615,94 +611,97 @@ export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
615
611
  }),
616
612
  );
617
613
 
618
- export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
614
+ export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
615
+ z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
616
+ );
617
+
618
+ export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
619
619
  z.object({
620
- type: z.literal('integer'),
621
- autofillProvider: z.string().optional(),
620
+ type: z.literal('array'),
622
621
  promoted: z.boolean().optional(),
623
- refreshFormOnChange: z.boolean().optional(),
624
- refreshUrl: z.string().optional(),
625
- refreshFormUrl: z.string().optional(),
626
- placeholder: z.string().optional(),
627
- minimum: z.number().optional(),
628
- maximum: z.number().optional(),
629
622
  $id: z.string().optional(),
623
+ items: z.array(schemaSchema),
630
624
  title: z.string().optional(),
631
625
  description: z.string().optional(),
632
626
  control: z.string().optional(),
633
- default: z.number().optional(),
634
627
  hidden: z.boolean().optional(),
635
- disabled: z.boolean().optional(),
636
628
  icon: iconSchema.optional(),
637
629
  image: imageSchema.optional(),
638
630
  keywords: z.array(z.string()).optional(),
639
631
  summary: summaryProviderSchema.optional(),
640
632
  analyticsId: z.string().optional(),
641
633
  persistAsync: persistAsyncSchema.optional(),
642
- refreshStepOnChange: z.boolean().optional(),
643
634
  validationAsync: validateAsyncSchema.optional(),
644
- validationMessages: z.record(z.string()).optional(),
645
635
  alert: alertLayoutSchema.optional(),
646
- autocompleteHint: z.array(autocompleteTokenSchema).optional(),
647
- autofillKey: z.string().optional(),
648
- help: helpSchema.optional(),
649
636
  }),
650
637
  );
651
638
 
652
- export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
639
+ export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
653
640
  z.object({
654
- type: z.literal('number'),
655
- autofillProvider: z.string().optional(),
641
+ type: z.literal('object'),
642
+ disabled: z.boolean().optional(),
656
643
  promoted: z.boolean().optional(),
657
- refreshFormOnChange: z.boolean().optional(),
658
- refreshUrl: z.string().optional(),
659
- refreshFormUrl: z.string().optional(),
660
- placeholder: z.string().optional(),
661
- minimum: z.number().optional(),
662
- maximum: z.number().optional(),
644
+ help: helpSchema.optional(),
645
+ properties: z.record(schemaSchema),
646
+ displayOrder: z.array(z.string()),
647
+ required: z.array(z.string()).optional(),
663
648
  $id: z.string().optional(),
664
649
  title: z.string().optional(),
665
650
  description: z.string().optional(),
666
651
  control: z.string().optional(),
667
- default: z.number().optional(),
668
652
  hidden: z.boolean().optional(),
669
- disabled: z.boolean().optional(),
670
653
  icon: iconSchema.optional(),
671
654
  image: imageSchema.optional(),
672
655
  keywords: z.array(z.string()).optional(),
673
656
  summary: summaryProviderSchema.optional(),
674
657
  analyticsId: z.string().optional(),
675
- persistAsync: persistAsyncSchema.optional(),
676
- refreshStepOnChange: z.boolean().optional(),
677
- validationAsync: validateAsyncSchema.optional(),
678
- validationMessages: z.record(z.string()).optional(),
679
658
  alert: alertLayoutSchema.optional(),
680
- autocompleteHint: z.array(autocompleteTokenSchema).optional(),
681
- autofillKey: z.string().optional(),
682
- help: helpSchema.optional(),
683
659
  }),
684
660
  );
685
661
 
686
- export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
662
+ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
687
663
  z.object({
688
- type: z.literal('object'),
689
- disabled: z.boolean().optional(),
664
+ type: z.literal('string'),
665
+ autofillProvider: z.string().optional(),
690
666
  promoted: z.boolean().optional(),
691
- help: helpSchema.optional(),
692
- properties: z.record(schemaSchema),
693
- displayOrder: z.array(z.string()),
694
- required: z.array(z.string()).optional(),
667
+ refreshFormOnChange: z.boolean().optional(),
668
+ refreshUrl: z.string().optional(),
669
+ refreshFormUrl: z.string().optional(),
670
+ format: stringSchemaFormatSchema.optional(),
671
+ displayFormat: z.string().optional(),
672
+ placeholder: z.string().optional(),
673
+ minLength: z.number().optional(),
674
+ maxLength: z.number().optional(),
675
+ minimum: z.string().optional(),
676
+ maximum: z.string().optional(),
677
+ pattern: z.string().optional(),
678
+ autocapitalization: autocapitalizationTypeSchema.optional(),
679
+ autocorrect: z.boolean().optional(),
695
680
  $id: z.string().optional(),
696
681
  title: z.string().optional(),
697
682
  description: z.string().optional(),
698
683
  control: z.string().optional(),
684
+ default: z.string().optional(),
699
685
  hidden: z.boolean().optional(),
686
+ disabled: z.boolean().optional(),
700
687
  icon: iconSchema.optional(),
701
688
  image: imageSchema.optional(),
702
689
  keywords: z.array(z.string()).optional(),
703
690
  summary: summaryProviderSchema.optional(),
704
691
  analyticsId: z.string().optional(),
692
+ persistAsync: persistAsyncSchema.optional(),
693
+ refreshStepOnChange: z.boolean().optional(),
694
+ validationAsync: validateAsyncSchema.optional(),
695
+ validationMessages: z.record(z.string()).optional(),
705
696
  alert: alertLayoutSchema.optional(),
697
+ cameraConfig: jsonElementSchema.optional(),
698
+ accepts: z.array(z.string()).optional(),
699
+ maxSize: z.number().optional(),
700
+ source: uploadSourceSchema.optional(),
701
+ autocompleteHint: z.array(autocompleteTokenSchema).optional(),
702
+ autofillKey: z.string().optional(),
703
+ help: helpSchema.optional(),
704
+ suggestions: suggestionsSchema.optional(),
706
705
  }),
707
706
  );
708
707
 
@@ -737,38 +736,20 @@ export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
737
736
  }),
738
737
  );
739
738
 
740
- export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
739
+ export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
741
740
  z.object({
742
- type: z.literal('string'),
743
- autofillProvider: z.string().optional(),
741
+ type: z.literal('blob'),
744
742
  promoted: z.boolean().optional(),
745
- refreshFormOnChange: z.boolean().optional(),
746
- refreshUrl: z.string().optional(),
747
- refreshFormUrl: z.string().optional(),
748
- format: stringSchemaFormatSchema.optional(),
749
- displayFormat: z.string().optional(),
750
- placeholder: z.string().optional(),
751
- minLength: z.number().optional(),
752
- maxLength: z.number().optional(),
753
- minimum: z.string().optional(),
754
- maximum: z.string().optional(),
755
- pattern: z.string().optional(),
756
- autocapitalization: autocapitalizationTypeSchema.optional(),
757
- autocorrect: z.boolean().optional(),
758
743
  $id: z.string().optional(),
759
744
  title: z.string().optional(),
760
745
  description: z.string().optional(),
761
746
  control: z.string().optional(),
762
- default: z.string().optional(),
763
747
  hidden: z.boolean().optional(),
764
- disabled: z.boolean().optional(),
765
748
  icon: iconSchema.optional(),
766
749
  image: imageSchema.optional(),
767
750
  keywords: z.array(z.string()).optional(),
768
751
  summary: summaryProviderSchema.optional(),
769
752
  analyticsId: z.string().optional(),
770
- persistAsync: persistAsyncSchema.optional(),
771
- refreshStepOnChange: z.boolean().optional(),
772
753
  validationAsync: validateAsyncSchema.optional(),
773
754
  validationMessages: z.record(z.string()).optional(),
774
755
  alert: alertLayoutSchema.optional(),
@@ -776,117 +757,105 @@ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
776
757
  accepts: z.array(z.string()).optional(),
777
758
  maxSize: z.number().optional(),
778
759
  source: uploadSourceSchema.optional(),
779
- autocompleteHint: z.array(autocompleteTokenSchema).optional(),
780
- autofillKey: z.string().optional(),
781
- help: helpSchema.optional(),
782
- suggestions: suggestionsSchema.optional(),
783
- }),
784
- );
785
-
786
- export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
787
- z.object({
788
- param: z.string(),
789
- idProperty: z.string(),
790
- schema: schemaSchema,
791
- url: z.string(),
792
- method: httpMethodSchema,
793
- }),
794
- );
795
-
796
- export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
797
- z.object({
798
- type: z.literal('alert'),
799
- markdown: z.string(),
800
- context: contextSchema.optional(),
801
- control: z.string().optional(),
802
- margin: sizeSchema.optional(),
803
- callToAction: alertLayoutCallToActionSchema.optional(),
760
+ disabled: z.boolean().optional(),
804
761
  }),
805
762
  );
806
763
 
807
- export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
764
+ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
808
765
  z.object({
809
- type: z.literal('array'),
810
- promoted: z.boolean().optional(),
811
- $id: z.string().optional(),
812
- items: schemaSchema,
813
- addItemTitle: z.string(),
814
- editItemTitle: z.string(),
815
- minItems: z.number().optional(),
816
- maxItems: z.number().optional(),
766
+ type: z.literal('number'),
767
+ autofillProvider: z.string().optional(),
768
+ promoted: z.boolean().optional(),
769
+ refreshFormOnChange: z.boolean().optional(),
770
+ refreshUrl: z.string().optional(),
771
+ refreshFormUrl: z.string().optional(),
817
772
  placeholder: z.string().optional(),
773
+ minimum: z.number().optional(),
774
+ maximum: z.number().optional(),
775
+ $id: z.string().optional(),
818
776
  title: z.string().optional(),
819
777
  description: z.string().optional(),
820
778
  control: z.string().optional(),
779
+ default: z.number().optional(),
821
780
  hidden: z.boolean().optional(),
781
+ disabled: z.boolean().optional(),
822
782
  icon: iconSchema.optional(),
823
783
  image: imageSchema.optional(),
824
784
  keywords: z.array(z.string()).optional(),
825
- summary: summarySummariserSchema.optional(),
785
+ summary: summaryProviderSchema.optional(),
826
786
  analyticsId: z.string().optional(),
827
787
  persistAsync: persistAsyncSchema.optional(),
788
+ refreshStepOnChange: z.boolean().optional(),
828
789
  validationAsync: validateAsyncSchema.optional(),
829
- alert: alertLayoutSchema.optional(),
830
790
  validationMessages: z.record(z.string()).optional(),
831
- disabled: z.boolean().optional(),
791
+ alert: alertLayoutSchema.optional(),
792
+ autocompleteHint: z.array(autocompleteTokenSchema).optional(),
793
+ autofillKey: z.string().optional(),
794
+ help: helpSchema.optional(),
832
795
  }),
833
796
  );
834
797
 
835
- export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
798
+ export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
836
799
  z.object({
837
- type: z.literal('array'),
800
+ type: z.literal('boolean'),
801
+ autofillProvider: z.string().optional(),
838
802
  promoted: z.boolean().optional(),
803
+ refreshFormOnChange: z.boolean().optional(),
804
+ refreshUrl: z.string().optional(),
805
+ refreshFormUrl: z.string().optional(),
839
806
  $id: z.string().optional(),
840
- items: z.array(schemaSchema),
841
807
  title: z.string().optional(),
842
808
  description: z.string().optional(),
843
809
  control: z.string().optional(),
810
+ default: z.boolean().optional(),
844
811
  hidden: z.boolean().optional(),
812
+ disabled: z.boolean().optional(),
845
813
  icon: iconSchema.optional(),
846
814
  image: imageSchema.optional(),
847
815
  keywords: z.array(z.string()).optional(),
848
816
  summary: summaryProviderSchema.optional(),
849
817
  analyticsId: z.string().optional(),
850
818
  persistAsync: persistAsyncSchema.optional(),
819
+ refreshStepOnChange: z.boolean().optional(),
851
820
  validationAsync: validateAsyncSchema.optional(),
852
821
  alert: alertLayoutSchema.optional(),
822
+ autofillKey: z.string().optional(),
823
+ help: helpSchema.optional(),
853
824
  }),
854
825
  );
855
826
 
856
- export const additionalInfoSchema: z.ZodSchema<AdditionalInfo> = z.lazy(() =>
827
+ export const modalResponseBodySchema: z.ZodSchema<ModalResponseBody> = z.lazy(() =>
857
828
  z.object({
858
- text: z.string(),
859
- behavior: behaviorSchema.optional(),
860
- accessibilityDescription: z.string().optional(),
829
+ title: z.string().optional(),
830
+ content: z.array(layoutSchema),
861
831
  }),
862
832
  );
863
833
 
864
- export const behaviorSchema: z.ZodSchema<Behavior> = z.lazy(() =>
834
+ export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
865
835
  z.union([
866
- actionBehaviorSchema,
867
- containerBehaviorSchema,
868
- dismissBehaviorSchema,
869
- linkBehaviorSchema,
870
- modalBehaviorSchema,
836
+ alertLayoutSchema,
837
+ boxLayoutSchema,
838
+ buttonLayoutSchema,
839
+ columnsLayoutSchema,
840
+ decisionLayoutSchema,
841
+ dividerLayoutSchema,
842
+ formLayoutSchema,
843
+ headingLayoutSchema,
844
+ imageLayoutSchema,
845
+ infoLayoutSchema,
846
+ instructionsLayoutSchema,
847
+ listLayoutSchema,
848
+ loadingIndicatorLayoutSchema,
849
+ markdownLayoutSchema,
850
+ modalLayoutSchema,
851
+ paragraphLayoutSchema,
852
+ reviewLayoutSchema,
853
+ searchLayoutSchema,
854
+ sectionLayoutSchema,
855
+ statusListLayoutSchema,
871
856
  ]),
872
857
  );
873
858
 
874
- export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
875
- z.object({
876
- action: actionSchema.optional(),
877
- title: z.string(),
878
- description: z.string().optional(),
879
- disabled: z.boolean().optional(),
880
- icon: iconSchema.optional(),
881
- image: imageSchema.optional(),
882
- behavior: behaviorSchema.optional(),
883
- tag: z.string().optional(),
884
- additionalText: z.string().optional(),
885
- supportingValues: supportingValuesSchema.optional(),
886
- inlineAlert: inlineAlertSchema.optional(),
887
- }),
888
- );
889
-
890
859
  export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
891
860
  z.object({
892
861
  status: listLayoutStatusSchema.optional(),
@@ -904,26 +873,26 @@ export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
904
873
  }),
905
874
  );
906
875
 
907
- export const itemCallToActionSchema: z.ZodSchema<ItemCallToAction> = z.lazy(() =>
876
+ export const additionalInfoSchema: z.ZodSchema<AdditionalInfo> = z.lazy(() =>
908
877
  z.object({
909
- title: z.string(),
878
+ text: z.string(),
879
+ behavior: behaviorSchema.optional(),
910
880
  accessibilityDescription: z.string().optional(),
911
- behavior: behaviorSchema,
912
881
  }),
913
882
  );
914
883
 
915
- export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
884
+ export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.lazy(() =>
916
885
  z.object({
917
- type: z.literal('box'),
918
- components: z.array(layoutSchema),
919
- width: sizeSchema.optional(),
920
- border: z.boolean().optional(),
921
- control: z.string().optional(),
922
- margin: sizeSchema.optional(),
886
+ title: z.string(),
887
+ description: z.string().optional(),
888
+ icon: iconSchema,
889
+ status: statusListLayoutStatusSchema.optional(),
890
+ callToAction: itemCallToActionSchema.optional(),
891
+ tag: z.string().optional(),
923
892
  }),
924
893
  );
925
894
 
926
- export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
895
+ export const itemCallToActionSchema: z.ZodSchema<ItemCallToAction> = z.lazy(() =>
927
896
  z.object({
928
897
  title: z.string(),
929
898
  accessibilityDescription: z.string().optional(),
@@ -931,55 +900,58 @@ export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction>
931
900
  }),
932
901
  );
933
902
 
934
- export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
903
+ export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
935
904
  z.object({
936
- type: z.literal('button'),
937
- action: actionSchema.optional(),
938
- size: sizeSchema.optional(),
939
- title: z.string().optional(),
940
- behavior: behaviorSchema.optional(),
941
- context: contextSchema.optional(),
942
- disabled: z.boolean().optional(),
943
- pinOrder: z.number().optional(),
944
- control: z.string().optional(),
945
- margin: sizeSchema.optional(),
905
+ title: z.string(),
906
+ accessibilityDescription: z.string().optional(),
907
+ behavior: behaviorSchema,
946
908
  }),
947
909
  );
948
910
 
949
- export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
911
+ export const behaviorSchema: z.ZodSchema<Behavior> = z.lazy(() =>
912
+ z.union([
913
+ actionBehaviorSchema,
914
+ containerBehaviorSchema,
915
+ dismissBehaviorSchema,
916
+ linkBehaviorSchema,
917
+ modalBehaviorSchema,
918
+ ]),
919
+ );
920
+
921
+ export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
950
922
  z.object({
951
- type: z.literal('review'),
952
- orientation: z.string().optional(),
953
- action: actionSchema.optional(),
954
- fields: z.array(reviewLayoutFieldSchema),
955
- title: z.string().optional(),
956
- callToAction: reviewLayoutCallToActionSchema.optional(),
923
+ type: z.literal('box'),
924
+ components: z.array(layoutSchema),
925
+ width: sizeSchema.optional(),
926
+ border: z.boolean().optional(),
957
927
  control: z.string().optional(),
958
928
  margin: sizeSchema.optional(),
959
929
  }),
960
930
  );
961
931
 
962
- export const reviewLayoutFieldSchema: z.ZodSchema<ReviewLayoutField> = z.lazy(() =>
932
+ export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
963
933
  z.object({
964
- label: z.string(),
965
- value: z.string(),
966
- rawValue: z.string().optional(),
967
- help: helpSchema.optional(),
968
- tag: z.string().optional(),
969
- icon: iconSchema.optional(),
970
- image: imageSchema.optional(),
971
- additionalInfo: additionalInfoSchema.optional(),
972
- inlineAlert: inlineAlertSchema.optional(),
973
- callToAction: reviewLayoutCallToActionSchema.optional(),
934
+ type: z.literal('decision'),
935
+ title: z.string().optional(),
936
+ options: z.array(decisionLayoutOptionSchema),
937
+ control: z.string().optional(),
938
+ margin: sizeSchema.optional(),
974
939
  }),
975
940
  );
976
941
 
977
- export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
942
+ export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
978
943
  z.object({
979
944
  action: actionSchema.optional(),
980
945
  title: z.string(),
981
- accessibilityDescription: z.string().optional(),
946
+ description: z.string().optional(),
947
+ disabled: z.boolean().optional(),
948
+ icon: iconSchema.optional(),
949
+ image: imageSchema.optional(),
982
950
  behavior: behaviorSchema.optional(),
951
+ tag: z.string().optional(),
952
+ additionalText: z.string().optional(),
953
+ supportingValues: supportingValuesSchema.optional(),
954
+ inlineAlert: inlineAlertSchema.optional(),
983
955
  }),
984
956
  );
985
957
 
@@ -994,16 +966,25 @@ export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
994
966
  }),
995
967
  );
996
968
 
997
- export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
969
+ export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
998
970
  z.object({
999
- type: z.literal('decision'),
1000
- title: z.string().optional(),
1001
- options: z.array(decisionLayoutOptionSchema),
971
+ type: z.literal('section'),
972
+ components: z.array(layoutSchema),
973
+ title: z.string(),
974
+ callToAction: sectionLayoutCallToActionSchema.optional(),
1002
975
  control: z.string().optional(),
1003
976
  margin: sizeSchema.optional(),
1004
977
  }),
1005
978
  );
1006
979
 
980
+ export const sectionLayoutCallToActionSchema: z.ZodSchema<SectionLayoutCallToAction> = z.lazy(() =>
981
+ z.object({
982
+ title: z.string(),
983
+ accessibilityDescription: z.string().optional(),
984
+ behavior: behaviorSchema,
985
+ }),
986
+ );
987
+
1007
988
  export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
1008
989
  z.object({
1009
990
  type: z.literal('list'),
@@ -1015,13 +996,20 @@ export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
1015
996
  }),
1016
997
  );
1017
998
 
1018
- export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
999
+ export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
1019
1000
  z.object({
1020
- type: z.literal('modal'),
1021
- control: z.string().optional(),
1022
- margin: sizeSchema.optional(),
1023
- trigger: modalLayoutTriggerSchema,
1024
- content: modalLayoutContentSchema,
1001
+ title: z.string(),
1002
+ accessibilityDescription: z.string().optional(),
1003
+ behavior: behaviorSchema,
1004
+ }),
1005
+ );
1006
+
1007
+ export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
1008
+ z.object({
1009
+ action: actionSchema.optional(),
1010
+ title: z.string(),
1011
+ accessibilityDescription: z.string().optional(),
1012
+ behavior: behaviorSchema.optional(),
1025
1013
  }),
1026
1014
  );
1027
1015
 
@@ -1035,14 +1023,13 @@ export const statusListLayoutSchema: z.ZodSchema<StatusListLayout> = z.lazy(() =
1035
1023
  }),
1036
1024
  );
1037
1025
 
1038
- export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.lazy(() =>
1026
+ export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
1039
1027
  z.object({
1040
- title: z.string(),
1041
- description: z.string().optional(),
1042
- icon: iconSchema,
1043
- status: statusListLayoutStatusSchema.optional(),
1044
- callToAction: itemCallToActionSchema.optional(),
1045
- tag: z.string().optional(),
1028
+ type: z.literal('modal'),
1029
+ control: z.string().optional(),
1030
+ margin: sizeSchema.optional(),
1031
+ trigger: modalLayoutTriggerSchema,
1032
+ content: modalLayoutContentSchema,
1046
1033
  }),
1047
1034
  );
1048
1035
 
@@ -1053,11 +1040,46 @@ export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(
1053
1040
  }),
1054
1041
  );
1055
1042
 
1056
- export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
1043
+ export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
1057
1044
  z.object({
1058
- title: z.string(),
1059
- accessibilityDescription: z.string().optional(),
1060
- behavior: behaviorSchema,
1045
+ type: z.literal('review'),
1046
+ orientation: z.string().optional(),
1047
+ action: actionSchema.optional(),
1048
+ fields: z.array(reviewLayoutFieldSchema),
1049
+ title: z.string().optional(),
1050
+ callToAction: reviewLayoutCallToActionSchema.optional(),
1051
+ control: z.string().optional(),
1052
+ margin: sizeSchema.optional(),
1053
+ }),
1054
+ );
1055
+
1056
+ export const reviewLayoutFieldSchema: z.ZodSchema<ReviewLayoutField> = z.lazy(() =>
1057
+ z.object({
1058
+ label: z.string(),
1059
+ value: z.string(),
1060
+ rawValue: z.string().optional(),
1061
+ help: helpSchema.optional(),
1062
+ tag: z.string().optional(),
1063
+ icon: iconSchema.optional(),
1064
+ image: imageSchema.optional(),
1065
+ additionalInfo: additionalInfoSchema.optional(),
1066
+ inlineAlert: inlineAlertSchema.optional(),
1067
+ callToAction: reviewLayoutCallToActionSchema.optional(),
1068
+ }),
1069
+ );
1070
+
1071
+ export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
1072
+ z.object({
1073
+ type: z.literal('button'),
1074
+ action: actionSchema.optional(),
1075
+ size: sizeSchema.optional(),
1076
+ title: z.string().optional(),
1077
+ behavior: behaviorSchema.optional(),
1078
+ context: contextSchema.optional(),
1079
+ disabled: z.boolean().optional(),
1080
+ pinOrder: z.number().optional(),
1081
+ control: z.string().optional(),
1082
+ margin: sizeSchema.optional(),
1061
1083
  }),
1062
1084
  );
1063
1085