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