@wise/dynamic-flow-types 4.14.0 → 4.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/renderers/BaseInputRendererProps.d.ts +5 -0
- package/build/renderers/BaseInputRendererProps.d.ts.map +1 -1
- package/build/spec/feature/ActionBehavior.d.ts +5 -0
- package/build/spec/feature/ActionBehavior.d.ts.map +1 -1
- package/build/spec/feature/Behavior.d.ts +2 -1
- package/build/spec/feature/Behavior.d.ts.map +1 -1
- package/build/spec/feature/ContainerBehavior.d.ts +5 -0
- package/build/spec/feature/ContainerBehavior.d.ts.map +1 -1
- package/build/spec/feature/CopyBehavior.d.ts +5 -0
- package/build/spec/feature/CopyBehavior.d.ts.map +1 -1
- package/build/spec/feature/DismissBehavior.d.ts +5 -0
- package/build/spec/feature/DismissBehavior.d.ts.map +1 -1
- package/build/spec/feature/DownloadBehavior.d.ts +21 -0
- package/build/spec/feature/DownloadBehavior.d.ts.map +1 -0
- package/build/spec/feature/LinkBehavior.d.ts +5 -0
- package/build/spec/feature/LinkBehavior.d.ts.map +1 -1
- package/build/spec/feature/ModalBehavior.d.ts +5 -0
- package/build/spec/feature/ModalBehavior.d.ts.map +1 -1
- package/build/spec/feature/RefreshBehavior.d.ts +5 -0
- package/build/spec/feature/RefreshBehavior.d.ts.map +1 -1
- package/build/spec/feature/SubflowBehavior.d.ts +5 -0
- package/build/spec/feature/SubflowBehavior.d.ts.map +1 -1
- package/build/spec/feature/subflow/LaunchConfig.d.ts +6 -0
- package/build/spec/feature/subflow/LaunchConfig.d.ts.map +1 -1
- package/build/spec/feature/subflow/NativeLaunchConfig.d.ts +40 -4
- package/build/spec/feature/subflow/NativeLaunchConfig.d.ts.map +1 -1
- package/build/spec/index.d.ts +1 -0
- package/build/spec/index.d.ts.map +1 -1
- package/build/spec/main.js +26 -10
- package/build/spec/main.mjs +26 -10
- package/build/spec/misc/Request.d.ts +4 -0
- package/build/spec/misc/Request.d.ts.map +1 -1
- package/build/spec/step/Step.d.ts +5 -0
- package/build/spec/step/Step.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/zod/schemas.d.ts +74 -0
- package/build/zod/schemas.d.ts.map +1 -1
- package/build/zod/schemas.ts +652 -635
- package/package.json +3 -3
package/build/zod/schemas.ts
CHANGED
|
@@ -2,65 +2,69 @@
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import {
|
|
4
4
|
type JsonElement,
|
|
5
|
-
type
|
|
6
|
-
type Layout,
|
|
7
|
-
type SearchInitialState,
|
|
8
|
-
type SearchInitialLayoutConfig,
|
|
9
|
-
type SearchLayoutResponseBody,
|
|
10
|
-
type SearchResponse,
|
|
11
|
-
type SubflowResponseBody,
|
|
12
|
-
type Behavior,
|
|
13
|
-
type OneOfSchema,
|
|
5
|
+
type ObjectSchema,
|
|
14
6
|
type Schema,
|
|
15
7
|
type AlertLayout,
|
|
16
|
-
type
|
|
8
|
+
type Behavior,
|
|
9
|
+
type IntegerSchema,
|
|
17
10
|
type PersistAsync,
|
|
18
|
-
type NumberSchema,
|
|
19
|
-
type AllOfSchema,
|
|
20
11
|
type BooleanSchema,
|
|
21
12
|
type StringSchema,
|
|
13
|
+
type ArraySchemaTuple,
|
|
14
|
+
type NumberSchema,
|
|
22
15
|
type ArraySchema,
|
|
16
|
+
type ArraySchemaList,
|
|
23
17
|
type BlobSchema,
|
|
18
|
+
type AllOfSchema,
|
|
19
|
+
type OneOfSchema,
|
|
24
20
|
type ConstSchema,
|
|
25
|
-
type
|
|
26
|
-
type
|
|
27
|
-
type ArraySchemaList,
|
|
21
|
+
type Layout,
|
|
22
|
+
type ReviewLayoutField,
|
|
28
23
|
type AdditionalInfo,
|
|
29
|
-
type
|
|
30
|
-
type ButtonLayout,
|
|
31
|
-
type ColumnsLayout,
|
|
24
|
+
type ReviewLayoutCallToAction,
|
|
32
25
|
type DecisionLayout,
|
|
33
|
-
type
|
|
34
|
-
type ModalLayout,
|
|
26
|
+
type DecisionLayoutOption,
|
|
35
27
|
type ReviewLayout,
|
|
36
|
-
type SearchLayout,
|
|
37
|
-
type SectionLayout,
|
|
38
|
-
type StatusListLayout,
|
|
39
|
-
type TabsLayout,
|
|
40
28
|
type UpsellLayout,
|
|
41
|
-
type ModalLayoutContent,
|
|
42
29
|
type UpsellLayoutCallToAction,
|
|
30
|
+
type SectionLayout,
|
|
31
|
+
type SectionLayoutCallToAction,
|
|
32
|
+
type TabsLayout,
|
|
33
|
+
type TabsLayoutTab,
|
|
34
|
+
type ColumnsLayout,
|
|
35
|
+
type ButtonLayout,
|
|
36
|
+
type ListLayoutCallToAction,
|
|
37
|
+
type StatusListLayout,
|
|
43
38
|
type StatusListLayoutItem,
|
|
44
39
|
type ItemCallToAction,
|
|
45
|
-
type
|
|
46
|
-
type DecisionLayoutOption,
|
|
47
|
-
type AlertLayoutCallToAction,
|
|
40
|
+
type ListLayout,
|
|
48
41
|
type ListLayoutItem,
|
|
49
|
-
type
|
|
50
|
-
type
|
|
51
|
-
type
|
|
52
|
-
type
|
|
53
|
-
type
|
|
54
|
-
type
|
|
42
|
+
type AlertLayoutCallToAction,
|
|
43
|
+
type ModalLayoutContent,
|
|
44
|
+
type BoxLayout,
|
|
45
|
+
type SearchLayout,
|
|
46
|
+
type SearchInitialState,
|
|
47
|
+
type ModalLayout,
|
|
48
|
+
type SubflowResponseBody,
|
|
49
|
+
type SearchInitialLayoutConfig,
|
|
50
|
+
type SearchLayoutResponseBody,
|
|
51
|
+
type SearchResponse,
|
|
52
|
+
type ModalResponseBody,
|
|
55
53
|
type PollingOnError,
|
|
54
|
+
type ToolbarButton,
|
|
56
55
|
type Toolbar,
|
|
57
56
|
type ToolbarItem,
|
|
58
|
-
type ToolbarButton,
|
|
59
|
-
type SubflowBehavior,
|
|
60
57
|
type ModalBehavior,
|
|
58
|
+
type SubflowBehavior,
|
|
59
|
+
type Polling,
|
|
60
|
+
type LinkHandler,
|
|
61
61
|
type Step,
|
|
62
62
|
} from '../spec';
|
|
63
63
|
|
|
64
|
+
export const helpSchema = z.object({
|
|
65
|
+
markdown: z.string(),
|
|
66
|
+
});
|
|
67
|
+
|
|
64
68
|
export const imageSchema = z.object({
|
|
65
69
|
text: z.string().optional(),
|
|
66
70
|
url: z.string().optional(),
|
|
@@ -68,28 +72,6 @@ export const imageSchema = z.object({
|
|
|
68
72
|
accessibilityDescription: z.string().optional(),
|
|
69
73
|
});
|
|
70
74
|
|
|
71
|
-
export const httpMethodSchema = z.union([
|
|
72
|
-
z.literal('GET'),
|
|
73
|
-
z.literal('POST'),
|
|
74
|
-
z.literal('PUT'),
|
|
75
|
-
z.literal('PATCH'),
|
|
76
|
-
z.literal('DELETE'),
|
|
77
|
-
]);
|
|
78
|
-
|
|
79
|
-
export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
80
|
-
z
|
|
81
|
-
.union([
|
|
82
|
-
z.string(),
|
|
83
|
-
z.number(),
|
|
84
|
-
z.boolean(),
|
|
85
|
-
z.record(jsonElementSchema),
|
|
86
|
-
z.array(jsonElementSchema),
|
|
87
|
-
])
|
|
88
|
-
.nullable(),
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
export const noOpResponseBodySchema = z.object({});
|
|
92
|
-
|
|
93
75
|
export const summaryProviderSchema = z.object({
|
|
94
76
|
providesTitle: z.boolean().optional(),
|
|
95
77
|
providesDescription: z.boolean().optional(),
|
|
@@ -98,8 +80,9 @@ export const summaryProviderSchema = z.object({
|
|
|
98
80
|
providesMedia: z.boolean().optional(),
|
|
99
81
|
});
|
|
100
82
|
|
|
101
|
-
export const
|
|
102
|
-
|
|
83
|
+
export const supportingValuesSchema = z.object({
|
|
84
|
+
value: z.string().optional(),
|
|
85
|
+
subvalue: z.string().optional(),
|
|
103
86
|
});
|
|
104
87
|
|
|
105
88
|
export const autocompleteTokenSchema = z.union([
|
|
@@ -168,17 +151,6 @@ export const autocompleteTokenSchema = z.union([
|
|
|
168
151
|
z.literal('pager'),
|
|
169
152
|
]);
|
|
170
153
|
|
|
171
|
-
export const supportingValuesSchema = z.object({
|
|
172
|
-
value: z.string().optional(),
|
|
173
|
-
subvalue: z.string().optional(),
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
export const validateAsyncSchema = z.object({
|
|
177
|
-
param: z.string(),
|
|
178
|
-
method: httpMethodSchema,
|
|
179
|
-
url: z.string(),
|
|
180
|
-
});
|
|
181
|
-
|
|
182
154
|
export const stringSchemaFormatSchema = z.union([
|
|
183
155
|
z.literal('date'),
|
|
184
156
|
z.literal('email'),
|
|
@@ -195,8 +167,36 @@ export const autocapitalizationTypeSchema = z.union([
|
|
|
195
167
|
z.literal('words'),
|
|
196
168
|
]);
|
|
197
169
|
|
|
170
|
+
export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
171
|
+
z
|
|
172
|
+
.union([
|
|
173
|
+
z.string(),
|
|
174
|
+
z.number(),
|
|
175
|
+
z.boolean(),
|
|
176
|
+
z.record(jsonElementSchema),
|
|
177
|
+
z.array(jsonElementSchema),
|
|
178
|
+
])
|
|
179
|
+
.nullable(),
|
|
180
|
+
);
|
|
181
|
+
|
|
198
182
|
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
199
183
|
|
|
184
|
+
export const sizeSchema = z.union([
|
|
185
|
+
z.literal('xs'),
|
|
186
|
+
z.literal('sm'),
|
|
187
|
+
z.literal('md'),
|
|
188
|
+
z.literal('lg'),
|
|
189
|
+
z.literal('xl'),
|
|
190
|
+
]);
|
|
191
|
+
|
|
192
|
+
export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
|
|
193
|
+
|
|
194
|
+
export const columnsLayoutBiasSchema = z.union([
|
|
195
|
+
z.literal('none'),
|
|
196
|
+
z.literal('left'),
|
|
197
|
+
z.literal('right'),
|
|
198
|
+
]);
|
|
199
|
+
|
|
200
200
|
export const contextSchema = z.union([
|
|
201
201
|
z.literal('positive'),
|
|
202
202
|
z.literal('neutral'),
|
|
@@ -208,74 +208,49 @@ export const contextSchema = z.union([
|
|
|
208
208
|
z.literal('primary'),
|
|
209
209
|
]);
|
|
210
210
|
|
|
211
|
-
export const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
uri: z.string(),
|
|
221
|
-
accessibilityDescription: z.string().optional(),
|
|
211
|
+
export const markdownLayoutSchema = z.object({
|
|
212
|
+
type: z.literal('markdown'),
|
|
213
|
+
content: z.string(),
|
|
214
|
+
align: alignSchema.optional(),
|
|
215
|
+
control: z.string().optional(),
|
|
216
|
+
margin: sizeSchema.optional(),
|
|
217
|
+
analyticsId: z.string().optional(),
|
|
218
|
+
tags: z.array(z.string()).optional(),
|
|
219
|
+
size: sizeSchema.optional(),
|
|
222
220
|
});
|
|
223
221
|
|
|
224
|
-
export const
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
222
|
+
export const statusListLayoutStatusSchema = z.union([
|
|
223
|
+
z.literal('not-done'),
|
|
224
|
+
z.literal('pending'),
|
|
225
|
+
z.literal('done'),
|
|
226
|
+
]);
|
|
229
227
|
|
|
230
|
-
export const
|
|
231
|
-
type: z.literal('
|
|
232
|
-
|
|
233
|
-
|
|
228
|
+
export const dividerLayoutSchema = z.object({
|
|
229
|
+
type: z.literal('divider'),
|
|
230
|
+
control: z.string().optional(),
|
|
231
|
+
margin: sizeSchema.optional(),
|
|
232
|
+
analyticsId: z.string().optional(),
|
|
233
|
+
tags: z.array(z.string()).optional(),
|
|
234
234
|
});
|
|
235
235
|
|
|
236
|
-
export const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
content: z.array(avatarContentSchema),
|
|
236
|
+
export const imageLayoutSchema = z.object({
|
|
237
|
+
type: z.literal('image'),
|
|
238
|
+
text: z.string().optional(),
|
|
239
|
+
url: z.string().optional(),
|
|
241
240
|
accessibilityDescription: z.string().optional(),
|
|
241
|
+
content: imageSchema.optional(),
|
|
242
|
+
size: sizeSchema.optional(),
|
|
243
|
+
control: z.string().optional(),
|
|
244
|
+
margin: sizeSchema.optional(),
|
|
245
|
+
align: alignSchema.optional(),
|
|
246
|
+
analyticsId: z.string().optional(),
|
|
247
|
+
tags: z.array(z.string()).optional(),
|
|
242
248
|
});
|
|
243
249
|
|
|
244
|
-
export const
|
|
245
|
-
|
|
246
|
-
export const inlineAlertSchema = z.object({
|
|
247
|
-
content: z.string(),
|
|
248
|
-
context: contextSchema.optional(),
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
export const iconTextSchema = z.object({
|
|
252
|
-
text: z.string(),
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
export const iconNamedSchema = z.object({
|
|
256
|
-
name: z.string(),
|
|
250
|
+
export const modalLayoutTriggerSchema = z.object({
|
|
251
|
+
title: z.string(),
|
|
257
252
|
});
|
|
258
253
|
|
|
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
|
-
export const columnsLayoutBiasSchema = z.union([
|
|
268
|
-
z.literal('none'),
|
|
269
|
-
z.literal('left'),
|
|
270
|
-
z.literal('right'),
|
|
271
|
-
]);
|
|
272
|
-
|
|
273
|
-
export const listLayoutStatusSchema = z.union([
|
|
274
|
-
z.literal('warning'),
|
|
275
|
-
z.literal('neutral'),
|
|
276
|
-
z.literal('positive'),
|
|
277
|
-
]);
|
|
278
|
-
|
|
279
254
|
export const instructionsLayoutItemSchema = z.object({
|
|
280
255
|
text: z.string(),
|
|
281
256
|
context: contextSchema,
|
|
@@ -284,10 +259,6 @@ export const instructionsLayoutItemSchema = z.object({
|
|
|
284
259
|
tags: z.array(z.string()).optional(),
|
|
285
260
|
});
|
|
286
261
|
|
|
287
|
-
export const formLayoutSchemaReferenceSchema = z.object({
|
|
288
|
-
$ref: z.string(),
|
|
289
|
-
});
|
|
290
|
-
|
|
291
262
|
export const paragraphLayoutSchema = z.object({
|
|
292
263
|
type: z.literal('paragraph'),
|
|
293
264
|
text: z.string(),
|
|
@@ -299,47 +270,50 @@ export const paragraphLayoutSchema = z.object({
|
|
|
299
270
|
size: sizeSchema.optional(),
|
|
300
271
|
});
|
|
301
272
|
|
|
302
|
-
export const
|
|
303
|
-
type: z.literal('
|
|
273
|
+
export const progressLayoutSchema = z.object({
|
|
274
|
+
type: z.literal('progress'),
|
|
275
|
+
title: z.string().optional(),
|
|
276
|
+
description: z.string().optional(),
|
|
277
|
+
progress: z.number(),
|
|
278
|
+
progressText: z.string(),
|
|
279
|
+
context: contextSchema.optional(),
|
|
280
|
+
help: helpSchema.optional(),
|
|
304
281
|
control: z.string().optional(),
|
|
305
282
|
margin: sizeSchema.optional(),
|
|
306
283
|
analyticsId: z.string().optional(),
|
|
307
284
|
tags: z.array(z.string()).optional(),
|
|
308
285
|
});
|
|
309
286
|
|
|
310
|
-
export const
|
|
311
|
-
type: z.literal('
|
|
312
|
-
|
|
313
|
-
schemaId: z.string(),
|
|
287
|
+
export const loadingIndicatorLayoutSchema = z.object({
|
|
288
|
+
type: z.literal('loading-indicator'),
|
|
289
|
+
size: sizeSchema.optional(),
|
|
314
290
|
control: z.string().optional(),
|
|
315
291
|
margin: sizeSchema.optional(),
|
|
316
292
|
analyticsId: z.string().optional(),
|
|
317
293
|
tags: z.array(z.string()).optional(),
|
|
318
294
|
});
|
|
319
295
|
|
|
320
|
-
export const
|
|
321
|
-
|
|
322
|
-
text: z.string(),
|
|
323
|
-
size: sizeSchema.optional(),
|
|
324
|
-
align: alignSchema.optional(),
|
|
325
|
-
control: z.string().optional(),
|
|
326
|
-
margin: sizeSchema.optional(),
|
|
327
|
-
analyticsId: z.string().optional(),
|
|
328
|
-
tags: z.array(z.string()).optional(),
|
|
296
|
+
export const formLayoutSchemaReferenceSchema = z.object({
|
|
297
|
+
$ref: z.string(),
|
|
329
298
|
});
|
|
330
299
|
|
|
331
|
-
export const
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
300
|
+
export const listLayoutStatusSchema = z.union([
|
|
301
|
+
z.literal('warning'),
|
|
302
|
+
z.literal('neutral'),
|
|
303
|
+
z.literal('positive'),
|
|
304
|
+
]);
|
|
305
|
+
|
|
306
|
+
export const httpMethodSchema = z.union([
|
|
307
|
+
z.literal('GET'),
|
|
308
|
+
z.literal('POST'),
|
|
309
|
+
z.literal('PUT'),
|
|
310
|
+
z.literal('PATCH'),
|
|
311
|
+
z.literal('DELETE'),
|
|
312
|
+
]);
|
|
313
|
+
|
|
314
|
+
export const inlineAlertSchema = z.object({
|
|
315
|
+
content: z.string(),
|
|
316
|
+
context: contextSchema.optional(),
|
|
343
317
|
});
|
|
344
318
|
|
|
345
319
|
export const infoLayoutSchema = z.object({
|
|
@@ -352,76 +326,62 @@ export const infoLayoutSchema = z.object({
|
|
|
352
326
|
analyticsId: z.string().optional(),
|
|
353
327
|
});
|
|
354
328
|
|
|
355
|
-
export const
|
|
356
|
-
type: z.literal('
|
|
357
|
-
|
|
358
|
-
|
|
329
|
+
export const formLayoutSchema = z.object({
|
|
330
|
+
type: z.literal('form'),
|
|
331
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
332
|
+
schemaId: z.string(),
|
|
359
333
|
control: z.string().optional(),
|
|
360
334
|
margin: sizeSchema.optional(),
|
|
361
335
|
analyticsId: z.string().optional(),
|
|
362
336
|
tags: z.array(z.string()).optional(),
|
|
363
337
|
});
|
|
364
338
|
|
|
365
|
-
export const
|
|
366
|
-
type: z.literal('
|
|
339
|
+
export const headingLayoutSchema = z.object({
|
|
340
|
+
type: z.literal('heading'),
|
|
341
|
+
text: z.string(),
|
|
367
342
|
size: sizeSchema.optional(),
|
|
368
|
-
control: z.string().optional(),
|
|
369
|
-
margin: sizeSchema.optional(),
|
|
370
|
-
analyticsId: z.string().optional(),
|
|
371
|
-
tags: z.array(z.string()).optional(),
|
|
372
|
-
});
|
|
373
|
-
|
|
374
|
-
export const markdownLayoutSchema = z.object({
|
|
375
|
-
type: z.literal('markdown'),
|
|
376
|
-
content: z.string(),
|
|
377
343
|
align: alignSchema.optional(),
|
|
378
344
|
control: z.string().optional(),
|
|
379
345
|
margin: sizeSchema.optional(),
|
|
380
346
|
analyticsId: z.string().optional(),
|
|
381
347
|
tags: z.array(z.string()).optional(),
|
|
382
|
-
size: sizeSchema.optional(),
|
|
383
348
|
});
|
|
384
349
|
|
|
385
|
-
export const
|
|
386
|
-
type: z.literal('
|
|
350
|
+
export const instructionsLayoutSchema = z.object({
|
|
351
|
+
type: z.literal('instructions'),
|
|
387
352
|
title: z.string().optional(),
|
|
388
|
-
|
|
389
|
-
progress: z.number(),
|
|
390
|
-
progressText: z.string(),
|
|
391
|
-
context: contextSchema.optional(),
|
|
392
|
-
help: helpSchema.optional(),
|
|
353
|
+
items: z.array(instructionsLayoutItemSchema),
|
|
393
354
|
control: z.string().optional(),
|
|
394
355
|
margin: sizeSchema.optional(),
|
|
395
356
|
analyticsId: z.string().optional(),
|
|
396
357
|
tags: z.array(z.string()).optional(),
|
|
397
358
|
});
|
|
398
359
|
|
|
399
|
-
export const
|
|
400
|
-
|
|
401
|
-
|
|
360
|
+
export const errorResponseBodySchema = z.object({
|
|
361
|
+
refreshFormUrl: z.string().optional(),
|
|
362
|
+
analytics: z.record(z.string()).optional(),
|
|
363
|
+
error: z.string().optional(),
|
|
364
|
+
validation: jsonElementSchema.optional(),
|
|
365
|
+
refreshUrl: z.string().optional(),
|
|
366
|
+
});
|
|
402
367
|
|
|
403
|
-
export const
|
|
404
|
-
z.literal('not-done'),
|
|
405
|
-
z.literal('pending'),
|
|
406
|
-
z.literal('done'),
|
|
407
|
-
]);
|
|
368
|
+
export const noOpResponseBodySchema = z.object({});
|
|
408
369
|
|
|
409
|
-
export const
|
|
410
|
-
|
|
370
|
+
export const searchSearchRequestSchema = z.object({
|
|
371
|
+
url: z.string(),
|
|
372
|
+
method: httpMethodSchema,
|
|
373
|
+
param: z.string(),
|
|
374
|
+
query: z.string(),
|
|
411
375
|
});
|
|
412
376
|
|
|
413
|
-
export const
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
align: alignSchema.optional(),
|
|
417
|
-
size: sizeSchema.optional(),
|
|
418
|
-
analyticsId: z.string().optional(),
|
|
419
|
-
control: z.string().optional(),
|
|
420
|
-
margin: sizeSchema.optional(),
|
|
421
|
-
tags: z.array(z.string()).optional(),
|
|
377
|
+
export const stepErrorSchema = z.object({
|
|
378
|
+
error: z.string().optional(),
|
|
379
|
+
validation: jsonElementSchema.optional(),
|
|
422
380
|
});
|
|
423
381
|
|
|
424
|
-
export const
|
|
382
|
+
export const validateAsyncSchema = z.object({
|
|
383
|
+
param: z.string(),
|
|
384
|
+
method: httpMethodSchema,
|
|
425
385
|
url: z.string(),
|
|
426
386
|
});
|
|
427
387
|
|
|
@@ -429,6 +389,30 @@ export const linkSchema = z.object({
|
|
|
429
389
|
url: z.string(),
|
|
430
390
|
});
|
|
431
391
|
|
|
392
|
+
export const modalPresentationSchema = z.object({
|
|
393
|
+
type: z.literal('modal'),
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
export const pushPresentationSchema = z.object({
|
|
397
|
+
type: z.literal('push'),
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
export const nativeLaunchConfigSchema = z.object({
|
|
401
|
+
type: z.literal('native'),
|
|
402
|
+
id: z.string(),
|
|
403
|
+
payload: jsonElementSchema.optional(),
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
export const presentationSchema = z.union([modalPresentationSchema, pushPresentationSchema]);
|
|
407
|
+
|
|
408
|
+
export const requestSchema = z.object({
|
|
409
|
+
url: z.string(),
|
|
410
|
+
method: httpMethodSchema,
|
|
411
|
+
body: jsonElementSchema.optional(),
|
|
412
|
+
prefetch: z.boolean().optional(),
|
|
413
|
+
headers: z.record(z.string()).optional(),
|
|
414
|
+
});
|
|
415
|
+
|
|
432
416
|
export const actionTypeSchema = z.union([
|
|
433
417
|
z.literal('primary'),
|
|
434
418
|
z.literal('secondary'),
|
|
@@ -437,6 +421,11 @@ export const actionTypeSchema = z.union([
|
|
|
437
421
|
z.literal('negative'),
|
|
438
422
|
]);
|
|
439
423
|
|
|
424
|
+
export const dismissBehaviorSchema = z.object({
|
|
425
|
+
type: z.literal('dismiss'),
|
|
426
|
+
analytics: z.record(z.string()).optional(),
|
|
427
|
+
});
|
|
428
|
+
|
|
440
429
|
export const navigationStackBehaviorSchema = z.union([
|
|
441
430
|
z.literal('default'),
|
|
442
431
|
z.literal('remove-previous'),
|
|
@@ -444,17 +433,6 @@ export const navigationStackBehaviorSchema = z.union([
|
|
|
444
433
|
z.literal('replace-current'),
|
|
445
434
|
]);
|
|
446
435
|
|
|
447
|
-
export const suggestionsValueSchema = z.object({
|
|
448
|
-
label: z.string(),
|
|
449
|
-
value: jsonElementSchema,
|
|
450
|
-
icon: iconSchema.optional(),
|
|
451
|
-
image: imageSchema.optional(),
|
|
452
|
-
tag: z.string().optional(),
|
|
453
|
-
media: mediaSchema.optional(),
|
|
454
|
-
analyticsId: z.string().optional(),
|
|
455
|
-
tags: z.array(z.string()).optional(),
|
|
456
|
-
});
|
|
457
|
-
|
|
458
436
|
export const actionSchema = z.object({
|
|
459
437
|
title: z.string().optional(),
|
|
460
438
|
type: actionTypeSchema.optional(),
|
|
@@ -472,92 +450,120 @@ export const actionSchema = z.object({
|
|
|
472
450
|
prefetch: z.boolean().optional(),
|
|
473
451
|
});
|
|
474
452
|
|
|
475
|
-
export const containerBehaviorSchema = z.object({
|
|
476
|
-
action: actionSchema.optional(),
|
|
477
|
-
link: linkSchema.optional(),
|
|
478
|
-
});
|
|
479
|
-
|
|
480
453
|
export const actionBehaviorSchema = z.object({
|
|
481
454
|
type: z.literal('action'),
|
|
482
455
|
action: actionSchema,
|
|
456
|
+
analytics: z.record(z.string()).optional(),
|
|
483
457
|
});
|
|
484
458
|
|
|
485
|
-
export const
|
|
486
|
-
|
|
487
|
-
|
|
459
|
+
export const navigationBackBehaviorSchema = z.object({
|
|
460
|
+
title: z.string().optional(),
|
|
461
|
+
action: actionSchema,
|
|
488
462
|
});
|
|
489
463
|
|
|
490
|
-
export const
|
|
491
|
-
|
|
464
|
+
export const externalSchema = z.object({
|
|
465
|
+
url: z.string(),
|
|
492
466
|
});
|
|
493
467
|
|
|
494
|
-
export const
|
|
495
|
-
type: z.literal('
|
|
496
|
-
|
|
468
|
+
export const downloadBehaviorSchema = z.object({
|
|
469
|
+
type: z.literal('download'),
|
|
470
|
+
request: requestSchema,
|
|
471
|
+
analytics: z.record(z.string()).optional(),
|
|
497
472
|
});
|
|
498
473
|
|
|
499
474
|
export const refreshBehaviorSchema = z.object({
|
|
500
475
|
type: z.literal('refresh'),
|
|
476
|
+
analytics: z.record(z.string()).optional(),
|
|
501
477
|
});
|
|
502
478
|
|
|
503
|
-
export const
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
defaultImage: imageSchema.optional(),
|
|
508
|
-
providesTitle: z.boolean().optional(),
|
|
509
|
-
providesDescription: z.boolean().optional(),
|
|
510
|
-
providesIcon: z.boolean().optional(),
|
|
511
|
-
providesImage: z.boolean().optional(),
|
|
512
|
-
defaultMedia: mediaSchema.optional(),
|
|
513
|
-
providesMedia: z.boolean().optional(),
|
|
479
|
+
export const copyBehaviorSchema = z.object({
|
|
480
|
+
type: z.literal('copy'),
|
|
481
|
+
content: z.string(),
|
|
482
|
+
analytics: z.record(z.string()).optional(),
|
|
514
483
|
});
|
|
515
484
|
|
|
516
|
-
export const
|
|
517
|
-
|
|
518
|
-
|
|
485
|
+
export const containerBehaviorSchema = z.object({
|
|
486
|
+
action: actionSchema.optional(),
|
|
487
|
+
link: linkSchema.optional(),
|
|
488
|
+
analytics: z.record(z.string()).optional(),
|
|
519
489
|
});
|
|
520
490
|
|
|
521
|
-
export const
|
|
522
|
-
type: z.literal('
|
|
523
|
-
|
|
524
|
-
|
|
491
|
+
export const linkBehaviorSchema = z.object({
|
|
492
|
+
type: z.literal('link'),
|
|
493
|
+
url: z.string(),
|
|
494
|
+
analytics: z.record(z.string()).optional(),
|
|
525
495
|
});
|
|
526
496
|
|
|
527
|
-
export const
|
|
528
|
-
|
|
497
|
+
export const iconTextSchema = z.object({
|
|
498
|
+
text: z.string(),
|
|
529
499
|
});
|
|
530
500
|
|
|
531
|
-
export const
|
|
532
|
-
|
|
501
|
+
export const iconNamedSchema = z.object({
|
|
502
|
+
name: z.string(),
|
|
533
503
|
});
|
|
534
504
|
|
|
535
|
-
export const
|
|
505
|
+
export const avatarTextContentSchema = z.object({
|
|
506
|
+
type: z.literal('text'),
|
|
507
|
+
text: z.string(),
|
|
508
|
+
badgeUri: z.string().optional(),
|
|
509
|
+
});
|
|
536
510
|
|
|
537
|
-
export const
|
|
538
|
-
type: z.literal('
|
|
539
|
-
|
|
540
|
-
|
|
511
|
+
export const avatarUriContentSchema = z.object({
|
|
512
|
+
type: z.literal('uri'),
|
|
513
|
+
uri: z.string(),
|
|
514
|
+
badgeUri: z.string().optional(),
|
|
541
515
|
});
|
|
542
516
|
|
|
543
|
-
export const
|
|
517
|
+
export const avatarContentSchema = z.union([avatarTextContentSchema, avatarUriContentSchema]);
|
|
544
518
|
|
|
545
|
-
export const
|
|
546
|
-
|
|
547
|
-
|
|
519
|
+
export const mediaAvatarSchema = z.object({
|
|
520
|
+
type: z.literal('avatar'),
|
|
521
|
+
content: z.array(avatarContentSchema),
|
|
522
|
+
accessibilityDescription: z.string().optional(),
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
export const mediaImageSchema = z.object({
|
|
526
|
+
type: z.literal('image'),
|
|
527
|
+
uri: z.string(),
|
|
528
|
+
accessibilityDescription: z.string().optional(),
|
|
548
529
|
});
|
|
549
530
|
|
|
531
|
+
export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
532
|
+
|
|
550
533
|
export const navigationSchema = z.object({
|
|
551
534
|
backButton: navigationBackBehaviorSchema.optional(),
|
|
552
535
|
back: navigationBackBehaviorSchema.optional(),
|
|
553
536
|
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
554
537
|
});
|
|
555
538
|
|
|
556
|
-
export const
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
539
|
+
export const mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
|
|
540
|
+
|
|
541
|
+
export const summarySummariserSchema = z.object({
|
|
542
|
+
defaultTitle: z.string().optional(),
|
|
543
|
+
defaultDescription: z.string().optional(),
|
|
544
|
+
defaultIcon: iconSchema.optional(),
|
|
545
|
+
defaultImage: imageSchema.optional(),
|
|
546
|
+
providesTitle: z.boolean().optional(),
|
|
547
|
+
providesDescription: z.boolean().optional(),
|
|
548
|
+
providesIcon: z.boolean().optional(),
|
|
549
|
+
providesImage: z.boolean().optional(),
|
|
550
|
+
defaultMedia: mediaSchema.optional(),
|
|
551
|
+
providesMedia: z.boolean().optional(),
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
export const mediaLayoutSchema = z.object({
|
|
555
|
+
type: z.literal('media'),
|
|
556
|
+
media: mediaSchema,
|
|
557
|
+
align: alignSchema.optional(),
|
|
558
|
+
size: sizeSchema.optional(),
|
|
559
|
+
analyticsId: z.string().optional(),
|
|
560
|
+
control: z.string().optional(),
|
|
561
|
+
margin: sizeSchema.optional(),
|
|
562
|
+
tags: z.array(z.string()).optional(),
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
export const actionResponseBodySchema = z.object({
|
|
566
|
+
action: actionSchema,
|
|
561
567
|
});
|
|
562
568
|
|
|
563
569
|
export const searchResultActionSchema = z.object({
|
|
@@ -582,30 +588,32 @@ export const searchResultSearchSchema = z.object({
|
|
|
582
588
|
|
|
583
589
|
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
584
590
|
|
|
585
|
-
export const searchResponseBodySchema = z.object({
|
|
586
|
-
type: z.literal('results').optional(),
|
|
587
|
-
results: z.array(searchResultSchema),
|
|
588
|
-
});
|
|
589
|
-
|
|
590
591
|
export const searchResultsResponseBodySchema = z.object({
|
|
591
592
|
type: z.literal('results'),
|
|
592
593
|
results: z.array(searchResultSchema),
|
|
593
594
|
});
|
|
594
595
|
|
|
595
|
-
export const
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
596
|
+
export const suggestionsValueSchema = z.object({
|
|
597
|
+
label: z.string(),
|
|
598
|
+
value: jsonElementSchema,
|
|
599
|
+
icon: iconSchema.optional(),
|
|
600
|
+
image: imageSchema.optional(),
|
|
601
|
+
tag: z.string().optional(),
|
|
602
|
+
media: mediaSchema.optional(),
|
|
603
|
+
analyticsId: z.string().optional(),
|
|
604
|
+
tags: z.array(z.string()).optional(),
|
|
599
605
|
});
|
|
600
606
|
|
|
601
|
-
export const
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
validation: jsonElementSchema.optional(),
|
|
606
|
-
refreshUrl: z.string().optional(),
|
|
607
|
+
export const dynamicLaunchConfigSchema = z.object({
|
|
608
|
+
type: z.literal('dynamic'),
|
|
609
|
+
request: requestSchema,
|
|
610
|
+
presentation: presentationSchema,
|
|
607
611
|
});
|
|
608
612
|
|
|
613
|
+
export const launchConfigSchema = z.union([dynamicLaunchConfigSchema, nativeLaunchConfigSchema]);
|
|
614
|
+
|
|
615
|
+
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
616
|
+
|
|
609
617
|
export const suggestionsSchema = z.object({
|
|
610
618
|
values: z.array(suggestionsValueSchema),
|
|
611
619
|
});
|
|
@@ -615,121 +623,38 @@ export const searchInitialResultsConfigSchema = z.object({
|
|
|
615
623
|
results: z.array(searchResultSchema),
|
|
616
624
|
});
|
|
617
625
|
|
|
618
|
-
export const
|
|
619
|
-
z.
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
}),
|
|
623
|
-
);
|
|
624
|
-
|
|
625
|
-
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
626
|
-
z.union([
|
|
627
|
-
alertLayoutSchema,
|
|
628
|
-
boxLayoutSchema,
|
|
629
|
-
buttonLayoutSchema,
|
|
630
|
-
columnsLayoutSchema,
|
|
631
|
-
decisionLayoutSchema,
|
|
632
|
-
dividerLayoutSchema,
|
|
633
|
-
formLayoutSchema,
|
|
634
|
-
headingLayoutSchema,
|
|
635
|
-
imageLayoutSchema,
|
|
636
|
-
infoLayoutSchema,
|
|
637
|
-
instructionsLayoutSchema,
|
|
638
|
-
listLayoutSchema,
|
|
639
|
-
loadingIndicatorLayoutSchema,
|
|
640
|
-
markdownLayoutSchema,
|
|
641
|
-
mediaLayoutSchema,
|
|
642
|
-
modalLayoutSchema,
|
|
643
|
-
paragraphLayoutSchema,
|
|
644
|
-
progressLayoutSchema,
|
|
645
|
-
reviewLayoutSchema,
|
|
646
|
-
searchLayoutSchema,
|
|
647
|
-
sectionLayoutSchema,
|
|
648
|
-
statusListLayoutSchema,
|
|
649
|
-
tabsLayoutSchema,
|
|
650
|
-
upsellLayoutSchema,
|
|
651
|
-
]),
|
|
652
|
-
);
|
|
653
|
-
|
|
654
|
-
export const searchInitialStateSchema: z.ZodSchema<SearchInitialState> = z.lazy(() =>
|
|
655
|
-
z.union([searchInitialLayoutConfigSchema, searchInitialResultsConfigSchema]),
|
|
656
|
-
);
|
|
657
|
-
|
|
658
|
-
export const searchInitialLayoutConfigSchema: z.ZodSchema<SearchInitialLayoutConfig> = z.lazy(() =>
|
|
659
|
-
z.object({
|
|
660
|
-
type: z.literal('layout'),
|
|
661
|
-
content: z.array(layoutSchema),
|
|
662
|
-
}),
|
|
663
|
-
);
|
|
664
|
-
|
|
665
|
-
export const searchLayoutResponseBodySchema: z.ZodSchema<SearchLayoutResponseBody> = z.lazy(() =>
|
|
666
|
-
z.object({
|
|
667
|
-
type: z.literal('layout'),
|
|
668
|
-
content: z.array(layoutSchema),
|
|
669
|
-
}),
|
|
670
|
-
);
|
|
671
|
-
|
|
672
|
-
export const searchResponseSchema: z.ZodSchema<SearchResponse> = z.lazy(() =>
|
|
673
|
-
z.union([searchLayoutResponseBodySchema, searchResultsResponseBodySchema]),
|
|
674
|
-
);
|
|
675
|
-
|
|
676
|
-
export const subflowResponseBodySchema: z.ZodSchema<SubflowResponseBody> = z.lazy(() =>
|
|
677
|
-
z.object({
|
|
678
|
-
referrerId: z.string(),
|
|
679
|
-
launchConfig: launchConfigSchema,
|
|
680
|
-
resultKey: z.string().optional(),
|
|
681
|
-
onCompletion: behaviorSchema.optional(),
|
|
682
|
-
onError: behaviorSchema.optional(),
|
|
683
|
-
}),
|
|
684
|
-
);
|
|
685
|
-
|
|
686
|
-
export const behaviorSchema: z.ZodSchema<Behavior> = z.lazy(() =>
|
|
687
|
-
z.union([
|
|
688
|
-
actionBehaviorSchema,
|
|
689
|
-
containerBehaviorSchema,
|
|
690
|
-
copyBehaviorSchema,
|
|
691
|
-
dismissBehaviorSchema,
|
|
692
|
-
linkBehaviorSchema,
|
|
693
|
-
modalBehaviorSchema,
|
|
694
|
-
refreshBehaviorSchema,
|
|
695
|
-
subflowBehaviorSchema,
|
|
696
|
-
]),
|
|
697
|
-
);
|
|
626
|
+
export const searchResponseBodySchema = z.object({
|
|
627
|
+
type: z.literal('results').optional(),
|
|
628
|
+
results: z.array(searchResultSchema),
|
|
629
|
+
});
|
|
698
630
|
|
|
699
|
-
export const
|
|
631
|
+
export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
700
632
|
z.object({
|
|
701
|
-
|
|
633
|
+
type: z.literal('object'),
|
|
634
|
+
disabled: z.boolean().optional(),
|
|
702
635
|
promoted: z.boolean().optional(),
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
oneOf: z.array(schemaSchema),
|
|
708
|
-
placeholder: z.string().optional(),
|
|
636
|
+
help: helpSchema.optional(),
|
|
637
|
+
properties: z.record(schemaSchema),
|
|
638
|
+
displayOrder: z.array(z.string()),
|
|
639
|
+
required: z.array(z.string()).optional(),
|
|
709
640
|
$id: z.string().optional(),
|
|
710
641
|
title: z.string().optional(),
|
|
711
642
|
description: z.string().optional(),
|
|
712
643
|
control: z.string().optional(),
|
|
713
|
-
default: jsonElementSchema.optional(),
|
|
714
644
|
hidden: z.boolean().optional(),
|
|
715
645
|
icon: iconSchema.optional(),
|
|
716
646
|
image: imageSchema.optional(),
|
|
717
647
|
keywords: z.array(z.string()).optional(),
|
|
718
648
|
summary: summaryProviderSchema.optional(),
|
|
719
649
|
analyticsId: z.string().optional(),
|
|
720
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
721
650
|
alert: alertLayoutSchema.optional(),
|
|
722
|
-
help: helpSchema.optional(),
|
|
723
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
724
|
-
autofillKey: z.string().optional(),
|
|
725
|
-
validationMessages: z.record(z.string()).optional(),
|
|
726
|
-
disabled: z.boolean().optional(),
|
|
727
|
-
onChange: behaviorSchema.optional(),
|
|
728
651
|
media: mediaSchema.optional(),
|
|
729
652
|
tags: z.array(z.string()).optional(),
|
|
653
|
+
format: z.string().optional(),
|
|
730
654
|
additionalText: z.string().optional(),
|
|
731
655
|
supportingValues: supportingValuesSchema.optional(),
|
|
732
656
|
inlineAlert: inlineAlertSchema.optional(),
|
|
657
|
+
onChange: behaviorSchema.optional(),
|
|
733
658
|
}),
|
|
734
659
|
);
|
|
735
660
|
|
|
@@ -761,24 +686,52 @@ export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
|
|
|
761
686
|
}),
|
|
762
687
|
);
|
|
763
688
|
|
|
764
|
-
export const
|
|
689
|
+
export const behaviorSchema: z.ZodSchema<Behavior> = z.lazy(() =>
|
|
690
|
+
z.union([
|
|
691
|
+
actionBehaviorSchema,
|
|
692
|
+
containerBehaviorSchema,
|
|
693
|
+
copyBehaviorSchema,
|
|
694
|
+
dismissBehaviorSchema,
|
|
695
|
+
downloadBehaviorSchema,
|
|
696
|
+
linkBehaviorSchema,
|
|
697
|
+
modalBehaviorSchema,
|
|
698
|
+
refreshBehaviorSchema,
|
|
699
|
+
subflowBehaviorSchema,
|
|
700
|
+
]),
|
|
701
|
+
);
|
|
702
|
+
|
|
703
|
+
export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
765
704
|
z.object({
|
|
766
|
-
type: z.literal('
|
|
705
|
+
type: z.literal('integer'),
|
|
706
|
+
autofillProvider: z.string().optional(),
|
|
767
707
|
promoted: z.boolean().optional(),
|
|
708
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
709
|
+
refreshUrl: z.string().optional(),
|
|
710
|
+
refreshFormUrl: z.string().optional(),
|
|
711
|
+
placeholder: z.string().optional(),
|
|
712
|
+
minimum: z.number().optional(),
|
|
713
|
+
maximum: z.number().optional(),
|
|
768
714
|
$id: z.string().optional(),
|
|
769
|
-
items: z.array(schemaSchema),
|
|
770
715
|
title: z.string().optional(),
|
|
771
716
|
description: z.string().optional(),
|
|
772
717
|
control: z.string().optional(),
|
|
718
|
+
default: z.number().optional(),
|
|
773
719
|
hidden: z.boolean().optional(),
|
|
720
|
+
disabled: z.boolean().optional(),
|
|
774
721
|
icon: iconSchema.optional(),
|
|
775
722
|
image: imageSchema.optional(),
|
|
776
723
|
keywords: z.array(z.string()).optional(),
|
|
777
724
|
summary: summaryProviderSchema.optional(),
|
|
778
725
|
analyticsId: z.string().optional(),
|
|
779
726
|
persistAsync: persistAsyncSchema.optional(),
|
|
727
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
780
728
|
validationAsync: validateAsyncSchema.optional(),
|
|
729
|
+
validationMessages: z.record(z.string()).optional(),
|
|
781
730
|
alert: alertLayoutSchema.optional(),
|
|
731
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
732
|
+
autofillKey: z.string().optional(),
|
|
733
|
+
help: helpSchema.optional(),
|
|
734
|
+
onChange: behaviorSchema.optional(),
|
|
782
735
|
media: mediaSchema.optional(),
|
|
783
736
|
tags: z.array(z.string()).optional(),
|
|
784
737
|
additionalText: z.string().optional(),
|
|
@@ -797,22 +750,64 @@ export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
|
|
|
797
750
|
}),
|
|
798
751
|
);
|
|
799
752
|
|
|
800
|
-
export const
|
|
753
|
+
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
801
754
|
z.object({
|
|
802
|
-
type: z.literal('
|
|
755
|
+
type: z.literal('boolean'),
|
|
756
|
+
autofillProvider: z.string().optional(),
|
|
757
|
+
promoted: z.boolean().optional(),
|
|
758
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
759
|
+
refreshUrl: z.string().optional(),
|
|
760
|
+
refreshFormUrl: z.string().optional(),
|
|
761
|
+
$id: z.string().optional(),
|
|
762
|
+
title: z.string().optional(),
|
|
763
|
+
description: z.string().optional(),
|
|
764
|
+
control: z.string().optional(),
|
|
765
|
+
default: z.boolean().optional(),
|
|
766
|
+
hidden: z.boolean().optional(),
|
|
767
|
+
disabled: z.boolean().optional(),
|
|
768
|
+
icon: iconSchema.optional(),
|
|
769
|
+
image: imageSchema.optional(),
|
|
770
|
+
keywords: z.array(z.string()).optional(),
|
|
771
|
+
summary: summaryProviderSchema.optional(),
|
|
772
|
+
analyticsId: z.string().optional(),
|
|
773
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
774
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
775
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
776
|
+
alert: alertLayoutSchema.optional(),
|
|
777
|
+
autofillKey: z.string().optional(),
|
|
778
|
+
help: helpSchema.optional(),
|
|
779
|
+
onChange: behaviorSchema.optional(),
|
|
780
|
+
media: mediaSchema.optional(),
|
|
781
|
+
tags: z.array(z.string()).optional(),
|
|
782
|
+
additionalText: z.string().optional(),
|
|
783
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
784
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
785
|
+
}),
|
|
786
|
+
);
|
|
787
|
+
|
|
788
|
+
export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
789
|
+
z.object({
|
|
790
|
+
type: z.literal('string'),
|
|
803
791
|
autofillProvider: z.string().optional(),
|
|
804
792
|
promoted: z.boolean().optional(),
|
|
805
793
|
refreshFormOnChange: z.boolean().optional(),
|
|
806
794
|
refreshUrl: z.string().optional(),
|
|
807
795
|
refreshFormUrl: z.string().optional(),
|
|
796
|
+
format: stringSchemaFormatSchema.optional(),
|
|
797
|
+
displayFormat: z.string().optional(),
|
|
808
798
|
placeholder: z.string().optional(),
|
|
809
|
-
|
|
810
|
-
|
|
799
|
+
minLength: z.number().optional(),
|
|
800
|
+
maxLength: z.number().optional(),
|
|
801
|
+
minimum: z.string().optional(),
|
|
802
|
+
maximum: z.string().optional(),
|
|
803
|
+
pattern: z.string().optional(),
|
|
804
|
+
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
805
|
+
autocorrect: z.boolean().optional(),
|
|
811
806
|
$id: z.string().optional(),
|
|
812
807
|
title: z.string().optional(),
|
|
813
808
|
description: z.string().optional(),
|
|
814
809
|
control: z.string().optional(),
|
|
815
|
-
default: z.
|
|
810
|
+
default: z.string().optional(),
|
|
816
811
|
hidden: z.boolean().optional(),
|
|
817
812
|
disabled: z.boolean().optional(),
|
|
818
813
|
icon: iconSchema.optional(),
|
|
@@ -825,9 +820,14 @@ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
|
825
820
|
validationAsync: validateAsyncSchema.optional(),
|
|
826
821
|
validationMessages: z.record(z.string()).optional(),
|
|
827
822
|
alert: alertLayoutSchema.optional(),
|
|
823
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
824
|
+
accepts: z.array(z.string()).optional(),
|
|
825
|
+
maxSize: z.number().optional(),
|
|
826
|
+
source: uploadSourceSchema.optional(),
|
|
828
827
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
829
828
|
autofillKey: z.string().optional(),
|
|
830
829
|
help: helpSchema.optional(),
|
|
830
|
+
suggestions: suggestionsSchema.optional(),
|
|
831
831
|
onChange: behaviorSchema.optional(),
|
|
832
832
|
media: mediaSchema.optional(),
|
|
833
833
|
tags: z.array(z.string()).optional(),
|
|
@@ -837,12 +837,12 @@ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
|
837
837
|
}),
|
|
838
838
|
);
|
|
839
839
|
|
|
840
|
-
export const
|
|
840
|
+
export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
|
|
841
841
|
z.object({
|
|
842
|
-
|
|
842
|
+
type: z.literal('array'),
|
|
843
843
|
promoted: z.boolean().optional(),
|
|
844
|
-
allOf: z.array(schemaSchema),
|
|
845
844
|
$id: z.string().optional(),
|
|
845
|
+
items: z.array(schemaSchema),
|
|
846
846
|
title: z.string().optional(),
|
|
847
847
|
description: z.string().optional(),
|
|
848
848
|
control: z.string().optional(),
|
|
@@ -852,6 +852,8 @@ export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
|
852
852
|
keywords: z.array(z.string()).optional(),
|
|
853
853
|
summary: summaryProviderSchema.optional(),
|
|
854
854
|
analyticsId: z.string().optional(),
|
|
855
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
856
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
855
857
|
alert: alertLayoutSchema.optional(),
|
|
856
858
|
media: mediaSchema.optional(),
|
|
857
859
|
tags: z.array(z.string()).optional(),
|
|
@@ -861,19 +863,22 @@ export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
|
861
863
|
}),
|
|
862
864
|
);
|
|
863
865
|
|
|
864
|
-
export const
|
|
866
|
+
export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
865
867
|
z.object({
|
|
866
|
-
type: z.literal('
|
|
868
|
+
type: z.literal('number'),
|
|
867
869
|
autofillProvider: z.string().optional(),
|
|
868
870
|
promoted: z.boolean().optional(),
|
|
869
871
|
refreshFormOnChange: z.boolean().optional(),
|
|
870
872
|
refreshUrl: z.string().optional(),
|
|
871
873
|
refreshFormUrl: z.string().optional(),
|
|
874
|
+
placeholder: z.string().optional(),
|
|
875
|
+
minimum: z.number().optional(),
|
|
876
|
+
maximum: z.number().optional(),
|
|
872
877
|
$id: z.string().optional(),
|
|
873
878
|
title: z.string().optional(),
|
|
874
879
|
description: z.string().optional(),
|
|
875
880
|
control: z.string().optional(),
|
|
876
|
-
default: z.
|
|
881
|
+
default: z.number().optional(),
|
|
877
882
|
hidden: z.boolean().optional(),
|
|
878
883
|
disabled: z.boolean().optional(),
|
|
879
884
|
icon: iconSchema.optional(),
|
|
@@ -884,7 +889,9 @@ export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
|
884
889
|
persistAsync: persistAsyncSchema.optional(),
|
|
885
890
|
refreshStepOnChange: z.boolean().optional(),
|
|
886
891
|
validationAsync: validateAsyncSchema.optional(),
|
|
892
|
+
validationMessages: z.record(z.string()).optional(),
|
|
887
893
|
alert: alertLayoutSchema.optional(),
|
|
894
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
888
895
|
autofillKey: z.string().optional(),
|
|
889
896
|
help: helpSchema.optional(),
|
|
890
897
|
onChange: behaviorSchema.optional(),
|
|
@@ -896,50 +903,35 @@ export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
|
896
903
|
}),
|
|
897
904
|
);
|
|
898
905
|
|
|
899
|
-
export const
|
|
906
|
+
export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
|
|
907
|
+
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
908
|
+
);
|
|
909
|
+
|
|
910
|
+
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
900
911
|
z.object({
|
|
901
|
-
type: z.literal('
|
|
902
|
-
autofillProvider: z.string().optional(),
|
|
912
|
+
type: z.literal('array'),
|
|
903
913
|
promoted: z.boolean().optional(),
|
|
904
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
905
|
-
refreshUrl: z.string().optional(),
|
|
906
|
-
refreshFormUrl: z.string().optional(),
|
|
907
|
-
format: stringSchemaFormatSchema.optional(),
|
|
908
|
-
displayFormat: z.string().optional(),
|
|
909
|
-
placeholder: z.string().optional(),
|
|
910
|
-
minLength: z.number().optional(),
|
|
911
|
-
maxLength: z.number().optional(),
|
|
912
|
-
minimum: z.string().optional(),
|
|
913
|
-
maximum: z.string().optional(),
|
|
914
|
-
pattern: z.string().optional(),
|
|
915
|
-
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
916
|
-
autocorrect: z.boolean().optional(),
|
|
917
914
|
$id: z.string().optional(),
|
|
915
|
+
items: schemaSchema,
|
|
916
|
+
addItemTitle: z.string(),
|
|
917
|
+
editItemTitle: z.string(),
|
|
918
|
+
minItems: z.number().optional(),
|
|
919
|
+
maxItems: z.number().optional(),
|
|
920
|
+
placeholder: z.string().optional(),
|
|
918
921
|
title: z.string().optional(),
|
|
919
922
|
description: z.string().optional(),
|
|
920
923
|
control: z.string().optional(),
|
|
921
|
-
default: z.string().optional(),
|
|
922
924
|
hidden: z.boolean().optional(),
|
|
923
|
-
disabled: z.boolean().optional(),
|
|
924
925
|
icon: iconSchema.optional(),
|
|
925
926
|
image: imageSchema.optional(),
|
|
926
927
|
keywords: z.array(z.string()).optional(),
|
|
927
|
-
summary:
|
|
928
|
+
summary: summarySummariserSchema.optional(),
|
|
928
929
|
analyticsId: z.string().optional(),
|
|
929
930
|
persistAsync: persistAsyncSchema.optional(),
|
|
930
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
931
931
|
validationAsync: validateAsyncSchema.optional(),
|
|
932
|
-
validationMessages: z.record(z.string()).optional(),
|
|
933
932
|
alert: alertLayoutSchema.optional(),
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
maxSize: z.number().optional(),
|
|
937
|
-
source: uploadSourceSchema.optional(),
|
|
938
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
939
|
-
autofillKey: z.string().optional(),
|
|
940
|
-
help: helpSchema.optional(),
|
|
941
|
-
suggestions: suggestionsSchema.optional(),
|
|
942
|
-
onChange: behaviorSchema.optional(),
|
|
933
|
+
validationMessages: z.record(z.string()).optional(),
|
|
934
|
+
disabled: z.boolean().optional(),
|
|
943
935
|
media: mediaSchema.optional(),
|
|
944
936
|
tags: z.array(z.string()).optional(),
|
|
945
937
|
additionalText: z.string().optional(),
|
|
@@ -948,10 +940,6 @@ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
|
948
940
|
}),
|
|
949
941
|
);
|
|
950
942
|
|
|
951
|
-
export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
|
|
952
|
-
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
953
|
-
);
|
|
954
|
-
|
|
955
943
|
export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
|
|
956
944
|
z.object({
|
|
957
945
|
type: z.literal('blob'),
|
|
@@ -982,24 +970,23 @@ export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
|
|
|
982
970
|
}),
|
|
983
971
|
);
|
|
984
972
|
|
|
985
|
-
export const
|
|
973
|
+
export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
986
974
|
z.object({
|
|
987
|
-
|
|
988
|
-
control: z.string().optional(),
|
|
975
|
+
disabled: z.boolean().optional(),
|
|
989
976
|
promoted: z.boolean().optional(),
|
|
977
|
+
allOf: z.array(schemaSchema),
|
|
990
978
|
$id: z.string().optional(),
|
|
991
|
-
const: jsonElementSchema,
|
|
992
979
|
title: z.string().optional(),
|
|
993
980
|
description: z.string().optional(),
|
|
981
|
+
control: z.string().optional(),
|
|
982
|
+
hidden: z.boolean().optional(),
|
|
994
983
|
icon: iconSchema.optional(),
|
|
995
984
|
image: imageSchema.optional(),
|
|
996
985
|
keywords: z.array(z.string()).optional(),
|
|
997
986
|
summary: summaryProviderSchema.optional(),
|
|
998
987
|
analyticsId: z.string().optional(),
|
|
999
|
-
disabled: z.boolean().optional(),
|
|
1000
|
-
media: mediaSchema.optional(),
|
|
1001
988
|
alert: alertLayoutSchema.optional(),
|
|
1002
|
-
|
|
989
|
+
media: mediaSchema.optional(),
|
|
1003
990
|
tags: z.array(z.string()).optional(),
|
|
1004
991
|
additionalText: z.string().optional(),
|
|
1005
992
|
supportingValues: supportingValuesSchema.optional(),
|
|
@@ -1007,37 +994,34 @@ export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
|
|
|
1007
994
|
}),
|
|
1008
995
|
);
|
|
1009
996
|
|
|
1010
|
-
export const
|
|
997
|
+
export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
|
|
1011
998
|
z.object({
|
|
1012
|
-
type: z.literal('integer'),
|
|
1013
999
|
autofillProvider: z.string().optional(),
|
|
1014
1000
|
promoted: z.boolean().optional(),
|
|
1015
1001
|
refreshFormOnChange: z.boolean().optional(),
|
|
1016
1002
|
refreshUrl: z.string().optional(),
|
|
1017
1003
|
refreshFormUrl: z.string().optional(),
|
|
1004
|
+
promotion: jsonElementSchema.optional(),
|
|
1005
|
+
oneOf: z.array(schemaSchema),
|
|
1018
1006
|
placeholder: z.string().optional(),
|
|
1019
|
-
minimum: z.number().optional(),
|
|
1020
|
-
maximum: z.number().optional(),
|
|
1021
1007
|
$id: z.string().optional(),
|
|
1022
1008
|
title: z.string().optional(),
|
|
1023
1009
|
description: z.string().optional(),
|
|
1024
1010
|
control: z.string().optional(),
|
|
1025
|
-
default:
|
|
1011
|
+
default: jsonElementSchema.optional(),
|
|
1026
1012
|
hidden: z.boolean().optional(),
|
|
1027
|
-
disabled: z.boolean().optional(),
|
|
1028
1013
|
icon: iconSchema.optional(),
|
|
1029
1014
|
image: imageSchema.optional(),
|
|
1030
1015
|
keywords: z.array(z.string()).optional(),
|
|
1031
1016
|
summary: summaryProviderSchema.optional(),
|
|
1032
1017
|
analyticsId: z.string().optional(),
|
|
1033
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1034
1018
|
refreshStepOnChange: z.boolean().optional(),
|
|
1035
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1036
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1037
1019
|
alert: alertLayoutSchema.optional(),
|
|
1020
|
+
help: helpSchema.optional(),
|
|
1038
1021
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1039
1022
|
autofillKey: z.string().optional(),
|
|
1040
|
-
|
|
1023
|
+
validationMessages: z.record(z.string()).optional(),
|
|
1024
|
+
disabled: z.boolean().optional(),
|
|
1041
1025
|
onChange: behaviorSchema.optional(),
|
|
1042
1026
|
media: mediaSchema.optional(),
|
|
1043
1027
|
tags: z.array(z.string()).optional(),
|
|
@@ -1047,66 +1031,75 @@ export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
|
1047
1031
|
}),
|
|
1048
1032
|
);
|
|
1049
1033
|
|
|
1050
|
-
export const
|
|
1034
|
+
export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
|
|
1051
1035
|
z.object({
|
|
1052
|
-
|
|
1053
|
-
|
|
1036
|
+
hidden: z.boolean().optional(),
|
|
1037
|
+
control: z.string().optional(),
|
|
1054
1038
|
promoted: z.boolean().optional(),
|
|
1055
|
-
help: helpSchema.optional(),
|
|
1056
|
-
properties: z.record(schemaSchema),
|
|
1057
|
-
displayOrder: z.array(z.string()),
|
|
1058
|
-
required: z.array(z.string()).optional(),
|
|
1059
1039
|
$id: z.string().optional(),
|
|
1040
|
+
const: jsonElementSchema,
|
|
1060
1041
|
title: z.string().optional(),
|
|
1061
1042
|
description: z.string().optional(),
|
|
1062
|
-
control: z.string().optional(),
|
|
1063
|
-
hidden: z.boolean().optional(),
|
|
1064
1043
|
icon: iconSchema.optional(),
|
|
1065
1044
|
image: imageSchema.optional(),
|
|
1066
1045
|
keywords: z.array(z.string()).optional(),
|
|
1067
1046
|
summary: summaryProviderSchema.optional(),
|
|
1068
1047
|
analyticsId: z.string().optional(),
|
|
1069
|
-
|
|
1048
|
+
disabled: z.boolean().optional(),
|
|
1070
1049
|
media: mediaSchema.optional(),
|
|
1050
|
+
alert: alertLayoutSchema.optional(),
|
|
1051
|
+
layout: z.array(layoutSchema).optional(),
|
|
1071
1052
|
tags: z.array(z.string()).optional(),
|
|
1072
|
-
format: z.string().optional(),
|
|
1073
1053
|
additionalText: z.string().optional(),
|
|
1074
1054
|
supportingValues: supportingValuesSchema.optional(),
|
|
1075
1055
|
inlineAlert: inlineAlertSchema.optional(),
|
|
1076
|
-
onChange: behaviorSchema.optional(),
|
|
1077
1056
|
}),
|
|
1078
1057
|
);
|
|
1079
1058
|
|
|
1080
|
-
export const
|
|
1059
|
+
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
1060
|
+
z.union([
|
|
1061
|
+
alertLayoutSchema,
|
|
1062
|
+
boxLayoutSchema,
|
|
1063
|
+
buttonLayoutSchema,
|
|
1064
|
+
columnsLayoutSchema,
|
|
1065
|
+
decisionLayoutSchema,
|
|
1066
|
+
dividerLayoutSchema,
|
|
1067
|
+
formLayoutSchema,
|
|
1068
|
+
headingLayoutSchema,
|
|
1069
|
+
imageLayoutSchema,
|
|
1070
|
+
infoLayoutSchema,
|
|
1071
|
+
instructionsLayoutSchema,
|
|
1072
|
+
listLayoutSchema,
|
|
1073
|
+
loadingIndicatorLayoutSchema,
|
|
1074
|
+
markdownLayoutSchema,
|
|
1075
|
+
mediaLayoutSchema,
|
|
1076
|
+
modalLayoutSchema,
|
|
1077
|
+
paragraphLayoutSchema,
|
|
1078
|
+
progressLayoutSchema,
|
|
1079
|
+
reviewLayoutSchema,
|
|
1080
|
+
searchLayoutSchema,
|
|
1081
|
+
sectionLayoutSchema,
|
|
1082
|
+
statusListLayoutSchema,
|
|
1083
|
+
tabsLayoutSchema,
|
|
1084
|
+
upsellLayoutSchema,
|
|
1085
|
+
]),
|
|
1086
|
+
);
|
|
1087
|
+
|
|
1088
|
+
export const reviewLayoutFieldSchema: z.ZodSchema<ReviewLayoutField> = z.lazy(() =>
|
|
1081
1089
|
z.object({
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
editItemTitle: z.string(),
|
|
1088
|
-
minItems: z.number().optional(),
|
|
1089
|
-
maxItems: z.number().optional(),
|
|
1090
|
-
placeholder: z.string().optional(),
|
|
1091
|
-
title: z.string().optional(),
|
|
1092
|
-
description: z.string().optional(),
|
|
1093
|
-
control: z.string().optional(),
|
|
1094
|
-
hidden: z.boolean().optional(),
|
|
1090
|
+
label: z.string(),
|
|
1091
|
+
value: z.string(),
|
|
1092
|
+
rawValue: z.string().optional(),
|
|
1093
|
+
help: helpSchema.optional(),
|
|
1094
|
+
tag: z.string().optional(),
|
|
1095
1095
|
icon: iconSchema.optional(),
|
|
1096
1096
|
image: imageSchema.optional(),
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
1101
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
1102
|
-
alert: alertLayoutSchema.optional(),
|
|
1103
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1104
|
-
disabled: z.boolean().optional(),
|
|
1097
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
1098
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1099
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1105
1100
|
media: mediaSchema.optional(),
|
|
1101
|
+
analyticsId: z.string().optional(),
|
|
1106
1102
|
tags: z.array(z.string()).optional(),
|
|
1107
|
-
additionalText: z.string().optional(),
|
|
1108
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
1109
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1110
1103
|
}),
|
|
1111
1104
|
);
|
|
1112
1105
|
|
|
@@ -1118,47 +1111,13 @@ export const additionalInfoSchema: z.ZodSchema<AdditionalInfo> = z.lazy(() =>
|
|
|
1118
1111
|
}),
|
|
1119
1112
|
);
|
|
1120
1113
|
|
|
1121
|
-
export const
|
|
1122
|
-
z.object({
|
|
1123
|
-
type: z.literal('box'),
|
|
1124
|
-
components: z.array(layoutSchema),
|
|
1125
|
-
width: sizeSchema.optional(),
|
|
1126
|
-
border: z.boolean().optional(),
|
|
1127
|
-
control: z.string().optional(),
|
|
1128
|
-
margin: sizeSchema.optional(),
|
|
1129
|
-
analyticsId: z.string().optional(),
|
|
1130
|
-
tags: z.array(z.string()).optional(),
|
|
1131
|
-
}),
|
|
1132
|
-
);
|
|
1133
|
-
|
|
1134
|
-
export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
|
|
1114
|
+
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
1135
1115
|
z.object({
|
|
1136
|
-
type: z.literal('button'),
|
|
1137
1116
|
action: actionSchema.optional(),
|
|
1138
|
-
|
|
1139
|
-
|
|
1117
|
+
title: z.string(),
|
|
1118
|
+
accessibilityDescription: z.string().optional(),
|
|
1140
1119
|
behavior: behaviorSchema.optional(),
|
|
1141
1120
|
context: contextSchema.optional(),
|
|
1142
|
-
disabled: z.boolean().optional(),
|
|
1143
|
-
pinOrder: z.number().optional(),
|
|
1144
|
-
control: z.string().optional(),
|
|
1145
|
-
margin: sizeSchema.optional(),
|
|
1146
|
-
analyticsId: z.string().optional(),
|
|
1147
|
-
tags: z.array(z.string()).optional(),
|
|
1148
|
-
media: mediaSchema.optional(),
|
|
1149
|
-
}),
|
|
1150
|
-
);
|
|
1151
|
-
|
|
1152
|
-
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
1153
|
-
z.object({
|
|
1154
|
-
type: z.literal('columns'),
|
|
1155
|
-
left: z.array(layoutSchema),
|
|
1156
|
-
right: z.array(layoutSchema),
|
|
1157
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
1158
|
-
control: z.string().optional(),
|
|
1159
|
-
margin: sizeSchema.optional(),
|
|
1160
|
-
analyticsId: z.string().optional(),
|
|
1161
|
-
tags: z.array(z.string()).optional(),
|
|
1162
1121
|
}),
|
|
1163
1122
|
);
|
|
1164
1123
|
|
|
@@ -1174,27 +1133,22 @@ export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
|
|
|
1174
1133
|
}),
|
|
1175
1134
|
);
|
|
1176
1135
|
|
|
1177
|
-
export const
|
|
1178
|
-
z.object({
|
|
1179
|
-
type: z.literal('list'),
|
|
1180
|
-
title: z.string().optional(),
|
|
1181
|
-
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1182
|
-
items: z.array(listLayoutItemSchema),
|
|
1183
|
-
control: z.string().optional(),
|
|
1184
|
-
margin: sizeSchema.optional(),
|
|
1185
|
-
analyticsId: z.string().optional(),
|
|
1186
|
-
tags: z.array(z.string()).optional(),
|
|
1187
|
-
}),
|
|
1188
|
-
);
|
|
1189
|
-
|
|
1190
|
-
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
1136
|
+
export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
|
|
1191
1137
|
z.object({
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1138
|
+
action: actionSchema.optional(),
|
|
1139
|
+
title: z.string(),
|
|
1140
|
+
description: z.string().optional(),
|
|
1141
|
+
disabled: z.boolean().optional(),
|
|
1142
|
+
icon: iconSchema.optional(),
|
|
1143
|
+
image: imageSchema.optional(),
|
|
1144
|
+
behavior: behaviorSchema.optional(),
|
|
1145
|
+
tag: z.string().optional(),
|
|
1146
|
+
additionalText: z.string().optional(),
|
|
1147
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1148
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1149
|
+
media: mediaSchema.optional(),
|
|
1197
1150
|
analyticsId: z.string().optional(),
|
|
1151
|
+
keywords: z.array(z.string()).optional(),
|
|
1198
1152
|
tags: z.array(z.string()).optional(),
|
|
1199
1153
|
}),
|
|
1200
1154
|
);
|
|
@@ -1214,20 +1168,26 @@ export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
|
|
|
1214
1168
|
}),
|
|
1215
1169
|
);
|
|
1216
1170
|
|
|
1217
|
-
export const
|
|
1171
|
+
export const upsellLayoutSchema: z.ZodSchema<UpsellLayout> = z.lazy(() =>
|
|
1218
1172
|
z.object({
|
|
1219
|
-
type: z.literal('
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
emptyMessage: z.string().optional(),
|
|
1173
|
+
type: z.literal('upsell'),
|
|
1174
|
+
text: z.string(),
|
|
1175
|
+
callToAction: upsellLayoutCallToActionSchema,
|
|
1176
|
+
media: mediaSchema.optional(),
|
|
1177
|
+
onDismiss: requestSchema.optional(),
|
|
1225
1178
|
control: z.string().optional(),
|
|
1226
1179
|
margin: sizeSchema.optional(),
|
|
1227
1180
|
analyticsId: z.string().optional(),
|
|
1228
1181
|
tags: z.array(z.string()).optional(),
|
|
1229
|
-
|
|
1230
|
-
|
|
1182
|
+
}),
|
|
1183
|
+
);
|
|
1184
|
+
|
|
1185
|
+
export const upsellLayoutCallToActionSchema: z.ZodSchema<UpsellLayoutCallToAction> = z.lazy(() =>
|
|
1186
|
+
z.object({
|
|
1187
|
+
title: z.string(),
|
|
1188
|
+
accessibilityDescription: z.string().optional(),
|
|
1189
|
+
behavior: behaviorSchema,
|
|
1190
|
+
context: contextSchema.optional(),
|
|
1231
1191
|
}),
|
|
1232
1192
|
);
|
|
1233
1193
|
|
|
@@ -1244,15 +1204,12 @@ export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
|
1244
1204
|
}),
|
|
1245
1205
|
);
|
|
1246
1206
|
|
|
1247
|
-
export const
|
|
1207
|
+
export const sectionLayoutCallToActionSchema: z.ZodSchema<SectionLayoutCallToAction> = z.lazy(() =>
|
|
1248
1208
|
z.object({
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
margin: sizeSchema.optional(),
|
|
1254
|
-
analyticsId: z.string().optional(),
|
|
1255
|
-
tags: z.array(z.string()).optional(),
|
|
1209
|
+
title: z.string(),
|
|
1210
|
+
accessibilityDescription: z.string().optional(),
|
|
1211
|
+
behavior: behaviorSchema,
|
|
1212
|
+
context: contextSchema.optional(),
|
|
1256
1213
|
}),
|
|
1257
1214
|
);
|
|
1258
1215
|
|
|
@@ -1267,13 +1224,22 @@ export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
|
1267
1224
|
}),
|
|
1268
1225
|
);
|
|
1269
1226
|
|
|
1270
|
-
export const
|
|
1227
|
+
export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
|
|
1271
1228
|
z.object({
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1229
|
+
title: z.string(),
|
|
1230
|
+
components: z.array(layoutSchema),
|
|
1231
|
+
tag: z.string().optional(),
|
|
1232
|
+
analyticsId: z.string().optional(),
|
|
1233
|
+
tags: z.array(z.string()).optional(),
|
|
1234
|
+
}),
|
|
1235
|
+
);
|
|
1236
|
+
|
|
1237
|
+
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
1238
|
+
z.object({
|
|
1239
|
+
type: z.literal('columns'),
|
|
1240
|
+
left: z.array(layoutSchema),
|
|
1241
|
+
right: z.array(layoutSchema),
|
|
1242
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
1277
1243
|
control: z.string().optional(),
|
|
1278
1244
|
margin: sizeSchema.optional(),
|
|
1279
1245
|
analyticsId: z.string().optional(),
|
|
@@ -1281,14 +1247,25 @@ export const upsellLayoutSchema: z.ZodSchema<UpsellLayout> = z.lazy(() =>
|
|
|
1281
1247
|
}),
|
|
1282
1248
|
);
|
|
1283
1249
|
|
|
1284
|
-
export const
|
|
1250
|
+
export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
|
|
1285
1251
|
z.object({
|
|
1252
|
+
type: z.literal('button'),
|
|
1253
|
+
action: actionSchema.optional(),
|
|
1254
|
+
size: sizeSchema.optional(),
|
|
1286
1255
|
title: z.string().optional(),
|
|
1287
|
-
|
|
1256
|
+
behavior: behaviorSchema.optional(),
|
|
1257
|
+
context: contextSchema.optional(),
|
|
1258
|
+
disabled: z.boolean().optional(),
|
|
1259
|
+
pinOrder: z.number().optional(),
|
|
1260
|
+
control: z.string().optional(),
|
|
1261
|
+
margin: sizeSchema.optional(),
|
|
1262
|
+
analyticsId: z.string().optional(),
|
|
1263
|
+
tags: z.array(z.string()).optional(),
|
|
1264
|
+
media: mediaSchema.optional(),
|
|
1288
1265
|
}),
|
|
1289
1266
|
);
|
|
1290
1267
|
|
|
1291
|
-
export const
|
|
1268
|
+
export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
|
|
1292
1269
|
z.object({
|
|
1293
1270
|
title: z.string(),
|
|
1294
1271
|
accessibilityDescription: z.string().optional(),
|
|
@@ -1297,6 +1274,18 @@ export const upsellLayoutCallToActionSchema: z.ZodSchema<UpsellLayoutCallToActio
|
|
|
1297
1274
|
}),
|
|
1298
1275
|
);
|
|
1299
1276
|
|
|
1277
|
+
export const statusListLayoutSchema: z.ZodSchema<StatusListLayout> = z.lazy(() =>
|
|
1278
|
+
z.object({
|
|
1279
|
+
type: z.literal('status-list'),
|
|
1280
|
+
items: z.array(statusListLayoutItemSchema),
|
|
1281
|
+
title: z.string().optional(),
|
|
1282
|
+
control: z.string().optional(),
|
|
1283
|
+
margin: sizeSchema.optional(),
|
|
1284
|
+
analyticsId: z.string().optional(),
|
|
1285
|
+
tags: z.array(z.string()).optional(),
|
|
1286
|
+
}),
|
|
1287
|
+
);
|
|
1288
|
+
|
|
1300
1289
|
export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.lazy(() =>
|
|
1301
1290
|
z.object({
|
|
1302
1291
|
title: z.string(),
|
|
@@ -1319,33 +1308,37 @@ export const itemCallToActionSchema: z.ZodSchema<ItemCallToAction> = z.lazy(() =
|
|
|
1319
1308
|
}),
|
|
1320
1309
|
);
|
|
1321
1310
|
|
|
1322
|
-
export const
|
|
1311
|
+
export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
|
|
1323
1312
|
z.object({
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1313
|
+
type: z.literal('list'),
|
|
1314
|
+
title: z.string().optional(),
|
|
1315
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1316
|
+
items: z.array(listLayoutItemSchema),
|
|
1317
|
+
control: z.string().optional(),
|
|
1318
|
+
margin: sizeSchema.optional(),
|
|
1327
1319
|
analyticsId: z.string().optional(),
|
|
1328
1320
|
tags: z.array(z.string()).optional(),
|
|
1329
1321
|
}),
|
|
1330
1322
|
);
|
|
1331
1323
|
|
|
1332
|
-
export const
|
|
1324
|
+
export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
|
|
1333
1325
|
z.object({
|
|
1334
|
-
|
|
1335
|
-
title: z.string(),
|
|
1336
|
-
description: z.string().optional(),
|
|
1337
|
-
disabled: z.boolean().optional(),
|
|
1326
|
+
status: listLayoutStatusSchema.optional(),
|
|
1338
1327
|
icon: iconSchema.optional(),
|
|
1339
1328
|
image: imageSchema.optional(),
|
|
1340
|
-
|
|
1329
|
+
title: z.string().optional(),
|
|
1330
|
+
subtitle: z.string().optional(),
|
|
1331
|
+
value: z.string().optional(),
|
|
1332
|
+
subvalue: z.string().optional(),
|
|
1341
1333
|
tag: z.string().optional(),
|
|
1342
|
-
|
|
1334
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
1343
1335
|
supportingValues: supportingValuesSchema.optional(),
|
|
1344
1336
|
inlineAlert: inlineAlertSchema.optional(),
|
|
1337
|
+
description: z.string().optional(),
|
|
1345
1338
|
media: mediaSchema.optional(),
|
|
1346
1339
|
analyticsId: z.string().optional(),
|
|
1347
|
-
keywords: z.array(z.string()).optional(),
|
|
1348
1340
|
tags: z.array(z.string()).optional(),
|
|
1341
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1349
1342
|
}),
|
|
1350
1343
|
);
|
|
1351
1344
|
|
|
@@ -1358,88 +1351,91 @@ export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction>
|
|
|
1358
1351
|
}),
|
|
1359
1352
|
);
|
|
1360
1353
|
|
|
1361
|
-
export const
|
|
1354
|
+
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
1362
1355
|
z.object({
|
|
1363
|
-
status: listLayoutStatusSchema.optional(),
|
|
1364
|
-
icon: iconSchema.optional(),
|
|
1365
|
-
image: imageSchema.optional(),
|
|
1366
1356
|
title: z.string().optional(),
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1357
|
+
components: z.array(layoutSchema),
|
|
1358
|
+
}),
|
|
1359
|
+
);
|
|
1360
|
+
|
|
1361
|
+
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
1362
|
+
z.object({
|
|
1363
|
+
type: z.literal('box'),
|
|
1364
|
+
components: z.array(layoutSchema),
|
|
1365
|
+
width: sizeSchema.optional(),
|
|
1366
|
+
border: z.boolean().optional(),
|
|
1367
|
+
control: z.string().optional(),
|
|
1368
|
+
margin: sizeSchema.optional(),
|
|
1376
1369
|
analyticsId: z.string().optional(),
|
|
1377
1370
|
tags: z.array(z.string()).optional(),
|
|
1378
|
-
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1379
1371
|
}),
|
|
1380
1372
|
);
|
|
1381
1373
|
|
|
1382
|
-
export const
|
|
1374
|
+
export const searchLayoutSchema: z.ZodSchema<SearchLayout> = z.lazy(() =>
|
|
1383
1375
|
z.object({
|
|
1376
|
+
type: z.literal('search'),
|
|
1384
1377
|
title: z.string(),
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1378
|
+
method: httpMethodSchema,
|
|
1379
|
+
url: z.string(),
|
|
1380
|
+
param: z.string(),
|
|
1381
|
+
emptyMessage: z.string().optional(),
|
|
1382
|
+
control: z.string().optional(),
|
|
1383
|
+
margin: sizeSchema.optional(),
|
|
1384
|
+
analyticsId: z.string().optional(),
|
|
1385
|
+
tags: z.array(z.string()).optional(),
|
|
1386
|
+
hint: z.string().optional(),
|
|
1387
|
+
initialState: searchInitialStateSchema.optional(),
|
|
1388
1388
|
}),
|
|
1389
1389
|
);
|
|
1390
1390
|
|
|
1391
|
-
export const
|
|
1391
|
+
export const searchInitialStateSchema: z.ZodSchema<SearchInitialState> = z.lazy(() =>
|
|
1392
|
+
z.union([searchInitialLayoutConfigSchema, searchInitialResultsConfigSchema]),
|
|
1393
|
+
);
|
|
1394
|
+
|
|
1395
|
+
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
1392
1396
|
z.object({
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
icon: iconSchema.optional(),
|
|
1399
|
-
image: imageSchema.optional(),
|
|
1400
|
-
additionalInfo: additionalInfoSchema.optional(),
|
|
1401
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
1402
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1403
|
-
media: mediaSchema.optional(),
|
|
1397
|
+
type: z.literal('modal'),
|
|
1398
|
+
control: z.string().optional(),
|
|
1399
|
+
margin: sizeSchema.optional(),
|
|
1400
|
+
trigger: modalLayoutTriggerSchema,
|
|
1401
|
+
content: modalLayoutContentSchema,
|
|
1404
1402
|
analyticsId: z.string().optional(),
|
|
1405
1403
|
tags: z.array(z.string()).optional(),
|
|
1406
1404
|
}),
|
|
1407
1405
|
);
|
|
1408
1406
|
|
|
1409
|
-
export const
|
|
1407
|
+
export const subflowResponseBodySchema: z.ZodSchema<SubflowResponseBody> = z.lazy(() =>
|
|
1410
1408
|
z.object({
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1409
|
+
referrerId: z.string(),
|
|
1410
|
+
launchConfig: launchConfigSchema,
|
|
1411
|
+
resultKey: z.string().optional(),
|
|
1412
|
+
onCompletion: behaviorSchema.optional(),
|
|
1413
|
+
onError: behaviorSchema.optional(),
|
|
1416
1414
|
}),
|
|
1417
1415
|
);
|
|
1418
1416
|
|
|
1419
|
-
export const
|
|
1417
|
+
export const searchInitialLayoutConfigSchema: z.ZodSchema<SearchInitialLayoutConfig> = z.lazy(() =>
|
|
1420
1418
|
z.object({
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
behavior: behaviorSchema,
|
|
1424
|
-
context: contextSchema.optional(),
|
|
1419
|
+
type: z.literal('layout'),
|
|
1420
|
+
content: z.array(layoutSchema),
|
|
1425
1421
|
}),
|
|
1426
1422
|
);
|
|
1427
1423
|
|
|
1428
|
-
export const
|
|
1424
|
+
export const searchLayoutResponseBodySchema: z.ZodSchema<SearchLayoutResponseBody> = z.lazy(() =>
|
|
1429
1425
|
z.object({
|
|
1430
|
-
|
|
1431
|
-
|
|
1426
|
+
type: z.literal('layout'),
|
|
1427
|
+
content: z.array(layoutSchema),
|
|
1432
1428
|
}),
|
|
1433
1429
|
);
|
|
1434
1430
|
|
|
1435
|
-
export const
|
|
1431
|
+
export const searchResponseSchema: z.ZodSchema<SearchResponse> = z.lazy(() =>
|
|
1432
|
+
z.union([searchLayoutResponseBodySchema, searchResultsResponseBodySchema]),
|
|
1433
|
+
);
|
|
1434
|
+
|
|
1435
|
+
export const modalResponseBodySchema: z.ZodSchema<ModalResponseBody> = z.lazy(() =>
|
|
1436
1436
|
z.object({
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
delay: z.number().optional(),
|
|
1440
|
-
timeout: z.number().optional(),
|
|
1441
|
-
maxAttempts: z.number(),
|
|
1442
|
-
onError: pollingOnErrorSchema,
|
|
1437
|
+
title: z.string().optional(),
|
|
1438
|
+
content: z.array(layoutSchema),
|
|
1443
1439
|
}),
|
|
1444
1440
|
);
|
|
1445
1441
|
|
|
@@ -1450,16 +1446,6 @@ export const pollingOnErrorSchema: z.ZodSchema<PollingOnError> = z.lazy(() =>
|
|
|
1450
1446
|
}),
|
|
1451
1447
|
);
|
|
1452
1448
|
|
|
1453
|
-
export const toolbarSchema: z.ZodSchema<Toolbar> = z.lazy(() =>
|
|
1454
|
-
z.object({
|
|
1455
|
-
items: z.array(toolbarItemSchema),
|
|
1456
|
-
control: z.string().optional(),
|
|
1457
|
-
tags: z.array(z.string()).optional(),
|
|
1458
|
-
}),
|
|
1459
|
-
);
|
|
1460
|
-
|
|
1461
|
-
export const toolbarItemSchema: z.ZodSchema<ToolbarItem> = z.lazy(() => toolbarButtonSchema);
|
|
1462
|
-
|
|
1463
1449
|
export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
|
|
1464
1450
|
z.object({
|
|
1465
1451
|
type: z.literal('toolbar-button'),
|
|
@@ -1475,6 +1461,25 @@ export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
|
|
|
1475
1461
|
}),
|
|
1476
1462
|
);
|
|
1477
1463
|
|
|
1464
|
+
export const toolbarSchema: z.ZodSchema<Toolbar> = z.lazy(() =>
|
|
1465
|
+
z.object({
|
|
1466
|
+
items: z.array(toolbarItemSchema),
|
|
1467
|
+
control: z.string().optional(),
|
|
1468
|
+
tags: z.array(z.string()).optional(),
|
|
1469
|
+
}),
|
|
1470
|
+
);
|
|
1471
|
+
|
|
1472
|
+
export const toolbarItemSchema: z.ZodSchema<ToolbarItem> = z.lazy(() => toolbarButtonSchema);
|
|
1473
|
+
|
|
1474
|
+
export const modalBehaviorSchema: z.ZodSchema<ModalBehavior> = z.lazy(() =>
|
|
1475
|
+
z.object({
|
|
1476
|
+
type: z.literal('modal'),
|
|
1477
|
+
title: z.string().optional(),
|
|
1478
|
+
content: z.array(layoutSchema),
|
|
1479
|
+
analytics: z.record(z.string()).optional(),
|
|
1480
|
+
}),
|
|
1481
|
+
);
|
|
1482
|
+
|
|
1478
1483
|
export const subflowBehaviorSchema: z.ZodSchema<SubflowBehavior> = z.lazy(() =>
|
|
1479
1484
|
z.object({
|
|
1480
1485
|
type: z.literal('subflow'),
|
|
@@ -1483,14 +1488,25 @@ export const subflowBehaviorSchema: z.ZodSchema<SubflowBehavior> = z.lazy(() =>
|
|
|
1483
1488
|
resultKey: z.string().optional(),
|
|
1484
1489
|
onCompletion: behaviorSchema.optional(),
|
|
1485
1490
|
onError: behaviorSchema.optional(),
|
|
1491
|
+
analytics: z.record(z.string()).optional(),
|
|
1486
1492
|
}),
|
|
1487
1493
|
);
|
|
1488
1494
|
|
|
1489
|
-
export const
|
|
1495
|
+
export const pollingSchema: z.ZodSchema<Polling> = z.lazy(() =>
|
|
1490
1496
|
z.object({
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1497
|
+
interval: z.number().optional(),
|
|
1498
|
+
url: z.string(),
|
|
1499
|
+
delay: z.number().optional(),
|
|
1500
|
+
timeout: z.number().optional(),
|
|
1501
|
+
maxAttempts: z.number(),
|
|
1502
|
+
onError: pollingOnErrorSchema,
|
|
1503
|
+
}),
|
|
1504
|
+
);
|
|
1505
|
+
|
|
1506
|
+
export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
|
|
1507
|
+
z.object({
|
|
1508
|
+
regexPattern: z.string(),
|
|
1509
|
+
behavior: behaviorSchema.optional(),
|
|
1494
1510
|
}),
|
|
1495
1511
|
);
|
|
1496
1512
|
|
|
@@ -1518,5 +1534,6 @@ export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
|
1518
1534
|
toolbar: toolbarSchema.optional(),
|
|
1519
1535
|
tags: z.array(z.string()).optional(),
|
|
1520
1536
|
footer: z.array(layoutSchema).optional(),
|
|
1537
|
+
onLoad: behaviorSchema.optional(),
|
|
1521
1538
|
}),
|
|
1522
1539
|
);
|