@wise/dynamic-flow-types 2.30.0 → 2.31.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
CHANGED
|
@@ -35,13 +35,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
35
35
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
36
|
|
|
37
37
|
// src/index.ts
|
|
38
|
-
var
|
|
39
|
-
__export(
|
|
38
|
+
var index_exports = {};
|
|
39
|
+
__export(index_exports, {
|
|
40
40
|
validateActionResponse: () => validateActionResponse,
|
|
41
41
|
validateErrorResponse: () => validateErrorResponse,
|
|
42
42
|
validateStep: () => validateStep
|
|
43
43
|
});
|
|
44
|
-
module.exports = __toCommonJS(
|
|
44
|
+
module.exports = __toCommonJS(index_exports);
|
|
45
45
|
|
|
46
46
|
// ../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.mjs
|
|
47
47
|
var util;
|
|
@@ -114,10 +114,12 @@ export type StringSchema = {
|
|
|
114
114
|
disabled?: boolean;
|
|
115
115
|
/**
|
|
116
116
|
* An icon which the client can use to represent this schema.
|
|
117
|
+
* Icons can be shown inside text input fields.
|
|
117
118
|
*/
|
|
118
119
|
icon?: Icon;
|
|
119
120
|
/**
|
|
120
121
|
* An image which the client can use to represent this schema.
|
|
122
|
+
* Images can be shown inside text input fields.
|
|
121
123
|
*/
|
|
122
124
|
image?: Image;
|
|
123
125
|
/**
|
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,49 +380,6 @@ 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
384
|
title: z.string(),
|
|
394
385
|
description: z.string().optional(),
|
|
@@ -396,14 +387,6 @@ export const listLayoutItemSchema = z.object({
|
|
|
396
387
|
status: listLayoutStatusSchema.optional(),
|
|
397
388
|
});
|
|
398
389
|
|
|
399
|
-
export const listLayoutSchema = z.object({
|
|
400
|
-
type: z.literal('list'),
|
|
401
|
-
items: z.array(listLayoutItemSchema),
|
|
402
|
-
title: z.string().optional(),
|
|
403
|
-
control: z.string().optional(),
|
|
404
|
-
margin: sizeSchema.optional(),
|
|
405
|
-
});
|
|
406
|
-
|
|
407
390
|
export const decisionLayoutOptionSchema = z.object({
|
|
408
391
|
action: actionSchema,
|
|
409
392
|
title: z.string(),
|
|
@@ -413,11 +396,31 @@ export const decisionLayoutOptionSchema = z.object({
|
|
|
413
396
|
image: imageLayoutSchema.optional(),
|
|
414
397
|
});
|
|
415
398
|
|
|
399
|
+
export const behaviorSchema = z.object({
|
|
400
|
+
action: actionSchema.optional(),
|
|
401
|
+
link: linkSchema.optional(),
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
export const reviewLayoutFieldSchema = z.object({
|
|
405
|
+
label: z.string(),
|
|
406
|
+
value: z.string(),
|
|
407
|
+
rawValue: z.string().optional(),
|
|
408
|
+
help: helpSchema.optional(),
|
|
409
|
+
});
|
|
410
|
+
|
|
416
411
|
export const reviewLayoutCallToActionSchema = z.object({
|
|
417
412
|
title: z.string(),
|
|
418
413
|
action: actionSchema,
|
|
419
414
|
});
|
|
420
415
|
|
|
416
|
+
export const decisionLayoutSchema = z.object({
|
|
417
|
+
type: z.literal('decision'),
|
|
418
|
+
title: z.string().optional(),
|
|
419
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
420
|
+
control: z.string().optional(),
|
|
421
|
+
margin: sizeSchema.optional(),
|
|
422
|
+
});
|
|
423
|
+
|
|
421
424
|
export const buttonLayoutSchema = z.object({
|
|
422
425
|
type: z.literal('button'),
|
|
423
426
|
size: sizeSchema.optional(),
|
|
@@ -430,15 +433,19 @@ export const buttonLayoutSchema = z.object({
|
|
|
430
433
|
margin: sizeSchema.optional(),
|
|
431
434
|
});
|
|
432
435
|
|
|
433
|
-
export const
|
|
434
|
-
|
|
435
|
-
|
|
436
|
+
export const searchResultActionSchema = z.object({
|
|
437
|
+
type: z.literal('action'),
|
|
438
|
+
title: z.string(),
|
|
439
|
+
description: z.string().optional(),
|
|
440
|
+
icon: iconSchema.optional(),
|
|
441
|
+
image: imageLayoutSchema.optional(),
|
|
442
|
+
value: actionSchema,
|
|
436
443
|
});
|
|
437
444
|
|
|
438
|
-
export const
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
445
|
+
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
446
|
+
|
|
447
|
+
export const actionResponseBodySchema = z.object({
|
|
448
|
+
action: actionSchema,
|
|
442
449
|
});
|
|
443
450
|
|
|
444
451
|
export const pollingOnErrorSchema = z.object({
|
|
@@ -450,8 +457,6 @@ export const navigationBackBehaviorSchema = z.object({
|
|
|
450
457
|
action: actionSchema,
|
|
451
458
|
});
|
|
452
459
|
|
|
453
|
-
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
454
|
-
|
|
455
460
|
export const pollingSchema = z.object({
|
|
456
461
|
url: z.string(),
|
|
457
462
|
interval: z.number().optional(),
|
|
@@ -467,36 +472,24 @@ export const navigationSchema = z.object({
|
|
|
467
472
|
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
468
473
|
});
|
|
469
474
|
|
|
470
|
-
export const
|
|
471
|
-
type: z.literal('
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
icon: iconSchema.optional(),
|
|
475
|
-
image: imageLayoutSchema.optional(),
|
|
476
|
-
value: searchSearchRequestSchema,
|
|
477
|
-
});
|
|
478
|
-
|
|
479
|
-
export const alertLayoutSchema = z.object({
|
|
480
|
-
type: z.literal('alert'),
|
|
481
|
-
markdown: z.string(),
|
|
482
|
-
context: contextSchema.optional(),
|
|
475
|
+
export const listLayoutSchema = z.object({
|
|
476
|
+
type: z.literal('list'),
|
|
477
|
+
items: z.array(listLayoutItemSchema),
|
|
478
|
+
title: z.string().optional(),
|
|
483
479
|
control: z.string().optional(),
|
|
484
480
|
margin: sizeSchema.optional(),
|
|
485
|
-
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
486
481
|
});
|
|
487
482
|
|
|
488
|
-
export const
|
|
483
|
+
export const alertLayoutCallToActionSchema = z.object({
|
|
489
484
|
title: z.string(),
|
|
490
485
|
accessibilityDescription: z.string().optional(),
|
|
491
486
|
behavior: behaviorSchema,
|
|
492
487
|
});
|
|
493
488
|
|
|
494
|
-
export const
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
control: z.string().optional(),
|
|
499
|
-
margin: sizeSchema.optional(),
|
|
489
|
+
export const itemCallToActionSchema = z.object({
|
|
490
|
+
title: z.string(),
|
|
491
|
+
accessibilityDescription: z.string().optional(),
|
|
492
|
+
behavior: behaviorSchema,
|
|
500
493
|
});
|
|
501
494
|
|
|
502
495
|
export const reviewLayoutSchema = z.object({
|
|
@@ -510,29 +503,25 @@ export const reviewLayoutSchema = z.object({
|
|
|
510
503
|
margin: sizeSchema.optional(),
|
|
511
504
|
});
|
|
512
505
|
|
|
513
|
-
export const
|
|
506
|
+
export const searchResponseBodySchema = z.object({
|
|
507
|
+
results: z.array(searchResultSchema),
|
|
508
|
+
});
|
|
514
509
|
|
|
515
|
-
export const
|
|
516
|
-
|
|
517
|
-
promoted: z.boolean().optional(),
|
|
518
|
-
$id: z.string().optional(),
|
|
519
|
-
title: z.string().optional(),
|
|
510
|
+
export const statusListLayoutItemSchema = z.object({
|
|
511
|
+
title: z.string(),
|
|
520
512
|
description: z.string().optional(),
|
|
513
|
+
icon: iconSchema,
|
|
514
|
+
status: statusListLayoutStatusSchema.optional(),
|
|
515
|
+
callToAction: itemCallToActionSchema.optional(),
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
export const alertLayoutSchema = z.object({
|
|
519
|
+
type: z.literal('alert'),
|
|
520
|
+
markdown: z.string(),
|
|
521
|
+
context: contextSchema.optional(),
|
|
521
522
|
control: z.string().optional(),
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
image: imageSchema.optional(),
|
|
525
|
-
keywords: z.array(z.string()).optional(),
|
|
526
|
-
summary: summaryProviderSchema.optional(),
|
|
527
|
-
analyticsId: z.string().optional(),
|
|
528
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
529
|
-
validationMessages: z.record(z.string()).optional(),
|
|
530
|
-
alert: alertLayoutSchema.optional(),
|
|
531
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
532
|
-
accepts: z.array(z.string()).optional(),
|
|
533
|
-
maxSize: z.number().optional(),
|
|
534
|
-
source: uploadSourceSchema.optional(),
|
|
535
|
-
disabled: z.boolean().optional(),
|
|
523
|
+
margin: sizeSchema.optional(),
|
|
524
|
+
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
536
525
|
});
|
|
537
526
|
|
|
538
527
|
export const constSchemaSchema = z.object({
|
|
@@ -552,12 +541,27 @@ export const constSchemaSchema = z.object({
|
|
|
552
541
|
disabled: z.boolean().optional(),
|
|
553
542
|
});
|
|
554
543
|
|
|
555
|
-
export const
|
|
556
|
-
|
|
544
|
+
export const blobSchemaSchema = z.object({
|
|
545
|
+
type: z.literal('blob'),
|
|
546
|
+
promoted: z.boolean().optional(),
|
|
547
|
+
$id: z.string().optional(),
|
|
548
|
+
title: z.string().optional(),
|
|
557
549
|
description: z.string().optional(),
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
550
|
+
control: z.string().optional(),
|
|
551
|
+
hidden: z.boolean().optional(),
|
|
552
|
+
icon: iconSchema.optional(),
|
|
553
|
+
image: imageSchema.optional(),
|
|
554
|
+
keywords: z.array(z.string()).optional(),
|
|
555
|
+
summary: summaryProviderSchema.optional(),
|
|
556
|
+
analyticsId: z.string().optional(),
|
|
557
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
558
|
+
validationMessages: z.record(z.string()).optional(),
|
|
559
|
+
alert: alertLayoutSchema.optional(),
|
|
560
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
561
|
+
accepts: z.array(z.string()).optional(),
|
|
562
|
+
maxSize: z.number().optional(),
|
|
563
|
+
source: uploadSourceSchema.optional(),
|
|
564
|
+
disabled: z.boolean().optional(),
|
|
561
565
|
});
|
|
562
566
|
|
|
563
567
|
export const statusListLayoutSchema = z.object({
|
|
@@ -568,10 +572,6 @@ export const statusListLayoutSchema = z.object({
|
|
|
568
572
|
margin: sizeSchema.optional(),
|
|
569
573
|
});
|
|
570
574
|
|
|
571
|
-
export const searchResponseBodySchema = z.object({
|
|
572
|
-
results: z.array(searchResultSchema),
|
|
573
|
-
});
|
|
574
|
-
|
|
575
575
|
export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
576
576
|
z.object({
|
|
577
577
|
key: z.string().optional(),
|
|
@@ -609,36 +609,84 @@ export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
|
|
|
609
609
|
]),
|
|
610
610
|
);
|
|
611
611
|
|
|
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
|
-
]),
|
|
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
|
+
]),
|
|
634
|
+
);
|
|
635
|
+
|
|
636
|
+
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
637
|
+
z.object({
|
|
638
|
+
title: z.string().optional(),
|
|
639
|
+
components: z.array(layoutSchema),
|
|
640
|
+
}),
|
|
641
|
+
);
|
|
642
|
+
|
|
643
|
+
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
644
|
+
z.object({
|
|
645
|
+
type: z.literal('modal'),
|
|
646
|
+
control: z.string().optional(),
|
|
647
|
+
margin: sizeSchema.optional(),
|
|
648
|
+
trigger: modalLayoutTriggerSchema,
|
|
649
|
+
content: modalLayoutContentSchema,
|
|
650
|
+
}),
|
|
651
|
+
);
|
|
652
|
+
|
|
653
|
+
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
654
|
+
z.object({
|
|
655
|
+
type: z.literal('box'),
|
|
656
|
+
components: z.array(layoutSchema),
|
|
657
|
+
width: sizeSchema.optional(),
|
|
658
|
+
border: z.boolean().optional(),
|
|
659
|
+
control: z.string().optional(),
|
|
660
|
+
margin: sizeSchema.optional(),
|
|
661
|
+
}),
|
|
662
|
+
);
|
|
663
|
+
|
|
664
|
+
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
665
|
+
z.object({
|
|
666
|
+
type: z.literal('columns'),
|
|
667
|
+
left: z.array(layoutSchema),
|
|
668
|
+
right: z.array(layoutSchema),
|
|
669
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
670
|
+
control: z.string().optional(),
|
|
671
|
+
margin: sizeSchema.optional(),
|
|
672
|
+
}),
|
|
673
|
+
);
|
|
674
|
+
|
|
675
|
+
export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
|
|
676
|
+
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
634
677
|
);
|
|
635
678
|
|
|
636
|
-
export const
|
|
679
|
+
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
637
680
|
z.object({
|
|
638
|
-
|
|
681
|
+
type: z.literal('array'),
|
|
639
682
|
promoted: z.boolean().optional(),
|
|
640
|
-
allOf: z.array(schemaSchema),
|
|
641
683
|
$id: z.string().optional(),
|
|
684
|
+
items: schemaSchema,
|
|
685
|
+
addItemTitle: z.string(),
|
|
686
|
+
editItemTitle: z.string(),
|
|
687
|
+
minItems: z.number().optional(),
|
|
688
|
+
maxItems: z.number().optional(),
|
|
689
|
+
placeholder: z.string().optional(),
|
|
642
690
|
title: z.string().optional(),
|
|
643
691
|
description: z.string().optional(),
|
|
644
692
|
control: z.string().optional(),
|
|
@@ -646,61 +694,90 @@ export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
|
646
694
|
icon: iconSchema.optional(),
|
|
647
695
|
image: imageSchema.optional(),
|
|
648
696
|
keywords: z.array(z.string()).optional(),
|
|
649
|
-
summary:
|
|
697
|
+
summary: summarySummariserSchema.optional(),
|
|
650
698
|
analyticsId: z.string().optional(),
|
|
699
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
700
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
651
701
|
alert: alertLayoutSchema.optional(),
|
|
702
|
+
validationMessages: z.record(z.string()).optional(),
|
|
703
|
+
disabled: z.boolean().optional(),
|
|
652
704
|
}),
|
|
653
705
|
);
|
|
654
706
|
|
|
655
|
-
export const
|
|
656
|
-
z.
|
|
707
|
+
export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
|
|
708
|
+
z.object({
|
|
709
|
+
type: z.literal('array'),
|
|
710
|
+
promoted: z.boolean().optional(),
|
|
711
|
+
$id: z.string().optional(),
|
|
712
|
+
items: z.array(schemaSchema),
|
|
713
|
+
title: z.string().optional(),
|
|
714
|
+
description: z.string().optional(),
|
|
715
|
+
control: z.string().optional(),
|
|
716
|
+
hidden: z.boolean().optional(),
|
|
717
|
+
icon: iconSchema.optional(),
|
|
718
|
+
image: imageSchema.optional(),
|
|
719
|
+
keywords: z.array(z.string()).optional(),
|
|
720
|
+
summary: summaryProviderSchema.optional(),
|
|
721
|
+
analyticsId: z.string().optional(),
|
|
722
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
723
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
724
|
+
alert: alertLayoutSchema.optional(),
|
|
725
|
+
}),
|
|
657
726
|
);
|
|
658
727
|
|
|
659
|
-
export const
|
|
728
|
+
export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
|
|
660
729
|
z.object({
|
|
661
|
-
type: z.literal('boolean'),
|
|
662
730
|
autofillProvider: z.string().optional(),
|
|
663
731
|
promoted: z.boolean().optional(),
|
|
664
732
|
refreshFormOnChange: z.boolean().optional(),
|
|
665
733
|
refreshUrl: z.string().optional(),
|
|
666
734
|
refreshFormUrl: z.string().optional(),
|
|
735
|
+
promotion: jsonElementSchema.optional(),
|
|
736
|
+
oneOf: z.array(schemaSchema),
|
|
737
|
+
placeholder: z.string().optional(),
|
|
667
738
|
$id: z.string().optional(),
|
|
668
739
|
title: z.string().optional(),
|
|
669
740
|
description: z.string().optional(),
|
|
670
741
|
control: z.string().optional(),
|
|
671
|
-
default:
|
|
742
|
+
default: jsonElementSchema.optional(),
|
|
672
743
|
hidden: z.boolean().optional(),
|
|
673
|
-
disabled: z.boolean().optional(),
|
|
674
744
|
icon: iconSchema.optional(),
|
|
675
745
|
image: imageSchema.optional(),
|
|
676
746
|
keywords: z.array(z.string()).optional(),
|
|
677
747
|
summary: summaryProviderSchema.optional(),
|
|
678
748
|
analyticsId: z.string().optional(),
|
|
679
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
680
749
|
refreshStepOnChange: z.boolean().optional(),
|
|
681
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
682
750
|
alert: alertLayoutSchema.optional(),
|
|
683
|
-
autofillKey: z.string().optional(),
|
|
684
751
|
help: helpSchema.optional(),
|
|
752
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
753
|
+
autofillKey: z.string().optional(),
|
|
754
|
+
validationMessages: z.record(z.string()).optional(),
|
|
755
|
+
disabled: z.boolean().optional(),
|
|
685
756
|
}),
|
|
686
757
|
);
|
|
687
758
|
|
|
688
|
-
export const
|
|
759
|
+
export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
689
760
|
z.object({
|
|
690
|
-
type: z.literal('
|
|
761
|
+
type: z.literal('string'),
|
|
691
762
|
autofillProvider: z.string().optional(),
|
|
692
763
|
promoted: z.boolean().optional(),
|
|
693
764
|
refreshFormOnChange: z.boolean().optional(),
|
|
694
765
|
refreshUrl: z.string().optional(),
|
|
695
766
|
refreshFormUrl: z.string().optional(),
|
|
767
|
+
format: stringSchemaFormatSchema.optional(),
|
|
768
|
+
displayFormat: z.string().optional(),
|
|
696
769
|
placeholder: z.string().optional(),
|
|
697
|
-
|
|
698
|
-
|
|
770
|
+
minLength: z.number().optional(),
|
|
771
|
+
maxLength: z.number().optional(),
|
|
772
|
+
minimum: z.string().optional(),
|
|
773
|
+
maximum: z.string().optional(),
|
|
774
|
+
pattern: z.string().optional(),
|
|
775
|
+
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
699
776
|
$id: z.string().optional(),
|
|
700
777
|
title: z.string().optional(),
|
|
701
778
|
description: z.string().optional(),
|
|
702
779
|
control: z.string().optional(),
|
|
703
|
-
default: z.
|
|
780
|
+
default: z.string().optional(),
|
|
704
781
|
hidden: z.boolean().optional(),
|
|
705
782
|
disabled: z.boolean().optional(),
|
|
706
783
|
icon: iconSchema.optional(),
|
|
@@ -713,12 +790,26 @@ export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
|
713
790
|
validationAsync: validateAsyncSchema.optional(),
|
|
714
791
|
validationMessages: z.record(z.string()).optional(),
|
|
715
792
|
alert: alertLayoutSchema.optional(),
|
|
793
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
794
|
+
accepts: z.array(z.string()).optional(),
|
|
795
|
+
maxSize: z.number().optional(),
|
|
796
|
+
source: uploadSourceSchema.optional(),
|
|
716
797
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
717
798
|
autofillKey: z.string().optional(),
|
|
718
799
|
help: helpSchema.optional(),
|
|
719
800
|
}),
|
|
720
801
|
);
|
|
721
802
|
|
|
803
|
+
export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
|
|
804
|
+
z.object({
|
|
805
|
+
param: z.string(),
|
|
806
|
+
idProperty: z.string(),
|
|
807
|
+
schema: schemaSchema,
|
|
808
|
+
url: z.string(),
|
|
809
|
+
method: httpMethodSchema,
|
|
810
|
+
}),
|
|
811
|
+
);
|
|
812
|
+
|
|
722
813
|
export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
723
814
|
z.object({
|
|
724
815
|
type: z.literal('number'),
|
|
@@ -753,15 +844,11 @@ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
|
753
844
|
}),
|
|
754
845
|
);
|
|
755
846
|
|
|
756
|
-
export const
|
|
847
|
+
export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
757
848
|
z.object({
|
|
758
|
-
type: z.literal('object'),
|
|
759
849
|
disabled: z.boolean().optional(),
|
|
760
850
|
promoted: z.boolean().optional(),
|
|
761
|
-
|
|
762
|
-
properties: z.record(schemaSchema),
|
|
763
|
-
displayOrder: z.array(z.string()),
|
|
764
|
-
required: z.array(z.string()).optional(),
|
|
851
|
+
allOf: z.array(schemaSchema),
|
|
765
852
|
$id: z.string().optional(),
|
|
766
853
|
title: z.string().optional(),
|
|
767
854
|
description: z.string().optional(),
|
|
@@ -776,59 +863,42 @@ export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
|
776
863
|
}),
|
|
777
864
|
);
|
|
778
865
|
|
|
779
|
-
export const
|
|
866
|
+
export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
780
867
|
z.object({
|
|
781
|
-
|
|
868
|
+
type: z.literal('object'),
|
|
869
|
+
disabled: z.boolean().optional(),
|
|
782
870
|
promoted: z.boolean().optional(),
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
oneOf: z.array(schemaSchema),
|
|
788
|
-
placeholder: z.string().optional(),
|
|
871
|
+
help: helpSchema.optional(),
|
|
872
|
+
properties: z.record(schemaSchema),
|
|
873
|
+
displayOrder: z.array(z.string()),
|
|
874
|
+
required: z.array(z.string()).optional(),
|
|
789
875
|
$id: z.string().optional(),
|
|
790
876
|
title: z.string().optional(),
|
|
791
877
|
description: z.string().optional(),
|
|
792
878
|
control: z.string().optional(),
|
|
793
|
-
default: jsonElementSchema.optional(),
|
|
794
879
|
hidden: z.boolean().optional(),
|
|
795
880
|
icon: iconSchema.optional(),
|
|
796
881
|
image: imageSchema.optional(),
|
|
797
882
|
keywords: z.array(z.string()).optional(),
|
|
798
883
|
summary: summaryProviderSchema.optional(),
|
|
799
884
|
analyticsId: z.string().optional(),
|
|
800
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
801
885
|
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
886
|
}),
|
|
808
887
|
);
|
|
809
888
|
|
|
810
|
-
export const
|
|
889
|
+
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
811
890
|
z.object({
|
|
812
|
-
type: z.literal('
|
|
891
|
+
type: z.literal('boolean'),
|
|
813
892
|
autofillProvider: z.string().optional(),
|
|
814
893
|
promoted: z.boolean().optional(),
|
|
815
894
|
refreshFormOnChange: z.boolean().optional(),
|
|
816
895
|
refreshUrl: z.string().optional(),
|
|
817
896
|
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
897
|
$id: z.string().optional(),
|
|
828
898
|
title: z.string().optional(),
|
|
829
899
|
description: z.string().optional(),
|
|
830
900
|
control: z.string().optional(),
|
|
831
|
-
default: z.
|
|
901
|
+
default: z.boolean().optional(),
|
|
832
902
|
hidden: z.boolean().optional(),
|
|
833
903
|
disabled: z.boolean().optional(),
|
|
834
904
|
icon: iconSchema.optional(),
|
|
@@ -839,112 +909,42 @@ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
|
839
909
|
persistAsync: persistAsyncSchema.optional(),
|
|
840
910
|
refreshStepOnChange: z.boolean().optional(),
|
|
841
911
|
validationAsync: validateAsyncSchema.optional(),
|
|
842
|
-
validationMessages: z.record(z.string()).optional(),
|
|
843
912
|
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
913
|
autofillKey: z.string().optional(),
|
|
850
914
|
help: helpSchema.optional(),
|
|
851
915
|
}),
|
|
852
916
|
);
|
|
853
917
|
|
|
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(() =>
|
|
918
|
+
export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
865
919
|
z.object({
|
|
866
|
-
type: z.literal('
|
|
920
|
+
type: z.literal('integer'),
|
|
921
|
+
autofillProvider: z.string().optional(),
|
|
867
922
|
promoted: z.boolean().optional(),
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
editItemTitle: z.string(),
|
|
872
|
-
minItems: z.number().optional(),
|
|
873
|
-
maxItems: z.number().optional(),
|
|
923
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
924
|
+
refreshUrl: z.string().optional(),
|
|
925
|
+
refreshFormUrl: z.string().optional(),
|
|
874
926
|
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(),
|
|
927
|
+
minimum: z.number().optional(),
|
|
928
|
+
maximum: z.number().optional(),
|
|
896
929
|
$id: z.string().optional(),
|
|
897
|
-
items: z.array(schemaSchema),
|
|
898
930
|
title: z.string().optional(),
|
|
899
931
|
description: z.string().optional(),
|
|
900
932
|
control: z.string().optional(),
|
|
933
|
+
default: z.number().optional(),
|
|
901
934
|
hidden: z.boolean().optional(),
|
|
935
|
+
disabled: z.boolean().optional(),
|
|
902
936
|
icon: iconSchema.optional(),
|
|
903
937
|
image: imageSchema.optional(),
|
|
904
938
|
keywords: z.array(z.string()).optional(),
|
|
905
939
|
summary: summaryProviderSchema.optional(),
|
|
906
940
|
analyticsId: z.string().optional(),
|
|
907
941
|
persistAsync: persistAsyncSchema.optional(),
|
|
942
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
908
943
|
validationAsync: validateAsyncSchema.optional(),
|
|
944
|
+
validationMessages: z.record(z.string()).optional(),
|
|
909
945
|
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(),
|
|
946
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
947
|
+
autofillKey: z.string().optional(),
|
|
948
|
+
help: helpSchema.optional(),
|
|
949
949
|
}),
|
|
950
950
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.31.0",
|
|
4
4
|
"description": "Dynamic Flow TypeScript Types",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"build"
|
|
31
31
|
],
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@formatjs/cli": "^6.
|
|
33
|
+
"@formatjs/cli": "^6.5.1",
|
|
34
34
|
"@types/react": "18.3.18",
|
|
35
|
-
"esbuild": "0.24.
|
|
35
|
+
"esbuild": "0.24.2",
|
|
36
36
|
"npm-run-all2": "7.0.2",
|
|
37
37
|
"ts-to-zod": "3.6.1",
|
|
38
38
|
"typescript": "5.7.3"
|