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