@wise/dynamic-flow-types 4.10.0 → 4.11.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/zod/schemas.ts
CHANGED
|
@@ -2,65 +2,89 @@
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import {
|
|
4
4
|
type JsonElement,
|
|
5
|
-
type
|
|
6
|
-
type
|
|
5
|
+
type SearchInitialState,
|
|
6
|
+
type SearchInitialLayoutConfig,
|
|
7
7
|
type Layout,
|
|
8
|
-
type
|
|
8
|
+
type SearchResponse,
|
|
9
|
+
type SearchLayoutResponseBody,
|
|
10
|
+
type SubflowResponseBody,
|
|
11
|
+
type Behavior,
|
|
12
|
+
type ModalResponseBody,
|
|
13
|
+
type AdditionalInfo,
|
|
14
|
+
type ModalBehavior,
|
|
15
|
+
type SubflowBehavior,
|
|
9
16
|
type LinkHandler,
|
|
17
|
+
type Polling,
|
|
18
|
+
type PollingOnError,
|
|
10
19
|
type Toolbar,
|
|
11
|
-
type
|
|
12
|
-
type
|
|
13
|
-
type
|
|
14
|
-
type
|
|
15
|
-
type
|
|
16
|
-
type
|
|
20
|
+
type ToolbarItem,
|
|
21
|
+
type ToolbarButton,
|
|
22
|
+
type PersistAsync,
|
|
23
|
+
type Schema,
|
|
24
|
+
type AllOfSchema,
|
|
25
|
+
type AlertLayout,
|
|
26
|
+
type ArraySchemaList,
|
|
27
|
+
type OneOfSchema,
|
|
28
|
+
type ArraySchema,
|
|
29
|
+
type BlobSchema,
|
|
30
|
+
type BooleanSchema,
|
|
31
|
+
type ConstSchema,
|
|
32
|
+
type IntegerSchema,
|
|
33
|
+
type NumberSchema,
|
|
34
|
+
type ObjectSchema,
|
|
35
|
+
type StringSchema,
|
|
36
|
+
type ArraySchemaTuple,
|
|
17
37
|
type StatusListLayoutItem,
|
|
18
38
|
type ItemCallToAction,
|
|
39
|
+
type DecisionLayout,
|
|
40
|
+
type DecisionLayoutOption,
|
|
41
|
+
type ReviewLayoutCallToAction,
|
|
42
|
+
type UpsellLayout,
|
|
43
|
+
type UpsellLayoutCallToAction,
|
|
44
|
+
type AlertLayoutCallToAction,
|
|
45
|
+
type ColumnsLayout,
|
|
46
|
+
type TabsLayoutTab,
|
|
47
|
+
type ModalLayoutContent,
|
|
19
48
|
type StatusListLayout,
|
|
20
|
-
type SearchLayout,
|
|
21
|
-
type SearchInitialState,
|
|
22
|
-
type AlertLayout,
|
|
23
|
-
type BoxLayout,
|
|
24
49
|
type ButtonLayout,
|
|
25
|
-
type DecisionLayout,
|
|
26
|
-
type ListLayout,
|
|
27
50
|
type ModalLayout,
|
|
51
|
+
type BoxLayout,
|
|
52
|
+
type ListLayoutCallToAction,
|
|
28
53
|
type ReviewLayout,
|
|
54
|
+
type ReviewLayoutField,
|
|
55
|
+
type ListLayout,
|
|
56
|
+
type SearchLayout,
|
|
29
57
|
type SectionLayout,
|
|
30
58
|
type TabsLayout,
|
|
31
|
-
type
|
|
32
|
-
type
|
|
33
|
-
type
|
|
34
|
-
type DecisionLayoutOption,
|
|
35
|
-
type UpsellLayoutCallToAction,
|
|
36
|
-
type ReviewLayoutCallToAction,
|
|
37
|
-
type ReviewLayoutField,
|
|
38
|
-
type AlertLayoutCallToAction,
|
|
39
|
-
type SubflowResponseBody,
|
|
40
|
-
type SearchInitialLayoutConfig,
|
|
41
|
-
type SearchLayoutResponseBody,
|
|
42
|
-
type SearchResponse,
|
|
43
|
-
type ModalResponseBody,
|
|
44
|
-
type AllOfSchema,
|
|
45
|
-
type NumberSchema,
|
|
46
|
-
type PersistAsync,
|
|
47
|
-
type StringSchema,
|
|
48
|
-
type IntegerSchema,
|
|
49
|
-
type BooleanSchema,
|
|
50
|
-
type BlobSchema,
|
|
51
|
-
type ConstSchema,
|
|
52
|
-
type OneOfSchema,
|
|
53
|
-
type ObjectSchema,
|
|
54
|
-
type ArraySchema,
|
|
55
|
-
type ArraySchemaList,
|
|
56
|
-
type ArraySchemaTuple,
|
|
57
|
-
type PollingOnError,
|
|
58
|
-
type SubflowBehavior,
|
|
59
|
-
type ModalBehavior,
|
|
60
|
-
type ToolbarButton,
|
|
61
|
-
type ToolbarItem,
|
|
59
|
+
type ListLayoutItem,
|
|
60
|
+
type SectionLayoutCallToAction,
|
|
61
|
+
type Step,
|
|
62
62
|
} from '../spec';
|
|
63
63
|
|
|
64
|
+
export const noOpResponseBodySchema = z.object({});
|
|
65
|
+
|
|
66
|
+
export const httpMethodSchema = z.union([
|
|
67
|
+
z.literal('GET'),
|
|
68
|
+
z.literal('POST'),
|
|
69
|
+
z.literal('PUT'),
|
|
70
|
+
z.literal('PATCH'),
|
|
71
|
+
z.literal('DELETE'),
|
|
72
|
+
]);
|
|
73
|
+
|
|
74
|
+
export const imageSchema = z.object({
|
|
75
|
+
text: z.string().optional(),
|
|
76
|
+
url: z.string().optional(),
|
|
77
|
+
uri: z.string().optional(),
|
|
78
|
+
accessibilityDescription: z.string().optional(),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export const searchSearchRequestSchema = z.object({
|
|
82
|
+
url: z.string(),
|
|
83
|
+
method: httpMethodSchema,
|
|
84
|
+
param: z.string(),
|
|
85
|
+
query: z.string(),
|
|
86
|
+
});
|
|
87
|
+
|
|
64
88
|
export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
65
89
|
z
|
|
66
90
|
.union([
|
|
@@ -73,13 +97,26 @@ export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
|
73
97
|
.nullable(),
|
|
74
98
|
);
|
|
75
99
|
|
|
76
|
-
export const
|
|
77
|
-
|
|
100
|
+
export const avatarTextContentSchema = z.object({
|
|
101
|
+
type: z.literal('text'),
|
|
102
|
+
text: z.string(),
|
|
103
|
+
badgeUri: z.string().optional(),
|
|
78
104
|
});
|
|
79
105
|
|
|
80
|
-
export const
|
|
81
|
-
|
|
82
|
-
|
|
106
|
+
export const avatarUriContentSchema = z.object({
|
|
107
|
+
type: z.literal('uri'),
|
|
108
|
+
uri: z.string(),
|
|
109
|
+
badgeUri: z.string().optional(),
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export const mediaImageSchema = z.object({
|
|
113
|
+
type: z.literal('image'),
|
|
114
|
+
uri: z.string(),
|
|
115
|
+
accessibilityDescription: z.string().optional(),
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export const iconTextSchema = z.object({
|
|
119
|
+
text: z.string(),
|
|
83
120
|
});
|
|
84
121
|
|
|
85
122
|
export const contextSchema = z.union([
|
|
@@ -93,6 +130,37 @@ export const contextSchema = z.union([
|
|
|
93
130
|
z.literal('primary'),
|
|
94
131
|
]);
|
|
95
132
|
|
|
133
|
+
export const requestSchema = z.object({
|
|
134
|
+
url: z.string(),
|
|
135
|
+
method: httpMethodSchema,
|
|
136
|
+
body: jsonElementSchema.optional(),
|
|
137
|
+
prefetch: z.boolean().optional(),
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
export const sizeSchema = z.union([
|
|
141
|
+
z.literal('xs'),
|
|
142
|
+
z.literal('sm'),
|
|
143
|
+
z.literal('md'),
|
|
144
|
+
z.literal('lg'),
|
|
145
|
+
z.literal('xl'),
|
|
146
|
+
]);
|
|
147
|
+
|
|
148
|
+
export const iconNamedSchema = z.object({
|
|
149
|
+
name: z.string(),
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
export const autocapitalizationTypeSchema = z.union([
|
|
153
|
+
z.literal('none'),
|
|
154
|
+
z.literal('characters'),
|
|
155
|
+
z.literal('sentences'),
|
|
156
|
+
z.literal('words'),
|
|
157
|
+
]);
|
|
158
|
+
|
|
159
|
+
export const supportingValuesSchema = z.object({
|
|
160
|
+
value: z.string().optional(),
|
|
161
|
+
subvalue: z.string().optional(),
|
|
162
|
+
});
|
|
163
|
+
|
|
96
164
|
export const autocompleteTokenSchema = z.union([
|
|
97
165
|
z.literal('on'),
|
|
98
166
|
z.literal('name'),
|
|
@@ -159,119 +227,141 @@ export const autocompleteTokenSchema = z.union([
|
|
|
159
227
|
z.literal('pager'),
|
|
160
228
|
]);
|
|
161
229
|
|
|
162
|
-
export const
|
|
163
|
-
|
|
230
|
+
export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
|
|
231
|
+
|
|
232
|
+
export const navigationStackBehaviorSchema = z.union([
|
|
233
|
+
z.literal('default'),
|
|
234
|
+
z.literal('remove-previous'),
|
|
235
|
+
z.literal('remove-all'),
|
|
236
|
+
z.literal('replace-current'),
|
|
237
|
+
]);
|
|
238
|
+
|
|
239
|
+
export const externalSchema = z.object({
|
|
240
|
+
url: z.string(),
|
|
164
241
|
});
|
|
165
242
|
|
|
166
|
-
export const
|
|
167
|
-
|
|
243
|
+
export const refreshBehaviorSchema = z.object({
|
|
244
|
+
type: z.literal('refresh'),
|
|
168
245
|
});
|
|
169
246
|
|
|
170
|
-
export const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
uri: z.string().optional(),
|
|
174
|
-
accessibilityDescription: z.string().optional(),
|
|
247
|
+
export const stepErrorSchema = z.object({
|
|
248
|
+
error: z.string().optional(),
|
|
249
|
+
validation: jsonElementSchema.optional(),
|
|
175
250
|
});
|
|
176
251
|
|
|
177
|
-
export const
|
|
178
|
-
|
|
179
|
-
subvalue: z.string().optional(),
|
|
252
|
+
export const modalPresentationSchema = z.object({
|
|
253
|
+
type: z.literal('modal'),
|
|
180
254
|
});
|
|
181
255
|
|
|
182
|
-
export const
|
|
183
|
-
type: z.literal('
|
|
184
|
-
uri: z.string(),
|
|
185
|
-
badgeUri: z.string().optional(),
|
|
256
|
+
export const pushPresentationSchema = z.object({
|
|
257
|
+
type: z.literal('push'),
|
|
186
258
|
});
|
|
187
259
|
|
|
188
|
-
export const
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
260
|
+
export const presentationSchema = z.union([modalPresentationSchema, pushPresentationSchema]);
|
|
261
|
+
|
|
262
|
+
export const copyBehaviorSchema = z.object({
|
|
263
|
+
type: z.literal('copy'),
|
|
264
|
+
content: z.string(),
|
|
192
265
|
});
|
|
193
266
|
|
|
194
|
-
export const
|
|
195
|
-
type: z.literal('
|
|
196
|
-
text: z.string(),
|
|
197
|
-
badgeUri: z.string().optional(),
|
|
267
|
+
export const dismissBehaviorSchema = z.object({
|
|
268
|
+
type: z.literal('dismiss'),
|
|
198
269
|
});
|
|
199
270
|
|
|
200
|
-
export const
|
|
271
|
+
export const linkBehaviorSchema = z.object({
|
|
272
|
+
type: z.literal('link'),
|
|
273
|
+
url: z.string(),
|
|
274
|
+
});
|
|
201
275
|
|
|
202
|
-
export const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
276
|
+
export const validateAsyncSchema = z.object({
|
|
277
|
+
param: z.string(),
|
|
278
|
+
method: httpMethodSchema,
|
|
279
|
+
url: z.string(),
|
|
206
280
|
});
|
|
207
281
|
|
|
208
|
-
export const
|
|
209
|
-
z.literal('xs'),
|
|
210
|
-
z.literal('sm'),
|
|
211
|
-
z.literal('md'),
|
|
212
|
-
z.literal('lg'),
|
|
213
|
-
z.literal('xl'),
|
|
214
|
-
]);
|
|
282
|
+
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
215
283
|
|
|
216
|
-
export const
|
|
217
|
-
z.literal('GET'),
|
|
218
|
-
z.literal('POST'),
|
|
219
|
-
z.literal('PUT'),
|
|
220
|
-
z.literal('PATCH'),
|
|
221
|
-
z.literal('DELETE'),
|
|
222
|
-
]);
|
|
284
|
+
export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
223
285
|
|
|
224
|
-
export const
|
|
225
|
-
|
|
226
|
-
context: contextSchema.optional(),
|
|
286
|
+
export const linkSchema = z.object({
|
|
287
|
+
url: z.string(),
|
|
227
288
|
});
|
|
228
289
|
|
|
229
|
-
export const
|
|
230
|
-
z.literal('
|
|
231
|
-
z.literal('
|
|
232
|
-
z.literal('
|
|
233
|
-
z.literal('words'),
|
|
234
|
-
]);
|
|
235
|
-
|
|
236
|
-
export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
|
|
237
|
-
|
|
238
|
-
export const listLayoutStatusSchema = z.union([
|
|
239
|
-
z.literal('warning'),
|
|
240
|
-
z.literal('neutral'),
|
|
290
|
+
export const actionTypeSchema = z.union([
|
|
291
|
+
z.literal('primary'),
|
|
292
|
+
z.literal('secondary'),
|
|
293
|
+
z.literal('link'),
|
|
241
294
|
z.literal('positive'),
|
|
295
|
+
z.literal('negative'),
|
|
242
296
|
]);
|
|
243
297
|
|
|
244
|
-
export const
|
|
298
|
+
export const summaryProviderSchema = z.object({
|
|
299
|
+
providesTitle: z.boolean().optional(),
|
|
300
|
+
providesDescription: z.boolean().optional(),
|
|
301
|
+
providesIcon: z.boolean().optional(),
|
|
302
|
+
providesImage: z.boolean().optional(),
|
|
303
|
+
providesMedia: z.boolean().optional(),
|
|
304
|
+
});
|
|
245
305
|
|
|
246
|
-
export const
|
|
306
|
+
export const actionSchema = z.object({
|
|
307
|
+
title: z.string().optional(),
|
|
308
|
+
type: actionTypeSchema.optional(),
|
|
309
|
+
disabled: z.boolean().optional(),
|
|
310
|
+
$id: z.string().optional(),
|
|
311
|
+
$ref: z.string().optional(),
|
|
312
|
+
id: z.string().optional(),
|
|
313
|
+
url: z.string().optional(),
|
|
314
|
+
method: httpMethodSchema.optional(),
|
|
315
|
+
exit: z.boolean().optional(),
|
|
316
|
+
result: jsonElementSchema.optional(),
|
|
317
|
+
data: jsonElementSchema.optional(),
|
|
318
|
+
timeout: z.number().optional(),
|
|
319
|
+
skipValidation: z.boolean().optional(),
|
|
320
|
+
prefetch: z.boolean().optional(),
|
|
321
|
+
});
|
|
247
322
|
|
|
248
|
-
export const
|
|
249
|
-
z.
|
|
250
|
-
|
|
251
|
-
z.literal('right'),
|
|
252
|
-
]);
|
|
323
|
+
export const helpSchema = z.object({
|
|
324
|
+
markdown: z.string(),
|
|
325
|
+
});
|
|
253
326
|
|
|
254
|
-
export const
|
|
255
|
-
type: z.literal('
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
327
|
+
export const actionBehaviorSchema = z.object({
|
|
328
|
+
type: z.literal('action'),
|
|
329
|
+
action: actionSchema,
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
export const inlineAlertSchema = z.object({
|
|
333
|
+
content: z.string(),
|
|
334
|
+
context: contextSchema.optional(),
|
|
261
335
|
});
|
|
262
336
|
|
|
337
|
+
export const stringSchemaFormatSchema = z.union([
|
|
338
|
+
z.literal('date'),
|
|
339
|
+
z.literal('email'),
|
|
340
|
+
z.literal('numeric'),
|
|
341
|
+
z.literal('password'),
|
|
342
|
+
z.literal('phone-number'),
|
|
343
|
+
z.literal('base64url'),
|
|
344
|
+
]);
|
|
345
|
+
|
|
263
346
|
export const statusListLayoutStatusSchema = z.union([
|
|
264
347
|
z.literal('not-done'),
|
|
265
348
|
z.literal('pending'),
|
|
266
349
|
z.literal('done'),
|
|
267
350
|
]);
|
|
268
351
|
|
|
269
|
-
export const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
352
|
+
export const modalLayoutTriggerSchema = z.object({
|
|
353
|
+
title: z.string(),
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
export const markdownLayoutSchema = z.object({
|
|
357
|
+
type: z.literal('markdown'),
|
|
358
|
+
content: z.string(),
|
|
359
|
+
align: alignSchema.optional(),
|
|
360
|
+
control: z.string().optional(),
|
|
361
|
+
margin: sizeSchema.optional(),
|
|
273
362
|
analyticsId: z.string().optional(),
|
|
274
363
|
tags: z.array(z.string()).optional(),
|
|
364
|
+
size: sizeSchema.optional(),
|
|
275
365
|
});
|
|
276
366
|
|
|
277
367
|
export const imageLayoutSchema = z.object({
|
|
@@ -288,13 +378,17 @@ export const imageLayoutSchema = z.object({
|
|
|
288
378
|
tags: z.array(z.string()).optional(),
|
|
289
379
|
});
|
|
290
380
|
|
|
291
|
-
export const
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
381
|
+
export const columnsLayoutBiasSchema = z.union([
|
|
382
|
+
z.literal('none'),
|
|
383
|
+
z.literal('left'),
|
|
384
|
+
z.literal('right'),
|
|
385
|
+
]);
|
|
386
|
+
|
|
387
|
+
export const listLayoutStatusSchema = z.union([
|
|
388
|
+
z.literal('warning'),
|
|
389
|
+
z.literal('neutral'),
|
|
390
|
+
z.literal('positive'),
|
|
391
|
+
]);
|
|
298
392
|
|
|
299
393
|
export const headingLayoutSchema = z.object({
|
|
300
394
|
type: z.literal('heading'),
|
|
@@ -307,29 +401,31 @@ export const headingLayoutSchema = z.object({
|
|
|
307
401
|
tags: z.array(z.string()).optional(),
|
|
308
402
|
});
|
|
309
403
|
|
|
310
|
-
export const
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
align: alignSchema.optional(),
|
|
315
|
-
control: z.string().optional(),
|
|
316
|
-
margin: sizeSchema.optional(),
|
|
404
|
+
export const instructionsLayoutItemSchema = z.object({
|
|
405
|
+
text: z.string(),
|
|
406
|
+
context: contextSchema,
|
|
407
|
+
tag: z.string().optional(),
|
|
317
408
|
analyticsId: z.string().optional(),
|
|
409
|
+
tags: z.array(z.string()).optional(),
|
|
318
410
|
});
|
|
319
411
|
|
|
320
|
-
export const
|
|
321
|
-
type: z.literal('
|
|
412
|
+
export const progressLayoutSchema = z.object({
|
|
413
|
+
type: z.literal('progress'),
|
|
322
414
|
title: z.string().optional(),
|
|
323
|
-
|
|
415
|
+
description: z.string().optional(),
|
|
416
|
+
progress: z.number(),
|
|
417
|
+
progressText: z.string(),
|
|
418
|
+
context: contextSchema.optional(),
|
|
419
|
+
help: helpSchema.optional(),
|
|
324
420
|
control: z.string().optional(),
|
|
325
421
|
margin: sizeSchema.optional(),
|
|
326
422
|
analyticsId: z.string().optional(),
|
|
327
423
|
tags: z.array(z.string()).optional(),
|
|
328
424
|
});
|
|
329
425
|
|
|
330
|
-
export const
|
|
331
|
-
type: z.literal('
|
|
332
|
-
|
|
426
|
+
export const paragraphLayoutSchema = z.object({
|
|
427
|
+
type: z.literal('paragraph'),
|
|
428
|
+
text: z.string(),
|
|
333
429
|
align: alignSchema.optional(),
|
|
334
430
|
control: z.string().optional(),
|
|
335
431
|
margin: sizeSchema.optional(),
|
|
@@ -338,59 +434,59 @@ export const markdownLayoutSchema = z.object({
|
|
|
338
434
|
size: sizeSchema.optional(),
|
|
339
435
|
});
|
|
340
436
|
|
|
341
|
-
export const
|
|
342
|
-
type: z.literal('
|
|
343
|
-
media: mediaSchema,
|
|
344
|
-
align: alignSchema.optional(),
|
|
437
|
+
export const loadingIndicatorLayoutSchema = z.object({
|
|
438
|
+
type: z.literal('loading-indicator'),
|
|
345
439
|
size: sizeSchema.optional(),
|
|
346
|
-
analyticsId: z.string().optional(),
|
|
347
440
|
control: z.string().optional(),
|
|
348
441
|
margin: sizeSchema.optional(),
|
|
442
|
+
analyticsId: z.string().optional(),
|
|
349
443
|
tags: z.array(z.string()).optional(),
|
|
350
444
|
});
|
|
351
445
|
|
|
352
|
-
export const
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
446
|
+
export const formLayoutSchemaReferenceSchema = z.object({
|
|
447
|
+
$ref: z.string(),
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
export const formLayoutSchema = z.object({
|
|
451
|
+
type: z.literal('form'),
|
|
452
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
453
|
+
schemaId: z.string(),
|
|
356
454
|
control: z.string().optional(),
|
|
357
455
|
margin: sizeSchema.optional(),
|
|
358
456
|
analyticsId: z.string().optional(),
|
|
359
457
|
tags: z.array(z.string()).optional(),
|
|
360
|
-
size: sizeSchema.optional(),
|
|
361
|
-
});
|
|
362
|
-
|
|
363
|
-
export const modalLayoutTriggerSchema = z.object({
|
|
364
|
-
title: z.string(),
|
|
365
458
|
});
|
|
366
459
|
|
|
367
|
-
export const
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
460
|
+
export const dividerLayoutSchema = z.object({
|
|
461
|
+
type: z.literal('divider'),
|
|
462
|
+
control: z.string().optional(),
|
|
463
|
+
margin: sizeSchema.optional(),
|
|
464
|
+
analyticsId: z.string().optional(),
|
|
465
|
+
tags: z.array(z.string()).optional(),
|
|
372
466
|
});
|
|
373
467
|
|
|
374
|
-
export const
|
|
375
|
-
|
|
468
|
+
export const instructionsLayoutSchema = z.object({
|
|
469
|
+
type: z.literal('instructions'),
|
|
470
|
+
title: z.string().optional(),
|
|
471
|
+
items: z.array(instructionsLayoutItemSchema),
|
|
472
|
+
control: z.string().optional(),
|
|
473
|
+
margin: sizeSchema.optional(),
|
|
474
|
+
analyticsId: z.string().optional(),
|
|
475
|
+
tags: z.array(z.string()).optional(),
|
|
376
476
|
});
|
|
377
477
|
|
|
378
|
-
export const
|
|
478
|
+
export const infoLayoutSchema = z.object({
|
|
479
|
+
type: z.literal('info'),
|
|
480
|
+
tags: z.array(z.string()).optional(),
|
|
379
481
|
markdown: z.string(),
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
export const progressLayoutSchema = z.object({
|
|
383
|
-
type: z.literal('progress'),
|
|
384
|
-
title: z.string().optional(),
|
|
385
|
-
description: z.string().optional(),
|
|
386
|
-
progress: z.number(),
|
|
387
|
-
progressText: z.string(),
|
|
388
|
-
context: contextSchema.optional(),
|
|
389
|
-
help: helpSchema.optional(),
|
|
482
|
+
align: alignSchema.optional(),
|
|
390
483
|
control: z.string().optional(),
|
|
391
484
|
margin: sizeSchema.optional(),
|
|
392
485
|
analyticsId: z.string().optional(),
|
|
393
|
-
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
export const actionResponseBodySchema = z.object({
|
|
489
|
+
action: actionSchema,
|
|
394
490
|
});
|
|
395
491
|
|
|
396
492
|
export const errorResponseBodySchema = z.object({
|
|
@@ -401,175 +497,81 @@ export const errorResponseBodySchema = z.object({
|
|
|
401
497
|
refreshUrl: z.string().optional(),
|
|
402
498
|
});
|
|
403
499
|
|
|
404
|
-
export const
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
500
|
+
export const avatarContentSchema = z.union([avatarTextContentSchema, avatarUriContentSchema]);
|
|
501
|
+
|
|
502
|
+
export const mediaAvatarSchema = z.object({
|
|
503
|
+
type: z.literal('avatar'),
|
|
504
|
+
content: z.array(avatarContentSchema),
|
|
505
|
+
accessibilityDescription: z.string().optional(),
|
|
409
506
|
});
|
|
410
507
|
|
|
411
|
-
export const
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
508
|
+
export const navigationBackBehaviorSchema = z.object({
|
|
509
|
+
title: z.string().optional(),
|
|
510
|
+
action: actionSchema,
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
export const dynamicLaunchConfigSchema = z.object({
|
|
514
|
+
type: z.literal('dynamic'),
|
|
515
|
+
request: requestSchema,
|
|
516
|
+
presentation: presentationSchema,
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
export const containerBehaviorSchema = z.object({
|
|
520
|
+
action: actionSchema.optional(),
|
|
521
|
+
link: linkSchema.optional(),
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
export const launchConfigSchema = dynamicLaunchConfigSchema;
|
|
525
|
+
|
|
526
|
+
export const mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
|
|
527
|
+
|
|
528
|
+
export const suggestionsValueSchema = z.object({
|
|
529
|
+
label: z.string(),
|
|
530
|
+
value: jsonElementSchema,
|
|
415
531
|
icon: iconSchema.optional(),
|
|
416
532
|
image: imageSchema.optional(),
|
|
417
|
-
|
|
533
|
+
tag: z.string().optional(),
|
|
418
534
|
media: mediaSchema.optional(),
|
|
535
|
+
analyticsId: z.string().optional(),
|
|
536
|
+
tags: z.array(z.string()).optional(),
|
|
419
537
|
});
|
|
420
538
|
|
|
421
|
-
export const
|
|
422
|
-
|
|
423
|
-
|
|
539
|
+
export const summarySummariserSchema = z.object({
|
|
540
|
+
defaultTitle: z.string().optional(),
|
|
541
|
+
defaultDescription: z.string().optional(),
|
|
542
|
+
defaultIcon: iconSchema.optional(),
|
|
543
|
+
defaultImage: imageSchema.optional(),
|
|
424
544
|
providesTitle: z.boolean().optional(),
|
|
425
545
|
providesDescription: z.boolean().optional(),
|
|
426
546
|
providesIcon: z.boolean().optional(),
|
|
427
547
|
providesImage: z.boolean().optional(),
|
|
548
|
+
defaultMedia: mediaSchema.optional(),
|
|
428
549
|
providesMedia: z.boolean().optional(),
|
|
429
550
|
});
|
|
430
551
|
|
|
431
|
-
export const
|
|
432
|
-
param: z.string(),
|
|
433
|
-
method: httpMethodSchema,
|
|
434
|
-
url: z.string(),
|
|
435
|
-
});
|
|
436
|
-
|
|
437
|
-
export const stringSchemaFormatSchema = z.union([
|
|
438
|
-
z.literal('date'),
|
|
439
|
-
z.literal('email'),
|
|
440
|
-
z.literal('numeric'),
|
|
441
|
-
z.literal('password'),
|
|
442
|
-
z.literal('phone-number'),
|
|
443
|
-
z.literal('base64url'),
|
|
444
|
-
]);
|
|
445
|
-
|
|
446
|
-
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
447
|
-
|
|
448
|
-
export const summarySummariserSchema = z.object({
|
|
449
|
-
defaultTitle: z.string().optional(),
|
|
450
|
-
defaultDescription: z.string().optional(),
|
|
451
|
-
defaultIcon: iconSchema.optional(),
|
|
452
|
-
defaultImage: imageSchema.optional(),
|
|
453
|
-
providesTitle: z.boolean().optional(),
|
|
454
|
-
providesDescription: z.boolean().optional(),
|
|
455
|
-
providesIcon: z.boolean().optional(),
|
|
456
|
-
providesImage: z.boolean().optional(),
|
|
457
|
-
defaultMedia: mediaSchema.optional(),
|
|
458
|
-
providesMedia: z.boolean().optional(),
|
|
459
|
-
});
|
|
460
|
-
|
|
461
|
-
export const pushPresentationSchema = z.object({
|
|
462
|
-
type: z.literal('push'),
|
|
463
|
-
});
|
|
464
|
-
|
|
465
|
-
export const modalPresentationSchema = z.object({
|
|
466
|
-
type: z.literal('modal'),
|
|
467
|
-
});
|
|
468
|
-
|
|
469
|
-
export const presentationSchema = z.union([modalPresentationSchema, pushPresentationSchema]);
|
|
552
|
+
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
470
553
|
|
|
471
|
-
export const
|
|
472
|
-
|
|
554
|
+
export const suggestionsSchema = z.object({
|
|
555
|
+
values: z.array(suggestionsValueSchema),
|
|
473
556
|
});
|
|
474
557
|
|
|
475
|
-
export const
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
tag: z.string().optional(),
|
|
481
|
-
media: mediaSchema.optional(),
|
|
558
|
+
export const mediaLayoutSchema = z.object({
|
|
559
|
+
type: z.literal('media'),
|
|
560
|
+
media: mediaSchema,
|
|
561
|
+
align: alignSchema.optional(),
|
|
562
|
+
size: sizeSchema.optional(),
|
|
482
563
|
analyticsId: z.string().optional(),
|
|
564
|
+
control: z.string().optional(),
|
|
565
|
+
margin: sizeSchema.optional(),
|
|
483
566
|
tags: z.array(z.string()).optional(),
|
|
484
567
|
});
|
|
485
568
|
|
|
486
|
-
export const actionTypeSchema = z.union([
|
|
487
|
-
z.literal('primary'),
|
|
488
|
-
z.literal('secondary'),
|
|
489
|
-
z.literal('link'),
|
|
490
|
-
z.literal('positive'),
|
|
491
|
-
z.literal('negative'),
|
|
492
|
-
]);
|
|
493
|
-
|
|
494
|
-
export const navigationStackBehaviorSchema = z.union([
|
|
495
|
-
z.literal('default'),
|
|
496
|
-
z.literal('remove-previous'),
|
|
497
|
-
z.literal('remove-all'),
|
|
498
|
-
z.literal('replace-current'),
|
|
499
|
-
]);
|
|
500
|
-
|
|
501
|
-
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
502
|
-
|
|
503
|
-
export const linkSchema = z.object({
|
|
504
|
-
url: z.string(),
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
export const actionSchema = z.object({
|
|
508
|
-
title: z.string().optional(),
|
|
509
|
-
type: actionTypeSchema.optional(),
|
|
510
|
-
disabled: z.boolean().optional(),
|
|
511
|
-
$id: z.string().optional(),
|
|
512
|
-
$ref: z.string().optional(),
|
|
513
|
-
id: z.string().optional(),
|
|
514
|
-
url: z.string().optional(),
|
|
515
|
-
method: httpMethodSchema.optional(),
|
|
516
|
-
exit: z.boolean().optional(),
|
|
517
|
-
result: jsonElementSchema.optional(),
|
|
518
|
-
data: jsonElementSchema.optional(),
|
|
519
|
-
timeout: z.number().optional(),
|
|
520
|
-
skipValidation: z.boolean().optional(),
|
|
521
|
-
prefetch: z.boolean().optional(),
|
|
522
|
-
});
|
|
523
|
-
|
|
524
|
-
export const actionBehaviorSchema = z.object({
|
|
525
|
-
type: z.literal('action'),
|
|
526
|
-
action: actionSchema,
|
|
527
|
-
});
|
|
528
|
-
|
|
529
|
-
export const copyBehaviorSchema = z.object({
|
|
530
|
-
type: z.literal('copy'),
|
|
531
|
-
content: z.string(),
|
|
532
|
-
});
|
|
533
|
-
|
|
534
|
-
export const linkBehaviorSchema = z.object({
|
|
535
|
-
type: z.literal('link'),
|
|
536
|
-
url: z.string(),
|
|
537
|
-
});
|
|
538
|
-
|
|
539
|
-
export const refreshBehaviorSchema = z.object({
|
|
540
|
-
type: z.literal('refresh'),
|
|
541
|
-
});
|
|
542
|
-
|
|
543
|
-
export const containerBehaviorSchema = z.object({
|
|
544
|
-
action: actionSchema.optional(),
|
|
545
|
-
link: linkSchema.optional(),
|
|
546
|
-
});
|
|
547
|
-
|
|
548
|
-
export const navigationBackBehaviorSchema = z.object({
|
|
549
|
-
title: z.string().optional(),
|
|
550
|
-
action: actionSchema,
|
|
551
|
-
});
|
|
552
|
-
|
|
553
569
|
export const navigationSchema = z.object({
|
|
554
570
|
backButton: navigationBackBehaviorSchema.optional(),
|
|
555
571
|
back: navigationBackBehaviorSchema.optional(),
|
|
556
572
|
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
557
573
|
});
|
|
558
574
|
|
|
559
|
-
export const formLayoutSchema = z.object({
|
|
560
|
-
type: z.literal('form'),
|
|
561
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
562
|
-
schemaId: z.string(),
|
|
563
|
-
control: z.string().optional(),
|
|
564
|
-
margin: sizeSchema.optional(),
|
|
565
|
-
analyticsId: z.string().optional(),
|
|
566
|
-
tags: z.array(z.string()).optional(),
|
|
567
|
-
});
|
|
568
|
-
|
|
569
|
-
export const actionResponseBodySchema = z.object({
|
|
570
|
-
action: actionSchema,
|
|
571
|
-
});
|
|
572
|
-
|
|
573
575
|
export const searchResultActionSchema = z.object({
|
|
574
576
|
type: z.literal('action'),
|
|
575
577
|
title: z.string(),
|
|
@@ -580,10 +582,20 @@ export const searchResultActionSchema = z.object({
|
|
|
580
582
|
media: mediaSchema.optional(),
|
|
581
583
|
});
|
|
582
584
|
|
|
585
|
+
export const searchResultSearchSchema = z.object({
|
|
586
|
+
type: z.literal('search'),
|
|
587
|
+
title: z.string(),
|
|
588
|
+
description: z.string().optional(),
|
|
589
|
+
icon: iconSchema.optional(),
|
|
590
|
+
image: imageSchema.optional(),
|
|
591
|
+
value: searchSearchRequestSchema,
|
|
592
|
+
media: mediaSchema.optional(),
|
|
593
|
+
});
|
|
594
|
+
|
|
583
595
|
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
584
596
|
|
|
585
|
-
export const
|
|
586
|
-
type: z.literal('results'),
|
|
597
|
+
export const searchResponseBodySchema = z.object({
|
|
598
|
+
type: z.literal('results').optional(),
|
|
587
599
|
results: z.array(searchResultSchema),
|
|
588
600
|
});
|
|
589
601
|
|
|
@@ -592,63 +604,20 @@ export const searchResultsResponseBodySchema = z.object({
|
|
|
592
604
|
results: z.array(searchResultSchema),
|
|
593
605
|
});
|
|
594
606
|
|
|
595
|
-
export const
|
|
596
|
-
|
|
597
|
-
});
|
|
598
|
-
|
|
599
|
-
export const dynamicLaunchConfigSchema = z.object({
|
|
600
|
-
type: z.literal('dynamic'),
|
|
601
|
-
request: requestSchema,
|
|
602
|
-
presentation: presentationSchema,
|
|
603
|
-
});
|
|
604
|
-
|
|
605
|
-
export const launchConfigSchema = dynamicLaunchConfigSchema;
|
|
606
|
-
|
|
607
|
-
export const searchResponseBodySchema = z.object({
|
|
608
|
-
type: z.literal('results').optional(),
|
|
607
|
+
export const searchInitialResultsConfigSchema = z.object({
|
|
608
|
+
type: z.literal('results'),
|
|
609
609
|
results: z.array(searchResultSchema),
|
|
610
610
|
});
|
|
611
611
|
|
|
612
|
-
export const
|
|
613
|
-
z.
|
|
614
|
-
key: z.string().optional(),
|
|
615
|
-
type: z.string().optional(),
|
|
616
|
-
actions: z.array(actionSchema).optional(),
|
|
617
|
-
refreshFormUrl: z.string().optional(),
|
|
618
|
-
id: z.string(),
|
|
619
|
-
title: z.string(),
|
|
620
|
-
schemas: z.array(schemaSchema),
|
|
621
|
-
layout: z.array(layoutSchema),
|
|
622
|
-
description: z.string().optional(),
|
|
623
|
-
model: jsonElementSchema.optional(),
|
|
624
|
-
external: externalSchema.optional(),
|
|
625
|
-
polling: pollingSchema.optional(),
|
|
626
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
627
|
-
analytics: z.record(z.string()).optional(),
|
|
628
|
-
errors: stepErrorSchema.optional(),
|
|
629
|
-
navigation: navigationSchema.optional(),
|
|
630
|
-
refreshUrl: z.string().optional(),
|
|
631
|
-
control: z.string().optional(),
|
|
632
|
-
refreshAfter: z.string().optional(),
|
|
633
|
-
toolbar: toolbarSchema.optional(),
|
|
634
|
-
tags: z.array(z.string()).optional(),
|
|
635
|
-
footer: z.array(layoutSchema).optional(),
|
|
636
|
-
}),
|
|
612
|
+
export const searchInitialStateSchema: z.ZodSchema<SearchInitialState> = z.lazy(() =>
|
|
613
|
+
z.union([searchInitialLayoutConfigSchema, searchInitialResultsConfigSchema]),
|
|
637
614
|
);
|
|
638
615
|
|
|
639
|
-
export const
|
|
640
|
-
z.
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
booleanSchemaSchema,
|
|
645
|
-
constSchemaSchema,
|
|
646
|
-
integerSchemaSchema,
|
|
647
|
-
numberSchemaSchema,
|
|
648
|
-
objectSchemaSchema,
|
|
649
|
-
oneOfSchemaSchema,
|
|
650
|
-
stringSchemaSchema,
|
|
651
|
-
]),
|
|
616
|
+
export const searchInitialLayoutConfigSchema: z.ZodSchema<SearchInitialLayoutConfig> = z.lazy(() =>
|
|
617
|
+
z.object({
|
|
618
|
+
type: z.literal('layout'),
|
|
619
|
+
content: z.array(layoutSchema),
|
|
620
|
+
}),
|
|
652
621
|
);
|
|
653
622
|
|
|
654
623
|
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
@@ -680,37 +649,24 @@ export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
|
680
649
|
]),
|
|
681
650
|
);
|
|
682
651
|
|
|
683
|
-
export const
|
|
684
|
-
z.
|
|
685
|
-
interval: z.number().optional(),
|
|
686
|
-
url: z.string(),
|
|
687
|
-
delay: z.number().optional(),
|
|
688
|
-
timeout: z.number().optional(),
|
|
689
|
-
maxAttempts: z.number(),
|
|
690
|
-
onError: pollingOnErrorSchema,
|
|
691
|
-
}),
|
|
692
|
-
);
|
|
693
|
-
|
|
694
|
-
export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
|
|
695
|
-
z.object({
|
|
696
|
-
regexPattern: z.string(),
|
|
697
|
-
behavior: behaviorSchema.optional(),
|
|
698
|
-
}),
|
|
652
|
+
export const searchResponseSchema: z.ZodSchema<SearchResponse> = z.lazy(() =>
|
|
653
|
+
z.union([searchLayoutResponseBodySchema, searchResultsResponseBodySchema]),
|
|
699
654
|
);
|
|
700
655
|
|
|
701
|
-
export const
|
|
656
|
+
export const searchLayoutResponseBodySchema: z.ZodSchema<SearchLayoutResponseBody> = z.lazy(() =>
|
|
702
657
|
z.object({
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
tags: z.array(z.string()).optional(),
|
|
658
|
+
type: z.literal('layout'),
|
|
659
|
+
content: z.array(layoutSchema),
|
|
706
660
|
}),
|
|
707
661
|
);
|
|
708
662
|
|
|
709
|
-
export const
|
|
663
|
+
export const subflowResponseBodySchema: z.ZodSchema<SubflowResponseBody> = z.lazy(() =>
|
|
710
664
|
z.object({
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
665
|
+
referrerId: z.string(),
|
|
666
|
+
launchConfig: launchConfigSchema,
|
|
667
|
+
resultKey: z.string().optional(),
|
|
668
|
+
onCompletion: behaviorSchema.optional(),
|
|
669
|
+
onError: behaviorSchema.optional(),
|
|
714
670
|
}),
|
|
715
671
|
);
|
|
716
672
|
|
|
@@ -727,381 +683,348 @@ export const behaviorSchema: z.ZodSchema<Behavior> = z.lazy(() =>
|
|
|
727
683
|
]),
|
|
728
684
|
);
|
|
729
685
|
|
|
730
|
-
export const
|
|
686
|
+
export const modalResponseBodySchema: z.ZodSchema<ModalResponseBody> = z.lazy(() =>
|
|
731
687
|
z.object({
|
|
732
|
-
title: z.string(),
|
|
733
|
-
|
|
734
|
-
behavior: behaviorSchema,
|
|
735
|
-
context: contextSchema.optional(),
|
|
688
|
+
title: z.string().optional(),
|
|
689
|
+
content: z.array(layoutSchema),
|
|
736
690
|
}),
|
|
737
691
|
);
|
|
738
692
|
|
|
739
|
-
export const
|
|
693
|
+
export const additionalInfoSchema: z.ZodSchema<AdditionalInfo> = z.lazy(() =>
|
|
740
694
|
z.object({
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
695
|
+
text: z.string(),
|
|
696
|
+
behavior: behaviorSchema.optional(),
|
|
697
|
+
accessibilityDescription: z.string().optional(),
|
|
698
|
+
}),
|
|
699
|
+
);
|
|
700
|
+
|
|
701
|
+
export const modalBehaviorSchema: z.ZodSchema<ModalBehavior> = z.lazy(() =>
|
|
702
|
+
z.object({
|
|
703
|
+
type: z.literal('modal'),
|
|
744
704
|
title: z.string().optional(),
|
|
745
|
-
|
|
746
|
-
value: z.string().optional(),
|
|
747
|
-
subvalue: z.string().optional(),
|
|
748
|
-
tag: z.string().optional(),
|
|
749
|
-
additionalInfo: additionalInfoSchema.optional(),
|
|
750
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
751
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
752
|
-
description: z.string().optional(),
|
|
753
|
-
media: mediaSchema.optional(),
|
|
754
|
-
analyticsId: z.string().optional(),
|
|
755
|
-
tags: z.array(z.string()).optional(),
|
|
756
|
-
callToAction: listLayoutCallToActionSchema.optional(),
|
|
705
|
+
content: z.array(layoutSchema),
|
|
757
706
|
}),
|
|
758
707
|
);
|
|
759
708
|
|
|
760
|
-
export const
|
|
709
|
+
export const subflowBehaviorSchema: z.ZodSchema<SubflowBehavior> = z.lazy(() =>
|
|
761
710
|
z.object({
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
711
|
+
type: z.literal('subflow'),
|
|
712
|
+
referrerId: z.string(),
|
|
713
|
+
launchConfig: launchConfigSchema,
|
|
714
|
+
resultKey: z.string().optional(),
|
|
715
|
+
onCompletion: behaviorSchema.optional(),
|
|
716
|
+
onError: behaviorSchema.optional(),
|
|
766
717
|
}),
|
|
767
718
|
);
|
|
768
719
|
|
|
769
|
-
export const
|
|
720
|
+
export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
|
|
770
721
|
z.object({
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
right: z.array(layoutSchema),
|
|
774
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
775
|
-
control: z.string().optional(),
|
|
776
|
-
margin: sizeSchema.optional(),
|
|
777
|
-
analyticsId: z.string().optional(),
|
|
778
|
-
tags: z.array(z.string()).optional(),
|
|
722
|
+
regexPattern: z.string(),
|
|
723
|
+
behavior: behaviorSchema.optional(),
|
|
779
724
|
}),
|
|
780
725
|
);
|
|
781
726
|
|
|
782
|
-
export const
|
|
727
|
+
export const pollingSchema: z.ZodSchema<Polling> = z.lazy(() =>
|
|
783
728
|
z.object({
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
analyticsId: z.string().optional(),
|
|
791
|
-
tags: z.array(z.string()).optional(),
|
|
729
|
+
interval: z.number().optional(),
|
|
730
|
+
url: z.string(),
|
|
731
|
+
delay: z.number().optional(),
|
|
732
|
+
timeout: z.number().optional(),
|
|
733
|
+
maxAttempts: z.number(),
|
|
734
|
+
onError: pollingOnErrorSchema,
|
|
792
735
|
}),
|
|
793
736
|
);
|
|
794
737
|
|
|
795
|
-
export const
|
|
738
|
+
export const pollingOnErrorSchema: z.ZodSchema<PollingOnError> = z.lazy(() =>
|
|
796
739
|
z.object({
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
behavior: behaviorSchema,
|
|
800
|
-
context: contextSchema.optional(),
|
|
740
|
+
action: actionSchema.optional(),
|
|
741
|
+
behavior: behaviorSchema.optional(),
|
|
801
742
|
}),
|
|
802
743
|
);
|
|
803
744
|
|
|
804
|
-
export const
|
|
745
|
+
export const toolbarSchema: z.ZodSchema<Toolbar> = z.lazy(() =>
|
|
805
746
|
z.object({
|
|
806
|
-
|
|
807
|
-
items: z.array(statusListLayoutItemSchema),
|
|
808
|
-
title: z.string().optional(),
|
|
747
|
+
items: z.array(toolbarItemSchema),
|
|
809
748
|
control: z.string().optional(),
|
|
810
|
-
margin: sizeSchema.optional(),
|
|
811
|
-
analyticsId: z.string().optional(),
|
|
812
749
|
tags: z.array(z.string()).optional(),
|
|
813
750
|
}),
|
|
814
751
|
);
|
|
815
752
|
|
|
816
|
-
export const
|
|
753
|
+
export const toolbarItemSchema: z.ZodSchema<ToolbarItem> = z.lazy(() => toolbarButtonSchema);
|
|
754
|
+
|
|
755
|
+
export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
|
|
817
756
|
z.object({
|
|
818
|
-
type: z.literal('
|
|
757
|
+
type: z.literal('toolbar-button'),
|
|
819
758
|
title: z.string(),
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
emptyMessage: z.string().optional(),
|
|
759
|
+
behavior: behaviorSchema,
|
|
760
|
+
accessibilityDescription: z.string().optional(),
|
|
761
|
+
media: mediaSchema.optional(),
|
|
824
762
|
control: z.string().optional(),
|
|
825
|
-
|
|
763
|
+
context: contextSchema.optional(),
|
|
764
|
+
disabled: z.boolean().optional(),
|
|
826
765
|
analyticsId: z.string().optional(),
|
|
827
766
|
tags: z.array(z.string()).optional(),
|
|
828
|
-
hint: z.string().optional(),
|
|
829
|
-
initialState: searchInitialStateSchema.optional(),
|
|
830
767
|
}),
|
|
831
768
|
);
|
|
832
769
|
|
|
833
|
-
export const
|
|
834
|
-
z.
|
|
770
|
+
export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
|
|
771
|
+
z.object({
|
|
772
|
+
param: z.string(),
|
|
773
|
+
idProperty: z.string(),
|
|
774
|
+
schema: schemaSchema,
|
|
775
|
+
url: z.string(),
|
|
776
|
+
method: httpMethodSchema,
|
|
777
|
+
}),
|
|
835
778
|
);
|
|
836
779
|
|
|
837
|
-
export const
|
|
780
|
+
export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
|
|
781
|
+
z.union([
|
|
782
|
+
allOfSchemaSchema,
|
|
783
|
+
arraySchemaSchema,
|
|
784
|
+
blobSchemaSchema,
|
|
785
|
+
booleanSchemaSchema,
|
|
786
|
+
constSchemaSchema,
|
|
787
|
+
integerSchemaSchema,
|
|
788
|
+
numberSchemaSchema,
|
|
789
|
+
objectSchemaSchema,
|
|
790
|
+
oneOfSchemaSchema,
|
|
791
|
+
stringSchemaSchema,
|
|
792
|
+
]),
|
|
793
|
+
);
|
|
794
|
+
|
|
795
|
+
export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
838
796
|
z.object({
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
797
|
+
disabled: z.boolean().optional(),
|
|
798
|
+
promoted: z.boolean().optional(),
|
|
799
|
+
allOf: z.array(schemaSchema),
|
|
800
|
+
$id: z.string().optional(),
|
|
801
|
+
title: z.string().optional(),
|
|
802
|
+
description: z.string().optional(),
|
|
842
803
|
control: z.string().optional(),
|
|
843
|
-
|
|
844
|
-
|
|
804
|
+
hidden: z.boolean().optional(),
|
|
805
|
+
icon: iconSchema.optional(),
|
|
806
|
+
image: imageSchema.optional(),
|
|
807
|
+
keywords: z.array(z.string()).optional(),
|
|
808
|
+
summary: summaryProviderSchema.optional(),
|
|
845
809
|
analyticsId: z.string().optional(),
|
|
810
|
+
alert: alertLayoutSchema.optional(),
|
|
811
|
+
media: mediaSchema.optional(),
|
|
846
812
|
tags: z.array(z.string()).optional(),
|
|
813
|
+
additionalText: z.string().optional(),
|
|
814
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
815
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
847
816
|
}),
|
|
848
817
|
);
|
|
849
818
|
|
|
850
|
-
export const
|
|
819
|
+
export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
|
|
851
820
|
z.object({
|
|
852
|
-
type: z.literal('
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
border: z.boolean().optional(),
|
|
821
|
+
type: z.literal('alert'),
|
|
822
|
+
markdown: z.string(),
|
|
823
|
+
context: contextSchema.optional(),
|
|
856
824
|
control: z.string().optional(),
|
|
857
825
|
margin: sizeSchema.optional(),
|
|
826
|
+
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
858
827
|
analyticsId: z.string().optional(),
|
|
859
828
|
tags: z.array(z.string()).optional(),
|
|
860
829
|
}),
|
|
861
830
|
);
|
|
862
831
|
|
|
863
|
-
export const
|
|
832
|
+
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
864
833
|
z.object({
|
|
865
|
-
type: z.literal('
|
|
866
|
-
|
|
867
|
-
|
|
834
|
+
type: z.literal('array'),
|
|
835
|
+
promoted: z.boolean().optional(),
|
|
836
|
+
$id: z.string().optional(),
|
|
837
|
+
items: schemaSchema,
|
|
838
|
+
addItemTitle: z.string(),
|
|
839
|
+
editItemTitle: z.string(),
|
|
840
|
+
minItems: z.number().optional(),
|
|
841
|
+
maxItems: z.number().optional(),
|
|
842
|
+
placeholder: z.string().optional(),
|
|
868
843
|
title: z.string().optional(),
|
|
869
|
-
|
|
870
|
-
context: contextSchema.optional(),
|
|
871
|
-
disabled: z.boolean().optional(),
|
|
872
|
-
pinOrder: z.number().optional(),
|
|
844
|
+
description: z.string().optional(),
|
|
873
845
|
control: z.string().optional(),
|
|
874
|
-
|
|
846
|
+
hidden: z.boolean().optional(),
|
|
847
|
+
icon: iconSchema.optional(),
|
|
848
|
+
image: imageSchema.optional(),
|
|
849
|
+
keywords: z.array(z.string()).optional(),
|
|
850
|
+
summary: summarySummariserSchema.optional(),
|
|
875
851
|
analyticsId: z.string().optional(),
|
|
876
|
-
|
|
852
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
853
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
854
|
+
alert: alertLayoutSchema.optional(),
|
|
855
|
+
validationMessages: z.record(z.string()).optional(),
|
|
856
|
+
disabled: z.boolean().optional(),
|
|
877
857
|
media: mediaSchema.optional(),
|
|
858
|
+
tags: z.array(z.string()).optional(),
|
|
859
|
+
additionalText: z.string().optional(),
|
|
860
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
861
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
878
862
|
}),
|
|
879
863
|
);
|
|
880
864
|
|
|
881
|
-
export const
|
|
865
|
+
export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
|
|
882
866
|
z.object({
|
|
883
|
-
|
|
867
|
+
autofillProvider: z.string().optional(),
|
|
868
|
+
promoted: z.boolean().optional(),
|
|
869
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
870
|
+
refreshUrl: z.string().optional(),
|
|
871
|
+
refreshFormUrl: z.string().optional(),
|
|
872
|
+
promotion: jsonElementSchema.optional(),
|
|
873
|
+
oneOf: z.array(schemaSchema),
|
|
874
|
+
placeholder: z.string().optional(),
|
|
875
|
+
$id: z.string().optional(),
|
|
884
876
|
title: z.string().optional(),
|
|
885
|
-
|
|
877
|
+
description: z.string().optional(),
|
|
886
878
|
control: z.string().optional(),
|
|
887
|
-
|
|
879
|
+
default: jsonElementSchema.optional(),
|
|
880
|
+
hidden: z.boolean().optional(),
|
|
881
|
+
icon: iconSchema.optional(),
|
|
882
|
+
image: imageSchema.optional(),
|
|
883
|
+
keywords: z.array(z.string()).optional(),
|
|
884
|
+
summary: summaryProviderSchema.optional(),
|
|
888
885
|
analyticsId: z.string().optional(),
|
|
886
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
887
|
+
alert: alertLayoutSchema.optional(),
|
|
888
|
+
help: helpSchema.optional(),
|
|
889
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
890
|
+
autofillKey: z.string().optional(),
|
|
891
|
+
validationMessages: z.record(z.string()).optional(),
|
|
892
|
+
disabled: z.boolean().optional(),
|
|
893
|
+
onChange: behaviorSchema.optional(),
|
|
894
|
+
media: mediaSchema.optional(),
|
|
889
895
|
tags: z.array(z.string()).optional(),
|
|
896
|
+
additionalText: z.string().optional(),
|
|
897
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
898
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
890
899
|
}),
|
|
891
900
|
);
|
|
892
901
|
|
|
893
|
-
export const
|
|
902
|
+
export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
|
|
903
|
+
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
904
|
+
);
|
|
905
|
+
|
|
906
|
+
export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
|
|
894
907
|
z.object({
|
|
895
|
-
type: z.literal('
|
|
908
|
+
type: z.literal('blob'),
|
|
909
|
+
promoted: z.boolean().optional(),
|
|
910
|
+
$id: z.string().optional(),
|
|
896
911
|
title: z.string().optional(),
|
|
897
|
-
|
|
898
|
-
items: z.array(listLayoutItemSchema),
|
|
912
|
+
description: z.string().optional(),
|
|
899
913
|
control: z.string().optional(),
|
|
900
|
-
|
|
914
|
+
hidden: z.boolean().optional(),
|
|
915
|
+
icon: iconSchema.optional(),
|
|
916
|
+
image: imageSchema.optional(),
|
|
917
|
+
keywords: z.array(z.string()).optional(),
|
|
918
|
+
summary: summaryProviderSchema.optional(),
|
|
901
919
|
analyticsId: z.string().optional(),
|
|
920
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
921
|
+
validationMessages: z.record(z.string()).optional(),
|
|
922
|
+
alert: alertLayoutSchema.optional(),
|
|
923
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
924
|
+
accepts: z.array(z.string()).optional(),
|
|
925
|
+
maxSize: z.number().optional(),
|
|
926
|
+
source: uploadSourceSchema.optional(),
|
|
927
|
+
disabled: z.boolean().optional(),
|
|
928
|
+
media: mediaSchema.optional(),
|
|
902
929
|
tags: z.array(z.string()).optional(),
|
|
930
|
+
additionalText: z.string().optional(),
|
|
931
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
932
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
903
933
|
}),
|
|
904
934
|
);
|
|
905
935
|
|
|
906
|
-
export const
|
|
907
|
-
z.object({
|
|
908
|
-
type: z.literal('modal'),
|
|
909
|
-
control: z.string().optional(),
|
|
910
|
-
margin: sizeSchema.optional(),
|
|
911
|
-
trigger: modalLayoutTriggerSchema,
|
|
912
|
-
content: modalLayoutContentSchema,
|
|
913
|
-
analyticsId: z.string().optional(),
|
|
914
|
-
tags: z.array(z.string()).optional(),
|
|
915
|
-
}),
|
|
916
|
-
);
|
|
917
|
-
|
|
918
|
-
export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
|
|
919
|
-
z.object({
|
|
920
|
-
type: z.literal('review'),
|
|
921
|
-
orientation: z.string().optional(),
|
|
922
|
-
action: actionSchema.optional(),
|
|
923
|
-
fields: z.array(reviewLayoutFieldSchema),
|
|
924
|
-
title: z.string().optional(),
|
|
925
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
926
|
-
control: z.string().optional(),
|
|
927
|
-
margin: sizeSchema.optional(),
|
|
928
|
-
analyticsId: z.string().optional(),
|
|
929
|
-
tags: z.array(z.string()).optional(),
|
|
930
|
-
}),
|
|
931
|
-
);
|
|
932
|
-
|
|
933
|
-
export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
934
|
-
z.object({
|
|
935
|
-
type: z.literal('section'),
|
|
936
|
-
components: z.array(layoutSchema),
|
|
937
|
-
title: z.string(),
|
|
938
|
-
callToAction: sectionLayoutCallToActionSchema.optional(),
|
|
939
|
-
control: z.string().optional(),
|
|
940
|
-
margin: sizeSchema.optional(),
|
|
941
|
-
analyticsId: z.string().optional(),
|
|
942
|
-
tags: z.array(z.string()).optional(),
|
|
943
|
-
}),
|
|
944
|
-
);
|
|
945
|
-
|
|
946
|
-
export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
947
|
-
z.object({
|
|
948
|
-
type: z.literal('tabs'),
|
|
949
|
-
tabs: z.array(tabsLayoutTabSchema),
|
|
950
|
-
control: z.string().optional(),
|
|
951
|
-
margin: sizeSchema.optional(),
|
|
952
|
-
analyticsId: z.string().optional(),
|
|
953
|
-
tags: z.array(z.string()).optional(),
|
|
954
|
-
}),
|
|
955
|
-
);
|
|
956
|
-
|
|
957
|
-
export const upsellLayoutSchema: z.ZodSchema<UpsellLayout> = z.lazy(() =>
|
|
958
|
-
z.object({
|
|
959
|
-
type: z.literal('upsell'),
|
|
960
|
-
text: z.string(),
|
|
961
|
-
callToAction: upsellLayoutCallToActionSchema,
|
|
962
|
-
media: mediaSchema.optional(),
|
|
963
|
-
onDismiss: requestSchema.optional(),
|
|
964
|
-
control: z.string().optional(),
|
|
965
|
-
margin: sizeSchema.optional(),
|
|
966
|
-
analyticsId: z.string().optional(),
|
|
967
|
-
tags: z.array(z.string()).optional(),
|
|
968
|
-
}),
|
|
969
|
-
);
|
|
970
|
-
|
|
971
|
-
export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
|
|
972
|
-
z.object({
|
|
973
|
-
title: z.string(),
|
|
974
|
-
components: z.array(layoutSchema),
|
|
975
|
-
tag: z.string().optional(),
|
|
976
|
-
analyticsId: z.string().optional(),
|
|
977
|
-
tags: z.array(z.string()).optional(),
|
|
978
|
-
}),
|
|
979
|
-
);
|
|
980
|
-
|
|
981
|
-
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
936
|
+
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
982
937
|
z.object({
|
|
938
|
+
type: z.literal('boolean'),
|
|
939
|
+
autofillProvider: z.string().optional(),
|
|
940
|
+
promoted: z.boolean().optional(),
|
|
941
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
942
|
+
refreshUrl: z.string().optional(),
|
|
943
|
+
refreshFormUrl: z.string().optional(),
|
|
944
|
+
$id: z.string().optional(),
|
|
983
945
|
title: z.string().optional(),
|
|
984
|
-
components: z.array(layoutSchema),
|
|
985
|
-
}),
|
|
986
|
-
);
|
|
987
|
-
|
|
988
|
-
export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
|
|
989
|
-
z.object({
|
|
990
|
-
action: actionSchema.optional(),
|
|
991
|
-
title: z.string(),
|
|
992
946
|
description: z.string().optional(),
|
|
947
|
+
control: z.string().optional(),
|
|
948
|
+
default: z.boolean().optional(),
|
|
949
|
+
hidden: z.boolean().optional(),
|
|
993
950
|
disabled: z.boolean().optional(),
|
|
994
951
|
icon: iconSchema.optional(),
|
|
995
952
|
image: imageSchema.optional(),
|
|
996
|
-
|
|
997
|
-
|
|
953
|
+
keywords: z.array(z.string()).optional(),
|
|
954
|
+
summary: summaryProviderSchema.optional(),
|
|
955
|
+
analyticsId: z.string().optional(),
|
|
956
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
957
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
958
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
959
|
+
alert: alertLayoutSchema.optional(),
|
|
960
|
+
autofillKey: z.string().optional(),
|
|
961
|
+
help: helpSchema.optional(),
|
|
962
|
+
onChange: behaviorSchema.optional(),
|
|
963
|
+
media: mediaSchema.optional(),
|
|
964
|
+
tags: z.array(z.string()).optional(),
|
|
998
965
|
additionalText: z.string().optional(),
|
|
999
966
|
supportingValues: supportingValuesSchema.optional(),
|
|
1000
967
|
inlineAlert: inlineAlertSchema.optional(),
|
|
1001
|
-
media: mediaSchema.optional(),
|
|
1002
|
-
analyticsId: z.string().optional(),
|
|
1003
|
-
keywords: z.array(z.string()).optional(),
|
|
1004
|
-
tags: z.array(z.string()).optional(),
|
|
1005
|
-
}),
|
|
1006
|
-
);
|
|
1007
|
-
|
|
1008
|
-
export const upsellLayoutCallToActionSchema: z.ZodSchema<UpsellLayoutCallToAction> = z.lazy(() =>
|
|
1009
|
-
z.object({
|
|
1010
|
-
title: z.string(),
|
|
1011
|
-
accessibilityDescription: z.string().optional(),
|
|
1012
|
-
behavior: behaviorSchema,
|
|
1013
|
-
context: contextSchema.optional(),
|
|
1014
|
-
}),
|
|
1015
|
-
);
|
|
1016
|
-
|
|
1017
|
-
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
1018
|
-
z.object({
|
|
1019
|
-
action: actionSchema.optional(),
|
|
1020
|
-
title: z.string(),
|
|
1021
|
-
accessibilityDescription: z.string().optional(),
|
|
1022
|
-
behavior: behaviorSchema.optional(),
|
|
1023
|
-
context: contextSchema.optional(),
|
|
1024
968
|
}),
|
|
1025
969
|
);
|
|
1026
970
|
|
|
1027
|
-
export const
|
|
971
|
+
export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
|
|
1028
972
|
z.object({
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
973
|
+
hidden: z.boolean().optional(),
|
|
974
|
+
control: z.string().optional(),
|
|
975
|
+
promoted: z.boolean().optional(),
|
|
976
|
+
$id: z.string().optional(),
|
|
977
|
+
const: jsonElementSchema,
|
|
978
|
+
title: z.string().optional(),
|
|
979
|
+
description: z.string().optional(),
|
|
1034
980
|
icon: iconSchema.optional(),
|
|
1035
981
|
image: imageSchema.optional(),
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1039
|
-
media: mediaSchema.optional(),
|
|
982
|
+
keywords: z.array(z.string()).optional(),
|
|
983
|
+
summary: summaryProviderSchema.optional(),
|
|
1040
984
|
analyticsId: z.string().optional(),
|
|
985
|
+
disabled: z.boolean().optional(),
|
|
986
|
+
media: mediaSchema.optional(),
|
|
987
|
+
alert: alertLayoutSchema.optional(),
|
|
988
|
+
layout: z.array(layoutSchema).optional(),
|
|
1041
989
|
tags: z.array(z.string()).optional(),
|
|
990
|
+
additionalText: z.string().optional(),
|
|
991
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
992
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1042
993
|
}),
|
|
1043
994
|
);
|
|
1044
995
|
|
|
1045
|
-
export const
|
|
1046
|
-
z.object({
|
|
1047
|
-
title: z.string(),
|
|
1048
|
-
accessibilityDescription: z.string().optional(),
|
|
1049
|
-
behavior: behaviorSchema,
|
|
1050
|
-
context: contextSchema.optional(),
|
|
1051
|
-
}),
|
|
1052
|
-
);
|
|
1053
|
-
|
|
1054
|
-
export const subflowResponseBodySchema: z.ZodSchema<SubflowResponseBody> = z.lazy(() =>
|
|
1055
|
-
z.object({
|
|
1056
|
-
referrerId: z.string(),
|
|
1057
|
-
launchConfig: launchConfigSchema,
|
|
1058
|
-
resultKey: z.string().optional(),
|
|
1059
|
-
onCompletion: behaviorSchema.optional(),
|
|
1060
|
-
onError: behaviorSchema.optional(),
|
|
1061
|
-
}),
|
|
1062
|
-
);
|
|
1063
|
-
|
|
1064
|
-
export const searchInitialLayoutConfigSchema: z.ZodSchema<SearchInitialLayoutConfig> = z.lazy(() =>
|
|
1065
|
-
z.object({
|
|
1066
|
-
type: z.literal('layout'),
|
|
1067
|
-
content: z.array(layoutSchema),
|
|
1068
|
-
}),
|
|
1069
|
-
);
|
|
1070
|
-
|
|
1071
|
-
export const searchLayoutResponseBodySchema: z.ZodSchema<SearchLayoutResponseBody> = z.lazy(() =>
|
|
1072
|
-
z.object({
|
|
1073
|
-
type: z.literal('layout'),
|
|
1074
|
-
content: z.array(layoutSchema),
|
|
1075
|
-
}),
|
|
1076
|
-
);
|
|
1077
|
-
|
|
1078
|
-
export const searchResponseSchema: z.ZodSchema<SearchResponse> = z.lazy(() =>
|
|
1079
|
-
z.union([searchLayoutResponseBodySchema, searchResultsResponseBodySchema]),
|
|
1080
|
-
);
|
|
1081
|
-
|
|
1082
|
-
export const modalResponseBodySchema: z.ZodSchema<ModalResponseBody> = z.lazy(() =>
|
|
1083
|
-
z.object({
|
|
1084
|
-
title: z.string().optional(),
|
|
1085
|
-
content: z.array(layoutSchema),
|
|
1086
|
-
}),
|
|
1087
|
-
);
|
|
1088
|
-
|
|
1089
|
-
export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
996
|
+
export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
1090
997
|
z.object({
|
|
1091
|
-
|
|
998
|
+
type: z.literal('integer'),
|
|
999
|
+
autofillProvider: z.string().optional(),
|
|
1092
1000
|
promoted: z.boolean().optional(),
|
|
1093
|
-
|
|
1001
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
1002
|
+
refreshUrl: z.string().optional(),
|
|
1003
|
+
refreshFormUrl: z.string().optional(),
|
|
1004
|
+
placeholder: z.string().optional(),
|
|
1005
|
+
minimum: z.number().optional(),
|
|
1006
|
+
maximum: z.number().optional(),
|
|
1094
1007
|
$id: z.string().optional(),
|
|
1095
1008
|
title: z.string().optional(),
|
|
1096
1009
|
description: z.string().optional(),
|
|
1097
1010
|
control: z.string().optional(),
|
|
1011
|
+
default: z.number().optional(),
|
|
1098
1012
|
hidden: z.boolean().optional(),
|
|
1013
|
+
disabled: z.boolean().optional(),
|
|
1099
1014
|
icon: iconSchema.optional(),
|
|
1100
1015
|
image: imageSchema.optional(),
|
|
1101
1016
|
keywords: z.array(z.string()).optional(),
|
|
1102
1017
|
summary: summaryProviderSchema.optional(),
|
|
1103
1018
|
analyticsId: z.string().optional(),
|
|
1019
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
1020
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
1021
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
1022
|
+
validationMessages: z.record(z.string()).optional(),
|
|
1104
1023
|
alert: alertLayoutSchema.optional(),
|
|
1024
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1025
|
+
autofillKey: z.string().optional(),
|
|
1026
|
+
help: helpSchema.optional(),
|
|
1027
|
+
onChange: behaviorSchema.optional(),
|
|
1105
1028
|
media: mediaSchema.optional(),
|
|
1106
1029
|
tags: z.array(z.string()).optional(),
|
|
1107
1030
|
additionalText: z.string().optional(),
|
|
@@ -1150,13 +1073,33 @@ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
|
1150
1073
|
}),
|
|
1151
1074
|
);
|
|
1152
1075
|
|
|
1153
|
-
export const
|
|
1076
|
+
export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
1154
1077
|
z.object({
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1078
|
+
type: z.literal('object'),
|
|
1079
|
+
disabled: z.boolean().optional(),
|
|
1080
|
+
promoted: z.boolean().optional(),
|
|
1081
|
+
help: helpSchema.optional(),
|
|
1082
|
+
properties: z.record(schemaSchema),
|
|
1083
|
+
displayOrder: z.array(z.string()),
|
|
1084
|
+
required: z.array(z.string()).optional(),
|
|
1085
|
+
$id: z.string().optional(),
|
|
1086
|
+
title: z.string().optional(),
|
|
1087
|
+
description: z.string().optional(),
|
|
1088
|
+
control: z.string().optional(),
|
|
1089
|
+
hidden: z.boolean().optional(),
|
|
1090
|
+
icon: iconSchema.optional(),
|
|
1091
|
+
image: imageSchema.optional(),
|
|
1092
|
+
keywords: z.array(z.string()).optional(),
|
|
1093
|
+
summary: summaryProviderSchema.optional(),
|
|
1094
|
+
analyticsId: z.string().optional(),
|
|
1095
|
+
alert: alertLayoutSchema.optional(),
|
|
1096
|
+
media: mediaSchema.optional(),
|
|
1097
|
+
tags: z.array(z.string()).optional(),
|
|
1098
|
+
format: z.string().optional(),
|
|
1099
|
+
additionalText: z.string().optional(),
|
|
1100
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1101
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1102
|
+
onChange: behaviorSchema.optional(),
|
|
1160
1103
|
}),
|
|
1161
1104
|
);
|
|
1162
1105
|
|
|
@@ -1212,38 +1155,24 @@ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
|
1212
1155
|
}),
|
|
1213
1156
|
);
|
|
1214
1157
|
|
|
1215
|
-
export const
|
|
1158
|
+
export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
|
|
1216
1159
|
z.object({
|
|
1217
|
-
type: z.literal('
|
|
1218
|
-
autofillProvider: z.string().optional(),
|
|
1160
|
+
type: z.literal('array'),
|
|
1219
1161
|
promoted: z.boolean().optional(),
|
|
1220
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1221
|
-
refreshUrl: z.string().optional(),
|
|
1222
|
-
refreshFormUrl: z.string().optional(),
|
|
1223
|
-
placeholder: z.string().optional(),
|
|
1224
|
-
minimum: z.number().optional(),
|
|
1225
|
-
maximum: z.number().optional(),
|
|
1226
1162
|
$id: z.string().optional(),
|
|
1163
|
+
items: z.array(schemaSchema),
|
|
1227
1164
|
title: z.string().optional(),
|
|
1228
1165
|
description: z.string().optional(),
|
|
1229
1166
|
control: z.string().optional(),
|
|
1230
|
-
default: z.number().optional(),
|
|
1231
1167
|
hidden: z.boolean().optional(),
|
|
1232
|
-
disabled: z.boolean().optional(),
|
|
1233
1168
|
icon: iconSchema.optional(),
|
|
1234
1169
|
image: imageSchema.optional(),
|
|
1235
1170
|
keywords: z.array(z.string()).optional(),
|
|
1236
1171
|
summary: summaryProviderSchema.optional(),
|
|
1237
1172
|
analyticsId: z.string().optional(),
|
|
1238
1173
|
persistAsync: persistAsyncSchema.optional(),
|
|
1239
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1240
1174
|
validationAsync: validateAsyncSchema.optional(),
|
|
1241
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1242
1175
|
alert: alertLayoutSchema.optional(),
|
|
1243
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1244
|
-
autofillKey: z.string().optional(),
|
|
1245
|
-
help: helpSchema.optional(),
|
|
1246
|
-
onChange: behaviorSchema.optional(),
|
|
1247
1176
|
media: mediaSchema.optional(),
|
|
1248
1177
|
tags: z.array(z.string()).optional(),
|
|
1249
1178
|
additionalText: z.string().optional(),
|
|
@@ -1252,265 +1181,336 @@ export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
|
1252
1181
|
}),
|
|
1253
1182
|
);
|
|
1254
1183
|
|
|
1255
|
-
export const
|
|
1184
|
+
export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.lazy(() =>
|
|
1256
1185
|
z.object({
|
|
1257
|
-
|
|
1258
|
-
autofillProvider: z.string().optional(),
|
|
1259
|
-
promoted: z.boolean().optional(),
|
|
1260
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1261
|
-
refreshUrl: z.string().optional(),
|
|
1262
|
-
refreshFormUrl: z.string().optional(),
|
|
1263
|
-
$id: z.string().optional(),
|
|
1264
|
-
title: z.string().optional(),
|
|
1186
|
+
title: z.string(),
|
|
1265
1187
|
description: z.string().optional(),
|
|
1188
|
+
icon: iconSchema,
|
|
1189
|
+
status: statusListLayoutStatusSchema.optional(),
|
|
1190
|
+
callToAction: itemCallToActionSchema.optional(),
|
|
1191
|
+
tag: z.string().optional(),
|
|
1192
|
+
analyticsId: z.string().optional(),
|
|
1193
|
+
tags: z.array(z.string()).optional(),
|
|
1194
|
+
}),
|
|
1195
|
+
);
|
|
1196
|
+
|
|
1197
|
+
export const itemCallToActionSchema: z.ZodSchema<ItemCallToAction> = z.lazy(() =>
|
|
1198
|
+
z.object({
|
|
1199
|
+
title: z.string(),
|
|
1200
|
+
accessibilityDescription: z.string().optional(),
|
|
1201
|
+
behavior: behaviorSchema,
|
|
1202
|
+
context: contextSchema.optional(),
|
|
1203
|
+
}),
|
|
1204
|
+
);
|
|
1205
|
+
|
|
1206
|
+
export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
|
|
1207
|
+
z.object({
|
|
1208
|
+
type: z.literal('decision'),
|
|
1209
|
+
title: z.string().optional(),
|
|
1210
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
1266
1211
|
control: z.string().optional(),
|
|
1267
|
-
|
|
1268
|
-
|
|
1212
|
+
margin: sizeSchema.optional(),
|
|
1213
|
+
analyticsId: z.string().optional(),
|
|
1214
|
+
tags: z.array(z.string()).optional(),
|
|
1215
|
+
}),
|
|
1216
|
+
);
|
|
1217
|
+
|
|
1218
|
+
export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
|
|
1219
|
+
z.object({
|
|
1220
|
+
action: actionSchema.optional(),
|
|
1221
|
+
title: z.string(),
|
|
1222
|
+
description: z.string().optional(),
|
|
1269
1223
|
disabled: z.boolean().optional(),
|
|
1270
1224
|
icon: iconSchema.optional(),
|
|
1271
1225
|
image: imageSchema.optional(),
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
analyticsId: z.string().optional(),
|
|
1275
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1276
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1277
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1278
|
-
alert: alertLayoutSchema.optional(),
|
|
1279
|
-
autofillKey: z.string().optional(),
|
|
1280
|
-
help: helpSchema.optional(),
|
|
1281
|
-
onChange: behaviorSchema.optional(),
|
|
1282
|
-
media: mediaSchema.optional(),
|
|
1283
|
-
tags: z.array(z.string()).optional(),
|
|
1226
|
+
behavior: behaviorSchema.optional(),
|
|
1227
|
+
tag: z.string().optional(),
|
|
1284
1228
|
additionalText: z.string().optional(),
|
|
1285
1229
|
supportingValues: supportingValuesSchema.optional(),
|
|
1286
1230
|
inlineAlert: inlineAlertSchema.optional(),
|
|
1231
|
+
media: mediaSchema.optional(),
|
|
1232
|
+
analyticsId: z.string().optional(),
|
|
1233
|
+
keywords: z.array(z.string()).optional(),
|
|
1234
|
+
tags: z.array(z.string()).optional(),
|
|
1287
1235
|
}),
|
|
1288
1236
|
);
|
|
1289
1237
|
|
|
1290
|
-
export const
|
|
1238
|
+
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
1291
1239
|
z.object({
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1240
|
+
action: actionSchema.optional(),
|
|
1241
|
+
title: z.string(),
|
|
1242
|
+
accessibilityDescription: z.string().optional(),
|
|
1243
|
+
behavior: behaviorSchema.optional(),
|
|
1244
|
+
context: contextSchema.optional(),
|
|
1245
|
+
}),
|
|
1246
|
+
);
|
|
1247
|
+
|
|
1248
|
+
export const upsellLayoutSchema: z.ZodSchema<UpsellLayout> = z.lazy(() =>
|
|
1249
|
+
z.object({
|
|
1250
|
+
type: z.literal('upsell'),
|
|
1251
|
+
text: z.string(),
|
|
1252
|
+
callToAction: upsellLayoutCallToActionSchema,
|
|
1253
|
+
media: mediaSchema.optional(),
|
|
1254
|
+
onDismiss: requestSchema.optional(),
|
|
1297
1255
|
control: z.string().optional(),
|
|
1298
|
-
|
|
1299
|
-
icon: iconSchema.optional(),
|
|
1300
|
-
image: imageSchema.optional(),
|
|
1301
|
-
keywords: z.array(z.string()).optional(),
|
|
1302
|
-
summary: summaryProviderSchema.optional(),
|
|
1256
|
+
margin: sizeSchema.optional(),
|
|
1303
1257
|
analyticsId: z.string().optional(),
|
|
1304
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1305
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1306
|
-
alert: alertLayoutSchema.optional(),
|
|
1307
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
1308
|
-
accepts: z.array(z.string()).optional(),
|
|
1309
|
-
maxSize: z.number().optional(),
|
|
1310
|
-
source: uploadSourceSchema.optional(),
|
|
1311
|
-
disabled: z.boolean().optional(),
|
|
1312
|
-
media: mediaSchema.optional(),
|
|
1313
1258
|
tags: z.array(z.string()).optional(),
|
|
1314
|
-
additionalText: z.string().optional(),
|
|
1315
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1316
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1317
1259
|
}),
|
|
1318
1260
|
);
|
|
1319
1261
|
|
|
1320
|
-
export const
|
|
1262
|
+
export const upsellLayoutCallToActionSchema: z.ZodSchema<UpsellLayoutCallToAction> = z.lazy(() =>
|
|
1321
1263
|
z.object({
|
|
1322
|
-
|
|
1264
|
+
title: z.string(),
|
|
1265
|
+
accessibilityDescription: z.string().optional(),
|
|
1266
|
+
behavior: behaviorSchema,
|
|
1267
|
+
context: contextSchema.optional(),
|
|
1268
|
+
}),
|
|
1269
|
+
);
|
|
1270
|
+
|
|
1271
|
+
export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
|
|
1272
|
+
z.object({
|
|
1273
|
+
title: z.string(),
|
|
1274
|
+
accessibilityDescription: z.string().optional(),
|
|
1275
|
+
behavior: behaviorSchema,
|
|
1276
|
+
context: contextSchema.optional(),
|
|
1277
|
+
}),
|
|
1278
|
+
);
|
|
1279
|
+
|
|
1280
|
+
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
1281
|
+
z.object({
|
|
1282
|
+
type: z.literal('columns'),
|
|
1283
|
+
left: z.array(layoutSchema),
|
|
1284
|
+
right: z.array(layoutSchema),
|
|
1285
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
1323
1286
|
control: z.string().optional(),
|
|
1324
|
-
|
|
1325
|
-
$id: z.string().optional(),
|
|
1326
|
-
const: jsonElementSchema,
|
|
1327
|
-
title: z.string().optional(),
|
|
1328
|
-
description: z.string().optional(),
|
|
1329
|
-
icon: iconSchema.optional(),
|
|
1330
|
-
image: imageSchema.optional(),
|
|
1331
|
-
keywords: z.array(z.string()).optional(),
|
|
1332
|
-
summary: summaryProviderSchema.optional(),
|
|
1287
|
+
margin: sizeSchema.optional(),
|
|
1333
1288
|
analyticsId: z.string().optional(),
|
|
1334
|
-
disabled: z.boolean().optional(),
|
|
1335
|
-
media: mediaSchema.optional(),
|
|
1336
|
-
alert: alertLayoutSchema.optional(),
|
|
1337
|
-
layout: z.array(layoutSchema).optional(),
|
|
1338
1289
|
tags: z.array(z.string()).optional(),
|
|
1339
|
-
additionalText: z.string().optional(),
|
|
1340
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1341
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1342
1290
|
}),
|
|
1343
1291
|
);
|
|
1344
1292
|
|
|
1345
|
-
export const
|
|
1293
|
+
export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
|
|
1294
|
+
z.object({
|
|
1295
|
+
title: z.string(),
|
|
1296
|
+
components: z.array(layoutSchema),
|
|
1297
|
+
tag: z.string().optional(),
|
|
1298
|
+
analyticsId: z.string().optional(),
|
|
1299
|
+
tags: z.array(z.string()).optional(),
|
|
1300
|
+
}),
|
|
1301
|
+
);
|
|
1302
|
+
|
|
1303
|
+
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
1346
1304
|
z.object({
|
|
1347
|
-
autofillProvider: z.string().optional(),
|
|
1348
|
-
promoted: z.boolean().optional(),
|
|
1349
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1350
|
-
refreshUrl: z.string().optional(),
|
|
1351
|
-
refreshFormUrl: z.string().optional(),
|
|
1352
|
-
promotion: jsonElementSchema.optional(),
|
|
1353
|
-
oneOf: z.array(schemaSchema),
|
|
1354
|
-
placeholder: z.string().optional(),
|
|
1355
|
-
$id: z.string().optional(),
|
|
1356
1305
|
title: z.string().optional(),
|
|
1357
|
-
|
|
1306
|
+
components: z.array(layoutSchema),
|
|
1307
|
+
}),
|
|
1308
|
+
);
|
|
1309
|
+
|
|
1310
|
+
export const statusListLayoutSchema: z.ZodSchema<StatusListLayout> = z.lazy(() =>
|
|
1311
|
+
z.object({
|
|
1312
|
+
type: z.literal('status-list'),
|
|
1313
|
+
items: z.array(statusListLayoutItemSchema),
|
|
1314
|
+
title: z.string().optional(),
|
|
1358
1315
|
control: z.string().optional(),
|
|
1359
|
-
|
|
1360
|
-
hidden: z.boolean().optional(),
|
|
1361
|
-
icon: iconSchema.optional(),
|
|
1362
|
-
image: imageSchema.optional(),
|
|
1363
|
-
keywords: z.array(z.string()).optional(),
|
|
1364
|
-
summary: summaryProviderSchema.optional(),
|
|
1316
|
+
margin: sizeSchema.optional(),
|
|
1365
1317
|
analyticsId: z.string().optional(),
|
|
1366
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1367
|
-
alert: alertLayoutSchema.optional(),
|
|
1368
|
-
help: helpSchema.optional(),
|
|
1369
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1370
|
-
autofillKey: z.string().optional(),
|
|
1371
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1372
|
-
disabled: z.boolean().optional(),
|
|
1373
|
-
onChange: behaviorSchema.optional(),
|
|
1374
|
-
media: mediaSchema.optional(),
|
|
1375
1318
|
tags: z.array(z.string()).optional(),
|
|
1376
|
-
additionalText: z.string().optional(),
|
|
1377
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1378
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1379
1319
|
}),
|
|
1380
1320
|
);
|
|
1381
1321
|
|
|
1382
|
-
export const
|
|
1322
|
+
export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
|
|
1383
1323
|
z.object({
|
|
1384
|
-
type: z.literal('
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
help: helpSchema.optional(),
|
|
1388
|
-
properties: z.record(schemaSchema),
|
|
1389
|
-
displayOrder: z.array(z.string()),
|
|
1390
|
-
required: z.array(z.string()).optional(),
|
|
1391
|
-
$id: z.string().optional(),
|
|
1324
|
+
type: z.literal('button'),
|
|
1325
|
+
action: actionSchema.optional(),
|
|
1326
|
+
size: sizeSchema.optional(),
|
|
1392
1327
|
title: z.string().optional(),
|
|
1393
|
-
|
|
1328
|
+
behavior: behaviorSchema.optional(),
|
|
1329
|
+
context: contextSchema.optional(),
|
|
1330
|
+
disabled: z.boolean().optional(),
|
|
1331
|
+
pinOrder: z.number().optional(),
|
|
1394
1332
|
control: z.string().optional(),
|
|
1395
|
-
|
|
1396
|
-
icon: iconSchema.optional(),
|
|
1397
|
-
image: imageSchema.optional(),
|
|
1398
|
-
keywords: z.array(z.string()).optional(),
|
|
1399
|
-
summary: summaryProviderSchema.optional(),
|
|
1333
|
+
margin: sizeSchema.optional(),
|
|
1400
1334
|
analyticsId: z.string().optional(),
|
|
1401
|
-
|
|
1335
|
+
tags: z.array(z.string()).optional(),
|
|
1402
1336
|
media: mediaSchema.optional(),
|
|
1337
|
+
}),
|
|
1338
|
+
);
|
|
1339
|
+
|
|
1340
|
+
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
1341
|
+
z.object({
|
|
1342
|
+
type: z.literal('modal'),
|
|
1343
|
+
control: z.string().optional(),
|
|
1344
|
+
margin: sizeSchema.optional(),
|
|
1345
|
+
trigger: modalLayoutTriggerSchema,
|
|
1346
|
+
content: modalLayoutContentSchema,
|
|
1347
|
+
analyticsId: z.string().optional(),
|
|
1403
1348
|
tags: z.array(z.string()).optional(),
|
|
1404
|
-
format: z.string().optional(),
|
|
1405
|
-
additionalText: z.string().optional(),
|
|
1406
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1407
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1408
|
-
onChange: behaviorSchema.optional(),
|
|
1409
1349
|
}),
|
|
1410
1350
|
);
|
|
1411
1351
|
|
|
1412
|
-
export const
|
|
1413
|
-
z.
|
|
1352
|
+
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
1353
|
+
z.object({
|
|
1354
|
+
type: z.literal('box'),
|
|
1355
|
+
components: z.array(layoutSchema),
|
|
1356
|
+
width: sizeSchema.optional(),
|
|
1357
|
+
border: z.boolean().optional(),
|
|
1358
|
+
control: z.string().optional(),
|
|
1359
|
+
margin: sizeSchema.optional(),
|
|
1360
|
+
analyticsId: z.string().optional(),
|
|
1361
|
+
tags: z.array(z.string()).optional(),
|
|
1362
|
+
}),
|
|
1414
1363
|
);
|
|
1415
1364
|
|
|
1416
|
-
export const
|
|
1365
|
+
export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
|
|
1417
1366
|
z.object({
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1367
|
+
title: z.string(),
|
|
1368
|
+
accessibilityDescription: z.string().optional(),
|
|
1369
|
+
behavior: behaviorSchema,
|
|
1370
|
+
context: contextSchema.optional(),
|
|
1371
|
+
}),
|
|
1372
|
+
);
|
|
1373
|
+
|
|
1374
|
+
export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
|
|
1375
|
+
z.object({
|
|
1376
|
+
type: z.literal('review'),
|
|
1377
|
+
orientation: z.string().optional(),
|
|
1378
|
+
action: actionSchema.optional(),
|
|
1379
|
+
fields: z.array(reviewLayoutFieldSchema),
|
|
1427
1380
|
title: z.string().optional(),
|
|
1428
|
-
|
|
1381
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1429
1382
|
control: z.string().optional(),
|
|
1430
|
-
|
|
1383
|
+
margin: sizeSchema.optional(),
|
|
1384
|
+
analyticsId: z.string().optional(),
|
|
1385
|
+
tags: z.array(z.string()).optional(),
|
|
1386
|
+
}),
|
|
1387
|
+
);
|
|
1388
|
+
|
|
1389
|
+
export const reviewLayoutFieldSchema: z.ZodSchema<ReviewLayoutField> = z.lazy(() =>
|
|
1390
|
+
z.object({
|
|
1391
|
+
label: z.string(),
|
|
1392
|
+
value: z.string(),
|
|
1393
|
+
rawValue: z.string().optional(),
|
|
1394
|
+
help: helpSchema.optional(),
|
|
1395
|
+
tag: z.string().optional(),
|
|
1431
1396
|
icon: iconSchema.optional(),
|
|
1432
1397
|
image: imageSchema.optional(),
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1437
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1438
|
-
alert: alertLayoutSchema.optional(),
|
|
1439
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1440
|
-
disabled: z.boolean().optional(),
|
|
1398
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
1399
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1400
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1441
1401
|
media: mediaSchema.optional(),
|
|
1402
|
+
analyticsId: z.string().optional(),
|
|
1442
1403
|
tags: z.array(z.string()).optional(),
|
|
1443
|
-
additionalText: z.string().optional(),
|
|
1444
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1445
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1446
1404
|
}),
|
|
1447
1405
|
);
|
|
1448
1406
|
|
|
1449
|
-
export const
|
|
1407
|
+
export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
|
|
1450
1408
|
z.object({
|
|
1451
|
-
type: z.literal('
|
|
1452
|
-
promoted: z.boolean().optional(),
|
|
1453
|
-
$id: z.string().optional(),
|
|
1454
|
-
items: z.array(schemaSchema),
|
|
1409
|
+
type: z.literal('list'),
|
|
1455
1410
|
title: z.string().optional(),
|
|
1456
|
-
|
|
1411
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1412
|
+
items: z.array(listLayoutItemSchema),
|
|
1457
1413
|
control: z.string().optional(),
|
|
1458
|
-
|
|
1459
|
-
icon: iconSchema.optional(),
|
|
1460
|
-
image: imageSchema.optional(),
|
|
1461
|
-
keywords: z.array(z.string()).optional(),
|
|
1462
|
-
summary: summaryProviderSchema.optional(),
|
|
1414
|
+
margin: sizeSchema.optional(),
|
|
1463
1415
|
analyticsId: z.string().optional(),
|
|
1464
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1465
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1466
|
-
alert: alertLayoutSchema.optional(),
|
|
1467
|
-
media: mediaSchema.optional(),
|
|
1468
1416
|
tags: z.array(z.string()).optional(),
|
|
1469
|
-
additionalText: z.string().optional(),
|
|
1470
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1471
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1472
1417
|
}),
|
|
1473
1418
|
);
|
|
1474
1419
|
|
|
1475
|
-
export const
|
|
1420
|
+
export const searchLayoutSchema: z.ZodSchema<SearchLayout> = z.lazy(() =>
|
|
1476
1421
|
z.object({
|
|
1477
|
-
|
|
1478
|
-
|
|
1422
|
+
type: z.literal('search'),
|
|
1423
|
+
title: z.string(),
|
|
1424
|
+
method: httpMethodSchema,
|
|
1425
|
+
url: z.string(),
|
|
1426
|
+
param: z.string(),
|
|
1427
|
+
emptyMessage: z.string().optional(),
|
|
1428
|
+
control: z.string().optional(),
|
|
1429
|
+
margin: sizeSchema.optional(),
|
|
1430
|
+
analyticsId: z.string().optional(),
|
|
1431
|
+
tags: z.array(z.string()).optional(),
|
|
1432
|
+
hint: z.string().optional(),
|
|
1433
|
+
initialState: searchInitialStateSchema.optional(),
|
|
1479
1434
|
}),
|
|
1480
1435
|
);
|
|
1481
1436
|
|
|
1482
|
-
export const
|
|
1437
|
+
export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
1483
1438
|
z.object({
|
|
1484
|
-
type: z.literal('
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1439
|
+
type: z.literal('section'),
|
|
1440
|
+
components: z.array(layoutSchema),
|
|
1441
|
+
title: z.string(),
|
|
1442
|
+
callToAction: sectionLayoutCallToActionSchema.optional(),
|
|
1443
|
+
control: z.string().optional(),
|
|
1444
|
+
margin: sizeSchema.optional(),
|
|
1445
|
+
analyticsId: z.string().optional(),
|
|
1446
|
+
tags: z.array(z.string()).optional(),
|
|
1490
1447
|
}),
|
|
1491
1448
|
);
|
|
1492
1449
|
|
|
1493
|
-
export const
|
|
1450
|
+
export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
1494
1451
|
z.object({
|
|
1495
|
-
type: z.literal('
|
|
1452
|
+
type: z.literal('tabs'),
|
|
1453
|
+
tabs: z.array(tabsLayoutTabSchema),
|
|
1454
|
+
control: z.string().optional(),
|
|
1455
|
+
margin: sizeSchema.optional(),
|
|
1456
|
+
analyticsId: z.string().optional(),
|
|
1457
|
+
tags: z.array(z.string()).optional(),
|
|
1458
|
+
}),
|
|
1459
|
+
);
|
|
1460
|
+
|
|
1461
|
+
export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
|
|
1462
|
+
z.object({
|
|
1463
|
+
status: listLayoutStatusSchema.optional(),
|
|
1464
|
+
icon: iconSchema.optional(),
|
|
1465
|
+
image: imageSchema.optional(),
|
|
1496
1466
|
title: z.string().optional(),
|
|
1497
|
-
|
|
1467
|
+
subtitle: z.string().optional(),
|
|
1468
|
+
value: z.string().optional(),
|
|
1469
|
+
subvalue: z.string().optional(),
|
|
1470
|
+
tag: z.string().optional(),
|
|
1471
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
1472
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1473
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1474
|
+
description: z.string().optional(),
|
|
1475
|
+
media: mediaSchema.optional(),
|
|
1476
|
+
analyticsId: z.string().optional(),
|
|
1477
|
+
tags: z.array(z.string()).optional(),
|
|
1478
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1498
1479
|
}),
|
|
1499
1480
|
);
|
|
1500
1481
|
|
|
1501
|
-
export const
|
|
1482
|
+
export const sectionLayoutCallToActionSchema: z.ZodSchema<SectionLayoutCallToAction> = z.lazy(() =>
|
|
1502
1483
|
z.object({
|
|
1503
|
-
type: z.literal('toolbar-button'),
|
|
1504
1484
|
title: z.string(),
|
|
1505
|
-
behavior: behaviorSchema,
|
|
1506
1485
|
accessibilityDescription: z.string().optional(),
|
|
1507
|
-
|
|
1508
|
-
control: z.string().optional(),
|
|
1486
|
+
behavior: behaviorSchema,
|
|
1509
1487
|
context: contextSchema.optional(),
|
|
1510
|
-
disabled: z.boolean().optional(),
|
|
1511
|
-
analyticsId: z.string().optional(),
|
|
1512
|
-
tags: z.array(z.string()).optional(),
|
|
1513
1488
|
}),
|
|
1514
1489
|
);
|
|
1515
1490
|
|
|
1516
|
-
export const
|
|
1491
|
+
export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
1492
|
+
z.object({
|
|
1493
|
+
key: z.string().optional(),
|
|
1494
|
+
type: z.string().optional(),
|
|
1495
|
+
actions: z.array(actionSchema).optional(),
|
|
1496
|
+
refreshFormUrl: z.string().optional(),
|
|
1497
|
+
id: z.string(),
|
|
1498
|
+
title: z.string(),
|
|
1499
|
+
schemas: z.array(schemaSchema),
|
|
1500
|
+
layout: z.array(layoutSchema),
|
|
1501
|
+
description: z.string().optional(),
|
|
1502
|
+
model: jsonElementSchema.optional(),
|
|
1503
|
+
external: externalSchema.optional(),
|
|
1504
|
+
polling: pollingSchema.optional(),
|
|
1505
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
1506
|
+
analytics: z.record(z.string()).optional(),
|
|
1507
|
+
errors: stepErrorSchema.optional(),
|
|
1508
|
+
navigation: navigationSchema.optional(),
|
|
1509
|
+
refreshUrl: z.string().optional(),
|
|
1510
|
+
control: z.string().optional(),
|
|
1511
|
+
refreshAfter: z.string().optional(),
|
|
1512
|
+
toolbar: toolbarSchema.optional(),
|
|
1513
|
+
tags: z.array(z.string()).optional(),
|
|
1514
|
+
footer: z.array(layoutSchema).optional(),
|
|
1515
|
+
}),
|
|
1516
|
+
);
|