@mintlify/validation 0.1.798 → 0.1.799
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.js +2 -0
- package/dist/mint-config/schemas/v2/index.d.ts +520 -0
- package/dist/mint-config/schemas/v2/properties/navigation/anchors.d.ts +6 -0
- package/dist/mint-config/schemas/v2/properties/navigation/anchors.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/dropdown.d.ts +6 -0
- package/dist/mint-config/schemas/v2/properties/navigation/dropdown.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/groups.d.ts +7 -0
- package/dist/mint-config/schemas/v2/properties/navigation/groups.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +40 -0
- package/dist/mint-config/schemas/v2/properties/navigation/index.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/languages.d.ts +6 -0
- package/dist/mint-config/schemas/v2/properties/navigation/languages.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/menu.d.ts +6 -0
- package/dist/mint-config/schemas/v2/properties/navigation/menu.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/pages.d.ts +4 -0
- package/dist/mint-config/schemas/v2/properties/navigation/products.d.ts +6 -0
- package/dist/mint-config/schemas/v2/properties/navigation/products.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/tabs.d.ts +3 -0
- package/dist/mint-config/schemas/v2/properties/navigation/tabs.js +20 -1
- package/dist/mint-config/schemas/v2/properties/navigation/version.d.ts +6 -0
- package/dist/mint-config/schemas/v2/properties/navigation/version.js +2 -1
- package/dist/mint-config/schemas/v2/properties/reusable/index.d.ts +1 -0
- package/dist/mint-config/schemas/v2/properties/reusable/index.js +1 -0
- package/dist/mint-config/schemas/v2/properties/reusable/sdk.d.ts +19 -0
- package/dist/mint-config/schemas/v2/properties/reusable/sdk.js +39 -0
- package/dist/mint-config/schemas/v2/themes/almond.d.ts +52 -0
- package/dist/mint-config/schemas/v2/themes/aspen.d.ts +52 -0
- package/dist/mint-config/schemas/v2/themes/linden.d.ts +52 -0
- package/dist/mint-config/schemas/v2/themes/luma.d.ts +52 -0
- package/dist/mint-config/schemas/v2/themes/maple.d.ts +52 -0
- package/dist/mint-config/schemas/v2/themes/mint.d.ts +52 -0
- package/dist/mint-config/schemas/v2/themes/palm.d.ts +52 -0
- package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +32 -0
- package/dist/mint-config/schemas/v2/themes/sequoia.d.ts +52 -0
- package/dist/mint-config/schemas/v2/themes/willow.d.ts +52 -0
- package/dist/mint-config/validateConfig.d.ts +180 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -18,6 +18,7 @@ export declare const pagesSchema: z.ZodArray<z.ZodType<string | ({
|
|
|
18
18
|
boost?: number | undefined;
|
|
19
19
|
hidden?: boolean | undefined;
|
|
20
20
|
graphql?: undefined;
|
|
21
|
+
sdk?: undefined;
|
|
21
22
|
root?: string | undefined;
|
|
22
23
|
} & {
|
|
23
24
|
openapi?: string | string[] | {
|
|
@@ -45,6 +46,7 @@ export declare const pagesSchema: z.ZodArray<z.ZodType<string | ({
|
|
|
45
46
|
boost?: number | undefined;
|
|
46
47
|
hidden?: boolean | undefined;
|
|
47
48
|
graphql?: undefined;
|
|
49
|
+
sdk?: undefined;
|
|
48
50
|
root?: string | undefined;
|
|
49
51
|
} & {
|
|
50
52
|
openapi?: string | string[] | {
|
|
@@ -265,6 +267,7 @@ export declare const decoratedPagesSchema: z.ZodArray<z.ZodType<z.objectInputTyp
|
|
|
265
267
|
boost?: number | undefined;
|
|
266
268
|
hidden?: boolean | undefined;
|
|
267
269
|
graphql?: undefined;
|
|
270
|
+
sdk?: undefined;
|
|
268
271
|
root?: string | undefined;
|
|
269
272
|
}, "root"> & {
|
|
270
273
|
pages: PageOrGroupNavigation<"decorated">[];
|
|
@@ -476,6 +479,7 @@ export declare const decoratedPagesSchema: z.ZodArray<z.ZodType<z.objectInputTyp
|
|
|
476
479
|
boost?: number | undefined;
|
|
477
480
|
hidden?: boolean | undefined;
|
|
478
481
|
graphql?: undefined;
|
|
482
|
+
sdk?: undefined;
|
|
479
483
|
root?: string | undefined;
|
|
480
484
|
}, "root"> & {
|
|
481
485
|
pages: PageOrGroupNavigation<"decorated">[];
|
|
@@ -4,6 +4,7 @@ export declare const baseProductSchema: z.ZodObject<{
|
|
|
4
4
|
directory: z.ZodOptional<z.ZodEnum<["none", "accordion", "card"]>>;
|
|
5
5
|
product: z.ZodString;
|
|
6
6
|
graphql: z.ZodOptional<z.ZodNever>;
|
|
7
|
+
sdk: z.ZodOptional<z.ZodNever>;
|
|
7
8
|
name: z.ZodOptional<z.ZodString>;
|
|
8
9
|
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
9
10
|
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
@@ -46,6 +47,7 @@ export declare const baseProductSchema: z.ZodObject<{
|
|
|
46
47
|
description?: string | undefined;
|
|
47
48
|
hidden?: boolean | undefined;
|
|
48
49
|
graphql?: undefined;
|
|
50
|
+
sdk?: undefined;
|
|
49
51
|
}, {
|
|
50
52
|
product: string;
|
|
51
53
|
name?: string | undefined;
|
|
@@ -62,6 +64,7 @@ export declare const baseProductSchema: z.ZodObject<{
|
|
|
62
64
|
description?: string | undefined;
|
|
63
65
|
hidden?: boolean | undefined;
|
|
64
66
|
graphql?: undefined;
|
|
67
|
+
sdk?: undefined;
|
|
65
68
|
}>;
|
|
66
69
|
export declare const productSchema: z.ZodType<ProductNavigation<'default'>>;
|
|
67
70
|
export declare const decoratedProductSchema: z.ZodType<ProductNavigation<'decorated'>>;
|
|
@@ -72,6 +75,7 @@ export declare const nonRecursiveProductSchema: z.ZodObject<{
|
|
|
72
75
|
directory: z.ZodOptional<z.ZodEnum<["none", "accordion", "card"]>>;
|
|
73
76
|
product: z.ZodString;
|
|
74
77
|
graphql: z.ZodOptional<z.ZodNever>;
|
|
78
|
+
sdk: z.ZodOptional<z.ZodNever>;
|
|
75
79
|
name: z.ZodOptional<z.ZodString>;
|
|
76
80
|
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
77
81
|
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
@@ -117,6 +121,7 @@ export declare const nonRecursiveProductSchema: z.ZodObject<{
|
|
|
117
121
|
description?: string | undefined;
|
|
118
122
|
hidden?: boolean | undefined;
|
|
119
123
|
graphql?: undefined;
|
|
124
|
+
sdk?: undefined;
|
|
120
125
|
}, {
|
|
121
126
|
href: string;
|
|
122
127
|
product: string;
|
|
@@ -134,6 +139,7 @@ export declare const nonRecursiveProductSchema: z.ZodObject<{
|
|
|
134
139
|
description?: string | undefined;
|
|
135
140
|
hidden?: boolean | undefined;
|
|
136
141
|
graphql?: undefined;
|
|
142
|
+
sdk?: undefined;
|
|
137
143
|
}>;
|
|
138
144
|
export type ProductConfig = z.infer<typeof productSchema>;
|
|
139
145
|
export type ProductsConfig = z.infer<typeof productsSchema>;
|
|
@@ -6,6 +6,7 @@ import { hiddenSchema } from '../reusable/hidden.js';
|
|
|
6
6
|
import { hrefSchema } from '../reusable/href.js';
|
|
7
7
|
import { iconSchema } from '../reusable/icon.js';
|
|
8
8
|
import { openApiSchema } from '../reusable/openapi.js';
|
|
9
|
+
import { sdkNotSupportedSchema } from '../reusable/sdk.js';
|
|
9
10
|
import { anchorsSchema, decoratedAnchorsSchema } from './anchors.js';
|
|
10
11
|
import { decoratedDropdownsSchema, dropdownsSchema } from './dropdown.js';
|
|
11
12
|
import { globalSchema } from './global.js';
|
|
@@ -15,7 +16,7 @@ import { decoratedMenuSchema, menuSchema } from './menu.js';
|
|
|
15
16
|
import { pagesSchema, decoratedPagesSchema } from './pages.js';
|
|
16
17
|
import { tabsSchema, decoratedTabsSchema } from './tabs.js';
|
|
17
18
|
import { versionsSchema, decoratedVersionsSchema } from './version.js';
|
|
18
|
-
export const baseProductSchema = z.object(Object.assign({ product: z.string().nonempty().describe('The name of the product'), graphql: graphqlNotSupportedSchema, name: z.string().optional().describe('Display name for the product'), icon: iconSchema.optional(), color: colorSchemaWithOptionalLightAndDark.optional(), description: z.string().optional().describe('The description of the product'), hidden: hiddenSchema.optional() }, directoryField));
|
|
19
|
+
export const baseProductSchema = z.object(Object.assign({ product: z.string().nonempty().describe('The name of the product'), graphql: graphqlNotSupportedSchema, sdk: sdkNotSupportedSchema, name: z.string().optional().describe('Display name for the product'), icon: iconSchema.optional(), color: colorSchemaWithOptionalLightAndDark.optional(), description: z.string().optional().describe('The description of the product'), hidden: hiddenSchema.optional() }, directoryField));
|
|
19
20
|
export const productSchema = z.union([
|
|
20
21
|
baseProductSchema.extend({
|
|
21
22
|
href: hrefSchema,
|
|
@@ -67,6 +67,7 @@ export declare const nonRecursiveTabSchema: z.ZodObject<{
|
|
|
67
67
|
} & {
|
|
68
68
|
href: z.ZodEffects<z.ZodString, string, string>;
|
|
69
69
|
graphql: z.ZodOptional<z.ZodNever>;
|
|
70
|
+
sdk: z.ZodOptional<z.ZodNever>;
|
|
70
71
|
}, "strip", z.ZodTypeAny, {
|
|
71
72
|
href: string;
|
|
72
73
|
tab: string;
|
|
@@ -79,6 +80,7 @@ export declare const nonRecursiveTabSchema: z.ZodObject<{
|
|
|
79
80
|
searchable?: boolean | undefined;
|
|
80
81
|
hidden?: boolean | undefined;
|
|
81
82
|
graphql?: undefined;
|
|
83
|
+
sdk?: undefined;
|
|
82
84
|
align?: "start" | "end" | undefined;
|
|
83
85
|
}, {
|
|
84
86
|
href: string;
|
|
@@ -92,6 +94,7 @@ export declare const nonRecursiveTabSchema: z.ZodObject<{
|
|
|
92
94
|
searchable?: boolean | undefined;
|
|
93
95
|
hidden?: boolean | undefined;
|
|
94
96
|
graphql?: undefined;
|
|
97
|
+
sdk?: undefined;
|
|
95
98
|
align?: "start" | "end" | undefined;
|
|
96
99
|
}>;
|
|
97
100
|
export declare const tabSchema: z.ZodType<TabNavigation<'default'>>;
|
|
@@ -5,6 +5,7 @@ import { hiddenSchema } from '../reusable/hidden.js';
|
|
|
5
5
|
import { hrefSchema } from '../reusable/href.js';
|
|
6
6
|
import { iconSchema } from '../reusable/icon.js';
|
|
7
7
|
import { openApiSchema } from '../reusable/openapi.js';
|
|
8
|
+
import { sdkNotSupportedSchema, sdkSchema } from '../reusable/sdk.js';
|
|
8
9
|
import { searchableSchema } from '../reusable/searchable.js';
|
|
9
10
|
import { anchorsSchema, decoratedAnchorsSchema } from './anchors.js';
|
|
10
11
|
import { decoratedDropdownsSchema, dropdownsSchema } from './dropdown.js';
|
|
@@ -20,6 +21,7 @@ export const baseTabSchema = z.object(Object.assign({ tab: z.string().nonempty()
|
|
|
20
21
|
export const nonRecursiveTabSchema = baseTabSchema.extend({
|
|
21
22
|
href: hrefSchema,
|
|
22
23
|
graphql: graphqlNotSupportedSchema,
|
|
24
|
+
sdk: sdkNotSupportedSchema,
|
|
23
25
|
});
|
|
24
26
|
export const tabSchema = z.union([
|
|
25
27
|
baseTabSchema.extend({ graphql: graphqlSchema }).strict(),
|
|
@@ -29,9 +31,17 @@ export const tabSchema = z.union([
|
|
|
29
31
|
graphql: graphqlSchema,
|
|
30
32
|
})
|
|
31
33
|
.strict(),
|
|
34
|
+
baseTabSchema.extend({ sdk: sdkSchema }).strict(),
|
|
35
|
+
baseTabSchema
|
|
36
|
+
.extend({
|
|
37
|
+
groups: z.lazy(() => groupsSchema),
|
|
38
|
+
sdk: sdkSchema,
|
|
39
|
+
})
|
|
40
|
+
.strict(),
|
|
32
41
|
baseTabSchema.extend({
|
|
33
42
|
href: hrefSchema,
|
|
34
43
|
graphql: graphqlNotSupportedSchema,
|
|
44
|
+
sdk: sdkNotSupportedSchema,
|
|
35
45
|
openapi: openApiSchema.optional(),
|
|
36
46
|
asyncapi: asyncApiSchema.optional(),
|
|
37
47
|
global: z.lazy(() => globalSchema).optional(),
|
|
@@ -39,6 +49,7 @@ export const tabSchema = z.union([
|
|
|
39
49
|
baseTabSchema.extend({
|
|
40
50
|
languages: z.lazy(() => languagesSchema),
|
|
41
51
|
graphql: graphqlNotSupportedSchema,
|
|
52
|
+
sdk: sdkNotSupportedSchema,
|
|
42
53
|
openapi: openApiSchema.optional(),
|
|
43
54
|
asyncapi: asyncApiSchema.optional(),
|
|
44
55
|
global: z.lazy(() => globalSchema).optional(),
|
|
@@ -46,6 +57,7 @@ export const tabSchema = z.union([
|
|
|
46
57
|
baseTabSchema.extend({
|
|
47
58
|
versions: z.lazy(() => versionsSchema),
|
|
48
59
|
graphql: graphqlNotSupportedSchema,
|
|
60
|
+
sdk: sdkNotSupportedSchema,
|
|
49
61
|
openapi: openApiSchema.optional(),
|
|
50
62
|
asyncapi: asyncApiSchema.optional(),
|
|
51
63
|
global: z.lazy(() => globalSchema).optional(),
|
|
@@ -53,6 +65,7 @@ export const tabSchema = z.union([
|
|
|
53
65
|
baseTabSchema.extend({
|
|
54
66
|
dropdowns: z.lazy(() => dropdownsSchema),
|
|
55
67
|
graphql: graphqlNotSupportedSchema,
|
|
68
|
+
sdk: sdkNotSupportedSchema,
|
|
56
69
|
openapi: openApiSchema.optional(),
|
|
57
70
|
asyncapi: asyncApiSchema.optional(),
|
|
58
71
|
global: z.lazy(() => globalSchema).optional(),
|
|
@@ -60,6 +73,7 @@ export const tabSchema = z.union([
|
|
|
60
73
|
baseTabSchema.extend({
|
|
61
74
|
anchors: z.lazy(() => anchorsSchema),
|
|
62
75
|
graphql: graphqlNotSupportedSchema,
|
|
76
|
+
sdk: sdkNotSupportedSchema,
|
|
63
77
|
openapi: openApiSchema.optional(),
|
|
64
78
|
asyncapi: asyncApiSchema.optional(),
|
|
65
79
|
global: z.lazy(() => globalSchema).optional(),
|
|
@@ -67,6 +81,7 @@ export const tabSchema = z.union([
|
|
|
67
81
|
baseTabSchema.extend({
|
|
68
82
|
products: z.lazy(() => productsSchema),
|
|
69
83
|
graphql: graphqlNotSupportedSchema,
|
|
84
|
+
sdk: sdkNotSupportedSchema,
|
|
70
85
|
openapi: openApiSchema.optional(),
|
|
71
86
|
asyncapi: asyncApiSchema.optional(),
|
|
72
87
|
global: z.lazy(() => globalSchema).optional(),
|
|
@@ -74,6 +89,7 @@ export const tabSchema = z.union([
|
|
|
74
89
|
baseTabSchema.extend({
|
|
75
90
|
groups: z.lazy(() => groupsSchema),
|
|
76
91
|
graphql: graphqlNotSupportedSchema,
|
|
92
|
+
sdk: sdkNotSupportedSchema,
|
|
77
93
|
openapi: openApiSchema.optional(),
|
|
78
94
|
asyncapi: asyncApiSchema.optional(),
|
|
79
95
|
global: z.lazy(() => globalSchema).optional(),
|
|
@@ -81,6 +97,7 @@ export const tabSchema = z.union([
|
|
|
81
97
|
baseTabSchema.extend({
|
|
82
98
|
pages: z.lazy(() => pagesSchema),
|
|
83
99
|
graphql: graphqlNotSupportedSchema,
|
|
100
|
+
sdk: sdkNotSupportedSchema,
|
|
84
101
|
openapi: openApiSchema.optional(),
|
|
85
102
|
asyncapi: asyncApiSchema.optional(),
|
|
86
103
|
global: z.lazy(() => globalSchema).optional(),
|
|
@@ -88,19 +105,21 @@ export const tabSchema = z.union([
|
|
|
88
105
|
baseTabSchema.extend({
|
|
89
106
|
menu: z.lazy(() => menuSchema),
|
|
90
107
|
graphql: graphqlNotSupportedSchema,
|
|
108
|
+
sdk: sdkNotSupportedSchema,
|
|
91
109
|
openapi: openApiSchema.optional(),
|
|
92
110
|
asyncapi: asyncApiSchema.optional(),
|
|
93
111
|
global: z.lazy(() => globalSchema).optional(),
|
|
94
112
|
}),
|
|
95
113
|
baseTabSchema.extend({
|
|
96
114
|
graphql: graphqlNotSupportedSchema,
|
|
115
|
+
sdk: sdkNotSupportedSchema,
|
|
97
116
|
openapi: openApiSchema.optional(),
|
|
98
117
|
asyncapi: asyncApiSchema.optional(),
|
|
99
118
|
global: z.lazy(() => globalSchema).optional(),
|
|
100
119
|
}),
|
|
101
120
|
]);
|
|
102
121
|
export const decoratedTabSchema = baseTabSchema
|
|
103
|
-
.and(z.object({ graphql: graphqlNotSupportedSchema }))
|
|
122
|
+
.and(z.object({ graphql: graphqlNotSupportedSchema, sdk: sdkNotSupportedSchema }))
|
|
104
123
|
.and(z.union([
|
|
105
124
|
z.object({ href: hrefSchema }),
|
|
106
125
|
z.lazy(() => z.object({ languages: decoratedLanguagesSchema, global: globalSchema.optional() })),
|
|
@@ -4,6 +4,7 @@ export declare const baseVersionSchema: z.ZodObject<{
|
|
|
4
4
|
directory: z.ZodOptional<z.ZodEnum<["none", "accordion", "card"]>>;
|
|
5
5
|
version: z.ZodString;
|
|
6
6
|
graphql: z.ZodOptional<z.ZodNever>;
|
|
7
|
+
sdk: z.ZodOptional<z.ZodNever>;
|
|
7
8
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
8
9
|
tag: z.ZodOptional<z.ZodString>;
|
|
9
10
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -14,6 +15,7 @@ export declare const baseVersionSchema: z.ZodObject<{
|
|
|
14
15
|
tag?: string | undefined;
|
|
15
16
|
hidden?: boolean | undefined;
|
|
16
17
|
graphql?: undefined;
|
|
18
|
+
sdk?: undefined;
|
|
17
19
|
}, {
|
|
18
20
|
version: string;
|
|
19
21
|
default?: boolean | undefined;
|
|
@@ -21,12 +23,14 @@ export declare const baseVersionSchema: z.ZodObject<{
|
|
|
21
23
|
tag?: string | undefined;
|
|
22
24
|
hidden?: boolean | undefined;
|
|
23
25
|
graphql?: undefined;
|
|
26
|
+
sdk?: undefined;
|
|
24
27
|
}>;
|
|
25
28
|
export type BaseVersionSchema = z.infer<typeof baseVersionSchema>;
|
|
26
29
|
export declare const nonRecursiveVersionSchema: z.ZodObject<{
|
|
27
30
|
directory: z.ZodOptional<z.ZodEnum<["none", "accordion", "card"]>>;
|
|
28
31
|
version: z.ZodString;
|
|
29
32
|
graphql: z.ZodOptional<z.ZodNever>;
|
|
33
|
+
sdk: z.ZodOptional<z.ZodNever>;
|
|
30
34
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
31
35
|
tag: z.ZodOptional<z.ZodString>;
|
|
32
36
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -40,6 +44,7 @@ export declare const nonRecursiveVersionSchema: z.ZodObject<{
|
|
|
40
44
|
tag?: string | undefined;
|
|
41
45
|
hidden?: boolean | undefined;
|
|
42
46
|
graphql?: undefined;
|
|
47
|
+
sdk?: undefined;
|
|
43
48
|
}, {
|
|
44
49
|
version: string;
|
|
45
50
|
href: string;
|
|
@@ -48,6 +53,7 @@ export declare const nonRecursiveVersionSchema: z.ZodObject<{
|
|
|
48
53
|
tag?: string | undefined;
|
|
49
54
|
hidden?: boolean | undefined;
|
|
50
55
|
graphql?: undefined;
|
|
56
|
+
sdk?: undefined;
|
|
51
57
|
}>;
|
|
52
58
|
export declare const versionSchema: z.ZodType<VersionNavigation<'default'>>;
|
|
53
59
|
export declare const decoratedVersionSchema: z.ZodType<VersionNavigation<'decorated'>>;
|
|
@@ -4,6 +4,7 @@ import { graphqlNotSupportedSchema } from '../reusable/graphql.js';
|
|
|
4
4
|
import { hiddenSchema } from '../reusable/hidden.js';
|
|
5
5
|
import { hrefSchema } from '../reusable/href.js';
|
|
6
6
|
import { openApiSchema } from '../reusable/openapi.js';
|
|
7
|
+
import { sdkNotSupportedSchema } from '../reusable/sdk.js';
|
|
7
8
|
import { anchorsSchema, decoratedAnchorsSchema } from './anchors.js';
|
|
8
9
|
import { decoratedDropdownsSchema, dropdownsSchema } from './dropdown.js';
|
|
9
10
|
import { globalSchema } from './global.js';
|
|
@@ -12,7 +13,7 @@ import { decoratedLanguagesSchema, languagesSchema } from './languages.js';
|
|
|
12
13
|
import { decoratedPagesSchema, pagesSchema } from './pages.js';
|
|
13
14
|
import { decoratedProductsSchema, productsSchema } from './products.js';
|
|
14
15
|
import { decoratedTabsSchema, tabsSchema } from './tabs.js';
|
|
15
|
-
export const baseVersionSchema = z.object(Object.assign({ version: z.string().nonempty().describe('The name of the version'), graphql: graphqlNotSupportedSchema, default: z.boolean().optional().describe('Whether this version is the default version'), tag: z.string().optional().describe('Tag for the version'), hidden: hiddenSchema.optional() }, directoryField));
|
|
16
|
+
export const baseVersionSchema = z.object(Object.assign({ version: z.string().nonempty().describe('The name of the version'), graphql: graphqlNotSupportedSchema, sdk: sdkNotSupportedSchema, default: z.boolean().optional().describe('Whether this version is the default version'), tag: z.string().optional().describe('Tag for the version'), hidden: hiddenSchema.optional() }, directoryField));
|
|
16
17
|
export const nonRecursiveVersionSchema = baseVersionSchema.extend({ href: hrefSchema });
|
|
17
18
|
export const versionSchema = z.union([
|
|
18
19
|
baseVersionSchema.extend({
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SDK_FORMATS: readonly ["typedoc", "docfx", "javadoc", "sphinx", "phpdoc"];
|
|
3
|
+
export declare const sdkFormatSchema: z.ZodEnum<["typedoc", "docfx", "javadoc", "sphinx", "phpdoc"]>;
|
|
4
|
+
export declare const sdkSchema: z.ZodObject<{
|
|
5
|
+
format: z.ZodEnum<["typedoc", "docfx", "javadoc", "sphinx", "phpdoc"]>;
|
|
6
|
+
source: z.ZodEffects<z.ZodString, string, string>;
|
|
7
|
+
directory: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
8
|
+
}, "strict", z.ZodTypeAny, {
|
|
9
|
+
source: string;
|
|
10
|
+
format: "typedoc" | "docfx" | "javadoc" | "sphinx" | "phpdoc";
|
|
11
|
+
directory?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
source: string;
|
|
14
|
+
format: "typedoc" | "docfx" | "javadoc" | "sphinx" | "phpdoc";
|
|
15
|
+
directory?: string | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
export type SdkConfig = z.infer<typeof sdkSchema>;
|
|
18
|
+
export type SdkFormat = z.infer<typeof sdkFormatSchema>;
|
|
19
|
+
export declare const sdkNotSupportedSchema: z.ZodOptional<z.ZodNever>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { isAbsoluteUrl } from '../../../../isAbsoluteUrl.js';
|
|
3
|
+
import { normalizeRelativePath } from '../../../../transforms/normalizeRelativePath.js';
|
|
4
|
+
export const SDK_FORMATS = ['typedoc', 'docfx', 'javadoc', 'sphinx', 'phpdoc'];
|
|
5
|
+
export const sdkFormatSchema = z
|
|
6
|
+
.enum(SDK_FORMATS)
|
|
7
|
+
.describe('The documentation generator that produced the artifact');
|
|
8
|
+
const sdkSourceSchema = z
|
|
9
|
+
.string()
|
|
10
|
+
.trim()
|
|
11
|
+
.nonempty()
|
|
12
|
+
.transform((value, ctx) => {
|
|
13
|
+
if (!isAbsoluteUrl(value))
|
|
14
|
+
return normalizeRelativePath(value);
|
|
15
|
+
try {
|
|
16
|
+
if (new URL(value).protocol !== 'https:') {
|
|
17
|
+
ctx.addIssue({
|
|
18
|
+
code: z.ZodIssueCode.custom,
|
|
19
|
+
message: 'Must be a local path or a valid HTTPS URL.',
|
|
20
|
+
});
|
|
21
|
+
return z.NEVER;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
catch (_a) {
|
|
25
|
+
ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Invalid URL' });
|
|
26
|
+
return z.NEVER;
|
|
27
|
+
}
|
|
28
|
+
return value;
|
|
29
|
+
})
|
|
30
|
+
.describe('Relative path or HTTPS URL of the generator artifact; directory-shaped formats accept a zip (or javadoc jar) when remote');
|
|
31
|
+
export const sdkSchema = z
|
|
32
|
+
.object({
|
|
33
|
+
format: sdkFormatSchema,
|
|
34
|
+
source: sdkSourceSchema,
|
|
35
|
+
directory: z.string().trim().nonempty().transform(normalizeRelativePath).optional(),
|
|
36
|
+
})
|
|
37
|
+
.strict()
|
|
38
|
+
.describe('Generate SDK reference pages from a documentation generator artifact');
|
|
39
|
+
export const sdkNotSupportedSchema = z.never().optional();
|