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