@wise/dynamic-flow-types 3.15.0 → 3.16.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.
Files changed (60) hide show
  1. package/build/main.js +88 -43
  2. package/build/main.mjs +88 -43
  3. package/build/next/feature/SuggestionsValue.d.ts +5 -0
  4. package/build/next/feature/toolbar/Toolbar.d.ts +4 -0
  5. package/build/next/feature/toolbar/ToolbarButton.d.ts +4 -0
  6. package/build/next/layout/AlertLayout.d.ts +4 -0
  7. package/build/next/layout/BoxLayout.d.ts +4 -0
  8. package/build/next/layout/ButtonLayout.d.ts +4 -0
  9. package/build/next/layout/ColumnsLayout.d.ts +4 -0
  10. package/build/next/layout/DecisionLayout.d.ts +4 -0
  11. package/build/next/layout/DecisionLayoutOption.d.ts +6 -1
  12. package/build/next/layout/DividerLayout.d.ts +4 -0
  13. package/build/next/layout/FormLayout.d.ts +4 -0
  14. package/build/next/layout/HeadingLayout.d.ts +4 -0
  15. package/build/next/layout/ImageLayout.d.ts +4 -0
  16. package/build/next/layout/InfoLayout.d.ts +4 -0
  17. package/build/next/layout/InstructionsLayout.d.ts +4 -0
  18. package/build/next/layout/InstructionsLayoutItem.d.ts +5 -0
  19. package/build/next/layout/ListLayout.d.ts +4 -0
  20. package/build/next/layout/ListLayoutItem.d.ts +10 -0
  21. package/build/next/layout/LoadingIndicatorLayout.d.ts +4 -0
  22. package/build/next/layout/MarkdownLayout.d.ts +4 -0
  23. package/build/next/layout/ModalLayout.d.ts +4 -0
  24. package/build/next/layout/ParagraphLayout.d.ts +4 -0
  25. package/build/next/layout/ProgressLayout.d.ts +4 -0
  26. package/build/next/layout/ReviewLayout.d.ts +4 -0
  27. package/build/next/layout/ReviewLayoutField.d.ts +5 -0
  28. package/build/next/layout/SearchLayout.d.ts +4 -0
  29. package/build/next/layout/SectionLayout.d.ts +4 -0
  30. package/build/next/layout/StatusListLayout.d.ts +4 -0
  31. package/build/next/layout/StatusListLayoutItem.d.ts +5 -0
  32. package/build/next/layout/TabsLayout.d.ts +4 -0
  33. package/build/next/layout/TabsLayoutTab.d.ts +5 -0
  34. package/build/next/schema/AllOfSchema.d.ts +4 -0
  35. package/build/next/schema/ArraySchemaList.d.ts +4 -0
  36. package/build/next/schema/ArraySchemaTuple.d.ts +4 -0
  37. package/build/next/schema/BlobSchema.d.ts +4 -0
  38. package/build/next/schema/BooleanSchema.d.ts +4 -0
  39. package/build/next/schema/ConstSchema.d.ts +4 -0
  40. package/build/next/schema/IntegerSchema.d.ts +4 -0
  41. package/build/next/schema/NumberSchema.d.ts +4 -0
  42. package/build/next/schema/ObjectSchema.d.ts +4 -0
  43. package/build/next/schema/OneOfSchema.d.ts +4 -0
  44. package/build/next/schema/StringSchema.d.ts +4 -0
  45. package/build/next/step/Step.d.ts +4 -0
  46. package/build/renderers/DecisionRendererProps.d.ts +2 -0
  47. package/build/renderers/InstructionsRendererProps.d.ts +2 -0
  48. package/build/renderers/ListRendererProps.d.ts +3 -0
  49. package/build/renderers/RendererProps.d.ts +1 -0
  50. package/build/renderers/RepeatableRendererProps.d.ts +1 -0
  51. package/build/renderers/ReviewRendererProps.d.ts +2 -0
  52. package/build/renderers/SelectInputRendererProps.d.ts +1 -0
  53. package/build/renderers/StatusListRendererProps.d.ts +2 -0
  54. package/build/renderers/StepRendererProps.d.ts +3 -0
  55. package/build/renderers/Suggestions.d.ts +2 -0
  56. package/build/renderers/TabsRendererProps.d.ts +2 -0
  57. package/build/zod/schemas.d.ts +49 -0
  58. package/build/zod/schemas.ts +570 -526
  59. package/package.json +5 -3
  60. /package/build/{zod/json.type.d.ts → json.type.d.ts} +0 -0
@@ -4,75 +4,72 @@ import {
4
4
  type JsonElement,
5
5
  type AdditionalInfo,
6
6
  type Behavior,
7
- type ModalResponseBody,
7
+ type Step,
8
+ type Schema,
8
9
  type Layout,
9
- type SectionLayoutCallToAction,
10
- type ListLayoutCallToAction,
11
- type ListLayoutItem,
12
- type ButtonLayout,
13
- type TabsLayout,
10
+ type Polling,
11
+ type LinkHandler,
12
+ type Toolbar,
13
+ type ModalResponseBody,
14
14
  type TabsLayoutTab,
15
- type ListLayout,
16
- type ItemCallToAction,
17
15
  type StatusListLayout,
18
16
  type StatusListLayoutItem,
17
+ type ModalLayoutContent,
19
18
  type DecisionLayoutOption,
20
- type DecisionLayout,
19
+ type AlertLayout,
20
+ type AlertLayoutCallToAction,
21
+ type ItemCallToAction,
22
+ type SectionLayout,
23
+ type SectionLayoutCallToAction,
21
24
  type ReviewLayout,
22
25
  type ReviewLayoutField,
23
26
  type ReviewLayoutCallToAction,
27
+ type ButtonLayout,
28
+ type ListLayoutCallToAction,
29
+ type TabsLayout,
24
30
  type BoxLayout,
25
- type ModalLayout,
26
- type ModalLayoutContent,
27
- type AlertLayout,
28
- type AlertLayoutCallToAction,
29
- type SectionLayout,
30
31
  type ColumnsLayout,
31
- type Step,
32
- type Schema,
33
- type Polling,
34
- type LinkHandler,
35
- type Toolbar,
36
- type ModalBehavior,
37
- type PollingOnError,
38
- type ToolbarItem,
39
- type ToolbarButton,
32
+ type DecisionLayout,
33
+ type ListLayout,
34
+ type ModalLayout,
35
+ type ListLayoutItem,
36
+ type IntegerSchema,
40
37
  type PersistAsync,
38
+ type ConstSchema,
41
39
  type BlobSchema,
42
- type OneOfSchema,
43
- type IntegerSchema,
44
- type StringSchema,
45
- type ObjectSchema,
46
- type AllOfSchema,
47
40
  type ArraySchema,
48
- type BooleanSchema,
49
- type ConstSchema,
50
- type NumberSchema,
51
- type ArraySchemaTuple,
52
41
  type ArraySchemaList,
42
+ type ArraySchemaTuple,
43
+ type NumberSchema,
44
+ type AllOfSchema,
45
+ type BooleanSchema,
46
+ type ObjectSchema,
47
+ type OneOfSchema,
48
+ type StringSchema,
49
+ type ToolbarItem,
50
+ type ToolbarButton,
51
+ type PollingOnError,
52
+ type ModalBehavior,
53
53
  } from '../next';
54
54
 
55
- export const autocapitalizationTypeSchema = z.union([
56
- z.literal('none'),
57
- z.literal('characters'),
58
- z.literal('sentences'),
59
- z.literal('words'),
60
- ]);
61
-
62
- export const sizeSchema = z.union([
63
- z.literal('xs'),
64
- z.literal('sm'),
65
- z.literal('md'),
66
- z.literal('lg'),
67
- z.literal('xl'),
68
- ]);
55
+ export const avatarTextContentSchema = z.object({
56
+ type: z.literal('text'),
57
+ text: z.string(),
58
+ badgeUri: z.string().optional(),
59
+ });
69
60
 
