@mintlify/validation 0.1.125 → 0.1.127

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/dist/index.d.ts CHANGED
@@ -1,334 +1,9 @@
1
- export declare function validateMintConfig(value: unknown): import("zod").SafeParseError<{
2
- navigation: import("@mintlify/models").NavigationGroup[];
3
- name: string;
4
- favicon: string;
5
- colors: {
6
- primary: string;
7
- light?: string | undefined;
8
- dark?: string | undefined;
9
- background?: {
10
- light?: string | undefined;
11
- dark?: string | undefined;
12
- } | undefined;
13
- anchors?: string | {
14
- from: string;
15
- to: string;
16
- via?: string | undefined;
17
- } | undefined;
18
- ultraLight?: any;
19
- ultraDark?: any;
20
- };
21
- $schema?: string | undefined;
22
- mintlify?: string | undefined;
23
- logo?: string | {
24
- light: string;
25
- dark: string;
26
- href?: string | undefined;
27
- } | undefined;
28
- openapi?: string | string[] | undefined;
29
- api?: {
30
- baseUrl?: string | string[] | undefined;
31
- auth?: {
32
- method?: "bearer" | "basic" | "key" | "cobo" | undefined;
33
- name?: string | undefined;
34
- inputPrefix?: string | undefined;
35
- } | undefined;
36
- playground?: {
37
- mode?: "show" | "simple" | "hide" | undefined;
38
- } | undefined;
39
- request?: {
40
- example?: {
41
- showOptionalParams?: boolean | undefined;
42
- } | undefined;
43
- } | undefined;
44
- maintainOrder?: boolean | undefined;
45
- } | undefined;
46
- modeToggle?: {
47
- default?: "light" | "dark" | undefined;
48
- isHidden?: boolean | undefined;
49
- } | undefined;
50
- versions?: (string | {
51
- name: string;
52
- url: string;
53
- })[] | undefined;
54
- metadata?: Record<string, string> | undefined;
55
- topbarCtaButton?: {
56
- name: string;
57
- url: string;
58
- type?: "link" | undefined;
59
- } | {
60
- type: "github";
61
- url: string;
62
- } | undefined;
63
- topbarLinks?: ({
64
- name: string;
65
- url: string;
66
- type?: "link" | undefined;
67
- } | {
68
- type: "github";
69
- url: string;
70
- })[] | undefined;
71
- primaryTab?: {
72
- name: string;
73
- } | undefined;
74
- topAnchor?: {
75
- name: string;
76
- icon?: string | undefined;
77
- iconType?: "light" | "brands" | "duotone" | "regular" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
78
- } | undefined;
79
- anchors?: {
80
- name: string;
81
- url: string;
82
- icon?: string | undefined;
83
- iconType?: "light" | "brands" | "duotone" | "regular" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
84
- color?: string | {
85
- from: string;
86
- to: string;
87
- via?: string | undefined;
88
- } | undefined;
89
- isDefaultHidden?: boolean | undefined;
90
- version?: string | undefined;
91
- }[] | undefined;
92
- tabs?: {
93
- name: string;
94
- url: string;
95
- version?: string | undefined;
96
- }[] | undefined;
97
- footerSocials?: {
98
- type: string;
99
- url: string;
100
- }[] | Record<string, string> | undefined;
101
- backgroundImage?: string | undefined;
102
- feedback?: {
103
- thumbsRating?: boolean | undefined;
104
- suggestEdit?: boolean | undefined;
105
- raiseIssue?: boolean | undefined;
106
- } | undefined;
107
- analytics?: {
108
- amplitude?: {
109
- apiKey: string;
110
- } | undefined;
111
- clearbit?: {
112
- publicApiKey: string;
113
- } | undefined;
114
- fathom?: {
115
- siteId: string;
116
- } | undefined;
117
- ga4?: {
118
- measurementId: string;
119
- } | undefined;
120
- gtm?: {
121
- tagId: string;
122
- } | undefined;
123
- hotjar?: {
124
- hjid: string;
125
- hjsv: string;
126
- } | undefined;
127
- koala?: {
128
- publicApiKey: string;
129
- } | undefined;
130
- logrocket?: {
131
- appId: string;
132
- } | undefined;
133
- mixpanel?: {
134
- projectToken: string;
135
- } | undefined;
136
- pirsch?: {
137
- id: string;
138
- } | undefined;
139
- posthog?: {
140
- apiKey: string;
141
- apiHost?: string | undefined;
142
- } | undefined;
143
- plausible?: {
144
- domain: string;
145
- } | undefined;
146
- } | undefined;
147
- integrations?: {
148
- intercom?: string | undefined;
149
- frontchat?: string | undefined;
150
- } | undefined;
151
- isWhiteLabeled?: boolean | undefined;
152
- search?: {
153
- prompt?: string | undefined;
154
- } | undefined;
155
- redirects?: {
156
- source: string;
157
- destination: string;
158
- }[] | undefined;
159
- seo?: {
160
- indexHiddenPages?: boolean | undefined;
161
- } | undefined;
162
- }> | {
163
- warnings: import("zod").ZodIssue[];
164
- success: true;
165
- data: {
166
- navigation: import("@mintlify/models").NavigationGroup[];
167
- name: string;
168
- $schema: string;
169
- favicon: string;
170
- colors: {
171
- primary: string;
172
- light?: string | undefined;
173
- dark?: string | undefined;
174
- background?: {
175
- light?: string | undefined;
176
- dark?: string | undefined;
177
- } | undefined;
178
- anchors?: string | {
179
- from: string;
180
- to: string;
181
- via?: string | undefined;
182
- } | undefined;
183
- ultraLight?: any;
184
- ultraDark?: any;
185
- };
186
- mintlify?: string | undefined;
187
- logo?: string | {
188
- light: string;
189
- dark: string;
190
- href?: string | undefined;
191
- } | undefined;
192
- openapi?: string | string[] | undefined;
193
- api?: {
194
- baseUrl?: string | string[] | undefined;
195
- auth?: {
196
- method?: "bearer" | "basic" | "key" | "cobo" | undefined;
197
- name?: string | undefined;
198
- inputPrefix?: string | undefined;
199
- } | undefined;
200
- playground?: {
201
- mode: "show" | "simple" | "hide";
202
- } | undefined;
203
- request?: {
204
- example?: {
205
- showOptionalParams: boolean;
206
- } | undefined;
207
- } | undefined;
208
- maintainOrder?: boolean | undefined;
209
- } | undefined;
210
- modeToggle?: {
211
- default?: "light" | "dark" | undefined;
212
- isHidden?: boolean | undefined;
213
- } | undefined;
214
- versions?: (string | {
215
- name: string;
216
- url: string;
217
- })[] | undefined;
218
- metadata?: Record<string, string> | undefined;
219
- topbarCtaButton?: {
220
- name: string;
221
- url: string;
222
- type?: "link" | undefined;
223
- } | {
224
- type: "github";
225
- url: string;
226
- } | undefined;
227
- topbarLinks?: ({
228
- name: string;
229
- url: string;
230
- type?: "link" | undefined;
231
- } | {
232
- type: "github";
233
- url: string;
234
- })[] | undefined;
235
- primaryTab?: {
236
- name: string;
237
- } | undefined;
238
- topAnchor?: {
239
- name: string;
240
- icon?: string | undefined;
241
- iconType?: "light" | "brands" | "duotone" | "regular" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
242
- } | undefined;
243
- anchors?: {
244
- name: string;
245
- url: string;
246
- icon?: string | undefined;
247
- iconType?: "light" | "brands" | "duotone" | "regular" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
248
- color?: string | {
249
- from: string;
250
- to: string;
251
- via?: string | undefined;
252
- } | undefined;
253
- isDefaultHidden?: boolean | undefined;
254
- version?: string | undefined;
255
- }[] | undefined;
256
- tabs?: {
257
- name: string;
258
- url: string;
259
- version?: string | undefined;
260
- }[] | undefined;
261
- footerSocials?: {
262
- type: string;
263
- url: string;
264
- }[] | Record<string, string> | undefined;
265
- backgroundImage?: string | undefined;
266
- feedback?: {
267
- thumbsRating?: boolean | undefined;
268
- suggestEdit?: boolean | undefined;
269
- raiseIssue?: boolean | undefined;
270
- } | undefined;
271
- analytics?: {
272
- amplitude?: {
273
- apiKey: string;
274
- } | undefined;
275
- clearbit?: {
276
- publicApiKey: string;
277
- } | undefined;
278
- fathom?: {
279
- siteId: string;
280
- } | undefined;
281
- ga4?: {
282
- measurementId: string;
283
- } | undefined;
284
- gtm?: {
285
- tagId: string;
286
- } | undefined;
287
- hotjar?: {
288
- hjid: string;
289
- hjsv: string;
290
- } | undefined;
291
- koala?: {
292
- publicApiKey: string;
293
- } | undefined;
294
- logrocket?: {
295
- appId: string;
296
- } | undefined;
297
- mixpanel?: {
298
- projectToken: string;
299
- } | undefined;
300
- pirsch?: {
301
- id: string;
302
- } | undefined;
303
- posthog?: {
304
- apiKey: string;
305
- apiHost?: string | undefined;
306
- } | undefined;
307
- plausible?: {
308
- domain: string;
309
- } | undefined;
310
- } | undefined;
311
- integrations?: {
312
- intercom?: string | undefined;
313
- frontchat?: string | undefined;
314
- } | undefined;
315
- isWhiteLabeled?: boolean | undefined;
316
- search?: {
317
- prompt?: string | undefined;
318
- } | undefined;
319
- redirects?: {
320
- source: string;
321
- destination: string;
322
- }[] | undefined;
323
- seo?: {
324
- indexHiddenPages?: boolean | undefined;
325
- } | undefined;
326
- };
327
- };
328
1
  export * from './openapi/types/endpoint.js';
