@wise/dynamic-flow-types 4.9.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/renderers/ExternalConfirmationRendererProps.d.ts +2 -3
- package/build/renderers/ExternalConfirmationRendererProps.d.ts.map +1 -1
- package/build/spec/main.js +1 -0
- package/build/spec/main.mjs +1 -0
- package/build/spec/responses/NoOpResponseBody.d.ts +5 -0
- package/build/spec/responses/NoOpResponseBody.d.ts.map +1 -0
- package/build/zod/schemas.d.ts +1 -0
- package/build/zod/schemas.d.ts.map +1 -1
- package/build/zod/schemas.ts +865 -863
- package/package.json +3 -3
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,173 +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
|
|
539
|
+
export const summarySummariserSchema = z.object({
|
|
540
|
+
defaultTitle: z.string().optional(),
|
|
541
|
+
defaultDescription: z.string().optional(),
|
|
542
|
+
defaultIcon: iconSchema.optional(),
|
|
543
|
+
defaultImage: imageSchema.optional(),
|
|
422
544
|
providesTitle: z.boolean().optional(),
|
|
423
545
|
providesDescription: z.boolean().optional(),
|
|
424
546
|
providesIcon: z.boolean().optional(),
|
|
425
547
|
providesImage: z.boolean().optional(),
|
|
548
|
+
defaultMedia: mediaSchema.optional(),
|
|
426
549
|
providesMedia: z.boolean().optional(),
|
|
427
550
|
});
|
|
428
551
|
|
|
429
|
-
export const
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
552
|
+
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
553
|
+
|
|
554
|
+
export const suggestionsSchema = z.object({
|
|
555
|
+
values: z.array(suggestionsValueSchema),
|
|
433
556
|
});
|
|
434
557
|
|
|
435
|
-
export const
|
|
436
|
-
z.literal('
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
z.literal('phone-number'),
|
|
441
|
-
z.literal('base64url'),
|
|
442
|
-
]);
|
|
443
|
-
|
|
444
|
-
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
445
|
-
|
|
446
|
-
export const summarySummariserSchema = z.object({
|
|
447
|
-
defaultTitle: z.string().optional(),
|
|
448
|
-
defaultDescription: z.string().optional(),
|
|
449
|
-
defaultIcon: iconSchema.optional(),
|
|
450
|
-
defaultImage: imageSchema.optional(),
|
|
451
|
-
providesTitle: z.boolean().optional(),
|
|
452
|
-
providesDescription: z.boolean().optional(),
|
|
453
|
-
providesIcon: z.boolean().optional(),
|
|
454
|
-
providesImage: z.boolean().optional(),
|
|
455
|
-
defaultMedia: mediaSchema.optional(),
|
|
456
|
-
providesMedia: z.boolean().optional(),
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
export const pushPresentationSchema = z.object({
|
|
460
|
-
type: z.literal('push'),
|
|
461
|
-
});
|
|
462
|
-
|
|
463
|
-
export const modalPresentationSchema = z.object({
|
|
464
|
-
type: z.literal('modal'),
|
|
465
|
-
});
|
|
466
|
-
|
|
467
|
-
export const presentationSchema = z.union([modalPresentationSchema, pushPresentationSchema]);
|
|
468
|
-
|
|
469
|
-
export const dismissBehaviorSchema = z.object({
|
|
470
|
-
type: z.literal('dismiss'),
|
|
471
|
-
});
|
|
472
|
-
|
|
473
|
-
export const suggestionsValueSchema = z.object({
|
|
474
|
-
label: z.string(),
|
|
475
|
-
value: jsonElementSchema,
|
|
476
|
-
icon: iconSchema.optional(),
|
|
477
|
-
image: imageSchema.optional(),
|
|
478
|
-
tag: z.string().optional(),
|
|
479
|
-
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(),
|
|
480
563
|
analyticsId: z.string().optional(),
|
|
564
|
+
control: z.string().optional(),
|
|
565
|
+
margin: sizeSchema.optional(),
|
|
481
566
|
tags: z.array(z.string()).optional(),
|
|
482
567
|
});
|
|
483
568
|
|
|
484
|
-
export const actionTypeSchema = z.union([
|
|
485
|
-
z.literal('primary'),
|
|
486
|
-
z.literal('secondary'),
|
|
487
|
-
z.literal('link'),
|
|
488
|
-
z.literal('positive'),
|
|
489
|
-
z.literal('negative'),
|
|
490
|
-
]);
|
|
491
|
-
|
|
492
|
-
export const navigationStackBehaviorSchema = z.union([
|
|
493
|
-
z.literal('default'),
|
|
494
|
-
z.literal('remove-previous'),
|
|
495
|
-
z.literal('remove-all'),
|
|
496
|
-
z.literal('replace-current'),
|
|
497
|
-
]);
|
|
498
|
-
|
|
499
|
-
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
500
|
-
|
|
501
|
-
export const linkSchema = z.object({
|
|
502
|
-
url: z.string(),
|
|
503
|
-
});
|
|
504
|
-
|
|
505
|
-
export const actionSchema = z.object({
|
|
506
|
-
title: z.string().optional(),
|
|
507
|
-
type: actionTypeSchema.optional(),
|
|
508
|
-
disabled: z.boolean().optional(),
|
|
509
|
-
$id: z.string().optional(),
|
|
510
|
-
$ref: z.string().optional(),
|
|
511
|
-
id: z.string().optional(),
|
|
512
|
-
url: z.string().optional(),
|
|
513
|
-
method: httpMethodSchema.optional(),
|
|
514
|
-
exit: z.boolean().optional(),
|
|
515
|
-
result: jsonElementSchema.optional(),
|
|
516
|
-
data: jsonElementSchema.optional(),
|
|
517
|
-
timeout: z.number().optional(),
|
|
518
|
-
skipValidation: z.boolean().optional(),
|
|
519
|
-
prefetch: z.boolean().optional(),
|
|
520
|
-
});
|
|
521
|
-
|
|
522
|
-
export const actionBehaviorSchema = z.object({
|
|
523
|
-
type: z.literal('action'),
|
|
524
|
-
action: actionSchema,
|
|
525
|
-
});
|
|
526
|
-
|
|
527
|
-
export const copyBehaviorSchema = z.object({
|
|
528
|
-
type: z.literal('copy'),
|
|
529
|
-
content: z.string(),
|
|
530
|
-
});
|
|
531
|
-
|
|
532
|
-
export const linkBehaviorSchema = z.object({
|
|
533
|
-
type: z.literal('link'),
|
|
534
|
-
url: z.string(),
|
|
535
|
-
});
|
|
536
|
-
|
|
537
|
-
export const refreshBehaviorSchema = z.object({
|
|
538
|
-
type: z.literal('refresh'),
|
|
539
|
-
});
|
|
540
|
-
|
|
541
|
-
export const containerBehaviorSchema = z.object({
|
|
542
|
-
action: actionSchema.optional(),
|
|
543
|
-
link: linkSchema.optional(),
|
|
544
|
-
});
|
|
545
|
-
|
|
546
|
-
export const navigationBackBehaviorSchema = z.object({
|
|
547
|
-
title: z.string().optional(),
|
|
548
|
-
action: actionSchema,
|
|
549
|
-
});
|
|
550
|
-
|
|
551
569
|
export const navigationSchema = z.object({
|
|
552
570
|
backButton: navigationBackBehaviorSchema.optional(),
|
|
553
571
|
back: navigationBackBehaviorSchema.optional(),
|
|
554
572
|
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
555
573
|
});
|
|
556
574
|
|
|
557
|
-
export const formLayoutSchema = z.object({
|
|
558
|
-
type: z.literal('form'),
|
|
559
|
-
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
560
|
-
schemaId: z.string(),
|
|
561
|
-
control: z.string().optional(),
|
|
562
|
-
margin: sizeSchema.optional(),
|
|
563
|
-
analyticsId: z.string().optional(),
|
|
564
|
-
tags: z.array(z.string()).optional(),
|
|
565
|
-
});
|
|
566
|
-
|
|
567
|
-
export const actionResponseBodySchema = z.object({
|
|
568
|
-
action: actionSchema,
|
|
569
|
-
});
|
|
570
|
-
|
|
571
575
|
export const searchResultActionSchema = z.object({
|
|
572
576
|
type: z.literal('action'),
|
|
573
577
|
title: z.string(),
|
|
@@ -578,10 +582,20 @@ export const searchResultActionSchema = z.object({
|
|
|
578
582
|
media: mediaSchema.optional(),
|
|
579
583
|
});
|
|
580
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
|
+
|
|
581
595
|
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
582
596
|
|
|
583
|
-
export const
|
|
584
|
-
type: z.literal('results'),
|
|
597
|
+
export const searchResponseBodySchema = z.object({
|
|
598
|
+
type: z.literal('results').optional(),
|
|
585
599
|
results: z.array(searchResultSchema),
|
|
586
600
|
});
|
|
587
601
|
|
|
@@ -590,63 +604,20 @@ export const searchResultsResponseBodySchema = z.object({
|
|
|
590
604
|
results: z.array(searchResultSchema),
|
|
591
605
|
});
|
|
592
606
|
|
|
593
|
-
export const
|
|
594
|
-
|
|
595
|
-
});
|
|
596
|
-
|
|
597
|
-
export const dynamicLaunchConfigSchema = z.object({
|
|
598
|
-
type: z.literal('dynamic'),
|
|
599
|
-
request: requestSchema,
|
|
600
|
-
presentation: presentationSchema,
|
|
601
|
-
});
|
|
602
|
-
|
|
603
|
-
export const launchConfigSchema = dynamicLaunchConfigSchema;
|
|
604
|
-
|
|
605
|
-
export const searchResponseBodySchema = z.object({
|
|
606
|
-
type: z.literal('results').optional(),
|
|
607
|
+
export const searchInitialResultsConfigSchema = z.object({
|
|
608
|
+
type: z.literal('results'),
|
|
607
609
|
results: z.array(searchResultSchema),
|
|
608
610
|
});
|
|
609
611
|
|
|
610
|
-
export const
|
|
611
|
-
z.
|
|
612
|
-
key: z.string().optional(),
|
|
613
|
-
type: z.string().optional(),
|
|
614
|
-
actions: z.array(actionSchema).optional(),
|
|
615
|
-
refreshFormUrl: z.string().optional(),
|
|
616
|
-
id: z.string(),
|
|
617
|
-
title: z.string(),
|
|
618
|
-
schemas: z.array(schemaSchema),
|
|
619
|
-
layout: z.array(layoutSchema),
|
|
620
|
-
description: z.string().optional(),
|
|
621
|
-
model: jsonElementSchema.optional(),
|
|
622
|
-
external: externalSchema.optional(),
|
|
623
|
-
polling: pollingSchema.optional(),
|
|
624
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
625
|
-
analytics: z.record(z.string()).optional(),
|
|
626
|
-
errors: stepErrorSchema.optional(),
|
|
627
|
-
navigation: navigationSchema.optional(),
|
|
628
|
-
refreshUrl: z.string().optional(),
|
|
629
|
-
control: z.string().optional(),
|
|
630
|
-
refreshAfter: z.string().optional(),
|
|
631
|
-
toolbar: toolbarSchema.optional(),
|
|
632
|
-
tags: z.array(z.string()).optional(),
|
|
633
|
-
footer: z.array(layoutSchema).optional(),
|
|
634
|
-
}),
|
|
612
|
+
export const searchInitialStateSchema: z.ZodSchema<SearchInitialState> = z.lazy(() =>
|
|
613
|
+
z.union([searchInitialLayoutConfigSchema, searchInitialResultsConfigSchema]),
|
|
635
614
|
);
|
|
636
615
|
|
|
637
|
-
export const
|
|
638
|
-
z.
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
booleanSchemaSchema,
|
|
643
|
-
constSchemaSchema,
|
|
644
|
-
integerSchemaSchema,
|
|
645
|
-
numberSchemaSchema,
|
|
646
|
-
objectSchemaSchema,
|
|
647
|
-
oneOfSchemaSchema,
|
|
648
|
-
stringSchemaSchema,
|
|
649
|
-
]),
|
|
616
|
+
export const searchInitialLayoutConfigSchema: z.ZodSchema<SearchInitialLayoutConfig> = z.lazy(() =>
|
|
617
|
+
z.object({
|
|
618
|
+
type: z.literal('layout'),
|
|
619
|
+
content: z.array(layoutSchema),
|
|
620
|
+
}),
|
|
650
621
|
);
|
|
651
622
|
|
|
652
623
|
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
@@ -678,37 +649,24 @@ export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
|
678
649
|
]),
|
|
679
650
|
);
|
|
680
651
|
|
|
681
|
-
export const
|
|
682
|
-
z.
|
|
683
|
-
interval: z.number().optional(),
|
|
684
|
-
url: z.string(),
|
|
685
|
-
delay: z.number().optional(),
|
|
686
|
-
timeout: z.number().optional(),
|
|
687
|
-
maxAttempts: z.number(),
|
|
688
|
-
onError: pollingOnErrorSchema,
|
|
689
|
-
}),
|
|
690
|
-
);
|
|
691
|
-
|
|
692
|
-
export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
|
|
693
|
-
z.object({
|
|
694
|
-
regexPattern: z.string(),
|
|
695
|
-
behavior: behaviorSchema.optional(),
|
|
696
|
-
}),
|
|
652
|
+
export const searchResponseSchema: z.ZodSchema<SearchResponse> = z.lazy(() =>
|
|
653
|
+
z.union([searchLayoutResponseBodySchema, searchResultsResponseBodySchema]),
|
|
697
654
|
);
|
|
698
655
|
|
|
699
|
-
export const
|
|
656
|
+
export const searchLayoutResponseBodySchema: z.ZodSchema<SearchLayoutResponseBody> = z.lazy(() =>
|
|
700
657
|
z.object({
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
tags: z.array(z.string()).optional(),
|
|
658
|
+
type: z.literal('layout'),
|
|
659
|
+
content: z.array(layoutSchema),
|
|
704
660
|
}),
|
|
705
661
|
);
|
|
706
662
|
|
|
707
|
-
export const
|
|
663
|
+
export const subflowResponseBodySchema: z.ZodSchema<SubflowResponseBody> = z.lazy(() =>
|
|
708
664
|
z.object({
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
665
|
+
referrerId: z.string(),
|
|
666
|
+
launchConfig: launchConfigSchema,
|
|
667
|
+
resultKey: z.string().optional(),
|
|
668
|
+
onCompletion: behaviorSchema.optional(),
|
|
669
|
+
onError: behaviorSchema.optional(),
|
|
712
670
|
}),
|
|
713
671
|
);
|
|
714
672
|
|
|
@@ -725,381 +683,348 @@ export const behaviorSchema: z.ZodSchema<Behavior> = z.lazy(() =>
|
|
|
725
683
|
]),
|
|
726
684
|
);
|
|
727
685
|
|
|
728
|
-
export const
|
|
686
|
+
export const modalResponseBodySchema: z.ZodSchema<ModalResponseBody> = z.lazy(() =>
|
|
729
687
|
z.object({
|
|
730
|
-
title: z.string(),
|
|
731
|
-
|
|
732
|
-
behavior: behaviorSchema,
|
|
733
|
-
context: contextSchema.optional(),
|
|
688
|
+
title: z.string().optional(),
|
|
689
|
+
content: z.array(layoutSchema),
|
|
734
690
|
}),
|
|
735
691
|
);
|
|
736
692
|
|
|
737
|
-
export const
|
|
693
|
+
export const additionalInfoSchema: z.ZodSchema<AdditionalInfo> = z.lazy(() =>
|
|
738
694
|
z.object({
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
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'),
|
|
742
704
|
title: z.string().optional(),
|
|
743
|
-
|
|
744
|
-
value: z.string().optional(),
|
|
745
|
-
subvalue: z.string().optional(),
|
|
746
|
-
tag: z.string().optional(),
|
|
747
|
-
additionalInfo: additionalInfoSchema.optional(),
|
|
748
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
749
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
750
|
-
description: z.string().optional(),
|
|
751
|
-
media: mediaSchema.optional(),
|
|
752
|
-
analyticsId: z.string().optional(),
|
|
753
|
-
tags: z.array(z.string()).optional(),
|
|
754
|
-
callToAction: listLayoutCallToActionSchema.optional(),
|
|
705
|
+
content: z.array(layoutSchema),
|
|
755
706
|
}),
|
|
756
707
|
);
|
|
757
708
|
|
|
758
|
-
export const
|
|
709
|
+
export const subflowBehaviorSchema: z.ZodSchema<SubflowBehavior> = z.lazy(() =>
|
|
759
710
|
z.object({
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
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(),
|
|
764
717
|
}),
|
|
765
718
|
);
|
|
766
719
|
|
|
767
|
-
export const
|
|
720
|
+
export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
|
|
768
721
|
z.object({
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
right: z.array(layoutSchema),
|
|
772
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
773
|
-
control: z.string().optional(),
|
|
774
|
-
margin: sizeSchema.optional(),
|
|
775
|
-
analyticsId: z.string().optional(),
|
|
776
|
-
tags: z.array(z.string()).optional(),
|
|
722
|
+
regexPattern: z.string(),
|
|
723
|
+
behavior: behaviorSchema.optional(),
|
|
777
724
|
}),
|
|
778
725
|
);
|
|
779
726
|
|
|
780
|
-
export const
|
|
727
|
+
export const pollingSchema: z.ZodSchema<Polling> = z.lazy(() =>
|
|
781
728
|
z.object({
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
analyticsId: z.string().optional(),
|
|
789
|
-
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,
|
|
790
735
|
}),
|
|
791
736
|
);
|
|
792
737
|
|
|
793
|
-
export const
|
|
738
|
+
export const pollingOnErrorSchema: z.ZodSchema<PollingOnError> = z.lazy(() =>
|
|
794
739
|
z.object({
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
behavior: behaviorSchema,
|
|
798
|
-
context: contextSchema.optional(),
|
|
740
|
+
action: actionSchema.optional(),
|
|
741
|
+
behavior: behaviorSchema.optional(),
|
|
799
742
|
}),
|
|
800
743
|
);
|
|
801
744
|
|
|
802
|
-
export const
|
|
745
|
+
export const toolbarSchema: z.ZodSchema<Toolbar> = z.lazy(() =>
|
|
803
746
|
z.object({
|
|
804
|
-
|
|
805
|
-
items: z.array(statusListLayoutItemSchema),
|
|
806
|
-
title: z.string().optional(),
|
|
747
|
+
items: z.array(toolbarItemSchema),
|
|
807
748
|
control: z.string().optional(),
|
|
808
|
-
margin: sizeSchema.optional(),
|
|
809
|
-
analyticsId: z.string().optional(),
|
|
810
749
|
tags: z.array(z.string()).optional(),
|
|
811
750
|
}),
|
|
812
751
|
);
|
|
813
752
|
|
|
814
|
-
export const
|
|
753
|
+
export const toolbarItemSchema: z.ZodSchema<ToolbarItem> = z.lazy(() => toolbarButtonSchema);
|
|
754
|
+
|
|
755
|
+
export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
|
|
815
756
|
z.object({
|
|
816
|
-
type: z.literal('
|
|
757
|
+
type: z.literal('toolbar-button'),
|
|
817
758
|
title: z.string(),
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
emptyMessage: z.string().optional(),
|
|
759
|
+
behavior: behaviorSchema,
|
|
760
|
+
accessibilityDescription: z.string().optional(),
|
|
761
|
+
media: mediaSchema.optional(),
|
|
822
762
|
control: z.string().optional(),
|
|
823
|
-
|
|
763
|
+
context: contextSchema.optional(),
|
|
764
|
+
disabled: z.boolean().optional(),
|
|
824
765
|
analyticsId: z.string().optional(),
|
|
825
766
|
tags: z.array(z.string()).optional(),
|
|
826
|
-
hint: z.string().optional(),
|
|
827
|
-
initialState: searchInitialStateSchema.optional(),
|
|
828
767
|
}),
|
|
829
768
|
);
|
|
830
769
|
|
|
831
|
-
export const
|
|
832
|
-
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
|
+
}),
|
|
833
778
|
);
|
|
834
779
|
|
|
835
|
-
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(() =>
|
|
836
796
|
z.object({
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
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(),
|
|
840
803
|
control: z.string().optional(),
|
|
841
|
-
|
|
842
|
-
|
|
804
|
+
hidden: z.boolean().optional(),
|
|
805
|
+
icon: iconSchema.optional(),
|
|
806
|
+
image: imageSchema.optional(),
|
|
807
|
+
keywords: z.array(z.string()).optional(),
|
|
808
|
+
summary: summaryProviderSchema.optional(),
|
|
843
809
|
analyticsId: z.string().optional(),
|
|
810
|
+
alert: alertLayoutSchema.optional(),
|
|
811
|
+
media: mediaSchema.optional(),
|
|
844
812
|
tags: z.array(z.string()).optional(),
|
|
813
|
+
additionalText: z.string().optional(),
|
|
814
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
815
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
845
816
|
}),
|
|
846
817
|
);
|
|
847
818
|
|
|
848
|
-
export const
|
|
819
|
+
export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
|
|
849
820
|
z.object({
|
|
850
|
-
type: z.literal('
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
border: z.boolean().optional(),
|
|
821
|
+
type: z.literal('alert'),
|
|
822
|
+
markdown: z.string(),
|
|
823
|
+
context: contextSchema.optional(),
|
|
854
824
|
control: z.string().optional(),
|
|
855
825
|
margin: sizeSchema.optional(),
|
|
826
|
+
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
856
827
|
analyticsId: z.string().optional(),
|
|
857
828
|
tags: z.array(z.string()).optional(),
|
|
858
829
|
}),
|
|
859
830
|
);
|
|
860
831
|
|
|
861
|
-
export const
|
|
832
|
+
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
862
833
|
z.object({
|
|
863
|
-
type: z.literal('
|
|
864
|
-
|
|
865
|
-
|
|
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(),
|
|
866
843
|
title: z.string().optional(),
|
|
867
|
-
|
|
868
|
-
context: contextSchema.optional(),
|
|
869
|
-
disabled: z.boolean().optional(),
|
|
870
|
-
pinOrder: z.number().optional(),
|
|
844
|
+
description: z.string().optional(),
|
|
871
845
|
control: z.string().optional(),
|
|
872
|
-
|
|
846
|
+
hidden: z.boolean().optional(),
|
|
847
|
+
icon: iconSchema.optional(),
|
|
848
|
+
image: imageSchema.optional(),
|
|
849
|
+
keywords: z.array(z.string()).optional(),
|
|
850
|
+
summary: summarySummariserSchema.optional(),
|
|
873
851
|
analyticsId: z.string().optional(),
|
|
874
|
-
|
|
852
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
853
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
854
|
+
alert: alertLayoutSchema.optional(),
|
|
855
|
+
validationMessages: z.record(z.string()).optional(),
|
|
856
|
+
disabled: z.boolean().optional(),
|
|
875
857
|
media: mediaSchema.optional(),
|
|
858
|
+
tags: z.array(z.string()).optional(),
|
|
859
|
+
additionalText: z.string().optional(),
|
|
860
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
861
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
876
862
|
}),
|
|
877
863
|
);
|
|
878
864
|
|
|
879
|
-
export const
|
|
865
|
+
export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
|
|
880
866
|
z.object({
|
|
881
|
-
|
|
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(),
|
|
882
876
|
title: z.string().optional(),
|
|
883
|
-
|
|
877
|
+
description: z.string().optional(),
|
|
884
878
|
control: z.string().optional(),
|
|
885
|
-
|
|
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(),
|
|
886
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(),
|
|
887
895
|
tags: z.array(z.string()).optional(),
|
|
896
|
+
additionalText: z.string().optional(),
|
|
897
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
898
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
888
899
|
}),
|
|
889
900
|
);
|
|
890
901
|
|
|
891
|
-
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(() =>
|
|
892
907
|
z.object({
|
|
893
|
-
type: z.literal('
|
|
908
|
+
type: z.literal('blob'),
|
|
909
|
+
promoted: z.boolean().optional(),
|
|
910
|
+
$id: z.string().optional(),
|
|
894
911
|
title: z.string().optional(),
|
|
895
|
-
|
|
896
|
-
items: z.array(listLayoutItemSchema),
|
|
912
|
+
description: z.string().optional(),
|
|
897
913
|
control: z.string().optional(),
|
|
898
|
-
|
|
914
|
+
hidden: z.boolean().optional(),
|
|
915
|
+
icon: iconSchema.optional(),
|
|
916
|
+
image: imageSchema.optional(),
|
|
917
|
+
keywords: z.array(z.string()).optional(),
|
|
918
|
+
summary: summaryProviderSchema.optional(),
|
|
899
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(),
|
|
900
929
|
tags: z.array(z.string()).optional(),
|
|
930
|
+
additionalText: z.string().optional(),
|
|
931
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
932
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
901
933
|
}),
|
|
902
934
|
);
|
|
903
935
|
|
|
904
|
-
export const
|
|
905
|
-
z.object({
|
|
906
|
-
type: z.literal('modal'),
|
|
907
|
-
control: z.string().optional(),
|
|
908
|
-
margin: sizeSchema.optional(),
|
|
909
|
-
trigger: modalLayoutTriggerSchema,
|
|
910
|
-
content: modalLayoutContentSchema,
|
|
911
|
-
analyticsId: z.string().optional(),
|
|
912
|
-
tags: z.array(z.string()).optional(),
|
|
913
|
-
}),
|
|
914
|
-
);
|
|
915
|
-
|
|
916
|
-
export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
|
|
917
|
-
z.object({
|
|
918
|
-
type: z.literal('review'),
|
|
919
|
-
orientation: z.string().optional(),
|
|
920
|
-
action: actionSchema.optional(),
|
|
921
|
-
fields: z.array(reviewLayoutFieldSchema),
|
|
922
|
-
title: z.string().optional(),
|
|
923
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
924
|
-
control: z.string().optional(),
|
|
925
|
-
margin: sizeSchema.optional(),
|
|
926
|
-
analyticsId: z.string().optional(),
|
|
927
|
-
tags: z.array(z.string()).optional(),
|
|
928
|
-
}),
|
|
929
|
-
);
|
|
930
|
-
|
|
931
|
-
export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
932
|
-
z.object({
|
|
933
|
-
type: z.literal('section'),
|
|
934
|
-
components: z.array(layoutSchema),
|
|
935
|
-
title: z.string(),
|
|
936
|
-
callToAction: sectionLayoutCallToActionSchema.optional(),
|
|
937
|
-
control: z.string().optional(),
|
|
938
|
-
margin: sizeSchema.optional(),
|
|
939
|
-
analyticsId: z.string().optional(),
|
|
940
|
-
tags: z.array(z.string()).optional(),
|
|
941
|
-
}),
|
|
942
|
-
);
|
|
943
|
-
|
|
944
|
-
export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
945
|
-
z.object({
|
|
946
|
-
type: z.literal('tabs'),
|
|
947
|
-
tabs: z.array(tabsLayoutTabSchema),
|
|
948
|
-
control: z.string().optional(),
|
|
949
|
-
margin: sizeSchema.optional(),
|
|
950
|
-
analyticsId: z.string().optional(),
|
|
951
|
-
tags: z.array(z.string()).optional(),
|
|
952
|
-
}),
|
|
953
|
-
);
|
|
954
|
-
|
|
955
|
-
export const upsellLayoutSchema: z.ZodSchema<UpsellLayout> = z.lazy(() =>
|
|
956
|
-
z.object({
|
|
957
|
-
type: z.literal('upsell'),
|
|
958
|
-
text: z.string(),
|
|
959
|
-
callToAction: upsellLayoutCallToActionSchema,
|
|
960
|
-
media: mediaSchema.optional(),
|
|
961
|
-
onDismiss: requestSchema.optional(),
|
|
962
|
-
control: z.string().optional(),
|
|
963
|
-
margin: sizeSchema.optional(),
|
|
964
|
-
analyticsId: z.string().optional(),
|
|
965
|
-
tags: z.array(z.string()).optional(),
|
|
966
|
-
}),
|
|
967
|
-
);
|
|
968
|
-
|
|
969
|
-
export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
|
|
970
|
-
z.object({
|
|
971
|
-
title: z.string(),
|
|
972
|
-
components: z.array(layoutSchema),
|
|
973
|
-
tag: z.string().optional(),
|
|
974
|
-
analyticsId: z.string().optional(),
|
|
975
|
-
tags: z.array(z.string()).optional(),
|
|
976
|
-
}),
|
|
977
|
-
);
|
|
978
|
-
|
|
979
|
-
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
936
|
+
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
980
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(),
|
|
981
945
|
title: z.string().optional(),
|
|
982
|
-
components: z.array(layoutSchema),
|
|
983
|
-
}),
|
|
984
|
-
);
|
|
985
|
-
|
|
986
|
-
export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
|
|
987
|
-
z.object({
|
|
988
|
-
action: actionSchema.optional(),
|
|
989
|
-
title: z.string(),
|
|
990
946
|
description: z.string().optional(),
|
|
947
|
+
control: z.string().optional(),
|
|
948
|
+
default: z.boolean().optional(),
|
|
949
|
+
hidden: z.boolean().optional(),
|
|
991
950
|
disabled: z.boolean().optional(),
|
|
992
951
|
icon: iconSchema.optional(),
|
|
993
952
|
image: imageSchema.optional(),
|
|
994
|
-
|
|
995
|
-
|
|
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(),
|
|
996
965
|
additionalText: z.string().optional(),
|
|
997
966
|
supportingValues: supportingValuesSchema.optional(),
|
|
998
967
|
inlineAlert: inlineAlertSchema.optional(),
|
|
999
|
-
media: mediaSchema.optional(),
|
|
1000
|
-
analyticsId: z.string().optional(),
|
|
1001
|
-
keywords: z.array(z.string()).optional(),
|
|
1002
|
-
tags: z.array(z.string()).optional(),
|
|
1003
|
-
}),
|
|
1004
|
-
);
|
|
1005
|
-
|
|
1006
|
-
export const upsellLayoutCallToActionSchema: z.ZodSchema<UpsellLayoutCallToAction> = z.lazy(() =>
|
|
1007
|
-
z.object({
|
|
1008
|
-
title: z.string(),
|
|
1009
|
-
accessibilityDescription: z.string().optional(),
|
|
1010
|
-
behavior: behaviorSchema,
|
|
1011
|
-
context: contextSchema.optional(),
|
|
1012
|
-
}),
|
|
1013
|
-
);
|
|
1014
|
-
|
|
1015
|
-
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
1016
|
-
z.object({
|
|
1017
|
-
action: actionSchema.optional(),
|
|
1018
|
-
title: z.string(),
|
|
1019
|
-
accessibilityDescription: z.string().optional(),
|
|
1020
|
-
behavior: behaviorSchema.optional(),
|
|
1021
|
-
context: contextSchema.optional(),
|
|
1022
968
|
}),
|
|
1023
969
|
);
|
|
1024
970
|
|
|
1025
|
-
export const
|
|
971
|
+
export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
|
|
1026
972
|
z.object({
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
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(),
|
|
1032
980
|
icon: iconSchema.optional(),
|
|
1033
981
|
image: imageSchema.optional(),
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1037
|
-
media: mediaSchema.optional(),
|
|
982
|
+
keywords: z.array(z.string()).optional(),
|
|
983
|
+
summary: summaryProviderSchema.optional(),
|
|
1038
984
|
analyticsId: z.string().optional(),
|
|
985
|
+
disabled: z.boolean().optional(),
|
|
986
|
+
media: mediaSchema.optional(),
|
|
987
|
+
alert: alertLayoutSchema.optional(),
|
|
988
|
+
layout: z.array(layoutSchema).optional(),
|
|
1039
989
|
tags: z.array(z.string()).optional(),
|
|
990
|
+
additionalText: z.string().optional(),
|
|
991
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
992
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1040
993
|
}),
|
|
1041
994
|
);
|
|
1042
995
|
|
|
1043
|
-
export const
|
|
1044
|
-
z.object({
|
|
1045
|
-
title: z.string(),
|
|
1046
|
-
accessibilityDescription: z.string().optional(),
|
|
1047
|
-
behavior: behaviorSchema,
|
|
1048
|
-
context: contextSchema.optional(),
|
|
1049
|
-
}),
|
|
1050
|
-
);
|
|
1051
|
-
|
|
1052
|
-
export const subflowResponseBodySchema: z.ZodSchema<SubflowResponseBody> = z.lazy(() =>
|
|
1053
|
-
z.object({
|
|
1054
|
-
referrerId: z.string(),
|
|
1055
|
-
launchConfig: launchConfigSchema,
|
|
1056
|
-
resultKey: z.string().optional(),
|
|
1057
|
-
onCompletion: behaviorSchema.optional(),
|
|
1058
|
-
onError: behaviorSchema.optional(),
|
|
1059
|
-
}),
|
|
1060
|
-
);
|
|
1061
|
-
|
|
1062
|
-
export const searchInitialLayoutConfigSchema: z.ZodSchema<SearchInitialLayoutConfig> = z.lazy(() =>
|
|
1063
|
-
z.object({
|
|
1064
|
-
type: z.literal('layout'),
|
|
1065
|
-
content: z.array(layoutSchema),
|
|
1066
|
-
}),
|
|
1067
|
-
);
|
|
1068
|
-
|
|
1069
|
-
export const searchLayoutResponseBodySchema: z.ZodSchema<SearchLayoutResponseBody> = z.lazy(() =>
|
|
1070
|
-
z.object({
|
|
1071
|
-
type: z.literal('layout'),
|
|
1072
|
-
content: z.array(layoutSchema),
|
|
1073
|
-
}),
|
|
1074
|
-
);
|
|
1075
|
-
|
|
1076
|
-
export const searchResponseSchema: z.ZodSchema<SearchResponse> = z.lazy(() =>
|
|
1077
|
-
z.union([searchLayoutResponseBodySchema, searchResultsResponseBodySchema]),
|
|
1078
|
-
);
|
|
1079
|
-
|
|
1080
|
-
export const modalResponseBodySchema: z.ZodSchema<ModalResponseBody> = z.lazy(() =>
|
|
1081
|
-
z.object({
|
|
1082
|
-
title: z.string().optional(),
|
|
1083
|
-
content: z.array(layoutSchema),
|
|
1084
|
-
}),
|
|
1085
|
-
);
|
|
1086
|
-
|
|
1087
|
-
export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
996
|
+
export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
1088
997
|
z.object({
|
|
1089
|
-
|
|
998
|
+
type: z.literal('integer'),
|
|
999
|
+
autofillProvider: z.string().optional(),
|
|
1090
1000
|
promoted: z.boolean().optional(),
|
|
1091
|
-
|
|
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(),
|
|
1092
1007
|
$id: z.string().optional(),
|
|
1093
1008
|
title: z.string().optional(),
|
|
1094
1009
|
description: z.string().optional(),
|
|
1095
1010
|
control: z.string().optional(),
|
|
1011
|
+
default: z.number().optional(),
|
|
1096
1012
|
hidden: z.boolean().optional(),
|
|
1013
|
+
disabled: z.boolean().optional(),
|
|
1097
1014
|
icon: iconSchema.optional(),
|
|
1098
1015
|
image: imageSchema.optional(),
|
|
1099
1016
|
keywords: z.array(z.string()).optional(),
|
|
1100
1017
|
summary: summaryProviderSchema.optional(),
|
|
1101
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(),
|
|
1102
1023
|
alert: alertLayoutSchema.optional(),
|
|
1024
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1025
|
+
autofillKey: z.string().optional(),
|
|
1026
|
+
help: helpSchema.optional(),
|
|
1027
|
+
onChange: behaviorSchema.optional(),
|
|
1103
1028
|
media: mediaSchema.optional(),
|
|
1104
1029
|
tags: z.array(z.string()).optional(),
|
|
1105
1030
|
additionalText: z.string().optional(),
|
|
@@ -1148,13 +1073,33 @@ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
|
1148
1073
|
}),
|
|
1149
1074
|
);
|
|
1150
1075
|
|
|
1151
|
-
export const
|
|
1076
|
+
export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
1152
1077
|
z.object({
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
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(),
|
|
1158
1103
|
}),
|
|
1159
1104
|
);
|
|
1160
1105
|
|
|
@@ -1210,38 +1155,24 @@ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
|
1210
1155
|
}),
|
|
1211
1156
|
);
|
|
1212
1157
|
|
|
1213
|
-
export const
|
|
1158
|
+
export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
|
|
1214
1159
|
z.object({
|
|
1215
|
-
type: z.literal('
|
|
1216
|
-
autofillProvider: z.string().optional(),
|
|
1160
|
+
type: z.literal('array'),
|
|
1217
1161
|
promoted: z.boolean().optional(),
|
|
1218
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1219
|
-
refreshUrl: z.string().optional(),
|
|
1220
|
-
refreshFormUrl: z.string().optional(),
|
|
1221
|
-
placeholder: z.string().optional(),
|
|
1222
|
-
minimum: z.number().optional(),
|
|
1223
|
-
maximum: z.number().optional(),
|
|
1224
1162
|
$id: z.string().optional(),
|
|
1163
|
+
items: z.array(schemaSchema),
|
|
1225
1164
|
title: z.string().optional(),
|
|
1226
1165
|
description: z.string().optional(),
|
|
1227
1166
|
control: z.string().optional(),
|
|
1228
|
-
default: z.number().optional(),
|
|
1229
1167
|
hidden: z.boolean().optional(),
|
|
1230
|
-
disabled: z.boolean().optional(),
|
|
1231
1168
|
icon: iconSchema.optional(),
|
|
1232
1169
|
image: imageSchema.optional(),
|
|
1233
1170
|
keywords: z.array(z.string()).optional(),
|
|
1234
1171
|
summary: summaryProviderSchema.optional(),
|
|
1235
1172
|
analyticsId: z.string().optional(),
|
|
1236
1173
|
persistAsync: persistAsyncSchema.optional(),
|
|
1237
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1238
1174
|
validationAsync: validateAsyncSchema.optional(),
|
|
1239
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1240
1175
|
alert: alertLayoutSchema.optional(),
|
|
1241
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1242
|
-
autofillKey: z.string().optional(),
|
|
1243
|
-
help: helpSchema.optional(),
|
|
1244
|
-
onChange: behaviorSchema.optional(),
|
|
1245
1176
|
media: mediaSchema.optional(),
|
|
1246
1177
|
tags: z.array(z.string()).optional(),
|
|
1247
1178
|
additionalText: z.string().optional(),
|
|
@@ -1250,265 +1181,336 @@ export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
|
1250
1181
|
}),
|
|
1251
1182
|
);
|
|
1252
1183
|
|
|
1253
|
-
export const
|
|
1184
|
+
export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.lazy(() =>
|
|
1254
1185
|
z.object({
|
|
1255
|
-
|
|
1256
|
-
autofillProvider: z.string().optional(),
|
|
1257
|
-
promoted: z.boolean().optional(),
|
|
1258
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1259
|
-
refreshUrl: z.string().optional(),
|
|
1260
|
-
refreshFormUrl: z.string().optional(),
|
|
1261
|
-
$id: z.string().optional(),
|
|
1262
|
-
title: z.string().optional(),
|
|
1186
|
+
title: z.string(),
|
|
1263
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),
|
|
1264
1211
|
control: z.string().optional(),
|
|
1265
|
-
|
|
1266
|
-
|
|
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(),
|
|
1267
1223
|
disabled: z.boolean().optional(),
|
|
1268
1224
|
icon: iconSchema.optional(),
|
|
1269
1225
|
image: imageSchema.optional(),
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
analyticsId: z.string().optional(),
|
|
1273
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1274
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1275
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1276
|
-
alert: alertLayoutSchema.optional(),
|
|
1277
|
-
autofillKey: z.string().optional(),
|
|
1278
|
-
help: helpSchema.optional(),
|
|
1279
|
-
onChange: behaviorSchema.optional(),
|
|
1280
|
-
media: mediaSchema.optional(),
|
|
1281
|
-
tags: z.array(z.string()).optional(),
|
|
1226
|
+
behavior: behaviorSchema.optional(),
|
|
1227
|
+
tag: z.string().optional(),
|
|
1282
1228
|
additionalText: z.string().optional(),
|
|
1283
1229
|
supportingValues: supportingValuesSchema.optional(),
|
|
1284
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(),
|
|
1285
1235
|
}),
|
|
1286
1236
|
);
|
|
1287
1237
|
|
|
1288
|
-
export const
|
|
1238
|
+
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
1289
1239
|
z.object({
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
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(),
|
|
1295
1255
|
control: z.string().optional(),
|
|
1296
|
-
|
|
1297
|
-
icon: iconSchema.optional(),
|
|
1298
|
-
image: imageSchema.optional(),
|
|
1299
|
-
keywords: z.array(z.string()).optional(),
|
|
1300
|
-
summary: summaryProviderSchema.optional(),
|
|
1256
|
+
margin: sizeSchema.optional(),
|
|
1301
1257
|
analyticsId: z.string().optional(),
|
|
1302
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1303
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1304
|
-
alert: alertLayoutSchema.optional(),
|
|
1305
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
1306
|
-
accepts: z.array(z.string()).optional(),
|
|
1307
|
-
maxSize: z.number().optional(),
|
|
1308
|
-
source: uploadSourceSchema.optional(),
|
|
1309
|
-
disabled: z.boolean().optional(),
|
|
1310
|
-
media: mediaSchema.optional(),
|
|
1311
1258
|
tags: z.array(z.string()).optional(),
|
|
1312
|
-
additionalText: z.string().optional(),
|
|
1313
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1314
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1315
1259
|
}),
|
|
1316
1260
|
);
|
|
1317
1261
|
|
|
1318
|
-
export const
|
|
1262
|
+
export const upsellLayoutCallToActionSchema: z.ZodSchema<UpsellLayoutCallToAction> = z.lazy(() =>
|
|
1319
1263
|
z.object({
|
|
1320
|
-
|
|
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(),
|
|
1321
1286
|
control: z.string().optional(),
|
|
1322
|
-
|
|
1323
|
-
$id: z.string().optional(),
|
|
1324
|
-
const: jsonElementSchema,
|
|
1325
|
-
title: z.string().optional(),
|
|
1326
|
-
description: z.string().optional(),
|
|
1327
|
-
icon: iconSchema.optional(),
|
|
1328
|
-
image: imageSchema.optional(),
|
|
1329
|
-
keywords: z.array(z.string()).optional(),
|
|
1330
|
-
summary: summaryProviderSchema.optional(),
|
|
1287
|
+
margin: sizeSchema.optional(),
|
|
1331
1288
|
analyticsId: z.string().optional(),
|
|
1332
|
-
disabled: z.boolean().optional(),
|
|
1333
|
-
media: mediaSchema.optional(),
|
|
1334
|
-
alert: alertLayoutSchema.optional(),
|
|
1335
|
-
layout: z.array(layoutSchema).optional(),
|
|
1336
1289
|
tags: z.array(z.string()).optional(),
|
|
1337
|
-
additionalText: z.string().optional(),
|
|
1338
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1339
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1340
1290
|
}),
|
|
1341
1291
|
);
|
|
1342
1292
|
|
|
1343
|
-
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(() =>
|
|
1344
1304
|
z.object({
|
|
1345
|
-
autofillProvider: z.string().optional(),
|
|
1346
|
-
promoted: z.boolean().optional(),
|
|
1347
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1348
|
-
refreshUrl: z.string().optional(),
|
|
1349
|
-
refreshFormUrl: z.string().optional(),
|
|
1350
|
-
promotion: jsonElementSchema.optional(),
|
|
1351
|
-
oneOf: z.array(schemaSchema),
|
|
1352
|
-
placeholder: z.string().optional(),
|
|
1353
|
-
$id: z.string().optional(),
|
|
1354
1305
|
title: z.string().optional(),
|
|
1355
|
-
|
|
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(),
|
|
1356
1315
|
control: z.string().optional(),
|
|
1357
|
-
|
|
1358
|
-
hidden: z.boolean().optional(),
|
|
1359
|
-
icon: iconSchema.optional(),
|
|
1360
|
-
image: imageSchema.optional(),
|
|
1361
|
-
keywords: z.array(z.string()).optional(),
|
|
1362
|
-
summary: summaryProviderSchema.optional(),
|
|
1316
|
+
margin: sizeSchema.optional(),
|
|
1363
1317
|
analyticsId: z.string().optional(),
|
|
1364
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1365
|
-
alert: alertLayoutSchema.optional(),
|
|
1366
|
-
help: helpSchema.optional(),
|
|
1367
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1368
|
-
autofillKey: z.string().optional(),
|
|
1369
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1370
|
-
disabled: z.boolean().optional(),
|
|
1371
|
-
onChange: behaviorSchema.optional(),
|
|
1372
|
-
media: mediaSchema.optional(),
|
|
1373
1318
|
tags: z.array(z.string()).optional(),
|
|
1374
|
-
additionalText: z.string().optional(),
|
|
1375
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1376
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1377
1319
|
}),
|
|
1378
1320
|
);
|
|
1379
1321
|
|
|
1380
|
-
export const
|
|
1322
|
+
export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
|
|
1381
1323
|
z.object({
|
|
1382
|
-
type: z.literal('
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
help: helpSchema.optional(),
|
|
1386
|
-
properties: z.record(schemaSchema),
|
|
1387
|
-
displayOrder: z.array(z.string()),
|
|
1388
|
-
required: z.array(z.string()).optional(),
|
|
1389
|
-
$id: z.string().optional(),
|
|
1324
|
+
type: z.literal('button'),
|
|
1325
|
+
action: actionSchema.optional(),
|
|
1326
|
+
size: sizeSchema.optional(),
|
|
1390
1327
|
title: z.string().optional(),
|
|
1391
|
-
|
|
1328
|
+
behavior: behaviorSchema.optional(),
|
|
1329
|
+
context: contextSchema.optional(),
|
|
1330
|
+
disabled: z.boolean().optional(),
|
|
1331
|
+
pinOrder: z.number().optional(),
|
|
1392
1332
|
control: z.string().optional(),
|
|
1393
|
-
|
|
1394
|
-
icon: iconSchema.optional(),
|
|
1395
|
-
image: imageSchema.optional(),
|
|
1396
|
-
keywords: z.array(z.string()).optional(),
|
|
1397
|
-
summary: summaryProviderSchema.optional(),
|
|
1333
|
+
margin: sizeSchema.optional(),
|
|
1398
1334
|
analyticsId: z.string().optional(),
|
|
1399
|
-
|
|
1335
|
+
tags: z.array(z.string()).optional(),
|
|
1400
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(),
|
|
1401
1348
|
tags: z.array(z.string()).optional(),
|
|
1402
|
-
format: z.string().optional(),
|
|
1403
|
-
additionalText: z.string().optional(),
|
|
1404
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1405
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1406
|
-
onChange: behaviorSchema.optional(),
|
|
1407
1349
|
}),
|
|
1408
1350
|
);
|
|
1409
1351
|
|
|
1410
|
-
export const
|
|
1411
|
-
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
|
+
}),
|
|
1412
1363
|
);
|
|
1413
1364
|
|
|
1414
|
-
export const
|
|
1365
|
+
export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
|
|
1415
1366
|
z.object({
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
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),
|
|
1425
1380
|
title: z.string().optional(),
|
|
1426
|
-
|
|
1381
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1427
1382
|
control: z.string().optional(),
|
|
1428
|
-
|
|
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(),
|
|
1429
1396
|
icon: iconSchema.optional(),
|
|
1430
1397
|
image: imageSchema.optional(),
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1435
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1436
|
-
alert: alertLayoutSchema.optional(),
|
|
1437
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1438
|
-
disabled: z.boolean().optional(),
|
|
1398
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
1399
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1400
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1439
1401
|
media: mediaSchema.optional(),
|
|
1402
|
+
analyticsId: z.string().optional(),
|
|
1440
1403
|
tags: z.array(z.string()).optional(),
|
|
1441
|
-
additionalText: z.string().optional(),
|
|
1442
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1443
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1444
1404
|
}),
|
|
1445
1405
|
);
|
|
1446
1406
|
|
|
1447
|
-
export const
|
|
1407
|
+
export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
|
|
1448
1408
|
z.object({
|
|
1449
|
-
type: z.literal('
|
|
1450
|
-
promoted: z.boolean().optional(),
|
|
1451
|
-
$id: z.string().optional(),
|
|
1452
|
-
items: z.array(schemaSchema),
|
|
1409
|
+
type: z.literal('list'),
|
|
1453
1410
|
title: z.string().optional(),
|
|
1454
|
-
|
|
1411
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1412
|
+
items: z.array(listLayoutItemSchema),
|
|
1455
1413
|
control: z.string().optional(),
|
|
1456
|
-
|
|
1457
|
-
icon: iconSchema.optional(),
|
|
1458
|
-
image: imageSchema.optional(),
|
|
1459
|
-
keywords: z.array(z.string()).optional(),
|
|
1460
|
-
summary: summaryProviderSchema.optional(),
|
|
1414
|
+
margin: sizeSchema.optional(),
|
|
1461
1415
|
analyticsId: z.string().optional(),
|
|
1462
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1463
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1464
|
-
alert: alertLayoutSchema.optional(),
|
|
1465
|
-
media: mediaSchema.optional(),
|
|
1466
1416
|
tags: z.array(z.string()).optional(),
|
|
1467
|
-
additionalText: z.string().optional(),
|
|
1468
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1469
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1470
1417
|
}),
|
|
1471
1418
|
);
|
|
1472
1419
|
|
|
1473
|
-
export const
|
|
1420
|
+
export const searchLayoutSchema: z.ZodSchema<SearchLayout> = z.lazy(() =>
|
|
1474
1421
|
z.object({
|
|
1475
|
-
|
|
1476
|
-
|
|
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(),
|
|
1477
1434
|
}),
|
|
1478
1435
|
);
|
|
1479
1436
|
|
|
1480
|
-
export const
|
|
1437
|
+
export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
1481
1438
|
z.object({
|
|
1482
|
-
type: z.literal('
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
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(),
|
|
1488
1447
|
}),
|
|
1489
1448
|
);
|
|
1490
1449
|
|
|
1491
|
-
export const
|
|
1450
|
+
export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
1492
1451
|
z.object({
|
|
1493
|
-
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(),
|
|
1494
1466
|
title: z.string().optional(),
|
|
1495
|
-
|
|
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(),
|
|
1496
1479
|
}),
|
|
1497
1480
|
);
|
|
1498
1481
|
|
|
1499
|
-
export const
|
|
1482
|
+
export const sectionLayoutCallToActionSchema: z.ZodSchema<SectionLayoutCallToAction> = z.lazy(() =>
|
|
1500
1483
|
z.object({
|
|
1501
|
-
type: z.literal('toolbar-button'),
|
|
1502
1484
|
title: z.string(),
|
|
1503
|
-
behavior: behaviorSchema,
|
|
1504
1485
|
accessibilityDescription: z.string().optional(),
|
|
1505
|
-
|
|
1506
|
-
control: z.string().optional(),
|
|
1486
|
+
behavior: behaviorSchema,
|
|
1507
1487
|
context: contextSchema.optional(),
|
|
1508
|
-
disabled: z.boolean().optional(),
|
|
1509
|
-
analyticsId: z.string().optional(),
|
|
1510
|
-
tags: z.array(z.string()).optional(),
|
|
1511
1488
|
}),
|
|
1512
1489
|
);
|
|
1513
1490
|
|
|
1514
|
-
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
|
+
);
|