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