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