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