@wise/dynamic-flow-types 2.30.1 → 2.32.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 +35 -25
- package/build/main.min.js +1 -1
- package/build/main.mjs +35 -25
- package/build/next/index.d.ts +1 -0
- package/build/next/layout/BoxLayout.d.ts +1 -0
- package/build/next/layout/ListLayout.d.ts +11 -6
- package/build/next/layout/ListLayoutCallToAction.d.ts +18 -0
- package/build/next/layout/ListLayoutItem.d.ts +26 -8
- package/build/next/layout/ListLayoutStatus.d.ts +2 -2
- package/build/next/schema/StringSchema.d.ts +2 -0
- package/build/renderers/DecisionRendererProps.d.ts +1 -0
- package/build/renderers/Image.d.ts +22 -1
- package/build/renderers/ImageRendererProps.d.ts +4 -0
- package/build/renderers/ListRendererProps.d.ts +33 -0
- package/build/renderers/RendererProps.d.ts +3 -2
- package/build/renderers/SearchRendererProps.d.ts +5 -2
- package/build/renderers/index.d.ts +1 -0
- package/build/spec/LayoutComponent.d.ts +16 -1
- package/build/zod/schemas.d.ts +1331 -923
- package/build/zod/schemas.ts +421 -410
- package/package.json +2 -2
package/build/zod/schemas.ts
CHANGED
|
@@ -5,21 +5,21 @@ import type {
|
|
|
5
5
|
Step,
|
|
6
6
|
Schema,
|
|
7
7
|
Layout,
|
|
8
|
-
|
|
8
|
+
ModalLayoutContent,
|
|
9
|
+
ModalLayout,
|
|
10
|
+
BoxLayout,
|
|
11
|
+
ColumnsLayout,
|
|
9
12
|
ArraySchema,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
NumberSchema,
|
|
13
|
-
ObjectSchema,
|
|
13
|
+
ArraySchemaList,
|
|
14
|
+
ArraySchemaTuple,
|
|
14
15
|
OneOfSchema,
|
|
15
16
|
StringSchema,
|
|
16
17
|
PersistAsync,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
BoxLayout,
|
|
18
|
+
NumberSchema,
|
|
19
|
+
AllOfSchema,
|
|
20
|
+
ObjectSchema,
|
|
21
|
+
BooleanSchema,
|
|
22
|
+
IntegerSchema,
|
|
23
23
|
} from '../next';
|
|
24
24
|
|
|
25
25
|
export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
@@ -51,51 +51,33 @@ export const httpMethodSchema = z.union([
|
|
|
51
51
|
z.literal('DELETE'),
|
|
52
52
|
]);
|
|
53
53
|
|
|
54
|
-
export const
|
|
55
|
-
|
|
56
|
-
analytics: z.record(z.string()).optional(),
|
|
57
|
-
error: z.string().optional(),
|
|
58
|
-
validation: jsonElementSchema.optional(),
|
|
59
|
-
refreshUrl: z.string().optional(),
|
|
54
|
+
export const iconNamedSchema = z.object({
|
|
55
|
+
name: z.string(),
|
|
60
56
|
});
|
|
61
57
|
|
|
62
|
-
export const
|
|
63
|
-
z.literal('
|
|
64
|
-
z.literal('
|
|
65
|
-
z.literal('
|
|
66
|
-
z.literal('
|
|
67
|
-
z.literal('
|
|
68
|
-
z.literal('base64url'),
|
|
58
|
+
export const sizeSchema = z.union([
|
|
59
|
+
z.literal('xs'),
|
|
60
|
+
z.literal('sm'),
|
|
61
|
+
z.literal('md'),
|
|
62
|
+
z.literal('lg'),
|
|
63
|
+
z.literal('xl'),
|
|
69
64
|
]);
|
|
70
65
|
|
|
71
|
-
export const
|
|
72
|
-
z.literal('
|
|
73
|
-
z.literal('
|
|
74
|
-
z.literal('
|
|
75
|
-
z.literal('
|
|
66
|
+
export const contextSchema = z.union([
|
|
67
|
+
z.literal('positive'),
|
|
68
|
+
z.literal('neutral'),
|
|
69
|
+
z.literal('warning'),
|
|
70
|
+
z.literal('negative'),
|
|
71
|
+
z.literal('success'),
|
|
72
|
+
z.literal('failure'),
|
|
73
|
+
z.literal('info'),
|
|
74
|
+
z.literal('primary'),
|
|
76
75
|
]);
|
|
77
76
|
|
|
78
|
-
export const
|
|
79
|
-
text: z.string()
|
|
80
|
-
url: z.string(),
|
|
81
|
-
accessibilityDescription: z.string().optional(),
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
export const summaryProviderSchema = z.object({
|
|
85
|
-
providesTitle: z.boolean().optional(),
|
|
86
|
-
providesDescription: z.boolean().optional(),
|
|
87
|
-
providesIcon: z.boolean().optional(),
|
|
88
|
-
providesImage: z.boolean().optional(),
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
export const validateAsyncSchema = z.object({
|
|
92
|
-
param: z.string(),
|
|
93
|
-
method: httpMethodSchema,
|
|
94
|
-
url: z.string(),
|
|
77
|
+
export const iconTextSchema = z.object({
|
|
78
|
+
text: z.string(),
|
|
95
79
|
});
|
|
96
80
|
|
|
97
|
-
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
98
|
-
|
|
99
81
|
export const autocompleteTokenSchema = z.union([
|
|
100
82
|
z.literal('on'),
|
|
101
83
|
z.literal('name'),
|
|
@@ -162,59 +144,29 @@ export const autocompleteTokenSchema = z.union([
|
|
|
162
144
|
z.literal('pager'),
|
|
163
145
|
]);
|
|
164
146
|
|
|
165
|
-
export const
|
|
166
|
-
markdown: z.string(),
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
export const iconNamedSchema = z.object({
|
|
170
|
-
name: z.string(),
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
export const iconTextSchema = z.object({
|
|
174
|
-
text: z.string(),
|
|
175
|
-
});
|
|
147
|
+
export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
176
148
|
|
|
177
|
-
export const
|
|
178
|
-
z.literal('
|
|
179
|
-
z.literal('
|
|
180
|
-
z.literal('
|
|
181
|
-
z.literal('
|
|
182
|
-
z.literal('success'),
|
|
183
|
-
z.literal('failure'),
|
|
184
|
-
z.literal('info'),
|
|
185
|
-
z.literal('primary'),
|
|
149
|
+
export const autocapitalizationTypeSchema = z.union([
|
|
150
|
+
z.literal('none'),
|
|
151
|
+
z.literal('characters'),
|
|
152
|
+
z.literal('sentences'),
|
|
153
|
+
z.literal('words'),
|
|
186
154
|
]);
|
|
187
155
|
|
|
188
156
|
export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
|
|
189
157
|
|
|
190
|
-
export const
|
|
191
|
-
z.
|
|
192
|
-
z.
|
|
193
|
-
z.
|
|
194
|
-
z.literal('lg'),
|
|
195
|
-
z.literal('xl'),
|
|
196
|
-
]);
|
|
197
|
-
|
|
198
|
-
export const listLayoutStatusSchema = z.union([
|
|
199
|
-
z.literal('warning'),
|
|
200
|
-
z.literal('neutral'),
|
|
201
|
-
z.literal('positive'),
|
|
202
|
-
]);
|
|
203
|
-
|
|
204
|
-
export const modalLayoutTriggerSchema = z.object({
|
|
205
|
-
title: z.string(),
|
|
158
|
+
export const imageSchema = z.object({
|
|
159
|
+
text: z.string().optional(),
|
|
160
|
+
url: z.string(),
|
|
161
|
+
accessibilityDescription: z.string().optional(),
|
|
206
162
|
});
|
|
207
163
|
|
|
208
|
-
export const
|
|
209
|
-
z.literal('
|
|
210
|
-
z.
|
|
211
|
-
z.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
export const markdownLayoutSchema = z.object({
|
|
215
|
-
type: z.literal('markdown'),
|
|
216
|
-
content: z.string(),
|
|
217
|
-
align: alignSchema.optional(),
|
|
164
|
+
export const imageLayoutSchema = z.object({
|
|
165
|
+
type: z.literal('image'),
|
|
166
|
+
text: z.string().optional(),
|
|
167
|
+
url: z.string(),
|
|
168
|
+
size: sizeSchema.optional(),
|
|
169
|
+
accessibilityDescription: z.string().optional(),
|
|
218
170
|
control: z.string().optional(),
|
|
219
171
|
margin: sizeSchema.optional(),
|
|
220
172
|
});
|
|
@@ -225,38 +177,71 @@ export const statusListLayoutStatusSchema = z.union([
|
|
|
225
177
|
z.literal('done'),
|
|
226
178
|
]);
|
|
227
179
|
|
|
228
|
-
export const
|
|
229
|
-
type: z.literal('
|
|
180
|
+
export const headingLayoutSchema = z.object({
|
|
181
|
+
type: z.literal('heading'),
|
|
230
182
|
text: z.string(),
|
|
183
|
+
size: sizeSchema.optional(),
|
|
231
184
|
align: alignSchema.optional(),
|
|
232
185
|
control: z.string().optional(),
|
|
233
186
|
margin: sizeSchema.optional(),
|
|
234
187
|
});
|
|
235
188
|
|
|
236
|
-
export const
|
|
237
|
-
type: z.literal('
|
|
238
|
-
|
|
239
|
-
|
|
189
|
+
export const searchLayoutSchema = z.object({
|
|
190
|
+
type: z.literal('search'),
|
|
191
|
+
title: z.string(),
|
|
192
|
+
method: httpMethodSchema,
|
|
193
|
+
url: z.string(),
|
|
194
|
+
param: z.string(),
|
|
195
|
+
emptyMessage: z.string().optional(),
|
|
240
196
|
control: z.string().optional(),
|
|
241
197
|
margin: sizeSchema.optional(),
|
|
242
198
|
});
|
|
243
199
|
|
|
244
|
-
export const
|
|
245
|
-
|
|
200
|
+
export const modalLayoutTriggerSchema = z.object({
|
|
201
|
+
title: z.string(),
|
|
246
202
|
});
|
|
247
203
|
|
|
248
|
-
export const
|
|
249
|
-
|
|
250
|
-
value: z.string(),
|
|
251
|
-
rawValue: z.string().optional(),
|
|
252
|
-
help: helpSchema.optional(),
|
|
204
|
+
export const helpSchema = z.object({
|
|
205
|
+
markdown: z.string(),
|
|
253
206
|
});
|
|
254
207
|
|
|
208
|
+
export const columnsLayoutBiasSchema = z.union([
|
|
209
|
+
z.literal('none'),
|
|
210
|
+
z.literal('left'),
|
|
211
|
+
z.literal('right'),
|
|
212
|
+
]);
|
|
213
|
+
|
|
255
214
|
export const instructionsLayoutItemSchema = z.object({
|
|
256
215
|
text: z.string(),
|
|
257
216
|
context: contextSchema,
|
|
258
217
|
});
|
|
259
218
|
|
|
219
|
+
export const formLayoutSchemaReferenceSchema = z.object({
|
|
220
|
+
$ref: z.string(),
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
export const listLayoutStatusSchema = z.union([
|
|
224
|
+
z.literal('warning'),
|
|
225
|
+
z.literal('neutral'),
|
|
226
|
+
z.literal('positive'),
|
|
227
|
+
]);
|
|
228
|
+
|
|
229
|
+
export const instructionsLayoutSchema = z.object({
|
|
230
|
+
type: z.literal('instructions'),
|
|
231
|
+
title: z.string().optional(),
|
|
232
|
+
items: z.array(instructionsLayoutItemSchema),
|
|
233
|
+
control: z.string().optional(),
|
|
234
|
+
margin: sizeSchema.optional(),
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
export const paragraphLayoutSchema = z.object({
|
|
238
|
+
type: z.literal('paragraph'),
|
|
239
|
+
text: z.string(),
|
|
240
|
+
align: alignSchema.optional(),
|
|
241
|
+
control: z.string().optional(),
|
|
242
|
+
margin: sizeSchema.optional(),
|
|
243
|
+
});
|
|
244
|
+
|
|
260
245
|
export const dividerLayoutSchema = z.object({
|
|
261
246
|
type: z.literal('divider'),
|
|
262
247
|
control: z.string().optional(),
|
|
@@ -271,23 +256,14 @@ export const formLayoutSchema = z.object({
|
|
|
271
256
|
margin: sizeSchema.optional(),
|
|
272
257
|
});
|
|
273
258
|
|
|
274
|
-
export const
|
|
275
|
-
type: z.literal('
|
|
276
|
-
|
|
277
|
-
size: sizeSchema.optional(),
|
|
259
|
+
export const infoLayoutSchema = z.object({
|
|
260
|
+
type: z.literal('info'),
|
|
261
|
+
markdown: z.string(),
|
|
278
262
|
align: alignSchema.optional(),
|
|
279
263
|
control: z.string().optional(),
|
|
280
264
|
margin: sizeSchema.optional(),
|
|
281
265
|
});
|
|
282
266
|
|
|
283
|
-
export const instructionsLayoutSchema = z.object({
|
|
284
|
-
type: z.literal('instructions'),
|
|
285
|
-
title: z.string().optional(),
|
|
286
|
-
items: z.array(instructionsLayoutItemSchema),
|
|
287
|
-
control: z.string().optional(),
|
|
288
|
-
margin: sizeSchema.optional(),
|
|
289
|
-
});
|
|
290
|
-
|
|
291
267
|
export const loadingIndicatorLayoutSchema = z.object({
|
|
292
268
|
type: z.literal('loading-indicator'),
|
|
293
269
|
size: sizeSchema.optional(),
|
|
@@ -295,35 +271,93 @@ export const loadingIndicatorLayoutSchema = z.object({
|
|
|
295
271
|
margin: sizeSchema.optional(),
|
|
296
272
|
});
|
|
297
273
|
|
|
298
|
-
export const
|
|
299
|
-
type: z.literal('
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
url: z.string(),
|
|
303
|
-
param: z.string(),
|
|
304
|
-
emptyMessage: z.string().optional(),
|
|
274
|
+
export const markdownLayoutSchema = z.object({
|
|
275
|
+
type: z.literal('markdown'),
|
|
276
|
+
content: z.string(),
|
|
277
|
+
align: alignSchema.optional(),
|
|
305
278
|
control: z.string().optional(),
|
|
306
279
|
margin: sizeSchema.optional(),
|
|
307
280
|
});
|
|
308
281
|
|
|
309
|
-
export const
|
|
310
|
-
|
|
282
|
+
export const summaryProviderSchema = z.object({
|
|
283
|
+
providesTitle: z.boolean().optional(),
|
|
284
|
+
providesDescription: z.boolean().optional(),
|
|
285
|
+
providesIcon: z.boolean().optional(),
|
|
286
|
+
providesImage: z.boolean().optional(),
|
|
311
287
|
});
|
|
312
288
|
|
|
313
|
-
export const
|
|
314
|
-
z.literal('
|
|
315
|
-
z.literal('
|
|
316
|
-
z.literal('
|
|
317
|
-
z.literal('
|
|
289
|
+
export const stringSchemaFormatSchema = z.union([
|
|
290
|
+
z.literal('date'),
|
|
291
|
+
z.literal('email'),
|
|
292
|
+
z.literal('numeric'),
|
|
293
|
+
z.literal('password'),
|
|
294
|
+
z.literal('phone-number'),
|
|
295
|
+
z.literal('base64url'),
|
|
318
296
|
]);
|
|
319
297
|
|
|
320
|
-
export const
|
|
321
|
-
z.
|
|
322
|
-
|
|
323
|
-
z.
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
]);
|
|
298
|
+
export const validateAsyncSchema = z.object({
|
|
299
|
+
param: z.string(),
|
|
300
|
+
method: httpMethodSchema,
|
|
301
|
+
url: z.string(),
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
305
|
+
|
|
306
|
+
export const summarySummariserSchema = z.object({
|
|
307
|
+
defaultTitle: z.string().optional(),
|
|
308
|
+
defaultDescription: z.string().optional(),
|
|
309
|
+
defaultIcon: iconSchema.optional(),
|
|
310
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
311
|
+
providesTitle: z.boolean().optional(),
|
|
312
|
+
providesDescription: z.boolean().optional(),
|
|
313
|
+
providesIcon: z.boolean().optional(),
|
|
314
|
+
providesImage: z.boolean().optional(),
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
export const searchSearchRequestSchema = z.object({
|
|
318
|
+
url: z.string(),
|
|
319
|
+
method: httpMethodSchema,
|
|
320
|
+
param: z.string(),
|
|
321
|
+
query: z.string(),
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
export const searchResultSearchSchema = z.object({
|
|
325
|
+
type: z.literal('search'),
|
|
326
|
+
title: z.string(),
|
|
327
|
+
description: z.string().optional(),
|
|
328
|
+
icon: iconSchema.optional(),
|
|
329
|
+
image: imageLayoutSchema.optional(),
|
|
330
|
+
value: searchSearchRequestSchema,
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
export const errorResponseBodySchema = z.object({
|
|
334
|
+
refreshFormUrl: z.string().optional(),
|
|
335
|
+
analytics: z.record(z.string()).optional(),
|
|
336
|
+
error: z.string().optional(),
|
|
337
|
+
validation: jsonElementSchema.optional(),
|
|
338
|
+
refreshUrl: z.string().optional(),
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
export const actionTypeSchema = z.union([
|
|
342
|
+
z.literal('primary'),
|
|
343
|
+
z.literal('secondary'),
|
|
344
|
+
z.literal('link'),
|
|
345
|
+
z.literal('positive'),
|
|
346
|
+
z.literal('negative'),
|
|
347
|
+
]);
|
|
348
|
+
|
|
349
|
+
export const navigationStackBehaviorSchema = z.union([
|
|
350
|
+
z.literal('default'),
|
|
351
|
+
z.literal('remove-previous'),
|
|
352
|
+
z.literal('remove-all'),
|
|
353
|
+
z.literal('replace-current'),
|
|
354
|
+
]);
|
|
355
|
+
|
|
356
|
+
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
357
|
+
|
|
358
|
+
export const linkSchema = z.object({
|
|
359
|
+
url: z.string(),
|
|
360
|
+
});
|
|
327
361
|
|
|
328
362
|
export const actionSchema = z.object({
|
|
329
363
|
title: z.string().optional(),
|
|
@@ -346,62 +380,15 @@ export const linkHandlerSchema = z.object({
|
|
|
346
380
|
action: actionSchema,
|
|
347
381
|
});
|
|
348
382
|
|
|
349
|
-
export const actionResponseBodySchema = z.object({
|
|
350
|
-
action: actionSchema,
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
export const searchSearchRequestSchema = z.object({
|
|
354
|
-
url: z.string(),
|
|
355
|
-
method: httpMethodSchema,
|
|
356
|
-
param: z.string(),
|
|
357
|
-
query: z.string(),
|
|
358
|
-
});
|
|
359
|
-
|
|
360
|
-
export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
361
|
-
|
|
362
|
-
export const imageLayoutSchema = z.object({
|
|
363
|
-
type: z.literal('image'),
|
|
364
|
-
text: z.string().optional(),
|
|
365
|
-
url: z.string(),
|
|
366
|
-
size: sizeSchema.optional(),
|
|
367
|
-
accessibilityDescription: z.string().optional(),
|
|
368
|
-
control: z.string().optional(),
|
|
369
|
-
margin: sizeSchema.optional(),
|
|
370
|
-
});
|
|
371
|
-
|
|
372
|
-
export const searchResultActionSchema = z.object({
|
|
373
|
-
type: z.literal('action'),
|
|
374
|
-
title: z.string(),
|
|
375
|
-
description: z.string().optional(),
|
|
376
|
-
icon: iconSchema.optional(),
|
|
377
|
-
image: imageLayoutSchema.optional(),
|
|
378
|
-
value: actionSchema,
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
export const summarySummariserSchema = z.object({
|
|
382
|
-
defaultTitle: z.string().optional(),
|
|
383
|
-
defaultDescription: z.string().optional(),
|
|
384
|
-
defaultIcon: iconSchema.optional(),
|
|
385
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
386
|
-
providesTitle: z.boolean().optional(),
|
|
387
|
-
providesDescription: z.boolean().optional(),
|
|
388
|
-
providesIcon: z.boolean().optional(),
|
|
389
|
-
providesImage: z.boolean().optional(),
|
|
390
|
-
});
|
|
391
|
-
|
|
392
383
|
export const listLayoutItemSchema = z.object({
|
|
393
|
-
title: z.string(),
|
|
394
384
|
description: z.string().optional(),
|
|
395
|
-
icon: iconSchema,
|
|
396
385
|
status: listLayoutStatusSchema.optional(),
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
control: z.string().optional(),
|
|
404
|
-
margin: sizeSchema.optional(),
|
|
386
|
+
icon: iconSchema.optional(),
|
|
387
|
+
image: imageSchema.optional(),
|
|
388
|
+
title: z.string(),
|
|
389
|
+
subtitle: z.string().optional(),
|
|
390
|
+
value: z.string().optional(),
|
|
391
|
+
subvalue: z.string().optional(),
|
|
405
392
|
});
|
|
406
393
|
|
|
407
394
|
export const decisionLayoutOptionSchema = z.object({
|
|
@@ -413,11 +400,31 @@ export const decisionLayoutOptionSchema = z.object({
|
|
|
413
400
|
image: imageLayoutSchema.optional(),
|
|
414
401
|
});
|
|
415
402
|
|
|
403
|
+
export const behaviorSchema = z.object({
|
|
404
|
+
action: actionSchema.optional(),
|
|
405
|
+
link: linkSchema.optional(),
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
export const reviewLayoutFieldSchema = z.object({
|
|
409
|
+
label: z.string(),
|
|
410
|
+
value: z.string(),
|
|
411
|
+
rawValue: z.string().optional(),
|
|
412
|
+
help: helpSchema.optional(),
|
|
413
|
+
});
|
|
414
|
+
|
|
416
415
|
export const reviewLayoutCallToActionSchema = z.object({
|
|
417
416
|
title: z.string(),
|
|
418
417
|
action: actionSchema,
|
|
419
418
|
});
|
|
420
419
|
|
|
420
|
+
export const decisionLayoutSchema = z.object({
|
|
421
|
+
type: z.literal('decision'),
|
|
422
|
+
title: z.string().optional(),
|
|
423
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
424
|
+
control: z.string().optional(),
|
|
425
|
+
margin: sizeSchema.optional(),
|
|
426
|
+
});
|
|
427
|
+
|
|
421
428
|
export const buttonLayoutSchema = z.object({
|
|
422
429
|
type: z.literal('button'),
|
|
423
430
|
size: sizeSchema.optional(),
|
|
@@ -430,15 +437,19 @@ export const buttonLayoutSchema = z.object({
|
|
|
430
437
|
margin: sizeSchema.optional(),
|
|
431
438
|
});
|
|
432
439
|
|
|
433
|
-
export const
|
|
434
|
-
|
|
435
|
-
|
|
440
|
+
export const searchResultActionSchema = z.object({
|
|
441
|
+
type: z.literal('action'),
|
|
442
|
+
title: z.string(),
|
|
443
|
+
description: z.string().optional(),
|
|
444
|
+
icon: iconSchema.optional(),
|
|
445
|
+
image: imageLayoutSchema.optional(),
|
|
446
|
+
value: actionSchema,
|
|
436
447
|
});
|
|
437
448
|
|
|
438
|
-
export const
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
449
|
+
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
450
|
+
|
|
451
|
+
export const actionResponseBodySchema = z.object({
|
|
452
|
+
action: actionSchema,
|
|
442
453
|
});
|
|
443
454
|
|
|
444
455
|
export const pollingOnErrorSchema = z.object({
|
|
@@ -450,8 +461,6 @@ export const navigationBackBehaviorSchema = z.object({
|
|
|
450
461
|
action: actionSchema,
|
|
451
462
|
});
|
|
452
463
|
|
|
453
|
-
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
454
|
-
|
|
455
464
|
export const pollingSchema = z.object({
|
|
456
465
|
url: z.string(),
|
|
457
466
|
interval: z.number().optional(),
|
|
@@ -467,22 +476,16 @@ export const navigationSchema = z.object({
|
|
|
467
476
|
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
468
477
|
});
|
|
469
478
|
|
|
470
|
-
export const
|
|
471
|
-
type: z.literal('search'),
|
|
479
|
+
export const listLayoutCallToActionSchema = z.object({
|
|
472
480
|
title: z.string(),
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
image: imageLayoutSchema.optional(),
|
|
476
|
-
value: searchSearchRequestSchema,
|
|
481
|
+
accessibilityDescription: z.string().optional(),
|
|
482
|
+
behavior: behaviorSchema,
|
|
477
483
|
});
|
|
478
484
|
|
|
479
|
-
export const
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
control: z.string().optional(),
|
|
484
|
-
margin: sizeSchema.optional(),
|
|
485
|
-
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
485
|
+
export const alertLayoutCallToActionSchema = z.object({
|
|
486
|
+
title: z.string(),
|
|
487
|
+
accessibilityDescription: z.string().optional(),
|
|
488
|
+
behavior: behaviorSchema,
|
|
486
489
|
});
|
|
487
490
|
|
|
488
491
|
export const itemCallToActionSchema = z.object({
|
|
@@ -491,14 +494,6 @@ export const itemCallToActionSchema = z.object({
|
|
|
491
494
|
behavior: behaviorSchema,
|
|
492
495
|
});
|
|
493
496
|
|
|
494
|
-
export const decisionLayoutSchema = z.object({
|
|
495
|
-
type: z.literal('decision'),
|
|
496
|
-
title: z.string().optional(),
|
|
497
|
-
options: z.array(decisionLayoutOptionSchema),
|
|
498
|
-
control: z.string().optional(),
|
|
499
|
-
margin: sizeSchema.optional(),
|
|
500
|
-
});
|
|
501
|
-
|
|
502
497
|
export const reviewLayoutSchema = z.object({
|
|
503
498
|
type: z.literal('review'),
|
|
504
499
|
orientation: z.string().optional(),
|
|
@@ -510,29 +505,34 @@ export const reviewLayoutSchema = z.object({
|
|
|
510
505
|
margin: sizeSchema.optional(),
|
|
511
506
|
});
|
|
512
507
|
|
|
513
|
-
export const
|
|
508
|
+
export const searchResponseBodySchema = z.object({
|
|
509
|
+
results: z.array(searchResultSchema),
|
|
510
|
+
});
|
|
514
511
|
|
|
515
|
-
export const
|
|
516
|
-
|
|
517
|
-
promoted: z.boolean().optional(),
|
|
518
|
-
$id: z.string().optional(),
|
|
519
|
-
title: z.string().optional(),
|
|
512
|
+
export const statusListLayoutItemSchema = z.object({
|
|
513
|
+
title: z.string(),
|
|
520
514
|
description: z.string().optional(),
|
|
515
|
+
icon: iconSchema,
|
|
516
|
+
status: statusListLayoutStatusSchema.optional(),
|
|
517
|
+
callToAction: itemCallToActionSchema.optional(),
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
export const listLayoutSchema = z.object({
|
|
521
|
+
type: z.literal('list'),
|
|
522
|
+
title: z.string().optional(),
|
|
523
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
524
|
+
items: z.array(listLayoutItemSchema),
|
|
521
525
|
control: z.string().optional(),
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
accepts: z.array(z.string()).optional(),
|
|
533
|
-
maxSize: z.number().optional(),
|
|
534
|
-
source: uploadSourceSchema.optional(),
|
|
535
|
-
disabled: z.boolean().optional(),
|
|
526
|
+
margin: sizeSchema.optional(),
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
export const alertLayoutSchema = z.object({
|
|
530
|
+
type: z.literal('alert'),
|
|
531
|
+
markdown: z.string(),
|
|
532
|
+
context: contextSchema.optional(),
|
|
533
|
+
control: z.string().optional(),
|
|
534
|
+
margin: sizeSchema.optional(),
|
|
535
|
+
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
536
536
|
});
|
|
537
537
|
|
|
538
538
|
export const constSchemaSchema = z.object({
|
|
@@ -552,12 +552,27 @@ export const constSchemaSchema = z.object({
|
|
|
552
552
|
disabled: z.boolean().optional(),
|
|
553
553
|
});
|
|
554
554
|
|
|
555
|
-
export const
|
|
556
|
-
|
|
555
|
+
export const blobSchemaSchema = z.object({
|
|
556
|
+
type: z.literal('blob'),
|
|
557
|
+
promoted: z.boolean().optional(),
|
|
558
|
+
$id: z.string().optional(),
|
|
559
|
+
title: z.string().optional(),
|
|
557
560
|
description: z.string().optional(),
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
+
control: z.string().optional(),
|
|
562
|
+
hidden: z.boolean().optional(),
|
|
563
|
+
icon: iconSchema.optional(),
|
|
564
|
+
image: imageSchema.optional(),
|
|
565
|
+
keywords: z.array(z.string()).optional(),
|
|
566
|
+
summary: summaryProviderSchema.optional(),
|
|
567
|
+
analyticsId: z.string().optional(),
|
|
568
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
569
|
+
validationMessages: z.record(z.string()).optional(),
|
|
570
|
+
alert: alertLayoutSchema.optional(),
|
|
571
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
572
|
+
accepts: z.array(z.string()).optional(),
|
|
573
|
+
maxSize: z.number().optional(),
|
|
574
|
+
source: uploadSourceSchema.optional(),
|
|
575
|
+
disabled: z.boolean().optional(),
|
|
561
576
|
});
|
|
562
577
|
|
|
563
578
|
export const statusListLayoutSchema = z.object({
|
|
@@ -568,10 +583,6 @@ export const statusListLayoutSchema = z.object({
|
|
|
568
583
|
margin: sizeSchema.optional(),
|
|
569
584
|
});
|
|
570
585
|
|
|
571
|
-
export const searchResponseBodySchema = z.object({
|
|
572
|
-
results: z.array(searchResultSchema),
|
|
573
|
-
});
|
|
574
|
-
|
|
575
586
|
export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
576
587
|
z.object({
|
|
577
588
|
key: z.string().optional(),
|
|
@@ -609,36 +620,84 @@ export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
|
|
|
609
620
|
]),
|
|
610
621
|
);
|
|
611
622
|
|
|
612
|
-
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
613
|
-
z.union([
|
|
614
|
-
alertLayoutSchema,
|
|
615
|
-
boxLayoutSchema,
|
|
616
|
-
buttonLayoutSchema,
|
|
617
|
-
columnsLayoutSchema,
|
|
618
|
-
decisionLayoutSchema,
|
|
619
|
-
dividerLayoutSchema,
|
|
620
|
-
formLayoutSchema,
|
|
621
|
-
headingLayoutSchema,
|
|
622
|
-
imageLayoutSchema,
|
|
623
|
-
infoLayoutSchema,
|
|
624
|
-
instructionsLayoutSchema,
|
|
625
|
-
listLayoutSchema,
|
|
626
|
-
loadingIndicatorLayoutSchema,
|
|
627
|
-
markdownLayoutSchema,
|
|
628
|
-
modalLayoutSchema,
|
|
629
|
-
paragraphLayoutSchema,
|
|
630
|
-
reviewLayoutSchema,
|
|
631
|
-
searchLayoutSchema,
|
|
632
|
-
statusListLayoutSchema,
|
|
633
|
-
]),
|
|
623
|
+
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
624
|
+
z.union([
|
|
625
|
+
alertLayoutSchema,
|
|
626
|
+
boxLayoutSchema,
|
|
627
|
+
buttonLayoutSchema,
|
|
628
|
+
columnsLayoutSchema,
|
|
629
|
+
decisionLayoutSchema,
|
|
630
|
+
dividerLayoutSchema,
|
|
631
|
+
formLayoutSchema,
|
|
632
|
+
headingLayoutSchema,
|
|
633
|
+
imageLayoutSchema,
|
|
634
|
+
infoLayoutSchema,
|
|
635
|
+
instructionsLayoutSchema,
|
|
636
|
+
listLayoutSchema,
|
|
637
|
+
loadingIndicatorLayoutSchema,
|
|
638
|
+
markdownLayoutSchema,
|
|
639
|
+
modalLayoutSchema,
|
|
640
|
+
paragraphLayoutSchema,
|
|
641
|
+
reviewLayoutSchema,
|
|
642
|
+
searchLayoutSchema,
|
|
643
|
+
statusListLayoutSchema,
|
|
644
|
+
]),
|
|
645
|
+
);
|
|
646
|
+
|
|
647
|
+
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
648
|
+
z.object({
|
|
649
|
+
title: z.string().optional(),
|
|
650
|
+
components: z.array(layoutSchema),
|
|
651
|
+
}),
|
|
652
|
+
);
|
|
653
|
+
|
|
654
|
+
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
655
|
+
z.object({
|
|
656
|
+
type: z.literal('modal'),
|
|
657
|
+
control: z.string().optional(),
|
|
658
|
+
margin: sizeSchema.optional(),
|
|
659
|
+
trigger: modalLayoutTriggerSchema,
|
|
660
|
+
content: modalLayoutContentSchema,
|
|
661
|
+
}),
|
|
662
|
+
);
|
|
663
|
+
|
|
664
|
+
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
665
|
+
z.object({
|
|
666
|
+
type: z.literal('box'),
|
|
667
|
+
components: z.array(layoutSchema),
|
|
668
|
+
width: sizeSchema.optional(),
|
|
669
|
+
border: z.boolean().optional(),
|
|
670
|
+
control: z.string().optional(),
|
|
671
|
+
margin: sizeSchema.optional(),
|
|
672
|
+
}),
|
|
673
|
+
);
|
|
674
|
+
|
|
675
|
+
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
676
|
+
z.object({
|
|
677
|
+
type: z.literal('columns'),
|
|
678
|
+
left: z.array(layoutSchema),
|
|
679
|
+
right: z.array(layoutSchema),
|
|
680
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
681
|
+
control: z.string().optional(),
|
|
682
|
+
margin: sizeSchema.optional(),
|
|
683
|
+
}),
|
|
684
|
+
);
|
|
685
|
+
|
|
686
|
+
export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
|
|
687
|
+
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
634
688
|
);
|
|
635
689
|
|
|
636
|
-
export const
|
|
690
|
+
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
637
691
|
z.object({
|
|
638
|
-
|
|
692
|
+
type: z.literal('array'),
|
|
639
693
|
promoted: z.boolean().optional(),
|
|
640
|
-
allOf: z.array(schemaSchema),
|
|
641
694
|
$id: z.string().optional(),
|
|
695
|
+
items: schemaSchema,
|
|
696
|
+
addItemTitle: z.string(),
|
|
697
|
+
editItemTitle: z.string(),
|
|
698
|
+
minItems: z.number().optional(),
|
|
699
|
+
maxItems: z.number().optional(),
|
|
700
|
+
placeholder: z.string().optional(),
|
|
642
701
|
title: z.string().optional(),
|
|
643
702
|
description: z.string().optional(),
|
|
644
703
|
control: z.string().optional(),
|
|
@@ -646,61 +705,90 @@ export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
|
646
705
|
icon: iconSchema.optional(),
|
|
647
706
|
image: imageSchema.optional(),
|
|
648
707
|
keywords: z.array(z.string()).optional(),
|
|
649
|
-
summary:
|
|
708
|
+
summary: summarySummariserSchema.optional(),
|
|
650
709
|
analyticsId: z.string().optional(),
|
|
710
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
711
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
651
712
|
alert: alertLayoutSchema.optional(),
|
|
713
|
+
validationMessages: z.record(z.string()).optional(),
|
|
714
|
+
disabled: z.boolean().optional(),
|
|
652
715
|
}),
|
|
653
716
|
);
|
|
654
717
|
|
|
655
|
-
export const
|
|
656
|
-
z.
|
|
718
|
+
export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
|
|
719
|
+
z.object({
|
|
720
|
+
type: z.literal('array'),
|
|
721
|
+
promoted: z.boolean().optional(),
|
|
722
|
+
$id: z.string().optional(),
|
|
723
|
+
items: z.array(schemaSchema),
|
|
724
|
+
title: z.string().optional(),
|
|
725
|
+
description: z.string().optional(),
|
|
726
|
+
control: z.string().optional(),
|
|
727
|
+
hidden: z.boolean().optional(),
|
|
728
|
+
icon: iconSchema.optional(),
|
|
729
|
+
image: imageSchema.optional(),
|
|
730
|
+
keywords: z.array(z.string()).optional(),
|
|
731
|
+
summary: summaryProviderSchema.optional(),
|
|
732
|
+
analyticsId: z.string().optional(),
|
|
733
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
734
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
735
|
+
alert: alertLayoutSchema.optional(),
|
|
736
|
+
}),
|
|
657
737
|
);
|
|
658
738
|
|
|
659
|
-
export const
|
|
739
|
+
export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
|
|
660
740
|
z.object({
|
|
661
|
-
type: z.literal('boolean'),
|
|
662
741
|
autofillProvider: z.string().optional(),
|
|
663
742
|
promoted: z.boolean().optional(),
|
|
664
743
|
refreshFormOnChange: z.boolean().optional(),
|
|
665
744
|
refreshUrl: z.string().optional(),
|
|
666
745
|
refreshFormUrl: z.string().optional(),
|
|
746
|
+
promotion: jsonElementSchema.optional(),
|
|
747
|
+
oneOf: z.array(schemaSchema),
|
|
748
|
+
placeholder: z.string().optional(),
|
|
667
749
|
$id: z.string().optional(),
|
|
668
750
|
title: z.string().optional(),
|
|
669
751
|
description: z.string().optional(),
|
|
670
752
|
control: z.string().optional(),
|
|
671
|
-
default:
|
|
753
|
+
default: jsonElementSchema.optional(),
|
|
672
754
|
hidden: z.boolean().optional(),
|
|
673
|
-
disabled: z.boolean().optional(),
|
|
674
755
|
icon: iconSchema.optional(),
|
|
675
756
|
image: imageSchema.optional(),
|
|
676
757
|
keywords: z.array(z.string()).optional(),
|
|
677
758
|
summary: summaryProviderSchema.optional(),
|
|
678
759
|
analyticsId: z.string().optional(),
|
|
679
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
680
760
|
refreshStepOnChange: z.boolean().optional(),
|
|
681
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
682
761
|
alert: alertLayoutSchema.optional(),
|
|
683
|
-
autofillKey: z.string().optional(),
|
|
684
762
|
help: helpSchema.optional(),
|
|
763
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
764
|
+
autofillKey: z.string().optional(),
|
|
765
|
+
validationMessages: z.record(z.string()).optional(),
|
|
766
|
+
disabled: z.boolean().optional(),
|
|
685
767
|
}),
|
|
686
768
|
);
|
|
687
769
|
|
|
688
|
-
export const
|
|
770
|
+
export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
689
771
|
z.object({
|
|
690
|
-
type: z.literal('
|
|
772
|
+
type: z.literal('string'),
|
|
691
773
|
autofillProvider: z.string().optional(),
|
|
692
774
|
promoted: z.boolean().optional(),
|
|
693
775
|
refreshFormOnChange: z.boolean().optional(),
|
|
694
776
|
refreshUrl: z.string().optional(),
|
|
695
777
|
refreshFormUrl: z.string().optional(),
|
|
778
|
+
format: stringSchemaFormatSchema.optional(),
|
|
779
|
+
displayFormat: z.string().optional(),
|
|
696
780
|
placeholder: z.string().optional(),
|
|
697
|
-
|
|
698
|
-
|
|
781
|
+
minLength: z.number().optional(),
|
|
782
|
+
maxLength: z.number().optional(),
|
|
783
|
+
minimum: z.string().optional(),
|
|
784
|
+
maximum: z.string().optional(),
|
|
785
|
+
pattern: z.string().optional(),
|
|
786
|
+
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
699
787
|
$id: z.string().optional(),
|
|
700
788
|
title: z.string().optional(),
|
|
701
789
|
description: z.string().optional(),
|
|
702
790
|
control: z.string().optional(),
|
|
703
|
-
default: z.
|
|
791
|
+
default: z.string().optional(),
|
|
704
792
|
hidden: z.boolean().optional(),
|
|
705
793
|
disabled: z.boolean().optional(),
|
|
706
794
|
icon: iconSchema.optional(),
|
|
@@ -713,12 +801,26 @@ export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
|
713
801
|
validationAsync: validateAsyncSchema.optional(),
|
|
714
802
|
validationMessages: z.record(z.string()).optional(),
|
|
715
803
|
alert: alertLayoutSchema.optional(),
|
|
804
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
805
|
+
accepts: z.array(z.string()).optional(),
|
|
806
|
+
maxSize: z.number().optional(),
|
|
807
|
+
source: uploadSourceSchema.optional(),
|
|
716
808
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
717
809
|
autofillKey: z.string().optional(),
|
|
718
810
|
help: helpSchema.optional(),
|
|
719
811
|
}),
|
|
720
812
|
);
|
|
721
813
|
|
|
814
|
+
export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
|
|
815
|
+
z.object({
|
|
816
|
+
param: z.string(),
|
|
817
|
+
idProperty: z.string(),
|
|
818
|
+
schema: schemaSchema,
|
|
819
|
+
url: z.string(),
|
|
820
|
+
method: httpMethodSchema,
|
|
821
|
+
}),
|
|
822
|
+
);
|
|
823
|
+
|
|
722
824
|
export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
723
825
|
z.object({
|
|
724
826
|
type: z.literal('number'),
|
|
@@ -753,15 +855,11 @@ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
|
753
855
|
}),
|
|
754
856
|
);
|
|
755
857
|
|
|
756
|
-
export const
|
|
858
|
+
export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
757
859
|
z.object({
|
|
758
|
-
type: z.literal('object'),
|
|
759
860
|
disabled: z.boolean().optional(),
|
|
760
861
|
promoted: z.boolean().optional(),
|
|
761
|
-
|
|
762
|
-
properties: z.record(schemaSchema),
|
|
763
|
-
displayOrder: z.array(z.string()),
|
|
764
|
-
required: z.array(z.string()).optional(),
|
|
862
|
+
allOf: z.array(schemaSchema),
|
|
765
863
|
$id: z.string().optional(),
|
|
766
864
|
title: z.string().optional(),
|
|
767
865
|
description: z.string().optional(),
|
|
@@ -776,59 +874,42 @@ export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
|
776
874
|
}),
|
|
777
875
|
);
|
|
778
876
|
|
|
779
|
-
export const
|
|
877
|
+
export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
780
878
|
z.object({
|
|
781
|
-
|
|
879
|
+
type: z.literal('object'),
|
|
880
|
+
disabled: z.boolean().optional(),
|
|
782
881
|
promoted: z.boolean().optional(),
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
oneOf: z.array(schemaSchema),
|
|
788
|
-
placeholder: z.string().optional(),
|
|
882
|
+
help: helpSchema.optional(),
|
|
883
|
+
properties: z.record(schemaSchema),
|
|
884
|
+
displayOrder: z.array(z.string()),
|
|
885
|
+
required: z.array(z.string()).optional(),
|
|
789
886
|
$id: z.string().optional(),
|
|
790
887
|
title: z.string().optional(),
|
|
791
888
|
description: z.string().optional(),
|
|
792
889
|
control: z.string().optional(),
|
|
793
|
-
default: jsonElementSchema.optional(),
|
|
794
890
|
hidden: z.boolean().optional(),
|
|
795
891
|
icon: iconSchema.optional(),
|
|
796
892
|
image: imageSchema.optional(),
|
|
797
893
|
keywords: z.array(z.string()).optional(),
|
|
798
894
|
summary: summaryProviderSchema.optional(),
|
|
799
895
|
analyticsId: z.string().optional(),
|
|
800
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
801
896
|
alert: alertLayoutSchema.optional(),
|
|
802
|
-
help: helpSchema.optional(),
|
|
803
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
804
|
-
autofillKey: z.string().optional(),
|
|
805
|
-
validationMessages: z.record(z.string()).optional(),
|
|
806
|
-
disabled: z.boolean().optional(),
|
|
807
897
|
}),
|
|
808
898
|
);
|
|
809
899
|
|
|
810
|
-
export const
|
|
900
|
+
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
811
901
|
z.object({
|
|
812
|
-
type: z.literal('
|
|
902
|
+
type: z.literal('boolean'),
|
|
813
903
|
autofillProvider: z.string().optional(),
|
|
814
904
|
promoted: z.boolean().optional(),
|
|
815
905
|
refreshFormOnChange: z.boolean().optional(),
|
|
816
906
|
refreshUrl: z.string().optional(),
|
|
817
907
|
refreshFormUrl: z.string().optional(),
|
|
818
|
-
format: stringSchemaFormatSchema.optional(),
|
|
819
|
-
displayFormat: z.string().optional(),
|
|
820
|
-
placeholder: z.string().optional(),
|
|
821
|
-
minLength: z.number().optional(),
|
|
822
|
-
maxLength: z.number().optional(),
|
|
823
|
-
minimum: z.string().optional(),
|
|
824
|
-
maximum: z.string().optional(),
|
|
825
|
-
pattern: z.string().optional(),
|
|
826
|
-
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
827
908
|
$id: z.string().optional(),
|
|
828
909
|
title: z.string().optional(),
|
|
829
910
|
description: z.string().optional(),
|
|
830
911
|
control: z.string().optional(),
|
|
831
|
-
default: z.
|
|
912
|
+
default: z.boolean().optional(),
|
|
832
913
|
hidden: z.boolean().optional(),
|
|
833
914
|
disabled: z.boolean().optional(),
|
|
834
915
|
icon: iconSchema.optional(),
|
|
@@ -839,112 +920,42 @@ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
|
839
920
|
persistAsync: persistAsyncSchema.optional(),
|
|
840
921
|
refreshStepOnChange: z.boolean().optional(),
|
|
841
922
|
validationAsync: validateAsyncSchema.optional(),
|
|
842
|
-
validationMessages: z.record(z.string()).optional(),
|
|
843
923
|
alert: alertLayoutSchema.optional(),
|
|
844
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
845
|
-
accepts: z.array(z.string()).optional(),
|
|
846
|
-
maxSize: z.number().optional(),
|
|
847
|
-
source: uploadSourceSchema.optional(),
|
|
848
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
849
924
|
autofillKey: z.string().optional(),
|
|
850
925
|
help: helpSchema.optional(),
|
|
851
926
|
}),
|
|
852
927
|
);
|
|
853
928
|
|
|
854
|
-
export const
|
|
855
|
-
z.object({
|
|
856
|
-
param: z.string(),
|
|
857
|
-
idProperty: z.string(),
|
|
858
|
-
schema: schemaSchema,
|
|
859
|
-
url: z.string(),
|
|
860
|
-
method: httpMethodSchema,
|
|
861
|
-
}),
|
|
862
|
-
);
|
|
863
|
-
|
|
864
|
-
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
929
|
+
export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
865
930
|
z.object({
|
|
866
|
-
type: z.literal('
|
|
931
|
+
type: z.literal('integer'),
|
|
932
|
+
autofillProvider: z.string().optional(),
|
|
867
933
|
promoted: z.boolean().optional(),
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
editItemTitle: z.string(),
|
|
872
|
-
minItems: z.number().optional(),
|
|
873
|
-
maxItems: z.number().optional(),
|
|
934
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
935
|
+
refreshUrl: z.string().optional(),
|
|
936
|
+
refreshFormUrl: z.string().optional(),
|
|
874
937
|
placeholder: z.string().optional(),
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
control: z.string().optional(),
|
|
878
|
-
hidden: z.boolean().optional(),
|
|
879
|
-
icon: iconSchema.optional(),
|
|
880
|
-
image: imageSchema.optional(),
|
|
881
|
-
keywords: z.array(z.string()).optional(),
|
|
882
|
-
summary: summarySummariserSchema.optional(),
|
|
883
|
-
analyticsId: z.string().optional(),
|
|
884
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
885
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
886
|
-
alert: alertLayoutSchema.optional(),
|
|
887
|
-
validationMessages: z.record(z.string()).optional(),
|
|
888
|
-
disabled: z.boolean().optional(),
|
|
889
|
-
}),
|
|
890
|
-
);
|
|
891
|
-
|
|
892
|
-
export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
|
|
893
|
-
z.object({
|
|
894
|
-
type: z.literal('array'),
|
|
895
|
-
promoted: z.boolean().optional(),
|
|
938
|
+
minimum: z.number().optional(),
|
|
939
|
+
maximum: z.number().optional(),
|
|
896
940
|
$id: z.string().optional(),
|
|
897
|
-
items: z.array(schemaSchema),
|
|
898
941
|
title: z.string().optional(),
|
|
899
942
|
description: z.string().optional(),
|
|
900
943
|
control: z.string().optional(),
|
|
944
|
+
default: z.number().optional(),
|
|
901
945
|
hidden: z.boolean().optional(),
|
|
946
|
+
disabled: z.boolean().optional(),
|
|
902
947
|
icon: iconSchema.optional(),
|
|
903
948
|
image: imageSchema.optional(),
|
|
904
949
|
keywords: z.array(z.string()).optional(),
|
|
905
950
|
summary: summaryProviderSchema.optional(),
|
|
906
951
|
analyticsId: z.string().optional(),
|
|
907
952
|
persistAsync: persistAsyncSchema.optional(),
|
|
953
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
908
954
|
validationAsync: validateAsyncSchema.optional(),
|
|
955
|
+
validationMessages: z.record(z.string()).optional(),
|
|
909
956
|
alert: alertLayoutSchema.optional(),
|
|
910
|
-
|
|
911
|
-
)
|
|
912
|
-
|
|
913
|
-
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
914
|
-
z.object({
|
|
915
|
-
type: z.literal('modal'),
|
|
916
|
-
control: z.string().optional(),
|
|
917
|
-
margin: sizeSchema.optional(),
|
|
918
|
-
trigger: modalLayoutTriggerSchema,
|
|
919
|
-
content: modalLayoutContentSchema,
|
|
920
|
-
}),
|
|
921
|
-
);
|
|
922
|
-
|
|
923
|
-
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
924
|
-
z.object({
|
|
925
|
-
title: z.string().optional(),
|
|
926
|
-
components: z.array(layoutSchema),
|
|
927
|
-
}),
|
|
928
|
-
);
|
|
929
|
-
|
|
930
|
-
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
931
|
-
z.object({
|
|
932
|
-
type: z.literal('columns'),
|
|
933
|
-
left: z.array(layoutSchema),
|
|
934
|
-
right: z.array(layoutSchema),
|
|
935
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
936
|
-
control: z.string().optional(),
|
|
937
|
-
margin: sizeSchema.optional(),
|
|
938
|
-
}),
|
|
939
|
-
);
|
|
940
|
-
|
|
941
|
-
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
942
|
-
z.object({
|
|
943
|
-
type: z.literal('box'),
|
|
944
|
-
components: z.array(layoutSchema),
|
|
945
|
-
width: sizeSchema.optional(),
|
|
946
|
-
border: z.boolean().optional(),
|
|
947
|
-
control: z.string().optional(),
|
|
948
|
-
margin: sizeSchema.optional(),
|
|
957
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
958
|
+
autofillKey: z.string().optional(),
|
|
959
|
+
help: helpSchema.optional(),
|
|
949
960
|
}),
|
|
950
961
|
);
|