@wise/dynamic-flow-types 3.0.0-experimental-764fef7 → 3.0.0-experimental-0d693ac
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.js +463 -463
- package/build/main.min.js +1 -1
- package/build/main.mjs +463 -463
- package/build/zod/schemas.d.ts +3000 -3000
- package/build/zod/schemas.ts +504 -504
- package/package.json +1 -1
package/build/zod/schemas.ts
CHANGED
|
@@ -2,109 +2,37 @@
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import type {
|
|
4
4
|
JsonElement,
|
|
5
|
-
NumberSchema,
|
|
6
5
|
PersistAsync,
|
|
7
|
-
ArraySchemaTuple,
|
|
8
6
|
Schema,
|
|
9
|
-
BooleanSchema,
|
|
10
|
-
AllOfSchema,
|
|
11
|
-
ArraySchema,
|
|
12
|
-
IntegerSchema,
|
|
13
|
-
ObjectSchema,
|
|
14
|
-
OneOfSchema,
|
|
15
|
-
StringSchema,
|
|
16
|
-
ArraySchemaList,
|
|
17
|
-
Step,
|
|
18
|
-
Layout,
|
|
19
7
|
ColumnsLayout,
|
|
8
|
+
Layout,
|
|
20
9
|
ModalLayoutContent,
|
|
21
10
|
BoxLayout,
|
|
22
11
|
ModalLayout,
|
|
12
|
+
Step,
|
|
13
|
+
StringSchema,
|
|
14
|
+
OneOfSchema,
|
|
15
|
+
NumberSchema,
|
|
16
|
+
ArraySchemaTuple,
|
|
17
|
+
IntegerSchema,
|
|
18
|
+
ArraySchema,
|
|
19
|
+
ArraySchemaList,
|
|
20
|
+
AllOfSchema,
|
|
21
|
+
BooleanSchema,
|
|
22
|
+
ObjectSchema,
|
|
23
23
|
} from '../next';
|
|
24
24
|
|
|
25
|
-
export const
|
|
26
|
-
text: z.string().optional(),
|
|
25
|
+
export const linkSchema = z.object({
|
|
27
26
|
url: z.string(),
|
|
28
|
-
accessibilityDescription: z.string().optional(),
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export const summaryProviderSchema = z.object({
|
|
32
|
-
providesTitle: z.boolean().optional(),
|
|
33
|
-
providesDescription: z.boolean().optional(),
|
|
34
|
-
providesIcon: z.boolean().optional(),
|
|
35
|
-
providesImage: z.boolean().optional(),
|
|
36
27
|
});
|
|
37
28
|
|
|
38
|
-
export const
|
|
39
|
-
z.literal('
|
|
40
|
-
z.literal('
|
|
41
|
-
z.literal('
|
|
42
|
-
z.literal('
|
|
43
|
-
z.literal('additional-name'),
|
|
44
|
-
z.literal('family-name'),
|
|
45
|
-
z.literal('name-suffix'),
|
|
46
|
-
z.literal('nickname'),
|
|
47
|
-
z.literal('email'),
|
|
48
|
-
z.literal('username'),
|
|
49
|
-
z.literal('new-username'),
|
|
50
|
-
z.literal('new-password'),
|
|
51
|
-
z.literal('password'),
|
|
52
|
-
z.literal('one-time-code'),
|
|
53
|
-
z.literal('job-title'),
|
|
54
|
-
z.literal('organization-name'),
|
|
55
|
-
z.literal('full-street-address'),
|
|
56
|
-
z.literal('street-address-line-1'),
|
|
57
|
-
z.literal('street-address-line-2'),
|
|
58
|
-
z.literal('street-address-line-3'),
|
|
59
|
-
z.literal('address-level-1'),
|
|
60
|
-
z.literal('address-level-2'),
|
|
61
|
-
z.literal('address-level-3'),
|
|
62
|
-
z.literal('address-level-4'),
|
|
63
|
-
z.literal('country-code'),
|
|
64
|
-
z.literal('country-name'),
|
|
65
|
-
z.literal('postal-code'),
|
|
66
|
-
z.literal('credit-card-name'),
|
|
67
|
-
z.literal('credit-card-given-name'),
|
|
68
|
-
z.literal('credit-card-middle-name'),
|
|
69
|
-
z.literal('credit-card-family-name'),
|
|
70
|
-
z.literal('credit-card-number'),
|
|
71
|
-
z.literal('credit-card-expiration'),
|
|
72
|
-
z.literal('credit-card-expiration-month'),
|
|
73
|
-
z.literal('credit-card-expiration-year'),
|
|
74
|
-
z.literal('credit-card-security-code'),
|
|
75
|
-
z.literal('credit-card-type'),
|
|
76
|
-
z.literal('transaction-currency'),
|
|
77
|
-
z.literal('transaction-amount'),
|
|
78
|
-
z.literal('language'),
|
|
79
|
-
z.literal('birthdate'),
|
|
80
|
-
z.literal('birthdate-day'),
|
|
81
|
-
z.literal('birthdate-month'),
|
|
82
|
-
z.literal('birthdate-year'),
|
|
83
|
-
z.literal('gender'),
|
|
84
|
-
z.literal('phone-number'),
|
|
85
|
-
z.literal('phone-country-code'),
|
|
86
|
-
z.literal('phone-national'),
|
|
87
|
-
z.literal('phone-area-code'),
|
|
88
|
-
z.literal('phone-local'),
|
|
89
|
-
z.literal('phone-local-prefix'),
|
|
90
|
-
z.literal('phone-local-suffix'),
|
|
91
|
-
z.literal('phone-extension'),
|
|
92
|
-
z.literal('url'),
|
|
93
|
-
z.literal('photo'),
|
|
94
|
-
z.literal('impp'),
|
|
95
|
-
z.literal('shipping'),
|
|
96
|
-
z.literal('billing'),
|
|
97
|
-
z.literal('home'),
|
|
98
|
-
z.literal('work'),
|
|
99
|
-
z.literal('mobile'),
|
|
100
|
-
z.literal('fax'),
|
|
101
|
-
z.literal('pager'),
|
|
29
|
+
export const navigationStackBehaviorSchema = z.union([
|
|
30
|
+
z.literal('default'),
|
|
31
|
+
z.literal('remove-previous'),
|
|
32
|
+
z.literal('remove-all'),
|
|
33
|
+
z.literal('replace-current'),
|
|
102
34
|
]);
|
|
103
35
|
|
|
104
|
-
export const helpSchema = z.object({
|
|
105
|
-
markdown: z.string(),
|
|
106
|
-
});
|
|
107
|
-
|
|
108
36
|
export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
109
37
|
z
|
|
110
38
|
.union([
|
|
@@ -117,49 +45,49 @@ export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
|
117
45
|
.nullable(),
|
|
118
46
|
);
|
|
119
47
|
|
|
120
|
-
export const
|
|
121
|
-
z.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
z.literal('
|
|
126
|
-
z.literal('
|
|
48
|
+
export const helpSchema = z.object({
|
|
49
|
+
markdown: z.string(),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export const actionTypeSchema = z.union([
|
|
53
|
+
z.literal('primary'),
|
|
54
|
+
z.literal('secondary'),
|
|
55
|
+
z.literal('link'),
|
|
56
|
+
z.literal('positive'),
|
|
57
|
+
z.literal('negative'),
|
|
127
58
|
]);
|
|
128
59
|
|
|
129
|
-
export const
|
|
130
|
-
z.literal('
|
|
131
|
-
z.literal('
|
|
132
|
-
z.literal('
|
|
133
|
-
z.literal('
|
|
60
|
+
export const httpMethodSchema = z.union([
|
|
61
|
+
z.literal('GET'),
|
|
62
|
+
z.literal('POST'),
|
|
63
|
+
z.literal('PUT'),
|
|
64
|
+
z.literal('PATCH'),
|
|
65
|
+
z.literal('DELETE'),
|
|
134
66
|
]);
|
|
135
67
|
|
|
136
68
|
export const uploadSourceSchema = z.union([z.literal('camera'), z.literal('file')]);
|
|
137
69
|
|
|
138
|
-
export const
|
|
70
|
+
export const validateAsyncSchema = z.object({
|
|
71
|
+
param: z.string(),
|
|
72
|
+
method: httpMethodSchema,
|
|
139
73
|
url: z.string(),
|
|
140
74
|
});
|
|
141
75
|
|
|
142
|
-
export const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
export const iconNamedSchema = z.object({
|
|
148
|
-
name: z.string(),
|
|
76
|
+
export const summaryProviderSchema = z.object({
|
|
77
|
+
providesTitle: z.boolean().optional(),
|
|
78
|
+
providesDescription: z.boolean().optional(),
|
|
79
|
+
providesIcon: z.boolean().optional(),
|
|
80
|
+
providesImage: z.boolean().optional(),
|
|
149
81
|
});
|
|
150
82
|
|
|
151
|
-
export const
|
|
152
|
-
|
|
83
|
+
export const externalSchema = z.object({
|
|
84
|
+
url: z.string(),
|
|
153
85
|
});
|
|
154
86
|
|
|
155
|
-
export const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
z.literal('
|
|
159
|
-
z.literal('POST'),
|
|
160
|
-
z.literal('PUT'),
|
|
161
|
-
z.literal('PATCH'),
|
|
162
|
-
z.literal('DELETE'),
|
|
87
|
+
export const columnsLayoutBiasSchema = z.union([
|
|
88
|
+
z.literal('none'),
|
|
89
|
+
z.literal('left'),
|
|
90
|
+
z.literal('right'),
|
|
163
91
|
]);
|
|
164
92
|
|
|
165
93
|
export const sizeSchema = z.union([
|
|
@@ -170,6 +98,25 @@ export const sizeSchema = z.union([
|
|
|
170
98
|
z.literal('xl'),
|
|
171
99
|
]);
|
|
172
100
|
|
|
101
|
+
export const dividerLayoutSchema = z.object({
|
|
102
|
+
type: z.literal('divider'),
|
|
103
|
+
control: z.string().optional(),
|
|
104
|
+
margin: sizeSchema.optional(),
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
export const statusListLayoutStatusSchema = z.union([
|
|
108
|
+
z.literal('not-done'),
|
|
109
|
+
z.literal('pending'),
|
|
110
|
+
z.literal('done'),
|
|
111
|
+
]);
|
|
112
|
+
|
|
113
|
+
export const loadingIndicatorLayoutSchema = z.object({
|
|
114
|
+
type: z.literal('loading-indicator'),
|
|
115
|
+
size: sizeSchema.optional(),
|
|
116
|
+
control: z.string().optional(),
|
|
117
|
+
margin: sizeSchema.optional(),
|
|
118
|
+
});
|
|
119
|
+
|
|
173
120
|
export const contextSchema = z.union([
|
|
174
121
|
z.literal('positive'),
|
|
175
122
|
z.literal('neutral'),
|
|
@@ -181,89 +128,54 @@ export const contextSchema = z.union([
|
|
|
181
128
|
z.literal('primary'),
|
|
182
129
|
]);
|
|
183
130
|
|
|
184
|
-
export const imageLayoutSchema = z.object({
|
|
185
|
-
type: z.literal('image'),
|
|
186
|
-
text: z.string().optional(),
|
|
187
|
-
url: z.string(),
|
|
188
|
-
size: sizeSchema.optional(),
|
|
189
|
-
accessibilityDescription: z.string().optional(),
|
|
190
|
-
control: z.string().optional(),
|
|
191
|
-
margin: sizeSchema.optional(),
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
export const searchSearchRequestSchema = z.object({
|
|
195
|
-
url: z.string(),
|
|
196
|
-
method: httpMethodSchema,
|
|
197
|
-
param: z.string(),
|
|
198
|
-
query: z.string(),
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
export const errorResponseBodySchema = z.object({
|
|
202
|
-
refreshFormUrl: z.string().optional(),
|
|
203
|
-
analytics: z.record(z.string()).optional(),
|
|
204
|
-
error: z.string().optional(),
|
|
205
|
-
validation: jsonElementSchema.optional(),
|
|
206
|
-
refreshUrl: z.string().optional(),
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
export const paragraphLayoutSchema = z.object({
|
|
210
|
-
type: z.literal('paragraph'),
|
|
211
|
-
text: z.string(),
|
|
212
|
-
align: alignSchema.optional(),
|
|
213
|
-
control: z.string().optional(),
|
|
214
|
-
margin: sizeSchema.optional(),
|
|
215
|
-
});
|
|
216
|
-
|
|
217
131
|
export const instructionsLayoutItemSchema = z.object({
|
|
218
132
|
text: z.string(),
|
|
219
133
|
context: contextSchema,
|
|
220
134
|
tag: z.string().optional(),
|
|
221
135
|
});
|
|
222
136
|
|
|
223
|
-
export const columnsLayoutBiasSchema = z.union([
|
|
224
|
-
z.literal('none'),
|
|
225
|
-
z.literal('left'),
|
|
226
|
-
z.literal('right'),
|
|
227
|
-
]);
|
|
228
|
-
|
|
229
137
|
export const formLayoutSchemaReferenceSchema = z.object({
|
|
230
138
|
$ref: z.string(),
|
|
231
139
|
});
|
|
232
140
|
|
|
233
|
-
export const
|
|
234
|
-
|
|
235
|
-
text: z.string(),
|
|
236
|
-
size: sizeSchema.optional(),
|
|
237
|
-
align: alignSchema.optional(),
|
|
238
|
-
control: z.string().optional(),
|
|
239
|
-
margin: sizeSchema.optional(),
|
|
141
|
+
export const modalLayoutTriggerSchema = z.object({
|
|
142
|
+
title: z.string(),
|
|
240
143
|
});
|
|
241
144
|
|
|
242
|
-
export const
|
|
243
|
-
type: z.literal('
|
|
145
|
+
export const instructionsLayoutSchema = z.object({
|
|
146
|
+
type: z.literal('instructions'),
|
|
147
|
+
title: z.string().optional(),
|
|
148
|
+
items: z.array(instructionsLayoutItemSchema),
|
|
244
149
|
control: z.string().optional(),
|
|
245
150
|
margin: sizeSchema.optional(),
|
|
246
151
|
});
|
|
247
152
|
|
|
248
|
-
export const
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
153
|
+
export const reviewLayoutFieldSchema = z.object({
|
|
154
|
+
label: z.string(),
|
|
155
|
+
value: z.string(),
|
|
156
|
+
rawValue: z.string().optional(),
|
|
157
|
+
help: helpSchema.optional(),
|
|
158
|
+
tag: z.string().optional(),
|
|
254
159
|
});
|
|
255
160
|
|
|
256
|
-
export const
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
161
|
+
export const alignSchema = z.union([z.literal('left'), z.literal('center'), z.literal('right')]);
|
|
162
|
+
|
|
163
|
+
export const searchLayoutSchema = z.object({
|
|
164
|
+
type: z.literal('search'),
|
|
165
|
+
title: z.string(),
|
|
166
|
+
method: httpMethodSchema,
|
|
167
|
+
url: z.string(),
|
|
168
|
+
param: z.string(),
|
|
169
|
+
emptyMessage: z.string().optional(),
|
|
260
170
|
control: z.string().optional(),
|
|
261
171
|
margin: sizeSchema.optional(),
|
|
262
172
|
});
|
|
263
173
|
|
|
264
|
-
export const
|
|
265
|
-
type: z.literal('
|
|
174
|
+
export const headingLayoutSchema = z.object({
|
|
175
|
+
type: z.literal('heading'),
|
|
176
|
+
text: z.string(),
|
|
266
177
|
size: sizeSchema.optional(),
|
|
178
|
+
align: alignSchema.optional(),
|
|
267
179
|
control: z.string().optional(),
|
|
268
180
|
margin: sizeSchema.optional(),
|
|
269
181
|
});
|
|
@@ -276,79 +188,131 @@ export const markdownLayoutSchema = z.object({
|
|
|
276
188
|
margin: sizeSchema.optional(),
|
|
277
189
|
});
|
|
278
190
|
|
|
279
|
-
export const
|
|
280
|
-
type: z.literal('
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
url: z.string(),
|
|
284
|
-
param: z.string(),
|
|
285
|
-
emptyMessage: z.string().optional(),
|
|
191
|
+
export const paragraphLayoutSchema = z.object({
|
|
192
|
+
type: z.literal('paragraph'),
|
|
193
|
+
text: z.string(),
|
|
194
|
+
align: alignSchema.optional(),
|
|
286
195
|
control: z.string().optional(),
|
|
287
196
|
margin: sizeSchema.optional(),
|
|
288
197
|
});
|
|
289
198
|
|
|
290
|
-
export const modalLayoutTriggerSchema = z.object({
|
|
291
|
-
title: z.string(),
|
|
292
|
-
});
|
|
293
|
-
|
|
294
199
|
export const listLayoutStatusSchema = z.union([
|
|
295
200
|
z.literal('warning'),
|
|
296
201
|
z.literal('neutral'),
|
|
297
202
|
z.literal('positive'),
|
|
298
203
|
]);
|
|
299
204
|
|
|
300
|
-
export const
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
help: helpSchema.optional(),
|
|
305
|
-
tag: z.string().optional(),
|
|
205
|
+
export const imageSchema = z.object({
|
|
206
|
+
text: z.string().optional(),
|
|
207
|
+
url: z.string(),
|
|
208
|
+
accessibilityDescription: z.string().optional(),
|
|
306
209
|
});
|
|
307
210
|
|
|
308
|
-
export const
|
|
309
|
-
z.
|
|
310
|
-
z.
|
|
311
|
-
z.
|
|
312
|
-
|
|
211
|
+
export const errorResponseBodySchema = z.object({
|
|
212
|
+
refreshFormUrl: z.string().optional(),
|
|
213
|
+
analytics: z.record(z.string()).optional(),
|
|
214
|
+
error: z.string().optional(),
|
|
215
|
+
validation: jsonElementSchema.optional(),
|
|
216
|
+
refreshUrl: z.string().optional(),
|
|
217
|
+
});
|
|
313
218
|
|
|
314
|
-
export const
|
|
219
|
+
export const searchSearchRequestSchema = z.object({
|
|
315
220
|
url: z.string(),
|
|
221
|
+
method: httpMethodSchema,
|
|
222
|
+
param: z.string(),
|
|
223
|
+
query: z.string(),
|
|
316
224
|
});
|
|
317
225
|
|
|
318
|
-
export const
|
|
319
|
-
z.literal('
|
|
320
|
-
z.literal('
|
|
321
|
-
z.literal('
|
|
322
|
-
z.literal('
|
|
323
|
-
z.literal('
|
|
226
|
+
export const autocompleteTokenSchema = z.union([
|
|
227
|
+
z.literal('on'),
|
|
228
|
+
z.literal('name'),
|
|
229
|
+
z.literal('name-prefix'),
|
|
230
|
+
z.literal('given-name'),
|
|
231
|
+
z.literal('additional-name'),
|
|
232
|
+
z.literal('family-name'),
|
|
233
|
+
z.literal('name-suffix'),
|
|
234
|
+
z.literal('nickname'),
|
|
235
|
+
z.literal('email'),
|
|
236
|
+
z.literal('username'),
|
|
237
|
+
z.literal('new-username'),
|
|
238
|
+
z.literal('new-password'),
|
|
239
|
+
z.literal('password'),
|
|
240
|
+
z.literal('one-time-code'),
|
|
241
|
+
z.literal('job-title'),
|
|
242
|
+
z.literal('organization-name'),
|
|
243
|
+
z.literal('full-street-address'),
|
|
244
|
+
z.literal('street-address-line-1'),
|
|
245
|
+
z.literal('street-address-line-2'),
|
|
246
|
+
z.literal('street-address-line-3'),
|
|
247
|
+
z.literal('address-level-1'),
|
|
248
|
+
z.literal('address-level-2'),
|
|
249
|
+
z.literal('address-level-3'),
|
|
250
|
+
z.literal('address-level-4'),
|
|
251
|
+
z.literal('country-code'),
|
|
252
|
+
z.literal('country-name'),
|
|
253
|
+
z.literal('postal-code'),
|
|
254
|
+
z.literal('credit-card-name'),
|
|
255
|
+
z.literal('credit-card-given-name'),
|
|
256
|
+
z.literal('credit-card-middle-name'),
|
|
257
|
+
z.literal('credit-card-family-name'),
|
|
258
|
+
z.literal('credit-card-number'),
|
|
259
|
+
z.literal('credit-card-expiration'),
|
|
260
|
+
z.literal('credit-card-expiration-month'),
|
|
261
|
+
z.literal('credit-card-expiration-year'),
|
|
262
|
+
z.literal('credit-card-security-code'),
|
|
263
|
+
z.literal('credit-card-type'),
|
|
264
|
+
z.literal('transaction-currency'),
|
|
265
|
+
z.literal('transaction-amount'),
|
|
266
|
+
z.literal('language'),
|
|
267
|
+
z.literal('birthdate'),
|
|
268
|
+
z.literal('birthdate-day'),
|
|
269
|
+
z.literal('birthdate-month'),
|
|
270
|
+
z.literal('birthdate-year'),
|
|
271
|
+
z.literal('gender'),
|
|
272
|
+
z.literal('phone-number'),
|
|
273
|
+
z.literal('phone-country-code'),
|
|
274
|
+
z.literal('phone-national'),
|
|
275
|
+
z.literal('phone-area-code'),
|
|
276
|
+
z.literal('phone-local'),
|
|
277
|
+
z.literal('phone-local-prefix'),
|
|
278
|
+
z.literal('phone-local-suffix'),
|
|
279
|
+
z.literal('phone-extension'),
|
|
280
|
+
z.literal('url'),
|
|
281
|
+
z.literal('photo'),
|
|
282
|
+
z.literal('impp'),
|
|
283
|
+
z.literal('shipping'),
|
|
284
|
+
z.literal('billing'),
|
|
285
|
+
z.literal('home'),
|
|
286
|
+
z.literal('work'),
|
|
287
|
+
z.literal('mobile'),
|
|
288
|
+
z.literal('fax'),
|
|
289
|
+
z.literal('pager'),
|
|
324
290
|
]);
|
|
325
291
|
|
|
326
|
-
export const
|
|
327
|
-
z.literal('
|
|
328
|
-
z.literal('
|
|
329
|
-
z.literal('
|
|
330
|
-
z.literal('
|
|
292
|
+
export const autocapitalizationTypeSchema = z.union([
|
|
293
|
+
z.literal('none'),
|
|
294
|
+
z.literal('characters'),
|
|
295
|
+
z.literal('sentences'),
|
|
296
|
+
z.literal('words'),
|
|
331
297
|
]);
|
|
332
298
|
|
|
333
|
-
export const
|
|
334
|
-
|
|
335
|
-
export const validateAsyncSchema = z.object({
|
|
336
|
-
param: z.string(),
|
|
337
|
-
method: httpMethodSchema,
|
|
338
|
-
url: z.string(),
|
|
299
|
+
export const iconNamedSchema = z.object({
|
|
300
|
+
name: z.string(),
|
|
339
301
|
});
|
|
340
302
|
|
|
341
|
-
export const
|
|
342
|
-
|
|
343
|
-
defaultDescription: z.string().optional(),
|
|
344
|
-
defaultIcon: iconSchema.optional(),
|
|
345
|
-
defaultImage: imageLayoutSchema.optional(),
|
|
346
|
-
providesTitle: z.boolean().optional(),
|
|
347
|
-
providesDescription: z.boolean().optional(),
|
|
348
|
-
providesIcon: z.boolean().optional(),
|
|
349
|
-
providesImage: z.boolean().optional(),
|
|
303
|
+
export const iconTextSchema = z.object({
|
|
304
|
+
text: z.string(),
|
|
350
305
|
});
|
|
351
306
|
|
|
307
|
+
export const stringSchemaFormatSchema = z.union([
|
|
308
|
+
z.literal('date'),
|
|
309
|
+
z.literal('email'),
|
|
310
|
+
z.literal('numeric'),
|
|
311
|
+
z.literal('password'),
|
|
312
|
+
z.literal('phone-number'),
|
|
313
|
+
z.literal('base64url'),
|
|
314
|
+
]);
|
|
315
|
+
|
|
352
316
|
export const actionSchema = z.object({
|
|
353
317
|
title: z.string().optional(),
|
|
354
318
|
type: actionTypeSchema.optional(),
|
|
@@ -365,42 +329,42 @@ export const actionSchema = z.object({
|
|
|
365
329
|
skipValidation: z.boolean().optional(),
|
|
366
330
|
});
|
|
367
331
|
|
|
368
|
-
export const
|
|
369
|
-
|
|
332
|
+
export const navigationBackBehaviorSchema = z.object({
|
|
333
|
+
title: z.string().optional(),
|
|
370
334
|
action: actionSchema,
|
|
371
335
|
});
|
|
372
336
|
|
|
373
|
-
export const
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
description: z.string().optional(),
|
|
377
|
-
icon: iconSchema.optional(),
|
|
378
|
-
image: imageLayoutSchema.optional(),
|
|
379
|
-
value: actionSchema,
|
|
337
|
+
export const linkHandlerSchema = z.object({
|
|
338
|
+
regexPattern: z.string(),
|
|
339
|
+
action: actionSchema,
|
|
380
340
|
});
|
|
381
341
|
|
|
382
|
-
export const
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
description: z.string().optional(),
|
|
386
|
-
icon: iconSchema.optional(),
|
|
387
|
-
image: imageLayoutSchema.optional(),
|
|
388
|
-
value: searchSearchRequestSchema,
|
|
342
|
+
export const stepErrorSchema = z.object({
|
|
343
|
+
error: z.string().optional(),
|
|
344
|
+
validation: jsonElementSchema.optional(),
|
|
389
345
|
});
|
|
390
346
|
|
|
391
|
-
export const
|
|
347
|
+
export const pollingOnErrorSchema = z.object({
|
|
392
348
|
action: actionSchema,
|
|
393
349
|
});
|
|
394
350
|
|
|
395
|
-
export const
|
|
396
|
-
|
|
397
|
-
|
|
351
|
+
export const pollingSchema = z.object({
|
|
352
|
+
url: z.string(),
|
|
353
|
+
interval: z.number().optional(),
|
|
354
|
+
delay: z.number().optional(),
|
|
355
|
+
timeout: z.number().optional(),
|
|
356
|
+
maxAttempts: z.number(),
|
|
357
|
+
onError: pollingOnErrorSchema,
|
|
398
358
|
});
|
|
399
359
|
|
|
400
|
-
export const
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
360
|
+
export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
361
|
+
|
|
362
|
+
export const imageLayoutSchema = z.object({
|
|
363
|
+
type: z.literal('image'),
|
|
364
|
+
text: z.string().optional(),
|
|
365
|
+
url: z.string(),
|
|
366
|
+
size: sizeSchema.optional(),
|
|
367
|
+
accessibilityDescription: z.string().optional(),
|
|
404
368
|
control: z.string().optional(),
|
|
405
369
|
margin: sizeSchema.optional(),
|
|
406
370
|
});
|
|
@@ -415,11 +379,6 @@ export const decisionLayoutOptionSchema = z.object({
|
|
|
415
379
|
tag: z.string().optional(),
|
|
416
380
|
});
|
|
417
381
|
|
|
418
|
-
export const behaviorSchema = z.object({
|
|
419
|
-
action: actionSchema.optional(),
|
|
420
|
-
link: linkSchema.optional(),
|
|
421
|
-
});
|
|
422
|
-
|
|
423
382
|
export const buttonLayoutSchema = z.object({
|
|
424
383
|
type: z.literal('button'),
|
|
425
384
|
size: sizeSchema.optional(),
|
|
@@ -432,29 +391,35 @@ export const buttonLayoutSchema = z.object({
|
|
|
432
391
|
margin: sizeSchema.optional(),
|
|
433
392
|
});
|
|
434
393
|
|
|
435
|
-
export const
|
|
436
|
-
type: z.literal('
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
394
|
+
export const formLayoutSchema = z.object({
|
|
395
|
+
type: z.literal('form'),
|
|
396
|
+
schema: formLayoutSchemaReferenceSchema.optional(),
|
|
397
|
+
schemaId: z.string(),
|
|
398
|
+
control: z.string().optional(),
|
|
399
|
+
margin: sizeSchema.optional(),
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
export const reviewLayoutCallToActionSchema = z.object({
|
|
403
|
+
title: z.string(),
|
|
404
|
+
action: actionSchema,
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
export const infoLayoutSchema = z.object({
|
|
408
|
+
type: z.literal('info'),
|
|
409
|
+
markdown: z.string(),
|
|
410
|
+
align: alignSchema.optional(),
|
|
411
|
+
control: z.string().optional(),
|
|
412
|
+
margin: sizeSchema.optional(),
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
export const decisionLayoutSchema = z.object({
|
|
416
|
+
type: z.literal('decision'),
|
|
440
417
|
title: z.string().optional(),
|
|
441
|
-
|
|
418
|
+
options: z.array(decisionLayoutOptionSchema),
|
|
442
419
|
control: z.string().optional(),
|
|
443
420
|
margin: sizeSchema.optional(),
|
|
444
421
|
});
|
|
445
422
|
|
|
446
|
-
export const itemCallToActionSchema = z.object({
|
|
447
|
-
title: z.string(),
|
|
448
|
-
accessibilityDescription: z.string().optional(),
|
|
449
|
-
behavior: behaviorSchema,
|
|
450
|
-
});
|
|
451
|
-
|
|
452
|
-
export const listLayoutCallToActionSchema = z.object({
|
|
453
|
-
title: z.string(),
|
|
454
|
-
accessibilityDescription: z.string().optional(),
|
|
455
|
-
behavior: behaviorSchema,
|
|
456
|
-
});
|
|
457
|
-
|
|
458
423
|
export const listLayoutItemSchema = z.object({
|
|
459
424
|
description: z.string().optional(),
|
|
460
425
|
status: listLayoutStatusSchema.optional(),
|
|
@@ -467,33 +432,31 @@ export const listLayoutItemSchema = z.object({
|
|
|
467
432
|
tag: z.string().optional(),
|
|
468
433
|
});
|
|
469
434
|
|
|
470
|
-
export const
|
|
471
|
-
title: z.string(),
|
|
472
|
-
description: z.string().optional(),
|
|
473
|
-
icon: iconSchema,
|
|
474
|
-
status: statusListLayoutStatusSchema.optional(),
|
|
475
|
-
callToAction: itemCallToActionSchema.optional(),
|
|
476
|
-
tag: z.string().optional(),
|
|
477
|
-
});
|
|
478
|
-
|
|
479
|
-
export const pollingOnErrorSchema = z.object({
|
|
435
|
+
export const actionResponseBodySchema = z.object({
|
|
480
436
|
action: actionSchema,
|
|
481
437
|
});
|
|
482
438
|
|
|
483
|
-
export const
|
|
484
|
-
|
|
485
|
-
|
|
439
|
+
export const searchResultActionSchema = z.object({
|
|
440
|
+
type: z.literal('action'),
|
|
441
|
+
title: z.string(),
|
|
442
|
+
description: z.string().optional(),
|
|
443
|
+
icon: iconSchema.optional(),
|
|
444
|
+
image: imageLayoutSchema.optional(),
|
|
445
|
+
value: actionSchema,
|
|
486
446
|
});
|
|
487
447
|
|
|
488
|
-
export const
|
|
448
|
+
export const searchResultSearchSchema = z.object({
|
|
449
|
+
type: z.literal('search'),
|
|
450
|
+
title: z.string(),
|
|
451
|
+
description: z.string().optional(),
|
|
452
|
+
icon: iconSchema.optional(),
|
|
453
|
+
image: imageLayoutSchema.optional(),
|
|
454
|
+
value: searchSearchRequestSchema,
|
|
455
|
+
});
|
|
489
456
|
|
|
490
|
-
export const
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
delay: z.number().optional(),
|
|
494
|
-
timeout: z.number().optional(),
|
|
495
|
-
maxAttempts: z.number(),
|
|
496
|
-
onError: pollingOnErrorSchema,
|
|
457
|
+
export const behaviorSchema = z.object({
|
|
458
|
+
action: actionSchema.optional(),
|
|
459
|
+
link: linkSchema.optional(),
|
|
497
460
|
});
|
|
498
461
|
|
|
499
462
|
export const navigationSchema = z.object({
|
|
@@ -502,10 +465,26 @@ export const navigationSchema = z.object({
|
|
|
502
465
|
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
503
466
|
});
|
|
504
467
|
|
|
505
|
-
export const
|
|
468
|
+
export const summarySummariserSchema = z.object({
|
|
469
|
+
defaultTitle: z.string().optional(),
|
|
470
|
+
defaultDescription: z.string().optional(),
|
|
471
|
+
defaultIcon: iconSchema.optional(),
|
|
472
|
+
defaultImage: imageLayoutSchema.optional(),
|
|
473
|
+
providesTitle: z.boolean().optional(),
|
|
474
|
+
providesDescription: z.boolean().optional(),
|
|
475
|
+
providesIcon: z.boolean().optional(),
|
|
476
|
+
providesImage: z.boolean().optional(),
|
|
477
|
+
});
|
|
506
478
|
|
|
507
|
-
export const
|
|
508
|
-
|
|
479
|
+
export const reviewLayoutSchema = z.object({
|
|
480
|
+
type: z.literal('review'),
|
|
481
|
+
orientation: z.string().optional(),
|
|
482
|
+
action: actionSchema.optional(),
|
|
483
|
+
fields: z.array(reviewLayoutFieldSchema),
|
|
484
|
+
title: z.string().optional(),
|
|
485
|
+
callToAction: reviewLayoutCallToActionSchema.optional(),
|
|
486
|
+
control: z.string().optional(),
|
|
487
|
+
margin: sizeSchema.optional(),
|
|
509
488
|
});
|
|
510
489
|
|
|
511
490
|
export const alertLayoutCallToActionSchema = z.object({
|
|
@@ -514,12 +493,25 @@ export const alertLayoutCallToActionSchema = z.object({
|
|
|
514
493
|
behavior: behaviorSchema,
|
|
515
494
|
});
|
|
516
495
|
|
|
517
|
-
export const
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
496
|
+
export const itemCallToActionSchema = z.object({
|
|
497
|
+
title: z.string(),
|
|
498
|
+
accessibilityDescription: z.string().optional(),
|
|
499
|
+
behavior: behaviorSchema,
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
export const alertLayoutSchema = z.object({
|
|
503
|
+
type: z.literal('alert'),
|
|
504
|
+
markdown: z.string(),
|
|
505
|
+
context: contextSchema.optional(),
|
|
521
506
|
control: z.string().optional(),
|
|
522
507
|
margin: sizeSchema.optional(),
|
|
508
|
+
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
export const listLayoutCallToActionSchema = z.object({
|
|
512
|
+
title: z.string(),
|
|
513
|
+
accessibilityDescription: z.string().optional(),
|
|
514
|
+
behavior: behaviorSchema,
|
|
523
515
|
});
|
|
524
516
|
|
|
525
517
|
export const listLayoutSchema = z.object({
|
|
@@ -531,21 +523,10 @@ export const listLayoutSchema = z.object({
|
|
|
531
523
|
margin: sizeSchema.optional(),
|
|
532
524
|
});
|
|
533
525
|
|
|
534
|
-
export const
|
|
535
|
-
type: z.literal('status-list'),
|
|
536
|
-
items: z.array(statusListLayoutItemSchema),
|
|
537
|
-
title: z.string().optional(),
|
|
538
|
-
control: z.string().optional(),
|
|
539
|
-
margin: sizeSchema.optional(),
|
|
540
|
-
});
|
|
526
|
+
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
541
527
|
|
|
542
|
-
export const
|
|
543
|
-
|
|
544
|
-
markdown: z.string(),
|
|
545
|
-
context: contextSchema.optional(),
|
|
546
|
-
control: z.string().optional(),
|
|
547
|
-
margin: sizeSchema.optional(),
|
|
548
|
-
callToAction: alertLayoutCallToActionSchema.optional(),
|
|
528
|
+
export const searchResponseBodySchema = z.object({
|
|
529
|
+
results: z.array(searchResultSchema),
|
|
549
530
|
});
|
|
550
531
|
|
|
551
532
|
export const constSchemaSchema = z.object({
|
|
@@ -588,22 +569,159 @@ export const blobSchemaSchema = z.object({
|
|
|
588
569
|
disabled: z.boolean().optional(),
|
|
589
570
|
});
|
|
590
571
|
|
|
591
|
-
export const
|
|
572
|
+
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
573
|
+
|
|
574
|
+
export const statusListLayoutItemSchema = z.object({
|
|
575
|
+
title: z.string(),
|
|
576
|
+
description: z.string().optional(),
|
|
577
|
+
icon: iconSchema,
|
|
578
|
+
status: statusListLayoutStatusSchema.optional(),
|
|
579
|
+
callToAction: itemCallToActionSchema.optional(),
|
|
580
|
+
tag: z.string().optional(),
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
export const statusListLayoutSchema = z.object({
|
|
584
|
+
type: z.literal('status-list'),
|
|
585
|
+
items: z.array(statusListLayoutItemSchema),
|
|
586
|
+
title: z.string().optional(),
|
|
587
|
+
control: z.string().optional(),
|
|
588
|
+
margin: sizeSchema.optional(),
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
export const persistAsyncSchema: z.ZodSchema<PersistAsync> = z.lazy(() =>
|
|
592
592
|
z.object({
|
|
593
|
-
|
|
593
|
+
param: z.string(),
|
|
594
|
+
idProperty: z.string(),
|
|
595
|
+
schema: schemaSchema,
|
|
596
|
+
url: z.string(),
|
|
597
|
+
method: httpMethodSchema,
|
|
598
|
+
}),
|
|
599
|
+
);
|
|
600
|
+
|
|
601
|
+
export const schemaSchema: z.ZodSchema<Schema> = z.lazy(() =>
|
|
602
|
+
z.union([
|
|
603
|
+
allOfSchemaSchema,
|
|
604
|
+
arraySchemaSchema,
|
|
605
|
+
blobSchemaSchema,
|
|
606
|
+
booleanSchemaSchema,
|
|
607
|
+
constSchemaSchema,
|
|
608
|
+
integerSchemaSchema,
|
|
609
|
+
numberSchemaSchema,
|
|
610
|
+
objectSchemaSchema,
|
|
611
|
+
oneOfSchemaSchema,
|
|
612
|
+
stringSchemaSchema,
|
|
613
|
+
]),
|
|
614
|
+
);
|
|
615
|
+
|
|
616
|
+
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
617
|
+
z.object({
|
|
618
|
+
type: z.literal('columns'),
|
|
619
|
+
left: z.array(layoutSchema),
|
|
620
|
+
right: z.array(layoutSchema),
|
|
621
|
+
bias: columnsLayoutBiasSchema.optional(),
|
|
622
|
+
control: z.string().optional(),
|
|
623
|
+
margin: sizeSchema.optional(),
|
|
624
|
+
}),
|
|
625
|
+
);
|
|
626
|
+
|
|
627
|
+
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
628
|
+
z.union([
|
|
629
|
+
alertLayoutSchema,
|
|
630
|
+
boxLayoutSchema,
|
|
631
|
+
buttonLayoutSchema,
|
|
632
|
+
columnsLayoutSchema,
|
|
633
|
+
decisionLayoutSchema,
|
|
634
|
+
dividerLayoutSchema,
|
|
635
|
+
formLayoutSchema,
|
|
636
|
+
headingLayoutSchema,
|
|
637
|
+
imageLayoutSchema,
|
|
638
|
+
infoLayoutSchema,
|
|
639
|
+
instructionsLayoutSchema,
|
|
640
|
+
listLayoutSchema,
|
|
641
|
+
loadingIndicatorLayoutSchema,
|
|
642
|
+
markdownLayoutSchema,
|
|
643
|
+
modalLayoutSchema,
|
|
644
|
+
paragraphLayoutSchema,
|
|
645
|
+
reviewLayoutSchema,
|
|
646
|
+
searchLayoutSchema,
|
|
647
|
+
statusListLayoutSchema,
|
|
648
|
+
]),
|
|
649
|
+
);
|
|
650
|
+
|
|
651
|
+
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
652
|
+
z.object({
|
|
653
|
+
title: z.string().optional(),
|
|
654
|
+
components: z.array(layoutSchema),
|
|
655
|
+
}),
|
|
656
|
+
);
|
|
657
|
+
|
|
658
|
+
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
659
|
+
z.object({
|
|
660
|
+
type: z.literal('box'),
|
|
661
|
+
components: z.array(layoutSchema),
|
|
662
|
+
width: sizeSchema.optional(),
|
|
663
|
+
border: z.boolean().optional(),
|
|
664
|
+
control: z.string().optional(),
|
|
665
|
+
margin: sizeSchema.optional(),
|
|
666
|
+
}),
|
|
667
|
+
);
|
|
668
|
+
|
|
669
|
+
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
670
|
+
z.object({
|
|
671
|
+
type: z.literal('modal'),
|
|
672
|
+
control: z.string().optional(),
|
|
673
|
+
margin: sizeSchema.optional(),
|
|
674
|
+
trigger: modalLayoutTriggerSchema,
|
|
675
|
+
content: modalLayoutContentSchema,
|
|
676
|
+
}),
|
|
677
|
+
);
|
|
678
|
+
|
|
679
|
+
export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
680
|
+
z.object({
|
|
681
|
+
key: z.string().optional(),
|
|
682
|
+
type: z.string().optional(),
|
|
683
|
+
actions: z.array(actionSchema).optional(),
|
|
684
|
+
refreshFormUrl: z.string().optional(),
|
|
685
|
+
id: z.string(),
|
|
686
|
+
title: z.string(),
|
|
687
|
+
schemas: z.array(schemaSchema),
|
|
688
|
+
layout: z.array(layoutSchema),
|
|
689
|
+
description: z.string().optional(),
|
|
690
|
+
model: jsonElementSchema.optional(),
|
|
691
|
+
external: externalSchema.optional(),
|
|
692
|
+
polling: pollingSchema.optional(),
|
|
693
|
+
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
694
|
+
analytics: z.record(z.string()).optional(),
|
|
695
|
+
errors: stepErrorSchema.optional(),
|
|
696
|
+
navigation: navigationSchema.optional(),
|
|
697
|
+
refreshUrl: z.string().optional(),
|
|
698
|
+
control: z.string().optional(),
|
|
699
|
+
}),
|
|
700
|
+
);
|
|
701
|
+
|
|
702
|
+
export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
703
|
+
z.object({
|
|
704
|
+
type: z.literal('string'),
|
|
594
705
|
autofillProvider: z.string().optional(),
|
|
595
706
|
promoted: z.boolean().optional(),
|
|
596
707
|
refreshFormOnChange: z.boolean().optional(),
|
|
597
708
|
refreshUrl: z.string().optional(),
|
|
598
709
|
refreshFormUrl: z.string().optional(),
|
|
710
|
+
format: stringSchemaFormatSchema.optional(),
|
|
711
|
+
displayFormat: z.string().optional(),
|
|
599
712
|
placeholder: z.string().optional(),
|
|
600
|
-
|
|
601
|
-
|
|
713
|
+
minLength: z.number().optional(),
|
|
714
|
+
maxLength: z.number().optional(),
|
|
715
|
+
minimum: z.string().optional(),
|
|
716
|
+
maximum: z.string().optional(),
|
|
717
|
+
pattern: z.string().optional(),
|
|
718
|
+
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
719
|
+
autocorrect: z.boolean().optional(),
|
|
602
720
|
$id: z.string().optional(),
|
|
603
721
|
title: z.string().optional(),
|
|
604
722
|
description: z.string().optional(),
|
|
605
723
|
control: z.string().optional(),
|
|
606
|
-
default: z.
|
|
724
|
+
default: z.string().optional(),
|
|
607
725
|
hidden: z.boolean().optional(),
|
|
608
726
|
disabled: z.boolean().optional(),
|
|
609
727
|
icon: iconSchema.optional(),
|
|
@@ -616,71 +734,63 @@ export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
|
616
734
|
validationAsync: validateAsyncSchema.optional(),
|
|
617
735
|
validationMessages: z.record(z.string()).optional(),
|
|
618
736
|
alert: alertLayoutSchema.optional(),
|
|
737
|
+
cameraConfig: jsonElementSchema.optional(),
|
|
738
|
+
accepts: z.array(z.string()).optional(),
|
|
739
|
+
maxSize: z.number().optional(),
|
|
740
|
+
source: uploadSourceSchema.optional(),
|
|
619
741
|
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
620
742
|
autofillKey: z.string().optional(),
|
|
621
743
|
help: helpSchema.optional(),
|
|
622
744
|
}),
|
|
623
745
|
);
|
|
624
746
|
|
|
625
|
-
export const
|
|
626
|
-
z.object({
|
|
627
|
-
param: z.string(),
|
|
628
|
-
idProperty: z.string(),
|
|
629
|
-
schema: schemaSchema,
|
|
630
|
-
url: z.string(),
|
|
631
|
-
method: httpMethodSchema,
|
|
632
|
-
}),
|
|
633
|
-
);
|
|
634
|
-
|
|
635
|
-
export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
|
|
747
|
+
export const oneOfSchemaSchema: z.ZodSchema<OneOfSchema> = z.lazy(() =>
|
|
636
748
|
z.object({
|
|
637
|
-
|
|
749
|
+
autofillProvider: z.string().optional(),
|
|
638
750
|
promoted: z.boolean().optional(),
|
|
751
|
+
refreshFormOnChange: z.boolean().optional(),
|
|
752
|
+
refreshUrl: z.string().optional(),
|
|
753
|
+
refreshFormUrl: z.string().optional(),
|
|
754
|
+
promotion: jsonElementSchema.optional(),
|
|
755
|
+
oneOf: z.array(schemaSchema),
|
|
756
|
+
placeholder: z.string().optional(),
|
|
639
757
|
$id: z.string().optional(),
|
|
640
|
-
items: z.array(schemaSchema),
|
|
641
758
|
title: z.string().optional(),
|
|
642
759
|
description: z.string().optional(),
|
|
643
760
|
control: z.string().optional(),
|
|
761
|
+
default: jsonElementSchema.optional(),
|
|
644
762
|
hidden: z.boolean().optional(),
|
|
645
763
|
icon: iconSchema.optional(),
|
|
646
764
|
image: imageSchema.optional(),
|
|
647
765
|
keywords: z.array(z.string()).optional(),
|
|
648
766
|
summary: summaryProviderSchema.optional(),
|
|
649
767
|
analyticsId: z.string().optional(),
|
|
650
|
-
|
|
651
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
768
|
+
refreshStepOnChange: z.boolean().optional(),
|
|
652
769
|
alert: alertLayoutSchema.optional(),
|
|
770
|
+
help: helpSchema.optional(),
|
|
771
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
772
|
+
autofillKey: z.string().optional(),
|
|
773
|
+
validationMessages: z.record(z.string()).optional(),
|
|
774
|
+
disabled: z.boolean().optional(),
|
|
653
775
|
}),
|
|
654
776
|
);
|
|
655
777
|
|
|
656
|
-
export const
|
|
657
|
-
z.union([
|
|
658
|
-
allOfSchemaSchema,
|
|
659
|
-
arraySchemaSchema,
|
|
660
|
-
blobSchemaSchema,
|
|
661
|
-
booleanSchemaSchema,
|
|
662
|
-
constSchemaSchema,
|
|
663
|
-
integerSchemaSchema,
|
|
664
|
-
numberSchemaSchema,
|
|
665
|
-
objectSchemaSchema,
|
|
666
|
-
oneOfSchemaSchema,
|
|
667
|
-
stringSchemaSchema,
|
|
668
|
-
]),
|
|
669
|
-
);
|
|
670
|
-
|
|
671
|
-
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
778
|
+
export const numberSchemaSchema: z.ZodSchema<NumberSchema> = z.lazy(() =>
|
|
672
779
|
z.object({
|
|
673
|
-
type: z.literal('
|
|
780
|
+
type: z.literal('number'),
|
|
674
781
|
autofillProvider: z.string().optional(),
|
|
675
782
|
promoted: z.boolean().optional(),
|
|
676
783
|
refreshFormOnChange: z.boolean().optional(),
|
|
677
784
|
refreshUrl: z.string().optional(),
|
|
678
785
|
refreshFormUrl: z.string().optional(),
|
|
786
|
+
placeholder: z.string().optional(),
|
|
787
|
+
minimum: z.number().optional(),
|
|
788
|
+
maximum: z.number().optional(),
|
|
679
789
|
$id: z.string().optional(),
|
|
680
790
|
title: z.string().optional(),
|
|
681
791
|
description: z.string().optional(),
|
|
682
792
|
control: z.string().optional(),
|
|
683
|
-
default: z.
|
|
793
|
+
default: z.number().optional(),
|
|
684
794
|
hidden: z.boolean().optional(),
|
|
685
795
|
disabled: z.boolean().optional(),
|
|
686
796
|
icon: iconSchema.optional(),
|
|
@@ -691,18 +801,20 @@ export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
|
691
801
|
persistAsync: persistAsyncSchema.optional(),
|
|
692
802
|
refreshStepOnChange: z.boolean().optional(),
|
|
693
803
|
validationAsync: validateAsyncSchema.optional(),
|
|
804
|
+
validationMessages: z.record(z.string()).optional(),
|
|
694
805
|
alert: alertLayoutSchema.optional(),
|
|
806
|
+
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
695
807
|
autofillKey: z.string().optional(),
|
|
696
808
|
help: helpSchema.optional(),
|
|
697
809
|
}),
|
|
698
810
|
);
|
|
699
811
|
|
|
700
|
-
export const
|
|
812
|
+
export const arraySchemaTupleSchema: z.ZodSchema<ArraySchemaTuple> = z.lazy(() =>
|
|
701
813
|
z.object({
|
|
702
|
-
|
|
814
|
+
type: z.literal('array'),
|
|
703
815
|
promoted: z.boolean().optional(),
|
|
704
|
-
allOf: z.array(schemaSchema),
|
|
705
816
|
$id: z.string().optional(),
|
|
817
|
+
items: z.array(schemaSchema),
|
|
706
818
|
title: z.string().optional(),
|
|
707
819
|
description: z.string().optional(),
|
|
708
820
|
control: z.string().optional(),
|
|
@@ -712,14 +824,12 @@ export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
|
712
824
|
keywords: z.array(z.string()).optional(),
|
|
713
825
|
summary: summaryProviderSchema.optional(),
|
|
714
826
|
analyticsId: z.string().optional(),
|
|
827
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
828
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
715
829
|
alert: alertLayoutSchema.optional(),
|
|
716
830
|
}),
|
|
717
831
|
);
|
|
718
832
|
|
|
719
|
-
export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
|
|
720
|
-
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
721
|
-
);
|
|
722
|
-
|
|
723
833
|
export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
724
834
|
z.object({
|
|
725
835
|
type: z.literal('integer'),
|
|
@@ -754,16 +864,21 @@ export const integerSchemaSchema: z.ZodSchema<IntegerSchema> = z.lazy(() =>
|
|
|
754
864
|
}),
|
|
755
865
|
);
|
|
756
866
|
|
|
757
|
-
export const
|
|
867
|
+
export const arraySchemaSchema: z.ZodSchema<ArraySchema> = z.lazy(() =>
|
|
868
|
+
z.union([arraySchemaListSchema, arraySchemaTupleSchema]),
|
|
869
|
+
);
|
|
870
|
+
|
|
871
|
+
export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
758
872
|
z.object({
|
|
759
|
-
type: z.literal('
|
|
760
|
-
disabled: z.boolean().optional(),
|
|
873
|
+
type: z.literal('array'),
|
|
761
874
|
promoted: z.boolean().optional(),
|
|
762
|
-
help: helpSchema.optional(),
|
|
763
|
-
properties: z.record(schemaSchema),
|
|
764
|
-
displayOrder: z.array(z.string()),
|
|
765
|
-
required: z.array(z.string()).optional(),
|
|
766
875
|
$id: z.string().optional(),
|
|
876
|
+
items: schemaSchema,
|
|
877
|
+
addItemTitle: z.string(),
|
|
878
|
+
editItemTitle: z.string(),
|
|
879
|
+
minItems: z.number().optional(),
|
|
880
|
+
maxItems: z.number().optional(),
|
|
881
|
+
placeholder: z.string().optional(),
|
|
767
882
|
title: z.string().optional(),
|
|
768
883
|
description: z.string().optional(),
|
|
769
884
|
control: z.string().optional(),
|
|
@@ -771,66 +886,48 @@ export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
|
771
886
|
icon: iconSchema.optional(),
|
|
772
887
|
image: imageSchema.optional(),
|
|
773
888
|
keywords: z.array(z.string()).optional(),
|
|
774
|
-
summary:
|
|
889
|
+
summary: summarySummariserSchema.optional(),
|
|
775
890
|
analyticsId: z.string().optional(),
|
|
891
|
+
persistAsync: persistAsyncSchema.optional(),
|
|
892
|
+
validationAsync: validateAsyncSchema.optional(),
|
|
776
893
|
alert: alertLayoutSchema.optional(),
|
|
894
|
+
validationMessages: z.record(z.string()).optional(),
|
|
895
|
+
disabled: z.boolean().optional(),
|
|
777
896
|
}),
|
|
778
897
|
);
|
|
779
898
|
|
|
780
|
-
export const
|
|
899
|
+
export const allOfSchemaSchema: z.ZodSchema<AllOfSchema> = z.lazy(() =>
|
|
781
900
|
z.object({
|
|
782
|
-
|
|
901
|
+
disabled: z.boolean().optional(),
|
|
783
902
|
promoted: z.boolean().optional(),
|
|
784
|
-
|
|
785
|
-
refreshUrl: z.string().optional(),
|
|
786
|
-
refreshFormUrl: z.string().optional(),
|
|
787
|
-
promotion: jsonElementSchema.optional(),
|
|
788
|
-
oneOf: z.array(schemaSchema),
|
|
789
|
-
placeholder: z.string().optional(),
|
|
903
|
+
allOf: z.array(schemaSchema),
|
|
790
904
|
$id: z.string().optional(),
|
|
791
905
|
title: z.string().optional(),
|
|
792
906
|
description: z.string().optional(),
|
|
793
907
|
control: z.string().optional(),
|
|
794
|
-
default: jsonElementSchema.optional(),
|
|
795
908
|
hidden: z.boolean().optional(),
|
|
796
909
|
icon: iconSchema.optional(),
|
|
797
910
|
image: imageSchema.optional(),
|
|
798
911
|
keywords: z.array(z.string()).optional(),
|
|
799
912
|
summary: summaryProviderSchema.optional(),
|
|
800
913
|
analyticsId: z.string().optional(),
|
|
801
|
-
refreshStepOnChange: z.boolean().optional(),
|
|
802
914
|
alert: alertLayoutSchema.optional(),
|
|
803
|
-
help: helpSchema.optional(),
|
|
804
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
805
|
-
autofillKey: z.string().optional(),
|
|
806
|
-
validationMessages: z.record(z.string()).optional(),
|
|
807
|
-
disabled: z.boolean().optional(),
|
|
808
915
|
}),
|
|
809
916
|
);
|
|
810
917
|
|
|
811
|
-
export const
|
|
918
|
+
export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
812
919
|
z.object({
|
|
813
|
-
type: z.literal('
|
|
920
|
+
type: z.literal('boolean'),
|
|
814
921
|
autofillProvider: z.string().optional(),
|
|
815
922
|
promoted: z.boolean().optional(),
|
|
816
923
|
refreshFormOnChange: z.boolean().optional(),
|
|
817
924
|
refreshUrl: z.string().optional(),
|
|
818
925
|
refreshFormUrl: z.string().optional(),
|
|
819
|
-
format: stringSchemaFormatSchema.optional(),
|
|
820
|
-
displayFormat: z.string().optional(),
|
|
821
|
-
placeholder: z.string().optional(),
|
|
822
|
-
minLength: z.number().optional(),
|
|
823
|
-
maxLength: z.number().optional(),
|
|
824
|
-
minimum: z.string().optional(),
|
|
825
|
-
maximum: z.string().optional(),
|
|
826
|
-
pattern: z.string().optional(),
|
|
827
|
-
autocapitalization: autocapitalizationTypeSchema.optional(),
|
|
828
|
-
autocorrect: z.boolean().optional(),
|
|
829
926
|
$id: z.string().optional(),
|
|
830
927
|
title: z.string().optional(),
|
|
831
928
|
description: z.string().optional(),
|
|
832
929
|
control: z.string().optional(),
|
|
833
|
-
default: z.
|
|
930
|
+
default: z.boolean().optional(),
|
|
834
931
|
hidden: z.boolean().optional(),
|
|
835
932
|
disabled: z.boolean().optional(),
|
|
836
933
|
icon: iconSchema.optional(),
|
|
@@ -841,29 +938,22 @@ export const stringSchemaSchema: z.ZodSchema<StringSchema> = z.lazy(() =>
|
|
|
841
938
|
persistAsync: persistAsyncSchema.optional(),
|
|
842
939
|
refreshStepOnChange: z.boolean().optional(),
|
|
843
940
|
validationAsync: validateAsyncSchema.optional(),
|
|
844
|
-
validationMessages: z.record(z.string()).optional(),
|
|
845
941
|
alert: alertLayoutSchema.optional(),
|
|
846
|
-
cameraConfig: jsonElementSchema.optional(),
|
|
847
|
-
accepts: z.array(z.string()).optional(),
|
|
848
|
-
maxSize: z.number().optional(),
|
|
849
|
-
source: uploadSourceSchema.optional(),
|
|
850
|
-
autocompleteHint: z.array(autocompleteTokenSchema).optional(),
|
|
851
942
|
autofillKey: z.string().optional(),
|
|
852
943
|
help: helpSchema.optional(),
|
|
853
944
|
}),
|
|
854
945
|
);
|
|
855
946
|
|
|
856
|
-
export const
|
|
947
|
+
export const objectSchemaSchema: z.ZodSchema<ObjectSchema> = z.lazy(() =>
|
|
857
948
|
z.object({
|
|
858
|
-
type: z.literal('
|
|
949
|
+
type: z.literal('object'),
|
|
950
|
+
disabled: z.boolean().optional(),
|
|
859
951
|
promoted: z.boolean().optional(),
|
|
952
|
+
help: helpSchema.optional(),
|
|
953
|
+
properties: z.record(schemaSchema),
|
|
954
|
+
displayOrder: z.array(z.string()),
|
|
955
|
+
required: z.array(z.string()).optional(),
|
|
860
956
|
$id: z.string().optional(),
|
|
861
|
-
items: schemaSchema,
|
|
862
|
-
addItemTitle: z.string(),
|
|
863
|
-
editItemTitle: z.string(),
|
|
864
|
-
minItems: z.number().optional(),
|
|
865
|
-
maxItems: z.number().optional(),
|
|
866
|
-
placeholder: z.string().optional(),
|
|
867
957
|
title: z.string().optional(),
|
|
868
958
|
description: z.string().optional(),
|
|
869
959
|
control: z.string().optional(),
|
|
@@ -871,98 +961,8 @@ export const arraySchemaListSchema: z.ZodSchema<ArraySchemaList> = z.lazy(() =>
|
|
|
871
961
|
icon: iconSchema.optional(),
|
|
872
962
|
image: imageSchema.optional(),
|
|
873
963
|
keywords: z.array(z.string()).optional(),
|
|
874
|
-
summary:
|
|
964
|
+
summary: summaryProviderSchema.optional(),
|
|
875
965
|
analyticsId: z.string().optional(),
|
|
876
|
-
persistAsync: persistAsyncSchema.optional(),
|
|
877
|
-
validationAsync: validateAsyncSchema.optional(),
|
|
878
966
|
alert: alertLayoutSchema.optional(),
|
|
879
|
-
validationMessages: z.record(z.string()).optional(),
|
|
880
|
-
disabled: z.boolean().optional(),
|
|
881
|
-
}),
|
|
882
|
-
);
|
|
883
|
-
|
|
884
|
-
export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
|
|
885
|
-
z.object({
|
|
886
|
-
key: z.string().optional(),
|
|
887
|
-
type: z.string().optional(),
|
|
888
|
-
actions: z.array(actionSchema).optional(),
|
|
889
|
-
refreshFormUrl: z.string().optional(),
|
|
890
|
-
id: z.string(),
|
|
891
|
-
title: z.string(),
|
|
892
|
-
schemas: z.array(schemaSchema),
|
|
893
|
-
layout: z.array(layoutSchema),
|
|
894
|
-
description: z.string().optional(),
|
|
895
|
-
model: jsonElementSchema.optional(),
|
|
896
|
-
external: externalSchema.optional(),
|
|
897
|
-
polling: pollingSchema.optional(),
|
|
898
|
-
linkHandlers: z.array(linkHandlerSchema).optional(),
|
|
899
|
-
analytics: z.record(z.string()).optional(),
|
|
900
|
-
errors: stepErrorSchema.optional(),
|
|
901
|
-
navigation: navigationSchema.optional(),
|
|
902
|
-
refreshUrl: z.string().optional(),
|
|
903
|
-
control: z.string().optional(),
|
|
904
|
-
}),
|
|
905
|
-
);
|
|
906
|
-
|
|
907
|
-
export const layoutSchema: z.ZodSchema<Layout> = z.lazy(() =>
|
|
908
|
-
z.union([
|
|
909
|
-
alertLayoutSchema,
|
|
910
|
-
boxLayoutSchema,
|
|
911
|
-
buttonLayoutSchema,
|
|
912
|
-
columnsLayoutSchema,
|
|
913
|
-
decisionLayoutSchema,
|
|
914
|
-
dividerLayoutSchema,
|
|
915
|
-
formLayoutSchema,
|
|
916
|
-
headingLayoutSchema,
|
|
917
|
-
imageLayoutSchema,
|
|
918
|
-
infoLayoutSchema,
|
|
919
|
-
instructionsLayoutSchema,
|
|
920
|
-
listLayoutSchema,
|
|
921
|
-
loadingIndicatorLayoutSchema,
|
|
922
|
-
markdownLayoutSchema,
|
|
923
|
-
modalLayoutSchema,
|
|
924
|
-
paragraphLayoutSchema,
|
|
925
|
-
reviewLayoutSchema,
|
|
926
|
-
searchLayoutSchema,
|
|
927
|
-
statusListLayoutSchema,
|
|
928
|
-
]),
|
|
929
|
-
);
|
|
930
|
-
|
|
931
|
-
export const columnsLayoutSchema: z.ZodSchema<ColumnsLayout> = z.lazy(() =>
|
|
932
|
-
z.object({
|
|
933
|
-
type: z.literal('columns'),
|
|
934
|
-
left: z.array(layoutSchema),
|
|
935
|
-
right: z.array(layoutSchema),
|
|
936
|
-
bias: columnsLayoutBiasSchema.optional(),
|
|
937
|
-
control: z.string().optional(),
|
|
938
|
-
margin: sizeSchema.optional(),
|
|
939
|
-
}),
|
|
940
|
-
);
|
|
941
|
-
|
|
942
|
-
export const modalLayoutContentSchema: z.ZodSchema<ModalLayoutContent> = z.lazy(() =>
|
|
943
|
-
z.object({
|
|
944
|
-
title: z.string().optional(),
|
|
945
|
-
components: z.array(layoutSchema),
|
|
946
|
-
}),
|
|
947
|
-
);
|
|
948
|
-
|
|
949
|
-
export const boxLayoutSchema: z.ZodSchema<BoxLayout> = z.lazy(() =>
|
|
950
|
-
z.object({
|
|
951
|
-
type: z.literal('box'),
|
|
952
|
-
components: z.array(layoutSchema),
|
|
953
|
-
width: sizeSchema.optional(),
|
|
954
|
-
border: z.boolean().optional(),
|
|
955
|
-
control: z.string().optional(),
|
|
956
|
-
margin: sizeSchema.optional(),
|
|
957
|
-
}),
|
|
958
|
-
);
|
|
959
|
-
|
|
960
|
-
export const modalLayoutSchema: z.ZodSchema<ModalLayout> = z.lazy(() =>
|
|
961
|
-
z.object({
|
|
962
|
-
type: z.literal('modal'),
|
|
963
|
-
control: z.string().optional(),
|
|
964
|
-
margin: sizeSchema.optional(),
|
|
965
|
-
trigger: modalLayoutTriggerSchema,
|
|
966
|
-
content: modalLayoutContentSchema,
|
|
967
967
|
}),
|
|
968
968
|
);
|