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