70
- export const iconNamedSchema = z.object({
71
- name: z.string(),
61
+ export const avatarUriContentSchema = z.object({
62
+ type: z.literal('uri'),
63
+ uri: z.string(),
64
+ badgeUri: z.string().optional(),
72
65
  });
73
66
 
74
- export const iconTextSchema = z.object({
75
- text: z.string(),
67
+ export const avatarContentSchema = z.union([avatarTextContentSchema, avatarUriContentSchema]);
68
+
69
+ export const mediaAvatarSchema = z.object({
70
+ type: z.literal('avatar'),
71
+ content: z.array(avatarContentSchema),
72
+ accessibilityDescription: z.string().optional(),
76
73
  });
77
74
 
78
75
  export const mediaImageSchema = z.object({
@@ -81,16 +78,39 @@ export const mediaImageSchema = z.object({
81
78
  accessibilityDescription: z.string().optional(),
82
79
  });
83
80
 
84
- export const avatarTextContentSchema = z.object({
85
- type: z.literal('text'),
81
+ export const contextSchema = z.union([
82
+ z.literal('positive'),
83
+ z.literal('neutral'),
84
+ z.literal('warning'),
85
+ z.literal('negative'),
86
+ z.literal('success'),
87
+ z.literal('failure'),
88
+ z.literal('info'),
89
+ z.literal('primary'),
90
+ ]);
91
+
92
+ export const supportingValuesSchema = z.object({
93
+ value: z.string().optional(),
94
+ subvalue: z.string().optional(),
95
+ });
96
+
97
+ export const iconTextSchema = z.object({
86
98
  text: z.string(),
87
- badgeUri: z.string().optional(),
88
99
  });
89
100
 
90
- export const avatarUriContentSchema = z.object({
91
- type: z.literal('uri'),
92
- uri: z.string(),
93
- badgeUri: z.string().optional(),
101
+ export const sizeSchema = z.union([
102
+ z.literal('xs'),
103
+ z.literal('sm'),
104
+ z.literal('md'),
105
+ z.literal('lg'),
106
+ z.literal('xl'),
107
+ ]);
108
+
109
+ export const imageSchema = z.object({
110
+ text: z.string().optional(),
111
+ url: z.string().optional(),
112
+ uri: z.string().optional(),
113
+ accessibilityDescription: z.string().optional(),
94
114
  });
95
115
 
96
116
  export const autocompleteTokenSchema = z.union([
@@ -159,26 +179,14 @@ export const autocompleteTokenSchema = z.union([
159
179
  z.literal('pager'),
160
180
  ]);
161
181
 
162
- export const imageSchema = z.object({
163
- text: z.string().optional(),
164
- url: z.string().optional(),
165
- uri: z.string().optional(),
166
- accessibilityDescription: z.string().optional(),
182
+ export const iconNamedSchema = z.object({
183
+ name: z.string(),
167
184
  });
168
185
 
169
- export const contextSchema = z.union([
170
- z.literal('positive'),
171
- z.literal('neutral'),
172
- z.literal('warning'),
173
- z.literal('negative'),
174
- z.literal('success'),
175
- z.literal('failure'),
176
- z.literal('info'),
177
- z.literal('primary'),
178
- ]);
179
-
180
186
  export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
181
187
 
188
+ export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
189
+
182
190
  export const httpMethodSchema = z.union([
183
191
  z.literal('GET'),
184
192
  z.literal('POST'),
@@ -187,10 +195,12 @@ export const httpMethodSchema = z.union([
187
195
  z.literal('DELETE'),
188
196
  ]);
189
197
 
190
- export const supportingValuesSchema = z.object({
191
- value: z.string().optional(),
192
- subvalue: z.string().optional(),
193
- });
198
+ export const autocapitalizationTypeSchema = z.union([
199
+ z.literal('none'),
200
+ z.literal('characters'),
201
+ z.literal('sentences'),
202
+ z.literal('words'),
203
+ ]);
194
204
 
195
205
  export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
196
206
  z
@@ -204,7 +214,14 @@ export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
204
214
  .nullable(),
205
215
  );
206
216
 
207
- export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
217
+ export const externalSchema = z.object({
218
+ url: z.string(),
219
+ });
220
+
221
+ export const stepErrorSchema = z.object({
222
+ error: z.string().optional(),
223
+ validation: jsonElementSchema.optional(),
224
+ });
208
225
 
209
226
  export const searchSearchRequestSchema = z.object({
210
227
  url: z.string(),
@@ -213,6 +230,22 @@ export const searchSearchRequestSchema = z.object({
213
230
  query: z.string(),
214
231
  });
215
232
 
233
+ export const mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
234
+
235
+ export const errorResponseBodySchema = z.object({
236
+ refreshFormUrl: z.string().optional(),
237
+ analytics: z.record(z.string()).optional(),
238
+ error: z.string().optional(),
239
+ validation: jsonElementSchema.optional(),
240
+ refreshUrl: z.string().optional(),
241
+ });
242
+
243
+ export const listLayoutStatusSchema = z.union([
244
+ z.literal('warning'),
245
+ z.literal('neutral'),
246
+ z.literal('positive'),
247
+ ]);
248
+
216
249
  export const headingLayoutSchema = z.object({
217
250
  type: z.literal('heading'),
218
251
  text: z.string(),
@@ -221,14 +254,9 @@ export const headingLayoutSchema = z.object({
221
254
  control: z.string().optional(),
222
255
  margin: sizeSchema.optional(),
223
256
  analyticsId: z.string().optional(),
257
+ tags: z.array(z.string()).optional(),
224
258
  });
225
259
 
226
- export const listLayoutStatusSchema = z.union([
227
- z.literal('warning'),
228
- z.literal('neutral'),
229
- z.literal('positive'),
230
- ]);
231
-
232
260
  export const paragraphLayoutSchema = z.object({
233
261
  type: z.literal('paragraph'),
234
262
  text: z.string(),
@@ -236,14 +264,22 @@ export const paragraphLayoutSchema = z.object({
236
264
  control: z.string().optional(),
237
265
  margin: sizeSchema.optional(),
238
266
  analyticsId: z.string().optional(),
267
+ tags: z.array(z.string()).optional(),
239
268
  });
240
269
 
241
- export const loadingIndicatorLayoutSchema = z.object({
242
- type: z.literal('loading-indicator'),
243
- size: sizeSchema.optional(),
270
+ export const markdownLayoutSchema = z.object({
271
+ type: z.literal('markdown'),
272
+ content: z.string(),
273
+ align: alignSchema.optional(),
244
274
  control: z.string().optional(),
245
275
  margin: sizeSchema.optional(),
246
276
  analyticsId: z.string().optional(),
277
+ tags: z.array(z.string()).optional(),
278
+ });
279
+
280
+ export const inlineAlertSchema = z.object({
281
+ content: z.string(),
282
+ context: contextSchema.optional(),
247
283
  });
248
284
 
249
285
  export const searchLayoutSchema = z.object({
@@ -256,19 +292,14 @@ export const searchLayoutSchema = z.object({
256
292
  control: z.string().optional(),
257
293
  margin: sizeSchema.optional(),
258
294
  analyticsId: z.string().optional(),
295
+ tags: z.array(z.string()).optional(),
259
296
  });
260
297
 
261
- export const inlineAlertSchema = z.object({
262
- content: z.string(),
263
- context: contextSchema.optional(),
264
- });
265
-
266
- export const instructionsLayoutItemSchema = z.object({
267
- text: z.string(),
268
- context: contextSchema,
269
- tag: z.string().optional(),
270
- analyticsId: z.string().optional(),
271
- });
298
+ export const statusListLayoutStatusSchema = z.union([
299
+ z.literal('not-done'),
300
+ z.literal('pending'),
301
+ z.literal('done'),
302
+ ]);
272
303
 
273
304
  export const columnsLayoutBiasSchema = z.union([
274
305
  z.literal('none'),
@@ -276,15 +307,16 @@ export const columnsLayoutBiasSchema = z.union([
276
307
  z.literal('right'),
277
308
  ]);
278
309
 
310
+ export const helpSchema = z.object({
311
+ markdown: z.string(),
312
+ });
313
+
279
314
  export const dividerLayoutSchema = z.object({
280
315
  type: z.literal('divider'),
281
316
  control: z.string().optional(),
282
317
  margin: sizeSchema.optional(),
283
318
  analyticsId: z.string().optional(),
284
- });
285
-
286
- export const modalLayoutTriggerSchema = z.object({
287
- title: z.string(),
319
+ tags: z.array(z.string()).optional(),
288
320
  });
289
321
 
290
322
  export const imageLayoutSchema = z.object({
@@ -298,10 +330,12 @@ export const imageLayoutSchema = z.object({
298
330
  margin: sizeSchema.optional(),
299
331
  align: alignSchema.optional(),
300
332
  analyticsId: z.string().optional(),
333
+ tags: z.array(z.string()).optional(),
301
334
  });
302
335
 
303
336
  export const infoLayoutSchema = z.object({
304
337
  type: z.literal('info'),
338
+ tags: z.array(z.string()).optional(),
305
339
  markdown: z.string(),
306
340
  align: alignSchema.optional(),
307
341
  control: z.string().optional(),
@@ -309,36 +343,35 @@ export const infoLayoutSchema = z.object({
309
343
  analyticsId: z.string().optional(),
310
344
  });
311
345
 
312
- export const helpSchema = z.object({
313
- markdown: z.string(),
346
+ export const loadingIndicatorLayoutSchema = z.object({
347
+ type: z.literal('loading-indicator'),
348
+ size: sizeSchema.optional(),
349
+ control: z.string().optional(),
350
+ margin: sizeSchema.optional(),
351
+ analyticsId: z.string().optional(),
352
+ tags: z.array(z.string()).optional(),
314
353
  });
315
354
 
316
- export const instructionsLayoutSchema = z.object({
317
- type: z.literal('instructions'),
355
+ export const progressLayoutSchema = z.object({
356
+ type: z.literal('progress'),
318
357
  title: z.string().optional(),
319
- items: z.array(instructionsLayoutItemSchema),
358
+ description: z.string().optional(),
359
+ progress: z.number(),
360
+ progressText: z.string(),
361
+ context: contextSchema.optional(),
362
+ help: helpSchema.optional(),
320
363
  control: z.string().optional(),
321
364
  margin: sizeSchema.optional(),
322
365
  analyticsId: z.string().optional(),
366
+ tags: z.array(z.string()).optional(),
323
367
  });
324
368
 
325
369
  export const formLayoutSchemaReferenceSchema = z.object({
326
370
  $ref: z.string(),
327
371
  });
328
372
 
329
- export const statusListLayoutStatusSchema = z.union([
330
- z.literal('not-done'),
331
- z.literal('pending'),
332
- z.literal('done'),
333
- ]);
334
-
335
- export const markdownLayoutSchema = z.object({
336
- type: z.literal('markdown'),
337
- content: z.string(),
338
- align: alignSchema.optional(),
339
- control: z.string().optional(),
340
- margin: sizeSchema.optional(),
341
- analyticsId: z.string().optional(),
373
+ export const modalLayoutTriggerSchema = z.object({
374
+ title: z.string(),
342
375
  });
343
376
 
344
377
  export const formLayoutSchema = z.object({
@@ -348,46 +381,67 @@ export const formLayoutSchema = z.object({
348
381
  control: z.string().optional(),
349
382
  margin: sizeSchema.optional(),
350
383
  analyticsId: z.string().optional(),
384
+ tags: z.array(z.string()).optional(),
351
385
  });
352
386
 
353
- export const progressLayoutSchema = z.object({
354
- type: z.literal('progress'),
387
+ export const instructionsLayoutItemSchema = z.object({
388
+ text: z.string(),
389
+ context: contextSchema,
390
+ tag: z.string().optional(),
391
+ analyticsId: z.string().optional(),
392
+ tags: z.array(z.string()).optional(),
393
+ });
394
+
395
+ export const instructionsLayoutSchema = z.object({
396
+ type: z.literal('instructions'),
355
397
  title: z.string().optional(),
356
- description: z.string().optional(),
357
- progress: z.number(),
358
- progressText: z.string(),
359
- context: contextSchema.optional(),
360
- help: helpSchema.optional(),
398
+ items: z.array(instructionsLayoutItemSchema),
361
399
  control: z.string().optional(),
362
400
  margin: sizeSchema.optional(),
363
401
  analyticsId: z.string().optional(),
402
+ tags: z.array(z.string()).optional(),
364
403
  });
365
404
 
366
- export const externalSchema = z.object({
367
- url: z.string(),
405
+ export const summaryProviderSchema = z.object({
406
+ providesTitle: z.boolean().optional(),
407
+ providesDescription: z.boolean().optional(),
408
+ providesIcon: z.boolean().optional(),
409
+ providesImage: z.boolean().optional(),
410
+ providesMedia: z.boolean().optional(),
368
411
  });
369
412
 
370
- export const stepErrorSchema = z.object({
371
- error: z.string().optional(),
372
- validation: jsonElementSchema.optional(),
413
+ export const validateAsyncSchema = z.object({
414
+ param: z.string(),
415
+ method: httpMethodSchema,
416
+ url: z.string(),
373
417
  });
374
418
 
375
- export const copyBehaviorSchema = z.object({
376
- type: z.literal('copy'),
377
- content: z.string(),
378
- });
419
+ export const stringSchemaFormatSchema = z.union([
420
+ z.literal('date'),
421
+ z.literal('email'),
422
+ z.literal('numeric'),
423
+ z.literal('password'),
424
+ z.literal('phone-number'),
425
+ z.literal('base64url'),
426
+ ]);
379
427
 
380
- export const dismissBehaviorSchema = z.object({
381
- type: z.literal('dismiss'),
382
- });
428
+ export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
383
429
 
384
- export const linkBehaviorSchema = z.object({
385
- type: z.literal('link'),
386
- url: z.string(),
430
+ export const summarySummariserSchema = z.object({
431
+ defaultTitle: z.string().optional(),
432
+ defaultDescription: z.string().optional(),
433
+ defaultIcon: iconSchema.optional(),
434
+ defaultImage: imageSchema.optional(),
435
+ providesTitle: z.boolean().optional(),
436
+ providesDescription: z.boolean().optional(),
437
+ providesIcon: z.boolean().optional(),
438
+ providesImage: z.boolean().optional(),
439
+ defaultMedia: mediaSchema.optional(),
440
+ providesMedia: z.boolean().optional(),
387
441
  });
388
442
 
389
- export const refreshBehaviorSchema = z.object({
390
- type: z.literal('refresh'),
443
+ export const dismissBehaviorSchema = z.object({
444
+ type: z.literal('dismiss'),
391
445
  });
392
446
 
393
447
  export const navigationStackBehaviorSchema = z.union([
@@ -397,11 +451,34 @@ export const navigationStackBehaviorSchema = z.union([
397
451
  z.literal('replace-current'),
398
452
  ]);
399
453
 
400
- export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
454
+ export const copyBehaviorSchema = z.object({
455
+ type: z.literal('copy'),
456
+ content: z.string(),
457
+ });
401
458
 
402
- export const validateAsyncSchema = z.object({
403
- param: z.string(),
404
- method: httpMethodSchema,
459
+ export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
460
+
461
+ export const refreshBehaviorSchema = z.object({
462
+ type: z.literal('refresh'),
463
+ });
464
+
465
+ export const suggestionsValueSchema = z.object({
466
+ label: z.string(),
467
+ value: jsonElementSchema,
468
+ icon: iconSchema.optional(),
469
+ image: imageSchema.optional(),
470
+ tag: z.string().optional(),
471
+ media: mediaSchema.optional(),
472
+ analyticsId: z.string().optional(),
473
+ tags: z.array(z.string()).optional(),
474
+ });
475
+
476
+ export const linkBehaviorSchema = z.object({
477
+ type: z.literal('link'),
478
+ url: z.string(),
479
+ });
480
+
481
+ export const linkSchema = z.object({
405
482
  url: z.string(),
406
483
  });
407
484
 
@@ -413,12 +490,8 @@ export const actionTypeSchema = z.union([
413
490
  z.literal('negative'),
414
491
  ]);
415
492
 
416
- export const summaryProviderSchema = z.object({
417
- providesTitle: z.boolean().optional(),
418
- providesDescription: z.boolean().optional(),
419
- providesIcon: z.boolean().optional(),
420
- providesImage: z.boolean().optional(),
421
- providesMedia: z.boolean().optional(),
493
+ export const suggestionsSchema = z.object({
494
+ values: z.array(suggestionsValueSchema),
422
495
  });
423
496
 
424
497
  export const actionSchema = z.object({
@@ -437,56 +510,10 @@ export const actionSchema = z.object({
437
510
  skipValidation: z.boolean().optional(),
438
511
  });
439
512
 
440
- export const linkSchema = z.object({
441
- url: z.string(),
442
- });
443
-
444
- export const stringSchemaFormatSchema = z.union([
445
- z.literal('date'),
446
- z.literal('email'),
447
- z.literal('numeric'),
448
- z.literal('password'),
449
- z.literal('phone-number'),
450
- z.literal('base64url'),
451
- ]);
452
-
453
- export const avatarContentSchema = z.union([avatarTextContentSchema, avatarUriContentSchema]);
454
-
455
- export const errorResponseBodySchema = z.object({
456
- refreshFormUrl: z.string().optional(),
457
- analytics: z.record(z.string()).optional(),
458
- error: z.string().optional(),
459
- validation: jsonElementSchema.optional(),
460
- refreshUrl: z.string().optional(),
461
- });
462
-
463
513
  export const actionResponseBodySchema = z.object({
464
514
  action: actionSchema,
465
515
  });
466
516
 
467
- export const actionBehaviorSchema = z.object({
468
- type: z.literal('action'),
469
- action: actionSchema,
470
- });
471
-
472
- export const containerBehaviorSchema = z.object({
473
- action: actionSchema.optional(),
474
- link: linkSchema.optional(),
475
- });
476
-
477
- export const navigationBackBehaviorSchema = z.object({
478
- title: z.string().optional(),
479
- action: actionSchema,
480
- });
481
-
482
- export const mediaAvatarSchema = z.object({
483
- type: z.literal('avatar'),
484
- content: z.array(avatarContentSchema),
485
- accessibilityDescription: z.string().optional(),
486
- });
487
-
488
- export const mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
489
-
490
517
  export const searchResultActionSchema = z.object({
491
518
  type: z.literal('action'),
492
519
  title: z.string(),
@@ -507,7 +534,10 @@ export const searchResultSearchSchema = z.object({
507
534
  media: mediaSchema.optional(),
508
535
  });
509
536
 
510
- export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
537
+ export const navigationBackBehaviorSchema = z.object({
538
+ title: z.string().optional(),
539
+ action: actionSchema,
540
+ });
511
541
 
512
542
  export const navigationSchema = z.object({
513
543
  backButton: navigationBackBehaviorSchema.optional(),
@@ -515,34 +545,17 @@ export const navigationSchema = z.object({
515
545
  stackBehavior: navigationStackBehaviorSchema.optional(),
516
546
  });
517
547
 
518
- export const suggestionsValueSchema = z.object({
519
- label: z.string(),
520
- value: jsonElementSchema,
521
- icon: iconSchema.optional(),
522
- image: imageSchema.optional(),
523
- tag: z.string().optional(),
524
- media: mediaSchema.optional(),
525
- analyticsId: z.string().optional(),
548
+ export const actionBehaviorSchema = z.object({
549
+ type: z.literal('action'),
550
+ action: actionSchema,
526
551
  });
527
552
 
528
- export const summarySummariserSchema = z.object({
529
- defaultTitle: z.string().optional(),
530
- defaultDescription: z.string().optional(),
531
- defaultIcon: iconSchema.optional(),
532
- defaultImage: imageSchema.optional(),
533
- providesTitle: z.boolean().optional(),
534
- providesDescription: z.boolean().optional(),
535
- providesIcon: z.boolean().optional(),
536
- providesImage: z.boolean().optional(),
537
- defaultMedia: mediaSchema.optional(),
538
- providesMedia: z.boolean().optional(),
553
+ export const containerBehaviorSchema = z.object({
554
+ action: actionSchema.optional(),
555
+ link: linkSchema.optional(),
539
556
  });
540
557
 
541
- export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
542
-
543
- export const suggestionsSchema = z.object({
544
- values: z.array(suggestionsValueSchema),
545
- });
558
+ export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
546
559
 
547
560
  export const searchResponseBodySchema = z.object({
548
561
  results: z.array(searchResultSchema),
@@ -568,13 +581,47 @@ export const behaviorSchema: z.ZodSchema<Behavior> = z.lazy(() =>
568
581
  ]),
569
582
  );
570
583
 
571
- export const modalResponseBodySchema: z.ZodSchema<ModalResponseBody> = z.lazy(() =>
584
+ export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
572
585
  z.object({
573
- title: z.string().optional(),
574
- content: z.array(layoutSchema),
586
+ key: z.string().optional(),
587
+ type: z.string().optional(),
588
+ actions: z.array(actionSchema).optional(),
589
+ refreshFormUrl: z.string().optional(),
590
+ id: z.string(),
591
+ title: z.string(),
592
+ schemas: z.array(schemaSchema),
593
+ layout: z.array(layoutSchema),
594
+ description: z.string().optional(),
595
+ model: jsonElementSchema.optional(),
596
+ external: externalSchema.optional(),
597
+ polling: pollingSchema.optional(),
598
+ linkHandlers: z.array(linkHandlerSchema).optional(),
599
+ analytics: z.record(z.string()).optional(),
600
+ errors: stepErrorSchema.optional(),
601
+ navigation: navigationSchema.optional(),
602
+ refreshUrl: z.string().optional(),
603
+ control: z.string().optional(),
604
+ refreshAfter: z.string().optional(),
605
+ toolbar: toolbarSchema.optional(),
606
+ tags: z.array(z.string()).optional(),
575
607
  }),
576
608
  );
577
609
 
610
+ export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
611
+ z.union([
612
+ allOfSchemaSchema,
613
+ arraySchemaSchema,
614
+ blobSchemaSchema,
615
+ booleanSchemaSchema,
616
+ constSchemaSchema,
617
+ integerSchemaSchema,
618
+ numberSchemaSchema,
619
+ objectSchemaSchema,
620
+ oneOfSchemaSchema,
621
+ stringSchemaSchema,
622
+ ]),
623
+ );
624
+
578
625
  export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
579
626
  z.union([
580
627
  alertLayoutSchema,
@@ -602,93 +649,46 @@ export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
602
649
  ]),
603
650
  );
604
651
 
605
- export const sectionLayoutCallToActionSchema: z.ZodSchema<SectionLayoutCallToAction> = z.lazy(() =>
606
- z.object({
607
- title: z.string(),
608
- accessibilityDescription: z.string().optional(),
609
- behavior: behaviorSchema,
610
- }),
611
- );
612
-
613
- export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
614
- z.object({
615
- title: z.string(),
616
- accessibilityDescription: z.string().optional(),
617
- behavior: behaviorSchema,
618
- }),
619
- );
620
-
621
- export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
622
- z.object({
623
- status: listLayoutStatusSchema.optional(),
624
- icon: iconSchema.optional(),
625
- image: imageSchema.optional(),
626
- title: z.string().optional(),
627
- subtitle: z.string().optional(),
628
- value: z.string().optional(),
629
- subvalue: z.string().optional(),
630
- tag: z.string().optional(),
631
- additionalInfo: additionalInfoSchema.optional(),
632
- supportingValues: supportingValuesSchema.optional(),
633
- inlineAlert: inlineAlertSchema.optional(),
634
- description: z.string().optional(),
635
- media: mediaSchema.optional(),
636
- analyticsId: z.string().optional(),
637
- }),
638
- );
639
-
640
- export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
652
+ export const pollingSchema: z.ZodSchema<Polling> = z.lazy(() =>
641
653
  z.object({
642
- type: z.literal('button'),
643
- action: actionSchema.optional(),
644
- size: sizeSchema.optional(),
645
- title: z.string().optional(),
646
- behavior: behaviorSchema.optional(),
647
- context: contextSchema.optional(),
648
- disabled: z.boolean().optional(),
649
- pinOrder: z.number().optional(),
650
- control: z.string().optional(),
651
- margin: sizeSchema.optional(),
652
- analyticsId: z.string().optional(),
654
+ interval: z.number().optional(),
655
+ url: z.string(),
656
+ delay: z.number().optional(),
657
+ timeout: z.number().optional(),
658
+ maxAttempts: z.number(),
659
+ onError: pollingOnErrorSchema,
653
660
  }),
654
661
  );
655
662
 
656
- export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
663
+ export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
657
664
  z.object({
658
- type: z.literal('tabs'),
659
- tabs: z.array(tabsLayoutTabSchema),
660
- control: z.string().optional(),
661
- margin: sizeSchema.optional(),
662
- analyticsId: z.string().optional(),
665
+ regexPattern: z.string(),
666
+ behavior: behaviorSchema.optional(),
663
667
  }),
664
668
  );
665
669
 
666
- export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
670
+ export const toolbarSchema: z.ZodSchema<Toolbar> = z.lazy(() =>
667
671
  z.object({
668
- title: z.string(),
669
- components: z.array(layoutSchema),
670
- tag: z.string().optional(),
671
- analyticsId: z.string().optional(),
672
+ items: z.array(toolbarItemSchema),
673
+ control: z.string().optional(),
674
+ tags: z.array(z.string()).optional(),
672
675
  }),
673
676
  );
674
677
 
675
- export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
678
+ export const modalResponseBodySchema: z.ZodSchema<ModalResponseBody> = z.lazy(() =>
676
679
  z.object({
677
- type: z.literal('list'),
678
680
  title: z.string().optional(),
679
- callToAction: listLayoutCallToActionSchema.optional(),
680
- items: z.array(listLayoutItemSchema),
681
- control: z.string().optional(),
682
- margin: sizeSchema.optional(),
683
- analyticsId: z.string().optional(),
681
+ content: z.array(layoutSchema),
684
682
  }),
685
683
  );
686
684
 
687
- export const itemCallToActionSchema: z.ZodSchema<ItemCallToAction> = z.lazy(() =>
685
+ export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
688
686
  z.object({
689
687
  title: z.string(),
690
- accessibilityDescription: z.string().optional(),
691
- behavior: behaviorSchema,
688
+ components: z.array(layoutSchema),
689
+ tag: z.string().optional(),
690
+ analyticsId: z.string().optional(),
691
+ tags: z.array(z.string()).optional(),
692
692
  }),
693
693
  );
694
694
 
@@ -700,6 +700,7 @@ export const statusListLayoutSchema: z.ZodSchema<StatusListLayout> = z.lazy(() =
700
700
  control: z.string().optional(),
701
701
  margin: sizeSchema.optional(),
702
702
  analyticsId: z.string().optional(),
703
+ tags: z.array(z.string()).optional(),
703
704
  }),
704
705
  );
705
706
 
@@ -712,6 +713,14 @@ export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.l
712
713
  callToAction: itemCallToActionSchema.optional(),
713
714
  tag: z.string().optional(),
714
715
  analyticsId: z.string().optional(),
716
+ tags: z.array(z.string()).optional(),
717
+ }),
718
+ );
719
+
720
+ export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
721
+ z.object({
722
+ title: z.string().optional(),
723
+ components: z.array(layoutSchema),
715
724
  }),
716
725
  );
717
726
 
@@ -731,17 +740,57 @@ export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.l
731
740
  media: mediaSchema.optional(),
732
741
  analyticsId: z.string().optional(),
733
742
  keywords: z.array(z.string()).optional(),
743
+ tags: z.array(z.string()).optional(),
734
744
  }),
735
745
  );
736
746
 
737
- export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
747
+ export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
738
748
  z.object({
739
- type: z.literal('decision'),
740
- title: z.string().optional(),
741
- options: z.array(decisionLayoutOptionSchema),
749
+ type: z.literal('alert'),
750
+ markdown: z.string(),
751
+ context: contextSchema.optional(),
752
+ control: z.string().optional(),
753
+ margin: sizeSchema.optional(),
754
+ callToAction: alertLayoutCallToActionSchema.optional(),
755
+ analyticsId: z.string().optional(),
756
+ tags: z.array(z.string()).optional(),
757
+ }),
758
+ );
759
+
760
+ export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
761
+ z.object({
762
+ title: z.string(),
763
+ accessibilityDescription: z.string().optional(),
764
+ behavior: behaviorSchema,
765
+ }),
766
+ );
767
+
768
+ export const itemCallToActionSchema: z.ZodSchema<ItemCallToAction> = z.lazy(() =>
769
+ z.object({
770
+ title: z.string(),
771
+ accessibilityDescription: z.string().optional(),
772
+ behavior: behaviorSchema,
773
+ }),
774
+ );
775
+
776
+ export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
777
+ z.object({
778
+ type: z.literal('section'),
779
+ components: z.array(layoutSchema),
780
+ title: z.string(),
781
+ callToAction: sectionLayoutCallToActionSchema.optional(),
742
782
  control: z.string().optional(),
743
783
  margin: sizeSchema.optional(),
744
784
  analyticsId: z.string().optional(),
785
+ tags: z.array(z.string()).optional(),
786
+ }),
787
+ );
788
+
789
+ export const sectionLayoutCallToActionSchema: z.ZodSchema<SectionLayoutCallToAction> = z.lazy(() =>
790
+ z.object({
791
+ title: z.string(),
792
+ accessibilityDescription: z.string().optional(),
793
+ behavior: behaviorSchema,
745
794
  }),
746
795
  );
747
796
 
@@ -756,6 +805,7 @@ export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
756
805
  control: z.string().optional(),
757
806
  margin: sizeSchema.optional(),
758
807
  analyticsId: z.string().optional(),
808
+ tags: z.array(z.string()).optional(),
759
809
  }),
760
810
  );
761
811
 
@@ -773,6 +823,7 @@ export const reviewLayoutFieldSchema: z.ZodSchema<ReviewLayoutField> = z.lazy(()
773
823
  callToAction: reviewLayoutCallToActionSchema.optional(),
774
824
  media: mediaSchema.optional(),
775
825
  analyticsId: z.string().optional(),
826
+ tags: z.array(z.string()).optional(),
776
827
  }),
777
828
  );
778
829
 
@@ -785,65 +836,52 @@ export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToActio
785
836
  }),
786
837
  );
787
838
 
788
- export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
789
- z.object({
790
- type: z.literal('box'),
791
- components: z.array(layoutSchema),
792
- width: sizeSchema.optional(),
793
- border: z.boolean().optional(),
794
- control: z.string().optional(),
795
- margin: sizeSchema.optional(),
796
- analyticsId: z.string().optional(),
797
- }),
798
- );
799
-
800
- export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
839
+ export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
801
840
  z.object({
802
- type: z.literal('modal'),
841
+ type: z.literal('button'),
842
+ action: actionSchema.optional(),
843
+ size: sizeSchema.optional(),
844
+ title: z.string().optional(),
845
+ behavior: behaviorSchema.optional(),
846
+ context: contextSchema.optional(),
847
+ disabled: z.boolean().optional(),
848
+ pinOrder: z.number().optional(),
803
849
  control: z.string().optional(),
804
850
  margin: sizeSchema.optional(),
805
- trigger: modalLayoutTriggerSchema,
806
- content: modalLayoutContentSchema,
807
851
  analyticsId: z.string().optional(),
852
+ tags: z.array(z.string()).optional(),
808
853
  }),
809
854
  );
810
855
 
811
- export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
856
+ export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
812
857
  z.object({
813
- title: z.string().optional(),
814
- components: z.array(layoutSchema),
858
+ title: z.string(),
859
+ accessibilityDescription: z.string().optional(),
860
+ behavior: behaviorSchema,
815
861
  }),
816
862
  );
817
863
 
818
- export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
864
+ export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
819
865
  z.object({
820
- type: z.literal('alert'),
821
- markdown: z.string(),
822
- context: contextSchema.optional(),
866
+ type: z.literal('tabs'),
867
+ tabs: z.array(tabsLayoutTabSchema),
823
868
  control: z.string().optional(),
824
869
  margin: sizeSchema.optional(),
825
- callToAction: alertLayoutCallToActionSchema.optional(),
826
870
  analyticsId: z.string().optional(),
871
+ tags: z.array(z.string()).optional(),
827
872
  }),
828
873
  );
829
874
 
830
- export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
831
- z.object({
832
- title: z.string(),
833
- accessibilityDescription: z.string().optional(),
834
- behavior: behaviorSchema,
835
- }),
836
- );
837
-
838
- export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
875
+ export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
839
876
  z.object({
840
- type: z.literal('section'),
877
+ type: z.literal('box'),
841
878
  components: z.array(layoutSchema),
842
- title: z.string(),
843
- callToAction: sectionLayoutCallToActionSchema.optional(),
879
+ width: sizeSchema.optional(),
880
+ border: z.boolean().optional(),
844
881
  control: z.string().optional(),
845
882
  margin: sizeSchema.optional(),
846
883
  analyticsId: z.string().optional(),
884
+ tags: z.array(z.string()).optional(),
847
885
  }),
848
886
  );
849
887
 
@@ -856,102 +894,102 @@ export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
856
894
  control: z.string().optional(),
857
895
  margin: sizeSchema.optional(),
858
896
  analyticsId: z.string().optional(),
897
+ tags: z.array(z.string()).optional(),
859
898
  }),
860
899
  );
861
900
 
862
- export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
901
+ export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
863
902
  z.object({
864
- key: z.string().optional(),
865
- type: z.string().optional(),
866
- actions: z.array(actionSchema).optional(),
867
- refreshFormUrl: z.string().optional(),
868
- id: z.string(),
869
- title: z.string(),
870
- schemas: z.array(schemaSchema),
871
- layout: z.array(layoutSchema),
872
- description: z.string().optional(),
873
- model: jsonElementSchema.optional(),
874
- external: externalSchema.optional(),
875
- polling: pollingSchema.optional(),
876
- linkHandlers: z.array(linkHandlerSchema).optional(),
877
- analytics: z.record(z.string()).optional(),
878
- errors: stepErrorSchema.optional(),
879
- navigation: navigationSchema.optional(),
880
- refreshUrl: z.string().optional(),
903
+ type: z.literal('decision'),
904
+ title: z.string().optional(),
905
+ options: z.array(decisionLayoutOptionSchema),
881
906
  control: z.string().optional(),
882
- refreshAfter: z.string().optional(),
883
- toolbar: toolbarSchema.optional(),
884
- }),
885
- );
886
-
887
- export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
888
- z.union([
889
- allOfSchemaSchema,
890
- arraySchemaSchema,
891
- blobSchemaSchema,
892
- booleanSchemaSchema,
893
- constSchemaSchema,
894
- integerSchemaSchema,
895
- numberSchemaSchema,
896
- objectSchemaSchema,
897
- oneOfSchemaSchema,
898
- stringSchemaSchema,
899
- ]),
900
- );
901
-
902
- export const pollingSchema: z.ZodSchema<Polling> = z.lazy(() =>
903
- z.object({
904
- interval: z.number().optional(),
905
- url: z.string(),
906
- delay: z.number().optional(),
907
- timeout: z.number().optional(),
908
- maxAttempts: z.number(),
909
- onError: pollingOnErrorSchema,
910
- }),
911
- );
912
-
913
- export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
914
- z.object({
915
- regexPattern: z.string(),
916
- behavior: behaviorSchema.optional(),
907
+ margin: sizeSchema.optional(),
908
+ analyticsId: z.string().optional(),
909
+ tags: z.array(z.string()).optional(),
917
910
  }),
918
911
  );
919
912
 
920
- export const toolbarSchema: z.ZodSchema<Toolbar> = z.lazy(() =>
913
+ export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
921
914
  z.object({
922
- items: z.array(toolbarItemSchema),
915
+ type: z.literal('list'),
916
+ title: z.string().optional(),
917
+ callToAction: listLayoutCallToActionSchema.optional(),
918
+ items: z.array(listLayoutItemSchema),
923
919
  control: z.string().optional(),
920
+ margin: sizeSchema.optional(),
921
+ analyticsId: z.string().optional(),
922
+ tags: z.array(z.string()).optional(),
924
923
  }),
925
924
  );
926
925
 
927
- export const modalBehaviorSchema: z.ZodSchema<ModalBehavior> = z.lazy(() =>
926
+ export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
928
927
  z.object({
929
928
  type: z.literal('modal'),
930
- title: z.string().optional(),
931
- content: z.array(layoutSchema),
929
+ control: z.string().optional(),
930
+ margin: sizeSchema.optional(),
931
+ trigger: modalLayoutTriggerSchema,
932
+ content: modalLayoutContentSchema,
933
+ analyticsId: z.string().optional(),
934
+ tags: z.array(z.string()).optional(),
932
935
  }),
933
936
  );
934
937
 
935
- export const pollingOnErrorSchema: z.ZodSchema<PollingOnError> = z.lazy(() =>
938
+ export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
936
939
  z.object({
937
- action: actionSchema.optional(),
938
- behavior: behaviorSchema.optional(),
940
+ status: listLayoutStatusSchema.optional(),
941
+ icon: iconSchema.optional(),
942
+ image: imageSchema.optional(),
943
+ title: z.string().optional(),
944
+ subtitle: z.string().optional(),
945
+ value: z.string().optional(),
946
+ subvalue: z.string().optional(),
947
+ tag: z.string().optional(),
948
+ additionalInfo: additionalInfoSchema.optional(),
949
+ supportingValues: supportingValuesSchema.optional(),
950
+ inlineAlert: inlineAlertSchema.optional(),
951
+ description: z.string().optional(),
952
+ media: mediaSchema.optional(),
953
+ analyticsId: z.string().optional(),
954
+ tags: z.array(z.string()).optional(),
955
+ callToAction: listLayoutCallToActionSchema.optional(),
939
956
  }),
940
957
  );
941
958
 
942
- export const toolbarItemSchema: z.ZodSchema<ToolbarItem> = z.lazy(() => toolbarButtonSchema);
943
-
944
- export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
959
+ export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
945
960
  z.object({
946
- type: z.literal('toolbar-button'),
947
- title: z.string(),
948
- behavior: behaviorSchema,
949
- accessibilityDescription: z.string().optional(),
950
- media: mediaSchema.optional(),
961
+ type: z.literal('integer'),
962
+ autofillProvider: z.string().optional(),
963
+ promoted: z.boolean().optional(),
964
+ refreshFormOnChange: z.boolean().optional(),
965
+ refreshUrl: z.string().optional(),
966
+ refreshFormUrl: z.string().optional(),
967
+ placeholder: z.string().optional(),
968
+ minimum: z.number().optional(),
969
+ maximum: z.number().optional(),
970
+ $id: z.string().optional(),
971
+ title: z.string().optional(),
972
+ description: z.string().optional(),
951
973
  control: z.string().optional(),
952
- context: contextSchema.optional(),
974
+ default: z.number().optional(),
975
+ hidden: z.boolean().optional(),
953
976
  disabled: z.boolean().optional(),
977
+ icon: iconSchema.optional(),
978
+ image: imageSchema.optional(),
979
+ keywords: z.array(z.string()).optional(),
980
+ summary: summaryProviderSchema.optional(),
954
981
  analyticsId: z.string().optional(),
982
+ persistAsync: persistAsyncSchema.optional(),
983
+ refreshStepOnChange: z.boolean().optional(),
984
+ validationAsync: validateAsyncSchema.optional(),
985
+ validationMessages: z.record(z.string()).optional(),
986
+ alert: alertLayoutSchema.optional(),
987
+ autocompleteHint: z.array(autocompleteTokenSchema).optional(),
988
+ autofillKey: z.string().optional(),
989
+ help: helpSchema.optional(),
990
+ onChange: behaviorSchema.optional(),
991
+ media: mediaSchema.optional(),
992
+ tags: z.array(z.string()).optional(),
955
993
  }),
956
994
  );
957
995
 
@@ -965,6 +1003,28 @@ export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
965
1003
  }),
966
1004
  );
967
1005
 
1006
+ export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
1007
+ z.object({
1008
+ hidden: z.boolean().optional(),
1009
+ control: z.string().optional(),
1010
+ tags: z.array(z.string()).optional(),
1011
+ promoted: z.boolean().optional(),
1012
+ $id: z.string().optional(),
1013
+ const: jsonElementSchema,
1014
+ title: z.string().optional(),
1015
+ description: z.string().optional(),
1016
+ icon: iconSchema.optional(),
1017
+ image: imageSchema.optional(),
1018
+ keywords: z.array(z.string()).optional(),
1019
+ summary: summaryProviderSchema.optional(),
1020
+ analyticsId: z.string().optional(),
1021
+ disabled: z.boolean().optional(),
1022
+ media: mediaSchema.optional(),
1023
+ alert: alertLayoutSchema.optional(),
1024
+ layout: z.array(layoutSchema).optional(),
1025
+ }),
1026
+ );
1027
+
968
1028
  export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
969
1029
  z.object({
970
1030
  type: z.literal('blob'),
@@ -988,101 +1048,83 @@ export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
988
1048
  source: uploadSourceSchema.optional(),
989
1049
  disabled: z.boolean().optional(),
990
1050
  media: mediaSchema.optional(),
1051
+ tags: z.array(z.string()).optional(),
991
1052
  }),
992
1053
  );
993
1054
 
994
- export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
1055
+ export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
1056
+ z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
1057
+ );
1058
+
1059
+ export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
995
1060
  z.object({
996
- autofillProvider: z.string().optional(),
1061
+ type: z.literal('array'),
997
1062
  promoted: z.boolean().optional(),
998
- refreshFormOnChange: z.boolean().optional(),
999
- refreshUrl: z.string().optional(),
1000
- refreshFormUrl: z.string().optional(),
1001
- promotion: jsonElementSchema.optional(),
1002
- oneOf: z.array(schemaSchema),
1003
- placeholder: z.string().optional(),
1004
1063
  $id: z.string().optional(),
1064
+ items: schemaSchema,
1065
+ addItemTitle: z.string(),
1066
+ editItemTitle: z.string(),
1067
+ minItems: z.number().optional(),
1068
+ maxItems: z.number().optional(),
1069
+ placeholder: z.string().optional(),
1005
1070
  title: z.string().optional(),
1006
1071
  description: z.string().optional(),
1007
1072
  control: z.string().optional(),
1008
- default: jsonElementSchema.optional(),
1009
1073
  hidden: z.boolean().optional(),
1010
1074
  icon: iconSchema.optional(),
1011
1075
  image: imageSchema.optional(),
1012
1076
  keywords: z.array(z.string()).optional(),
1013
- summary: summaryProviderSchema.optional(),
1077
+ summary: summarySummariserSchema.optional(),
1014
1078
  analyticsId: z.string().optional(),
1015
- refreshStepOnChange: z.boolean().optional(),
1079
+ persistAsync: persistAsyncSchema.optional(),
1080
+ validationAsync: validateAsyncSchema.optional(),
1016
1081
  alert: alertLayoutSchema.optional(),
1017
- help: helpSchema.optional(),
1018
- autocompleteHint: z.array(autocompleteTokenSchema).optional(),
1019
- autofillKey: z.string().optional(),
1020
1082
  validationMessages: z.record(z.string()).optional(),
1021
1083
  disabled: z.boolean().optional(),
1022
- onChange: behaviorSchema.optional(),
1023
1084
  media: mediaSchema.optional(),
1085
+ tags: z.array(z.string()).optional(),
1024
1086
  }),
1025
1087
  );
1026
1088
 
1027
- export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
1089
+ export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
1028
1090
  z.object({
1029
- type: z.literal('integer'),
1030
- autofillProvider: z.string().optional(),
1091
+ type: z.literal('array'),
1031
1092
  promoted: z.boolean().optional(),
1032
- refreshFormOnChange: z.boolean().optional(),
1033
- refreshUrl: z.string().optional(),
1034
- refreshFormUrl: z.string().optional(),
1035
- placeholder: z.string().optional(),
1036
- minimum: z.number().optional(),
1037
- maximum: z.number().optional(),
1038
1093
  $id: z.string().optional(),
1094
+ items: z.array(schemaSchema),
1039
1095
  title: z.string().optional(),
1040
1096
  description: z.string().optional(),
1041
1097
  control: z.string().optional(),
1042
- default: z.number().optional(),
1043
1098
  hidden: z.boolean().optional(),
1044
- disabled: z.boolean().optional(),
1045
1099
  icon: iconSchema.optional(),
1046
1100
  image: imageSchema.optional(),
1047
1101
  keywords: z.array(z.string()).optional(),
1048
1102
  summary: summaryProviderSchema.optional(),
1049
1103
  analyticsId: z.string().optional(),
1050
1104
  persistAsync: persistAsyncSchema.optional(),
1051
- refreshStepOnChange: z.boolean().optional(),
1052
1105
  validationAsync: validateAsyncSchema.optional(),
1053
- validationMessages: z.record(z.string()).optional(),
1054
1106
  alert: alertLayoutSchema.optional(),
1055
- autocompleteHint: z.array(autocompleteTokenSchema).optional(),
1056
- autofillKey: z.string().optional(),
1057
- help: helpSchema.optional(),
1058
- onChange: behaviorSchema.optional(),
1059
1107
  media: mediaSchema.optional(),
1108
+ tags: z.array(z.string()).optional(),
1060
1109
  }),
1061
1110
  );
1062
1111
 
1063
- export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
1112
+ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
1064
1113
  z.object({
1065
- type: z.literal('string'),
1114
+ type: z.literal('number'),
1066
1115
  autofillProvider: z.string().optional(),
1067
1116
  promoted: z.boolean().optional(),
1068
1117
  refreshFormOnChange: z.boolean().optional(),
1069
1118
  refreshUrl: z.string().optional(),
1070
1119
  refreshFormUrl: z.string().optional(),
1071
- format: stringSchemaFormatSchema.optional(),
1072
- displayFormat: z.string().optional(),
1073
1120
  placeholder: z.string().optional(),
1074
- minLength: z.number().optional(),
1075
- maxLength: z.number().optional(),
1076
- minimum: z.string().optional(),
1077
- maximum: z.string().optional(),
1078
- pattern: z.string().optional(),
1079
- autocapitalization: autocapitalizationTypeSchema.optional(),
1080
- autocorrect: z.boolean().optional(),
1121
+ minimum: z.number().optional(),
1122
+ maximum: z.number().optional(),
1081
1123
  $id: z.string().optional(),
1082
1124
  title: z.string().optional(),
1083
1125
  description: z.string().optional(),
1084
1126
  control: z.string().optional(),
1085
- default: z.string().optional(),
1127
+ default: z.number().optional(),
1086
1128
  hidden: z.boolean().optional(),
1087
1129
  disabled: z.boolean().optional(),
1088
1130
  icon: iconSchema.optional(),
@@ -1095,40 +1137,12 @@ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
1095
1137
  validationAsync: validateAsyncSchema.optional(),
1096
1138
  validationMessages: z.record(z.string()).optional(),
1097
1139
  alert: alertLayoutSchema.optional(),
1098
- cameraConfig: jsonElementSchema.optional(),
1099
- accepts: z.array(z.string()).optional(),
1100
- maxSize: z.number().optional(),
1101
- source: uploadSourceSchema.optional(),
1102
1140
  autocompleteHint: z.array(autocompleteTokenSchema).optional(),
1103
1141
  autofillKey: z.string().optional(),
1104
1142
  help: helpSchema.optional(),
1105
- suggestions: suggestionsSchema.optional(),
1106
1143
  onChange: behaviorSchema.optional(),
1107
1144
  media: mediaSchema.optional(),
1108
- }),
1109
- );
1110
-
1111
- export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
1112
- z.object({
1113
- type: z.literal('object'),
1114
- disabled: z.boolean().optional(),
1115
- promoted: z.boolean().optional(),
1116
- help: helpSchema.optional(),
1117
- properties: z.record(schemaSchema),
1118
- displayOrder: z.array(z.string()),
1119
- required: z.array(z.string()).optional(),
1120
- $id: z.string().optional(),
1121
- title: z.string().optional(),
1122
- description: z.string().optional(),
1123
- control: z.string().optional(),
1124
- hidden: z.boolean().optional(),
1125
- icon: iconSchema.optional(),
1126
- image: imageSchema.optional(),
1127
- keywords: z.array(z.string()).optional(),
1128
- summary: summaryProviderSchema.optional(),
1129
- analyticsId: z.string().optional(),
1130
- alert: alertLayoutSchema.optional(),
1131
- media: mediaSchema.optional(),
1145
+ tags: z.array(z.string()).optional(),
1132
1146
  }),
1133
1147
  );
1134
1148
 
@@ -1149,13 +1163,10 @@ export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
1149
1163
  analyticsId: z.string().optional(),
1150
1164
  alert: alertLayoutSchema.optional(),
1151
1165
  media: mediaSchema.optional(),
1166
+ tags: z.array(z.string()).optional(),
1152
1167
  }),
1153
1168
  );
1154
1169
 
1155
- export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
1156
- z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
1157
- );
1158
-
1159
1170
  export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
1160
1171
  z.object({
1161
1172
  type: z.literal('boolean'),
@@ -1184,113 +1195,146 @@ export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
1184
1195
  help: helpSchema.optional(),
1185
1196
  onChange: behaviorSchema.optional(),
1186
1197
  media: mediaSchema.optional(),
1198
+ tags: z.array(z.string()).optional(),
1187
1199
  }),
1188
1200
  );
1189
1201
 
1190
- export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
1202
+ export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
1191
1203
  z.object({
1192
- hidden: z.boolean().optional(),
1193
- control: z.string().optional(),
1204
+ type: z.literal('object'),
1205
+ disabled: z.boolean().optional(),
1194
1206
  promoted: z.boolean().optional(),
1207
+ help: helpSchema.optional(),
1208
+ properties: z.record(schemaSchema),
1209
+ displayOrder: z.array(z.string()),
1210
+ required: z.array(z.string()).optional(),
1195
1211
  $id: z.string().optional(),
1196
- const: jsonElementSchema,
1197
1212
  title: z.string().optional(),
1198
1213
  description: z.string().optional(),
1214
+ control: z.string().optional(),
1215
+ hidden: z.boolean().optional(),
1199
1216
  icon: iconSchema.optional(),
1200
1217
  image: imageSchema.optional(),
1201
1218
  keywords: z.array(z.string()).optional(),
1202
1219
  summary: summaryProviderSchema.optional(),
1203
1220
  analyticsId: z.string().optional(),
1204
- disabled: z.boolean().optional(),
1205
- media: mediaSchema.optional(),
1206
1221
  alert: alertLayoutSchema.optional(),
1207
- layout: z.array(layoutSchema).optional(),
1222
+ media: mediaSchema.optional(),
1223
+ tags: z.array(z.string()).optional(),
1208
1224
  }),
1209
1225
  );
1210
1226
 
1211
- export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
1227
+ export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
1212
1228
  z.object({
1213
- type: z.literal('number'),
1214
1229
  autofillProvider: z.string().optional(),
1215
1230
  promoted: z.boolean().optional(),
1216
1231
  refreshFormOnChange: z.boolean().optional(),
1217
1232
  refreshUrl: z.string().optional(),
1218
1233
  refreshFormUrl: z.string().optional(),
1234
+ promotion: jsonElementSchema.optional(),
1235
+ oneOf: z.array(schemaSchema),
1219
1236
  placeholder: z.string().optional(),
1220
- minimum: z.number().optional(),
1221
- maximum: z.number().optional(),
1222
1237
  $id: z.string().optional(),
1223
1238
  title: z.string().optional(),
1224
1239
  description: z.string().optional(),
1225
1240
  control: z.string().optional(),
1226
- default: z.number().optional(),
1241
+ default: jsonElementSchema.optional(),
1227
1242
  hidden: z.boolean().optional(),
1228
- disabled: z.boolean().optional(),
1229
1243
  icon: iconSchema.optional(),
1230
1244
  image: imageSchema.optional(),
1231
1245
  keywords: z.array(z.string()).optional(),
1232
1246
  summary: summaryProviderSchema.optional(),
1233
1247
  analyticsId: z.string().optional(),
1234
- persistAsync: persistAsyncSchema.optional(),
1235
1248
  refreshStepOnChange: z.boolean().optional(),
1236
- validationAsync: validateAsyncSchema.optional(),
1237
- validationMessages: z.record(z.string()).optional(),
1238
1249
  alert: alertLayoutSchema.optional(),
1250
+ help: helpSchema.optional(),
1239
1251
  autocompleteHint: z.array(autocompleteTokenSchema).optional(),
1240
1252
  autofillKey: z.string().optional(),
1241
- help: helpSchema.optional(),
1253
+ validationMessages: z.record(z.string()).optional(),
1254
+ disabled: z.boolean().optional(),
1242
1255
  onChange: behaviorSchema.optional(),
1243
1256
  media: mediaSchema.optional(),
1257
+ tags: z.array(z.string()).optional(),
1244
1258
  }),
1245
1259
  );
1246
1260
 
1247
- export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
1261
+ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
1248
1262
  z.object({
1249
- type: z.literal('array'),
1263
+ type: z.literal('string'),
1264
+ autofillProvider: z.string().optional(),
1250
1265
  promoted: z.boolean().optional(),
1266
+ refreshFormOnChange: z.boolean().optional(),
1267
+ refreshUrl: z.string().optional(),
1268
+ refreshFormUrl: z.string().optional(),
1269
+ format: stringSchemaFormatSchema.optional(),
1270
+ displayFormat: z.string().optional(),
1271
+ placeholder: z.string().optional(),
1272
+ minLength: z.number().optional(),
1273
+ maxLength: z.number().optional(),
1274
+ minimum: z.string().optional(),
1275
+ maximum: z.string().optional(),
1276
+ pattern: z.string().optional(),
1277
+ autocapitalization: autocapitalizationTypeSchema.optional(),
1278
+ autocorrect: z.boolean().optional(),
1251
1279
  $id: z.string().optional(),
1252
- items: z.array(schemaSchema),
1253
1280
  title: z.string().optional(),
1254
1281
  description: z.string().optional(),
1255
1282
  control: z.string().optional(),
1283
+ default: z.string().optional(),
1256
1284
  hidden: z.boolean().optional(),
1285
+ disabled: z.boolean().optional(),
1257
1286
  icon: iconSchema.optional(),
1258
1287
  image: imageSchema.optional(),
1259
1288
  keywords: z.array(z.string()).optional(),
1260
1289
  summary: summaryProviderSchema.optional(),
1261
1290
  analyticsId: z.string().optional(),
1262
1291
  persistAsync: persistAsyncSchema.optional(),
1292
+ refreshStepOnChange: z.boolean().optional(),
1263
1293
  validationAsync: validateAsyncSchema.optional(),
1294
+ validationMessages: z.record(z.string()).optional(),
1264
1295
  alert: alertLayoutSchema.optional(),
1296
+ cameraConfig: jsonElementSchema.optional(),
1297
+ accepts: z.array(z.string()).optional(),
1298
+ maxSize: z.number().optional(),
1299
+ source: uploadSourceSchema.optional(),
1300
+ autocompleteHint: z.array(autocompleteTokenSchema).optional(),
1301
+ autofillKey: z.string().optional(),
1302
+ help: helpSchema.optional(),
1303
+ suggestions: suggestionsSchema.optional(),
1304
+ onChange: behaviorSchema.optional(),
1265
1305
  media: mediaSchema.optional(),
1306
+ tags: z.array(z.string()).optional(),
1266
1307
  }),
1267
1308
  );
1268
1309
 
1269
- export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
1310
+ export const toolbarItemSchema: z.ZodSchema<ToolbarItem> = z.lazy(() => toolbarButtonSchema);
1311
+
1312
+ export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
1270
1313
  z.object({
1271
- type: z.literal('array'),
1272
- promoted: z.boolean().optional(),
1273
- $id: z.string().optional(),
1274
- items: schemaSchema,
1275
- addItemTitle: z.string(),
1276
- editItemTitle: z.string(),
1277
- minItems: z.number().optional(),
1278
- maxItems: z.number().optional(),
1279
- placeholder: z.string().optional(),
1280
- title: z.string().optional(),
1281
- description: z.string().optional(),
1314
+ type: z.literal('toolbar-button'),
1315
+ title: z.string(),
1316
+ behavior: behaviorSchema,
1317
+ accessibilityDescription: z.string().optional(),
1318
+ media: mediaSchema.optional(),
1282
1319
  control: z.string().optional(),
1283
- hidden: z.boolean().optional(),
1284
- icon: iconSchema.optional(),
1285
- image: imageSchema.optional(),
1286
- keywords: z.array(z.string()).optional(),
1287
- summary: summarySummariserSchema.optional(),
1288
- analyticsId: z.string().optional(),
1289
- persistAsync: persistAsyncSchema.optional(),
1290
- validationAsync: validateAsyncSchema.optional(),
1291
- alert: alertLayoutSchema.optional(),
1292
- validationMessages: z.record(z.string()).optional(),
1320
+ context: contextSchema.optional(),
1293
1321
  disabled: z.boolean().optional(),
1294
- media: mediaSchema.optional(),
1322
+ analyticsId: z.string().optional(),
1323
+ tags: z.array(z.string()).optional(),
1324
+ }),
1325
+ );
1326
+
1327
+ export const pollingOnErrorSchema: z.ZodSchema<PollingOnError> = z.lazy(() =>
1328
+ z.object({
1329
+ action: actionSchema.optional(),
1330
+ behavior: behaviorSchema.optional(),
1331
+ }),
1332
+ );
1333
+
1334
+ export const modalBehaviorSchema: z.ZodSchema<ModalBehavior> = z.lazy(() =>
1335
+ z.object({
1336
+ type: z.literal('modal'),
1337
+ title: z.string().optional(),
1338
+ content: z.array(layoutSchema),
1295
1339
  }),
1296
1340
  );