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