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