@wise/dynamic-flow-types 3.9.0-experimental-189acbd → 3.9.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.
package/build/main.mjs CHANGED
@@ -1,20 +1,10 @@
1
1
  // src/zod/schemas.ts
2
2
  import { z } from "zod";
3
- var jsonElementSchema = z.lazy(
4
- () => z.union([
5
- z.string(),
6
- z.number(),
7
- z.boolean(),
8
- z.record(jsonElementSchema),
9
- z.array(jsonElementSchema)
10
- ]).nullable()
11
- );
12
- var externalSchema = z.object({
13
- url: z.string()
14
- });
15
- var stepErrorSchema = z.object({
16
- error: z.string().optional(),
17
- validation: jsonElementSchema.optional()
3
+ var imageSchema = z.object({
4
+ text: z.string().optional(),
5
+ url: z.string().optional(),
6
+ uri: z.string().optional(),
7
+ accessibilityDescription: z.string().optional()
18
8
  });
19
9
  var httpMethodSchema = z.union([
20
10
  z.literal("GET"),
@@ -23,64 +13,13 @@ var httpMethodSchema = z.union([
23
13
  z.literal("PATCH"),
24
14
  z.literal("DELETE")
25
15
  ]);
26
- var imageSchema = z.object({
27
- text: z.string().optional(),
28
- url: z.string().optional(),
29
- uri: z.string().optional(),
30
- accessibilityDescription: z.string().optional()
31
- });
32
- var errorResponseBodySchema = z.object({
33
- refreshFormUrl: z.string().optional(),
34
- analytics: z.record(z.string()).optional(),
35
- error: z.string().optional(),
36
- validation: jsonElementSchema.optional(),
37
- refreshUrl: z.string().optional()
38
- });
39
- var linkSchema = z.object({
40
- url: z.string()
41
- });
42
- var refreshBehaviorSchema = z.object({
43
- type: z.literal("refresh")
44
- });
45
- var summaryProviderSchema = z.object({
46
- providesTitle: z.boolean().optional(),
47
- providesDescription: z.boolean().optional(),
48
- providesIcon: z.boolean().optional(),
49
- providesImage: z.boolean().optional()
50
- });
51
- var copyBehaviorSchema = z.object({
52
- type: z.literal("copy"),
53
- content: z.string()
54
- });
55
- var dismissBehaviorSchema = z.object({
56
- type: z.literal("dismiss")
57
- });
58
- var linkBehaviorSchema = z.object({
59
- type: z.literal("link"),
60
- url: z.string()
61
- });
62
- var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
63
- var helpSchema = z.object({
64
- markdown: z.string()
16
+ var iconNamedSchema = z.object({
17
+ name: z.string()
65
18
  });
66
- var actionTypeSchema = z.union([
67
- z.literal("primary"),
68
- z.literal("secondary"),
69
- z.literal("link"),
70
- z.literal("positive"),
71
- z.literal("negative")
72
- ]);
73
- var validateAsyncSchema = z.object({
74
- param: z.string(),
75
- method: httpMethodSchema,
76
- url: z.string()
19
+ var supportingValuesSchema = z.object({
20
+ value: z.string().optional(),
21
+ subvalue: z.string().optional()
77
22
  });
78
- var navigationStackBehaviorSchema = z.union([
79
- z.literal("default"),
80
- z.literal("remove-previous"),
81
- z.literal("remove-all"),
82
- z.literal("replace-current")
83
- ]);
84
23
  var contextSchema = z.union([
85
24
  z.literal("positive"),
86
25
  z.literal("neutral"),
@@ -91,32 +30,42 @@ var contextSchema = z.union([
91
30
  z.literal("info"),
92
31
  z.literal("primary")
93
32
  ]);
94
- var supportingValuesSchema = z.object({
95
- value: z.string().optional(),
96
- subvalue: z.string().optional()
97
- });
98
- var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
99
33
  var inlineAlertSchema = z.object({
100
34
  content: z.string(),
101
35
  context: contextSchema.optional()
102
36
  });
37
+ var iconTextSchema = z.object({
38
+ text: z.string()
39
+ });
40
+ var sizeSchema = z.union([
41
+ z.literal("xs"),
42
+ z.literal("sm"),
43
+ z.literal("md"),
44
+ z.literal("lg"),
45
+ z.literal("xl")
46
+ ]);
47
+ var autocapitalizationTypeSchema = z.union([
48
+ z.literal("none"),
49
+ z.literal("characters"),
50
+ z.literal("sentences"),
51
+ z.literal("words")
52
+ ]);
53
+ var alignSchema = z.union([z.literal("left"), z.literal("center"), z.literal("right")]);
54
+ var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
103
55
  var mediaImageSchema = z.object({
104
56
  type: z.literal("image"),
105
57
  uri: z.string(),
106
58
  accessibilityDescription: z.string().optional()
107
59
  });
108
- var avatarTextContentSchema = z.object({
109
- type: z.literal("text"),
110
- text: z.string(),
111
- badgeUri: z.string().optional()
112
- });
113
60
  var avatarUriContentSchema = z.object({
114
61
  type: z.literal("uri"),
115
62
  uri: z.string(),
116
63
  badgeUri: z.string().optional()
117
64
  });
118
- var iconTextSchema = z.object({
119
- text: z.string()
65
+ var avatarTextContentSchema = z.object({
66
+ type: z.literal("text"),
67
+ text: z.string(),
68
+ badgeUri: z.string().optional()
120
69
  });
121
70
  var autocompleteTokenSchema = z.union([
122
71
  z.literal("on"),
@@ -183,68 +132,35 @@ var autocompleteTokenSchema = z.union([
183
132
  z.literal("fax"),
184
133
  z.literal("pager")
185
134
  ]);
186
- var iconNamedSchema = z.object({
187
- name: z.string()
188
- });
189
- var autocapitalizationTypeSchema = z.union([
190
- z.literal("none"),
191
- z.literal("characters"),
192
- z.literal("sentences"),
193
- z.literal("words")
194
- ]);
195
- var sizeSchema = z.union([
196
- z.literal("xs"),
197
- z.literal("sm"),
198
- z.literal("md"),
199
- z.literal("lg"),
200
- z.literal("xl")
201
- ]);
202
- var columnsLayoutBiasSchema = z.union([
203
- z.literal("none"),
204
- z.literal("left"),
205
- z.literal("right")
206
- ]);
207
- var formLayoutSchemaReferenceSchema = z.object({
208
- $ref: z.string()
209
- });
210
- var markdownLayoutSchema = z.object({
211
- type: z.literal("markdown"),
212
- content: z.string(),
213
- align: alignSchema.optional(),
135
+ var loadingIndicatorLayoutSchema = z.object({
136
+ type: z.literal("loading-indicator"),
137
+ size: sizeSchema.optional(),
214
138
  control: z.string().optional(),
215
139
  margin: sizeSchema.optional(),
216
140
  analyticsId: z.string().optional()
217
141
  });
218
- var instructionsLayoutItemSchema = z.object({
142
+ var paragraphLayoutSchema = z.object({
143
+ type: z.literal("paragraph"),
219
144
  text: z.string(),
220
- context: contextSchema,
221
- tag: z.string().optional(),
222
- analyticsId: z.string().optional()
223
- });
224
- var modalLayoutTriggerSchema = z.object({
225
- title: z.string()
226
- });
227
- var infoLayoutSchema = z.object({
228
- type: z.literal("info"),
229
- markdown: z.string(),
230
145
  align: alignSchema.optional(),
231
146
  control: z.string().optional(),
232
147
  margin: sizeSchema.optional(),
233
148
  analyticsId: z.string().optional()
234
149
  });
235
- var paragraphLayoutSchema = z.object({
236
- type: z.literal("paragraph"),
237
- text: z.string(),
238
- align: alignSchema.optional(),
150
+ var dividerLayoutSchema = z.object({
151
+ type: z.literal("divider"),
239
152
  control: z.string().optional(),
240
153
  margin: sizeSchema.optional(),
241
154
  analyticsId: z.string().optional()
242
155
  });
243
- var statusListLayoutStatusSchema = z.union([
244
- z.literal("not-done"),
245
- z.literal("pending"),
246
- z.literal("done")
156
+ var listLayoutStatusSchema = z.union([
157
+ z.literal("warning"),
158
+ z.literal("neutral"),
159
+ z.literal("positive")
247
160
  ]);
161
+ var formLayoutSchemaReferenceSchema = z.object({
162
+ $ref: z.string()
163
+ });
248
164
  var imageLayoutSchema = z.object({
249
165
  type: z.literal("image"),
250
166
  text: z.string().optional(),
@@ -257,20 +173,43 @@ var imageLayoutSchema = z.object({
257
173
  align: alignSchema.optional(),
258
174
  analyticsId: z.string().optional()
259
175
  });
260
- var listLayoutStatusSchema = z.union([
261
- z.literal("warning"),
262
- z.literal("neutral"),
263
- z.literal("positive")
176
+ var statusListLayoutStatusSchema = z.union([
177
+ z.literal("not-done"),
178
+ z.literal("pending"),
179
+ z.literal("done")
264
180
  ]);
265
- var loadingIndicatorLayoutSchema = z.object({
266
- type: z.literal("loading-indicator"),
267
- size: sizeSchema.optional(),
181
+ var instructionsLayoutItemSchema = z.object({
182
+ text: z.string(),
183
+ context: contextSchema,
184
+ tag: z.string().optional(),
185
+ analyticsId: z.string().optional()
186
+ });
187
+ var modalLayoutTriggerSchema = z.object({
188
+ title: z.string()
189
+ });
190
+ var searchLayoutSchema = z.object({
191
+ type: z.literal("search"),
192
+ title: z.string(),
193
+ method: httpMethodSchema,
194
+ url: z.string(),
195
+ param: z.string(),
196
+ emptyMessage: z.string().optional(),
268
197
  control: z.string().optional(),
269
198
  margin: sizeSchema.optional(),
270
199
  analyticsId: z.string().optional()
271
200
  });
272
- var dividerLayoutSchema = z.object({
273
- type: z.literal("divider"),
201
+ var infoLayoutSchema = z.object({
202
+ type: z.literal("info"),
203
+ markdown: z.string(),
204
+ align: alignSchema.optional(),
205
+ control: z.string().optional(),
206
+ margin: sizeSchema.optional(),
207
+ analyticsId: z.string().optional()
208
+ });
209
+ var formLayoutSchema = z.object({
210
+ type: z.literal("form"),
211
+ schema: formLayoutSchemaReferenceSchema.optional(),
212
+ schemaId: z.string(),
274
213
  control: z.string().optional(),
275
214
  margin: sizeSchema.optional(),
276
215
  analyticsId: z.string().optional()
@@ -284,42 +223,21 @@ var headingLayoutSchema = z.object({
284
223
  margin: sizeSchema.optional(),
285
224
  analyticsId: z.string().optional()
286
225
  });
287
- var searchLayoutSchema = z.object({
288
- type: z.literal("search"),
289
- title: z.string(),
290
- method: httpMethodSchema,
291
- url: z.string(),
292
- param: z.string(),
293
- emptyMessage: z.string().optional(),
226
+ var markdownLayoutSchema = z.object({
227
+ type: z.literal("markdown"),
228
+ content: z.string(),
229
+ align: alignSchema.optional(),
294
230
  control: z.string().optional(),
295
231
  margin: sizeSchema.optional(),
296
232
  analyticsId: z.string().optional()
297
233
  });
298
- var stringSchemaFormatSchema = z.union([
299
- z.literal("date"),
300
- z.literal("email"),
301
- z.literal("numeric"),
302
- z.literal("password"),
303
- z.literal("phone-number"),
304
- z.literal("base64url")
234
+ var columnsLayoutBiasSchema = z.union([
235
+ z.literal("none"),
236
+ z.literal("left"),
237
+ z.literal("right")
305
238
  ]);
306
- var actionSchema = z.object({
307
- title: z.string().optional(),
308
- type: actionTypeSchema.optional(),
309
- disabled: z.boolean().optional(),
310
- $id: z.string().optional(),
311
- $ref: z.string().optional(),
312
- id: z.string().optional(),
313
- url: z.string().optional(),
314
- method: httpMethodSchema.optional(),
315
- exit: z.boolean().optional(),
316
- result: jsonElementSchema.optional(),
317
- data: jsonElementSchema.optional(),
318
- timeout: z.number().optional(),
319
- skipValidation: z.boolean().optional()
320
- });
321
- var actionResponseBodySchema = z.object({
322
- action: actionSchema
239
+ var helpSchema = z.object({
240
+ markdown: z.string()
323
241
  });
324
242
  var searchSearchRequestSchema = z.object({
325
243
  url: z.string(),
@@ -327,23 +245,30 @@ var searchSearchRequestSchema = z.object({
327
245
  param: z.string(),
328
246
  query: z.string()
329
247
  });
330
- var iconSchema = z.union([iconNamedSchema, iconTextSchema]);
331
- var suggestionsValueSchema = z.object({
332
- label: z.string(),
333
- value: jsonElementSchema,
334
- icon: iconSchema.optional(),
335
- image: imageSchema.optional(),
336
- tag: z.string().optional(),
337
- analyticsId: z.string().optional()
338
- });
339
- var containerBehaviorSchema = z.object({
340
- action: actionSchema.optional(),
341
- link: linkSchema.optional()
248
+ var jsonElementSchema = z.lazy(
249
+ () => z.union([
250
+ z.string(),
251
+ z.number(),
252
+ z.boolean(),
253
+ z.record(jsonElementSchema),
254
+ z.array(jsonElementSchema)
255
+ ]).nullable()
256
+ );
257
+ var externalSchema = z.object({
258
+ url: z.string()
342
259
  });
343
- var actionBehaviorSchema = z.object({
344
- type: z.literal("action"),
345
- action: actionSchema
260
+ var stepErrorSchema = z.object({
261
+ error: z.string().optional(),
262
+ validation: jsonElementSchema.optional()
346
263
  });
264
+ var stringSchemaFormatSchema = z.union([
265
+ z.literal("date"),
266
+ z.literal("email"),
267
+ z.literal("numeric"),
268
+ z.literal("password"),
269
+ z.literal("phone-number"),
270
+ z.literal("base64url")
271
+ ]);
347
272
  var summarySummariserSchema = z.object({
348
273
  defaultTitle: z.string().optional(),
349
274
  defaultDescription: z.string().optional(),
@@ -354,19 +279,72 @@ var summarySummariserSchema = z.object({
354
279
  providesIcon: z.boolean().optional(),
355
280
  providesImage: z.boolean().optional()
356
281
  });
282
+ var validateAsyncSchema = z.object({
283
+ param: z.string(),
284
+ method: httpMethodSchema,
285
+ url: z.string()
286
+ });
287
+ var summaryProviderSchema = z.object({
288
+ providesTitle: z.boolean().optional(),
289
+ providesDescription: z.boolean().optional(),
290
+ providesIcon: z.boolean().optional(),
291
+ providesImage: z.boolean().optional()
292
+ });
293
+ var uploadSourceSchema = z.union([z.literal("camera"), z.literal("file")]);
294
+ var suggestionsValueSchema = z.object({
295
+ label: z.string(),
296
+ value: jsonElementSchema,
297
+ icon: iconSchema.optional(),
298
+ image: imageSchema.optional(),
299
+ tag: z.string().optional(),
300
+ analyticsId: z.string().optional()
301
+ });
302
+ var dismissBehaviorSchema = z.object({
303
+ type: z.literal("dismiss")
304
+ });
305
+ var copyBehaviorSchema = z.object({
306
+ type: z.literal("copy"),
307
+ content: z.string()
308
+ });
309
+ var navigationStackBehaviorSchema = z.union([
310
+ z.literal("default"),
311
+ z.literal("remove-previous"),
312
+ z.literal("remove-all"),
313
+ z.literal("replace-current")
314
+ ]);
315
+ var actionTypeSchema = z.union([
316
+ z.literal("primary"),
317
+ z.literal("secondary"),
318
+ z.literal("link"),
319
+ z.literal("positive"),
320
+ z.literal("negative")
321
+ ]);
357
322
  var summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
358
- var navigationBackBehaviorSchema = z.object({
359
- title: z.string().optional(),
360
- action: actionSchema
323
+ var linkBehaviorSchema = z.object({
324
+ type: z.literal("link"),
325
+ url: z.string()
326
+ });
327
+ var refreshBehaviorSchema = z.object({
328
+ type: z.literal("refresh")
329
+ });
330
+ var linkSchema = z.object({
331
+ url: z.string()
361
332
  });
362
333
  var avatarContentSchema = z.union([avatarTextContentSchema, avatarUriContentSchema]);
363
- var formLayoutSchema = z.object({
364
- type: z.literal("form"),
365
- schema: formLayoutSchemaReferenceSchema.optional(),
366
- schemaId: z.string(),
367
- control: z.string().optional(),
368
- margin: sizeSchema.optional(),
369
- analyticsId: z.string().optional()
334
+ var actionSchema = z.object({
335
+ title: z.string().optional(),
336
+ type: actionTypeSchema.optional(),
337
+ disabled: z.boolean().optional(),
338
+ $id: z.string().optional(),
339
+ $ref: z.string().optional(),
340
+ id: z.string().optional(),
341
+ url: z.string().optional(),
342
+ method: httpMethodSchema.optional(),
343
+ exit: z.boolean().optional(),
344
+ result: jsonElementSchema.optional(),
345
+ data: jsonElementSchema.optional(),
346
+ timeout: z.number().optional(),
347
+ skipValidation: z.boolean().optional()
370
348
  });
371
349
  var instructionsLayoutSchema = z.object({
372
350
  type: z.literal("instructions"),
@@ -376,138 +354,67 @@ var instructionsLayoutSchema = z.object({
376
354
  margin: sizeSchema.optional(),
377
355
  analyticsId: z.string().optional()
378
356
  });
379
- var navigationSchema = z.object({
380
- backButton: navigationBackBehaviorSchema.optional(),
381
- back: navigationBackBehaviorSchema.optional(),
382
- stackBehavior: navigationStackBehaviorSchema.optional()
383
- });
384
- var searchResultActionSchema = z.object({
385
- type: z.literal("action"),
357
+ var searchResultSearchSchema = z.object({
358
+ type: z.literal("search"),
386
359
  title: z.string(),
387
360
  description: z.string().optional(),
388
361
  icon: iconSchema.optional(),
389
362
  image: imageSchema.optional(),
390
- value: actionSchema
363
+ value: searchSearchRequestSchema
391
364
  });
392
- var searchResultSearchSchema = z.object({
393
- type: z.literal("search"),
365
+ var searchResultActionSchema = z.object({
366
+ type: z.literal("action"),
394
367
  title: z.string(),
395
368
  description: z.string().optional(),
396
369
  icon: iconSchema.optional(),
397
370
  image: imageSchema.optional(),
398
- value: searchSearchRequestSchema
371
+ value: actionSchema
372
+ });
373
+ var actionResponseBodySchema = z.object({
374
+ action: actionSchema
375
+ });
376
+ var errorResponseBodySchema = z.object({
377
+ refreshFormUrl: z.string().optional(),
378
+ analytics: z.record(z.string()).optional(),
379
+ error: z.string().optional(),
380
+ validation: jsonElementSchema.optional(),
381
+ refreshUrl: z.string().optional()
399
382
  });
400
383
  var suggestionsSchema = z.object({
401
384
  values: z.array(suggestionsValueSchema)
402
385
  });
386
+ var navigationBackBehaviorSchema = z.object({
387
+ title: z.string().optional(),
388
+ action: actionSchema
389
+ });
390
+ var actionBehaviorSchema = z.object({
391
+ type: z.literal("action"),
392
+ action: actionSchema
393
+ });
394
+ var containerBehaviorSchema = z.object({
395
+ action: actionSchema.optional(),
396
+ link: linkSchema.optional()
397
+ });
403
398
  var mediaAvatarSchema = z.object({
404
399
  type: z.literal("avatar"),
405
400
  content: z.array(avatarContentSchema),
406
401
  accessibilityDescription: z.string().optional()
407
402
  });
408
- var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
409
403
  var mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
404
+ var searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
405
+ var navigationSchema = z.object({
406
+ backButton: navigationBackBehaviorSchema.optional(),
407
+ back: navigationBackBehaviorSchema.optional(),
408
+ stackBehavior: navigationStackBehaviorSchema.optional()
409
+ });
410
410
  var searchResponseBodySchema = z.object({
411
411
  results: z.array(searchResultSchema)
412
412
  });
413
- var stepSchema = z.lazy(
414
- () => z.object({
415
- key: z.string().optional(),
416
- type: z.string().optional(),
417
- actions: z.array(actionSchema).optional(),
418
- refreshFormUrl: z.string().optional(),
419
- id: z.string(),
420
- title: z.string(),
421
- schemas: z.array(schemaSchema),
422
- layout: z.array(layoutSchema),
423
- description: z.string().optional(),
424
- model: jsonElementSchema.optional(),
425
- external: externalSchema.optional(),
426
- polling: pollingSchema.optional(),
427
- linkHandlers: z.array(linkHandlerSchema).optional(),
428
- analytics: z.record(z.string()).optional(),
429
- errors: stepErrorSchema.optional(),
430
- navigation: navigationSchema.optional(),
431
- refreshUrl: z.string().optional(),
432
- control: z.string().optional(),
433
- refreshAfter: z.string().optional()
434
- })
435
- );
436
- var schemaSchema = z.lazy(
437
- () => z.union([
438
- allOfSchemaSchema,
439
- arraySchemaSchema,
440
- blobSchemaSchema,
441
- booleanSchemaSchema,
442
- constSchemaSchema,
443
- integerSchemaSchema,
444
- numberSchemaSchema,
445
- objectSchemaSchema,
446
- oneOfSchemaSchema,
447
- stringSchemaSchema
448
- ])
449
- );
450
- var layoutSchema = z.lazy(
451
- () => z.union([
452
- alertLayoutSchema,
453
- boxLayoutSchema,
454
- buttonLayoutSchema,
455
- columnsLayoutSchema,
456
- decisionLayoutSchema,
457
- dividerLayoutSchema,
458
- formLayoutSchema,
459
- headingLayoutSchema,
460
- imageLayoutSchema,
461
- infoLayoutSchema,
462
- instructionsLayoutSchema,
463
- listLayoutSchema,
464
- loadingIndicatorLayoutSchema,
465
- markdownLayoutSchema,
466
- modalLayoutSchema,
467
- paragraphLayoutSchema,
468
- reviewLayoutSchema,
469
- searchLayoutSchema,
470
- sectionLayoutSchema,
471
- statusListLayoutSchema,
472
- tabsLayoutSchema
473
- ])
474
- );
475
- var pollingSchema = z.lazy(
476
- () => z.object({
477
- interval: z.number().optional(),
478
- url: z.string(),
479
- delay: z.number().optional(),
480
- timeout: z.number().optional(),
481
- maxAttempts: z.number(),
482
- onError: pollingOnErrorSchema
483
- })
484
- );
485
- var linkHandlerSchema = z.lazy(
486
- () => z.object({
487
- regexPattern: z.string(),
488
- behavior: behaviorSchema.optional()
489
- })
490
- );
491
- var modalResponseBodySchema = z.lazy(
492
- () => z.object({
493
- title: z.string().optional(),
494
- content: z.array(layoutSchema)
495
- })
496
- );
497
- var modalBehaviorSchema = z.lazy(
498
- () => z.object({
499
- type: z.literal("modal"),
500
- title: z.string().optional(),
501
- content: z.array(layoutSchema)
502
- })
503
- );
504
- var persistAsyncSchema = z.lazy(
413
+ var additionalInfoSchema = z.lazy(
505
414
  () => z.object({
506
- param: z.string(),
507
- idProperty: z.string(),
508
- schema: schemaSchema,
509
- url: z.string(),
510
- method: httpMethodSchema
415
+ text: z.string(),
416
+ behavior: behaviorSchema.optional(),
417
+ accessibilityDescription: z.string().optional()
511
418
  })
512
419
  );
513
420
  var behaviorSchema = z.lazy(
@@ -521,37 +428,81 @@ var behaviorSchema = z.lazy(
521
428
  refreshBehaviorSchema
522
429
  ])
523
430
  );
524
- var pollingOnErrorSchema = z.lazy(
431
+ var reviewLayoutCallToActionSchema = z.lazy(
525
432
  () => z.object({
526
433
  action: actionSchema.optional(),
434
+ title: z.string(),
435
+ accessibilityDescription: z.string().optional(),
527
436
  behavior: behaviorSchema.optional()
528
437
  })
529
438
  );
530
- var additionalInfoSchema = z.lazy(
439
+ var tabsLayoutSchema = z.lazy(
531
440
  () => z.object({
532
- text: z.string(),
533
- behavior: behaviorSchema.optional(),
534
- accessibilityDescription: z.string().optional()
441
+ type: z.literal("tabs"),
442
+ tabs: z.array(tabsLayoutTabSchema),
443
+ control: z.string().optional(),
444
+ margin: sizeSchema.optional(),
445
+ analyticsId: z.string().optional()
535
446
  })
536
447
  );
537
- var statusListLayoutSchema = z.lazy(
448
+ var tabsLayoutTabSchema = z.lazy(
538
449
  () => z.object({
539
- type: z.literal("status-list"),
540
- items: z.array(statusListLayoutItemSchema),
450
+ title: z.string(),
451
+ components: z.array(layoutSchema),
452
+ tag: z.string().optional(),
453
+ analyticsId: z.string().optional()
454
+ })
455
+ );
456
+ var alertLayoutSchema = z.lazy(
457
+ () => z.object({
458
+ type: z.literal("alert"),
459
+ markdown: z.string(),
460
+ context: contextSchema.optional(),
461
+ control: z.string().optional(),
462
+ margin: sizeSchema.optional(),
463
+ callToAction: alertLayoutCallToActionSchema.optional(),
464
+ analyticsId: z.string().optional()
465
+ })
466
+ );
467
+ var alertLayoutCallToActionSchema = z.lazy(
468
+ () => z.object({
469
+ title: z.string(),
470
+ accessibilityDescription: z.string().optional(),
471
+ behavior: behaviorSchema
472
+ })
473
+ );
474
+ var listLayoutSchema = z.lazy(
475
+ () => z.object({
476
+ type: z.literal("list"),
541
477
  title: z.string().optional(),
478
+ callToAction: listLayoutCallToActionSchema.optional(),
479
+ items: z.array(listLayoutItemSchema),
542
480
  control: z.string().optional(),
543
481
  margin: sizeSchema.optional(),
544
482
  analyticsId: z.string().optional()
545
483
  })
546
484
  );
547
- var statusListLayoutItemSchema = z.lazy(
485
+ var listLayoutCallToActionSchema = z.lazy(
548
486
  () => z.object({
549
487
  title: z.string(),
550
- description: z.string().optional(),
551
- icon: iconSchema,
552
- status: statusListLayoutStatusSchema.optional(),
553
- callToAction: itemCallToActionSchema.optional(),
488
+ accessibilityDescription: z.string().optional(),
489
+ behavior: behaviorSchema
490
+ })
491
+ );
492
+ var listLayoutItemSchema = z.lazy(
493
+ () => z.object({
494
+ status: listLayoutStatusSchema.optional(),
495
+ icon: iconSchema.optional(),
496
+ image: imageSchema.optional(),
497
+ title: z.string().optional(),
498
+ subtitle: z.string().optional(),
499
+ value: z.string().optional(),
500
+ subvalue: z.string().optional(),
554
501
  tag: z.string().optional(),
502
+ additionalInfo: additionalInfoSchema.optional(),
503
+ supportingValues: supportingValuesSchema.optional(),
504
+ inlineAlert: inlineAlertSchema.optional(),
505
+ description: z.string().optional(),
555
506
  analyticsId: z.string().optional()
556
507
  })
557
508
  );
@@ -581,35 +532,83 @@ var decisionLayoutOptionSchema = z.lazy(
581
532
  analyticsId: z.string().optional()
582
533
  })
583
534
  );
584
- var reviewLayoutFieldSchema = z.lazy(
535
+ var sectionLayoutCallToActionSchema = z.lazy(
585
536
  () => z.object({
586
- label: z.string(),
587
- value: z.string(),
588
- rawValue: z.string().optional(),
589
- help: helpSchema.optional(),
537
+ title: z.string(),
538
+ accessibilityDescription: z.string().optional(),
539
+ behavior: behaviorSchema
540
+ })
541
+ );
542
+ var statusListLayoutSchema = z.lazy(
543
+ () => z.object({
544
+ type: z.literal("status-list"),
545
+ items: z.array(statusListLayoutItemSchema),
546
+ title: z.string().optional(),
547
+ control: z.string().optional(),
548
+ margin: sizeSchema.optional(),
549
+ analyticsId: z.string().optional()
550
+ })
551
+ );
552
+ var statusListLayoutItemSchema = z.lazy(
553
+ () => z.object({
554
+ title: z.string(),
555
+ description: z.string().optional(),
556
+ icon: iconSchema,
557
+ status: statusListLayoutStatusSchema.optional(),
558
+ callToAction: itemCallToActionSchema.optional(),
590
559
  tag: z.string().optional(),
591
- icon: iconSchema.optional(),
592
- image: imageSchema.optional(),
593
- additionalInfo: additionalInfoSchema.optional(),
594
- inlineAlert: inlineAlertSchema.optional(),
595
- callToAction: reviewLayoutCallToActionSchema.optional(),
596
560
  analyticsId: z.string().optional()
597
561
  })
598
562
  );
599
- var reviewLayoutCallToActionSchema = z.lazy(
563
+ var sectionLayoutSchema = z.lazy(
564
+ () => z.object({
565
+ type: z.literal("section"),
566
+ components: z.array(layoutSchema),
567
+ title: z.string(),
568
+ callToAction: sectionLayoutCallToActionSchema.optional(),
569
+ control: z.string().optional(),
570
+ margin: sizeSchema.optional(),
571
+ analyticsId: z.string().optional()
572
+ })
573
+ );
574
+ var layoutSchema = z.lazy(
575
+ () => z.union([
576
+ alertLayoutSchema,
577
+ boxLayoutSchema,
578
+ buttonLayoutSchema,
579
+ columnsLayoutSchema,
580
+ decisionLayoutSchema,
581
+ dividerLayoutSchema,
582
+ formLayoutSchema,
583
+ headingLayoutSchema,
584
+ imageLayoutSchema,
585
+ infoLayoutSchema,
586
+ instructionsLayoutSchema,
587
+ listLayoutSchema,
588
+ loadingIndicatorLayoutSchema,
589
+ markdownLayoutSchema,
590
+ modalLayoutSchema,
591
+ paragraphLayoutSchema,
592
+ reviewLayoutSchema,
593
+ searchLayoutSchema,
594
+ sectionLayoutSchema,
595
+ statusListLayoutSchema,
596
+ tabsLayoutSchema
597
+ ])
598
+ );
599
+ var itemCallToActionSchema = z.lazy(
600
600
  () => z.object({
601
- action: actionSchema.optional(),
602
601
  title: z.string(),
603
602
  accessibilityDescription: z.string().optional(),
604
- behavior: behaviorSchema.optional()
603
+ behavior: behaviorSchema
605
604
  })
606
605
  );
607
- var columnsLayoutSchema = z.lazy(
606
+ var boxLayoutSchema = z.lazy(
608
607
  () => z.object({
609
- type: z.literal("columns"),
610
- left: z.array(layoutSchema),
611
- right: z.array(layoutSchema),
612
- bias: columnsLayoutBiasSchema.optional(),
608
+ type: z.literal("box"),
609
+ components: z.array(layoutSchema),
610
+ width: sizeSchema.optional(),
611
+ border: z.boolean().optional(),
613
612
  control: z.string().optional(),
614
613
  margin: sizeSchema.optional(),
615
614
  analyticsId: z.string().optional()
@@ -630,39 +629,17 @@ var buttonLayoutSchema = z.lazy(
630
629
  analyticsId: z.string().optional()
631
630
  })
632
631
  );
633
- var sectionLayoutSchema = z.lazy(
632
+ var columnsLayoutSchema = z.lazy(
634
633
  () => z.object({
635
- type: z.literal("section"),
636
- components: z.array(layoutSchema),
637
- title: z.string(),
638
- callToAction: sectionLayoutCallToActionSchema.optional(),
634
+ type: z.literal("columns"),
635
+ left: z.array(layoutSchema),
636
+ right: z.array(layoutSchema),
637
+ bias: columnsLayoutBiasSchema.optional(),
639
638
  control: z.string().optional(),
640
639
  margin: sizeSchema.optional(),
641
640
  analyticsId: z.string().optional()
642
641
  })
643
642
  );
644
- var sectionLayoutCallToActionSchema = z.lazy(
645
- () => z.object({
646
- title: z.string(),
647
- accessibilityDescription: z.string().optional(),
648
- behavior: behaviorSchema
649
- })
650
- );
651
- var listLayoutCallToActionSchema = z.lazy(
652
- () => z.object({
653
- title: z.string(),
654
- accessibilityDescription: z.string().optional(),
655
- behavior: behaviorSchema
656
- })
657
- );
658
- var tabsLayoutTabSchema = z.lazy(
659
- () => z.object({
660
- title: z.string(),
661
- components: z.array(layoutSchema),
662
- tag: z.string().optional(),
663
- analyticsId: z.string().optional()
664
- })
665
- );
666
643
  var modalLayoutSchema = z.lazy(
667
644
  () => z.object({
668
645
  type: z.literal("modal"),
@@ -673,107 +650,104 @@ var modalLayoutSchema = z.lazy(
673
650
  analyticsId: z.string().optional()
674
651
  })
675
652
  );
676
- var modalLayoutContentSchema = z.lazy(
653
+ var reviewLayoutSchema = z.lazy(
677
654
  () => z.object({
655
+ type: z.literal("review"),
656
+ orientation: z.string().optional(),
657
+ action: actionSchema.optional(),
658
+ fields: z.array(reviewLayoutFieldSchema),
678
659
  title: z.string().optional(),
679
- components: z.array(layoutSchema)
680
- })
681
- );
682
- var tabsLayoutSchema = z.lazy(
683
- () => z.object({
684
- type: z.literal("tabs"),
685
- tabs: z.array(tabsLayoutTabSchema),
660
+ callToAction: reviewLayoutCallToActionSchema.optional(),
686
661
  control: z.string().optional(),
687
662
  margin: sizeSchema.optional(),
688
663
  analyticsId: z.string().optional()
689
664
  })
690
665
  );
691
- var listLayoutItemSchema = z.lazy(
666
+ var reviewLayoutFieldSchema = z.lazy(
692
667
  () => z.object({
693
- status: listLayoutStatusSchema.optional(),
668
+ label: z.string(),
669
+ value: z.string(),
670
+ rawValue: z.string().optional(),
671
+ help: helpSchema.optional(),
672
+ tag: z.string().optional(),
694
673
  icon: iconSchema.optional(),
695
674
  image: imageSchema.optional(),
696
- title: z.string().optional(),
697
- subtitle: z.string().optional(),
698
- value: z.string().optional(),
699
- subvalue: z.string().optional(),
700
- tag: z.string().optional(),
701
675
  additionalInfo: additionalInfoSchema.optional(),
702
- supportingValues: supportingValuesSchema.optional(),
703
676
  inlineAlert: inlineAlertSchema.optional(),
704
- description: z.string().optional(),
677
+ callToAction: reviewLayoutCallToActionSchema.optional(),
705
678
  analyticsId: z.string().optional()
706
679
  })
707
680
  );
708
- var itemCallToActionSchema = z.lazy(
681
+ var modalLayoutContentSchema = z.lazy(
709
682
  () => z.object({
710
- title: z.string(),
711
- accessibilityDescription: z.string().optional(),
712
- behavior: behaviorSchema
683
+ title: z.string().optional(),
684
+ components: z.array(layoutSchema)
713
685
  })
714
686
  );
715
- var listLayoutSchema = z.lazy(
687
+ var modalResponseBodySchema = z.lazy(
716
688
  () => z.object({
717
- type: z.literal("list"),
718
689
  title: z.string().optional(),
719
- callToAction: listLayoutCallToActionSchema.optional(),
720
- items: z.array(listLayoutItemSchema),
721
- control: z.string().optional(),
722
- margin: sizeSchema.optional(),
723
- analyticsId: z.string().optional()
690
+ content: z.array(layoutSchema)
724
691
  })
725
692
  );
726
- var alertLayoutSchema = z.lazy(
693
+ var stepSchema = z.lazy(
727
694
  () => z.object({
728
- type: z.literal("alert"),
729
- markdown: z.string(),
730
- context: contextSchema.optional(),
695
+ key: z.string().optional(),
696
+ type: z.string().optional(),
697
+ actions: z.array(actionSchema).optional(),
698
+ refreshFormUrl: z.string().optional(),
699
+ id: z.string(),
700
+ title: z.string(),
701
+ schemas: z.array(schemaSchema),
702
+ layout: z.array(layoutSchema),
703
+ description: z.string().optional(),
704
+ model: jsonElementSchema.optional(),
705
+ external: externalSchema.optional(),
706
+ polling: pollingSchema.optional(),
707
+ linkHandlers: z.array(linkHandlerSchema).optional(),
708
+ analytics: z.record(z.string()).optional(),
709
+ errors: stepErrorSchema.optional(),
710
+ navigation: navigationSchema.optional(),
711
+ refreshUrl: z.string().optional(),
731
712
  control: z.string().optional(),
732
- margin: sizeSchema.optional(),
733
- callToAction: alertLayoutCallToActionSchema.optional(),
734
- analyticsId: z.string().optional()
713
+ refreshAfter: z.string().optional()
735
714
  })
736
715
  );
737
- var boxLayoutSchema = z.lazy(
738
- () => z.object({
739
- type: z.literal("box"),
740
- components: z.array(layoutSchema),
741
- width: sizeSchema.optional(),
742
- border: z.boolean().optional(),
743
- control: z.string().optional(),
744
- margin: sizeSchema.optional(),
745
- analyticsId: z.string().optional()
746
- })
716
+ var schemaSchema = z.lazy(
717
+ () => z.union([
718
+ allOfSchemaSchema,
719
+ arraySchemaSchema,
720
+ blobSchemaSchema,
721
+ booleanSchemaSchema,
722
+ constSchemaSchema,
723
+ integerSchemaSchema,
724
+ numberSchemaSchema,
725
+ objectSchemaSchema,
726
+ oneOfSchemaSchema,
727
+ stringSchemaSchema
728
+ ])
747
729
  );
748
- var reviewLayoutSchema = z.lazy(
730
+ var pollingSchema = z.lazy(
749
731
  () => z.object({
750
- type: z.literal("review"),
751
- orientation: z.string().optional(),
752
- action: actionSchema.optional(),
753
- fields: z.array(reviewLayoutFieldSchema),
754
- title: z.string().optional(),
755
- callToAction: reviewLayoutCallToActionSchema.optional(),
756
- control: z.string().optional(),
757
- margin: sizeSchema.optional(),
758
- analyticsId: z.string().optional()
732
+ interval: z.number().optional(),
733
+ url: z.string(),
734
+ delay: z.number().optional(),
735
+ timeout: z.number().optional(),
736
+ maxAttempts: z.number(),
737
+ onError: pollingOnErrorSchema
759
738
  })
760
739
  );
761
- var alertLayoutCallToActionSchema = z.lazy(
740
+ var linkHandlerSchema = z.lazy(
762
741
  () => z.object({
763
- title: z.string(),
764
- accessibilityDescription: z.string().optional(),
765
- behavior: behaviorSchema
742
+ regexPattern: z.string(),
743
+ behavior: behaviorSchema.optional()
766
744
  })
767
745
  );
768
- var objectSchemaSchema = z.lazy(
746
+ var allOfSchemaSchema = z.lazy(
769
747
  () => z.object({
770
- type: z.literal("object"),
771
748
  disabled: z.boolean().optional(),
772
749
  promoted: z.boolean().optional(),
773
- help: helpSchema.optional(),
774
- properties: z.record(schemaSchema),
775
- displayOrder: z.array(z.string()),
776
- required: z.array(z.string()).optional(),
750
+ allOf: z.array(schemaSchema),
777
751
  $id: z.string().optional(),
778
752
  title: z.string().optional(),
779
753
  description: z.string().optional(),
@@ -787,6 +761,9 @@ var objectSchemaSchema = z.lazy(
787
761
  alert: alertLayoutSchema.optional()
788
762
  })
789
763
  );
764
+ var arraySchemaSchema = z.lazy(
765
+ () => z.union([arraySchemaListSchema, arraySchemaTupleSchema])
766
+ );
790
767
  var blobSchemaSchema = z.lazy(
791
768
  () => z.object({
792
769
  type: z.literal("blob"),
@@ -811,27 +788,6 @@ var blobSchemaSchema = z.lazy(
811
788
  disabled: z.boolean().optional()
812
789
  })
813
790
  );
814
- var allOfSchemaSchema = z.lazy(
815
- () => z.object({
816
- disabled: z.boolean().optional(),
817
- promoted: z.boolean().optional(),
818
- allOf: z.array(schemaSchema),
819
- $id: z.string().optional(),
820
- title: z.string().optional(),
821
- description: z.string().optional(),
822
- control: z.string().optional(),
823
- hidden: z.boolean().optional(),
824
- icon: iconSchema.optional(),
825
- image: imageSchema.optional(),
826
- keywords: z.array(z.string()).optional(),
827
- summary: summaryProviderSchema.optional(),
828
- analyticsId: z.string().optional(),
829
- alert: alertLayoutSchema.optional()
830
- })
831
- );
832
- var arraySchemaSchema = z.lazy(
833
- () => z.union([arraySchemaListSchema, arraySchemaTupleSchema])
834
- );
835
791
  var booleanSchemaSchema = z.lazy(
836
792
  () => z.object({
837
793
  type: z.literal("boolean"),
@@ -947,6 +903,28 @@ var numberSchemaSchema = z.lazy(
947
903
  onChange: behaviorSchema.optional()
948
904
  })
949
905
  );
906
+ var objectSchemaSchema = z.lazy(
907
+ () => z.object({
908
+ type: z.literal("object"),
909
+ disabled: z.boolean().optional(),
910
+ promoted: z.boolean().optional(),
911
+ help: helpSchema.optional(),
912
+ properties: z.record(schemaSchema),
913
+ displayOrder: z.array(z.string()),
914
+ required: z.array(z.string()).optional(),
915
+ $id: z.string().optional(),
916
+ title: z.string().optional(),
917
+ description: z.string().optional(),
918
+ control: z.string().optional(),
919
+ hidden: z.boolean().optional(),
920
+ icon: iconSchema.optional(),
921
+ image: imageSchema.optional(),
922
+ keywords: z.array(z.string()).optional(),
923
+ summary: summaryProviderSchema.optional(),
924
+ analyticsId: z.string().optional(),
925
+ alert: alertLayoutSchema.optional()
926
+ })
927
+ );
950
928
  var oneOfSchemaSchema = z.lazy(
951
929
  () => z.object({
952
930
  autofillProvider: z.string().optional(),
@@ -1051,6 +1029,15 @@ var arraySchemaListSchema = z.lazy(
1051
1029
  disabled: z.boolean().optional()
1052
1030
  })
1053
1031
  );
1032
+ var persistAsyncSchema = z.lazy(
1033
+ () => z.object({
1034
+ param: z.string(),
1035
+ idProperty: z.string(),
1036
+ schema: schemaSchema,
1037
+ url: z.string(),
1038
+ method: httpMethodSchema
1039
+ })
1040
+ );
1054
1041
  var arraySchemaTupleSchema = z.lazy(
1055
1042
  () => z.object({
1056
1043
  type: z.literal("array"),
@@ -1071,6 +1058,19 @@ var arraySchemaTupleSchema = z.lazy(
1071
1058
  alert: alertLayoutSchema.optional()
1072
1059
  })
1073
1060
  );
1061
+ var pollingOnErrorSchema = z.lazy(
1062
+ () => z.object({
1063
+ action: actionSchema.optional(),
1064
+ behavior: behaviorSchema.optional()
1065
+ })
1066
+ );
1067
+ var modalBehaviorSchema = z.lazy(
1068
+ () => z.object({
1069
+ type: z.literal("modal"),
1070
+ title: z.string().optional(),
1071
+ content: z.array(layoutSchema)
1072
+ })
1073
+ );
1074
1074
 
1075
1075
  // src/zod/validators.ts
1076
1076
  var validateStep = (step) => validate(step, stepSchema);