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