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