329
2
  export { OpenApiToEndpointConverter } from './openapi/OpenApiToEndpointConverter.js';
330
3
  export { SchemaConverter } from './openapi/SchemaConverter.js';
331
4
  export { generateExampleFromSchema } from './openapi/generateExampleFromSchema.js';
5
+ export { validateMintConfig } from './mint-config/validateMintConfig.js';
6
+ export { formatIssue } from './mint-config/formatIssue.js';
332
7
  export declare const mintConfigJsonSchema: import("zod-to-json-schema/src/parseDef.js").JsonSchema7Type & {
333
8
  $schema?: string | undefined;
334
9
  definitions?: {
package/dist/index.js CHANGED
@@ -1,19 +1,12 @@
1
1
  import { zodToJsonSchema } from 'zod-to-json-schema';
2
- import { refineMissingVersions } from './mint-config/refinements/refineMissingVersions.js';
3
2
  import { colorsSchema } from './mint-config/schemas/colors.js';
4
3
  import { mintConfigSchema } from './mint-config/schemas/config.js';
5
- import { aggregateWarnings } from './mint-config/warnings/aggregateWarnings.js';
6
- export function validateMintConfig(value) {
7
- const refinedSchema = mintConfigSchema.superRefine(refineMissingVersions);
8
- const validationResults = refinedSchema.safeParse(value);
9
- if (!validationResults.success)
10
- return validationResults;
11
- return Object.assign(Object.assign({}, validationResults), { warnings: aggregateWarnings(validationResults.data) });
12
- }
13
4
  export * from './openapi/types/endpoint.js';
14
5
  export { OpenApiToEndpointConverter } from './openapi/OpenApiToEndpointConverter.js';
15
6
  export { SchemaConverter } from './openapi/SchemaConverter.js';
16
7
  export { generateExampleFromSchema } from './openapi/generateExampleFromSchema.js';
8
+ export { validateMintConfig } from './mint-config/validateMintConfig.js';
9
+ export { formatIssue } from './mint-config/formatIssue.js';
17
10
  export const mintConfigJsonSchema = (() => {
18
11
  const cleanedSchema = mintConfigSchema.extend({
19
12
  colors: colorsSchema.omit({
@@ -0,0 +1,2 @@
1
+ import { ZodErrorMap } from 'zod';
2
+ export declare const customErrorMap: ZodErrorMap;
@@ -0,0 +1,13 @@
1
+ export const customErrorMap = (issue, ctx) => {
2
+ switch (issue.code) {
3
+ case 'invalid_type':
4
+ if (issue.received === 'undefined')
5
+ return { message: 'This field is required' };
6
+ return {
7
+ message: `Invalid type. Expected field to be of type '${issue.expected}', received '${issue.received}'`,
8
+ };
9
+ case 'invalid_union':
10
+ return { message: `Invalid type. Field did not match any types in union` };
11
+ }
12
+ return { message: ctx.defaultError };
13
+ };
@@ -0,0 +1,3 @@
1
+ import { ZodIssue } from 'zod';
2
+ export declare const formatIssue: (issue: ZodIssue) => string;
3
+ export declare const formatIssueWithIndent: (issue: ZodIssue, indent?: number) => string;
@@ -0,0 +1,15 @@
1
+ const HALF_INDENT = ' ';
2
+ const INDENT = ' ';
3
+ export const formatIssue = (issue) => formatIssueWithIndent(issue);
4
+ export const formatIssueWithIndent = (issue, indent = 0) => {
5
+ const pathComponents = issue.path.map((value) => typeof value === 'string' ? `.${value}` : `[${value}]`);
6
+ const lines = issue.code === 'invalid_union'
7
+ ? issue.unionErrors.flatMap((unionError, i) => {
8
+ const unionErrorLines = unionError.issues.map((unionIssue) => formatIssueWithIndent(unionIssue, indent + 1));
9
+ unionErrorLines.unshift(`${INDENT.repeat(indent)}${HALF_INDENT}${i + 1}:`);
10
+ return unionErrorLines;
11
+ })
12
+ : [];
13
+ lines.unshift(`${INDENT.repeat(indent)}\#${pathComponents.join('')}: ${issue.message}`);
14
+ return lines.join('\n');
15
+ };
@@ -46,7 +46,7 @@ export declare const analyticsSchema: z.ZodObject<{
46
46
  hjsv: string;
47
47
  }>>;
48
48
  koala: z.ZodOptional<z.ZodObject<{
49
- publicApiKey: z.ZodEffects<z.ZodString, string, string>;
49
+ publicApiKey: z.ZodString;
50
50
  }, "strip", z.ZodTypeAny, {
51
51
  publicApiKey: string;
52
52
  }, {
@@ -1,115 +1,43 @@
1
1
  import { z } from 'zod';
2
2
  const amplitudeConfigInterfaceSchema = z.object({
3
- apiKey: z.string({
4
- required_error: 'Amplitude apiKey is missing.',
5
- invalid_type_error: 'Amplitude apiKey must be a string.',
6
- }),
7
- }, {
8
- invalid_type_error: 'Amplitude analytics config must be an object with an apiKey property.',
3
+ apiKey: z.string(),
9
4
  });
10
5
  const clearbitConfigInterfaceSchema = z.object({
11
- publicApiKey: z.string({
12
- required_error: 'Clearbit publicApiKey is missing.',
13
- invalid_type_error: 'Clearbit publicApiKey must be a string.',
14
- }),
15
- }, {
16
- invalid_type_error: 'Clearbit config must be an object with a publicApiKey property.',
6
+ publicApiKey: z.string(),
17
7
  });
18
8
  const fathomConfigInterfaceSchema = z.object({
19
- siteId: z.string({
20
- required_error: 'Fathom siteId is missing.',
21
- invalid_type_error: 'Fathom siteId must be a string.',
22
- }),
23
- }, {
24
- invalid_type_error: 'Fathom analytics config must be an object with a siteId property.',
9
+ siteId: z.string(),
25
10
  });
26
11
  const googleAnalyticsConfigInterfaceSchema = z.object({
27
- measurementId: z
28
- .string({
29
- required_error: 'Google Analytics measurementId is missing.',
30
- invalid_type_error: 'Google Analytics measurementId must be a string.',
31
- })
32
- .startsWith('G', 'Google Analytics measurementId must start with G.'),
33
- }, {
34
- invalid_type_error: 'Google Analytics config must be an object with a measurementId property.',
12
+ measurementId: z.string().startsWith('G', 'Must start with G'),
35
13
  });
36
14
  const googleTagManagerConfigInterfaceSchema = z.object({
37
- tagId: z
38
- .string({
39
- required_error: 'Google Tag Manager tagId is missing.',
40
- invalid_type_error: 'Google Tag Manager tagId must be a string.',
41
- })
42
- .startsWith('G', 'Google Tag Manager tagId must start with G.'),
43
- }, {
44
- invalid_type_error: 'Google Tag Manager config must be an object with a tagId property.',
15
+ tagId: z.string().startsWith('G', 'Must start with G'),
45
16
  });
46
17
  const hotjarConfigInterfaceSchema = z.object({
47
- hjid: z.string({
48
- required_error: 'Hotjar hjid is missing.',
49
- invalid_type_error: 'Hotjar hjid must be a string.',
50
- }),
51
- hjsv: z.string({
52
- required_error: 'Hotjar hjsv is missing.',
53
- invalid_type_error: 'Hotjar hjsv must be a string.',
54
- }),
55
- }, {
56
- invalid_type_error: 'Hotjar config must be an object with a hjid and hjsv property.',
18
+ hjid: z.string(),
19
+ hjsv: z.string(),
57
20
  });
58
21
  const koalaConfigInterfaceSchema = z.object({
59
- publicApiKey: z
60
- .string({
61
- required_error: 'Public Api Key is required for the Koala snippet to run.',
62
- invalid_type_error: 'Koala Public Api Key must be a string.',
63
- })
64
- .refine((publicApiKey) => publicApiKey.length >= 2, 'Koala Public Api Key must have at least two characters'),
65
- }, {
66
- invalid_type_error: 'Koala config must be an object with a publicApiKey property.',
22
+ publicApiKey: z.string().min(2),
67
23
  });
68
24
  const logrocketConfigInterfaceSchema = z.object({
69
- appId: z.string({
70
- required_error: 'Logrocket appId is missing.',
71
- invalid_type_error: 'Logrocket appId must be a string.',
72
- }),
73
- }, {
74
- invalid_type_error: 'Logrocket config must be an object with an appId property.',
25
+ appId: z.string(),
75
26
  });
76
27
  const mixpanelConfigInterfaceSchema = z.object({
77
- projectToken: z.string({
78
- required_error: 'Mixpanel projectToken is missing.',
79
- invalid_type_error: 'Mixpanel projectToken must be a string.',
80
- }),
81
- }, {
82
- invalid_type_error: 'Mixpanel config must be an object with a projectToken property.',
28
+ projectToken: z.string(),
83
29
  });
84
30
  const pirschConfigInterfaceSchema = z.object({
85
- id: z.string({
86
- required_error: 'Pirsch id is missing.',
87
- invalid_type_error: 'Pirsch id must be a string.',
88
- }),
89
- }, { invalid_type_error: 'Pirsch config must be an object with an id property.' });
31
+ id: z.string(),
32
+ });
90
33
  const postHogConfigInterfaceSchema = z.object({
91
- apiKey: z
92
- .string({
93
- required_error: 'Posthog apiKey is missing.',
94
- invalid_type_error: 'Posthog apiKey must be a string.',
95
- })
96
- .startsWith('phc_', 'Posthog apiKey must start with phc_'),
97
- apiHost: z
98
- .string({ invalid_type_error: 'Posthog apiHost must be a string.' })
99
- .url('Posthog apiHost must be a valid URL.')
100
- .optional(),
101
- }, {
102
- invalid_type_error: 'Posthog config must be an object with an apiKey property.',
34
+ apiKey: z.string().startsWith('phc_', 'Must start with phc_'),
35
+ apiHost: z.string().url('Must be a valid URL').optional(),
103
36
  });
104
37
  const plausibleConfigInterfaceSchema = z.object({
105
38
  domain: z
106
- .string({
107
- required_error: 'Plausible domain is missing.',
108
- invalid_type_error: 'Plausible domain must be a string.',
109
- })
110
- .refine((domain) => !domain.startsWith('http://') && !domain.startsWith('https://'), 'Plausible domain must not start with http:// or https://'),
111
- }, {
112
- invalid_type_error: 'Plausible config must be an object with a domain property. The domain must not start with http:// or https://.',
39
+ .string()
40
+ .refine((domain) => !domain.startsWith('http://') && !domain.startsWith('https://'), 'Must not start with http:// or https://'),
113
41
  });
114
42
  export const analyticsSchema = z
115
43
  .object({
@@ -1,13 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import { hexColor } from './hexColor.js';
3
3
  export const gradientSchema = z.object({
4
- from: hexColor('Anchor color.from'),
5
- via: hexColor('Anchor color.via').optional(),
6
- to: hexColor('Anchor color.to'),
7
- });
8
- export const anchorColorSchema = z.union([
9
- hexColor('Anchor color'),
10
- gradientSchema.strict('Anchors with gradient colors can only have properties from, via, and to with valid hexadecimal colors.'),
11
- ], {
12
- invalid_type_error: 'Anchor color must be a string or an object with from and to properties.',
4
+ from: hexColor,
5
+ via: hexColor.optional(),
6
+ to: hexColor,
13
7
  });
8
+ export const anchorColorSchema = z.union([hexColor, gradientSchema.strict()]);
@@ -2,68 +2,27 @@ import { iconTypes } from '@mintlify/models';
2
2
  import { z } from 'zod';
3
3
  import { anchorColorSchema } from './anchorColors.js';
4
4
  export const anchorSchema = z.object({
5
- name: z
6
- .string({
7
- required_error: 'Every anchor must have a name.',
8
- invalid_type_error: 'Anchor name must be a string.',
9
- })
10
- .trim()
11
- .min(1, 'Anchor name is empty.'),
12
- url: z
13
- .string({
14
- required_error: 'Every anchor must have a url',
15
- invalid_type_error: 'Anchor url must be a string.',
16
- })
17
- .trim()
18
- .min(1, 'Anchor URL is missing.'),
5
+ name: z.string().trim().nonempty(),
6
+ url: z.string().trim().nonempty(),
19
7
  icon: z
20
8
  .string({
21
9
  invalid_type_error: 'Anchor icon must be the name of a Font Awesome icon. Visit this link to see all the available icons: https://fontawesome.com/icons',
22
10
  })
23
- .refine((iconStr) => !iconStr.startsWith('fa-'), 'icon does not need to start with "fa-". Please delete "fa-" and keep the rest of the icon name.')
24
- .optional(),
25
- iconType: z
26
- .enum(iconTypes, {
27
- errorMap: () => {
28
- return {
29
- message: 'anchor iconType must be one of the following strings: brands, duotone, light, sharp-solid, solid, thin',
30
- };
31
- },
32
- })
11
+ .refine((icon) => !icon.startsWith('fa-'), "Icon does not need to start with 'fa-'. Please delete 'fa-' and keep the rest of the icon name")
33
12
  .optional(),
13
+ iconType: z.enum(iconTypes).optional(),
34
14
  color: anchorColorSchema.optional(),
35
- isDefaultHidden: z
36
- .boolean({
37
- invalid_type_error: 'Anchor isDefaultHidden must be a boolean. Try writing true or false without quotes around them.',
38
- })
39
- .optional(),
15
+ isDefaultHidden: z.boolean().optional(),
40
16
  version: z
41
17
  .string({
42
- invalid_type_error: 'Version must be a string in the versions array.',
18
+ invalid_type_error: 'Version must be a string in the #.versions array',
43
19
  })
44
20
  .optional(),
45
21
  });
46
22
  export const topAnchorSchema = z
47
23
  .object({
48
- name: z.string({
49
- required_error: 'topAnchor.name is missing, set it or delete the entire topAnchor property.',
50
- invalid_type_error: 'topAnchor.name must be a string',
51
- }),
52
- icon: z
53
- .string({
54
- invalid_type_error: 'topAnchor.icon must be a string',
55
- })
56
- .optional(),
57
- iconType: z
58
- .enum(iconTypes, {
59
- errorMap: () => {
60
- return {
61
- message: 'topAnchor.iconType must be one of the following strings: brands, duotone, light, sharp-solid, solid, thin',
62
- };
63
- },
64
- })
65
- .optional(),
66
- }, {
67
- invalid_type_error: "topAnchor must be an object with a name property. Delete the topAnchor if you don't want to customize the values.",
24
+ name: z.string(),
25
+ icon: z.string().optional(),
26
+ iconType: z.enum(iconTypes).optional(),
68
27
  })
69
- .strict('topAnchor can only have name, icon, and iconType properties.');
28
+ .strict();