@mintlify/validation 0.1.921 → 0.1.923
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/mint-config/schemas/v2/properties/navigation/divisionNav.d.ts +8 -8
- package/dist/mint-config/schemas/v2/properties/navigation/groups.d.ts +908 -4
- package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +3696 -60
- package/dist/mint-config/schemas/v2/properties/navigation/pages.d.ts +908 -4
- package/dist/mint-config/schemas/v2/properties/packages.js +1 -1
- package/dist/mint-config/schemas/v2/properties/reusable/page.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/reusable/page.js +23 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Division } from '../reusable/divisions.js';
|
|
3
3
|
import { graphqlSchema } from '../reusable/graphql.js';
|
|
4
|
-
import { DecoratedPageConfig } from '../reusable/page.js';
|
|
4
|
+
import { ClientNavPage, DecoratedPageConfig } from '../reusable/page.js';
|
|
5
5
|
import { sdkSchema } from '../reusable/sdk.js';
|
|
6
6
|
import { BaseAnchorSchema } from './anchors.js';
|
|
7
7
|
import { BaseDropdownSchema } from './dropdown.js';
|
|
@@ -12,7 +12,7 @@ import type { NavigationLinkConfig } from './pages.js';
|
|
|
12
12
|
import { BaseProductSchema } from './products.js';
|
|
13
13
|
import { BaseTabSchema } from './tabs.js';
|
|
14
14
|
import { BaseVersionSchema } from './version.js';
|
|
15
|
-
type NavigationType = 'default' | 'decorated';
|
|
15
|
+
type NavigationType = 'default' | 'decorated' | 'client';
|
|
16
16
|
declare const SomeApiSchema: z.ZodObject<{
|
|
17
17
|
openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
18
18
|
source: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -107,9 +107,9 @@ type BaseNavigation<T extends NavigationType, K extends Division> = {
|
|
|
107
107
|
} | {
|
|
108
108
|
menu: K extends ExcludedDivisions['menu'] ? never : MenuItemNavigation<T>[];
|
|
109
109
|
} | {
|
|
110
|
-
groups:
|
|
110
|
+
groups: GroupNavigation<T>[];
|
|
111
111
|
} | {
|
|
112
|
-
pages:
|
|
112
|
+
pages: PageOrGroupNavigation<T>[];
|
|
113
113
|
} | {
|
|
114
114
|
href: string;
|
|
115
115
|
};
|
|
@@ -140,14 +140,14 @@ export type GlobalNavigation = {
|
|
|
140
140
|
href: string;
|
|
141
141
|
})[];
|
|
142
142
|
};
|
|
143
|
-
export type PageNavigation<T extends NavigationType> = T extends 'default' ? string : DecoratedPageConfig;
|
|
144
|
-
export type PageOrGroupNavigation<T extends NavigationType> = T extends 'default' ? PageNavigation<'default'> | NavigationLinkConfig | GroupNavigation<'default'> : PageNavigation<
|
|
143
|
+
export type PageNavigation<T extends NavigationType> = T extends 'default' ? string : T extends 'client' ? ClientNavPage : DecoratedPageConfig;
|
|
144
|
+
export type PageOrGroupNavigation<T extends NavigationType> = T extends 'default' ? PageNavigation<'default'> | NavigationLinkConfig | GroupNavigation<'default'> : PageNavigation<T> | GroupNavigation<T>;
|
|
145
145
|
export type GroupNavigation<T extends NavigationType> = T extends 'default' ? Omit<BaseGroupSchema, 'sdk' | 'graphql'> & z.infer<typeof SomeApiSchema> & {
|
|
146
146
|
sdk?: z.infer<typeof sdkSchema>;
|
|
147
147
|
graphql?: z.infer<typeof graphqlSchema>;
|
|
148
148
|
pages?: PageOrGroupNavigation<'default'>[];
|
|
149
149
|
} : Omit<BaseGroupSchema, 'root' | 'sdk'> & {
|
|
150
|
-
pages: PageOrGroupNavigation<
|
|
151
|
-
root?:
|
|
150
|
+
pages: PageOrGroupNavigation<T>[];
|
|
151
|
+
root?: PageNavigation<T>;
|
|
152
152
|
};
|
|
153
153
|
export {};
|