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