@wise/dynamic-flow-types 3.15.1 → 3.17.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/main.js +85 -41
- package/build/main.mjs +85 -41
- package/build/next/feature/SuggestionsValue.d.ts +5 -0
- package/build/next/feature/toolbar/Toolbar.d.ts +4 -0
- package/build/next/feature/toolbar/ToolbarButton.d.ts +4 -0
- package/build/next/layout/AlertLayout.d.ts +4 -0
- package/build/next/layout/BoxLayout.d.ts +4 -0
- package/build/next/layout/ButtonLayout.d.ts +4 -0
- package/build/next/layout/ColumnsLayout.d.ts +4 -0
- package/build/next/layout/DecisionLayout.d.ts +4 -0
- package/build/next/layout/DecisionLayoutOption.d.ts +6 -1
- package/build/next/layout/DividerLayout.d.ts +4 -0
- package/build/next/layout/FormLayout.d.ts +4 -0
- package/build/next/layout/HeadingLayout.d.ts +4 -0
- package/build/next/layout/ImageLayout.d.ts +4 -0
- package/build/next/layout/InfoLayout.d.ts +4 -0
- package/build/next/layout/InstructionsLayout.d.ts +4 -0
- package/build/next/layout/InstructionsLayoutItem.d.ts +5 -0
- package/build/next/layout/ListLayout.d.ts +4 -0
- package/build/next/layout/ListLayoutItem.d.ts +10 -0
- package/build/next/layout/LoadingIndicatorLayout.d.ts +4 -0
- package/build/next/layout/MarkdownLayout.d.ts +4 -0
- package/build/next/layout/ModalLayout.d.ts +4 -0
- package/build/next/layout/ParagraphLayout.d.ts +4 -0
- package/build/next/layout/ProgressLayout.d.ts +4 -0
- package/build/next/layout/ReviewLayout.d.ts +4 -0
- package/build/next/layout/ReviewLayoutField.d.ts +5 -0
- package/build/next/layout/SearchLayout.d.ts +4 -0
- package/build/next/layout/SectionLayout.d.ts +4 -0
- package/build/next/layout/StatusListLayout.d.ts +4 -0
- package/build/next/layout/StatusListLayoutItem.d.ts +5 -0
- package/build/next/layout/TabsLayout.d.ts +4 -0
- package/build/next/layout/TabsLayoutTab.d.ts +5 -0
- package/build/next/schema/AllOfSchema.d.ts +4 -0
- package/build/next/schema/ArraySchemaList.d.ts +4 -0
- package/build/next/schema/ArraySchemaTuple.d.ts +4 -0
- package/build/next/schema/BlobSchema.d.ts +4 -0
- package/build/next/schema/BooleanSchema.d.ts +4 -0
- package/build/next/schema/ConstSchema.d.ts +4 -0
- package/build/next/schema/IntegerSchema.d.ts +4 -0
- package/build/next/schema/NumberSchema.d.ts +4 -0
- package/build/next/schema/ObjectSchema.d.ts +8 -0
- package/build/next/schema/OneOfSchema.d.ts +4 -0
- package/build/next/schema/StringSchema.d.ts +4 -0
- package/build/next/step/Step.d.ts +4 -0
- package/build/renderers/DecisionRendererProps.d.ts +2 -0
- package/build/renderers/InstructionsRendererProps.d.ts +2 -0
- package/build/renderers/ListRendererProps.d.ts +3 -0
- package/build/renderers/RendererProps.d.ts +1 -0
- package/build/renderers/RepeatableRendererProps.d.ts +1 -0
- package/build/renderers/ReviewRendererProps.d.ts +2 -0
- package/build/renderers/SelectInputRendererProps.d.ts +1 -0
- package/build/renderers/StatusListRendererProps.d.ts +2 -0
- package/build/renderers/StepRendererProps.d.ts +3 -0
- package/build/renderers/Suggestions.d.ts +2 -0
- package/build/renderers/TabsRendererProps.d.ts +2 -0
- package/build/zod/schemas.d.ts +49 -0
- package/build/zod/schemas.ts +722 -677
- package/package.json +5 -5
package/build/zod/schemas.ts
CHANGED
|
@@ -6,93 +6,52 @@ import {
|
|
|
6
6
|
type Behavior,
|
|
7
7
|
type ModalResponseBody,
|
|
8
8
|
type Layout,
|
|
9
|
-
type SectionLayoutCallToAction,
|
|
10
|
-
type ListLayoutCallToAction,
|
|
11
|
-
type ListLayoutItem,
|
|
12
|
-
type ButtonLayout,
|
|
13
|
-
type TabsLayout,
|
|
14
|
-
type TabsLayoutTab,
|
|
15
|
-
type ListLayout,
|
|
16
|
-
type ItemCallToAction,
|
|
17
|
-
type StatusListLayout,
|
|
18
|
-
type StatusListLayoutItem,
|
|
19
|
-
type DecisionLayoutOption,
|
|
20
|
-
type DecisionLayout,
|
|
21
|
-
type ReviewLayout,
|
|
22
|
-
type ReviewLayoutField,
|
|
23
|
-
type ReviewLayoutCallToAction,
|
|
24
|
-
type BoxLayout,
|
|
25
|
-
type ModalLayout,
|
|
26
|
-
type ModalLayoutContent,
|
|
27
|
-
type AlertLayout,
|
|
28
|
-
type AlertLayoutCallToAction,
|
|
29
|
-
type SectionLayout,
|
|
30
|
-
type ColumnsLayout,
|
|
31
9
|
type Step,
|
|
32
10
|
type Schema,
|
|
33
11
|
type Polling,
|
|
34
12
|
type LinkHandler,
|
|
35
13
|
type Toolbar,
|
|
36
14
|
type ModalBehavior,
|
|
37
|
-
type PollingOnError,
|
|
38
15
|
type ToolbarItem,
|
|
39
16
|
type ToolbarButton,
|
|
40
17
|
type PersistAsync,
|
|
18
|
+
type PollingOnError,
|
|
41
19
|
type BlobSchema,
|
|
42
|
-
type
|
|
43
|
-
type IntegerSchema,
|
|
44
|
-
type StringSchema,
|
|
45
|
-
type ObjectSchema,
|
|
20
|
+
type AlertLayout,
|
|
46
21
|
type AllOfSchema,
|
|
47
22
|
type ArraySchema,
|
|
48
23
|
type BooleanSchema,
|
|
49
24
|
type ConstSchema,
|
|
25
|
+
type IntegerSchema,
|
|
50
26
|
type NumberSchema,
|
|
51
|
-
type
|
|
27
|
+
type ObjectSchema,
|
|
28
|
+
type OneOfSchema,
|
|
29
|
+
type StringSchema,
|
|
52
30
|
type ArraySchemaList,
|
|
31
|
+
type ArraySchemaTuple,
|
|
32
|
+
type StatusListLayoutItem,
|
|
33
|
+
type ItemCallToAction,
|
|
34
|
+
type ListLayoutItem,
|
|
35
|
+
type ListLayoutCallToAction,
|
|
36
|
+
type ListLayout,
|
|
37
|
+
type ModalLayoutContent,
|
|
38
|
+
type DecisionLayout,
|
|
39
|
+
type DecisionLayoutOption,
|
|
40
|
+
type BoxLayout,
|
|
41
|
+
type ButtonLayout,
|
|
42
|
+
type ColumnsLayout,
|
|
43
|
+
type ModalLayout,
|
|
44
|
+
type ReviewLayout,
|
|
45
|
+
type SectionLayout,
|
|
46
|
+
type StatusListLayout,
|
|
47
|
+
type TabsLayout,
|
|
48
|
+
type AlertLayoutCallToAction,
|
|
49
|
+
type ReviewLayoutField,
|
|
50
|
+
type ReviewLayoutCallToAction,
|
|
51
|
+
type TabsLayoutTab,
|
|
52
|
+
type SectionLayoutCallToAction,
|
|
53
53
|
} from '../next';
|
|
54
54
|
|
|
55
|
-
export const autocapitalizationTypeSchema = z.union([
|
|
56
|
-
z.literal('none'),
|
|
57
|
-
z.literal('characters'),
|
|
58
|
-
z.literal('sentences'),
|
|
59
|
-
z.literal('words'),
|
|
60
|
-
]);
|
|
61
|
-
|
|
62
|
-
export const sizeSchema = z.union([
|
|
63
|
-
z.literal('xs'),
|
|
64
|
-
z.literal('sm'),
|
|
65
|
-
z.literal('md'),
|
|
66
|
-
z.literal('lg'),
|
|
67
|
-
z.literal('xl'),
|
|
68
|
-
]);
|
|
69
|
-
|
|
70
|
-
export const iconNamedSchema = z.object({
|
|
71
|
-
name: z.string(),
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
export const iconTextSchema = z.object({
|
|
75
|
-
text: z.string(),
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
export const mediaImageSchema = z.object({
|
|
79
|
-
type: z.literal('image'),
|
|
80
|
-
uri: z.string(),
|
|
81
|
-
accessibilityDescription: z.string().optional(),
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
export const avatarTextContentSchema = z.object({
|
|
85
|
-
type: z.literal('text'),
|
|
86
|
-
text: z.string(),
|
|
87
|
-
badgeUri: z.string().optional(),
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
export const avatarUriContentSchema = z.object({
|
|
91
|
-
type: z.literal('uri'),
|
|
92
|
-
uri: z.string(),
|
|
93
|
-
badgeUri: z.string().optional(),
|
|
94
|
-
});
|
|
95
|
-
|
|
96
55
|
export const autocompleteTokenSchema = z.union([
|
|
97
56
|
z.literal('on'),
|
|
98
57
|
z.literal('name'),
|
|
@@ -159,13 +118,6 @@ export const autocompleteTokenSchema = z.union([
|
|
|
159
118
|
z.literal('pager'),
|
|
160
119
|
]);
|
|
161
120
|
|
|
162
|
-
export const imageSchema = z.object({
|
|
163
|
-
text: z.string().optional(),
|
|
164
|
-
url: z.string().optional(),
|
|
165
|
-
uri: z.string().optional(),
|
|
166
|
-
accessibilityDescription: z.string().optional(),
|
|
167
|
-
});
|
|
168
|
-
|
|
169
121
|
export const contextSchema = z.union([
|
|
170
122
|
z.literal('positive'),
|
|
171
123
|
z.literal('neutral'),
|
|
@@ -179,6 +131,39 @@ export const contextSchema = z.union([
|
|
|
179
131
|
|
|
180
132
|
export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
|
|
181
133
|
|
|
134
|
+
export const autocapitalizationTypeSchema = z.union([
|
|
135
|
+
z.literal('none'),
|
|
136
|
+
z.literal('characters'),
|
|
137
|
+
z.literal('sentences'),
|
|
138
|
+
z.literal('words'),
|
|
139
|
+
]);
|
|
140
|
+
|
|
141
|
+
export const iconTextSchema = z.object({
|
|
142
|
+
text: z.string(),
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
export const iconNamedSchema = z.object({
|
|
146
|
+
name: z.string(),
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
export const mediaImageSchema = z.object({
|
|
150
|
+
type: z.literal('image'),
|
|
151
|
+
uri: z.string(),
|
|
152
|
+
accessibilityDescription: z.string().optional(),
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
export const avatarTextContentSchema = z.object({
|
|
156
|
+
type: z.literal('text'),
|
|
157
|
+
text: z.string(),
|
|
158
|
+
badgeUri: z.string().optional(),
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
export const avatarUriContentSchema = z.object({
|
|
162
|
+
type: z.literal('uri'),
|
|
163
|
+
uri: z.string(),
|
|
164
|
+
badgeUri: z.string().optional(),
|
|
165
|
+
});
|
|
166
|
+
|
|
182
167
|
export const httpMethodSchema = z.union([
|
|
183
168
|
z.literal('GET'),
|
|
184
169
|
z.literal('POST'),
|
|
@@ -187,11 +172,35 @@ export const httpMethodSchema = z.union([
|
|
|
187
172
|
z.literal('DELETE'),
|
|
188
173
|
]);
|
|
189
174
|
|
|
175
|
+
export const imageSchema = z.object({
|
|
176
|
+
text: z.string().optional(),
|
|
177
|
+
url: z.string().optional(),
|
|
178
|
+
uri: z.string().optional(),
|
|
179
|
+
accessibilityDescription: z.string().optional(),
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
export const sizeSchema = z.union([
|
|
183
|
+
z.literal('xs'),
|
|
184
|
+
z.literal('sm'),
|
|
185
|
+
z.literal('md'),
|
|
186
|
+
z.literal('lg'),
|
|
187
|
+
z.literal('xl'),
|
|
188
|
+
]);
|
|
189
|
+
|
|
190
190
|
export const supportingValuesSchema = z.object({
|
|
191
191
|
value: z.string().optional(),
|
|
192
192
|
subvalue: z.string().optional(),
|
|
193
193
|
});
|
|
194
194
|
|
|
195
|
+
export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
196
|
+
|
|
197
|
+
export const searchSearchRequestSchema = z.object({
|
|
198
|
+
url: z.string(),
|
|
199
|
+
method: httpMethodSchema,
|
|
200
|
+
param: z.string(),
|
|
201
|
+
query: z.string(),
|
|
202
|
+
});
|
|
203
|
+
|
|
195
204
|
export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
196
205
|
z
|
|
197
206
|
.union([
|
|
@@ -204,87 +213,131 @@ export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
|
204
213
|
.nullable(),
|
|
205
214
|
);
|
|
206
215
|
|
|
207
|
-
export const
|
|
208
|
-
|
|
209
|
-
export const searchSearchRequestSchema = z.object({
|
|
216
|
+
export const externalSchema = z.object({
|
|
210
217
|
url: z.string(),
|
|
211
|
-
method: httpMethodSchema,
|
|
212
|
-
param: z.string(),
|
|
213
|
-
query: z.string(),
|
|
214
218
|
});
|
|
215
219
|
|
|
216
|
-
export const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
size: sizeSchema.optional(),
|
|
220
|
-
align: alignSchema.optional(),
|
|
221
|
-
control: z.string().optional(),
|
|
222
|
-
margin: sizeSchema.optional(),
|
|
223
|
-
analyticsId: z.string().optional(),
|
|
220
|
+
export const stepErrorSchema = z.object({
|
|
221
|
+
error: z.string().optional(),
|
|
222
|
+
validation: jsonElementSchema.optional(),
|
|
224
223
|
});
|
|
225
224
|
|
|
226
|
-
export const
|
|
227
|
-
z.literal('
|
|
228
|
-
z.literal('
|
|
229
|
-
z.literal('
|
|
225
|
+
export const navigationStackBehaviorSchema = z.union([
|
|
226
|
+
z.literal('default'),
|
|
227
|
+
z.literal('remove-previous'),
|
|
228
|
+
z.literal('remove-all'),
|
|
229
|
+
z.literal('replace-current'),
|
|
230
230
|
]);
|
|
231
231
|
|
|
232
|
-
export const
|
|
233
|
-
type: z.literal('
|
|
234
|
-
|
|
235
|
-
align: alignSchema.optional(),
|
|
236
|
-
control: z.string().optional(),
|
|
237
|
-
margin: sizeSchema.optional(),
|
|
238
|
-
analyticsId: z.string().optional(),
|
|
232
|
+
export const copyBehaviorSchema = z.object({
|
|
233
|
+
type: z.literal('copy'),
|
|
234
|
+
content: z.string(),
|
|
239
235
|
});
|
|
240
236
|
|
|
241
|
-
export const
|
|
242
|
-
type: z.literal('
|
|
243
|
-
size: sizeSchema.optional(),
|
|
244
|
-
control: z.string().optional(),
|
|
245
|
-
margin: sizeSchema.optional(),
|
|
246
|
-
analyticsId: z.string().optional(),
|
|
237
|
+
export const dismissBehaviorSchema = z.object({
|
|
238
|
+
type: z.literal('dismiss'),
|
|
247
239
|
});
|
|
248
240
|
|
|
249
|
-
export const
|
|
250
|
-
type: z.literal('
|
|
251
|
-
title: z.string(),
|
|
252
|
-
method: httpMethodSchema,
|
|
241
|
+
export const linkBehaviorSchema = z.object({
|
|
242
|
+
type: z.literal('link'),
|
|
253
243
|
url: z.string(),
|
|
254
|
-
param: z.string(),
|
|
255
|
-
emptyMessage: z.string().optional(),
|
|
256
|
-
control: z.string().optional(),
|
|
257
|
-
margin: sizeSchema.optional(),
|
|
258
|
-
analyticsId: z.string().optional(),
|
|
259
244
|
});
|
|
260
245
|
|
|
261
|
-
export const
|
|
262
|
-
|
|
263
|
-
context: contextSchema.optional(),
|
|
246
|
+
export const refreshBehaviorSchema = z.object({
|
|
247
|
+
type: z.literal('refresh'),
|
|
264
248
|
});
|
|
265
249
|
|
|
266
|
-
export const
|
|
267
|
-
|
|
268
|
-
context: contextSchema,
|
|
269
|
-
tag: z.string().optional(),
|
|
270
|
-
analyticsId: z.string().optional(),
|
|
250
|
+
export const linkSchema = z.object({
|
|
251
|
+
url: z.string(),
|
|
271
252
|
});
|
|
272
253
|
|
|
273
|
-
export const
|
|
274
|
-
z.
|
|
275
|
-
z.
|
|
276
|
-
z.
|
|
277
|
-
|
|
254
|
+
export const summaryProviderSchema = z.object({
|
|
255
|
+
providesTitle: z.boolean().optional(),
|
|
256
|
+
providesDescription: z.boolean().optional(),
|
|
257
|
+
providesIcon: z.boolean().optional(),
|
|
258
|
+
providesImage: z.boolean().optional(),
|
|
259
|
+
providesMedia: z.boolean().optional(),
|
|
260
|
+
});
|
|
278
261
|
|
|
279
|
-
export const
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
analyticsId: z.string().optional(),
|
|
262
|
+
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
263
|
+
|
|
264
|
+
export const helpSchema = z.object({
|
|
265
|
+
markdown: z.string(),
|
|
284
266
|
});
|
|
285
267
|
|
|
286
|
-
export const
|
|
287
|
-
|
|
268
|
+
export const validateAsyncSchema = z.object({
|
|
269
|
+
param: z.string(),
|
|
270
|
+
method: httpMethodSchema,
|
|
271
|
+
url: z.string(),
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
export const actionTypeSchema = z.union([
|
|
275
|
+
z.literal('primary'),
|
|
276
|
+
z.literal('secondary'),
|
|
277
|
+
z.literal('link'),
|
|
278
|
+
z.literal('positive'),
|
|
279
|
+
z.literal('negative'),
|
|
280
|
+
]);
|
|
281
|
+
|
|
282
|
+
export const actionSchema = z.object({
|
|
283
|
+
title: z.string().optional(),
|
|
284
|
+
type: actionTypeSchema.optional(),
|
|
285
|
+
disabled: z.boolean().optional(),
|
|
286
|
+
$id: z.string().optional(),
|
|
287
|
+
$ref: z.string().optional(),
|
|
288
|
+
id: z.string().optional(),
|
|
289
|
+
url: z.string().optional(),
|
|
290
|
+
method: httpMethodSchema.optional(),
|
|
291
|
+
exit: z.boolean().optional(),
|
|
292
|
+
result: jsonElementSchema.optional(),
|
|
293
|
+
data: jsonElementSchema.optional(),
|
|
294
|
+
timeout: z.number().optional(),
|
|
295
|
+
skipValidation: z.boolean().optional(),
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
export const stringSchemaFormatSchema = z.union([
|
|
299
|
+
z.literal('date'),
|
|
300
|
+
z.literal('email'),
|
|
301
|
+
z.literal('numeric'),
|
|
302
|
+
z.literal('password'),
|
|
303
|
+
z.literal('phone-number'),
|
|
304
|
+
z.literal('base64url'),
|
|
305
|
+
]);
|
|
306
|
+
|
|
307
|
+
export const statusListLayoutStatusSchema = z.union([
|
|
308
|
+
z.literal('not-done'),
|
|
309
|
+
z.literal('pending'),
|
|
310
|
+
z.literal('done'),
|
|
311
|
+
]);
|
|
312
|
+
|
|
313
|
+
export const listLayoutStatusSchema = z.union([
|
|
314
|
+
z.literal('warning'),
|
|
315
|
+
z.literal('neutral'),
|
|
316
|
+
z.literal('positive'),
|
|
317
|
+
]);
|
|
318
|
+
|
|
319
|
+
export const inlineAlertSchema = z.object({
|
|
320
|
+
content: z.string(),
|
|
321
|
+
context: contextSchema.optional(),
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
export const dividerLayoutSchema = z.object({
|
|
325
|
+
type: z.literal('divider'),
|
|
326
|
+
control: z.string().optional(),
|
|
327
|
+
margin: sizeSchema.optional(),
|
|
328
|
+
analyticsId: z.string().optional(),
|
|
329
|
+
tags: z.array(z.string()).optional(),
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
export const headingLayoutSchema = z.object({
|
|
333
|
+
type: z.literal('heading'),
|
|
334
|
+
text: z.string(),
|
|
335
|
+
size: sizeSchema.optional(),
|
|
336
|
+
align: alignSchema.optional(),
|
|
337
|
+
control: z.string().optional(),
|
|
338
|
+
margin: sizeSchema.optional(),
|
|
339
|
+
analyticsId: z.string().optional(),
|
|
340
|
+
tags: z.array(z.string()).optional(),
|
|
288
341
|
});
|
|
289
342
|
|
|
290
343
|
export const imageLayoutSchema = z.object({
|
|
@@ -298,10 +351,12 @@ export const imageLayoutSchema = z.object({
|
|
|
298
351
|
margin: sizeSchema.optional(),
|
|
299
352
|
align: alignSchema.optional(),
|
|
300
353
|
analyticsId: z.string().optional(),
|
|
354
|
+
tags: z.array(z.string()).optional(),
|
|
301
355
|
});
|
|
302
356
|
|
|
303
357
|
export const infoLayoutSchema = z.object({
|
|
304
358
|
type: z.literal('info'),
|
|
359
|
+
tags: z.array(z.string()).optional(),
|
|
305
360
|
markdown: z.string(),
|
|
306
361
|
align: alignSchema.optional(),
|
|
307
362
|
control: z.string().optional(),
|
|
@@ -309,29 +364,15 @@ export const infoLayoutSchema = z.object({
|
|
|
309
364
|
analyticsId: z.string().optional(),
|
|
310
365
|
});
|
|
311
366
|
|
|
312
|
-
export const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
export const instructionsLayoutSchema = z.object({
|
|
317
|
-
type: z.literal('instructions'),
|
|
318
|
-
title: z.string().optional(),
|
|
319
|
-
items: z.array(instructionsLayoutItemSchema),
|
|
367
|
+
export const loadingIndicatorLayoutSchema = z.object({
|
|
368
|
+
type: z.literal('loading-indicator'),
|
|
369
|
+
size: sizeSchema.optional(),
|
|
320
370
|
control: z.string().optional(),
|
|
321
371
|
margin: sizeSchema.optional(),
|
|
322
372
|
analyticsId: z.string().optional(),
|
|
373
|
+
tags: z.array(z.string()).optional(),
|
|
323
374
|
});
|
|
324
375
|
|
|
325
|
-
export const formLayoutSchemaReferenceSchema = z.object({
|
|
326
|
-
$ref: z.string(),
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
export const statusListLayoutStatusSchema = z.union([
|
|
330
|
-
z.literal('not-done'),
|
|
331
|
-
z.literal('pending'),
|
|
332
|
-
z.literal('done'),
|
|
333
|
-
]);
|
|
334
|
-
|
|
335
376
|
export const markdownLayoutSchema = z.object({
|
|
336
377
|
type: z.literal('markdown'),
|
|
337
378
|
content: z.string(),
|
|
@@ -339,15 +380,17 @@ export const markdownLayoutSchema = z.object({
|
|
|
339
380
|
control: z.string().optional(),
|
|
340
381
|
margin: sizeSchema.optional(),
|
|
341
382
|
analyticsId: z.string().optional(),
|
|
383
|
+
tags: z.array(z.string()).optional(),
|
|
342
384
|
});
|
|
343
385
|
|
|
344
|
-
export const
|
|
345
|
-
type: z.literal('
|
|
346
|
-
|
|
347
|
-
|
|
386
|
+
export const paragraphLayoutSchema = z.object({
|
|
387
|
+
type: z.literal('paragraph'),
|
|
388
|
+
text: z.string(),
|
|
389
|
+
align: alignSchema.optional(),
|
|
348
390
|
control: z.string().optional(),
|
|
349
391
|
margin: sizeSchema.optional(),
|
|
350
392
|
analyticsId: z.string().optional(),
|
|
393
|
+
tags: z.array(z.string()).optional(),
|
|
351
394
|
});
|
|
352
395
|
|
|
353
396
|
export const progressLayoutSchema = z.object({
|
|
@@ -361,96 +404,87 @@ export const progressLayoutSchema = z.object({
|
|
|
361
404
|
control: z.string().optional(),
|
|
362
405
|
margin: sizeSchema.optional(),
|
|
363
406
|
analyticsId: z.string().optional(),
|
|
407
|
+
tags: z.array(z.string()).optional(),
|
|
364
408
|
});
|
|
365
409
|
|
|
366
|
-
export const
|
|
410
|
+
export const searchLayoutSchema = z.object({
|
|
411
|
+
type: z.literal('search'),
|
|
412
|
+
title: z.string(),
|
|
413
|
+
method: httpMethodSchema,
|
|
367
414
|
url: z.string(),
|
|
415
|
+
param: z.string(),
|
|
416
|
+
emptyMessage: z.string().optional(),
|
|
417
|
+
control: z.string().optional(),
|
|
418
|
+
margin: sizeSchema.optional(),
|
|
419
|
+
analyticsId: z.string().optional(),
|
|
420
|
+
tags: z.array(z.string()).optional(),
|
|
368
421
|
});
|
|
369
422
|
|
|
370
|
-
export const
|
|
371
|
-
|
|
372
|
-
|
|
423
|
+
export const instructionsLayoutItemSchema = z.object({
|
|
424
|
+
text: z.string(),
|
|
425
|
+
context: contextSchema,
|
|
426
|
+
tag: z.string().optional(),
|
|
427
|
+
analyticsId: z.string().optional(),
|
|
428
|
+
tags: z.array(z.string()).optional(),
|
|
373
429
|
});
|
|
374
430
|
|
|
375
|
-
export const
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
431
|
+
export const columnsLayoutBiasSchema = z.union([
|
|
432
|
+
z.literal('none'),
|
|
433
|
+
z.literal('left'),
|
|
434
|
+
z.literal('right'),
|
|
435
|
+
]);
|
|
379
436
|
|
|
380
|
-
export const
|
|
381
|
-
|
|
437
|
+
export const formLayoutSchemaReferenceSchema = z.object({
|
|
438
|
+
$ref: z.string(),
|
|
382
439
|
});
|
|
383
440
|
|
|
384
|
-
export const
|
|
385
|
-
|
|
386
|
-
url: z.string(),
|
|
441
|
+
export const modalLayoutTriggerSchema = z.object({
|
|
442
|
+
title: z.string(),
|
|
387
443
|
});
|
|
388
444
|
|
|
389
|
-
export const
|
|
390
|
-
type: z.literal('
|
|
445
|
+
export const formLayoutSchema = z.object({
|
|
446
|
+
type: z.literal('form'),
|
|
447
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
448
|
+
schemaId: z.string(),
|
|
449
|
+
control: z.string().optional(),
|
|
450
|
+
margin: sizeSchema.optional(),
|
|
451
|
+
analyticsId: z.string().optional(),
|
|
452
|
+
tags: z.array(z.string()).optional(),
|
|
391
453
|
});
|
|
392
454
|
|
|
393
|
-
export const
|
|
394
|
-
z.literal('
|
|
395
|
-
z.
|
|
396
|
-
z.
|
|
397
|
-
z.
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
export const validateAsyncSchema = z.object({
|
|
403
|
-
param: z.string(),
|
|
404
|
-
method: httpMethodSchema,
|
|
405
|
-
url: z.string(),
|
|
455
|
+
export const instructionsLayoutSchema = z.object({
|
|
456
|
+
type: z.literal('instructions'),
|
|
457
|
+
title: z.string().optional(),
|
|
458
|
+
items: z.array(instructionsLayoutItemSchema),
|
|
459
|
+
control: z.string().optional(),
|
|
460
|
+
margin: sizeSchema.optional(),
|
|
461
|
+
analyticsId: z.string().optional(),
|
|
462
|
+
tags: z.array(z.string()).optional(),
|
|
406
463
|
});
|
|
407
464
|
|
|
408
|
-
export const
|
|
409
|
-
z.literal('primary'),
|
|
410
|
-
z.literal('secondary'),
|
|
411
|
-
z.literal('link'),
|
|
412
|
-
z.literal('positive'),
|
|
413
|
-
z.literal('negative'),
|
|
414
|
-
]);
|
|
415
|
-
|
|
416
|
-
export const summaryProviderSchema = z.object({
|
|
417
|
-
providesTitle: z.boolean().optional(),
|
|
418
|
-
providesDescription: z.boolean().optional(),
|
|
419
|
-
providesIcon: z.boolean().optional(),
|
|
420
|
-
providesImage: z.boolean().optional(),
|
|
421
|
-
providesMedia: z.boolean().optional(),
|
|
422
|
-
});
|
|
465
|
+
export const avatarContentSchema = z.union([avatarTextContentSchema, avatarUriContentSchema]);
|
|
423
466
|
|
|
424
|
-
export const
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
$id: z.string().optional(),
|
|
429
|
-
$ref: z.string().optional(),
|
|
430
|
-
id: z.string().optional(),
|
|
431
|
-
url: z.string().optional(),
|
|
432
|
-
method: httpMethodSchema.optional(),
|
|
433
|
-
exit: z.boolean().optional(),
|
|
434
|
-
result: jsonElementSchema.optional(),
|
|
435
|
-
data: jsonElementSchema.optional(),
|
|
436
|
-
timeout: z.number().optional(),
|
|
437
|
-
skipValidation: z.boolean().optional(),
|
|
467
|
+
export const mediaAvatarSchema = z.object({
|
|
468
|
+
type: z.literal('avatar'),
|
|
469
|
+
content: z.array(avatarContentSchema),
|
|
470
|
+
accessibilityDescription: z.string().optional(),
|
|
438
471
|
});
|
|
439
472
|
|
|
440
|
-
export const
|
|
441
|
-
|
|
473
|
+
export const actionResponseBodySchema = z.object({
|
|
474
|
+
action: actionSchema,
|
|
442
475
|
});
|
|
443
476
|
|
|
444
|
-
export const
|
|
445
|
-
z.literal('date'),
|
|
446
|
-
z.literal('email'),
|
|
447
|
-
z.literal('numeric'),
|
|
448
|
-
z.literal('password'),
|
|
449
|
-
z.literal('phone-number'),
|
|
450
|
-
z.literal('base64url'),
|
|
451
|
-
]);
|
|
477
|
+
export const mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
|
|
452
478
|
|
|
453
|
-
export const
|
|
479
|
+
export const searchResultActionSchema = z.object({
|
|
480
|
+
type: z.literal('action'),
|
|
481
|
+
title: z.string(),
|
|
482
|
+
description: z.string().optional(),
|
|
483
|
+
icon: iconSchema.optional(),
|
|
484
|
+
image: imageSchema.optional(),
|
|
485
|
+
value: actionSchema,
|
|
486
|
+
media: mediaSchema.optional(),
|
|
487
|
+
});
|
|
454
488
|
|
|
455
489
|
export const errorResponseBodySchema = z.object({
|
|
456
490
|
refreshFormUrl: z.string().optional(),
|
|
@@ -460,8 +494,15 @@ export const errorResponseBodySchema = z.object({
|
|
|
460
494
|
refreshUrl: z.string().optional(),
|
|
461
495
|
});
|
|
462
496
|
|
|
463
|
-
export const
|
|
464
|
-
|
|
497
|
+
export const suggestionsValueSchema = z.object({
|
|
498
|
+
label: z.string(),
|
|
499
|
+
value: jsonElementSchema,
|
|
500
|
+
icon: iconSchema.optional(),
|
|
501
|
+
image: imageSchema.optional(),
|
|
502
|
+
tag: z.string().optional(),
|
|
503
|
+
media: mediaSchema.optional(),
|
|
504
|
+
analyticsId: z.string().optional(),
|
|
505
|
+
tags: z.array(z.string()).optional(),
|
|
465
506
|
});
|
|
466
507
|
|
|
467
508
|
export const actionBehaviorSchema = z.object({
|
|
@@ -479,22 +520,27 @@ export const navigationBackBehaviorSchema = z.object({
|
|
|
479
520
|
action: actionSchema,
|
|
480
521
|
});
|
|
481
522
|
|
|
482
|
-
export const
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
523
|
+
export const navigationSchema = z.object({
|
|
524
|
+
backButton: navigationBackBehaviorSchema.optional(),
|
|
525
|
+
back: navigationBackBehaviorSchema.optional(),
|
|
526
|
+
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
486
527
|
});
|
|
487
528
|
|
|
488
|
-
export const
|
|
529
|
+
export const summarySummariserSchema = z.object({
|
|
530
|
+
defaultTitle: z.string().optional(),
|
|
531
|
+
defaultDescription: z.string().optional(),
|
|
532
|
+
defaultIcon: iconSchema.optional(),
|
|
533
|
+
defaultImage: imageSchema.optional(),
|
|
534
|
+
providesTitle: z.boolean().optional(),
|
|
535
|
+
providesDescription: z.boolean().optional(),
|
|
536
|
+
providesIcon: z.boolean().optional(),
|
|
537
|
+
providesImage: z.boolean().optional(),
|
|
538
|
+
defaultMedia: mediaSchema.optional(),
|
|
539
|
+
providesMedia: z.boolean().optional(),
|
|
540
|
+
});
|
|
489
541
|
|
|
490
|
-
export const
|
|
491
|
-
|
|
492
|
-
title: z.string(),
|
|
493
|
-
description: z.string().optional(),
|
|
494
|
-
icon: iconSchema.optional(),
|
|
495
|
-
image: imageSchema.optional(),
|
|
496
|
-
value: actionSchema,
|
|
497
|
-
media: mediaSchema.optional(),
|
|
542
|
+
export const suggestionsSchema = z.object({
|
|
543
|
+
values: z.array(suggestionsValueSchema),
|
|
498
544
|
});
|
|
499
545
|
|
|
500
546
|
export const searchResultSearchSchema = z.object({
|
|
@@ -509,41 +555,8 @@ export const searchResultSearchSchema = z.object({
|
|
|
509
555
|
|
|
510
556
|
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
511
557
|
|
|
512
|
-
export const navigationSchema = z.object({
|
|
513
|
-
backButton: navigationBackBehaviorSchema.optional(),
|
|
514
|
-
back: navigationBackBehaviorSchema.optional(),
|
|
515
|
-
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
516
|
-
});
|
|
517
|
-
|
|
518
|
-
export const suggestionsValueSchema = z.object({
|
|
519
|
-
label: z.string(),
|
|
520
|
-
value: jsonElementSchema,
|
|
521
|
-
icon: iconSchema.optional(),
|
|
522
|
-
image: imageSchema.optional(),
|
|
523
|
-
tag: z.string().optional(),
|
|
524
|
-
media: mediaSchema.optional(),
|
|
525
|
-
analyticsId: z.string().optional(),
|
|
526
|
-
});
|
|
527
|
-
|
|
528
|
-
export const summarySummariserSchema = z.object({
|
|
529
|
-
defaultTitle: z.string().optional(),
|
|
530
|
-
defaultDescription: z.string().optional(),
|
|
531
|
-
defaultIcon: iconSchema.optional(),
|
|
532
|
-
defaultImage: imageSchema.optional(),
|
|
533
|
-
providesTitle: z.boolean().optional(),
|
|
534
|
-
providesDescription: z.boolean().optional(),
|
|
535
|
-
providesIcon: z.boolean().optional(),
|
|
536
|
-
providesImage: z.boolean().optional(),
|
|
537
|
-
defaultMedia: mediaSchema.optional(),
|
|
538
|
-
providesMedia: z.boolean().optional(),
|
|
539
|
-
});
|
|
540
|
-
|
|
541
558
|
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
542
559
|
|
|
543
|
-
export const suggestionsSchema = z.object({
|
|
544
|
-
values: z.array(suggestionsValueSchema),
|
|
545
|
-
});
|
|
546
|
-
|
|
547
560
|
export const searchResponseBodySchema = z.object({
|
|
548
561
|
results: z.array(searchResultSchema),
|
|
549
562
|
});
|
|
@@ -602,425 +615,231 @@ export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
|
602
615
|
]),
|
|
603
616
|
);
|
|
604
617
|
|
|
605
|
-
export const
|
|
618
|
+
export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
606
619
|
z.object({
|
|
620
|
+
key: z.string().optional(),
|
|
621
|
+
type: z.string().optional(),
|
|
622
|
+
actions: z.array(actionSchema).optional(),
|
|
623
|
+
refreshFormUrl: z.string().optional(),
|
|
624
|
+
id: z.string(),
|
|
607
625
|
title: z.string(),
|
|
608
|
-
|
|
609
|
-
|
|
626
|
+
schemas: z.array(schemaSchema),
|
|
627
|
+
layout: z.array(layoutSchema),
|
|
628
|
+
description: z.string().optional(),
|
|
629
|
+
model: jsonElementSchema.optional(),
|
|
630
|
+
external: externalSchema.optional(),
|
|
631
|
+
polling: pollingSchema.optional(),
|
|
632
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
633
|
+
analytics: z.record(z.string()).optional(),
|
|
634
|
+
errors: stepErrorSchema.optional(),
|
|
635
|
+
navigation: navigationSchema.optional(),
|
|
636
|
+
refreshUrl: z.string().optional(),
|
|
637
|
+
control: z.string().optional(),
|
|
638
|
+
refreshAfter: z.string().optional(),
|
|
639
|
+
toolbar: toolbarSchema.optional(),
|
|
640
|
+
tags: z.array(z.string()).optional(),
|
|
610
641
|
}),
|
|
611
642
|
);
|
|
612
643
|
|
|
613
|
-
export const
|
|
614
|
-
z.
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
644
|
+
export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
|
|
645
|
+
z.union([
|
|
646
|
+
allOfSchemaSchema,
|
|
647
|
+
arraySchemaSchema,
|
|
648
|
+
blobSchemaSchema,
|
|
649
|
+
booleanSchemaSchema,
|
|
650
|
+
constSchemaSchema,
|
|
651
|
+
integerSchemaSchema,
|
|
652
|
+
numberSchemaSchema,
|
|
653
|
+
objectSchemaSchema,
|
|
654
|
+
oneOfSchemaSchema,
|
|
655
|
+
stringSchemaSchema,
|
|
656
|
+
]),
|
|
619
657
|
);
|
|
620
658
|
|
|
621
|
-
export const
|
|
659
|
+
export const pollingSchema: z.ZodSchema<Polling> = z.lazy(() =>
|
|
622
660
|
z.object({
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
subvalue: z.string().optional(),
|
|
630
|
-
tag: z.string().optional(),
|
|
631
|
-
additionalInfo: additionalInfoSchema.optional(),
|
|
632
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
633
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
634
|
-
description: z.string().optional(),
|
|
635
|
-
media: mediaSchema.optional(),
|
|
636
|
-
analyticsId: z.string().optional(),
|
|
661
|
+
interval: z.number().optional(),
|
|
662
|
+
url: z.string(),
|
|
663
|
+
delay: z.number().optional(),
|
|
664
|
+
timeout: z.number().optional(),
|
|
665
|
+
maxAttempts: z.number(),
|
|
666
|
+
onError: pollingOnErrorSchema,
|
|
637
667
|
}),
|
|
638
668
|
);
|
|
639
669
|
|
|
640
|
-
export const
|
|
670
|
+
export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
|
|
641
671
|
z.object({
|
|
642
|
-
|
|
643
|
-
action: actionSchema.optional(),
|
|
644
|
-
size: sizeSchema.optional(),
|
|
645
|
-
title: z.string().optional(),
|
|
672
|
+
regexPattern: z.string(),
|
|
646
673
|
behavior: behaviorSchema.optional(),
|
|
647
|
-
context: contextSchema.optional(),
|
|
648
|
-
disabled: z.boolean().optional(),
|
|
649
|
-
pinOrder: z.number().optional(),
|
|
650
|
-
control: z.string().optional(),
|
|
651
|
-
margin: sizeSchema.optional(),
|
|
652
|
-
analyticsId: z.string().optional(),
|
|
653
674
|
}),
|
|
654
675
|
);
|
|
655
676
|
|
|
656
|
-
export const
|
|
677
|
+
export const toolbarSchema: z.ZodSchema<Toolbar> = z.lazy(() =>
|
|
657
678
|
z.object({
|
|
658
|
-
|
|
659
|
-
tabs: z.array(tabsLayoutTabSchema),
|
|
679
|
+
items: z.array(toolbarItemSchema),
|
|
660
680
|
control: z.string().optional(),
|
|
661
|
-
|
|
662
|
-
analyticsId: z.string().optional(),
|
|
663
|
-
}),
|
|
664
|
-
);
|
|
665
|
-
|
|
666
|
-
export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
|
|
667
|
-
z.object({
|
|
668
|
-
title: z.string(),
|
|
669
|
-
components: z.array(layoutSchema),
|
|
670
|
-
tag: z.string().optional(),
|
|
671
|
-
analyticsId: z.string().optional(),
|
|
681
|
+
tags: z.array(z.string()).optional(),
|
|
672
682
|
}),
|
|
673
683
|
);
|
|
674
684
|
|
|
675
|
-
export const
|
|
685
|
+
export const modalBehaviorSchema: z.ZodSchema<ModalBehavior> = z.lazy(() =>
|
|
676
686
|
z.object({
|
|
677
|
-
type: z.literal('
|
|
687
|
+
type: z.literal('modal'),
|
|
678
688
|
title: z.string().optional(),
|
|
679
|
-
|
|
680
|
-
items: z.array(listLayoutItemSchema),
|
|
681
|
-
control: z.string().optional(),
|
|
682
|
-
margin: sizeSchema.optional(),
|
|
683
|
-
analyticsId: z.string().optional(),
|
|
689
|
+
content: z.array(layoutSchema),
|
|
684
690
|
}),
|
|
685
691
|
);
|
|
686
692
|
|
|
687
|
-
export const
|
|
693
|
+
export const toolbarItemSchema: z.ZodSchema<ToolbarItem> = z.lazy(() => toolbarButtonSchema);
|
|
694
|
+
|
|
695
|
+
export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
|
|
688
696
|
z.object({
|
|
697
|
+
type: z.literal('toolbar-button'),
|
|
689
698
|
title: z.string(),
|
|
690
|
-
accessibilityDescription: z.string().optional(),
|
|
691
699
|
behavior: behaviorSchema,
|
|
692
|
-
|
|
693
|
-
)
|
|
694
|
-
|
|
695
|
-
export const statusListLayoutSchema: z.ZodSchema<StatusListLayout> = z.lazy(() =>
|
|
696
|
-
z.object({
|
|
697
|
-
type: z.literal('status-list'),
|
|
698
|
-
items: z.array(statusListLayoutItemSchema),
|
|
699
|
-
title: z.string().optional(),
|
|
700
|
+
accessibilityDescription: z.string().optional(),
|
|
701
|
+
media: mediaSchema.optional(),
|
|
700
702
|
control: z.string().optional(),
|
|
701
|
-
|
|
703
|
+
context: contextSchema.optional(),
|
|
704
|
+
disabled: z.boolean().optional(),
|
|
702
705
|
analyticsId: z.string().optional(),
|
|
706
|
+
tags: z.array(z.string()).optional(),
|
|
703
707
|
}),
|
|
704
708
|
);
|
|
705
709
|
|
|
706
|
-
export const
|
|
710
|
+
export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
|
|
707
711
|
z.object({
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
tag: z.string().optional(),
|
|
714
|
-
analyticsId: z.string().optional(),
|
|
712
|
+
param: z.string(),
|
|
713
|
+
idProperty: z.string(),
|
|
714
|
+
schema: schemaSchema,
|
|
715
|
+
url: z.string(),
|
|
716
|
+
method: httpMethodSchema,
|
|
715
717
|
}),
|
|
716
718
|
);
|
|
717
719
|
|
|
718
|
-
export const
|
|
720
|
+
export const pollingOnErrorSchema: z.ZodSchema<PollingOnError> = z.lazy(() =>
|
|
719
721
|
z.object({
|
|
720
722
|
action: actionSchema.optional(),
|
|
721
|
-
title: z.string(),
|
|
722
|
-
description: z.string().optional(),
|
|
723
|
-
disabled: z.boolean().optional(),
|
|
724
|
-
icon: iconSchema.optional(),
|
|
725
|
-
image: imageSchema.optional(),
|
|
726
723
|
behavior: behaviorSchema.optional(),
|
|
727
|
-
tag: z.string().optional(),
|
|
728
|
-
additionalText: z.string().optional(),
|
|
729
|
-
supportingValues: supportingValuesSchema.optional(),
|
|
730
|
-
inlineAlert: inlineAlertSchema.optional(),
|
|
731
|
-
media: mediaSchema.optional(),
|
|
732
|
-
analyticsId: z.string().optional(),
|
|
733
|
-
keywords: z.array(z.string()).optional(),
|
|
734
724
|
}),
|
|
735
725
|
);
|
|
736
726
|
|
|
737
|
-
export const
|
|
727
|
+
export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
|
|
738
728
|
z.object({
|
|
739
|
-
type: z.literal('
|
|
729
|
+
type: z.literal('blob'),
|
|
730
|
+
promoted: z.boolean().optional(),
|
|
731
|
+
$id: z.string().optional(),
|
|
740
732
|
title: z.string().optional(),
|
|
741
|
-
|
|
733
|
+
description: z.string().optional(),
|
|
742
734
|
control: z.string().optional(),
|
|
743
|
-
|
|
735
|
+
hidden: z.boolean().optional(),
|
|
736
|
+
icon: iconSchema.optional(),
|
|
737
|
+
image: imageSchema.optional(),
|
|
738
|
+
keywords: z.array(z.string()).optional(),
|
|
739
|
+
summary: summaryProviderSchema.optional(),
|
|
744
740
|
analyticsId: z.string().optional(),
|
|
741
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
742
|
+
validationMessages: z.record(z.string()).optional(),
|
|
743
|
+
alert: alertLayoutSchema.optional(),
|
|
744
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
745
|
+
accepts: z.array(z.string()).optional(),
|
|
746
|
+
maxSize: z.number().optional(),
|
|
747
|
+
source: uploadSourceSchema.optional(),
|
|
748
|
+
disabled: z.boolean().optional(),
|
|
749
|
+
media: mediaSchema.optional(),
|
|
750
|
+
tags: z.array(z.string()).optional(),
|
|
745
751
|
}),
|
|
746
752
|
);
|
|
747
753
|
|
|
748
|
-
export const
|
|
754
|
+
export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
|
|
749
755
|
z.object({
|
|
750
|
-
type: z.literal('
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
fields: z.array(reviewLayoutFieldSchema),
|
|
754
|
-
title: z.string().optional(),
|
|
755
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
756
|
+
type: z.literal('alert'),
|
|
757
|
+
markdown: z.string(),
|
|
758
|
+
context: contextSchema.optional(),
|
|
756
759
|
control: z.string().optional(),
|
|
757
760
|
margin: sizeSchema.optional(),
|
|
761
|
+
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
758
762
|
analyticsId: z.string().optional(),
|
|
763
|
+
tags: z.array(z.string()).optional(),
|
|
759
764
|
}),
|
|
760
765
|
);
|
|
761
766
|
|
|
762
|
-
export const
|
|
767
|
+
export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
763
768
|
z.object({
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
+
disabled: z.boolean().optional(),
|
|
770
|
+
promoted: z.boolean().optional(),
|
|
771
|
+
allOf: z.array(schemaSchema),
|
|
772
|
+
$id: z.string().optional(),
|
|
773
|
+
title: z.string().optional(),
|
|
774
|
+
description: z.string().optional(),
|
|
775
|
+
control: z.string().optional(),
|
|
776
|
+
hidden: z.boolean().optional(),
|
|
769
777
|
icon: iconSchema.optional(),
|
|
770
778
|
image: imageSchema.optional(),
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
774
|
-
media: mediaSchema.optional(),
|
|
779
|
+
keywords: z.array(z.string()).optional(),
|
|
780
|
+
summary: summaryProviderSchema.optional(),
|
|
775
781
|
analyticsId: z.string().optional(),
|
|
782
|
+
alert: alertLayoutSchema.optional(),
|
|
783
|
+
media: mediaSchema.optional(),
|
|
784
|
+
tags: z.array(z.string()).optional(),
|
|
776
785
|
}),
|
|
777
786
|
);
|
|
778
787
|
|
|
779
|
-
export const
|
|
780
|
-
z.
|
|
781
|
-
action: actionSchema.optional(),
|
|
782
|
-
title: z.string(),
|
|
783
|
-
accessibilityDescription: z.string().optional(),
|
|
784
|
-
behavior: behaviorSchema.optional(),
|
|
785
|
-
}),
|
|
788
|
+
export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
|
|
789
|
+
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
786
790
|
);
|
|
787
791
|
|
|
788
|
-
export const
|
|
792
|
+
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
789
793
|
z.object({
|
|
790
|
-
type: z.literal('
|
|
791
|
-
|
|
792
|
-
width: sizeSchema.optional(),
|
|
793
|
-
border: z.boolean().optional(),
|
|
794
|
-
control: z.string().optional(),
|
|
795
|
-
margin: sizeSchema.optional(),
|
|
796
|
-
analyticsId: z.string().optional(),
|
|
797
|
-
}),
|
|
798
|
-
);
|
|
799
|
-
|
|
800
|
-
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
801
|
-
z.object({
|
|
802
|
-
type: z.literal('modal'),
|
|
803
|
-
control: z.string().optional(),
|
|
804
|
-
margin: sizeSchema.optional(),
|
|
805
|
-
trigger: modalLayoutTriggerSchema,
|
|
806
|
-
content: modalLayoutContentSchema,
|
|
807
|
-
analyticsId: z.string().optional(),
|
|
808
|
-
}),
|
|
809
|
-
);
|
|
810
|
-
|
|
811
|
-
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
812
|
-
z.object({
|
|
813
|
-
title: z.string().optional(),
|
|
814
|
-
components: z.array(layoutSchema),
|
|
815
|
-
}),
|
|
816
|
-
);
|
|
817
|
-
|
|
818
|
-
export const alertLayoutSchema: z.ZodSchema<AlertLayout> = z.lazy(() =>
|
|
819
|
-
z.object({
|
|
820
|
-
type: z.literal('alert'),
|
|
821
|
-
markdown: z.string(),
|
|
822
|
-
context: contextSchema.optional(),
|
|
823
|
-
control: z.string().optional(),
|
|
824
|
-
margin: sizeSchema.optional(),
|
|
825
|
-
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
826
|
-
analyticsId: z.string().optional(),
|
|
827
|
-
}),
|
|
828
|
-
);
|
|
829
|
-
|
|
830
|
-
export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
|
|
831
|
-
z.object({
|
|
832
|
-
title: z.string(),
|
|
833
|
-
accessibilityDescription: z.string().optional(),
|
|
834
|
-
behavior: behaviorSchema,
|
|
835
|
-
}),
|
|
836
|
-
);
|
|
837
|
-
|
|
838
|
-
export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
839
|
-
z.object({
|
|
840
|
-
type: z.literal('section'),
|
|
841
|
-
components: z.array(layoutSchema),
|
|
842
|
-
title: z.string(),
|
|
843
|
-
callToAction: sectionLayoutCallToActionSchema.optional(),
|
|
844
|
-
control: z.string().optional(),
|
|
845
|
-
margin: sizeSchema.optional(),
|
|
846
|
-
analyticsId: z.string().optional(),
|
|
847
|
-
}),
|
|
848
|
-
);
|
|
849
|
-
|
|
850
|
-
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
851
|
-
z.object({
|
|
852
|
-
type: z.literal('columns'),
|
|
853
|
-
left: z.array(layoutSchema),
|
|
854
|
-
right: z.array(layoutSchema),
|
|
855
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
856
|
-
control: z.string().optional(),
|
|
857
|
-
margin: sizeSchema.optional(),
|
|
858
|
-
analyticsId: z.string().optional(),
|
|
859
|
-
}),
|
|
860
|
-
);
|
|
861
|
-
|
|
862
|
-
export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
863
|
-
z.object({
|
|
864
|
-
key: z.string().optional(),
|
|
865
|
-
type: z.string().optional(),
|
|
866
|
-
actions: z.array(actionSchema).optional(),
|
|
867
|
-
refreshFormUrl: z.string().optional(),
|
|
868
|
-
id: z.string(),
|
|
869
|
-
title: z.string(),
|
|
870
|
-
schemas: z.array(schemaSchema),
|
|
871
|
-
layout: z.array(layoutSchema),
|
|
872
|
-
description: z.string().optional(),
|
|
873
|
-
model: jsonElementSchema.optional(),
|
|
874
|
-
external: externalSchema.optional(),
|
|
875
|
-
polling: pollingSchema.optional(),
|
|
876
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
877
|
-
analytics: z.record(z.string()).optional(),
|
|
878
|
-
errors: stepErrorSchema.optional(),
|
|
879
|
-
navigation: navigationSchema.optional(),
|
|
880
|
-
refreshUrl: z.string().optional(),
|
|
881
|
-
control: z.string().optional(),
|
|
882
|
-
refreshAfter: z.string().optional(),
|
|
883
|
-
toolbar: toolbarSchema.optional(),
|
|
884
|
-
}),
|
|
885
|
-
);
|
|
886
|
-
|
|
887
|
-
export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
|
|
888
|
-
z.union([
|
|
889
|
-
allOfSchemaSchema,
|
|
890
|
-
arraySchemaSchema,
|
|
891
|
-
blobSchemaSchema,
|
|
892
|
-
booleanSchemaSchema,
|
|
893
|
-
constSchemaSchema,
|
|
894
|
-
integerSchemaSchema,
|
|
895
|
-
numberSchemaSchema,
|
|
896
|
-
objectSchemaSchema,
|
|
897
|
-
oneOfSchemaSchema,
|
|
898
|
-
stringSchemaSchema,
|
|
899
|
-
]),
|
|
900
|
-
);
|
|
901
|
-
|
|
902
|
-
export const pollingSchema: z.ZodSchema<Polling> = z.lazy(() =>
|
|
903
|
-
z.object({
|
|
904
|
-
interval: z.number().optional(),
|
|
905
|
-
url: z.string(),
|
|
906
|
-
delay: z.number().optional(),
|
|
907
|
-
timeout: z.number().optional(),
|
|
908
|
-
maxAttempts: z.number(),
|
|
909
|
-
onError: pollingOnErrorSchema,
|
|
910
|
-
}),
|
|
911
|
-
);
|
|
912
|
-
|
|
913
|
-
export const linkHandlerSchema: z.ZodSchema<LinkHandler> = z.lazy(() =>
|
|
914
|
-
z.object({
|
|
915
|
-
regexPattern: z.string(),
|
|
916
|
-
behavior: behaviorSchema.optional(),
|
|
917
|
-
}),
|
|
918
|
-
);
|
|
919
|
-
|
|
920
|
-
export const toolbarSchema: z.ZodSchema<Toolbar> = z.lazy(() =>
|
|
921
|
-
z.object({
|
|
922
|
-
items: z.array(toolbarItemSchema),
|
|
923
|
-
control: z.string().optional(),
|
|
924
|
-
}),
|
|
925
|
-
);
|
|
926
|
-
|
|
927
|
-
export const modalBehaviorSchema: z.ZodSchema<ModalBehavior> = z.lazy(() =>
|
|
928
|
-
z.object({
|
|
929
|
-
type: z.literal('modal'),
|
|
930
|
-
title: z.string().optional(),
|
|
931
|
-
content: z.array(layoutSchema),
|
|
932
|
-
}),
|
|
933
|
-
);
|
|
934
|
-
|
|
935
|
-
export const pollingOnErrorSchema: z.ZodSchema<PollingOnError> = z.lazy(() =>
|
|
936
|
-
z.object({
|
|
937
|
-
action: actionSchema.optional(),
|
|
938
|
-
behavior: behaviorSchema.optional(),
|
|
939
|
-
}),
|
|
940
|
-
);
|
|
941
|
-
|
|
942
|
-
export const toolbarItemSchema: z.ZodSchema<ToolbarItem> = z.lazy(() => toolbarButtonSchema);
|
|
943
|
-
|
|
944
|
-
export const toolbarButtonSchema: z.ZodSchema<ToolbarButton> = z.lazy(() =>
|
|
945
|
-
z.object({
|
|
946
|
-
type: z.literal('toolbar-button'),
|
|
947
|
-
title: z.string(),
|
|
948
|
-
behavior: behaviorSchema,
|
|
949
|
-
accessibilityDescription: z.string().optional(),
|
|
950
|
-
media: mediaSchema.optional(),
|
|
951
|
-
control: z.string().optional(),
|
|
952
|
-
context: contextSchema.optional(),
|
|
953
|
-
disabled: z.boolean().optional(),
|
|
954
|
-
analyticsId: z.string().optional(),
|
|
955
|
-
}),
|
|
956
|
-
);
|
|
957
|
-
|
|
958
|
-
export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
|
|
959
|
-
z.object({
|
|
960
|
-
param: z.string(),
|
|
961
|
-
idProperty: z.string(),
|
|
962
|
-
schema: schemaSchema,
|
|
963
|
-
url: z.string(),
|
|
964
|
-
method: httpMethodSchema,
|
|
965
|
-
}),
|
|
966
|
-
);
|
|
967
|
-
|
|
968
|
-
export const blobSchemaSchema: z.ZodSchema<BlobSchema> = z.lazy(() =>
|
|
969
|
-
z.object({
|
|
970
|
-
type: z.literal('blob'),
|
|
794
|
+
type: z.literal('boolean'),
|
|
795
|
+
autofillProvider: z.string().optional(),
|
|
971
796
|
promoted: z.boolean().optional(),
|
|
797
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
798
|
+
refreshUrl: z.string().optional(),
|
|
799
|
+
refreshFormUrl: z.string().optional(),
|
|
972
800
|
$id: z.string().optional(),
|
|
973
801
|
title: z.string().optional(),
|
|
974
802
|
description: z.string().optional(),
|
|
975
803
|
control: z.string().optional(),
|
|
804
|
+
default: z.boolean().optional(),
|
|
976
805
|
hidden: z.boolean().optional(),
|
|
806
|
+
disabled: z.boolean().optional(),
|
|
977
807
|
icon: iconSchema.optional(),
|
|
978
808
|
image: imageSchema.optional(),
|
|
979
809
|
keywords: z.array(z.string()).optional(),
|
|
980
810
|
summary: summaryProviderSchema.optional(),
|
|
981
811
|
analyticsId: z.string().optional(),
|
|
812
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
813
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
982
814
|
validationAsync: validateAsyncSchema.optional(),
|
|
983
|
-
validationMessages: z.record(z.string()).optional(),
|
|
984
815
|
alert: alertLayoutSchema.optional(),
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
source: uploadSourceSchema.optional(),
|
|
989
|
-
disabled: z.boolean().optional(),
|
|
816
|
+
autofillKey: z.string().optional(),
|
|
817
|
+
help: helpSchema.optional(),
|
|
818
|
+
onChange: behaviorSchema.optional(),
|
|
990
819
|
media: mediaSchema.optional(),
|
|
820
|
+
tags: z.array(z.string()).optional(),
|
|
991
821
|
}),
|
|
992
822
|
);
|
|
993
823
|
|
|
994
|
-
export const
|
|
824
|
+
export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
|
|
995
825
|
z.object({
|
|
996
|
-
|
|
826
|
+
hidden: z.boolean().optional(),
|
|
827
|
+
control: z.string().optional(),
|
|
828
|
+
tags: z.array(z.string()).optional(),
|
|
997
829
|
promoted: z.boolean().optional(),
|
|
998
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
999
|
-
refreshUrl: z.string().optional(),
|
|
1000
|
-
refreshFormUrl: z.string().optional(),
|
|
1001
|
-
promotion: jsonElementSchema.optional(),
|
|
1002
|
-
oneOf: z.array(schemaSchema),
|
|
1003
|
-
placeholder: z.string().optional(),
|
|
1004
830
|
$id: z.string().optional(),
|
|
831
|
+
const: jsonElementSchema,
|
|
1005
832
|
title: z.string().optional(),
|
|
1006
833
|
description: z.string().optional(),
|
|
1007
|
-
control: z.string().optional(),
|
|
1008
|
-
default: jsonElementSchema.optional(),
|
|
1009
|
-
hidden: z.boolean().optional(),
|
|
1010
834
|
icon: iconSchema.optional(),
|
|
1011
835
|
image: imageSchema.optional(),
|
|
1012
836
|
keywords: z.array(z.string()).optional(),
|
|
1013
837
|
summary: summaryProviderSchema.optional(),
|
|
1014
838
|
analyticsId: z.string().optional(),
|
|
1015
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1016
|
-
alert: alertLayoutSchema.optional(),
|
|
1017
|
-
help: helpSchema.optional(),
|
|
1018
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1019
|
-
autofillKey: z.string().optional(),
|
|
1020
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1021
839
|
disabled: z.boolean().optional(),
|
|
1022
|
-
onChange: behaviorSchema.optional(),
|
|
1023
840
|
media: mediaSchema.optional(),
|
|
841
|
+
alert: alertLayoutSchema.optional(),
|
|
842
|
+
layout: z.array(layoutSchema).optional(),
|
|
1024
843
|
}),
|
|
1025
844
|
);
|
|
1026
845
|
|
|
@@ -1057,32 +876,26 @@ export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
|
1057
876
|
help: helpSchema.optional(),
|
|
1058
877
|
onChange: behaviorSchema.optional(),
|
|
1059
878
|
media: mediaSchema.optional(),
|
|
879
|
+
tags: z.array(z.string()).optional(),
|
|
1060
880
|
}),
|
|
1061
881
|
);
|
|
1062
882
|
|
|
1063
|
-
export const
|
|
883
|
+
export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
1064
884
|
z.object({
|
|
1065
|
-
type: z.literal('
|
|
885
|
+
type: z.literal('number'),
|
|
1066
886
|
autofillProvider: z.string().optional(),
|
|
1067
887
|
promoted: z.boolean().optional(),
|
|
1068
888
|
refreshFormOnChange: z.boolean().optional(),
|
|
1069
889
|
refreshUrl: z.string().optional(),
|
|
1070
890
|
refreshFormUrl: z.string().optional(),
|
|
1071
|
-
format: stringSchemaFormatSchema.optional(),
|
|
1072
|
-
displayFormat: z.string().optional(),
|
|
1073
891
|
placeholder: z.string().optional(),
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
minimum: z.string().optional(),
|
|
1077
|
-
maximum: z.string().optional(),
|
|
1078
|
-
pattern: z.string().optional(),
|
|
1079
|
-
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
1080
|
-
autocorrect: z.boolean().optional(),
|
|
892
|
+
minimum: z.number().optional(),
|
|
893
|
+
maximum: z.number().optional(),
|
|
1081
894
|
$id: z.string().optional(),
|
|
1082
895
|
title: z.string().optional(),
|
|
1083
896
|
description: z.string().optional(),
|
|
1084
897
|
control: z.string().optional(),
|
|
1085
|
-
default: z.
|
|
898
|
+
default: z.number().optional(),
|
|
1086
899
|
hidden: z.boolean().optional(),
|
|
1087
900
|
disabled: z.boolean().optional(),
|
|
1088
901
|
icon: iconSchema.optional(),
|
|
@@ -1095,16 +908,12 @@ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
|
1095
908
|
validationAsync: validateAsyncSchema.optional(),
|
|
1096
909
|
validationMessages: z.record(z.string()).optional(),
|
|
1097
910
|
alert: alertLayoutSchema.optional(),
|
|
1098
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
1099
|
-
accepts: z.array(z.string()).optional(),
|
|
1100
|
-
maxSize: z.number().optional(),
|
|
1101
|
-
source: uploadSourceSchema.optional(),
|
|
1102
911
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1103
912
|
autofillKey: z.string().optional(),
|
|
1104
913
|
help: helpSchema.optional(),
|
|
1105
|
-
suggestions: suggestionsSchema.optional(),
|
|
1106
914
|
onChange: behaviorSchema.optional(),
|
|
1107
915
|
media: mediaSchema.optional(),
|
|
916
|
+
tags: z.array(z.string()).optional(),
|
|
1108
917
|
}),
|
|
1109
918
|
);
|
|
1110
919
|
|
|
@@ -1129,46 +938,68 @@ export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
|
1129
938
|
analyticsId: z.string().optional(),
|
|
1130
939
|
alert: alertLayoutSchema.optional(),
|
|
1131
940
|
media: mediaSchema.optional(),
|
|
941
|
+
tags: z.array(z.string()).optional(),
|
|
942
|
+
format: z.string().optional(),
|
|
1132
943
|
}),
|
|
1133
944
|
);
|
|
1134
945
|
|
|
1135
|
-
export const
|
|
946
|
+
export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
|
|
1136
947
|
z.object({
|
|
1137
|
-
|
|
948
|
+
autofillProvider: z.string().optional(),
|
|
1138
949
|
promoted: z.boolean().optional(),
|
|
1139
|
-
|
|
950
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
951
|
+
refreshUrl: z.string().optional(),
|
|
952
|
+
refreshFormUrl: z.string().optional(),
|
|
953
|
+
promotion: jsonElementSchema.optional(),
|
|
954
|
+
oneOf: z.array(schemaSchema),
|
|
955
|
+
placeholder: z.string().optional(),
|
|
1140
956
|
$id: z.string().optional(),
|
|
1141
957
|
title: z.string().optional(),
|
|
1142
958
|
description: z.string().optional(),
|
|
1143
959
|
control: z.string().optional(),
|
|
960
|
+
default: jsonElementSchema.optional(),
|
|
1144
961
|
hidden: z.boolean().optional(),
|
|
1145
962
|
icon: iconSchema.optional(),
|
|
1146
963
|
image: imageSchema.optional(),
|
|
1147
964
|
keywords: z.array(z.string()).optional(),
|
|
1148
965
|
summary: summaryProviderSchema.optional(),
|
|
1149
966
|
analyticsId: z.string().optional(),
|
|
967
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
1150
968
|
alert: alertLayoutSchema.optional(),
|
|
969
|
+
help: helpSchema.optional(),
|
|
970
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
971
|
+
autofillKey: z.string().optional(),
|
|
972
|
+
validationMessages: z.record(z.string()).optional(),
|
|
973
|
+
disabled: z.boolean().optional(),
|
|
974
|
+
onChange: behaviorSchema.optional(),
|
|
1151
975
|
media: mediaSchema.optional(),
|
|
976
|
+
tags: z.array(z.string()).optional(),
|
|
1152
977
|
}),
|
|
1153
978
|
);
|
|
1154
979
|
|
|
1155
|
-
export const
|
|
1156
|
-
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
1157
|
-
);
|
|
1158
|
-
|
|
1159
|
-
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
980
|
+
export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
1160
981
|
z.object({
|
|
1161
|
-
type: z.literal('
|
|
982
|
+
type: z.literal('string'),
|
|
1162
983
|
autofillProvider: z.string().optional(),
|
|
1163
984
|
promoted: z.boolean().optional(),
|
|
1164
985
|
refreshFormOnChange: z.boolean().optional(),
|
|
1165
986
|
refreshUrl: z.string().optional(),
|
|
1166
987
|
refreshFormUrl: z.string().optional(),
|
|
988
|
+
format: stringSchemaFormatSchema.optional(),
|
|
989
|
+
displayFormat: z.string().optional(),
|
|
990
|
+
placeholder: z.string().optional(),
|
|
991
|
+
minLength: z.number().optional(),
|
|
992
|
+
maxLength: z.number().optional(),
|
|
993
|
+
minimum: z.string().optional(),
|
|
994
|
+
maximum: z.string().optional(),
|
|
995
|
+
pattern: z.string().optional(),
|
|
996
|
+
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
997
|
+
autocorrect: z.boolean().optional(),
|
|
1167
998
|
$id: z.string().optional(),
|
|
1168
999
|
title: z.string().optional(),
|
|
1169
1000
|
description: z.string().optional(),
|
|
1170
1001
|
control: z.string().optional(),
|
|
1171
|
-
default: z.
|
|
1002
|
+
default: z.string().optional(),
|
|
1172
1003
|
hidden: z.boolean().optional(),
|
|
1173
1004
|
disabled: z.boolean().optional(),
|
|
1174
1005
|
icon: iconSchema.optional(),
|
|
@@ -1179,68 +1010,49 @@ export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
|
1179
1010
|
persistAsync: persistAsyncSchema.optional(),
|
|
1180
1011
|
refreshStepOnChange: z.boolean().optional(),
|
|
1181
1012
|
validationAsync: validateAsyncSchema.optional(),
|
|
1013
|
+
validationMessages: z.record(z.string()).optional(),
|
|
1182
1014
|
alert: alertLayoutSchema.optional(),
|
|
1015
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
1016
|
+
accepts: z.array(z.string()).optional(),
|
|
1017
|
+
maxSize: z.number().optional(),
|
|
1018
|
+
source: uploadSourceSchema.optional(),
|
|
1019
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
1183
1020
|
autofillKey: z.string().optional(),
|
|
1184
1021
|
help: helpSchema.optional(),
|
|
1022
|
+
suggestions: suggestionsSchema.optional(),
|
|
1185
1023
|
onChange: behaviorSchema.optional(),
|
|
1186
1024
|
media: mediaSchema.optional(),
|
|
1025
|
+
tags: z.array(z.string()).optional(),
|
|
1187
1026
|
}),
|
|
1188
1027
|
);
|
|
1189
1028
|
|
|
1190
|
-
export const
|
|
1029
|
+
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
1191
1030
|
z.object({
|
|
1192
|
-
|
|
1193
|
-
control: z.string().optional(),
|
|
1031
|
+
type: z.literal('array'),
|
|
1194
1032
|
promoted: z.boolean().optional(),
|
|
1195
1033
|
$id: z.string().optional(),
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
keywords: z.array(z.string()).optional(),
|
|
1202
|
-
summary: summaryProviderSchema.optional(),
|
|
1203
|
-
analyticsId: z.string().optional(),
|
|
1204
|
-
disabled: z.boolean().optional(),
|
|
1205
|
-
media: mediaSchema.optional(),
|
|
1206
|
-
alert: alertLayoutSchema.optional(),
|
|
1207
|
-
layout: z.array(layoutSchema).optional(),
|
|
1208
|
-
}),
|
|
1209
|
-
);
|
|
1210
|
-
|
|
1211
|
-
export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
1212
|
-
z.object({
|
|
1213
|
-
type: z.literal('number'),
|
|
1214
|
-
autofillProvider: z.string().optional(),
|
|
1215
|
-
promoted: z.boolean().optional(),
|
|
1216
|
-
refreshFormOnChange: z.boolean().optional(),
|
|
1217
|
-
refreshUrl: z.string().optional(),
|
|
1218
|
-
refreshFormUrl: z.string().optional(),
|
|
1034
|
+
items: schemaSchema,
|
|
1035
|
+
addItemTitle: z.string(),
|
|
1036
|
+
editItemTitle: z.string(),
|
|
1037
|
+
minItems: z.number().optional(),
|
|
1038
|
+
maxItems: z.number().optional(),
|
|
1219
1039
|
placeholder: z.string().optional(),
|
|
1220
|
-
minimum: z.number().optional(),
|
|
1221
|
-
maximum: z.number().optional(),
|
|
1222
|
-
$id: z.string().optional(),
|
|
1223
1040
|
title: z.string().optional(),
|
|
1224
1041
|
description: z.string().optional(),
|
|
1225
1042
|
control: z.string().optional(),
|
|
1226
|
-
default: z.number().optional(),
|
|
1227
1043
|
hidden: z.boolean().optional(),
|
|
1228
|
-
disabled: z.boolean().optional(),
|
|
1229
1044
|
icon: iconSchema.optional(),
|
|
1230
1045
|
image: imageSchema.optional(),
|
|
1231
1046
|
keywords: z.array(z.string()).optional(),
|
|
1232
|
-
summary:
|
|
1047
|
+
summary: summarySummariserSchema.optional(),
|
|
1233
1048
|
analyticsId: z.string().optional(),
|
|
1234
1049
|
persistAsync: persistAsyncSchema.optional(),
|
|
1235
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
1236
1050
|
validationAsync: validateAsyncSchema.optional(),
|
|
1237
|
-
validationMessages: z.record(z.string()).optional(),
|
|
1238
1051
|
alert: alertLayoutSchema.optional(),
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
help: helpSchema.optional(),
|
|
1242
|
-
onChange: behaviorSchema.optional(),
|
|
1052
|
+
validationMessages: z.record(z.string()).optional(),
|
|
1053
|
+
disabled: z.boolean().optional(),
|
|
1243
1054
|
media: mediaSchema.optional(),
|
|
1055
|
+
tags: z.array(z.string()).optional(),
|
|
1244
1056
|
}),
|
|
1245
1057
|
);
|
|
1246
1058
|
|
|
@@ -1263,34 +1075,267 @@ export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =
|
|
|
1263
1075
|
validationAsync: validateAsyncSchema.optional(),
|
|
1264
1076
|
alert: alertLayoutSchema.optional(),
|
|
1265
1077
|
media: mediaSchema.optional(),
|
|
1078
|
+
tags: z.array(z.string()).optional(),
|
|
1266
1079
|
}),
|
|
1267
1080
|
);
|
|
1268
1081
|
|
|
1269
|
-
export const
|
|
1082
|
+
export const statusListLayoutItemSchema: z.ZodSchema<StatusListLayoutItem> = z.lazy(() =>
|
|
1270
1083
|
z.object({
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1084
|
+
title: z.string(),
|
|
1085
|
+
description: z.string().optional(),
|
|
1086
|
+
icon: iconSchema,
|
|
1087
|
+
status: statusListLayoutStatusSchema.optional(),
|
|
1088
|
+
callToAction: itemCallToActionSchema.optional(),
|
|
1089
|
+
tag: z.string().optional(),
|
|
1090
|
+
analyticsId: z.string().optional(),
|
|
1091
|
+
tags: z.array(z.string()).optional(),
|
|
1092
|
+
}),
|
|
1093
|
+
);
|
|
1094
|
+
|
|
1095
|
+
export const itemCallToActionSchema: z.ZodSchema<ItemCallToAction> = z.lazy(() =>
|
|
1096
|
+
z.object({
|
|
1097
|
+
title: z.string(),
|
|
1098
|
+
accessibilityDescription: z.string().optional(),
|
|
1099
|
+
behavior: behaviorSchema,
|
|
1100
|
+
}),
|
|
1101
|
+
);
|
|
1102
|
+
|
|
1103
|
+
export const listLayoutItemSchema: z.ZodSchema<ListLayoutItem> = z.lazy(() =>
|
|
1104
|
+
z.object({
|
|
1105
|
+
status: listLayoutStatusSchema.optional(),
|
|
1106
|
+
icon: iconSchema.optional(),
|
|
1107
|
+
image: imageSchema.optional(),
|
|
1280
1108
|
title: z.string().optional(),
|
|
1109
|
+
subtitle: z.string().optional(),
|
|
1110
|
+
value: z.string().optional(),
|
|
1111
|
+
subvalue: z.string().optional(),
|
|
1112
|
+
tag: z.string().optional(),
|
|
1113
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
1114
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1115
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1281
1116
|
description: z.string().optional(),
|
|
1117
|
+
media: mediaSchema.optional(),
|
|
1118
|
+
analyticsId: z.string().optional(),
|
|
1119
|
+
tags: z.array(z.string()).optional(),
|
|
1120
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1121
|
+
}),
|
|
1122
|
+
);
|
|
1123
|
+
|
|
1124
|
+
export const listLayoutCallToActionSchema: z.ZodSchema<ListLayoutCallToAction> = z.lazy(() =>
|
|
1125
|
+
z.object({
|
|
1126
|
+
title: z.string(),
|
|
1127
|
+
accessibilityDescription: z.string().optional(),
|
|
1128
|
+
behavior: behaviorSchema,
|
|
1129
|
+
}),
|
|
1130
|
+
);
|
|
1131
|
+
|
|
1132
|
+
export const listLayoutSchema: z.ZodSchema<ListLayout> = z.lazy(() =>
|
|
1133
|
+
z.object({
|
|
1134
|
+
type: z.literal('list'),
|
|
1135
|
+
title: z.string().optional(),
|
|
1136
|
+
callToAction: listLayoutCallToActionSchema.optional(),
|
|
1137
|
+
items: z.array(listLayoutItemSchema),
|
|
1282
1138
|
control: z.string().optional(),
|
|
1283
|
-
|
|
1139
|
+
margin: sizeSchema.optional(),
|
|
1140
|
+
analyticsId: z.string().optional(),
|
|
1141
|
+
tags: z.array(z.string()).optional(),
|
|
1142
|
+
}),
|
|
1143
|
+
);
|
|
1144
|
+
|
|
1145
|
+
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
1146
|
+
z.object({
|
|
1147
|
+
title: z.string().optional(),
|
|
1148
|
+
components: z.array(layoutSchema),
|
|
1149
|
+
}),
|
|
1150
|
+
);
|
|
1151
|
+
|
|
1152
|
+
export const decisionLayoutSchema: z.ZodSchema<DecisionLayout> = z.lazy(() =>
|
|
1153
|
+
z.object({
|
|
1154
|
+
type: z.literal('decision'),
|
|
1155
|
+
title: z.string().optional(),
|
|
1156
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
1157
|
+
control: z.string().optional(),
|
|
1158
|
+
margin: sizeSchema.optional(),
|
|
1159
|
+
analyticsId: z.string().optional(),
|
|
1160
|
+
tags: z.array(z.string()).optional(),
|
|
1161
|
+
}),
|
|
1162
|
+
);
|
|
1163
|
+
|
|
1164
|
+
export const decisionLayoutOptionSchema: z.ZodSchema<DecisionLayoutOption> = z.lazy(() =>
|
|
1165
|
+
z.object({
|
|
1166
|
+
action: actionSchema.optional(),
|
|
1167
|
+
title: z.string(),
|
|
1168
|
+
description: z.string().optional(),
|
|
1169
|
+
disabled: z.boolean().optional(),
|
|
1284
1170
|
icon: iconSchema.optional(),
|
|
1285
1171
|
image: imageSchema.optional(),
|
|
1172
|
+
behavior: behaviorSchema.optional(),
|
|
1173
|
+
tag: z.string().optional(),
|
|
1174
|
+
additionalText: z.string().optional(),
|
|
1175
|
+
supportingValues: supportingValuesSchema.optional(),
|
|
1176
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1177
|
+
media: mediaSchema.optional(),
|
|
1178
|
+
analyticsId: z.string().optional(),
|
|
1286
1179
|
keywords: z.array(z.string()).optional(),
|
|
1287
|
-
|
|
1180
|
+
tags: z.array(z.string()).optional(),
|
|
1181
|
+
}),
|
|
1182
|
+
);
|
|
1183
|
+
|
|
1184
|
+
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
1185
|
+
z.object({
|
|
1186
|
+
type: z.literal('box'),
|
|
1187
|
+
components: z.array(layoutSchema),
|
|
1188
|
+
width: sizeSchema.optional(),
|
|
1189
|
+
border: z.boolean().optional(),
|
|
1190
|
+
control: z.string().optional(),
|
|
1191
|
+
margin: sizeSchema.optional(),
|
|
1288
1192
|
analyticsId: z.string().optional(),
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1193
|
+
tags: z.array(z.string()).optional(),
|
|
1194
|
+
}),
|
|
1195
|
+
);
|
|
1196
|
+
|
|
1197
|
+
export const buttonLayoutSchema: z.ZodSchema<ButtonLayout> = z.lazy(() =>
|
|
1198
|
+
z.object({
|
|
1199
|
+
type: z.literal('button'),
|
|
1200
|
+
action: actionSchema.optional(),
|
|
1201
|
+
size: sizeSchema.optional(),
|
|
1202
|
+
title: z.string().optional(),
|
|
1203
|
+
behavior: behaviorSchema.optional(),
|
|
1204
|
+
context: contextSchema.optional(),
|
|
1293
1205
|
disabled: z.boolean().optional(),
|
|
1206
|
+
pinOrder: z.number().optional(),
|
|
1207
|
+
control: z.string().optional(),
|
|
1208
|
+
margin: sizeSchema.optional(),
|
|
1209
|
+
analyticsId: z.string().optional(),
|
|
1210
|
+
tags: z.array(z.string()).optional(),
|
|
1211
|
+
}),
|
|
1212
|
+
);
|
|
1213
|
+
|
|
1214
|
+
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
1215
|
+
z.object({
|
|
1216
|
+
type: z.literal('columns'),
|
|
1217
|
+
left: z.array(layoutSchema),
|
|
1218
|
+
right: z.array(layoutSchema),
|
|
1219
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
1220
|
+
control: z.string().optional(),
|
|
1221
|
+
margin: sizeSchema.optional(),
|
|
1222
|
+
analyticsId: z.string().optional(),
|
|
1223
|
+
tags: z.array(z.string()).optional(),
|
|
1224
|
+
}),
|
|
1225
|
+
);
|
|
1226
|
+
|
|
1227
|
+
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
1228
|
+
z.object({
|
|
1229
|
+
type: z.literal('modal'),
|
|
1230
|
+
control: z.string().optional(),
|
|
1231
|
+
margin: sizeSchema.optional(),
|
|
1232
|
+
trigger: modalLayoutTriggerSchema,
|
|
1233
|
+
content: modalLayoutContentSchema,
|
|
1234
|
+
analyticsId: z.string().optional(),
|
|
1235
|
+
tags: z.array(z.string()).optional(),
|
|
1236
|
+
}),
|
|
1237
|
+
);
|
|
1238
|
+
|
|
1239
|
+
export const reviewLayoutSchema: z.ZodSchema<ReviewLayout> = z.lazy(() =>
|
|
1240
|
+
z.object({
|
|
1241
|
+
type: z.literal('review'),
|
|
1242
|
+
orientation: z.string().optional(),
|
|
1243
|
+
action: actionSchema.optional(),
|
|
1244
|
+
fields: z.array(reviewLayoutFieldSchema),
|
|
1245
|
+
title: z.string().optional(),
|
|
1246
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1247
|
+
control: z.string().optional(),
|
|
1248
|
+
margin: sizeSchema.optional(),
|
|
1249
|
+
analyticsId: z.string().optional(),
|
|
1250
|
+
tags: z.array(z.string()).optional(),
|
|
1251
|
+
}),
|
|
1252
|
+
);
|
|
1253
|
+
|
|
1254
|
+
export const sectionLayoutSchema: z.ZodSchema<SectionLayout> = z.lazy(() =>
|
|
1255
|
+
z.object({
|
|
1256
|
+
type: z.literal('section'),
|
|
1257
|
+
components: z.array(layoutSchema),
|
|
1258
|
+
title: z.string(),
|
|
1259
|
+
callToAction: sectionLayoutCallToActionSchema.optional(),
|
|
1260
|
+
control: z.string().optional(),
|
|
1261
|
+
margin: sizeSchema.optional(),
|
|
1262
|
+
analyticsId: z.string().optional(),
|
|
1263
|
+
tags: z.array(z.string()).optional(),
|
|
1264
|
+
}),
|
|
1265
|
+
);
|
|
1266
|
+
|
|
1267
|
+
export const statusListLayoutSchema: z.ZodSchema<StatusListLayout> = z.lazy(() =>
|
|
1268
|
+
z.object({
|
|
1269
|
+
type: z.literal('status-list'),
|
|
1270
|
+
items: z.array(statusListLayoutItemSchema),
|
|
1271
|
+
title: z.string().optional(),
|
|
1272
|
+
control: z.string().optional(),
|
|
1273
|
+
margin: sizeSchema.optional(),
|
|
1274
|
+
analyticsId: z.string().optional(),
|
|
1275
|
+
tags: z.array(z.string()).optional(),
|
|
1276
|
+
}),
|
|
1277
|
+
);
|
|
1278
|
+
|
|
1279
|
+
export const tabsLayoutSchema: z.ZodSchema<TabsLayout> = z.lazy(() =>
|
|
1280
|
+
z.object({
|
|
1281
|
+
type: z.literal('tabs'),
|
|
1282
|
+
tabs: z.array(tabsLayoutTabSchema),
|
|
1283
|
+
control: z.string().optional(),
|
|
1284
|
+
margin: sizeSchema.optional(),
|
|
1285
|
+
analyticsId: z.string().optional(),
|
|
1286
|
+
tags: z.array(z.string()).optional(),
|
|
1287
|
+
}),
|
|
1288
|
+
);
|
|
1289
|
+
|
|
1290
|
+
export const alertLayoutCallToActionSchema: z.ZodSchema<AlertLayoutCallToAction> = z.lazy(() =>
|
|
1291
|
+
z.object({
|
|
1292
|
+
title: z.string(),
|
|
1293
|
+
accessibilityDescription: z.string().optional(),
|
|
1294
|
+
behavior: behaviorSchema,
|
|
1295
|
+
}),
|
|
1296
|
+
);
|
|
1297
|
+
|
|
1298
|
+
export const reviewLayoutFieldSchema: z.ZodSchema<ReviewLayoutField> = z.lazy(() =>
|
|
1299
|
+
z.object({
|
|
1300
|
+
label: z.string(),
|
|
1301
|
+
value: z.string(),
|
|
1302
|
+
rawValue: z.string().optional(),
|
|
1303
|
+
help: helpSchema.optional(),
|
|
1304
|
+
tag: z.string().optional(),
|
|
1305
|
+
icon: iconSchema.optional(),
|
|
1306
|
+
image: imageSchema.optional(),
|
|
1307
|
+
additionalInfo: additionalInfoSchema.optional(),
|
|
1308
|
+
inlineAlert: inlineAlertSchema.optional(),
|
|
1309
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
1294
1310
|
media: mediaSchema.optional(),
|
|
1311
|
+
analyticsId: z.string().optional(),
|
|
1312
|
+
tags: z.array(z.string()).optional(),
|
|
1313
|
+
}),
|
|
1314
|
+
);
|
|
1315
|
+
|
|
1316
|
+
export const reviewLayoutCallToActionSchema: z.ZodSchema<ReviewLayoutCallToAction> = z.lazy(() =>
|
|
1317
|
+
z.object({
|
|
1318
|
+
action: actionSchema.optional(),
|
|
1319
|
+
title: z.string(),
|
|
1320
|
+
accessibilityDescription: z.string().optional(),
|
|
1321
|
+
behavior: behaviorSchema.optional(),
|
|
1322
|
+
}),
|
|
1323
|
+
);
|
|
1324
|
+
|
|
1325
|
+
export const tabsLayoutTabSchema: z.ZodSchema<TabsLayoutTab> = z.lazy(() =>
|
|
1326
|
+
z.object({
|
|
1327
|
+
title: z.string(),
|
|
1328
|
+
components: z.array(layoutSchema),
|
|
1329
|
+
tag: z.string().optional(),
|
|
1330
|
+
analyticsId: z.string().optional(),
|
|
1331
|
+
tags: z.array(z.string()).optional(),
|
|
1332
|
+
}),
|
|
1333
|
+
);
|
|
1334
|
+
|
|
1335
|
+
export const sectionLayoutCallToActionSchema: z.ZodSchema<SectionLayoutCallToAction> = z.lazy(() =>
|
|
1336
|
+
z.object({
|
|
1337
|
+
title: z.string(),
|
|
1338
|
+
accessibilityDescription: z.string().optional(),
|
|
1339
|
+
behavior: behaviorSchema,
|
|
1295
1340
|
}),
|
|
1296
1341
|
);
|