@wise/dynamic-flow-types 3.16.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.js +6 -3
- package/build/main.mjs +6 -3
- package/build/next/layout/MarkdownLayout.d.ts +4 -0
- package/build/next/layout/ParagraphLayout.d.ts +4 -0
- package/build/next/schema/ObjectSchema.d.ts +4 -0
- package/build/renderers/FormSectionRendererProps.d.ts +5 -5
- package/build/renderers/MarkdownRendererProps.d.ts +2 -1
- package/build/renderers/MoneyInputRendererProps.d.ts +29 -0
- package/build/renderers/ParagraphRendererProps.d.ts +2 -1
- package/build/renderers/RendererProps.d.ts +3 -2
- package/build/renderers/SelectInputRendererProps.d.ts +1 -0
- package/build/renderers/index.d.ts +1 -0
- package/build/zod/schemas.d.ts +6 -0
- package/build/zod/schemas.ts +703 -700
- package/package.json +4 -4
package/build/zod/schemas.ts
CHANGED
|
@@ -4,115 +4,54 @@ import {
|
|
|
4
4
|
type JsonElement,
|
|
5
5
|
type AdditionalInfo,
|
|
6
6
|
type Behavior,
|
|
7
|
+
type ModalResponseBody,
|
|
8
|
+
type Layout,
|
|
7
9
|
type Step,
|
|
8
10
|
type Schema,
|
|
9
|
-
type Layout,
|
|
10
11
|
type Polling,
|
|
11
12
|
type LinkHandler,
|
|
12
13
|
type Toolbar,
|
|
13
|
-
type
|
|
14
|
-
type
|
|
15
|
-
type
|
|
16
|
-
type StatusListLayoutItem,
|
|
17
|
-
type ModalLayoutContent,
|
|
18
|
-
type DecisionLayoutOption,
|
|
19
|
-
type AlertLayout,
|
|
20
|
-
type AlertLayoutCallToAction,
|
|
21
|
-
type ItemCallToAction,
|
|
22
|
-
type SectionLayout,
|
|
23
|
-
type SectionLayoutCallToAction,
|
|
24
|
-
type ReviewLayout,
|
|
25
|
-
type ReviewLayoutField,
|
|
26
|
-
type ReviewLayoutCallToAction,
|
|
27
|
-
type ButtonLayout,
|
|
28
|
-
type ListLayoutCallToAction,
|
|
29
|
-
type TabsLayout,
|
|
30
|
-
type BoxLayout,
|
|
31
|
-
type ColumnsLayout,
|
|
32
|
-
type DecisionLayout,
|
|
33
|
-
type ListLayout,
|
|
34
|
-
type ModalLayout,
|
|
35
|
-
type ListLayoutItem,
|
|
36
|
-
type IntegerSchema,
|
|
14
|
+
type ModalBehavior,
|
|
15
|
+
type ToolbarItem,
|
|
16
|
+
type ToolbarButton,
|
|
37
17
|
type PersistAsync,
|
|
38
|
-
type
|
|
18
|
+
type PollingOnError,
|
|
39
19
|
type BlobSchema,
|
|
40
|
-
type
|
|
41
|
-
type ArraySchemaList,
|
|
42
|
-
type ArraySchemaTuple,
|
|
43
|
-
type NumberSchema,
|
|
20
|
+
type AlertLayout,
|
|
44
21
|
type AllOfSchema,
|
|
22
|
+
type ArraySchema,
|
|
45
23
|
type BooleanSchema,
|
|
24
|
+
type ConstSchema,
|
|
25
|
+
type IntegerSchema,
|
|
26
|
+
type NumberSchema,
|
|
46
27
|
type ObjectSchema,
|
|
47
28
|
type OneOfSchema,
|
|
48
29
|
type StringSchema,
|
|
49
|
-
type
|
|
50
|
-
type
|
|
51
|
-
type
|
|
52
|
-
type
|
|
30
|
+
type ArraySchemaList,
|
|
31
|
+
type ArraySchemaTuple,
|
|
32
|
+
type StatusListLayoutItem,
|
|
33
|
+
type ItemCallToAction,
|
|
34
|
+
type ListLayoutItem,
|
|
35
|
+
type ListLayoutCallToAction,
|
|
36
|
+
type ListLayout,
|
|
37
|
+
type ModalLayoutContent,
|
|
38
|
+
type DecisionLayout,
|
|
39
|
+
type DecisionLayoutOption,
|
|
40
|
+
type BoxLayout,
|
|
41
|
+
type ButtonLayout,
|
|
42
|
+
type ColumnsLayout,
|
|
43
|
+
type ModalLayout,
|
|
44
|
+
type ReviewLayout,
|
|
45
|
+
type SectionLayout,
|
|
46
|
+
type StatusListLayout,
|
|
47
|
+
type TabsLayout,
|
|
48
|
+
type AlertLayoutCallToAction,
|
|
49
|
+
type ReviewLayoutField,
|
|
50
|
+
type ReviewLayoutCallToAction,
|
|
51
|
+
type TabsLayoutTab,
|
|
52
|
+
type SectionLayoutCallToAction,
|
|
53
53
|
} from '../next';
|
|
54
54
|
|
|
55
|
-
export const avatarTextContentSchema = z.object({
|
|
56
|
-
type: z.literal('text'),
|
|
57
|
-
text: z.string(),
|
|
58
|
-
badgeUri: z.string().optional(),
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export const avatarUriContentSchema = z.object({
|
|
62
|
-
type: z.literal('uri'),
|
|
63
|
-
uri: z.string(),
|
|
64
|
-
badgeUri: z.string().optional(),
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
export const avatarContentSchema = z.union([avatarTextContentSchema, avatarUriContentSchema]);
|
|
68
|
-
|
|
69
|
-
export const mediaAvatarSchema = z.object({
|
|
70
|
-
type: z.literal('avatar'),
|
|
71
|
-
content: z.array(avatarContentSchema),
|
|
72
|
-
accessibilityDescription: z.string().optional(),
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
export const mediaImageSchema = z.object({
|
|
76
|
-
type: z.literal('image'),
|
|
77
|
-
uri: z.string(),
|
|
78
|
-
accessibilityDescription: z.string().optional(),
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
export const contextSchema = z.union([
|
|
82
|
-
z.literal('positive'),
|
|
83
|
-
z.literal('neutral'),
|
|
84
|
-
z.literal('warning'),
|
|
85
|
-
z.literal('negative'),
|
|
86
|
-
z.literal('success'),
|
|
87
|
-
z.literal('failure'),
|
|
88
|
-
z.literal('info'),
|
|
89
|
-
z.literal('primary'),
|
|
90
|
-
]);
|
|
91
|
-
|
|
92
|
-
export const supportingValuesSchema = z.object({
|
|
93
|
-
value: z.string().optional(),
|
|
94
|
-
subvalue: z.string().optional(),
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
export const iconTextSchema = z.object({
|
|
98
|
-
text: z.string(),
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
export const sizeSchema = z.union([
|
|
102
|
-
z.literal('xs'),
|
|
103
|
-
z.literal('sm'),
|
|
104
|
-
z.literal('md'),
|
|
105
|
-
z.literal('lg'),
|
|
106
|
-
z.literal('xl'),
|
|
107
|
-
]);
|
|
108
|
-
|
|
109
|
-
export const imageSchema = z.object({
|
|
110
|
-
text: z.string().optional(),
|
|
111
|
-
url: z.string().optional(),
|
|
112
|
-
uri: z.string().optional(),
|
|
113
|
-
accessibilityDescription: z.string().optional(),
|
|
114
|
-
});
|
|
115
|
-
|
|
116
55
|
export const autocompleteTokenSchema = z.union([
|
|
117
56
|
z.literal('on'),
|
|
118
57
|
z.literal('name'),
|
|
@@ -179,13 +118,51 @@ export const autocompleteTokenSchema = z.union([
|
|
|
179
118
|
z.literal('pager'),
|
|
180
119
|
]);
|
|
181
120
|
|
|
121
|
+
export const contextSchema = z.union([
|
|
122
|
+
z.literal('positive'),
|
|
123
|
+
z.literal('neutral'),
|
|
124
|
+
z.literal('warning'),
|
|
125
|
+
z.literal('negative'),
|
|
126
|
+
z.literal('success'),
|
|
127
|
+
z.literal('failure'),
|
|
128
|
+
z.literal('info'),
|
|
129
|
+
z.literal('primary'),
|
|
130
|
+
]);
|
|
131
|
+
|
|
132
|
+
export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
|
|
133
|
+
|
|
134
|
+
export const autocapitalizationTypeSchema = z.union([
|
|
135
|
+
z.literal('none'),
|
|
136
|
+
z.literal('characters'),
|
|
137
|
+
z.literal('sentences'),
|
|
138
|
+
z.literal('words'),
|
|
139
|
+
]);
|
|
140
|
+
|
|
141
|
+
export const iconTextSchema = z.object({
|
|
142
|
+
text: z.string(),
|
|
143
|
+
});
|
|
144
|
+
|
|
182
145
|
export const iconNamedSchema = z.object({
|
|
183
146
|
name: z.string(),
|
|
184
147
|
});
|
|
185
148
|
|
|
186
|
-
export const
|
|
149
|
+
export const mediaImageSchema = z.object({
|
|
150
|
+
type: z.literal('image'),
|
|
151
|
+
uri: z.string(),
|
|
152
|
+
accessibilityDescription: z.string().optional(),
|
|
153
|
+
});
|
|
187
154
|
|
|
188
|
-
export const
|
|
155
|
+
export const avatarTextContentSchema = z.object({
|
|
156
|
+
type: z.literal('text'),
|
|
157
|
+
text: z.string(),
|
|
158
|
+
badgeUri: z.string().optional(),
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
export const avatarUriContentSchema = z.object({
|
|
162
|
+
type: z.literal('uri'),
|
|
163
|
+
uri: z.string(),
|
|
164
|
+
badgeUri: z.string().optional(),
|
|
165
|
+
});
|
|
189
166
|
|
|
190
167
|
export const httpMethodSchema = z.union([
|
|
191
168
|
z.literal('GET'),
|
|
@@ -195,13 +172,35 @@ export const httpMethodSchema = z.union([
|
|
|
195
172
|
z.literal('DELETE'),
|
|
196
173
|
]);
|
|
197
174
|
|
|
198
|
-
export const
|
|
199
|
-
z.
|
|
200
|
-
z.
|
|
201
|
-
z.
|
|
202
|
-
z.
|
|
175
|
+
export const imageSchema = z.object({
|
|
176
|
+
text: z.string().optional(),
|
|
177
|
+
url: z.string().optional(),
|
|
178
|
+
uri: z.string().optional(),
|
|
179
|
+
accessibilityDescription: z.string().optional(),
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
export const sizeSchema = z.union([
|
|
183
|
+
z.literal('xs'),
|
|
184
|
+
z.literal('sm'),
|
|
185
|
+
z.literal('md'),
|
|
186
|
+
z.literal('lg'),
|
|
187
|
+
z.literal('xl'),
|
|
203
188
|
]);
|
|
204
189
|
|
|
190
|
+
export const supportingValuesSchema = z.object({
|
|
191
|
+
value: z.string().optional(),
|
|
192
|
+
subvalue: z.string().optional(),
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
196
|
+
|
|
197
|
+
export const searchSearchRequestSchema = z.object({
|
|
198
|
+
url: z.string(),
|
|
199
|
+
method: httpMethodSchema,
|
|
200
|
+
param: z.string(),
|
|
201
|
+
query: z.string(),
|
|
202
|
+
});
|
|
203
|
+
|
|
205
204
|
export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
206
205
|
z
|
|
207
206
|
.union([
|
|
@@ -223,92 +222,103 @@ export const stepErrorSchema = z.object({
|
|
|
223
222
|
validation: jsonElementSchema.optional(),
|
|
224
223
|
});
|
|
225
224
|
|
|
226
|
-
export const
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
export const mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
|
|
225
|
+
export const navigationStackBehaviorSchema = z.union([
|
|
226
|
+
z.literal('default'),
|
|
227
|
+
z.literal('remove-previous'),
|
|
228
|
+
z.literal('remove-all'),
|
|
229
|
+
z.literal('replace-current'),
|
|
230
|
+
]);
|
|
234
231
|
|
|
235
|
-
export const
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
error: z.string().optional(),
|
|
239
|
-
validation: jsonElementSchema.optional(),
|
|
240
|
-
refreshUrl: z.string().optional(),
|
|
232
|
+
export const copyBehaviorSchema = z.object({
|
|
233
|
+
type: z.literal('copy'),
|
|
234
|
+
content: z.string(),
|
|
241
235
|
});
|
|
242
236
|
|
|
243
|
-
export const
|
|
244
|
-
z.literal('
|
|
245
|
-
|
|
246
|
-
z.literal('positive'),
|
|
247
|
-
]);
|
|
237
|
+
export const dismissBehaviorSchema = z.object({
|
|
238
|
+
type: z.literal('dismiss'),
|
|
239
|
+
});
|
|
248
240
|
|
|
249
|
-
export const
|
|
250
|
-
type: z.literal('
|
|
251
|
-
|
|
252
|
-
size: sizeSchema.optional(),
|
|
253
|
-
align: alignSchema.optional(),
|
|
254
|
-
control: z.string().optional(),
|
|
255
|
-
margin: sizeSchema.optional(),
|
|
256
|
-
analyticsId: z.string().optional(),
|
|
257
|
-
tags: z.array(z.string()).optional(),
|
|
241
|
+
export const linkBehaviorSchema = z.object({
|
|
242
|
+
type: z.literal('link'),
|
|
243
|
+
url: z.string(),
|
|
258
244
|
});
|
|
259
245
|
|
|
260
|
-
export const
|
|
261
|
-
type: z.literal('
|
|
262
|
-
text: z.string(),
|
|
263
|
-
align: alignSchema.optional(),
|
|
264
|
-
control: z.string().optional(),
|
|
265
|
-
margin: sizeSchema.optional(),
|
|
266
|
-
analyticsId: z.string().optional(),
|
|
267
|
-
tags: z.array(z.string()).optional(),
|
|
246
|
+
export const refreshBehaviorSchema = z.object({
|
|
247
|
+
type: z.literal('refresh'),
|
|
268
248
|
});
|
|
269
249
|
|
|
270
|
-
export const
|
|
271
|
-
|
|
272
|
-
content: z.string(),
|
|
273
|
-
align: alignSchema.optional(),
|
|
274
|
-
control: z.string().optional(),
|
|
275
|
-
margin: sizeSchema.optional(),
|
|
276
|
-
analyticsId: z.string().optional(),
|
|
277
|
-
tags: z.array(z.string()).optional(),
|
|
250
|
+
export const linkSchema = z.object({
|
|
251
|
+
url: z.string(),
|
|
278
252
|
});
|
|
279
253
|
|
|
280
|
-
export const
|
|
281
|
-
|
|
282
|
-
|
|
254
|
+
export const summaryProviderSchema = z.object({
|
|
255
|
+
providesTitle: z.boolean().optional(),
|
|
256
|
+
providesDescription: z.boolean().optional(),
|
|
257
|
+
providesIcon: z.boolean().optional(),
|
|
258
|
+
providesImage: z.boolean().optional(),
|
|
259
|
+
providesMedia: z.boolean().optional(),
|
|
283
260
|
});
|
|
284
261
|
|
|
285
|
-
export const
|
|
286
|
-
|
|
287
|
-
|
|
262
|
+
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
263
|
+
|
|
264
|
+
export const helpSchema = z.object({
|
|
265
|
+
markdown: z.string(),
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
export const validateAsyncSchema = z.object({
|
|
269
|
+
param: z.string(),
|
|
288
270
|
method: httpMethodSchema,
|
|
289
271
|
url: z.string(),
|
|
290
|
-
param: z.string(),
|
|
291
|
-
emptyMessage: z.string().optional(),
|
|
292
|
-
control: z.string().optional(),
|
|
293
|
-
margin: sizeSchema.optional(),
|
|
294
|
-
analyticsId: z.string().optional(),
|
|
295
|
-
tags: z.array(z.string()).optional(),
|
|
296
272
|
});
|
|
297
273
|
|
|
274
|
+
export const actionTypeSchema = z.union([
|
|
275
|
+
z.literal('primary'),
|
|
276
|
+
z.literal('secondary'),
|
|
277
|
+
z.literal('link'),
|
|
278
|
+
z.literal('positive'),
|
|
279
|
+
z.literal('negative'),
|
|
280
|
+
]);
|
|
281
|
+
|
|
282
|
+
export const actionSchema = z.object({
|
|
283
|
+
title: z.string().optional(),
|
|
284
|
+
type: actionTypeSchema.optional(),
|
|
285
|
+
disabled: z.boolean().optional(),
|
|
286
|
+
$id: z.string().optional(),
|
|
287
|
+
$ref: z.string().optional(),
|
|
288
|
+
id: z.string().optional(),
|
|
289
|
+
url: z.string().optional(),
|
|
290
|
+
method: httpMethodSchema.optional(),
|
|
291
|
+
exit: z.boolean().optional(),
|
|
292
|
+
result: jsonElementSchema.optional(),
|
|
293
|
+
data: jsonElementSchema.optional(),
|
|
294
|
+
timeout: z.number().optional(),
|
|
295
|
+
skipValidation: z.boolean().optional(),
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
export const stringSchemaFormatSchema = z.union([
|
|
299
|
+
z.literal('date'),
|
|
300
|
+
z.literal('email'),
|
|
301
|
+
z.literal('numeric'),
|
|
302
|
+
z.literal('password'),
|
|
303
|
+
z.literal('phone-number'),
|
|
304
|
+
z.literal('base64url'),
|
|
305
|
+
]);
|
|
306
|
+
|
|
298
307
|
export const statusListLayoutStatusSchema = z.union([
|
|
299
308
|
z.literal('not-done'),
|
|
300
309
|
z.literal('pending'),
|
|
301
310
|
z.literal('done'),
|
|
302
311
|
]);
|
|
303
312
|
|
|
304
|
-
export const
|
|
305
|
-
z.literal('
|
|
306
|
-
z.literal('
|
|
307
|
-
z.literal('
|
|
313
|
+
export const listLayoutStatusSchema = z.union([
|
|
314
|
+
z.literal('warning'),
|
|
315
|
+
z.literal('neutral'),
|
|
316
|
+
z.literal('positive'),
|
|
308
317
|
]);
|
|
309
318
|
|
|
310
|
-
export const
|
|
311
|
-
|
|
319
|
+
export const inlineAlertSchema = z.object({
|
|
320
|
+
content: z.string(),
|
|
321
|
+
context: contextSchema.optional(),
|
|
312
322
|
});
|
|
313
323
|
|
|
314
324
|
export const dividerLayoutSchema = z.object({
|
|
@@ -319,6 +329,17 @@ export const dividerLayoutSchema = z.object({
|
|
|
319
329
|
tags: z.array(z.string()).optional(),
|
|
320
330
|
});
|
|
321
331
|
|
|
332
|
+
export const headingLayoutSchema = z.object({
|
|
333
|
+
type: z.literal('heading'),
|
|
334
|
+
text: z.string(),
|
|
335
|
+
size: sizeSchema.optional(),
|
|
336
|
+
align: alignSchema.optional(),
|
|
337
|
+
control: z.string().optional(),
|
|
338
|
+
margin: sizeSchema.optional(),
|
|
339
|
+
analyticsId: z.string().optional(),
|
|
340
|
+
tags: z.array(z.string()).optional(),
|
|
341
|
+
});
|
|
342
|
+
|
|
322
343
|
export const imageLayoutSchema = z.object({
|
|
323
344
|
type: z.literal('image'),
|
|
324
345
|
text: z.string().optional(),
|
|
@@ -352,6 +373,28 @@ export const loadingIndicatorLayoutSchema = z.object({
|
|
|
352
373
|
tags: z.array(z.string()).optional(),
|
|
353
374
|
});
|
|
354
375
|
|
|
376
|
+
export const markdownLayoutSchema = z.object({
|
|
377
|
+
type: z.literal('markdown'),
|
|
378
|
+
content: z.string(),
|
|
379
|
+
align: alignSchema.optional(),
|
|
380
|
+
control: z.string().optional(),
|
|
381
|
+
margin: sizeSchema.optional(),
|
|
382
|
+
analyticsId: z.string().optional(),
|
|
383
|
+
tags: z.array(z.string()).optional(),
|
|
384
|
+
size: sizeSchema.optional(),
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
export const paragraphLayoutSchema = z.object({
|
|
388
|
+
type: z.literal('paragraph'),
|
|
389
|
+
text: z.string(),
|
|
390
|
+
align: alignSchema.optional(),
|
|
391
|
+
control: z.string().optional(),
|
|
392
|
+
margin: sizeSchema.optional(),
|
|
393
|
+
analyticsId: z.string().optional(),
|
|
394
|
+
tags: z.array(z.string()).optional(),
|
|
395
|
+
size: sizeSchema.optional(),
|
|
396
|
+
});
|
|
397
|
+
|
|
355
398
|
export const progressLayoutSchema = z.object({
|
|
356
399
|
type: z.literal('progress'),
|
|
357
400
|
title: z.string().optional(),
|
|
@@ -366,6 +409,33 @@ export const progressLayoutSchema = z.object({
|
|
|
366
409
|
tags: z.array(z.string()).optional(),
|
|
367
410
|
});
|
|
368
411
|
|
|
412
|
+
export const searchLayoutSchema = z.object({
|
|
413
|
+
type: z.literal('search'),
|
|
414
|
+
title: z.string(),
|
|
415
|
+
method: httpMethodSchema,
|
|
416
|
+
url: z.string(),
|
|
417
|
+
param: z.string(),
|
|
418
|
+
emptyMessage: z.string().optional(),
|
|
419
|
+
control: z.string().optional(),
|
|
420
|
+
margin: sizeSchema.optional(),
|
|
421
|
+
analyticsId: z.string().optional(),
|
|
422
|
+
tags: z.array(z.string()).optional(),
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
export const instructionsLayoutItemSchema = z.object({
|
|
426
|
+
text: z.string(),
|
|
427
|
+
context: contextSchema,
|
|
428
|
+
tag: z.string().optional(),
|
|
429
|
+
analyticsId: z.string().optional(),
|
|
430
|
+
tags: z.array(z.string()).optional(),
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
export const columnsLayoutBiasSchema = z.union([
|
|
434
|
+
z.literal('none'),
|
|
435
|
+
z.literal('left'),
|
|
436
|
+
z.literal('right'),
|
|
437
|
+
]);
|
|
438
|
+
|
|
369
439
|
export const formLayoutSchemaReferenceSchema = z.object({
|
|
370
440
|
$ref: z.string(),
|
|
371
441
|
});
|
|
@@ -384,14 +454,6 @@ export const formLayoutSchema = z.object({
|
|
|
384
454
|
tags: z.array(z.string()).optional(),
|
|
385
455
|
});
|
|
386
456
|
|
|
387
|
-
export const instructionsLayoutItemSchema = z.object({
|
|
388
|
-
text: z.string(),
|
|
389
|
-
context: contextSchema,
|
|
390
|
-
tag: z.string().optional(),
|
|
391
|
-
analyticsId: z.string().optional(),
|
|
392
|
-
tags: z.array(z.string()).optional(),
|
|
393
|
-
});
|
|
394
|
-
|
|
395
457
|
export const instructionsLayoutSchema = z.object({
|
|
396
458
|
type: z.literal('instructions'),
|
|
397
459
|
title: z.string().optional(),
|
|
@@ -402,64 +464,36 @@ export const instructionsLayoutSchema = z.object({
|
|
|
402
464
|
tags: z.array(z.string()).optional(),
|
|
403
465
|
});
|
|
404
466
|
|
|
405
|
-
export const
|
|
406
|
-
providesTitle: z.boolean().optional(),
|
|
407
|
-
providesDescription: z.boolean().optional(),
|
|
408
|
-
providesIcon: z.boolean().optional(),
|
|
409
|
-
providesImage: z.boolean().optional(),
|
|
410
|
-
providesMedia: z.boolean().optional(),
|
|
411
|
-
});
|
|
412
|
-
|
|
413
|
-
export const validateAsyncSchema = z.object({
|
|
414
|
-
param: z.string(),
|
|
415
|
-
method: httpMethodSchema,
|
|
416
|
-
url: z.string(),
|
|
417
|
-
});
|
|
418
|
-
|
|
419
|
-
export const stringSchemaFormatSchema = z.union([
|
|
420
|
-
z.literal('date'),
|
|
421
|
-
z.literal('email'),
|
|
422
|
-
z.literal('numeric'),
|
|
423
|
-
z.literal('password'),
|
|
424
|
-
z.literal('phone-number'),
|
|
425
|
-
z.literal('base64url'),
|
|
426
|
-
]);
|
|
427
|
-
|
|
428
|
-
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
467
|
+
export const avatarContentSchema = z.union([avatarTextContentSchema, avatarUriContentSchema]);
|
|
429
468
|
|
|
430
|
-
export const
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
defaultImage: imageSchema.optional(),
|
|
435
|
-
providesTitle: z.boolean().optional(),
|
|
436
|
-
providesDescription: z.boolean().optional(),
|
|
437
|
-
providesIcon: z.boolean().optional(),
|
|
438
|
-
providesImage: z.boolean().optional(),
|
|
439
|
-
defaultMedia: mediaSchema.optional(),
|
|
440
|
-
providesMedia: z.boolean().optional(),
|
|
469
|
+
export const mediaAvatarSchema = z.object({
|
|
470
|
+
type: z.literal('avatar'),
|
|
471
|
+
content: z.array(avatarContentSchema),
|
|
472
|
+
accessibilityDescription: z.string().optional(),
|
|
441
473
|
});
|
|
442
474
|
|
|
443
|
-
export const
|
|
444
|
-
|
|
475
|
+
export const actionResponseBodySchema = z.object({
|
|
476
|
+
action: actionSchema,
|
|
445
477
|
});
|
|
446
478
|
|
|
447
|
-
export const
|
|
448
|
-
z.literal('default'),
|
|
449
|
-
z.literal('remove-previous'),
|
|
450
|
-
z.literal('remove-all'),
|
|
451
|
-
z.literal('replace-current'),
|
|
452
|
-
]);
|
|
479
|
+
export const mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
|
|
453
480
|
|
|
454
|
-
export const
|
|
455
|
-
type: z.literal('
|
|
456
|
-
|
|
481
|
+
export const searchResultActionSchema = z.object({
|
|
482
|
+
type: z.literal('action'),
|
|
483
|
+
title: z.string(),
|
|
484
|
+
description: z.string().optional(),
|
|
485
|
+
icon: iconSchema.optional(),
|
|
486
|
+
image: imageSchema.optional(),
|
|
487
|
+
value: actionSchema,
|
|
488
|
+
media: mediaSchema.optional(),
|
|
457
489
|
});
|
|
458
490
|
|
|
459
|
-
export const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
491
|
+
export const errorResponseBodySchema = z.object({
|
|
492
|
+
refreshFormUrl: z.string().optional(),
|
|
493
|
+
analytics: z.record(z.string()).optional(),
|
|
494
|
+
error: z.string().optional(),
|
|
495
|
+
validation: jsonElementSchema.optional(),
|
|
496
|
+
refreshUrl: z.string().optional(),
|
|
463
497
|
});
|
|
464
498
|
|
|
465
499
|
export const suggestionsValueSchema = z.object({
|
|
@@ -473,55 +507,42 @@ export const suggestionsValueSchema = z.object({
|
|
|
473
507
|
tags: z.array(z.string()).optional(),
|
|
474
508
|
});
|
|
475
509
|
|
|
476
|
-
export const
|
|
477
|
-
type: z.literal('
|
|
478
|
-
|
|
510
|
+
export const actionBehaviorSchema = z.object({
|
|
511
|
+
type: z.literal('action'),
|
|
512
|
+
action: actionSchema,
|
|
479
513
|
});
|
|
480
514
|
|
|
481
|
-
export const
|
|
482
|
-
|
|
515
|
+
export const containerBehaviorSchema = z.object({
|
|
516
|
+
action: actionSchema.optional(),
|
|
517
|
+
link: linkSchema.optional(),
|
|
483
518
|
});
|
|
484
519
|
|
|
485
|
-
export const
|
|
486
|
-
z.
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
z.literal('positive'),
|
|
490
|
-
z.literal('negative'),
|
|
491
|
-
]);
|
|
520
|
+
export const navigationBackBehaviorSchema = z.object({
|
|
521
|
+
title: z.string().optional(),
|
|
522
|
+
action: actionSchema,
|
|
523
|
+
});
|
|
492
524
|
|
|
493
|
-
export const
|
|
494
|
-
|
|
525
|
+
export const navigationSchema = z.object({
|
|
526
|
+
backButton: navigationBackBehaviorSchema.optional(),
|
|
527
|
+
back: navigationBackBehaviorSchema.optional(),
|
|
528
|
+
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
495
529
|
});
|
|
496
530
|
|
|
497
|
-
export const
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
data: jsonElementSchema.optional(),
|
|
509
|
-
timeout: z.number().optional(),
|
|
510
|
-
skipValidation: z.boolean().optional(),
|
|
511
|
-
});
|
|
512
|
-
|
|
513
|
-
export const actionResponseBodySchema = z.object({
|
|
514
|
-
action: actionSchema,
|
|
531
|
+
export const summarySummariserSchema = z.object({
|
|
532
|
+
defaultTitle: z.string().optional(),
|
|
533
|
+
defaultDescription: z.string().optional(),
|
|
534
|
+
defaultIcon: iconSchema.optional(),
|
|
535
|
+
defaultImage: imageSchema.optional(),
|
|
536
|
+
providesTitle: z.boolean().optional(),
|
|
537
|
+
providesDescription: z.boolean().optional(),
|
|
538
|
+
providesIcon: z.boolean().optional(),
|
|
539
|
+
providesImage: z.boolean().optional(),
|
|
540
|
+
defaultMedia: mediaSchema.optional(),
|
|
541
|
+
providesMedia: z.boolean().optional(),
|
|
515
542
|
});
|
|
516
543
|
|
|
517
|
-
export const
|
|
518
|
-
|
|
519
|
-
title: z.string(),
|
|
520
|
-
description: z.string().optional(),
|
|
521
|
-
icon: iconSchema.optional(),
|
|
522
|
-
image: imageSchema.optional(),
|
|
523
|
-
value: actionSchema,
|
|
524
|
-
media: mediaSchema.optional(),
|
|
544
|
+
export const suggestionsSchema = z.object({
|
|
545
|
+
values: z.array(suggestionsValueSchema),
|
|
525
546
|
});
|
|
526
547
|
|
|
527
548
|
export const searchResultSearchSchema = z.object({
|
|
@@ -534,29 +555,10 @@ export const searchResultSearchSchema = z.object({
|
|
|
534
555
|
media: mediaSchema.optional(),
|
|
535
556
|
});
|
|
536
557
|
|
|
537
|
-
export const navigationBackBehaviorSchema = z.object({
|
|
538
|
-
title: z.string().optional(),
|
|
539
|
-
action: actionSchema,
|
|
540
|
-
});
|
|
541
|
-
|
|
542
|
-
export const navigationSchema = z.object({
|
|
543
|
-
backButton: navigationBackBehaviorSchema.optional(),
|
|
544
|
-
back: navigationBackBehaviorSchema.optional(),
|
|
545
|
-
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
546
|
-
});
|
|
547
|
-
|
|
548
|
-
export const actionBehaviorSchema = z.object({
|
|
549
|
-
type: z.literal('action'),
|
|
550
|
-
action: actionSchema,
|
|
551
|
-
});
|
|
552
|
-
|
|
553
|
-
export const containerBehaviorSchema = z.object({
|
|
554
|
-
action: actionSchema.optional(),
|
|
555
|
-
link: linkSchema.optional(),
|
|
556
|
-
});
|
|
557
|
-
|
|
558
558
|
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
559
559
|
|
|
560
|
+
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
561
|
+
|
|
560
562
|
export const searchResponseBodySchema = z.object({
|
|
561
563
|
results: z.array(searchResultSchema),
|
|
562
564
|
});
|
|
@@ -581,6 +583,40 @@ export const behaviorSchema: z.ZodSchema<Behavior> = z.lazy(() =>
|
|
|
581
583
|
]),
|
|
582
584
|
);
|
|
583
585
|
|
|
586
|
+
export const modalResponseBodySchema: z.ZodSchema<ModalResponseBody> = z.lazy(() =>
|
|
587
|
+
z.object({
|
|
588
|
+
title: z.string().optional(),
|
|
589
|
+
content: z.array(layoutSchema),
|
|
590
|
+
}),
|
|
591
|
+
);
|
|
592
|
+
|
|
593
|
+
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
594
|
+
z.union([
|
|
595
|
+
alertLayoutSchema,
|
|
596
|
+
boxLayoutSchema,
|
|
597
|
+
buttonLayoutSchema,
|
|
598
|
+
columnsLayoutSchema,
|
|
599
|
+
decisionLayoutSchema,
|
|
600
|
+
dividerLayoutSchema,
|
|
601
|
+
formLayoutSchema,
|
|
602
|
+
headingLayoutSchema,
|
|
603
|
+
imageLayoutSchema,
|
|
604
|
+
infoLayoutSchema,
|
|
605
|
+
instructionsLayoutSchema,
|
|
606
|
+
listLayoutSchema,
|
|
607
|
+
loadingIndicatorLayoutSchema,
|
|
608
|
+
markdownLayoutSchema,
|
|
609
|
+
modalLayoutSchema,
|
|
610
|
+
paragraphLayoutSchema,
|
|
611
|
+
progressLayoutSchema,
|
|
612
|
+
reviewLayoutSchema,
|
|
613
|
+
searchLayoutSchema,
|
|
614
|
+
sectionLayoutSchema,
|
|
615
|
+
statusListLayoutSchema,
|
|
616
|
+
tabsLayoutSchema,
|
|
617
|
+
]),
|
|
618
|
+
);
|
|
619
|
+
|
|
584
620
|
export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
585
621
|
z.object({
|
|
586
622
|
key: z.string().optional(),
|
|
@@ -622,33 +658,6 @@ export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
|
|
|
622
658
|
]),
|
|
623
659
|
);
|
|
624
660
|
|
|
625
|
-
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
626
|
-
z.union([
|
|
627
|
-
alertLayoutSchema,
|
|
628
|
-
boxLayoutSchema,
|
|
629
|
-
buttonLayoutSchema,
|
|
630
|
-
columnsLayoutSchema,
|
|
631
|
-
decisionLayoutSchema,
|
|
632
|
-
dividerLayoutSchema,
|
|
633
|
-
formLayoutSchema,
|
|
634
|
-
headingLayoutSchema,
|
|
635
|
-
imageLayoutSchema,
|
|
636
|
-
infoLayoutSchema,
|
|
637
|
-
instructionsLayoutSchema,
|
|
638
|
-
listLayoutSchema,
|
|
639
|
-
loadingIndicatorLayoutSchema,
|
|
640
|
-
markdownLayoutSchema,
|
|
641
|
-
modalLayoutSchema,
|
|
642
|
-
paragraphLayoutSchema,
|
|
643
|
-
progressLayoutSchema,
|
|
644
|
-
reviewLayoutSchema,
|
|
645
|
-
searchLayoutSchema,
|
|
646
|
-
sectionLayoutSchema,
|
|
647
|
-
statusListLayoutSchema,
|
|
648
|
-
tabsLayoutSchema,
|
|
649
|
-
]),
|
|
650
|
-
);
|
|
651
|
-
|
|
652
661
|
export const pollingSchema: z.ZodSchema<Polling> = z.lazy(() =>
|
|
653
662
|
z.object({
|
|
654
663
|
interval: z.number().optional(),
|
|
@@ -675,71 +684,71 @@ export const toolbarSchema: z.ZodSchema<Toolbar> = z.lazy(() =>
|
|
|
675
684
|
}),
|
|
676
685
|
);
|
|
677
686
|
|
|
678
|
-
export const
|
|
687
|
+
export const modalBehaviorSchema: z.ZodSchema<ModalBehavior> = z.lazy(() =>
|
|
679
688
|
z.object({
|
|
689
|
+
type: z.literal('modal'),
|
|
680
690
|
title: z.string().optional(),
|
|
681
691
|
content: z.array(layoutSchema),
|
|
682
692
|
}),
|
|
683
693
|
);
|
|
684
694
|
|
|
685
|
-
export const
|
|
686
|
-
z.object({
|
|
687
|
-
title: z.string(),
|
|
688
|
-
components: z.array(layoutSchema),
|
|
689
|
-
tag: z.string().optional(),
|
|
690
|
-
analyticsId: z.string().optional(),
|
|
691
|
-
tags: z.array(z.string()).optional(),
|
|
692
|
-
}),
|
|
693
|
-
);
|
|
695
|
+
export const toolbarItemSchema: z.ZodSchema<ToolbarItem> = z.lazy(() => toolbarButtonSchema);
|
|
694
696
|
|
|
695
|
-
export const
|
|
697
|
+
export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
|
|
696
698
|
z.object({
|
|
697
|
-
type: z.literal('
|
|
698
|
-
|
|
699
|
-
|
|
699
|
+
type: z.literal('toolbar-button'),
|
|
700
|
+
title: z.string(),
|
|
701
|
+
behavior: behaviorSchema,
|
|
702
|
+
accessibilityDescription: z.string().optional(),
|
|
703
|
+
media: mediaSchema.optional(),
|
|
700
704
|
control: z.string().optional(),
|
|
701
|
-
|
|
705
|
+
context: contextSchema.optional(),
|
|
706
|
+
disabled: z.boolean().optional(),
|
|
702
707
|
analyticsId: z.string().optional(),
|
|
703
708
|
tags: z.array(z.string()).optional(),
|
|
704
709
|
}),
|
|
705
710
|
);
|
|
706
711
|
|
|
707
|
-
export const
|
|
712
|
+
export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
|
|
708
713
|
z.object({
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
tag: z.string().optional(),
|
|
715
|
-
analyticsId: z.string().optional(),
|
|
716
|
-
tags: z.array(z.string()).optional(),
|
|
714
|
+
param: z.string(),
|
|
715
|
+
idProperty: z.string(),
|
|
716
|
+
schema: schemaSchema,
|
|
717
|
+
url: z.string(),
|
|
718
|
+
method: httpMethodSchema,
|
|
717
719
|
}),
|
|
718
720
|
);
|
|
719
721
|
|
|
720
|
-
export const
|
|
722
|
+
export const pollingOnErrorSchema: z.ZodSchema<PollingOnError> = z.lazy(() =>
|
|
721
723
|
z.object({
|
|
722
|
-
|
|
723
|
-
|
|
724
|
+
action: actionSchema.optional(),
|
|
725
|
+
behavior: behaviorSchema.optional(),
|
|
724
726
|
}),
|
|
725
727
|
);
|
|
726
728
|
|
|
727
|
-
export const
|
|
729
|
+
export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
|
|
728
730
|
z.object({
|
|
729
|
-
|
|
730
|
-
|
|
731
|
+
type: z.literal('blob'),
|
|
732
|
+
promoted: z.boolean().optional(),
|
|
733
|
+
$id: z.string().optional(),
|
|
734
|
+
title: z.string().optional(),
|
|
731
735
|
description: z.string().optional(),
|
|
732
|
-
|
|
736
|
+
control: z.string().optional(),
|
|
737
|
+
hidden: z.boolean().optional(),
|
|
733
738
|
icon: iconSchema.optional(),
|
|
734
739
|
image: imageSchema.optional(),
|
|
735
|
-
behavior: behaviorSchema.optional(),
|
|
736
|
-
tag: z.string().optional(),
|
|
737
|
-
additionalText: z.string().optional(),
|
|
738
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
739
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
740
|
-
media: mediaSchema.optional(),
|
|
741
|
-
analyticsId: z.string().optional(),
|
|
742
740
|
keywords: z.array(z.string()).optional(),
|
|
741
|
+
summary: summaryProviderSchema.optional(),
|
|
742
|
+
analyticsId: z.string().optional(),
|
|
743
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
744
|
+
validationMessages: z.record(z.string()).optional(),
|
|
745
|
+
alert: alertLayoutSchema.optional(),
|
|
746
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
747
|
+
accepts: z.array(z.string()).optional(),
|
|
748
|
+
maxSize: z.number().optional(),
|
|
749
|
+
source: uploadSourceSchema.optional(),
|
|
750
|
+
disabled: z.boolean().optional(),
|
|
751
|
+
media: mediaSchema.optional(),
|
|
743
752
|
tags: z.array(z.string()).optional(),
|
|
744
753
|
}),
|
|
745
754
|
);
|
|
@@ -757,202 +766,82 @@ export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
|
|
|
757
766
|
}),
|
|
758
767
|
);
|
|
759
768
|
|
|
760
|
-
export const
|
|
769
|
+
export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
761
770
|
z.object({
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
771
|
+
disabled: z.boolean().optional(),
|
|
772
|
+
promoted: z.boolean().optional(),
|
|
773
|
+
allOf: z.array(schemaSchema),
|
|
774
|
+
$id: z.string().optional(),
|
|
775
|
+
title: z.string().optional(),
|
|
776
|
+
description: z.string().optional(),
|
|
777
|
+
control: z.string().optional(),
|
|
778
|
+
hidden: z.boolean().optional(),
|
|
779
|
+
icon: iconSchema.optional(),
|
|
780
|
+
image: imageSchema.optional(),
|
|
781
|
+
keywords: z.array(z.string()).optional(),
|
|
782
|
+
summary: summaryProviderSchema.optional(),
|
|
783
|
+
analyticsId: z.string().optional(),
|
|
784
|
+
alert: alertLayoutSchema.optional(),
|
|
785
|
+
media: mediaSchema.optional(),
|
|
786
|
+
tags: z.array(z.string()).optional(),
|
|
765
787
|
}),
|
|
766
788
|
);
|
|
767
789
|
|
|
768
|
-
export const
|
|
769
|
-
z.
|
|
770
|
-
title: z.string(),
|
|
771
|
-
accessibilityDescription: z.string().optional(),
|
|
772
|
-
behavior: behaviorSchema,
|
|
773
|
-
}),
|
|
790
|
+
export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
|
|
791
|
+
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
774
792
|
);
|
|
775
793
|
|
|
776
|
-
export const
|
|
794
|
+
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
777
795
|
z.object({
|
|
778
|
-
type: z.literal('
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
796
|
+
type: z.literal('boolean'),
|
|
797
|
+
autofillProvider: z.string().optional(),
|
|
798
|
+
promoted: z.boolean().optional(),
|
|
799
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
800
|
+
refreshUrl: z.string().optional(),
|
|
801
|
+
refreshFormUrl: z.string().optional(),
|
|
802
|
+
$id: z.string().optional(),
|
|
803
|
+
title: z.string().optional(),
|
|
804
|
+
description: z.string().optional(),
|
|
782
805
|
control: z.string().optional(),
|
|
783
|
-
|
|
806
|
+
default: z.boolean().optional(),
|
|
807
|
+
hidden: z.boolean().optional(),
|
|
808
|
+
disabled: z.boolean().optional(),
|
|
809
|
+
icon: iconSchema.optional(),
|
|
810
|
+
image: imageSchema.optional(),
|
|
811
|
+
keywords: z.array(z.string()).optional(),
|
|
812
|
+
summary: summaryProviderSchema.optional(),
|
|
784
813
|
analyticsId: z.string().optional(),
|
|
814
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
815
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
816
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
817
|
+
alert: alertLayoutSchema.optional(),
|
|
818
|
+
autofillKey: z.string().optional(),
|
|
819
|
+
help: helpSchema.optional(),
|
|
820
|
+
onChange: behaviorSchema.optional(),
|
|
821
|
+
media: mediaSchema.optional(),
|
|
785
822
|
tags: z.array(z.string()).optional(),
|
|
786
823
|
}),
|
|
787
824
|
);
|
|
788
825
|
|
|
789
|
-
export const
|
|
826
|
+
export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
|
|
790
827
|
z.object({
|
|
791
|
-
|
|
792
|
-
accessibilityDescription: z.string().optional(),
|
|
793
|
-
behavior: behaviorSchema,
|
|
794
|
-
}),
|
|
795
|
-
);
|
|
796
|
-
|
|
797
|
-
export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
|
|
798
|
-
z.object({
|
|
799
|
-
type: z.literal('review'),
|
|
800
|
-
orientation: z.string().optional(),
|
|
801
|
-
action: actionSchema.optional(),
|
|
802
|
-
fields: z.array(reviewLayoutFieldSchema),
|
|
803
|
-
title: z.string().optional(),
|
|
804
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
828
|
+
hidden: z.boolean().optional(),
|
|
805
829
|
control: z.string().optional(),
|
|
806
|
-
margin: sizeSchema.optional(),
|
|
807
|
-
analyticsId: z.string().optional(),
|
|
808
830
|
tags: z.array(z.string()).optional(),
|
|
809
|
-
|
|
810
|
-
)
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
label: z.string(),
|
|
815
|
-
value: z.string(),
|
|
816
|
-
rawValue: z.string().optional(),
|
|
817
|
-
help: helpSchema.optional(),
|
|
818
|
-
tag: z.string().optional(),
|
|
831
|
+
promoted: z.boolean().optional(),
|
|
832
|
+
$id: z.string().optional(),
|
|
833
|
+
const: jsonElementSchema,
|
|
834
|
+
title: z.string().optional(),
|
|
835
|
+
description: z.string().optional(),
|
|
819
836
|
icon: iconSchema.optional(),
|
|
820
837
|
image: imageSchema.optional(),
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
824
|
-
media: mediaSchema.optional(),
|
|
838
|
+
keywords: z.array(z.string()).optional(),
|
|
839
|
+
summary: summaryProviderSchema.optional(),
|
|
825
840
|
analyticsId: z.string().optional(),
|
|
826
|
-
tags: z.array(z.string()).optional(),
|
|
827
|
-
}),
|
|
828
|
-
);
|
|
829
|
-
|
|
830
|
-
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
831
|
-
z.object({
|
|
832
|
-
action: actionSchema.optional(),
|
|
833
|
-
title: z.string(),
|
|
834
|
-
accessibilityDescription: z.string().optional(),
|
|
835
|
-
behavior: behaviorSchema.optional(),
|
|
836
|
-
}),
|
|
837
|
-
);
|
|
838
|
-
|
|
839
|
-
export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
|
|
840
|
-
z.object({
|
|
841
|
-
type: z.literal('button'),
|
|
842
|
-
action: actionSchema.optional(),
|
|
843
|
-
size: sizeSchema.optional(),
|
|
844
|
-
title: z.string().optional(),
|
|
845
|
-
behavior: behaviorSchema.optional(),
|
|
846
|
-
context: contextSchema.optional(),
|
|
847
841
|
disabled: z.boolean().optional(),
|
|
848
|
-
pinOrder: z.number().optional(),
|
|
849
|
-
control: z.string().optional(),
|
|
850
|
-
margin: sizeSchema.optional(),
|
|
851
|
-
analyticsId: z.string().optional(),
|
|
852
|
-
tags: z.array(z.string()).optional(),
|
|
853
|
-
}),
|
|
854
|
-
);
|
|
855
|
-
|
|
856
|
-
export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
|
|
857
|
-
z.object({
|
|
858
|
-
title: z.string(),
|
|
859
|
-
accessibilityDescription: z.string().optional(),
|
|
860
|
-
behavior: behaviorSchema,
|
|
861
|
-
}),
|
|
862
|
-
);
|
|
863
|
-
|
|
864
|
-
export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
865
|
-
z.object({
|
|
866
|
-
type: z.literal('tabs'),
|
|
867
|
-
tabs: z.array(tabsLayoutTabSchema),
|
|
868
|
-
control: z.string().optional(),
|
|
869
|
-
margin: sizeSchema.optional(),
|
|
870
|
-
analyticsId: z.string().optional(),
|
|
871
|
-
tags: z.array(z.string()).optional(),
|
|
872
|
-
}),
|
|
873
|
-
);
|
|
874
|
-
|
|
875
|
-
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
876
|
-
z.object({
|
|
877
|
-
type: z.literal('box'),
|
|
878
|
-
components: z.array(layoutSchema),
|
|
879
|
-
width: sizeSchema.optional(),
|
|
880
|
-
border: z.boolean().optional(),
|
|
881
|
-
control: z.string().optional(),
|
|
882
|
-
margin: sizeSchema.optional(),
|
|
883
|
-
analyticsId: z.string().optional(),
|
|
884
|
-
tags: z.array(z.string()).optional(),
|
|
885
|
-
}),
|
|
886
|
-
);
|
|
887
|
-
|
|
888
|
-
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
889
|
-
z.object({
|
|
890
|
-
type: z.literal('columns'),
|
|
891
|
-
left: z.array(layoutSchema),
|
|
892
|
-
right: z.array(layoutSchema),
|
|
893
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
894
|
-
control: z.string().optional(),
|
|
895
|
-
margin: sizeSchema.optional(),
|
|
896
|
-
analyticsId: z.string().optional(),
|
|
897
|
-
tags: z.array(z.string()).optional(),
|
|
898
|
-
}),
|
|
899
|
-
);
|
|
900
|
-
|
|
901
|
-
export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
|
|
902
|
-
z.object({
|
|
903
|
-
type: z.literal('decision'),
|
|
904
|
-
title: z.string().optional(),
|
|
905
|
-
options: z.array(decisionLayoutOptionSchema),
|
|
906
|
-
control: z.string().optional(),
|
|
907
|
-
margin: sizeSchema.optional(),
|
|
908
|
-
analyticsId: z.string().optional(),
|
|
909
|
-
tags: z.array(z.string()).optional(),
|
|
910
|
-
}),
|
|
911
|
-
);
|
|
912
|
-
|
|
913
|
-
export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
|
|
914
|
-
z.object({
|
|
915
|
-
type: z.literal('list'),
|
|
916
|
-
title: z.string().optional(),
|
|
917
|
-
callToAction: listLayoutCallToActionSchema.optional(),
|
|
918
|
-
items: z.array(listLayoutItemSchema),
|
|
919
|
-
control: z.string().optional(),
|
|
920
|
-
margin: sizeSchema.optional(),
|
|
921
|
-
analyticsId: z.string().optional(),
|
|
922
|
-
tags: z.array(z.string()).optional(),
|
|
923
|
-
}),
|
|
924
|
-
);
|
|
925
|
-
|
|
926
|
-
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
927
|
-
z.object({
|
|
928
|
-
type: z.literal('modal'),
|
|
929
|
-
control: z.string().optional(),
|
|
930
|
-
margin: sizeSchema.optional(),
|
|
931
|
-
trigger: modalLayoutTriggerSchema,
|
|
932
|
-
content: modalLayoutContentSchema,
|
|
933
|
-
analyticsId: z.string().optional(),
|
|
934
|
-
tags: z.array(z.string()).optional(),
|
|
935
|
-
}),
|
|
936
|
-
);
|
|
937
|
-
|
|
938
|
-
export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
|
|
939
|
-
z.object({
|
|
940
|
-
status: listLayoutStatusSchema.optional(),
|
|
941
|
-
icon: iconSchema.optional(),
|
|
942
|
-
image: imageSchema.optional(),
|
|
943
|
-
title: z.string().optional(),
|
|
944
|
-
subtitle: z.string().optional(),
|
|
945
|
-
value: z.string().optional(),
|
|
946
|
-
subvalue: z.string().optional(),
|
|
947
|
-
tag: z.string().optional(),
|
|
948
|
-
additionalInfo: additionalInfoSchema.optional(),
|
|
949
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
950
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
951
|
-
description: z.string().optional(),
|
|
952
842
|
media: mediaSchema.optional(),
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
callToAction: listLayoutCallToActionSchema.optional(),
|
|
843
|
+
alert: alertLayoutSchema.optional(),
|
|
844
|
+
layout: z.array(layoutSchema).optional(),
|
|
956
845
|
}),
|
|
957
846
|
);
|
|
958
847
|
|
|
@@ -993,42 +882,52 @@ export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
|
993
882
|
}),
|
|
994
883
|
);
|
|
995
884
|
|
|
996
|
-
export const
|
|
997
|
-
z.object({
|
|
998
|
-
param: z.string(),
|
|
999
|
-
idProperty: z.string(),
|
|
1000
|
-
schema: schemaSchema,
|
|
1001
|
-
url: z.string(),
|
|
1002
|
-
method: httpMethodSchema,
|
|
1003
|
-
}),
|
|
1004
|
-
);
|
|
1005
|
-
|
|
1006
|
-
export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
|
|
885
|
+
export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
1007
886
|
z.object({
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
tags: z.array(z.string()).optional(),
|
|
887
|
+
type: z.literal('number'),
|
|
888
|
+
autofillProvider: z.string().optional(),
|
|
1011
889
|
promoted: z.boolean().optional(),
|
|
890
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
891
|
+
refreshUrl: z.string().optional(),
|
|
892
|
+
refreshFormUrl: z.string().optional(),
|
|
893
|
+
placeholder: z.string().optional(),
|
|
894
|
+
minimum: z.number().optional(),
|
|
895
|
+
maximum: z.number().optional(),
|
|
1012
896
|
$id: z.string().optional(),
|
|
1013
|
-
const: jsonElementSchema,
|
|
1014
897
|
title: z.string().optional(),
|
|
1015
898
|
description: z.string().optional(),
|
|
899
|
+
control: z.string().optional(),
|
|
900
|
+
default: z.number().optional(),
|
|
901
|
+
hidden: z.boolean().optional(),
|
|
902
|
+
disabled: z.boolean().optional(),
|
|
1016
903
|
icon: iconSchema.optional(),
|
|
1017
904
|
image: imageSchema.optional(),
|
|
1018
905
|
keywords: z.array(z.string()).optional(),
|
|
1019
906
|
summary: summaryProviderSchema.optional(),
|
|
1020
907
|
analyticsId: z.string().optional(),
|
|
1021
|
-
|
|
1022
|
-
|
|
908
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
909
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
910
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
911
|
+
validationMessages: z.record(z.string()).optional(),
|
|
1023
912
|
alert: alertLayoutSchema.optional(),
|
|
1024
|
-
|
|
913
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
914
|
+
autofillKey: z.string().optional(),
|
|
915
|
+
help: helpSchema.optional(),
|
|
916
|
+
onChange: behaviorSchema.optional(),
|
|
917
|
+
media: mediaSchema.optional(),
|
|
918
|
+
tags: z.array(z.string()).optional(),
|
|
1025
919
|
}),
|
|
1026
920
|
);
|
|
1027
921
|
|
|
1028
|
-
export const
|
|
922
|
+
export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
1029
923
|
z.object({
|
|
1030
|
-
type: z.literal('
|
|
924
|
+
type: z.literal('object'),
|
|
925
|
+
disabled: z.boolean().optional(),
|
|
1031
926
|
promoted: z.boolean().optional(),
|
|
927
|
+
help: helpSchema.optional(),
|
|
928
|
+
properties: z.record(schemaSchema),
|
|
929
|
+
displayOrder: z.array(z.string()),
|
|
930
|
+
required: z.array(z.string()).optional(),
|
|
1032
931
|
$id: z.string().optional(),
|
|
1033
932
|
title: z.string().optional(),
|
|
1034
933
|
description: z.string().optional(),
|
|
@@ -1039,92 +938,70 @@ export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
|
|
|
1039
938
|
keywords: z.array(z.string()).optional(),
|
|
1040
939
|
summary: summaryProviderSchema.optional(),
|
|
1041
940
|
analyticsId: z.string().optional(),
|
|
1042
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1043
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1044
941
|
alert: alertLayoutSchema.optional(),
|
|
1045
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
1046
|
-
accepts: z.array(z.string()).optional(),
|
|
1047
|
-
maxSize: z.number().optional(),
|
|
1048
|
-
source: uploadSourceSchema.optional(),
|
|
1049
|
-
disabled: z.boolean().optional(),
|
|
1050
942
|
media: mediaSchema.optional(),
|
|
1051
943
|
tags: z.array(z.string()).optional(),
|
|
944
|
+
format: z.string().optional(),
|
|
1052
945
|
}),
|
|
1053
946
|
);
|
|
1054
947
|
|
|
1055
|
-
export const
|
|
1056
|
-
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
1057
|
-
);
|
|
1058
|
-
|
|
1059
|
-
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
948
|
+
export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
|
|
1060
949
|
z.object({
|
|
1061
|
-
|
|
950
|
+
autofillProvider: z.string().optional(),
|
|
1062
951
|
promoted: z.boolean().optional(),
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
maxItems: z.number().optional(),
|
|
952
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
953
|
+
refreshUrl: z.string().optional(),
|
|
954
|
+
refreshFormUrl: z.string().optional(),
|
|
955
|
+
promotion: jsonElementSchema.optional(),
|
|
956
|
+
oneOf: z.array(schemaSchema),
|
|
1069
957
|
placeholder: z.string().optional(),
|
|
958
|
+
$id: z.string().optional(),
|
|
1070
959
|
title: z.string().optional(),
|
|
1071
960
|
description: z.string().optional(),
|
|
1072
961
|
control: z.string().optional(),
|
|
962
|
+
default: jsonElementSchema.optional(),
|
|
1073
963
|
hidden: z.boolean().optional(),
|
|
1074
964
|
icon: iconSchema.optional(),
|
|
1075
965
|
image: imageSchema.optional(),
|
|
1076
966
|
keywords: z.array(z.string()).optional(),
|
|
1077
|
-
summary:
|
|
967
|
+
summary: summaryProviderSchema.optional(),
|
|
1078
968
|
analyticsId: z.string().optional(),
|
|
1079
|
-
|
|
1080
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
969
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
1081
970
|
alert: alertLayoutSchema.optional(),
|
|
971
|
+
help: helpSchema.optional(),
|
|
972
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
973
|
+
autofillKey: z.string().optional(),
|
|
1082
974
|
validationMessages: z.record(z.string()).optional(),
|
|
1083
975
|
disabled: z.boolean().optional(),
|
|
976
|
+
onChange: behaviorSchema.optional(),
|
|
1084
977
|
media: mediaSchema.optional(),
|
|
1085
978
|
tags: z.array(z.string()).optional(),
|
|
1086
979
|
}),
|
|
1087
980
|
);
|
|
1088
981
|
|
|
1089
|
-
export const
|
|
982
|
+
export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
1090
983
|
z.object({
|
|
1091
|
-
type: z.literal('
|
|
1092
|
-
promoted: z.boolean().optional(),
|
|
1093
|
-
$id: z.string().optional(),
|
|
1094
|
-
items: z.array(schemaSchema),
|
|
1095
|
-
title: z.string().optional(),
|
|
1096
|
-
description: z.string().optional(),
|
|
1097
|
-
control: z.string().optional(),
|
|
1098
|
-
hidden: z.boolean().optional(),
|
|
1099
|
-
icon: iconSchema.optional(),
|
|
1100
|
-
image: imageSchema.optional(),
|
|
1101
|
-
keywords: z.array(z.string()).optional(),
|
|
1102
|
-
summary: summaryProviderSchema.optional(),
|
|
1103
|
-
analyticsId: z.string().optional(),
|
|
1104
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1105
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1106
|
-
alert: alertLayoutSchema.optional(),
|
|
1107
|
-
media: mediaSchema.optional(),
|
|
1108
|
-
tags: z.array(z.string()).optional(),
|
|
1109
|
-
}),
|
|
1110
|
-
);
|
|
1111
|
-
|
|
1112
|
-
export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
1113
|
-
z.object({
|
|
1114
|
-
type: z.literal('number'),
|
|
984
|
+
type: z.literal('string'),
|
|
1115
985
|
autofillProvider: z.string().optional(),
|
|
1116
986
|
promoted: z.boolean().optional(),
|
|
1117
987
|
refreshFormOnChange: z.boolean().optional(),
|
|
1118
988
|
refreshUrl: z.string().optional(),
|
|
1119
989
|
refreshFormUrl: z.string().optional(),
|
|
990
|
+
format: stringSchemaFormatSchema.optional(),
|
|
991
|
+
displayFormat: z.string().optional(),
|
|
1120
992
|
placeholder: z.string().optional(),
|
|
1121
|
-
|
|
1122
|
-
|
|
993
|
+
minLength: z.number().optional(),
|
|
994
|
+
maxLength: z.number().optional(),
|
|
995
|
+
minimum: z.string().optional(),
|
|
996
|
+
maximum: z.string().optional(),
|
|
997
|
+
pattern: z.string().optional(),
|
|
998
|
+
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
999
|
+
autocorrect: z.boolean().optional(),
|
|
1123
1000
|
$id: z.string().optional(),
|
|
1124
1001
|
title: z.string().optional(),
|
|
1125
1002
|
description: z.string().optional(),
|
|
1126
1003
|
control: z.string().optional(),
|
|
1127
|
-
default: z.
|
|
1004
|
+
default: z.string().optional(),
|
|
1128
1005
|
hidden: z.boolean().optional(),
|
|
1129
1006
|
disabled: z.boolean().optional(),
|
|
1130
1007
|
icon: iconSchema.optional(),
|
|
@@ -1137,21 +1014,31 @@ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
|
1137
1014
|
validationAsync: validateAsyncSchema.optional(),
|
|
1138
1015
|
validationMessages: z.record(z.string()).optional(),
|
|
1139
1016
|
alert: alertLayoutSchema.optional(),
|
|
1017
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
1018
|
+
accepts: z.array(z.string()).optional(),
|
|
1019
|
+
maxSize: z.number().optional(),
|
|
1020
|
+
source: uploadSourceSchema.optional(),
|
|
1140
1021
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1141
1022
|
autofillKey: z.string().optional(),
|
|
1142
1023
|
help: helpSchema.optional(),
|
|
1024
|
+
suggestions: suggestionsSchema.optional(),
|
|
1143
1025
|
onChange: behaviorSchema.optional(),
|
|
1144
1026
|
media: mediaSchema.optional(),
|
|
1145
1027
|
tags: z.array(z.string()).optional(),
|
|
1146
1028
|
}),
|
|
1147
1029
|
);
|
|
1148
1030
|
|
|
1149
|
-
export const
|
|
1031
|
+
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
1150
1032
|
z.object({
|
|
1151
|
-
|
|
1033
|
+
type: z.literal('array'),
|
|
1152
1034
|
promoted: z.boolean().optional(),
|
|
1153
|
-
allOf: z.array(schemaSchema),
|
|
1154
1035
|
$id: z.string().optional(),
|
|
1036
|
+
items: schemaSchema,
|
|
1037
|
+
addItemTitle: z.string(),
|
|
1038
|
+
editItemTitle: z.string(),
|
|
1039
|
+
minItems: z.number().optional(),
|
|
1040
|
+
maxItems: z.number().optional(),
|
|
1041
|
+
placeholder: z.string().optional(),
|
|
1155
1042
|
title: z.string().optional(),
|
|
1156
1043
|
description: z.string().optional(),
|
|
1157
1044
|
control: z.string().optional(),
|
|
@@ -1159,182 +1046,298 @@ export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
|
1159
1046
|
icon: iconSchema.optional(),
|
|
1160
1047
|
image: imageSchema.optional(),
|
|
1161
1048
|
keywords: z.array(z.string()).optional(),
|
|
1162
|
-
summary:
|
|
1049
|
+
summary: summarySummariserSchema.optional(),
|
|
1163
1050
|
analyticsId: z.string().optional(),
|
|
1051
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
1052
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
1164
1053
|
alert: alertLayoutSchema.optional(),
|
|
1054
|
+
validationMessages: z.record(z.string()).optional(),
|
|
1055
|
+
disabled: z.boolean().optional(),
|
|
1165
1056
|
media: mediaSchema.optional(),
|
|
1166
1057
|
tags: z.array(z.string()).optional(),
|
|
1167
1058
|
}),
|
|
1168
1059
|
);
|
|
1169
1060
|
|
|
1170
|
-
export const
|
|
1061
|
+
export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
|
|
1171
1062
|
z.object({
|
|
1172
|
-
type: z.literal('
|
|
1173
|
-
autofillProvider: z.string().optional(),
|
|
1063
|
+
type: z.literal('array'),
|
|
1174
1064
|
promoted: z.boolean().optional(),
|
|
1175
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1176
|
-
refreshUrl: z.string().optional(),
|
|
1177
|
-
refreshFormUrl: z.string().optional(),
|
|
1178
1065
|
$id: z.string().optional(),
|
|
1066
|
+
items: z.array(schemaSchema),
|
|
1179
1067
|
title: z.string().optional(),
|
|
1180
1068
|
description: z.string().optional(),
|
|
1181
1069
|
control: z.string().optional(),
|
|
1182
|
-
default: z.boolean().optional(),
|
|
1183
1070
|
hidden: z.boolean().optional(),
|
|
1184
|
-
disabled: z.boolean().optional(),
|
|
1185
1071
|
icon: iconSchema.optional(),
|
|
1186
1072
|
image: imageSchema.optional(),
|
|
1187
1073
|
keywords: z.array(z.string()).optional(),
|
|
1188
1074
|
summary: summaryProviderSchema.optional(),
|
|
1189
1075
|
analyticsId: z.string().optional(),
|
|
1190
1076
|
persistAsync: persistAsyncSchema.optional(),
|
|
1191
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1192
1077
|
validationAsync: validateAsyncSchema.optional(),
|
|
1193
1078
|
alert: alertLayoutSchema.optional(),
|
|
1194
|
-
autofillKey: z.string().optional(),
|
|
1195
|
-
help: helpSchema.optional(),
|
|
1196
|
-
onChange: behaviorSchema.optional(),
|
|
1197
1079
|
media: mediaSchema.optional(),
|
|
1198
1080
|
tags: z.array(z.string()).optional(),
|
|
1199
1081
|
}),
|
|
1200
1082
|
);
|
|
1201
1083
|
|
|
1202
|
-
export const
|
|
1084
|
+
export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.lazy(() =>
|
|
1203
1085
|
z.object({
|
|
1204
|
-
|
|
1205
|
-
disabled: z.boolean().optional(),
|
|
1206
|
-
promoted: z.boolean().optional(),
|
|
1207
|
-
help: helpSchema.optional(),
|
|
1208
|
-
properties: z.record(schemaSchema),
|
|
1209
|
-
displayOrder: z.array(z.string()),
|
|
1210
|
-
required: z.array(z.string()).optional(),
|
|
1211
|
-
$id: z.string().optional(),
|
|
1212
|
-
title: z.string().optional(),
|
|
1086
|
+
title: z.string(),
|
|
1213
1087
|
description: z.string().optional(),
|
|
1214
|
-
|
|
1215
|
-
|
|
1088
|
+
icon: iconSchema,
|
|
1089
|
+
status: statusListLayoutStatusSchema.optional(),
|
|
1090
|
+
callToAction: itemCallToActionSchema.optional(),
|
|
1091
|
+
tag: z.string().optional(),
|
|
1092
|
+
analyticsId: z.string().optional(),
|
|
1093
|
+
tags: z.array(z.string()).optional(),
|
|
1094
|
+
}),
|
|
1095
|
+
);
|
|
1096
|
+
|
|
1097
|
+
export const itemCallToActionSchema: z.ZodSchema<ItemCallToAction> = z.lazy(() =>
|
|
1098
|
+
z.object({
|
|
1099
|
+
title: z.string(),
|
|
1100
|
+
accessibilityDescription: z.string().optional(),
|
|
1101
|
+
behavior: behaviorSchema,
|
|
1102
|
+
}),
|
|
1103
|
+
);
|
|
1104
|
+
|
|
1105
|
+
export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
|
|
1106
|
+
z.object({
|
|
1107
|
+
status: listLayoutStatusSchema.optional(),
|
|
1216
1108
|
icon: iconSchema.optional(),
|
|
1217
1109
|
image: imageSchema.optional(),
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1110
|
+
title: z.string().optional(),
|
|
1111
|
+
subtitle: z.string().optional(),
|
|
1112
|
+
value: z.string().optional(),
|
|
1113
|
+
subvalue: z.string().optional(),
|
|
1114
|
+
tag: z.string().optional(),
|
|
1115
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
1116
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1117
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1118
|
+
description: z.string().optional(),
|
|
1222
1119
|
media: mediaSchema.optional(),
|
|
1120
|
+
analyticsId: z.string().optional(),
|
|
1223
1121
|
tags: z.array(z.string()).optional(),
|
|
1122
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1224
1123
|
}),
|
|
1225
1124
|
);
|
|
1226
1125
|
|
|
1227
|
-
export const
|
|
1126
|
+
export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
|
|
1228
1127
|
z.object({
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1128
|
+
title: z.string(),
|
|
1129
|
+
accessibilityDescription: z.string().optional(),
|
|
1130
|
+
behavior: behaviorSchema,
|
|
1131
|
+
}),
|
|
1132
|
+
);
|
|
1133
|
+
|
|
1134
|
+
export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
|
|
1135
|
+
z.object({
|
|
1136
|
+
type: z.literal('list'),
|
|
1238
1137
|
title: z.string().optional(),
|
|
1239
|
-
|
|
1138
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1139
|
+
items: z.array(listLayoutItemSchema),
|
|
1240
1140
|
control: z.string().optional(),
|
|
1241
|
-
|
|
1242
|
-
hidden: z.boolean().optional(),
|
|
1243
|
-
icon: iconSchema.optional(),
|
|
1244
|
-
image: imageSchema.optional(),
|
|
1245
|
-
keywords: z.array(z.string()).optional(),
|
|
1246
|
-
summary: summaryProviderSchema.optional(),
|
|
1141
|
+
margin: sizeSchema.optional(),
|
|
1247
1142
|
analyticsId: z.string().optional(),
|
|
1248
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1249
|
-
alert: alertLayoutSchema.optional(),
|
|
1250
|
-
help: helpSchema.optional(),
|
|
1251
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1252
|
-
autofillKey: z.string().optional(),
|
|
1253
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1254
|
-
disabled: z.boolean().optional(),
|
|
1255
|
-
onChange: behaviorSchema.optional(),
|
|
1256
|
-
media: mediaSchema.optional(),
|
|
1257
1143
|
tags: z.array(z.string()).optional(),
|
|
1258
1144
|
}),
|
|
1259
1145
|
);
|
|
1260
1146
|
|
|
1261
|
-
export const
|
|
1147
|
+
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
1262
1148
|
z.object({
|
|
1263
|
-
type: z.literal('string'),
|
|
1264
|
-
autofillProvider: z.string().optional(),
|
|
1265
|
-
promoted: z.boolean().optional(),
|
|
1266
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1267
|
-
refreshUrl: z.string().optional(),
|
|
1268
|
-
refreshFormUrl: z.string().optional(),
|
|
1269
|
-
format: stringSchemaFormatSchema.optional(),
|
|
1270
|
-
displayFormat: z.string().optional(),
|
|
1271
|
-
placeholder: z.string().optional(),
|
|
1272
|
-
minLength: z.number().optional(),
|
|
1273
|
-
maxLength: z.number().optional(),
|
|
1274
|
-
minimum: z.string().optional(),
|
|
1275
|
-
maximum: z.string().optional(),
|
|
1276
|
-
pattern: z.string().optional(),
|
|
1277
|
-
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
1278
|
-
autocorrect: z.boolean().optional(),
|
|
1279
|
-
$id: z.string().optional(),
|
|
1280
1149
|
title: z.string().optional(),
|
|
1281
|
-
|
|
1150
|
+
components: z.array(layoutSchema),
|
|
1151
|
+
}),
|
|
1152
|
+
);
|
|
1153
|
+
|
|
1154
|
+
export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
|
|
1155
|
+
z.object({
|
|
1156
|
+
type: z.literal('decision'),
|
|
1157
|
+
title: z.string().optional(),
|
|
1158
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
1282
1159
|
control: z.string().optional(),
|
|
1283
|
-
|
|
1284
|
-
|
|
1160
|
+
margin: sizeSchema.optional(),
|
|
1161
|
+
analyticsId: z.string().optional(),
|
|
1162
|
+
tags: z.array(z.string()).optional(),
|
|
1163
|
+
}),
|
|
1164
|
+
);
|
|
1165
|
+
|
|
1166
|
+
export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
|
|
1167
|
+
z.object({
|
|
1168
|
+
action: actionSchema.optional(),
|
|
1169
|
+
title: z.string(),
|
|
1170
|
+
description: z.string().optional(),
|
|
1285
1171
|
disabled: z.boolean().optional(),
|
|
1286
1172
|
icon: iconSchema.optional(),
|
|
1287
1173
|
image: imageSchema.optional(),
|
|
1174
|
+
behavior: behaviorSchema.optional(),
|
|
1175
|
+
tag: z.string().optional(),
|
|
1176
|
+
additionalText: z.string().optional(),
|
|
1177
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1178
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1179
|
+
media: mediaSchema.optional(),
|
|
1180
|
+
analyticsId: z.string().optional(),
|
|
1288
1181
|
keywords: z.array(z.string()).optional(),
|
|
1289
|
-
|
|
1182
|
+
tags: z.array(z.string()).optional(),
|
|
1183
|
+
}),
|
|
1184
|
+
);
|
|
1185
|
+
|
|
1186
|
+
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
1187
|
+
z.object({
|
|
1188
|
+
type: z.literal('box'),
|
|
1189
|
+
components: z.array(layoutSchema),
|
|
1190
|
+
width: sizeSchema.optional(),
|
|
1191
|
+
border: z.boolean().optional(),
|
|
1192
|
+
control: z.string().optional(),
|
|
1193
|
+
margin: sizeSchema.optional(),
|
|
1290
1194
|
analyticsId: z.string().optional(),
|
|
1291
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1292
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1293
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1294
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1295
|
-
alert: alertLayoutSchema.optional(),
|
|
1296
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
1297
|
-
accepts: z.array(z.string()).optional(),
|
|
1298
|
-
maxSize: z.number().optional(),
|
|
1299
|
-
source: uploadSourceSchema.optional(),
|
|
1300
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1301
|
-
autofillKey: z.string().optional(),
|
|
1302
|
-
help: helpSchema.optional(),
|
|
1303
|
-
suggestions: suggestionsSchema.optional(),
|
|
1304
|
-
onChange: behaviorSchema.optional(),
|
|
1305
|
-
media: mediaSchema.optional(),
|
|
1306
1195
|
tags: z.array(z.string()).optional(),
|
|
1307
1196
|
}),
|
|
1308
1197
|
);
|
|
1309
1198
|
|
|
1310
|
-
export const
|
|
1199
|
+
export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
|
|
1200
|
+
z.object({
|
|
1201
|
+
type: z.literal('button'),
|
|
1202
|
+
action: actionSchema.optional(),
|
|
1203
|
+
size: sizeSchema.optional(),
|
|
1204
|
+
title: z.string().optional(),
|
|
1205
|
+
behavior: behaviorSchema.optional(),
|
|
1206
|
+
context: contextSchema.optional(),
|
|
1207
|
+
disabled: z.boolean().optional(),
|
|
1208
|
+
pinOrder: z.number().optional(),
|
|
1209
|
+
control: z.string().optional(),
|
|
1210
|
+
margin: sizeSchema.optional(),
|
|
1211
|
+
analyticsId: z.string().optional(),
|
|
1212
|
+
tags: z.array(z.string()).optional(),
|
|
1213
|
+
}),
|
|
1214
|
+
);
|
|
1311
1215
|
|
|
1312
|
-
export const
|
|
1216
|
+
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
1217
|
+
z.object({
|
|
1218
|
+
type: z.literal('columns'),
|
|
1219
|
+
left: z.array(layoutSchema),
|
|
1220
|
+
right: z.array(layoutSchema),
|
|
1221
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
1222
|
+
control: z.string().optional(),
|
|
1223
|
+
margin: sizeSchema.optional(),
|
|
1224
|
+
analyticsId: z.string().optional(),
|
|
1225
|
+
tags: z.array(z.string()).optional(),
|
|
1226
|
+
}),
|
|
1227
|
+
);
|
|
1228
|
+
|
|
1229
|
+
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
1230
|
+
z.object({
|
|
1231
|
+
type: z.literal('modal'),
|
|
1232
|
+
control: z.string().optional(),
|
|
1233
|
+
margin: sizeSchema.optional(),
|
|
1234
|
+
trigger: modalLayoutTriggerSchema,
|
|
1235
|
+
content: modalLayoutContentSchema,
|
|
1236
|
+
analyticsId: z.string().optional(),
|
|
1237
|
+
tags: z.array(z.string()).optional(),
|
|
1238
|
+
}),
|
|
1239
|
+
);
|
|
1240
|
+
|
|
1241
|
+
export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
|
|
1242
|
+
z.object({
|
|
1243
|
+
type: z.literal('review'),
|
|
1244
|
+
orientation: z.string().optional(),
|
|
1245
|
+
action: actionSchema.optional(),
|
|
1246
|
+
fields: z.array(reviewLayoutFieldSchema),
|
|
1247
|
+
title: z.string().optional(),
|
|
1248
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1249
|
+
control: z.string().optional(),
|
|
1250
|
+
margin: sizeSchema.optional(),
|
|
1251
|
+
analyticsId: z.string().optional(),
|
|
1252
|
+
tags: z.array(z.string()).optional(),
|
|
1253
|
+
}),
|
|
1254
|
+
);
|
|
1255
|
+
|
|
1256
|
+
export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
1257
|
+
z.object({
|
|
1258
|
+
type: z.literal('section'),
|
|
1259
|
+
components: z.array(layoutSchema),
|
|
1260
|
+
title: z.string(),
|
|
1261
|
+
callToAction: sectionLayoutCallToActionSchema.optional(),
|
|
1262
|
+
control: z.string().optional(),
|
|
1263
|
+
margin: sizeSchema.optional(),
|
|
1264
|
+
analyticsId: z.string().optional(),
|
|
1265
|
+
tags: z.array(z.string()).optional(),
|
|
1266
|
+
}),
|
|
1267
|
+
);
|
|
1268
|
+
|
|
1269
|
+
export const statusListLayoutSchema: z.ZodSchema<StatusListLayout> = z.lazy(() =>
|
|
1270
|
+
z.object({
|
|
1271
|
+
type: z.literal('status-list'),
|
|
1272
|
+
items: z.array(statusListLayoutItemSchema),
|
|
1273
|
+
title: z.string().optional(),
|
|
1274
|
+
control: z.string().optional(),
|
|
1275
|
+
margin: sizeSchema.optional(),
|
|
1276
|
+
analyticsId: z.string().optional(),
|
|
1277
|
+
tags: z.array(z.string()).optional(),
|
|
1278
|
+
}),
|
|
1279
|
+
);
|
|
1280
|
+
|
|
1281
|
+
export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
1282
|
+
z.object({
|
|
1283
|
+
type: z.literal('tabs'),
|
|
1284
|
+
tabs: z.array(tabsLayoutTabSchema),
|
|
1285
|
+
control: z.string().optional(),
|
|
1286
|
+
margin: sizeSchema.optional(),
|
|
1287
|
+
analyticsId: z.string().optional(),
|
|
1288
|
+
tags: z.array(z.string()).optional(),
|
|
1289
|
+
}),
|
|
1290
|
+
);
|
|
1291
|
+
|
|
1292
|
+
export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
|
|
1313
1293
|
z.object({
|
|
1314
|
-
type: z.literal('toolbar-button'),
|
|
1315
1294
|
title: z.string(),
|
|
1316
|
-
behavior: behaviorSchema,
|
|
1317
1295
|
accessibilityDescription: z.string().optional(),
|
|
1296
|
+
behavior: behaviorSchema,
|
|
1297
|
+
}),
|
|
1298
|
+
);
|
|
1299
|
+
|
|
1300
|
+
export const reviewLayoutFieldSchema: z.ZodSchema<ReviewLayoutField> = z.lazy(() =>
|
|
1301
|
+
z.object({
|
|
1302
|
+
label: z.string(),
|
|
1303
|
+
value: z.string(),
|
|
1304
|
+
rawValue: z.string().optional(),
|
|
1305
|
+
help: helpSchema.optional(),
|
|
1306
|
+
tag: z.string().optional(),
|
|
1307
|
+
icon: iconSchema.optional(),
|
|
1308
|
+
image: imageSchema.optional(),
|
|
1309
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
1310
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1311
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1318
1312
|
media: mediaSchema.optional(),
|
|
1319
|
-
control: z.string().optional(),
|
|
1320
|
-
context: contextSchema.optional(),
|
|
1321
|
-
disabled: z.boolean().optional(),
|
|
1322
1313
|
analyticsId: z.string().optional(),
|
|
1323
1314
|
tags: z.array(z.string()).optional(),
|
|
1324
1315
|
}),
|
|
1325
1316
|
);
|
|
1326
1317
|
|
|
1327
|
-
export const
|
|
1318
|
+
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
1328
1319
|
z.object({
|
|
1329
1320
|
action: actionSchema.optional(),
|
|
1321
|
+
title: z.string(),
|
|
1322
|
+
accessibilityDescription: z.string().optional(),
|
|
1330
1323
|
behavior: behaviorSchema.optional(),
|
|
1331
1324
|
}),
|
|
1332
1325
|
);
|
|
1333
1326
|
|
|
1334
|
-
export const
|
|
1327
|
+
export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
|
|
1335
1328
|
z.object({
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1329
|
+
title: z.string(),
|
|
1330
|
+
components: z.array(layoutSchema),
|
|
1331
|
+
tag: z.string().optional(),
|
|
1332
|
+
analyticsId: z.string().optional(),
|
|
1333
|
+
tags: z.array(z.string()).optional(),
|
|
1334
|
+
}),
|
|
1335
|
+
);
|
|
1336
|
+
|
|
1337
|
+
export const sectionLayoutCallToActionSchema: z.ZodSchema<SectionLayoutCallToAction> = z.lazy(() =>
|
|
1338
|
+
z.object({
|
|
1339
|
+
title: z.string(),
|
|
1340
|
+
accessibilityDescription: z.string().optional(),
|
|
1341
|
+
behavior: behaviorSchema,
|
|
1339
1342
|
}),
|
|
1340
1343
|
);
|