@wise/dynamic-flow-types 3.6.2 → 3.6.3
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/zod/schemas.ts +687 -687
- package/package.json +1 -1
package/build/zod/schemas.ts
CHANGED
|
@@ -2,82 +2,100 @@
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import type {
|
|
4
4
|
JsonElement,
|
|
5
|
+
DecisionLayoutOption,
|
|
6
|
+
Behavior,
|
|
7
|
+
ModalLayoutContent,
|
|
8
|
+
Layout,
|
|
9
|
+
AlertLayout,
|
|
10
|
+
AlertLayoutCallToAction,
|
|
11
|
+
ListLayout,
|
|
12
|
+
ListLayoutCallToAction,
|
|
13
|
+
ListLayoutItem,
|
|
14
|
+
SectionLayoutCallToAction,
|
|
15
|
+
StatusListLayout,
|
|
16
|
+
StatusListLayoutItem,
|
|
17
|
+
TabsLayoutTab,
|
|
18
|
+
BoxLayout,
|
|
19
|
+
SectionLayout,
|
|
20
|
+
ReviewLayout,
|
|
21
|
+
ReviewLayoutField,
|
|
22
|
+
ReviewLayoutCallToAction,
|
|
23
|
+
ButtonLayout,
|
|
24
|
+
ItemCallToAction,
|
|
25
|
+
DecisionLayout,
|
|
26
|
+
AdditionalInfo,
|
|
27
|
+
ColumnsLayout,
|
|
28
|
+
ModalLayout,
|
|
29
|
+
TabsLayout,
|
|
5
30
|
Step,
|
|
6
31
|
Schema,
|
|
7
|
-
Layout,
|
|
8
32
|
Polling,
|
|
9
33
|
LinkHandler,
|
|
10
|
-
AdditionalInfo,
|
|
11
|
-
Behavior,
|
|
12
|
-
ConstSchema,
|
|
13
|
-
AlertLayout,
|
|
14
|
-
BooleanSchema,
|
|
15
34
|
PersistAsync,
|
|
16
|
-
|
|
17
|
-
|
|
35
|
+
ModalBehavior,
|
|
36
|
+
PollingOnError,
|
|
37
|
+
BlobSchema,
|
|
38
|
+
OneOfSchema,
|
|
18
39
|
ArraySchemaTuple,
|
|
19
40
|
StringSchema,
|
|
20
|
-
BlobSchema,
|
|
21
|
-
AllOfSchema,
|
|
22
|
-
IntegerSchema,
|
|
23
41
|
NumberSchema,
|
|
42
|
+
IntegerSchema,
|
|
24
43
|
ObjectSchema,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
StatusListLayoutItem,
|
|
31
|
-
ItemCallToAction,
|
|
32
|
-
DecisionLayout,
|
|
33
|
-
DecisionLayoutOption,
|
|
34
|
-
ReviewLayoutCallToAction,
|
|
35
|
-
TabsLayoutTab,
|
|
36
|
-
ModalLayout,
|
|
37
|
-
StatusListLayout,
|
|
38
|
-
ReviewLayoutField,
|
|
39
|
-
SectionLayoutCallToAction,
|
|
40
|
-
AlertLayoutCallToAction,
|
|
41
|
-
TabsLayout,
|
|
42
|
-
ListLayoutCallToAction,
|
|
43
|
-
SectionLayout,
|
|
44
|
-
ButtonLayout,
|
|
45
|
-
ReviewLayout,
|
|
46
|
-
ColumnsLayout,
|
|
47
|
-
BoxLayout,
|
|
48
|
-
ListLayout,
|
|
44
|
+
ArraySchema,
|
|
45
|
+
ArraySchemaList,
|
|
46
|
+
ConstSchema,
|
|
47
|
+
BooleanSchema,
|
|
48
|
+
AllOfSchema,
|
|
49
49
|
ModalResponseBody,
|
|
50
50
|
} from '../next';
|
|
51
51
|
|
|
52
|
-
export const
|
|
53
|
-
z
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
z.boolean(),
|
|
58
|
-
z.record(jsonElementSchema),
|
|
59
|
-
z.array(jsonElementSchema),
|
|
60
|
-
])
|
|
61
|
-
.nullable(),
|
|
62
|
-
);
|
|
52
|
+
export const listLayoutStatusSchema = z.union([
|
|
53
|
+
z.literal('warning'),
|
|
54
|
+
z.literal('neutral'),
|
|
55
|
+
z.literal('positive'),
|
|
56
|
+
]);
|
|
63
57
|
|
|
64
|
-
export const
|
|
65
|
-
|
|
58
|
+
export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
|
|
59
|
+
|
|
60
|
+
export const sizeSchema = z.union([
|
|
61
|
+
z.literal('xs'),
|
|
62
|
+
z.literal('sm'),
|
|
63
|
+
z.literal('md'),
|
|
64
|
+
z.literal('lg'),
|
|
65
|
+
z.literal('xl'),
|
|
66
|
+
]);
|
|
67
|
+
|
|
68
|
+
export const formLayoutSchemaReferenceSchema = z.object({
|
|
69
|
+
$ref: z.string(),
|
|
66
70
|
});
|
|
67
71
|
|
|
68
|
-
export const
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
export const imageSchema = z.object({
|
|
73
|
+
text: z.string().optional(),
|
|
74
|
+
url: z.string().optional(),
|
|
75
|
+
uri: z.string().optional(),
|
|
76
|
+
accessibilityDescription: z.string().optional(),
|
|
71
77
|
});
|
|
72
78
|
|
|
73
|
-
export const
|
|
74
|
-
|
|
79
|
+
export const supportingValuesSchema = z.object({
|
|
80
|
+
value: z.string().optional(),
|
|
81
|
+
subvalue: z.string().optional(),
|
|
75
82
|
});
|
|
76
83
|
|
|
77
|
-
export const
|
|
84
|
+
export const headingLayoutSchema = z.object({
|
|
85
|
+
type: z.literal('heading'),
|
|
78
86
|
text: z.string(),
|
|
87
|
+
size: sizeSchema.optional(),
|
|
88
|
+
align: alignSchema.optional(),
|
|
89
|
+
control: z.string().optional(),
|
|
90
|
+
margin: sizeSchema.optional(),
|
|
79
91
|
});
|
|
80
92
|
|
|
93
|
+
export const columnsLayoutBiasSchema = z.union([
|
|
94
|
+
z.literal('none'),
|
|
95
|
+
z.literal('left'),
|
|
96
|
+
z.literal('right'),
|
|
97
|
+
]);
|
|
98
|
+
|
|
81
99
|
export const contextSchema = z.union([
|
|
82
100
|
z.literal('positive'),
|
|
83
101
|
z.literal('neutral'),
|
|
@@ -89,7 +107,60 @@ export const contextSchema = z.union([
|
|
|
89
107
|
z.literal('primary'),
|
|
90
108
|
]);
|
|
91
109
|
|
|
92
|
-
export const
|
|
110
|
+
export const markdownLayoutSchema = z.object({
|
|
111
|
+
type: z.literal('markdown'),
|
|
112
|
+
content: z.string(),
|
|
113
|
+
align: alignSchema.optional(),
|
|
114
|
+
control: z.string().optional(),
|
|
115
|
+
margin: sizeSchema.optional(),
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export const imageLayoutSchema = z.object({
|
|
119
|
+
type: z.literal('image'),
|
|
120
|
+
text: z.string().optional(),
|
|
121
|
+
url: z.string().optional(),
|
|
122
|
+
accessibilityDescription: z.string().optional(),
|
|
123
|
+
content: imageSchema.optional(),
|
|
124
|
+
size: sizeSchema.optional(),
|
|
125
|
+
control: z.string().optional(),
|
|
126
|
+
margin: sizeSchema.optional(),
|
|
127
|
+
align: alignSchema.optional(),
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
export const modalLayoutTriggerSchema = z.object({
|
|
131
|
+
title: z.string(),
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
export const statusListLayoutStatusSchema = z.union([
|
|
135
|
+
z.literal('not-done'),
|
|
136
|
+
z.literal('pending'),
|
|
137
|
+
z.literal('done'),
|
|
138
|
+
]);
|
|
139
|
+
|
|
140
|
+
export const loadingIndicatorLayoutSchema = z.object({
|
|
141
|
+
type: z.literal('loading-indicator'),
|
|
142
|
+
size: sizeSchema.optional(),
|
|
143
|
+
control: z.string().optional(),
|
|
144
|
+
margin: sizeSchema.optional(),
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
export const helpSchema = z.object({
|
|
148
|
+
markdown: z.string(),
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
export const dividerLayoutSchema = z.object({
|
|
152
|
+
type: z.literal('divider'),
|
|
153
|
+
control: z.string().optional(),
|
|
154
|
+
margin: sizeSchema.optional(),
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
export const paragraphLayoutSchema = z.object({
|
|
158
|
+
type: z.literal('paragraph'),
|
|
159
|
+
text: z.string(),
|
|
160
|
+
align: alignSchema.optional(),
|
|
161
|
+
control: z.string().optional(),
|
|
162
|
+
margin: sizeSchema.optional(),
|
|
163
|
+
});
|
|
93
164
|
|
|
94
165
|
export const httpMethodSchema = z.union([
|
|
95
166
|
z.literal('GET'),
|
|
@@ -99,34 +170,80 @@ export const httpMethodSchema = z.union([
|
|
|
99
170
|
z.literal('DELETE'),
|
|
100
171
|
]);
|
|
101
172
|
|
|
102
|
-
export const
|
|
103
|
-
z
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
173
|
+
export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
174
|
+
z
|
|
175
|
+
.union([
|
|
176
|
+
z.string(),
|
|
177
|
+
z.number(),
|
|
178
|
+
z.boolean(),
|
|
179
|
+
z.record(jsonElementSchema),
|
|
180
|
+
z.array(jsonElementSchema),
|
|
181
|
+
])
|
|
182
|
+
.nullable(),
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
export const externalSchema = z.object({
|
|
186
|
+
url: z.string(),
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
export const stepErrorSchema = z.object({
|
|
190
|
+
error: z.string().optional(),
|
|
191
|
+
validation: jsonElementSchema.optional(),
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
export const summaryProviderSchema = z.object({
|
|
195
|
+
providesTitle: z.boolean().optional(),
|
|
196
|
+
providesDescription: z.boolean().optional(),
|
|
197
|
+
providesIcon: z.boolean().optional(),
|
|
198
|
+
providesImage: z.boolean().optional(),
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
202
|
+
|
|
203
|
+
export const linkSchema = z.object({
|
|
204
|
+
url: z.string(),
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
export const validateAsyncSchema = z.object({
|
|
208
|
+
param: z.string(),
|
|
209
|
+
method: httpMethodSchema,
|
|
210
|
+
url: z.string(),
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
export const actionTypeSchema = z.union([
|
|
214
|
+
z.literal('primary'),
|
|
215
|
+
z.literal('secondary'),
|
|
216
|
+
z.literal('link'),
|
|
217
|
+
z.literal('positive'),
|
|
218
|
+
z.literal('negative'),
|
|
108
219
|
]);
|
|
109
220
|
|
|
110
|
-
export const
|
|
111
|
-
z.literal('
|
|
112
|
-
z.literal('
|
|
113
|
-
z.literal('
|
|
114
|
-
z.literal('
|
|
221
|
+
export const navigationStackBehaviorSchema = z.union([
|
|
222
|
+
z.literal('default'),
|
|
223
|
+
z.literal('remove-previous'),
|
|
224
|
+
z.literal('remove-all'),
|
|
225
|
+
z.literal('replace-current'),
|
|
115
226
|
]);
|
|
116
227
|
|
|
117
|
-
export const
|
|
118
|
-
|
|
119
|
-
url: z.string().optional(),
|
|
120
|
-
uri: z.string().optional(),
|
|
121
|
-
accessibilityDescription: z.string().optional(),
|
|
228
|
+
export const dismissBehaviorSchema = z.object({
|
|
229
|
+
type: z.literal('dismiss'),
|
|
122
230
|
});
|
|
123
231
|
|
|
124
|
-
export const
|
|
125
|
-
z.literal('
|
|
126
|
-
z.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
232
|
+
export const linkBehaviorSchema = z.object({
|
|
233
|
+
type: z.literal('link'),
|
|
234
|
+
url: z.string(),
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
export const refreshBehaviorSchema = z.object({
|
|
238
|
+
type: z.literal('refresh'),
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
export const autocompleteTokenSchema = z.union([
|
|
242
|
+
z.literal('on'),
|
|
243
|
+
z.literal('name'),
|
|
244
|
+
z.literal('name-prefix'),
|
|
245
|
+
z.literal('given-name'),
|
|
246
|
+
z.literal('additional-name'),
|
|
130
247
|
z.literal('family-name'),
|
|
131
248
|
z.literal('name-suffix'),
|
|
132
249
|
z.literal('nickname'),
|
|
@@ -187,33 +304,6 @@ export const autocompleteTokenSchema = z.union([
|
|
|
187
304
|
z.literal('pager'),
|
|
188
305
|
]);
|
|
189
306
|
|
|
190
|
-
export const supportingValuesSchema = z.object({
|
|
191
|
-
value: z.string().optional(),
|
|
192
|
-
subvalue: z.string().optional(),
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
export const inlineAlertSchema = z.object({
|
|
196
|
-
content: z.string(),
|
|
197
|
-
context: contextSchema.optional(),
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
export const summaryProviderSchema = z.object({
|
|
201
|
-
providesTitle: z.boolean().optional(),
|
|
202
|
-
providesDescription: z.boolean().optional(),
|
|
203
|
-
providesIcon: z.boolean().optional(),
|
|
204
|
-
providesImage: z.boolean().optional(),
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
export const validateAsyncSchema = z.object({
|
|
208
|
-
param: z.string(),
|
|
209
|
-
method: httpMethodSchema,
|
|
210
|
-
url: z.string(),
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
export const helpSchema = z.object({
|
|
214
|
-
markdown: z.string(),
|
|
215
|
-
});
|
|
216
|
-
|
|
217
307
|
export const stringSchemaFormatSchema = z.union([
|
|
218
308
|
z.literal('date'),
|
|
219
309
|
z.literal('email'),
|
|
@@ -223,112 +313,34 @@ export const stringSchemaFormatSchema = z.union([
|
|
|
223
313
|
z.literal('base64url'),
|
|
224
314
|
]);
|
|
225
315
|
|
|
226
|
-
export const
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
export const actionTypeSchema = z.union([
|
|
234
|
-
z.literal('primary'),
|
|
235
|
-
z.literal('secondary'),
|
|
236
|
-
z.literal('link'),
|
|
237
|
-
z.literal('positive'),
|
|
238
|
-
z.literal('negative'),
|
|
316
|
+
export const autocapitalizationTypeSchema = z.union([
|
|
317
|
+
z.literal('none'),
|
|
318
|
+
z.literal('characters'),
|
|
319
|
+
z.literal('sentences'),
|
|
320
|
+
z.literal('words'),
|
|
239
321
|
]);
|
|
240
322
|
|
|
241
|
-
export const
|
|
323
|
+
export const searchSearchRequestSchema = z.object({
|
|
242
324
|
url: z.string(),
|
|
325
|
+
method: httpMethodSchema,
|
|
326
|
+
param: z.string(),
|
|
327
|
+
query: z.string(),
|
|
243
328
|
});
|
|
244
329
|
|
|
245
|
-
export const
|
|
246
|
-
z.
|
|
247
|
-
z.
|
|
248
|
-
z.
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
export const dismissBehaviorSchema = z.object({
|
|
253
|
-
type: z.literal('dismiss'),
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
export const refreshBehaviorSchema = z.object({
|
|
257
|
-
type: z.literal('refresh'),
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
export const listLayoutStatusSchema = z.union([
|
|
261
|
-
z.literal('warning'),
|
|
262
|
-
z.literal('neutral'),
|
|
263
|
-
z.literal('positive'),
|
|
264
|
-
]);
|
|
265
|
-
|
|
266
|
-
export const modalLayoutTriggerSchema = z.object({
|
|
267
|
-
title: z.string(),
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
export const loadingIndicatorLayoutSchema = z.object({
|
|
271
|
-
type: z.literal('loading-indicator'),
|
|
272
|
-
size: sizeSchema.optional(),
|
|
273
|
-
control: z.string().optional(),
|
|
274
|
-
margin: sizeSchema.optional(),
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
export const statusListLayoutStatusSchema = z.union([
|
|
278
|
-
z.literal('not-done'),
|
|
279
|
-
z.literal('pending'),
|
|
280
|
-
z.literal('done'),
|
|
281
|
-
]);
|
|
282
|
-
|
|
283
|
-
export const dividerLayoutSchema = z.object({
|
|
284
|
-
type: z.literal('divider'),
|
|
285
|
-
control: z.string().optional(),
|
|
286
|
-
margin: sizeSchema.optional(),
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
export const headingLayoutSchema = z.object({
|
|
290
|
-
type: z.literal('heading'),
|
|
291
|
-
text: z.string(),
|
|
292
|
-
size: sizeSchema.optional(),
|
|
293
|
-
align: alignSchema.optional(),
|
|
294
|
-
control: z.string().optional(),
|
|
295
|
-
margin: sizeSchema.optional(),
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
export const formLayoutSchemaReferenceSchema = z.object({
|
|
299
|
-
$ref: z.string(),
|
|
300
|
-
});
|
|
301
|
-
|
|
302
|
-
export const imageLayoutSchema = z.object({
|
|
303
|
-
type: z.literal('image'),
|
|
304
|
-
text: z.string().optional(),
|
|
305
|
-
url: z.string().optional(),
|
|
306
|
-
accessibilityDescription: z.string().optional(),
|
|
307
|
-
content: imageSchema.optional(),
|
|
308
|
-
size: sizeSchema.optional(),
|
|
309
|
-
control: z.string().optional(),
|
|
310
|
-
margin: sizeSchema.optional(),
|
|
311
|
-
align: alignSchema.optional(),
|
|
330
|
+
export const errorResponseBodySchema = z.object({
|
|
331
|
+
refreshFormUrl: z.string().optional(),
|
|
332
|
+
analytics: z.record(z.string()).optional(),
|
|
333
|
+
error: z.string().optional(),
|
|
334
|
+
validation: jsonElementSchema.optional(),
|
|
335
|
+
refreshUrl: z.string().optional(),
|
|
312
336
|
});
|
|
313
337
|
|
|
314
|
-
export const
|
|
315
|
-
z.literal('none'),
|
|
316
|
-
z.literal('left'),
|
|
317
|
-
z.literal('right'),
|
|
318
|
-
]);
|
|
319
|
-
|
|
320
|
-
export const instructionsLayoutItemSchema = z.object({
|
|
338
|
+
export const iconTextSchema = z.object({
|
|
321
339
|
text: z.string(),
|
|
322
|
-
context: contextSchema,
|
|
323
|
-
tag: z.string().optional(),
|
|
324
340
|
});
|
|
325
341
|
|
|
326
|
-
export const
|
|
327
|
-
|
|
328
|
-
content: z.string(),
|
|
329
|
-
align: alignSchema.optional(),
|
|
330
|
-
control: z.string().optional(),
|
|
331
|
-
margin: sizeSchema.optional(),
|
|
342
|
+
export const iconNamedSchema = z.object({
|
|
343
|
+
name: z.string(),
|
|
332
344
|
});
|
|
333
345
|
|
|
334
346
|
export const infoLayoutSchema = z.object({
|
|
@@ -339,25 +351,6 @@ export const infoLayoutSchema = z.object({
|
|
|
339
351
|
margin: sizeSchema.optional(),
|
|
340
352
|
});
|
|
341
353
|
|
|
342
|
-
export const paragraphLayoutSchema = z.object({
|
|
343
|
-
type: z.literal('paragraph'),
|
|
344
|
-
text: z.string(),
|
|
345
|
-
align: alignSchema.optional(),
|
|
346
|
-
control: z.string().optional(),
|
|
347
|
-
margin: sizeSchema.optional(),
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
export const searchLayoutSchema = z.object({
|
|
351
|
-
type: z.literal('search'),
|
|
352
|
-
title: z.string(),
|
|
353
|
-
method: httpMethodSchema,
|
|
354
|
-
url: z.string(),
|
|
355
|
-
param: z.string(),
|
|
356
|
-
emptyMessage: z.string().optional(),
|
|
357
|
-
control: z.string().optional(),
|
|
358
|
-
margin: sizeSchema.optional(),
|
|
359
|
-
});
|
|
360
|
-
|
|
361
354
|
export const formLayoutSchema = z.object({
|
|
362
355
|
type: z.literal('form'),
|
|
363
356
|
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
@@ -366,21 +359,6 @@ export const formLayoutSchema = z.object({
|
|
|
366
359
|
margin: sizeSchema.optional(),
|
|
367
360
|
});
|
|
368
361
|
|
|
369
|
-
export const searchSearchRequestSchema = z.object({
|
|
370
|
-
url: z.string(),
|
|
371
|
-
method: httpMethodSchema,
|
|
372
|
-
param: z.string(),
|
|
373
|
-
query: z.string(),
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
export const errorResponseBodySchema = z.object({
|
|
377
|
-
refreshFormUrl: z.string().optional(),
|
|
378
|
-
analytics: z.record(z.string()).optional(),
|
|
379
|
-
error: z.string().optional(),
|
|
380
|
-
validation: jsonElementSchema.optional(),
|
|
381
|
-
refreshUrl: z.string().optional(),
|
|
382
|
-
});
|
|
383
|
-
|
|
384
362
|
export const actionSchema = z.object({
|
|
385
363
|
title: z.string().optional(),
|
|
386
364
|
type: actionTypeSchema.optional(),
|
|
@@ -399,6 +377,28 @@ export const actionSchema = z.object({
|
|
|
399
377
|
|
|
400
378
|
export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
401
379
|
|
|
380
|
+
export const inlineAlertSchema = z.object({
|
|
381
|
+
content: z.string(),
|
|
382
|
+
context: contextSchema.optional(),
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
export const instructionsLayoutItemSchema = z.object({
|
|
386
|
+
text: z.string(),
|
|
387
|
+
context: contextSchema,
|
|
388
|
+
tag: z.string().optional(),
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
export const searchLayoutSchema = z.object({
|
|
392
|
+
type: z.literal('search'),
|
|
393
|
+
title: z.string(),
|
|
394
|
+
method: httpMethodSchema,
|
|
395
|
+
url: z.string(),
|
|
396
|
+
param: z.string(),
|
|
397
|
+
emptyMessage: z.string().optional(),
|
|
398
|
+
control: z.string().optional(),
|
|
399
|
+
margin: sizeSchema.optional(),
|
|
400
|
+
});
|
|
401
|
+
|
|
402
402
|
export const summarySummariserSchema = z.object({
|
|
403
403
|
defaultTitle: z.string().optional(),
|
|
404
404
|
defaultDescription: z.string().optional(),
|
|
@@ -410,6 +410,16 @@ export const summarySummariserSchema = z.object({
|
|
|
410
410
|
providesImage: z.boolean().optional(),
|
|
411
411
|
});
|
|
412
412
|
|
|
413
|
+
export const containerBehaviorSchema = z.object({
|
|
414
|
+
action: actionSchema.optional(),
|
|
415
|
+
link: linkSchema.optional(),
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
export const navigationBackBehaviorSchema = z.object({
|
|
419
|
+
title: z.string().optional(),
|
|
420
|
+
action: actionSchema,
|
|
421
|
+
});
|
|
422
|
+
|
|
413
423
|
export const suggestionsValueSchema = z.object({
|
|
414
424
|
label: z.string(),
|
|
415
425
|
value: jsonElementSchema,
|
|
@@ -423,103 +433,88 @@ export const actionBehaviorSchema = z.object({
|
|
|
423
433
|
action: actionSchema,
|
|
424
434
|
});
|
|
425
435
|
|
|
426
|
-
export const
|
|
427
|
-
|
|
428
|
-
export const containerBehaviorSchema = z.object({
|
|
429
|
-
action: actionSchema.optional(),
|
|
430
|
-
link: linkSchema.optional(),
|
|
431
|
-
});
|
|
432
|
-
|
|
433
|
-
export const navigationBackBehaviorSchema = z.object({
|
|
434
|
-
title: z.string().optional(),
|
|
435
|
-
action: actionSchema,
|
|
436
|
-
});
|
|
437
|
-
|
|
438
|
-
export const instructionsLayoutSchema = z.object({
|
|
439
|
-
type: z.literal('instructions'),
|
|
440
|
-
title: z.string().optional(),
|
|
441
|
-
items: z.array(instructionsLayoutItemSchema),
|
|
442
|
-
control: z.string().optional(),
|
|
443
|
-
margin: sizeSchema.optional(),
|
|
436
|
+
export const suggestionsSchema = z.object({
|
|
437
|
+
values: z.array(suggestionsValueSchema),
|
|
444
438
|
});
|
|
445
439
|
|
|
446
440
|
export const actionResponseBodySchema = z.object({
|
|
447
441
|
action: actionSchema,
|
|
448
442
|
});
|
|
449
443
|
|
|
450
|
-
export const
|
|
451
|
-
type: z.literal('
|
|
444
|
+
export const searchResultActionSchema = z.object({
|
|
445
|
+
type: z.literal('action'),
|
|
452
446
|
title: z.string(),
|
|
453
447
|
description: z.string().optional(),
|
|
454
448
|
icon: iconSchema.optional(),
|
|
455
449
|
image: imageSchema.optional(),
|
|
456
|
-
value:
|
|
450
|
+
value: actionSchema,
|
|
457
451
|
});
|
|
458
452
|
|
|
459
|
-
export const
|
|
460
|
-
type: z.literal('
|
|
453
|
+
export const searchResultSearchSchema = z.object({
|
|
454
|
+
type: z.literal('search'),
|
|
461
455
|
title: z.string(),
|
|
462
456
|
description: z.string().optional(),
|
|
463
457
|
icon: iconSchema.optional(),
|
|
464
458
|
image: imageSchema.optional(),
|
|
465
|
-
value:
|
|
459
|
+
value: searchSearchRequestSchema,
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
export const instructionsLayoutSchema = z.object({
|
|
463
|
+
type: z.literal('instructions'),
|
|
464
|
+
title: z.string().optional(),
|
|
465
|
+
items: z.array(instructionsLayoutItemSchema),
|
|
466
|
+
control: z.string().optional(),
|
|
467
|
+
margin: sizeSchema.optional(),
|
|
466
468
|
});
|
|
467
469
|
|
|
468
|
-
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
469
|
-
|
|
470
470
|
export const navigationSchema = z.object({
|
|
471
471
|
backButton: navigationBackBehaviorSchema.optional(),
|
|
472
472
|
back: navigationBackBehaviorSchema.optional(),
|
|
473
473
|
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
474
474
|
});
|
|
475
475
|
|
|
476
|
-
export const
|
|
477
|
-
|
|
478
|
-
|
|
476
|
+
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
477
|
+
|
|
478
|
+
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
479
479
|
|
|
480
480
|
export const searchResponseBodySchema = z.object({
|
|
481
481
|
results: z.array(searchResultSchema),
|
|
482
482
|
});
|
|
483
483
|
|
|
484
|
-
export const
|
|
484
|
+
export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
|
|
485
485
|
z.object({
|
|
486
|
-
|
|
487
|
-
type: z.string().optional(),
|
|
488
|
-
actions: z.array(actionSchema).optional(),
|
|
489
|
-
refreshFormUrl: z.string().optional(),
|
|
490
|
-
id: z.string(),
|
|
486
|
+
action: actionSchema.optional(),
|
|
491
487
|
title: z.string(),
|
|
492
|
-
schemas: z.array(schemaSchema),
|
|
493
|
-
layout: z.array(layoutSchema),
|
|
494
488
|
description: z.string().optional(),
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
control: z.string().optional(),
|
|
504
|
-
refreshAfter: z.string().optional(),
|
|
489
|
+
disabled: z.boolean().optional(),
|
|
490
|
+
icon: iconSchema.optional(),
|
|
491
|
+
image: imageSchema.optional(),
|
|
492
|
+
behavior: behaviorSchema.optional(),
|
|
493
|
+
tag: z.string().optional(),
|
|
494
|
+
additionalText: z.string().optional(),
|
|
495
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
496
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
505
497
|
}),
|
|
506
498
|
);
|
|
507
499
|
|
|
508
|
-
export const
|
|
500
|
+
export const behaviorSchema: z.ZodSchema<Behavior> = z.lazy(() =>
|
|
509
501
|
z.union([
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
numberSchemaSchema,
|
|
517
|
-
objectSchemaSchema,
|
|
518
|
-
oneOfSchemaSchema,
|
|
519
|
-
stringSchemaSchema,
|
|
502
|
+
actionBehaviorSchema,
|
|
503
|
+
containerBehaviorSchema,
|
|
504
|
+
dismissBehaviorSchema,
|
|
505
|
+
linkBehaviorSchema,
|
|
506
|
+
modalBehaviorSchema,
|
|
507
|
+
refreshBehaviorSchema,
|
|
520
508
|
]),
|
|
521
509
|
);
|
|
522
510
|
|
|
511
|
+
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
512
|
+
z.object({
|
|
513
|
+
title: z.string().optional(),
|
|
514
|
+
components: z.array(layoutSchema),
|
|
515
|
+
}),
|
|
516
|
+
);
|
|
517
|
+
|
|
523
518
|
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
524
519
|
z.union([
|
|
525
520
|
alertLayoutSchema,
|
|
@@ -546,210 +541,307 @@ export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
|
546
541
|
]),
|
|
547
542
|
);
|
|
548
543
|
|
|
549
|
-
export const
|
|
544
|
+
export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
|
|
550
545
|
z.object({
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
546
|
+
type: z.literal('alert'),
|
|
547
|
+
markdown: z.string(),
|
|
548
|
+
context: contextSchema.optional(),
|
|
549
|
+
control: z.string().optional(),
|
|
550
|
+
margin: sizeSchema.optional(),
|
|
551
|
+
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
557
552
|
}),
|
|
558
553
|
);
|
|
559
554
|
|
|
560
|
-
export const
|
|
555
|
+
export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
|
|
561
556
|
z.object({
|
|
562
|
-
|
|
563
|
-
|
|
557
|
+
title: z.string(),
|
|
558
|
+
accessibilityDescription: z.string().optional(),
|
|
559
|
+
behavior: behaviorSchema,
|
|
564
560
|
}),
|
|
565
561
|
);
|
|
566
562
|
|
|
567
|
-
export const
|
|
563
|
+
export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
|
|
568
564
|
z.object({
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
565
|
+
type: z.literal('list'),
|
|
566
|
+
title: z.string().optional(),
|
|
567
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
568
|
+
items: z.array(listLayoutItemSchema),
|
|
569
|
+
control: z.string().optional(),
|
|
570
|
+
margin: sizeSchema.optional(),
|
|
572
571
|
}),
|
|
573
572
|
);
|
|
574
573
|
|
|
575
|
-
export const
|
|
576
|
-
z.
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
modalBehaviorSchema,
|
|
582
|
-
refreshBehaviorSchema,
|
|
583
|
-
]),
|
|
574
|
+
export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
|
|
575
|
+
z.object({
|
|
576
|
+
title: z.string(),
|
|
577
|
+
accessibilityDescription: z.string().optional(),
|
|
578
|
+
behavior: behaviorSchema,
|
|
579
|
+
}),
|
|
584
580
|
);
|
|
585
581
|
|
|
586
|
-
export const
|
|
582
|
+
export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
|
|
587
583
|
z.object({
|
|
588
|
-
|
|
589
|
-
alert: alertLayoutSchema.optional(),
|
|
590
|
-
control: z.string().optional(),
|
|
591
|
-
promoted: z.boolean().optional(),
|
|
592
|
-
$id: z.string().optional(),
|
|
593
|
-
const: jsonElementSchema,
|
|
594
|
-
title: z.string().optional(),
|
|
595
|
-
description: z.string().optional(),
|
|
584
|
+
status: listLayoutStatusSchema.optional(),
|
|
596
585
|
icon: iconSchema.optional(),
|
|
597
586
|
image: imageSchema.optional(),
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
587
|
+
title: z.string().optional(),
|
|
588
|
+
subtitle: z.string().optional(),
|
|
589
|
+
value: z.string().optional(),
|
|
590
|
+
subvalue: z.string().optional(),
|
|
591
|
+
tag: z.string().optional(),
|
|
592
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
593
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
594
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
595
|
+
description: z.string().optional(),
|
|
602
596
|
}),
|
|
603
597
|
);
|
|
604
598
|
|
|
605
|
-
export const
|
|
599
|
+
export const sectionLayoutCallToActionSchema: z.ZodSchema<SectionLayoutCallToAction> = z.lazy(() =>
|
|
606
600
|
z.object({
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
control: z.string().optional(),
|
|
611
|
-
margin: sizeSchema.optional(),
|
|
612
|
-
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
601
|
+
title: z.string(),
|
|
602
|
+
accessibilityDescription: z.string().optional(),
|
|
603
|
+
behavior: behaviorSchema,
|
|
613
604
|
}),
|
|
614
605
|
);
|
|
615
606
|
|
|
616
|
-
export const
|
|
607
|
+
export const statusListLayoutSchema: z.ZodSchema<StatusListLayout> = z.lazy(() =>
|
|
617
608
|
z.object({
|
|
618
|
-
type: z.literal('
|
|
619
|
-
|
|
620
|
-
promoted: z.boolean().optional(),
|
|
621
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
622
|
-
refreshUrl: z.string().optional(),
|
|
623
|
-
refreshFormUrl: z.string().optional(),
|
|
624
|
-
$id: z.string().optional(),
|
|
609
|
+
type: z.literal('status-list'),
|
|
610
|
+
items: z.array(statusListLayoutItemSchema),
|
|
625
611
|
title: z.string().optional(),
|
|
626
|
-
description: z.string().optional(),
|
|
627
612
|
control: z.string().optional(),
|
|
628
|
-
|
|
629
|
-
hidden: z.boolean().optional(),
|
|
630
|
-
disabled: z.boolean().optional(),
|
|
631
|
-
icon: iconSchema.optional(),
|
|
632
|
-
image: imageSchema.optional(),
|
|
633
|
-
keywords: z.array(z.string()).optional(),
|
|
634
|
-
summary: summaryProviderSchema.optional(),
|
|
635
|
-
analyticsId: z.string().optional(),
|
|
636
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
637
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
638
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
639
|
-
alert: alertLayoutSchema.optional(),
|
|
640
|
-
autofillKey: z.string().optional(),
|
|
641
|
-
help: helpSchema.optional(),
|
|
642
|
-
onChange: behaviorSchema.optional(),
|
|
613
|
+
margin: sizeSchema.optional(),
|
|
643
614
|
}),
|
|
644
615
|
);
|
|
645
616
|
|
|
646
|
-
export const
|
|
617
|
+
export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.lazy(() =>
|
|
647
618
|
z.object({
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
619
|
+
title: z.string(),
|
|
620
|
+
description: z.string().optional(),
|
|
621
|
+
icon: iconSchema,
|
|
622
|
+
status: statusListLayoutStatusSchema.optional(),
|
|
623
|
+
callToAction: itemCallToActionSchema.optional(),
|
|
624
|
+
tag: z.string().optional(),
|
|
653
625
|
}),
|
|
654
626
|
);
|
|
655
627
|
|
|
656
|
-
export const
|
|
657
|
-
z.
|
|
628
|
+
export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
|
|
629
|
+
z.object({
|
|
630
|
+
title: z.string(),
|
|
631
|
+
components: z.array(layoutSchema),
|
|
632
|
+
tag: z.string().optional(),
|
|
633
|
+
}),
|
|
658
634
|
);
|
|
659
635
|
|
|
660
|
-
export const
|
|
636
|
+
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
661
637
|
z.object({
|
|
662
|
-
type: z.literal('
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
addItemTitle: z.string(),
|
|
667
|
-
editItemTitle: z.string(),
|
|
668
|
-
minItems: z.number().optional(),
|
|
669
|
-
maxItems: z.number().optional(),
|
|
670
|
-
placeholder: z.string().optional(),
|
|
671
|
-
title: z.string().optional(),
|
|
672
|
-
description: z.string().optional(),
|
|
638
|
+
type: z.literal('box'),
|
|
639
|
+
components: z.array(layoutSchema),
|
|
640
|
+
width: sizeSchema.optional(),
|
|
641
|
+
border: z.boolean().optional(),
|
|
673
642
|
control: z.string().optional(),
|
|
674
|
-
|
|
675
|
-
icon: iconSchema.optional(),
|
|
676
|
-
image: imageSchema.optional(),
|
|
677
|
-
keywords: z.array(z.string()).optional(),
|
|
678
|
-
summary: summarySummariserSchema.optional(),
|
|
679
|
-
analyticsId: z.string().optional(),
|
|
680
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
681
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
682
|
-
alert: alertLayoutSchema.optional(),
|
|
683
|
-
validationMessages: z.record(z.string()).optional(),
|
|
684
|
-
disabled: z.boolean().optional(),
|
|
643
|
+
margin: sizeSchema.optional(),
|
|
685
644
|
}),
|
|
686
645
|
);
|
|
687
646
|
|
|
688
|
-
export const
|
|
647
|
+
export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
689
648
|
z.object({
|
|
690
|
-
type: z.literal('
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
title: z.string().optional(),
|
|
695
|
-
description: z.string().optional(),
|
|
649
|
+
type: z.literal('section'),
|
|
650
|
+
components: z.array(layoutSchema),
|
|
651
|
+
title: z.string(),
|
|
652
|
+
callToAction: sectionLayoutCallToActionSchema.optional(),
|
|
696
653
|
control: z.string().optional(),
|
|
697
|
-
|
|
698
|
-
icon: iconSchema.optional(),
|
|
699
|
-
image: imageSchema.optional(),
|
|
700
|
-
keywords: z.array(z.string()).optional(),
|
|
701
|
-
summary: summaryProviderSchema.optional(),
|
|
702
|
-
analyticsId: z.string().optional(),
|
|
703
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
704
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
705
|
-
alert: alertLayoutSchema.optional(),
|
|
654
|
+
margin: sizeSchema.optional(),
|
|
706
655
|
}),
|
|
707
656
|
);
|
|
708
657
|
|
|
709
|
-
export const
|
|
658
|
+
export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
|
|
710
659
|
z.object({
|
|
711
|
-
type: z.literal('
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
refreshUrl: z.string().optional(),
|
|
716
|
-
refreshFormUrl: z.string().optional(),
|
|
717
|
-
format: stringSchemaFormatSchema.optional(),
|
|
718
|
-
displayFormat: z.string().optional(),
|
|
719
|
-
placeholder: z.string().optional(),
|
|
720
|
-
minLength: z.number().optional(),
|
|
721
|
-
maxLength: z.number().optional(),
|
|
722
|
-
minimum: z.string().optional(),
|
|
723
|
-
maximum: z.string().optional(),
|
|
724
|
-
pattern: z.string().optional(),
|
|
725
|
-
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
726
|
-
autocorrect: z.boolean().optional(),
|
|
727
|
-
$id: z.string().optional(),
|
|
660
|
+
type: z.literal('review'),
|
|
661
|
+
orientation: z.string().optional(),
|
|
662
|
+
action: actionSchema.optional(),
|
|
663
|
+
fields: z.array(reviewLayoutFieldSchema),
|
|
728
664
|
title: z.string().optional(),
|
|
729
|
-
|
|
665
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
730
666
|
control: z.string().optional(),
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
667
|
+
margin: sizeSchema.optional(),
|
|
668
|
+
}),
|
|
669
|
+
);
|
|
670
|
+
|
|
671
|
+
export const reviewLayoutFieldSchema: z.ZodSchema<ReviewLayoutField> = z.lazy(() =>
|
|
672
|
+
z.object({
|
|
673
|
+
label: z.string(),
|
|
674
|
+
value: z.string(),
|
|
675
|
+
rawValue: z.string().optional(),
|
|
676
|
+
help: helpSchema.optional(),
|
|
677
|
+
tag: z.string().optional(),
|
|
734
678
|
icon: iconSchema.optional(),
|
|
735
679
|
image: imageSchema.optional(),
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
680
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
681
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
682
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
683
|
+
}),
|
|
684
|
+
);
|
|
685
|
+
|
|
686
|
+
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
687
|
+
z.object({
|
|
688
|
+
action: actionSchema.optional(),
|
|
689
|
+
title: z.string(),
|
|
690
|
+
accessibilityDescription: z.string().optional(),
|
|
691
|
+
behavior: behaviorSchema.optional(),
|
|
692
|
+
}),
|
|
693
|
+
);
|
|
694
|
+
|
|
695
|
+
export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
|
|
696
|
+
z.object({
|
|
697
|
+
type: z.literal('button'),
|
|
698
|
+
action: actionSchema.optional(),
|
|
699
|
+
size: sizeSchema.optional(),
|
|
700
|
+
title: z.string().optional(),
|
|
701
|
+
behavior: behaviorSchema.optional(),
|
|
702
|
+
context: contextSchema.optional(),
|
|
703
|
+
disabled: z.boolean().optional(),
|
|
704
|
+
pinOrder: z.number().optional(),
|
|
705
|
+
control: z.string().optional(),
|
|
706
|
+
margin: sizeSchema.optional(),
|
|
707
|
+
}),
|
|
708
|
+
);
|
|
709
|
+
|
|
710
|
+
export const itemCallToActionSchema: z.ZodSchema<ItemCallToAction> = z.lazy(() =>
|
|
711
|
+
z.object({
|
|
712
|
+
title: z.string(),
|
|
713
|
+
accessibilityDescription: z.string().optional(),
|
|
714
|
+
behavior: behaviorSchema,
|
|
715
|
+
}),
|
|
716
|
+
);
|
|
717
|
+
|
|
718
|
+
export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
|
|
719
|
+
z.object({
|
|
720
|
+
type: z.literal('decision'),
|
|
721
|
+
title: z.string().optional(),
|
|
722
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
723
|
+
control: z.string().optional(),
|
|
724
|
+
margin: sizeSchema.optional(),
|
|
725
|
+
}),
|
|
726
|
+
);
|
|
727
|
+
|
|
728
|
+
export const additionalInfoSchema: z.ZodSchema<AdditionalInfo> = z.lazy(() =>
|
|
729
|
+
z.object({
|
|
730
|
+
text: z.string(),
|
|
731
|
+
behavior: behaviorSchema.optional(),
|
|
732
|
+
accessibilityDescription: z.string().optional(),
|
|
733
|
+
}),
|
|
734
|
+
);
|
|
735
|
+
|
|
736
|
+
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
737
|
+
z.object({
|
|
738
|
+
type: z.literal('columns'),
|
|
739
|
+
left: z.array(layoutSchema),
|
|
740
|
+
right: z.array(layoutSchema),
|
|
741
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
742
|
+
control: z.string().optional(),
|
|
743
|
+
margin: sizeSchema.optional(),
|
|
744
|
+
}),
|
|
745
|
+
);
|
|
746
|
+
|
|
747
|
+
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
748
|
+
z.object({
|
|
749
|
+
type: z.literal('modal'),
|
|
750
|
+
control: z.string().optional(),
|
|
751
|
+
margin: sizeSchema.optional(),
|
|
752
|
+
trigger: modalLayoutTriggerSchema,
|
|
753
|
+
content: modalLayoutContentSchema,
|
|
754
|
+
}),
|
|
755
|
+
);
|
|
756
|
+
|
|
757
|
+
export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
758
|
+
z.object({
|
|
759
|
+
type: z.literal('tabs'),
|
|
760
|
+
tabs: z.array(tabsLayoutTabSchema),
|
|
761
|
+
control: z.string().optional(),
|
|
762
|
+
margin: sizeSchema.optional(),
|
|
763
|
+
}),
|
|
764
|
+
);
|
|
765
|
+
|
|
766
|
+
export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
767
|
+
z.object({
|
|
768
|
+
key: z.string().optional(),
|
|
769
|
+
type: z.string().optional(),
|
|
770
|
+
actions: z.array(actionSchema).optional(),
|
|
771
|
+
refreshFormUrl: z.string().optional(),
|
|
772
|
+
id: z.string(),
|
|
773
|
+
title: z.string(),
|
|
774
|
+
schemas: z.array(schemaSchema),
|
|
775
|
+
layout: z.array(layoutSchema),
|
|
776
|
+
description: z.string().optional(),
|
|
777
|
+
model: jsonElementSchema.optional(),
|
|
778
|
+
external: externalSchema.optional(),
|
|
779
|
+
polling: pollingSchema.optional(),
|
|
780
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
781
|
+
analytics: z.record(z.string()).optional(),
|
|
782
|
+
errors: stepErrorSchema.optional(),
|
|
783
|
+
navigation: navigationSchema.optional(),
|
|
784
|
+
refreshUrl: z.string().optional(),
|
|
785
|
+
control: z.string().optional(),
|
|
786
|
+
refreshAfter: z.string().optional(),
|
|
787
|
+
}),
|
|
788
|
+
);
|
|
789
|
+
|
|
790
|
+
export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
|
|
791
|
+
z.union([
|
|
792
|
+
allOfSchemaSchema,
|
|
793
|
+
arraySchemaSchema,
|
|
794
|
+
blobSchemaSchema,
|
|
795
|
+
booleanSchemaSchema,
|
|
796
|
+
constSchemaSchema,
|
|
797
|
+
integerSchemaSchema,
|
|
798
|
+
numberSchemaSchema,
|
|
799
|
+
objectSchemaSchema,
|
|
800
|
+
oneOfSchemaSchema,
|
|
801
|
+
stringSchemaSchema,
|
|
802
|
+
]),
|
|
803
|
+
);
|
|
804
|
+
|
|
805
|
+
export const pollingSchema: z.ZodSchema<Polling> = z.lazy(() =>
|
|
806
|
+
z.object({
|
|
807
|
+
interval: z.number().optional(),
|
|
808
|
+
url: z.string(),
|
|
809
|
+
delay: z.number().optional(),
|
|
810
|
+
timeout: z.number().optional(),
|
|
811
|
+
maxAttempts: z.number(),
|
|
812
|
+
onError: pollingOnErrorSchema,
|
|
813
|
+
}),
|
|
814
|
+
);
|
|
815
|
+
|
|
816
|
+
export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
|
|
817
|
+
z.object({
|
|
818
|
+
regexPattern: z.string(),
|
|
819
|
+
behavior: behaviorSchema.optional(),
|
|
820
|
+
}),
|
|
821
|
+
);
|
|
822
|
+
|
|
823
|
+
export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
|
|
824
|
+
z.object({
|
|
825
|
+
param: z.string(),
|
|
826
|
+
idProperty: z.string(),
|
|
827
|
+
schema: schemaSchema,
|
|
828
|
+
url: z.string(),
|
|
829
|
+
method: httpMethodSchema,
|
|
830
|
+
}),
|
|
831
|
+
);
|
|
832
|
+
|
|
833
|
+
export const modalBehaviorSchema: z.ZodSchema<ModalBehavior> = z.lazy(() =>
|
|
834
|
+
z.object({
|
|
835
|
+
type: z.literal('modal'),
|
|
836
|
+
title: z.string().optional(),
|
|
837
|
+
content: z.array(layoutSchema),
|
|
838
|
+
}),
|
|
839
|
+
);
|
|
840
|
+
|
|
841
|
+
export const pollingOnErrorSchema: z.ZodSchema<PollingOnError> = z.lazy(() =>
|
|
842
|
+
z.object({
|
|
843
|
+
action: actionSchema.optional(),
|
|
844
|
+
behavior: behaviorSchema.optional(),
|
|
753
845
|
}),
|
|
754
846
|
);
|
|
755
847
|
|
|
@@ -778,76 +870,82 @@ export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
|
|
|
778
870
|
}),
|
|
779
871
|
);
|
|
780
872
|
|
|
781
|
-
export const
|
|
873
|
+
export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
|
|
782
874
|
z.object({
|
|
783
|
-
|
|
875
|
+
autofillProvider: z.string().optional(),
|
|
784
876
|
promoted: z.boolean().optional(),
|
|
785
|
-
|
|
877
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
878
|
+
refreshUrl: z.string().optional(),
|
|
879
|
+
refreshFormUrl: z.string().optional(),
|
|
880
|
+
promotion: jsonElementSchema.optional(),
|
|
881
|
+
oneOf: z.array(schemaSchema),
|
|
882
|
+
placeholder: z.string().optional(),
|
|
786
883
|
$id: z.string().optional(),
|
|
787
884
|
title: z.string().optional(),
|
|
788
885
|
description: z.string().optional(),
|
|
789
886
|
control: z.string().optional(),
|
|
887
|
+
default: jsonElementSchema.optional(),
|
|
790
888
|
hidden: z.boolean().optional(),
|
|
791
889
|
icon: iconSchema.optional(),
|
|
792
890
|
image: imageSchema.optional(),
|
|
793
891
|
keywords: z.array(z.string()).optional(),
|
|
794
892
|
summary: summaryProviderSchema.optional(),
|
|
795
893
|
analyticsId: z.string().optional(),
|
|
894
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
796
895
|
alert: alertLayoutSchema.optional(),
|
|
896
|
+
help: helpSchema.optional(),
|
|
897
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
898
|
+
autofillKey: z.string().optional(),
|
|
899
|
+
validationMessages: z.record(z.string()).optional(),
|
|
900
|
+
disabled: z.boolean().optional(),
|
|
901
|
+
onChange: behaviorSchema.optional(),
|
|
797
902
|
}),
|
|
798
903
|
);
|
|
799
904
|
|
|
800
|
-
export const
|
|
905
|
+
export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
|
|
801
906
|
z.object({
|
|
802
|
-
type: z.literal('
|
|
803
|
-
autofillProvider: z.string().optional(),
|
|
907
|
+
type: z.literal('array'),
|
|
804
908
|
promoted: z.boolean().optional(),
|
|
805
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
806
|
-
refreshUrl: z.string().optional(),
|
|
807
|
-
refreshFormUrl: z.string().optional(),
|
|
808
|
-
placeholder: z.string().optional(),
|
|
809
|
-
minimum: z.number().optional(),
|
|
810
|
-
maximum: z.number().optional(),
|
|
811
909
|
$id: z.string().optional(),
|
|
910
|
+
items: z.array(schemaSchema),
|
|
812
911
|
title: z.string().optional(),
|
|
813
912
|
description: z.string().optional(),
|
|
814
913
|
control: z.string().optional(),
|
|
815
|
-
default: z.number().optional(),
|
|
816
914
|
hidden: z.boolean().optional(),
|
|
817
|
-
disabled: z.boolean().optional(),
|
|
818
915
|
icon: iconSchema.optional(),
|
|
819
916
|
image: imageSchema.optional(),
|
|
820
917
|
keywords: z.array(z.string()).optional(),
|
|
821
918
|
summary: summaryProviderSchema.optional(),
|
|
822
919
|
analyticsId: z.string().optional(),
|
|
823
920
|
persistAsync: persistAsyncSchema.optional(),
|
|
824
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
825
921
|
validationAsync: validateAsyncSchema.optional(),
|
|
826
|
-
validationMessages: z.record(z.string()).optional(),
|
|
827
922
|
alert: alertLayoutSchema.optional(),
|
|
828
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
829
|
-
autofillKey: z.string().optional(),
|
|
830
|
-
help: helpSchema.optional(),
|
|
831
|
-
onChange: behaviorSchema.optional(),
|
|
832
923
|
}),
|
|
833
924
|
);
|
|
834
925
|
|
|
835
|
-
export const
|
|
926
|
+
export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
836
927
|
z.object({
|
|
837
|
-
type: z.literal('
|
|
928
|
+
type: z.literal('string'),
|
|
838
929
|
autofillProvider: z.string().optional(),
|
|
839
930
|
promoted: z.boolean().optional(),
|
|
840
931
|
refreshFormOnChange: z.boolean().optional(),
|
|
841
932
|
refreshUrl: z.string().optional(),
|
|
842
933
|
refreshFormUrl: z.string().optional(),
|
|
934
|
+
format: stringSchemaFormatSchema.optional(),
|
|
935
|
+
displayFormat: z.string().optional(),
|
|
843
936
|
placeholder: z.string().optional(),
|
|
844
|
-
|
|
845
|
-
|
|
937
|
+
minLength: z.number().optional(),
|
|
938
|
+
maxLength: z.number().optional(),
|
|
939
|
+
minimum: z.string().optional(),
|
|
940
|
+
maximum: z.string().optional(),
|
|
941
|
+
pattern: z.string().optional(),
|
|
942
|
+
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
943
|
+
autocorrect: z.boolean().optional(),
|
|
846
944
|
$id: z.string().optional(),
|
|
847
945
|
title: z.string().optional(),
|
|
848
946
|
description: z.string().optional(),
|
|
849
947
|
control: z.string().optional(),
|
|
850
|
-
default: z.
|
|
948
|
+
default: z.string().optional(),
|
|
851
949
|
hidden: z.boolean().optional(),
|
|
852
950
|
disabled: z.boolean().optional(),
|
|
853
951
|
icon: iconSchema.optional(),
|
|
@@ -860,306 +958,208 @@ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
|
860
958
|
validationAsync: validateAsyncSchema.optional(),
|
|
861
959
|
validationMessages: z.record(z.string()).optional(),
|
|
862
960
|
alert: alertLayoutSchema.optional(),
|
|
961
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
962
|
+
accepts: z.array(z.string()).optional(),
|
|
963
|
+
maxSize: z.number().optional(),
|
|
964
|
+
source: uploadSourceSchema.optional(),
|
|
863
965
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
864
966
|
autofillKey: z.string().optional(),
|
|
865
967
|
help: helpSchema.optional(),
|
|
968
|
+
suggestions: suggestionsSchema.optional(),
|
|
866
969
|
onChange: behaviorSchema.optional(),
|
|
867
970
|
}),
|
|
868
971
|
);
|
|
869
972
|
|
|
870
|
-
export const
|
|
973
|
+
export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
871
974
|
z.object({
|
|
872
|
-
type: z.literal('
|
|
873
|
-
|
|
975
|
+
type: z.literal('number'),
|
|
976
|
+
autofillProvider: z.string().optional(),
|
|
874
977
|
promoted: z.boolean().optional(),
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
978
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
979
|
+
refreshUrl: z.string().optional(),
|
|
980
|
+
refreshFormUrl: z.string().optional(),
|
|
981
|
+
placeholder: z.string().optional(),
|
|
982
|
+
minimum: z.number().optional(),
|
|
983
|
+
maximum: z.number().optional(),
|
|
879
984
|
$id: z.string().optional(),
|
|
880
985
|
title: z.string().optional(),
|
|
881
986
|
description: z.string().optional(),
|
|
882
987
|
control: z.string().optional(),
|
|
988
|
+
default: z.number().optional(),
|
|
883
989
|
hidden: z.boolean().optional(),
|
|
990
|
+
disabled: z.boolean().optional(),
|
|
884
991
|
icon: iconSchema.optional(),
|
|
885
992
|
image: imageSchema.optional(),
|
|
886
993
|
keywords: z.array(z.string()).optional(),
|
|
887
994
|
summary: summaryProviderSchema.optional(),
|
|
888
995
|
analyticsId: z.string().optional(),
|
|
996
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
997
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
998
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
999
|
+
validationMessages: z.record(z.string()).optional(),
|
|
889
1000
|
alert: alertLayoutSchema.optional(),
|
|
1001
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1002
|
+
autofillKey: z.string().optional(),
|
|
1003
|
+
help: helpSchema.optional(),
|
|
1004
|
+
onChange: behaviorSchema.optional(),
|
|
890
1005
|
}),
|
|
891
1006
|
);
|
|
892
1007
|
|
|
893
|
-
export const
|
|
1008
|
+
export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
894
1009
|
z.object({
|
|
1010
|
+
type: z.literal('integer'),
|
|
895
1011
|
autofillProvider: z.string().optional(),
|
|
896
1012
|
promoted: z.boolean().optional(),
|
|
897
1013
|
refreshFormOnChange: z.boolean().optional(),
|
|
898
1014
|
refreshUrl: z.string().optional(),
|
|
899
1015
|
refreshFormUrl: z.string().optional(),
|
|
900
|
-
promotion: jsonElementSchema.optional(),
|
|
901
|
-
oneOf: z.array(schemaSchema),
|
|
902
1016
|
placeholder: z.string().optional(),
|
|
1017
|
+
minimum: z.number().optional(),
|
|
1018
|
+
maximum: z.number().optional(),
|
|
903
1019
|
$id: z.string().optional(),
|
|
904
1020
|
title: z.string().optional(),
|
|
905
1021
|
description: z.string().optional(),
|
|
906
1022
|
control: z.string().optional(),
|
|
907
|
-
default:
|
|
1023
|
+
default: z.number().optional(),
|
|
908
1024
|
hidden: z.boolean().optional(),
|
|
1025
|
+
disabled: z.boolean().optional(),
|
|
909
1026
|
icon: iconSchema.optional(),
|
|
910
1027
|
image: imageSchema.optional(),
|
|
911
1028
|
keywords: z.array(z.string()).optional(),
|
|
912
1029
|
summary: summaryProviderSchema.optional(),
|
|
913
1030
|
analyticsId: z.string().optional(),
|
|
1031
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
914
1032
|
refreshStepOnChange: z.boolean().optional(),
|
|
1033
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
1034
|
+
validationMessages: z.record(z.string()).optional(),
|
|
915
1035
|
alert: alertLayoutSchema.optional(),
|
|
916
|
-
help: helpSchema.optional(),
|
|
917
1036
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
918
1037
|
autofillKey: z.string().optional(),
|
|
919
|
-
|
|
920
|
-
disabled: z.boolean().optional(),
|
|
1038
|
+
help: helpSchema.optional(),
|
|
921
1039
|
onChange: behaviorSchema.optional(),
|
|
922
1040
|
}),
|
|
923
1041
|
);
|
|
924
1042
|
|
|
925
|
-
export const
|
|
926
|
-
z.object({
|
|
927
|
-
action: actionSchema.optional(),
|
|
928
|
-
behavior: behaviorSchema.optional(),
|
|
929
|
-
}),
|
|
930
|
-
);
|
|
931
|
-
|
|
932
|
-
export const modalBehaviorSchema: z.ZodSchema<ModalBehavior> = z.lazy(() =>
|
|
933
|
-
z.object({
|
|
934
|
-
type: z.literal('modal'),
|
|
935
|
-
title: z.string().optional(),
|
|
936
|
-
content: z.array(layoutSchema),
|
|
937
|
-
}),
|
|
938
|
-
);
|
|
939
|
-
|
|
940
|
-
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
941
|
-
z.object({
|
|
942
|
-
title: z.string().optional(),
|
|
943
|
-
components: z.array(layoutSchema),
|
|
944
|
-
}),
|
|
945
|
-
);
|
|
946
|
-
|
|
947
|
-
export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
|
|
1043
|
+
export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
948
1044
|
z.object({
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1045
|
+
type: z.literal('object'),
|
|
1046
|
+
disabled: z.boolean().optional(),
|
|
1047
|
+
promoted: z.boolean().optional(),
|
|
1048
|
+
help: helpSchema.optional(),
|
|
1049
|
+
properties: z.record(schemaSchema),
|
|
1050
|
+
displayOrder: z.array(z.string()),
|
|
1051
|
+
required: z.array(z.string()).optional(),
|
|
1052
|
+
$id: z.string().optional(),
|
|
952
1053
|
title: z.string().optional(),
|
|
953
|
-
subtitle: z.string().optional(),
|
|
954
|
-
value: z.string().optional(),
|
|
955
|
-
subvalue: z.string().optional(),
|
|
956
|
-
tag: z.string().optional(),
|
|
957
|
-
additionalInfo: additionalInfoSchema.optional(),
|
|
958
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
959
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
960
|
-
description: z.string().optional(),
|
|
961
|
-
}),
|
|
962
|
-
);
|
|
963
|
-
|
|
964
|
-
export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.lazy(() =>
|
|
965
|
-
z.object({
|
|
966
|
-
title: z.string(),
|
|
967
1054
|
description: z.string().optional(),
|
|
968
|
-
icon: iconSchema,
|
|
969
|
-
status: statusListLayoutStatusSchema.optional(),
|
|
970
|
-
callToAction: itemCallToActionSchema.optional(),
|
|
971
|
-
tag: z.string().optional(),
|
|
972
|
-
}),
|
|
973
|
-
);
|
|
974
|
-
|
|
975
|
-
export const itemCallToActionSchema: z.ZodSchema<ItemCallToAction> = z.lazy(() =>
|
|
976
|
-
z.object({
|
|
977
|
-
title: z.string(),
|
|
978
|
-
accessibilityDescription: z.string().optional(),
|
|
979
|
-
behavior: behaviorSchema,
|
|
980
|
-
}),
|
|
981
|
-
);
|
|
982
|
-
|
|
983
|
-
export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
|
|
984
|
-
z.object({
|
|
985
|
-
type: z.literal('decision'),
|
|
986
|
-
title: z.string().optional(),
|
|
987
|
-
options: z.array(decisionLayoutOptionSchema),
|
|
988
1055
|
control: z.string().optional(),
|
|
989
|
-
|
|
990
|
-
}),
|
|
991
|
-
);
|
|
992
|
-
|
|
993
|
-
export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
|
|
994
|
-
z.object({
|
|
995
|
-
action: actionSchema.optional(),
|
|
996
|
-
title: z.string(),
|
|
997
|
-
description: z.string().optional(),
|
|
998
|
-
disabled: z.boolean().optional(),
|
|
1056
|
+
hidden: z.boolean().optional(),
|
|
999
1057
|
icon: iconSchema.optional(),
|
|
1000
1058
|
image: imageSchema.optional(),
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1006
|
-
}),
|
|
1007
|
-
);
|
|
1008
|
-
|
|
1009
|
-
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
1010
|
-
z.object({
|
|
1011
|
-
action: actionSchema.optional(),
|
|
1012
|
-
title: z.string(),
|
|
1013
|
-
accessibilityDescription: z.string().optional(),
|
|
1014
|
-
behavior: behaviorSchema.optional(),
|
|
1015
|
-
}),
|
|
1016
|
-
);
|
|
1017
|
-
|
|
1018
|
-
export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
|
|
1019
|
-
z.object({
|
|
1020
|
-
title: z.string(),
|
|
1021
|
-
components: z.array(layoutSchema),
|
|
1022
|
-
tag: z.string().optional(),
|
|
1059
|
+
keywords: z.array(z.string()).optional(),
|
|
1060
|
+
summary: summaryProviderSchema.optional(),
|
|
1061
|
+
analyticsId: z.string().optional(),
|
|
1062
|
+
alert: alertLayoutSchema.optional(),
|
|
1023
1063
|
}),
|
|
1024
1064
|
);
|
|
1025
1065
|
|
|
1026
|
-
export const
|
|
1027
|
-
z.
|
|
1028
|
-
type: z.literal('modal'),
|
|
1029
|
-
control: z.string().optional(),
|
|
1030
|
-
margin: sizeSchema.optional(),
|
|
1031
|
-
trigger: modalLayoutTriggerSchema,
|
|
1032
|
-
content: modalLayoutContentSchema,
|
|
1033
|
-
}),
|
|
1066
|
+
export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
|
|
1067
|
+
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
1034
1068
|
);
|
|
1035
1069
|
|
|
1036
|
-
export const
|
|
1070
|
+
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
1037
1071
|
z.object({
|
|
1038
|
-
type: z.literal('
|
|
1039
|
-
|
|
1072
|
+
type: z.literal('array'),
|
|
1073
|
+
promoted: z.boolean().optional(),
|
|
1074
|
+
$id: z.string().optional(),
|
|
1075
|
+
items: schemaSchema,
|
|
1076
|
+
addItemTitle: z.string(),
|
|
1077
|
+
editItemTitle: z.string(),
|
|
1078
|
+
minItems: z.number().optional(),
|
|
1079
|
+
maxItems: z.number().optional(),
|
|
1080
|
+
placeholder: z.string().optional(),
|
|
1040
1081
|
title: z.string().optional(),
|
|
1082
|
+
description: z.string().optional(),
|
|
1041
1083
|
control: z.string().optional(),
|
|
1042
|
-
|
|
1043
|
-
}),
|
|
1044
|
-
);
|
|
1045
|
-
|
|
1046
|
-
export const reviewLayoutFieldSchema: z.ZodSchema<ReviewLayoutField> = z.lazy(() =>
|
|
1047
|
-
z.object({
|
|
1048
|
-
label: z.string(),
|
|
1049
|
-
value: z.string(),
|
|
1050
|
-
rawValue: z.string().optional(),
|
|
1051
|
-
help: helpSchema.optional(),
|
|
1052
|
-
tag: z.string().optional(),
|
|
1084
|
+
hidden: z.boolean().optional(),
|
|
1053
1085
|
icon: iconSchema.optional(),
|
|
1054
1086
|
image: imageSchema.optional(),
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
)
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
title: z.string(),
|
|
1064
|
-
accessibilityDescription: z.string().optional(),
|
|
1065
|
-
behavior: behaviorSchema,
|
|
1066
|
-
}),
|
|
1067
|
-
);
|
|
1068
|
-
|
|
1069
|
-
export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
|
|
1070
|
-
z.object({
|
|
1071
|
-
title: z.string(),
|
|
1072
|
-
accessibilityDescription: z.string().optional(),
|
|
1073
|
-
behavior: behaviorSchema,
|
|
1074
|
-
}),
|
|
1075
|
-
);
|
|
1076
|
-
|
|
1077
|
-
export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
1078
|
-
z.object({
|
|
1079
|
-
type: z.literal('tabs'),
|
|
1080
|
-
tabs: z.array(tabsLayoutTabSchema),
|
|
1081
|
-
control: z.string().optional(),
|
|
1082
|
-
margin: sizeSchema.optional(),
|
|
1083
|
-
}),
|
|
1084
|
-
);
|
|
1085
|
-
|
|
1086
|
-
export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
|
|
1087
|
-
z.object({
|
|
1088
|
-
title: z.string(),
|
|
1089
|
-
accessibilityDescription: z.string().optional(),
|
|
1090
|
-
behavior: behaviorSchema,
|
|
1087
|
+
keywords: z.array(z.string()).optional(),
|
|
1088
|
+
summary: summarySummariserSchema.optional(),
|
|
1089
|
+
analyticsId: z.string().optional(),
|
|
1090
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
1091
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
1092
|
+
alert: alertLayoutSchema.optional(),
|
|
1093
|
+
validationMessages: z.record(z.string()).optional(),
|
|
1094
|
+
disabled: z.boolean().optional(),
|
|
1091
1095
|
}),
|
|
1092
1096
|
);
|
|
1093
1097
|
|
|
1094
|
-
export const
|
|
1098
|
+
export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
|
|
1095
1099
|
z.object({
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
title: z.string(),
|
|
1099
|
-
callToAction: sectionLayoutCallToActionSchema.optional(),
|
|
1100
|
+
hidden: z.boolean().optional(),
|
|
1101
|
+
alert: alertLayoutSchema.optional(),
|
|
1100
1102
|
control: z.string().optional(),
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
|
|
1106
|
-
z.object({
|
|
1107
|
-
type: z.literal('button'),
|
|
1108
|
-
action: actionSchema.optional(),
|
|
1109
|
-
size: sizeSchema.optional(),
|
|
1103
|
+
promoted: z.boolean().optional(),
|
|
1104
|
+
$id: z.string().optional(),
|
|
1105
|
+
const: jsonElementSchema,
|
|
1110
1106
|
title: z.string().optional(),
|
|
1111
|
-
|
|
1112
|
-
|
|
1107
|
+
description: z.string().optional(),
|
|
1108
|
+
icon: iconSchema.optional(),
|
|
1109
|
+
image: imageSchema.optional(),
|
|
1110
|
+
keywords: z.array(z.string()).optional(),
|
|
1111
|
+
summary: summaryProviderSchema.optional(),
|
|
1112
|
+
analyticsId: z.string().optional(),
|
|
1113
1113
|
disabled: z.boolean().optional(),
|
|
1114
|
-
pinOrder: z.number().optional(),
|
|
1115
|
-
control: z.string().optional(),
|
|
1116
|
-
margin: sizeSchema.optional(),
|
|
1117
1114
|
}),
|
|
1118
1115
|
);
|
|
1119
1116
|
|
|
1120
|
-
export const
|
|
1117
|
+
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
1121
1118
|
z.object({
|
|
1122
|
-
type: z.literal('
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1119
|
+
type: z.literal('boolean'),
|
|
1120
|
+
autofillProvider: z.string().optional(),
|
|
1121
|
+
promoted: z.boolean().optional(),
|
|
1122
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
1123
|
+
refreshUrl: z.string().optional(),
|
|
1124
|
+
refreshFormUrl: z.string().optional(),
|
|
1125
|
+
$id: z.string().optional(),
|
|
1126
1126
|
title: z.string().optional(),
|
|
1127
|
-
|
|
1128
|
-
control: z.string().optional(),
|
|
1129
|
-
margin: sizeSchema.optional(),
|
|
1130
|
-
}),
|
|
1131
|
-
);
|
|
1132
|
-
|
|
1133
|
-
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
1134
|
-
z.object({
|
|
1135
|
-
type: z.literal('columns'),
|
|
1136
|
-
left: z.array(layoutSchema),
|
|
1137
|
-
right: z.array(layoutSchema),
|
|
1138
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
1139
|
-
control: z.string().optional(),
|
|
1140
|
-
margin: sizeSchema.optional(),
|
|
1141
|
-
}),
|
|
1142
|
-
);
|
|
1143
|
-
|
|
1144
|
-
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
1145
|
-
z.object({
|
|
1146
|
-
type: z.literal('box'),
|
|
1147
|
-
components: z.array(layoutSchema),
|
|
1148
|
-
width: sizeSchema.optional(),
|
|
1149
|
-
border: z.boolean().optional(),
|
|
1127
|
+
description: z.string().optional(),
|
|
1150
1128
|
control: z.string().optional(),
|
|
1151
|
-
|
|
1129
|
+
default: z.boolean().optional(),
|
|
1130
|
+
hidden: z.boolean().optional(),
|
|
1131
|
+
disabled: z.boolean().optional(),
|
|
1132
|
+
icon: iconSchema.optional(),
|
|
1133
|
+
image: imageSchema.optional(),
|
|
1134
|
+
keywords: z.array(z.string()).optional(),
|
|
1135
|
+
summary: summaryProviderSchema.optional(),
|
|
1136
|
+
analyticsId: z.string().optional(),
|
|
1137
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
1138
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
1139
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
1140
|
+
alert: alertLayoutSchema.optional(),
|
|
1141
|
+
autofillKey: z.string().optional(),
|
|
1142
|
+
help: helpSchema.optional(),
|
|
1143
|
+
onChange: behaviorSchema.optional(),
|
|
1152
1144
|
}),
|
|
1153
1145
|
);
|
|
1154
1146
|
|
|
1155
|
-
export const
|
|
1147
|
+
export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
1156
1148
|
z.object({
|
|
1157
|
-
|
|
1149
|
+
disabled: z.boolean().optional(),
|
|
1150
|
+
promoted: z.boolean().optional(),
|
|
1151
|
+
allOf: z.array(schemaSchema),
|
|
1152
|
+
$id: z.string().optional(),
|
|
1158
1153
|
title: z.string().optional(),
|
|
1159
|
-
|
|
1160
|
-
items: z.array(listLayoutItemSchema),
|
|
1154
|
+
description: z.string().optional(),
|
|
1161
1155
|
control: z.string().optional(),
|
|
1162
|
-
|
|
1156
|
+
hidden: z.boolean().optional(),
|
|
1157
|
+
icon: iconSchema.optional(),
|
|
1158
|
+
image: imageSchema.optional(),
|
|
1159
|
+
keywords: z.array(z.string()).optional(),
|
|
1160
|
+
summary: summaryProviderSchema.optional(),
|
|
1161
|
+
analyticsId: z.string().optional(),
|
|
1162
|
+
alert: alertLayoutSchema.optional(),
|
|
1163
1163
|
}),
|
|
1164
1164
|
);
|
|
1165
1165
|
|