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