@wise/dynamic-flow-types 4.22.1 → 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/main.js +70 -0
- package/build/spec/main.mjs +70 -0
- 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 -980
- 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,394 +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
|
-
|
|
942
|
-
|
|
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(),
|
|
943
1045
|
}),
|
|
944
1046
|
);
|
|
945
1047
|
|
|
946
|
-
export const
|
|
1048
|
+
export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
947
1049
|
z.object({
|
|
948
|
-
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(),
|
|
949
1060
|
control: z.string().optional(),
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
1061
|
+
hidden: z.boolean().optional(),
|
|
1062
|
+
icon: iconSchema.optional(),
|
|
1063
|
+
image: imageSchema.optional(),
|
|
1064
|
+
keywords: z.array(z.string()).optional(),
|
|
1065
|
+
summary: summaryProviderSchema.optional(),
|
|
953
1066
|
analyticsId: z.string().optional(),
|
|
1067
|
+
alert: alertLayoutSchema.optional(),
|
|
1068
|
+
media: mediaSchema.optional(),
|
|
954
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(),
|
|
955
1075
|
}),
|
|
956
1076
|
);
|
|
957
1077
|
|
|
958
|
-
export const
|
|
1078
|
+
export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
|
|
959
1079
|
z.object({
|
|
960
|
-
|
|
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(),
|
|
961
1090
|
description: z.string().optional(),
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
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(),
|
|
966
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(),
|
|
967
1108
|
tags: z.array(z.string()).optional(),
|
|
1109
|
+
additionalText: z.string().optional(),
|
|
1110
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1111
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
968
1112
|
}),
|
|
969
1113
|
);
|
|
970
1114
|
|
|
971
|
-
export const
|
|
972
|
-
z.lazy(() =>
|
|
973
|
-
z.object({
|
|
974
|
-
title: z.string(),
|
|
975
|
-
accessibilityDescription: z.string().optional(),
|
|
976
|
-
behavior: behaviorSchema,
|
|
977
|
-
context: contextSchema.optional(),
|
|
978
|
-
}),
|
|
979
|
-
);
|
|
980
|
-
|
|
981
|
-
export const collectionLayoutSectionSchema: z.ZodSchema<CollectionLayoutSection> = z.lazy(() =>
|
|
1115
|
+
export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
982
1116
|
z.object({
|
|
983
|
-
|
|
984
|
-
|
|
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(),
|
|
985
1134
|
title: z.string().optional(),
|
|
986
|
-
|
|
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(),
|
|
987
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(),
|
|
988
1163
|
inlineAlert: inlineAlertSchema.optional(),
|
|
989
1164
|
}),
|
|
990
1165
|
);
|
|
991
1166
|
|
|
992
|
-
export const
|
|
1167
|
+
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
993
1168
|
z.object({
|
|
994
|
-
|
|
995
|
-
|
|
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(),
|
|
996
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(),
|
|
997
1191
|
disabled: z.boolean().optional(),
|
|
998
|
-
primaryBehavior: behaviorSchema.optional(),
|
|
999
|
-
callToAction: collectionLayoutCallToActionSchema.optional(),
|
|
1000
|
-
additionalInfo: additionalInfoSchema.optional(),
|
|
1001
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1002
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1003
1192
|
media: mediaSchema.optional(),
|
|
1004
|
-
analyticsId: z.string().optional(),
|
|
1005
1193
|
tags: z.array(z.string()).optional(),
|
|
1194
|
+
additionalText: z.string().optional(),
|
|
1195
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1196
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1006
1197
|
}),
|
|
1007
1198
|
);
|
|
1008
1199
|
|
|
1009
|
-
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(() =>
|
|
1010
1232
|
z.object({
|
|
1011
|
-
type: z.literal('alert'),
|
|
1012
|
-
markdown: z.string(),
|
|
1013
|
-
context: contextSchema.optional(),
|
|
1014
|
-
control: z.string().optional(),
|
|
1015
|
-
margin: sizeSchema.optional(),
|
|
1016
|
-
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
1017
|
-
analyticsId: z.string().optional(),
|
|
1018
|
-
tags: z.array(z.string()).optional(),
|
|
1019
1233
|
title: z.string().optional(),
|
|
1020
|
-
|
|
1021
|
-
onDismiss: requestSchema.optional(),
|
|
1022
|
-
secondaryCallToAction: alertLayoutCallToActionSchema.optional(),
|
|
1234
|
+
content: z.array(layoutSchema),
|
|
1023
1235
|
}),
|
|
1024
1236
|
);
|
|
1025
1237
|
|
|
1026
|
-
export const
|
|
1238
|
+
export const subflowResponseBodySchema: z.ZodSchema<SubflowResponseBody> = z.lazy(() =>
|
|
1027
1239
|
z.object({
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
margin: sizeSchema.optional(),
|
|
1034
|
-
analyticsId: z.string().optional(),
|
|
1035
|
-
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(),
|
|
1036
1245
|
}),
|
|
1037
1246
|
);
|
|
1038
1247
|
|
|
1039
|
-
export const
|
|
1248
|
+
export const searchLayoutResponseBodySchema: z.ZodSchema<SearchLayoutResponseBody> = z.lazy(() =>
|
|
1040
1249
|
z.object({
|
|
1041
|
-
type: z.literal('
|
|
1042
|
-
|
|
1043
|
-
title: z.string().optional(),
|
|
1044
|
-
control: z.string().optional(),
|
|
1045
|
-
margin: sizeSchema.optional(),
|
|
1046
|
-
analyticsId: z.string().optional(),
|
|
1047
|
-
tags: z.array(z.string()).optional(),
|
|
1250
|
+
type: z.literal('layout'),
|
|
1251
|
+
content: z.array(layoutSchema),
|
|
1048
1252
|
}),
|
|
1049
1253
|
);
|
|
1050
1254
|
|
|
1051
|
-
export const
|
|
1052
|
-
z.
|
|
1053
|
-
type: z.literal('columns'),
|
|
1054
|
-
left: z.array(layoutSchema),
|
|
1055
|
-
right: z.array(layoutSchema),
|
|
1056
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
1057
|
-
control: z.string().optional(),
|
|
1058
|
-
margin: sizeSchema.optional(),
|
|
1059
|
-
analyticsId: z.string().optional(),
|
|
1060
|
-
tags: z.array(z.string()).optional(),
|
|
1061
|
-
}),
|
|
1255
|
+
export const searchInitialStateSchema: z.ZodSchema<SearchInitialState> = z.lazy(() =>
|
|
1256
|
+
z.union([searchInitialLayoutConfigSchema, searchInitialResultsConfigSchema]),
|
|
1062
1257
|
);
|
|
1063
1258
|
|
|
1064
|
-
export const
|
|
1259
|
+
export const searchInitialLayoutConfigSchema: z.ZodSchema<SearchInitialLayoutConfig> = z.lazy(() =>
|
|
1065
1260
|
z.object({
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
description: z.string().optional(),
|
|
1069
|
-
disabled: z.boolean().optional(),
|
|
1070
|
-
icon: iconSchema.optional(),
|
|
1071
|
-
image: imageSchema.optional(),
|
|
1072
|
-
behavior: behaviorSchema.optional(),
|
|
1073
|
-
tag: z.string().optional(),
|
|
1074
|
-
additionalText: z.string().optional(),
|
|
1075
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1076
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1077
|
-
media: mediaSchema.optional(),
|
|
1078
|
-
analyticsId: z.string().optional(),
|
|
1079
|
-
keywords: z.array(z.string()).optional(),
|
|
1080
|
-
tags: z.array(z.string()).optional(),
|
|
1261
|
+
type: z.literal('layout'),
|
|
1262
|
+
content: z.array(layoutSchema),
|
|
1081
1263
|
}),
|
|
1082
1264
|
);
|
|
1083
1265
|
|
|
1084
|
-
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(() =>
|
|
1085
1271
|
z.object({
|
|
1086
|
-
|
|
1272
|
+
title: z.string(),
|
|
1087
1273
|
components: z.array(layoutSchema),
|
|
1088
|
-
|
|
1089
|
-
border: z.boolean().optional(),
|
|
1090
|
-
control: z.string().optional(),
|
|
1091
|
-
margin: sizeSchema.optional(),
|
|
1274
|
+
tag: z.string().optional(),
|
|
1092
1275
|
analyticsId: z.string().optional(),
|
|
1093
1276
|
tags: z.array(z.string()).optional(),
|
|
1094
1277
|
}),
|
|
@@ -1127,22 +1310,21 @@ export const reviewLayoutFieldSchema: z.ZodSchema<ReviewLayoutField> = z.lazy(()
|
|
|
1127
1310
|
}),
|
|
1128
1311
|
);
|
|
1129
1312
|
|
|
1130
|
-
export const
|
|
1313
|
+
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
1131
1314
|
z.object({
|
|
1132
|
-
|
|
1133
|
-
title: z.string()
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
analyticsId: z.string().optional(),
|
|
1138
|
-
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(),
|
|
1139
1320
|
}),
|
|
1140
1321
|
);
|
|
1141
1322
|
|
|
1142
|
-
export const
|
|
1323
|
+
export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
|
|
1143
1324
|
z.object({
|
|
1144
|
-
type: z.literal('
|
|
1145
|
-
|
|
1325
|
+
type: z.literal('decision'),
|
|
1326
|
+
title: z.string().optional(),
|
|
1327
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
1146
1328
|
control: z.string().optional(),
|
|
1147
1329
|
margin: sizeSchema.optional(),
|
|
1148
1330
|
analyticsId: z.string().optional(),
|
|
@@ -1150,493 +1332,346 @@ export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
|
1150
1332
|
}),
|
|
1151
1333
|
);
|
|
1152
1334
|
|
|
1153
|
-
export const
|
|
1335
|
+
export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
|
|
1154
1336
|
z.object({
|
|
1155
|
-
|
|
1156
|
-
type: z.string().optional(),
|
|
1157
|
-
actions: z.array(actionSchema).optional(),
|
|
1158
|
-
refreshFormUrl: z.string().optional(),
|
|
1159
|
-
id: z.string(),
|
|
1337
|
+
action: actionSchema.optional(),
|
|
1160
1338
|
title: z.string(),
|
|
1161
|
-
schemas: z.array(schemaSchema),
|
|
1162
|
-
layout: z.array(layoutSchema),
|
|
1163
1339
|
description: z.string().optional(),
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
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(),
|
|
1175
1351
|
tags: z.array(z.string()).optional(),
|
|
1176
|
-
footer: z.array(layoutSchema).optional(),
|
|
1177
|
-
onLoad: behaviorSchema.optional(),
|
|
1178
1352
|
}),
|
|
1179
1353
|
);
|
|
1180
1354
|
|
|
1181
|
-
export const
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
integerSchemaSchema,
|
|
1189
|
-
numberSchemaSchema,
|
|
1190
|
-
objectSchemaSchema,
|
|
1191
|
-
oneOfSchemaSchema,
|
|
1192
|
-
stringSchemaSchema,
|
|
1193
|
-
]),
|
|
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
|
+
}),
|
|
1194
1362
|
);
|
|
1195
1363
|
|
|
1196
|
-
export const
|
|
1364
|
+
export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
|
|
1197
1365
|
z.object({
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
maxAttempts: z.number(),
|
|
1203
|
-
onError: pollingOnErrorSchema,
|
|
1366
|
+
title: z.string(),
|
|
1367
|
+
accessibilityDescription: z.string().optional(),
|
|
1368
|
+
behavior: behaviorSchema,
|
|
1369
|
+
context: contextSchema.optional(),
|
|
1204
1370
|
}),
|
|
1205
1371
|
);
|
|
1206
1372
|
|
|
1207
|
-
export const
|
|
1373
|
+
export const upsellLayoutCallToActionSchema: z.ZodSchema<UpsellLayoutCallToAction> = z.lazy(() =>
|
|
1208
1374
|
z.object({
|
|
1209
|
-
|
|
1210
|
-
|
|
1375
|
+
title: z.string(),
|
|
1376
|
+
accessibilityDescription: z.string().optional(),
|
|
1377
|
+
behavior: behaviorSchema,
|
|
1378
|
+
context: contextSchema.optional(),
|
|
1211
1379
|
}),
|
|
1212
1380
|
);
|
|
1213
1381
|
|
|
1214
|
-
export const
|
|
1382
|
+
export const searchLayoutSchema: z.ZodSchema<SearchLayout> = z.lazy(() =>
|
|
1215
1383
|
z.object({
|
|
1216
|
-
|
|
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(),
|
|
1217
1390
|
control: z.string().optional(),
|
|
1391
|
+
margin: sizeSchema.optional(),
|
|
1392
|
+
analyticsId: z.string().optional(),
|
|
1218
1393
|
tags: z.array(z.string()).optional(),
|
|
1394
|
+
hint: z.string().optional(),
|
|
1395
|
+
initialState: searchInitialStateSchema.optional(),
|
|
1219
1396
|
}),
|
|
1220
1397
|
);
|
|
1221
1398
|
|
|
1222
|
-
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(() =>
|
|
1223
1410
|
z.object({
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
title: z.string().optional(),
|
|
1229
|
-
description: z.string().optional(),
|
|
1230
|
-
control: z.string().optional(),
|
|
1231
|
-
hidden: z.boolean().optional(),
|
|
1232
|
-
icon: iconSchema.optional(),
|
|
1233
|
-
image: imageSchema.optional(),
|
|
1234
|
-
keywords: z.array(z.string()).optional(),
|
|
1235
|
-
summary: summaryProviderSchema.optional(),
|
|
1236
|
-
analyticsId: z.string().optional(),
|
|
1237
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1238
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1239
|
-
alert: alertLayoutSchema.optional(),
|
|
1240
|
-
media: mediaSchema.optional(),
|
|
1241
|
-
tags: z.array(z.string()).optional(),
|
|
1242
|
-
additionalText: z.string().optional(),
|
|
1243
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1244
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1411
|
+
title: z.string(),
|
|
1412
|
+
accessibilityDescription: z.string().optional(),
|
|
1413
|
+
behavior: behaviorSchema,
|
|
1414
|
+
context: contextSchema.optional(),
|
|
1245
1415
|
}),
|
|
1246
1416
|
);
|
|
1247
1417
|
|
|
1248
|
-
export const
|
|
1418
|
+
export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
|
|
1249
1419
|
z.object({
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
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(),
|
|
1255
1428
|
}),
|
|
1256
1429
|
);
|
|
1257
1430
|
|
|
1258
|
-
export const
|
|
1431
|
+
export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
|
|
1259
1432
|
z.object({
|
|
1260
|
-
|
|
1261
|
-
promoted: z.boolean().optional(),
|
|
1262
|
-
allOf: z.array(schemaSchema),
|
|
1263
|
-
$id: z.string().optional(),
|
|
1264
|
-
title: z.string().optional(),
|
|
1265
|
-
description: z.string().optional(),
|
|
1266
|
-
control: z.string().optional(),
|
|
1267
|
-
hidden: z.boolean().optional(),
|
|
1433
|
+
status: listLayoutStatusSchema.optional(),
|
|
1268
1434
|
icon: iconSchema.optional(),
|
|
1269
1435
|
image: imageSchema.optional(),
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
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(),
|
|
1277
1442
|
supportingValues: supportingValuesSchema.optional(),
|
|
1278
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(),
|
|
1279
1449
|
}),
|
|
1280
1450
|
);
|
|
1281
1451
|
|
|
1282
|
-
export const
|
|
1283
|
-
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
1284
|
-
);
|
|
1285
|
-
|
|
1286
|
-
export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
|
|
1452
|
+
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
1287
1453
|
z.object({
|
|
1288
|
-
type: z.literal('
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
description: z.string().optional(),
|
|
1454
|
+
type: z.literal('columns'),
|
|
1455
|
+
left: z.array(layoutSchema),
|
|
1456
|
+
right: z.array(layoutSchema),
|
|
1457
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
1293
1458
|
control: z.string().optional(),
|
|
1294
|
-
|
|
1295
|
-
icon: iconSchema.optional(),
|
|
1296
|
-
image: imageSchema.optional(),
|
|
1297
|
-
keywords: z.array(z.string()).optional(),
|
|
1298
|
-
summary: summaryProviderSchema.optional(),
|
|
1459
|
+
margin: sizeSchema.optional(),
|
|
1299
1460
|
analyticsId: z.string().optional(),
|
|
1300
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1301
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1302
|
-
alert: alertLayoutSchema.optional(),
|
|
1303
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
1304
|
-
accepts: z.array(z.string()).optional(),
|
|
1305
|
-
maxSize: z.number().optional(),
|
|
1306
|
-
source: uploadSourceSchema.optional(),
|
|
1307
|
-
disabled: z.boolean().optional(),
|
|
1308
|
-
media: mediaSchema.optional(),
|
|
1309
1461
|
tags: z.array(z.string()).optional(),
|
|
1310
|
-
additionalText: z.string().optional(),
|
|
1311
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1312
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1313
1462
|
}),
|
|
1314
1463
|
);
|
|
1315
1464
|
|
|
1316
|
-
export const
|
|
1465
|
+
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
1317
1466
|
z.object({
|
|
1318
|
-
type: z.literal('
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
refreshUrl: z.string().optional(),
|
|
1323
|
-
refreshFormUrl: z.string().optional(),
|
|
1324
|
-
$id: z.string().optional(),
|
|
1325
|
-
title: z.string().optional(),
|
|
1326
|
-
description: z.string().optional(),
|
|
1467
|
+
type: z.literal('box'),
|
|
1468
|
+
components: z.array(layoutSchema),
|
|
1469
|
+
width: sizeSchema.optional(),
|
|
1470
|
+
border: z.boolean().optional(),
|
|
1327
1471
|
control: z.string().optional(),
|
|
1328
|
-
|
|
1329
|
-
hidden: z.boolean().optional(),
|
|
1330
|
-
disabled: z.boolean().optional(),
|
|
1331
|
-
icon: iconSchema.optional(),
|
|
1332
|
-
image: imageSchema.optional(),
|
|
1333
|
-
keywords: z.array(z.string()).optional(),
|
|
1334
|
-
summary: summaryProviderSchema.optional(),
|
|
1472
|
+
margin: sizeSchema.optional(),
|
|
1335
1473
|
analyticsId: z.string().optional(),
|
|
1336
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1337
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1338
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1339
|
-
alert: alertLayoutSchema.optional(),
|
|
1340
|
-
autofillKey: z.string().optional(),
|
|
1341
|
-
help: helpSchema.optional(),
|
|
1342
|
-
onChange: behaviorSchema.optional(),
|
|
1343
|
-
media: mediaSchema.optional(),
|
|
1344
1474
|
tags: z.array(z.string()).optional(),
|
|
1345
|
-
additionalText: z.string().optional(),
|
|
1346
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1347
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1348
1475
|
}),
|
|
1349
1476
|
);
|
|
1350
1477
|
|
|
1351
|
-
export const
|
|
1478
|
+
export const sectionLayoutCallToActionSchema: z.ZodSchema<SectionLayoutCallToAction> = z.lazy(() =>
|
|
1352
1479
|
z.object({
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
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(),
|
|
1358
1492
|
title: z.string().optional(),
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
image: imageSchema.optional(),
|
|
1362
|
-
keywords: z.array(z.string()).optional(),
|
|
1363
|
-
summary: summaryProviderSchema.optional(),
|
|
1364
|
-
analyticsId: z.string().optional(),
|
|
1493
|
+
behavior: behaviorSchema.optional(),
|
|
1494
|
+
context: contextSchema.optional(),
|
|
1365
1495
|
disabled: z.boolean().optional(),
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1496
|
+
pinOrder: z.number().optional(),
|
|
1497
|
+
control: z.string().optional(),
|
|
1498
|
+
margin: sizeSchema.optional(),
|
|
1499
|
+
analyticsId: z.string().optional(),
|
|
1369
1500
|
tags: z.array(z.string()).optional(),
|
|
1370
|
-
|
|
1371
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1372
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1501
|
+
media: mediaSchema.optional(),
|
|
1373
1502
|
}),
|
|
1374
1503
|
);
|
|
1375
1504
|
|
|
1376
|
-
export const
|
|
1505
|
+
export const collectionLayoutSchema: z.ZodSchema<CollectionLayout> = z.lazy(() =>
|
|
1377
1506
|
z.object({
|
|
1378
|
-
type: z.literal('
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
refreshUrl: z.string().optional(),
|
|
1383
|
-
refreshFormUrl: z.string().optional(),
|
|
1384
|
-
placeholder: z.string().optional(),
|
|
1385
|
-
minimum: z.number().optional(),
|
|
1386
|
-
maximum: z.number().optional(),
|
|
1387
|
-
$id: z.string().optional(),
|
|
1388
|
-
title: z.string().optional(),
|
|
1389
|
-
description: z.string().optional(),
|
|
1507
|
+
type: z.literal('collection'),
|
|
1508
|
+
baseRequest: requestSchema,
|
|
1509
|
+
initialState: collectionLayoutStateSchema,
|
|
1510
|
+
search: collectionLayoutSearchSchema.optional(),
|
|
1390
1511
|
control: z.string().optional(),
|
|
1391
|
-
|
|
1392
|
-
hidden: z.boolean().optional(),
|
|
1393
|
-
disabled: z.boolean().optional(),
|
|
1394
|
-
icon: iconSchema.optional(),
|
|
1395
|
-
image: imageSchema.optional(),
|
|
1396
|
-
keywords: z.array(z.string()).optional(),
|
|
1397
|
-
summary: summaryProviderSchema.optional(),
|
|
1512
|
+
margin: sizeSchema.optional(),
|
|
1398
1513
|
analyticsId: z.string().optional(),
|
|
1399
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1400
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1401
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1402
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1403
|
-
alert: alertLayoutSchema.optional(),
|
|
1404
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1405
|
-
autofillKey: z.string().optional(),
|
|
1406
|
-
help: helpSchema.optional(),
|
|
1407
|
-
onChange: behaviorSchema.optional(),
|
|
1408
|
-
media: mediaSchema.optional(),
|
|
1409
1514
|
tags: z.array(z.string()).optional(),
|
|
1410
|
-
additionalText: z.string().optional(),
|
|
1411
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1412
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1413
1515
|
}),
|
|
1414
1516
|
);
|
|
1415
1517
|
|
|
1416
|
-
export const
|
|
1518
|
+
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
1417
1519
|
z.object({
|
|
1418
|
-
type: z.literal('
|
|
1419
|
-
autofillProvider: z.string().optional(),
|
|
1420
|
-
promoted: z.boolean().optional(),
|
|
1421
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1422
|
-
refreshUrl: z.string().optional(),
|
|
1423
|
-
refreshFormUrl: z.string().optional(),
|
|
1424
|
-
placeholder: z.string().optional(),
|
|
1425
|
-
minimum: z.number().optional(),
|
|
1426
|
-
maximum: z.number().optional(),
|
|
1427
|
-
$id: z.string().optional(),
|
|
1428
|
-
title: z.string().optional(),
|
|
1429
|
-
description: z.string().optional(),
|
|
1520
|
+
type: z.literal('modal'),
|
|
1430
1521
|
control: z.string().optional(),
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
icon: iconSchema.optional(),
|
|
1435
|
-
image: imageSchema.optional(),
|
|
1436
|
-
keywords: z.array(z.string()).optional(),
|
|
1437
|
-
summary: summaryProviderSchema.optional(),
|
|
1522
|
+
margin: sizeSchema.optional(),
|
|
1523
|
+
trigger: modalLayoutTriggerSchema,
|
|
1524
|
+
content: modalLayoutContentSchema,
|
|
1438
1525
|
analyticsId: z.string().optional(),
|
|
1439
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1440
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1441
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1442
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1443
|
-
alert: alertLayoutSchema.optional(),
|
|
1444
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1445
|
-
autofillKey: z.string().optional(),
|
|
1446
|
-
help: helpSchema.optional(),
|
|
1447
|
-
onChange: behaviorSchema.optional(),
|
|
1448
|
-
media: mediaSchema.optional(),
|
|
1449
1526
|
tags: z.array(z.string()).optional(),
|
|
1450
|
-
additionalText: z.string().optional(),
|
|
1451
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1452
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1453
1527
|
}),
|
|
1454
1528
|
);
|
|
1455
1529
|
|
|
1456
|
-
export const
|
|
1530
|
+
export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
1457
1531
|
z.object({
|
|
1458
|
-
type: z.literal('
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
properties: z.record(schemaSchema),
|
|
1463
|
-
displayOrder: z.array(z.string()),
|
|
1464
|
-
required: z.array(z.string()).optional(),
|
|
1465
|
-
$id: z.string().optional(),
|
|
1466
|
-
title: z.string().optional(),
|
|
1467
|
-
description: z.string().optional(),
|
|
1532
|
+
type: z.literal('section'),
|
|
1533
|
+
components: z.array(layoutSchema),
|
|
1534
|
+
title: z.string(),
|
|
1535
|
+
callToAction: sectionLayoutCallToActionSchema.optional(),
|
|
1468
1536
|
control: z.string().optional(),
|
|
1469
|
-
|
|
1470
|
-
icon: iconSchema.optional(),
|
|
1471
|
-
image: imageSchema.optional(),
|
|
1472
|
-
keywords: z.array(z.string()).optional(),
|
|
1473
|
-
summary: summaryProviderSchema.optional(),
|
|
1537
|
+
margin: sizeSchema.optional(),
|
|
1474
1538
|
analyticsId: z.string().optional(),
|
|
1475
|
-
alert: alertLayoutSchema.optional(),
|
|
1476
|
-
media: mediaSchema.optional(),
|
|
1477
1539
|
tags: z.array(z.string()).optional(),
|
|
1478
|
-
|
|
1479
|
-
additionalText: z.string().optional(),
|
|
1480
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1481
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1482
|
-
onChange: behaviorSchema.optional(),
|
|
1540
|
+
shortTitle: z.string().optional(),
|
|
1483
1541
|
}),
|
|
1484
1542
|
);
|
|
1485
1543
|
|
|
1486
|
-
export const
|
|
1544
|
+
export const statusListLayoutSchema: z.ZodSchema<StatusListLayout> = z.lazy(() =>
|
|
1487
1545
|
z.object({
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1491
|
-
refreshUrl: z.string().optional(),
|
|
1492
|
-
refreshFormUrl: z.string().optional(),
|
|
1493
|
-
promotion: jsonElementSchema.optional(),
|
|
1494
|
-
oneOf: z.array(schemaSchema),
|
|
1495
|
-
placeholder: z.string().optional(),
|
|
1496
|
-
$id: z.string().optional(),
|
|
1546
|
+
type: z.literal('status-list'),
|
|
1547
|
+
items: z.array(statusListLayoutItemSchema),
|
|
1497
1548
|
title: z.string().optional(),
|
|
1498
|
-
description: z.string().optional(),
|
|
1499
1549
|
control: z.string().optional(),
|
|
1500
|
-
|
|
1501
|
-
hidden: z.boolean().optional(),
|
|
1502
|
-
icon: iconSchema.optional(),
|
|
1503
|
-
image: imageSchema.optional(),
|
|
1504
|
-
keywords: z.array(z.string()).optional(),
|
|
1505
|
-
summary: summaryProviderSchema.optional(),
|
|
1550
|
+
margin: sizeSchema.optional(),
|
|
1506
1551
|
analyticsId: z.string().optional(),
|
|
1507
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1508
|
-
alert: alertLayoutSchema.optional(),
|
|
1509
|
-
help: helpSchema.optional(),
|
|
1510
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1511
|
-
autofillKey: z.string().optional(),
|
|
1512
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1513
|
-
disabled: z.boolean().optional(),
|
|
1514
|
-
onChange: behaviorSchema.optional(),
|
|
1515
|
-
media: mediaSchema.optional(),
|
|
1516
1552
|
tags: z.array(z.string()).optional(),
|
|
1517
|
-
additionalText: z.string().optional(),
|
|
1518
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1519
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1520
1553
|
}),
|
|
1521
1554
|
);
|
|
1522
1555
|
|
|
1523
|
-
export const
|
|
1556
|
+
export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
1524
1557
|
z.object({
|
|
1525
|
-
type: z.literal('
|
|
1526
|
-
|
|
1527
|
-
promoted: z.boolean().optional(),
|
|
1528
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1529
|
-
refreshUrl: z.string().optional(),
|
|
1530
|
-
refreshFormUrl: z.string().optional(),
|
|
1531
|
-
format: stringSchemaFormatSchema.optional(),
|
|
1532
|
-
displayFormat: z.string().optional(),
|
|
1533
|
-
placeholder: z.string().optional(),
|
|
1534
|
-
minLength: z.number().optional(),
|
|
1535
|
-
maxLength: z.number().optional(),
|
|
1536
|
-
minimum: z.string().optional(),
|
|
1537
|
-
maximum: z.string().optional(),
|
|
1538
|
-
pattern: z.string().optional(),
|
|
1539
|
-
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
1540
|
-
autocorrect: z.boolean().optional(),
|
|
1541
|
-
$id: z.string().optional(),
|
|
1542
|
-
title: z.string().optional(),
|
|
1543
|
-
description: z.string().optional(),
|
|
1558
|
+
type: z.literal('tabs'),
|
|
1559
|
+
tabs: z.array(tabsLayoutTabSchema),
|
|
1544
1560
|
control: z.string().optional(),
|
|
1545
|
-
|
|
1546
|
-
hidden: z.boolean().optional(),
|
|
1547
|
-
disabled: z.boolean().optional(),
|
|
1548
|
-
icon: iconSchema.optional(),
|
|
1549
|
-
image: imageSchema.optional(),
|
|
1550
|
-
keywords: z.array(z.string()).optional(),
|
|
1551
|
-
summary: summaryProviderSchema.optional(),
|
|
1561
|
+
margin: sizeSchema.optional(),
|
|
1552
1562
|
analyticsId: z.string().optional(),
|
|
1553
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1554
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1555
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1556
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1557
|
-
alert: alertLayoutSchema.optional(),
|
|
1558
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
1559
|
-
accepts: z.array(z.string()).optional(),
|
|
1560
|
-
maxSize: z.number().optional(),
|
|
1561
|
-
source: uploadSourceSchema.optional(),
|
|
1562
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1563
|
-
autofillKey: z.string().optional(),
|
|
1564
|
-
help: helpSchema.optional(),
|
|
1565
|
-
suggestions: suggestionsSchema.optional(),
|
|
1566
|
-
onChange: behaviorSchema.optional(),
|
|
1567
|
-
media: mediaSchema.optional(),
|
|
1568
1563
|
tags: z.array(z.string()).optional(),
|
|
1569
|
-
additionalText: z.string().optional(),
|
|
1570
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1571
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1572
1564
|
}),
|
|
1573
1565
|
);
|
|
1574
1566
|
|
|
1575
|
-
export const
|
|
1567
|
+
export const updatableLayoutSchema: z.ZodSchema<UpdatableLayout> = z.lazy(() =>
|
|
1576
1568
|
z.object({
|
|
1577
|
-
type: z.literal('
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
editItemTitle: z.string(),
|
|
1583
|
-
minItems: z.number().optional(),
|
|
1584
|
-
maxItems: z.number().optional(),
|
|
1585
|
-
placeholder: z.string().optional(),
|
|
1586
|
-
title: z.string().optional(),
|
|
1587
|
-
description: z.string().optional(),
|
|
1569
|
+
type: z.literal('updatable'),
|
|
1570
|
+
baseRequest: requestSchema,
|
|
1571
|
+
trigger: updatableLayoutTriggerSchema,
|
|
1572
|
+
initialState: updatableLayoutStateSchema.optional(),
|
|
1573
|
+
onError: updatableLayoutErrorHandlerSchema.optional(),
|
|
1588
1574
|
control: z.string().optional(),
|
|
1589
|
-
|
|
1590
|
-
icon: iconSchema.optional(),
|
|
1591
|
-
image: imageSchema.optional(),
|
|
1592
|
-
keywords: z.array(z.string()).optional(),
|
|
1593
|
-
summary: summarySummariserSchema.optional(),
|
|
1575
|
+
margin: sizeSchema.optional(),
|
|
1594
1576
|
analyticsId: z.string().optional(),
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
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,
|
|
1600
1586
|
media: mediaSchema.optional(),
|
|
1587
|
+
onDismiss: requestSchema.optional(),
|
|
1588
|
+
control: z.string().optional(),
|
|
1589
|
+
margin: sizeSchema.optional(),
|
|
1590
|
+
analyticsId: z.string().optional(),
|
|
1601
1591
|
tags: z.array(z.string()).optional(),
|
|
1602
|
-
additionalText: z.string().optional(),
|
|
1603
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1604
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1605
1592
|
}),
|
|
1606
1593
|
);
|
|
1607
1594
|
|
|
1608
|
-
export const
|
|
1595
|
+
export const collectionLayoutStateSchema: z.ZodSchema<CollectionLayoutState> = z.lazy(() =>
|
|
1609
1596
|
z.object({
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
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(),
|
|
1615
1603
|
}),
|
|
1616
1604
|
);
|
|
1617
1605
|
|
|
1618
|
-
export const
|
|
1606
|
+
export const updatableLayoutStateSchema: z.ZodSchema<UpdatableLayoutState> = z.lazy(() =>
|
|
1619
1607
|
z.object({
|
|
1620
|
-
|
|
1621
|
-
content: z.array(layoutSchema),
|
|
1608
|
+
components: z.array(layoutSchema).optional(),
|
|
1622
1609
|
}),
|
|
1623
1610
|
);
|
|
1624
1611
|
|
|
1625
|
-
export const
|
|
1626
|
-
z.
|
|
1612
|
+
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
1613
|
+
z.object({
|
|
1614
|
+
title: z.string().optional(),
|
|
1615
|
+
components: z.array(layoutSchema),
|
|
1616
|
+
}),
|
|
1627
1617
|
);
|
|
1628
1618
|
|
|
1629
|
-
export const
|
|
1619
|
+
export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.lazy(() =>
|
|
1630
1620
|
z.object({
|
|
1631
|
-
|
|
1632
|
-
|
|
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(),
|
|
1633
1629
|
}),
|
|
1634
1630
|
);
|
|
1635
1631
|
|
|
1636
|
-
export const
|
|
1632
|
+
export const collectionLayoutSectionSchema: z.ZodSchema<CollectionLayoutSection> = z.lazy(() =>
|
|
1637
1633
|
z.object({
|
|
1634
|
+
id: z.string(),
|
|
1635
|
+
items: z.array(collectionLayoutItemSchema),
|
|
1638
1636
|
title: z.string().optional(),
|
|
1639
|
-
|
|
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,
|
|
1640
1675
|
}),
|
|
1641
1676
|
);
|
|
1642
1677
|
|
|
@@ -1647,6 +1682,13 @@ export const pollingOnErrorSchema: z.ZodSchema<PollingOnError> = z.lazy(() =>
|
|
|
1647
1682
|
}),
|
|
1648
1683
|
);
|
|
1649
1684
|
|
|
1685
|
+
export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
|
|
1686
|
+
z.object({
|
|
1687
|
+
regexPattern: z.string(),
|
|
1688
|
+
behavior: behaviorSchema.optional(),
|
|
1689
|
+
}),
|
|
1690
|
+
);
|
|
1691
|
+
|
|
1650
1692
|
export const subflowBehaviorSchema: z.ZodSchema<SubflowBehavior> = z.lazy(() =>
|
|
1651
1693
|
z.object({
|
|
1652
1694
|
type: z.literal('subflow'),
|
|
@@ -1659,7 +1701,23 @@ export const subflowBehaviorSchema: z.ZodSchema<SubflowBehavior> = z.lazy(() =>
|
|
|
1659
1701
|
}),
|
|
1660
1702
|
);
|
|
1661
1703
|
|
|
1662
|
-
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
|
+
);
|
|
1663
1721
|
|
|
1664
1722
|
export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
|
|
1665
1723
|
z.object({
|
|
@@ -1676,20 +1734,40 @@ export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
|
|
|
1676
1734
|
}),
|
|
1677
1735
|
);
|
|
1678
1736
|
|
|
1679
|
-
export const
|
|
1737
|
+
export const toolbarSchema: z.ZodSchema<Toolbar> = z.lazy(() =>
|
|
1680
1738
|
z.object({
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
analytics: z.record(z.string()).optional(),
|
|
1739
|
+
items: z.array(toolbarItemSchema),
|
|
1740
|
+
control: z.string().optional(),
|
|
1741
|
+
tags: z.array(z.string()).optional(),
|
|
1685
1742
|
}),
|
|
1686
1743
|
);
|
|
1687
1744
|
|
|
1688
|
-
export const
|
|
1745
|
+
export const toolbarItemSchema: z.ZodSchema<ToolbarItem> = z.lazy(() => toolbarButtonSchema);
|
|
1746
|
+
|
|
1747
|
+
export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
1689
1748
|
z.object({
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
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(),
|
|
1693
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(),
|
|
1694
1772
|
}),
|
|
1695
1773
|
);
|