@mintlify/msft-sdk 1.1.67 → 1.1.69
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/README.md +82 -2
- package/dist/api-playground-2/ApiExamples.js +19 -21
- package/dist/api-playground-2/components/Example/GeneratedRequestExample.js +104 -105
- package/dist/api-playground-2/components/Example/RequestExample.js +37 -37
- package/dist/api-playground-2/hooks/useSendPlaygroundRequest.js +98 -98
- package/dist/components/apiPage.js +57 -54
- package/dist/components/docsPage.js +38 -39
- package/dist/constants/index.js +5 -2
- package/dist/contexts/ConfigContext.js +39 -31
- package/dist/hooks/useApiPlaygroundDisplay.js +6 -8
- package/dist/hooks/useSendPlaygroundRequest.js +9 -10
- package/dist/index.d.ts +71 -2
- package/dist/index.js +116 -110
- package/dist/openapi/convertOpenApiSpecToHrefMap.js +20 -0
- package/dist/openapi/convertOpenApiSpecToNav.js +44 -0
- package/dist/openapi/loadAndConvertOpenApiSpec.js +14 -0
- package/package.json +5 -2
- package/dist/hooks/useEndpoint.js +0 -15
|
@@ -1,65 +1,73 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as o } from "react";
|
|
3
|
-
import { addApiReferenceDataFromMdxAndDocsConfig as
|
|
4
|
-
import { processSecurityOptions as
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { addApiReferenceDataFromMdxAndDocsConfig as y } from "../api-playground-2/schemaGraph/addApiReferenceDataFromMdxAndDocsConfig.js";
|
|
4
|
+
import { processSecurityOptions as C } from "../api-playground-2/schemaGraph/processSecurityOptions.js";
|
|
5
|
+
import { NEXT_PUBLIC as a } from "../env.js";
|
|
6
|
+
import { MINTLIFY_FILE_REQUEST_ENDPOINT_URL as x, MINTLIFY_REQUEST_ENDPOINT_URL as g } from "../constants/index.js";
|
|
7
|
+
const p = o({ pageMetadata: {} }), c = o({}), s = o({}), d = o({ apiReferenceData: {} }), A = o({
|
|
8
|
+
apiReferenceData2: {},
|
|
9
|
+
playgroundDisplay: "simple",
|
|
10
|
+
requestEndpointUrl: g,
|
|
11
|
+
fileRequestEndpointUrl: x
|
|
7
12
|
});
|
|
8
|
-
|
|
13
|
+
p.displayName = "PageContext";
|
|
9
14
|
c.displayName = "DeploymentMetadataContext";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
return /* @__PURE__ */ n(
|
|
15
|
+
s.displayName = "DocsConfigContext";
|
|
16
|
+
d.displayName = "ApiReferenceContext";
|
|
17
|
+
function S({ value: e, children: t }) {
|
|
18
|
+
return /* @__PURE__ */ n(p.Provider, { value: e, children: t });
|
|
14
19
|
}
|
|
15
|
-
function
|
|
20
|
+
function U({
|
|
16
21
|
value: e,
|
|
17
22
|
children: t
|
|
18
23
|
}) {
|
|
19
24
|
return /* @__PURE__ */ n(c.Provider, { value: e, children: t });
|
|
20
25
|
}
|
|
21
|
-
function
|
|
26
|
+
function F({
|
|
22
27
|
value: e,
|
|
23
28
|
children: t
|
|
24
29
|
}) {
|
|
25
|
-
return /* @__PURE__ */ n(
|
|
30
|
+
return /* @__PURE__ */ n(s.Provider, { value: e, children: t });
|
|
26
31
|
}
|
|
27
|
-
function
|
|
32
|
+
function L({
|
|
28
33
|
value: e,
|
|
29
34
|
children: t
|
|
30
35
|
}) {
|
|
31
|
-
return /* @__PURE__ */ n(
|
|
36
|
+
return /* @__PURE__ */ n(d.Provider, { value: e, children: t });
|
|
32
37
|
}
|
|
33
38
|
function O({
|
|
34
39
|
pageMetadata: e,
|
|
35
40
|
docsConfig: t,
|
|
36
|
-
mdxExtracts:
|
|
37
|
-
apiReferenceData2:
|
|
38
|
-
|
|
41
|
+
mdxExtracts: f,
|
|
42
|
+
apiReferenceData2: m,
|
|
43
|
+
playgroundDisplay: P,
|
|
44
|
+
requestEndpointUrl: u = `${a.BASE_PATH}/_mintlify/api/request`,
|
|
45
|
+
fileRequestEndpointUrl: D = `${a.BASE_PATH}/_mintlify/api/file-request`,
|
|
46
|
+
children: l
|
|
39
47
|
}) {
|
|
40
|
-
const r =
|
|
41
|
-
apiReferenceData2:
|
|
42
|
-
mdxExtracts:
|
|
48
|
+
const r = y({
|
|
49
|
+
apiReferenceData2: m,
|
|
50
|
+
mdxExtracts: f,
|
|
43
51
|
docsConfig: t,
|
|
44
52
|
pageMetadata: e
|
|
45
|
-
}), i =
|
|
53
|
+
}), i = C(r);
|
|
46
54
|
i.length > 0 && (r.dependencies || (r.dependencies = {
|
|
47
55
|
servers: {},
|
|
48
56
|
security: {},
|
|
49
57
|
processedSecurityOptions: []
|
|
50
58
|
}), r.dependencies.processedSecurityOptions = i);
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */ n(
|
|
59
|
+
const R = r;
|
|
60
|
+
return /* @__PURE__ */ n(A.Provider, { value: { apiReferenceData2: R ?? {}, playgroundDisplay: P, requestEndpointUrl: u, fileRequestEndpointUrl: D }, children: l });
|
|
53
61
|
}
|
|
54
62
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
d as ApiReferenceContext,
|
|
64
|
+
A as ApiReferenceContext2,
|
|
65
|
+
L as ApiReferenceProvider,
|
|
58
66
|
O as ApiReferenceProvider2,
|
|
59
67
|
c as DeploymentMetadataContext,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
U as DeploymentMetadataProvider,
|
|
69
|
+
s as DocsConfigContext,
|
|
70
|
+
F as DocsConfigProvider,
|
|
71
|
+
p as PageContext,
|
|
72
|
+
S as PageProvider
|
|
65
73
|
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
let t;
|
|
7
|
-
return n.operation ? t = n.operation.type : t = e == null ? void 0 : e.type, i(() => "simple", [p, r, t]);
|
|
1
|
+
import { useContext as e } from "react";
|
|
2
|
+
import { ApiReferenceContext2 as r } from "../contexts/ConfigContext.js";
|
|
3
|
+
const p = () => {
|
|
4
|
+
const { playgroundDisplay: o } = e(r);
|
|
5
|
+
return o;
|
|
8
6
|
};
|
|
9
7
|
export {
|
|
10
|
-
|
|
8
|
+
p as useApiPlaygroundDisplay
|
|
11
9
|
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
`{${o}}`,
|
|
2
|
+
const a = (r, t) => Object.entries(t).reduce((e, [c, n]) => n == null ? e : e.replace(
|
|
3
|
+
`{${c}}`,
|
|
5
4
|
encodeURIComponent(n.toString())
|
|
6
|
-
), r),
|
|
5
|
+
), r), i = (r, t) => {
|
|
7
6
|
let e = r;
|
|
8
|
-
return Object.entries(t).forEach(([
|
|
9
|
-
n && (e = e.replace(`{${
|
|
7
|
+
return Object.entries(t).forEach(([c, n]) => {
|
|
8
|
+
n && (e = e.replace(`{${c}}`, n));
|
|
10
9
|
}), e;
|
|
11
|
-
},
|
|
10
|
+
}, l = (r, t) => r.replace(/\/$/, "") + "/" + t.replace(/^\//, "");
|
|
12
11
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
a as addPathParams,
|
|
13
|
+
i as addServerVariables,
|
|
14
|
+
l as joinWithSingleSlash
|
|
16
15
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiPlaygroundDisplayType } from '@mintlify/models';
|
|
1
2
|
import { ApiPlaygroundInputs } from '@mintlify/validation';
|
|
2
3
|
import { ApiPlaygroundResultType } from '@mintlify/models';
|
|
3
4
|
import { AsyncAPIDocumentInterface } from '@mintlify/common';
|
|
@@ -99,7 +100,16 @@ export declare const ApiFields: NamedExoticComponent< {
|
|
|
99
100
|
pageMetadata: PageMetaTags;
|
|
100
101
|
}>;
|
|
101
102
|
|
|
102
|
-
export declare
|
|
103
|
+
export declare interface ApiNavStructure {
|
|
104
|
+
items: NavItem_2[];
|
|
105
|
+
metadata: {
|
|
106
|
+
generated_from: string;
|
|
107
|
+
spec_title: string;
|
|
108
|
+
spec_version: string;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export declare function ApiPage({ theme, className, pathname, markdownContent, allPages, baseUrl, LinkComponent, contextMenu, contextMenuEnabled, apiReferenceData, pageMetadata, playgroundDisplay, requestEndpointUrl, fileRequestEndpointUrl, }: ApiPageProps): JSX_2.Element;
|
|
103
113
|
|
|
104
114
|
declare interface ApiPageProps {
|
|
105
115
|
theme: 'light' | 'dark';
|
|
@@ -110,8 +120,12 @@ declare interface ApiPageProps {
|
|
|
110
120
|
baseUrl?: string;
|
|
111
121
|
LinkComponent?: LinkComponent;
|
|
112
122
|
contextMenu?: PageContextMenuConfig;
|
|
123
|
+
contextMenuEnabled?: boolean;
|
|
113
124
|
apiReferenceData?: ApiReferenceDataV2;
|
|
114
125
|
pageMetadata: PageMetaTags;
|
|
126
|
+
playgroundDisplay?: ApiPlaygroundDisplayType;
|
|
127
|
+
requestEndpointUrl?: string;
|
|
128
|
+
fileRequestEndpointUrl?: string;
|
|
115
129
|
}
|
|
116
130
|
|
|
117
131
|
declare const ApiPlaygroundContext: Context<ApiPlaygroundContextType>;
|
|
@@ -134,6 +148,9 @@ export declare const ApiReferenceContext2: Context<ApiReferenceContext2Type>;
|
|
|
134
148
|
|
|
135
149
|
export declare type ApiReferenceContext2Type = {
|
|
136
150
|
apiReferenceData2: ApiReferenceDataV2;
|
|
151
|
+
playgroundDisplay: ApiPlaygroundDisplayType;
|
|
152
|
+
requestEndpointUrl: string;
|
|
153
|
+
fileRequestEndpointUrl: string;
|
|
137
154
|
};
|
|
138
155
|
|
|
139
156
|
export declare type ApiReferenceContextType = {
|
|
@@ -177,13 +194,16 @@ export declare function ApiReferenceProvider({ value, children, }: {
|
|
|
177
194
|
children: ReactNode;
|
|
178
195
|
}): JSX_2.Element;
|
|
179
196
|
|
|
180
|
-
export declare function ApiReferenceProvider2({ pageMetadata, docsConfig, mdxExtracts, apiReferenceData2, children, }: ApiReferenceProvider2Props): JSX_2.Element;
|
|
197
|
+
export declare function ApiReferenceProvider2({ pageMetadata, docsConfig, mdxExtracts, apiReferenceData2, playgroundDisplay, requestEndpointUrl, fileRequestEndpointUrl, children, }: ApiReferenceProvider2Props): JSX_2.Element;
|
|
181
198
|
|
|
182
199
|
export declare type ApiReferenceProvider2Props = {
|
|
183
200
|
pageMetadata: PageMetaTags;
|
|
184
201
|
docsConfig: DocsConfig | undefined;
|
|
185
202
|
mdxExtracts: MdxExtracts_2 | undefined;
|
|
186
203
|
apiReferenceData2: ApiReferenceDataV2 | undefined;
|
|
204
|
+
playgroundDisplay: ApiPlaygroundDisplayType;
|
|
205
|
+
requestEndpointUrl?: string;
|
|
206
|
+
fileRequestEndpointUrl?: string;
|
|
187
207
|
children: ReactNode;
|
|
188
208
|
};
|
|
189
209
|
|
|
@@ -276,6 +296,37 @@ export declare function convertHtmlToMdx(html: string, options?: ConvertOptions)
|
|
|
276
296
|
mdxExtracts: MdxExtracts;
|
|
277
297
|
}>;
|
|
278
298
|
|
|
299
|
+
/**
|
|
300
|
+
* Converts an OpenAPI specification object to schema graph format.
|
|
301
|
+
*
|
|
302
|
+
* @param spec - The OpenAPI specification object (will be validated as OpenAPI 3.0 or 3.1)
|
|
303
|
+
* @param options - Optional configuration
|
|
304
|
+
* @param options.filename - The filename for the spec (defaults to 'openapi.json')
|
|
305
|
+
* @param options.originalFileLocation - The original file location (defaults to filename)
|
|
306
|
+
* @returns SchemaGraphData - The converted schema graph structure
|
|
307
|
+
* @throws Error if the spec is not a valid OpenAPI 3.0 or 3.1 document
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```typescript
|
|
311
|
+
* import { convertOpenApiSpecToGraph } from '@mintlify/msft-sdk';
|
|
312
|
+
* import openApiSpec from './azure-openapi.json';
|
|
313
|
+
*
|
|
314
|
+
* const graphData = convertOpenApiSpecToGraph(openApiSpec, {
|
|
315
|
+
* filename: 'azure-openapi.json'
|
|
316
|
+
* });
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
export declare function convertOpenApiSpecToGraph(spec: unknown, options?: {
|
|
320
|
+
filename?: string;
|
|
321
|
+
originalFileLocation?: string;
|
|
322
|
+
}): SchemaGraphData;
|
|
323
|
+
|
|
324
|
+
export declare function convertOpenApiSpecToHrefMap(spec: unknown, options?: {
|
|
325
|
+
baseHref?: string;
|
|
326
|
+
}): HrefToEndpointMap;
|
|
327
|
+
|
|
328
|
+
export declare function convertOpenApiSpecToNav(spec: unknown): ApiNavStructure;
|
|
329
|
+
|
|
279
330
|
export declare interface ConvertOptions {
|
|
280
331
|
metadata?: Record<string, unknown>;
|
|
281
332
|
mdxExtracts?: MdxExtracts;
|
|
@@ -528,6 +579,12 @@ declare type EndpointHeaderProps = {
|
|
|
528
579
|
children?: React.ReactNode;
|
|
529
580
|
};
|
|
530
581
|
|
|
582
|
+
export declare interface EndpointInfo {
|
|
583
|
+
path: string;
|
|
584
|
+
title: string;
|
|
585
|
+
description?: string;
|
|
586
|
+
}
|
|
587
|
+
|
|
531
588
|
export declare function extractHeadings(): (tree: Node_2, file: unknown) => void;
|
|
532
589
|
|
|
533
590
|
export declare function generateLlmsFullTxt(pages: LlmsPageConfig[], baseUrl: string): Promise<string>;
|
|
@@ -558,6 +615,10 @@ declare interface HeadingProps {
|
|
|
558
615
|
|
|
559
616
|
export declare const Home: () => JSX_2.Element;
|
|
560
617
|
|
|
618
|
+
export declare interface HrefToEndpointMap {
|
|
619
|
+
[href: string]: EndpointInfo;
|
|
620
|
+
}
|
|
621
|
+
|
|
561
622
|
export declare function isElement<T extends ElementType = Element_2>(node: ElementType | undefined, key?: keyof T, element?: string): node is T & {
|
|
562
623
|
data?: {
|
|
563
624
|
meta?: unknown;
|
|
@@ -676,6 +737,14 @@ export declare interface NavItem {
|
|
|
676
737
|
method?: string;
|
|
677
738
|
}
|
|
678
739
|
|
|
740
|
+
declare interface NavItem_2 {
|
|
741
|
+
toc_title: string;
|
|
742
|
+
href?: string;
|
|
743
|
+
description?: string;
|
|
744
|
+
method?: string;
|
|
745
|
+
children?: NavItem_2[];
|
|
746
|
+
}
|
|
747
|
+
|
|
679
748
|
export declare function NavTree({ navTree, activeId, className, activeHref, theme, bottomLinks, anchors, }: NavTreeProps): JSX_2.Element | null;
|
|
680
749
|
|
|
681
750
|
export declare interface NavTreeData {
|
package/dist/index.js
CHANGED
|
@@ -3,15 +3,15 @@ import { DocsLayout as p } from "./components/docsLayout.js";
|
|
|
3
3
|
import { MDXRenderer as a } from "./components/mdx-renderer.js";
|
|
4
4
|
import { PlainTextPage as n } from "./components/plain-text-page.js";
|
|
5
5
|
import { createDefaultComponents as l, defaultComponents as i } from "./components/content-components/default-components.js";
|
|
6
|
-
import { ComponentsProvider as d, useComponents as
|
|
7
|
-
import { NavTree as
|
|
8
|
-
import { useApiReference as
|
|
9
|
-
import { ApiReferenceContext as
|
|
10
|
-
import { TableOfContents as
|
|
11
|
-
import { PivotAwareTOC as
|
|
12
|
-
import { PageContextMenu as
|
|
6
|
+
import { ComponentsProvider as d, useComponents as c } from "./context/components-context.js";
|
|
7
|
+
import { NavTree as g } from "./components/nav-tree/index.js";
|
|
8
|
+
import { useApiReference as T } from "./components/Api/ApiReferenceProvider.js";
|
|
9
|
+
import { ApiReferenceContext as y, ApiReferenceContext2 as v, ApiReferenceProvider as A, ApiReferenceProvider2 as b, DeploymentMetadataContext as H, DeploymentMetadataProvider as h, DocsConfigContext as D, DocsConfigProvider as R, PageContext as M, PageProvider as S } from "./contexts/ConfigContext.js";
|
|
10
|
+
import { TableOfContents as O } from "./components/toc/index.js";
|
|
11
|
+
import { PivotAwareTOC as L } from "./components/toc/pivot-aware-toc.js";
|
|
12
|
+
import { PageContextMenu as F } from "./components/page-context-menu.js";
|
|
13
13
|
import { copyMarkdownToClipboard as Z, getPageMarkdown as z, useMarkdownCopy as E } from "./hooks/useMarkdownCopy.js";
|
|
14
|
-
import { generateLlmsFullTxt as
|
|
14
|
+
import { generateLlmsFullTxt as G, generateLlmsTxt as X } from "./utils/generate-llms-txt.js";
|
|
15
15
|
import { getNodeText as J } from "./utils/get-node-text.js";
|
|
16
16
|
import { capitalize as j } from "./utils/string.js";
|
|
17
17
|
import { cn as Q } from "./utils/cn.js";
|
|
@@ -23,147 +23,153 @@ import { extractHeadings as ae } from "./plugins/extract-headings.js";
|
|
|
23
23
|
import { rehypeRemoveHtmlComments as ne, removeHtmlComments as fe } from "./plugins/sanitize/remove-html-comments.js";
|
|
24
24
|
import { Api as ie } from "./api-playground-2/Api.js";
|
|
25
25
|
import { OperationPage as de } from "./api-playground-2/OperationPage.js";
|
|
26
|
-
import { SchemaPage as
|
|
27
|
-
import { ApiExamples as
|
|
28
|
-
import { ApiFields as
|
|
29
|
-
import { Playground as
|
|
30
|
-
import { EndpointHeader as
|
|
26
|
+
import { SchemaPage as Ce } from "./api-playground-2/SchemaPage.js";
|
|
27
|
+
import { ApiExamples as Pe } from "./api-playground-2/ApiExamples.js";
|
|
28
|
+
import { ApiFields as ue } from "./api-playground-2/ApiFields.js";
|
|
29
|
+
import { Playground as ve } from "./api-playground-2/Playground.js";
|
|
30
|
+
import { EndpointHeader as be } from "./api-playground-2/EndpointHeader.js";
|
|
31
31
|
import { ApiPlaygroundContext as he, ApiPlaygroundContext as De } from "./api-playground-2/contexts/ApiPlaygroundContext.js";
|
|
32
32
|
import { usePlaygroundInputsStore as Me } from "./api-playground-2/hooks/usePlaygroundInputsStore.js";
|
|
33
|
-
import { useSendPlaygroundRequest as
|
|
34
|
-
import { useInitializeInputs as
|
|
35
|
-
import { useCopyPathWithInputs as
|
|
36
|
-
import { useSelectedSecurityOption as
|
|
33
|
+
import { useSendPlaygroundRequest as ke } from "./api-playground-2/hooks/useSendPlaygroundRequest.js";
|
|
34
|
+
import { useInitializeInputs as we } from "./api-playground-2/hooks/useInitializeInputs.js";
|
|
35
|
+
import { useCopyPathWithInputs as Ne } from "./api-playground-2/hooks/useCopyPathWithInputs.js";
|
|
36
|
+
import { useSelectedSecurityOption as Ie } from "./api-playground-2/hooks/useSelectedSecurityOption.js";
|
|
37
37
|
import { addApiReferenceDataFromMdxAndDocsConfig as ze } from "./api-playground-2/schemaGraph/addApiReferenceDataFromMdxAndDocsConfig.js";
|
|
38
38
|
import { processSecurityOptions as Be } from "./api-playground-2/schemaGraph/processSecurityOptions.js";
|
|
39
|
-
import { getApiReferenceDataFromGraph as
|
|
39
|
+
import { getApiReferenceDataFromGraph as Xe } from "./api-playground-2/schemaGraph/getApiReferenceDataFromGraph.js";
|
|
40
40
|
import { ApiPage as Je } from "./components/apiPage.js";
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
41
|
+
import { convertOpenApiSpecToGraph as je } from "./openapi/loadAndConvertOpenApiSpec.js";
|
|
42
|
+
import { convertOpenApiSpecToNav as Qe } from "./openapi/convertOpenApiSpecToNav.js";
|
|
43
|
+
import { convertOpenApiSpecToHrefMap as Ve } from "./openapi/convertOpenApiSpecToHrefMap.js";
|
|
44
|
+
import { CodeBlock as _e } from "./components/content-components/code-block.js";
|
|
45
|
+
import { Heading as eo } from "./components/content-components/heading.js";
|
|
46
|
+
import { Link as ro } from "./components/content-components/link.js";
|
|
47
|
+
import { Callout as po } from "./components/content-components/callouts.js";
|
|
48
|
+
import { ZonePivot as ao } from "./components/content-components/zone-pivots/zone-pivot.js";
|
|
49
|
+
import { ZoneTarget as no } from "./components/content-components/zone-pivots/zone-target.js";
|
|
50
|
+
import { ZonePivotProvider as lo } from "./components/content-components/zone-pivots/zone-pivot-context.js";
|
|
51
|
+
import { ZonePivotSelector as so } from "./components/content-components/zone-pivots/zone-pivot-selector.js";
|
|
52
|
+
import { ParamName as Co } from "./components/content-components/param-name.js";
|
|
53
|
+
import { Tabs as Po } from "./components/content-components/tabs/tabs.js";
|
|
54
|
+
import { Tab as uo } from "./components/content-components/tabs/tab.js";
|
|
55
|
+
import { Details as vo, Summary as Ao } from "./components/content-components/details/details.js";
|
|
56
|
+
import { Table as Ho, TableBody as ho, TableCaption as Do, TableCell as Ro, TableFooter as Mo, TableHead as So, TableHeader as ko, TableRow as Oo } from "./components/content-components/table/index.js";
|
|
57
|
+
import { LaTeX as Lo } from "./components/content-components/latex.js";
|
|
58
|
+
import { allComponents as Fo } from "./components/content-components/all-components.js";
|
|
59
|
+
import { Home as Zo } from "./components/content-components/home.js";
|
|
60
|
+
import { MobileNavTree as Eo } from "./components/nav-tree/mobile-nav.js";
|
|
61
|
+
import { rehypeCodeblocks as Go } from "./plugins/rehype/rehype-code-blocks.js";
|
|
62
|
+
import { remarkHeadingIds as qo } from "./plugins/remark/remark-heading-ids.js";
|
|
63
|
+
import { sanitizePreTags as Wo } from "./plugins/sanitize/rehype-pre-to-mdx-fence.js";
|
|
64
|
+
import { rehypeCallouts as Ko } from "./plugins/sanitize/rehype-callouts.js";
|
|
65
|
+
import { rehypeParamName as Uo } from "./plugins/sanitize/rehype-param-name.js";
|
|
66
|
+
import { rehypeTabs as Yo } from "./plugins/sanitize/rehype-tabs.js";
|
|
67
|
+
import { rehypeDetails as $o } from "./plugins/sanitize/rehype-details.js";
|
|
68
|
+
import { rehypeHeadingIds as or } from "./plugins/sanitize/rehype-heading-ids.js";
|
|
69
|
+
import { rehypeZonePivots as tr } from "./plugins/sanitize/rehype-zone-pivots.js";
|
|
70
|
+
import { mdxJsxFlowElementHandler as mr, rehypeRemark as ar } from "./plugins/sanitize/rehype-remark.js";
|
|
71
|
+
import { rehypeLatex as nr } from "./plugins/sanitize/rehype-latex.js";
|
|
72
|
+
import { tableCellHandler as lr, tableHandler as ir, tableRowHandler as sr } from "./plugins/sanitize/rehype-table-align.js";
|
|
70
73
|
export {
|
|
71
74
|
ie as Api,
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
Pe as ApiExamples,
|
|
76
|
+
ue as ApiFields,
|
|
74
77
|
Je as ApiPage,
|
|
75
78
|
he as ApiPlaygroundContext,
|
|
76
79
|
De as ApiPlaygroundContextLegacy,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
y as ApiReferenceContext,
|
|
81
|
+
v as ApiReferenceContext2,
|
|
82
|
+
A as ApiReferenceProvider,
|
|
83
|
+
b as ApiReferenceProvider2,
|
|
84
|
+
po as Callout,
|
|
85
|
+
_e as CodeBlock,
|
|
83
86
|
d as ComponentsProvider,
|
|
84
87
|
H as DeploymentMetadataContext,
|
|
85
88
|
h as DeploymentMetadataProvider,
|
|
86
|
-
|
|
89
|
+
vo as Details,
|
|
87
90
|
D as DocsConfigContext,
|
|
88
91
|
R as DocsConfigProvider,
|
|
89
92
|
p as DocsLayout,
|
|
90
93
|
r as DocsPage,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
be as EndpointHeader,
|
|
95
|
+
eo as Heading,
|
|
96
|
+
Zo as Home,
|
|
97
|
+
Lo as LaTeX,
|
|
98
|
+
ro as Link,
|
|
96
99
|
a as MDXRenderer,
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
Eo as MobileNavTree,
|
|
101
|
+
g as NavTree,
|
|
99
102
|
de as OperationPage,
|
|
100
103
|
M as PageContext,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
F as PageContextMenu,
|
|
105
|
+
S as PageProvider,
|
|
106
|
+
Co as ParamName,
|
|
107
|
+
L as PivotAwareTOC,
|
|
105
108
|
n as PlainTextPage,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
109
|
+
ve as Playground,
|
|
110
|
+
Ce as SchemaPage,
|
|
111
|
+
Ao as Summary,
|
|
112
|
+
uo as Tab,
|
|
113
|
+
Ho as Table,
|
|
114
|
+
ho as TableBody,
|
|
115
|
+
Do as TableCaption,
|
|
116
|
+
Ro as TableCell,
|
|
117
|
+
Mo as TableFooter,
|
|
118
|
+
So as TableHead,
|
|
119
|
+
ko as TableHeader,
|
|
120
|
+
O as TableOfContents,
|
|
121
|
+
Oo as TableRow,
|
|
122
|
+
Po as Tabs,
|
|
123
|
+
ao as ZonePivot,
|
|
124
|
+
lo as ZonePivotProvider,
|
|
125
|
+
so as ZonePivotSelector,
|
|
126
|
+
no as ZoneTarget,
|
|
124
127
|
ze as addApiReferenceDataFromMdxAndDocsConfig,
|
|
125
|
-
|
|
128
|
+
Fo as allComponents,
|
|
126
129
|
j as capitalize,
|
|
127
130
|
V as cleanTitle,
|
|
128
131
|
Q as cn,
|
|
129
132
|
re as convertHtmlToMdx,
|
|
133
|
+
je as convertOpenApiSpecToGraph,
|
|
134
|
+
Ve as convertOpenApiSpecToHrefMap,
|
|
135
|
+
Qe as convertOpenApiSpecToNav,
|
|
130
136
|
Z as copyMarkdownToClipboard,
|
|
131
137
|
l as createDefaultComponents,
|
|
132
138
|
i as defaultComponents,
|
|
133
139
|
ae as extractHeadings,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
140
|
+
G as generateLlmsFullTxt,
|
|
141
|
+
X as generateLlmsTxt,
|
|
142
|
+
Xe as getApiReferenceDataFromGraph,
|
|
137
143
|
_ as getClassNames,
|
|
138
144
|
J as getNodeText,
|
|
139
145
|
z as getPageMarkdown,
|
|
140
146
|
$ as getTextContent,
|
|
141
147
|
ee as isElement,
|
|
142
|
-
|
|
148
|
+
mr as mdxJsxFlowElementHandler,
|
|
143
149
|
Be as processSecurityOptions,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
Ko as rehypeCallouts,
|
|
151
|
+
Go as rehypeCodeblocks,
|
|
152
|
+
$o as rehypeDetails,
|
|
153
|
+
or as rehypeHeadingIds,
|
|
154
|
+
nr as rehypeLatex,
|
|
155
|
+
Uo as rehypeParamName,
|
|
156
|
+
ar as rehypeRemark,
|
|
151
157
|
ne as rehypeRemoveHtmlComments,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
158
|
+
Yo as rehypeTabs,
|
|
159
|
+
tr as rehypeZonePivots,
|
|
160
|
+
qo as remarkHeadingIds,
|
|
155
161
|
fe as removeHtmlComments,
|
|
156
|
-
|
|
162
|
+
Wo as sanitizePreTags,
|
|
157
163
|
pe as serializeMdx,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
164
|
+
lr as tableCellHandler,
|
|
165
|
+
ir as tableHandler,
|
|
166
|
+
sr as tableRowHandler,
|
|
167
|
+
T as useApiReference,
|
|
168
|
+
c as useComponents,
|
|
169
|
+
Ne as useCopyPathWithInputs,
|
|
170
|
+
we as useInitializeInputs,
|
|
165
171
|
E as useMarkdownCopy,
|
|
166
172
|
Me as usePlaygroundInputsStore,
|
|
167
|
-
|
|
168
|
-
|
|
173
|
+
Ie as useSelectedSecurityOption,
|
|
174
|
+
ke as useSendPlaygroundRequest
|
|
169
175
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isOpenAPIV3orV31Document as b } from "@mintlify/validation";
|
|
2
|
+
function w(t, r) {
|
|
3
|
+
if (!b(t))
|
|
4
|
+
throw new Error("Invalid OpenAPI document: must be OpenAPI 3.0 or 3.1");
|
|
5
|
+
const p = (r == null ? void 0 : r.baseHref) || "api-reference", a = {};
|
|
6
|
+
return t.paths && Object.entries(t.paths).forEach(([g, n]) => {
|
|
7
|
+
n && Object.entries(n).forEach(([o, s]) => {
|
|
8
|
+
if (!["get", "post", "put", "delete", "patch", "options", "head"].includes(o.toLowerCase()) || !s || typeof s != "object") return;
|
|
9
|
+
const e = s, c = e.summary || "", f = e.description, i = (e.tags && e.tags.length > 0 ? e.tags : ["General"])[0].toLowerCase().replace(/\s+/g, "-"), u = c.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, ""), l = `${p}/${i}/${u}`, h = `${g}/${o.toLowerCase()}`;
|
|
10
|
+
a[l] = {
|
|
11
|
+
path: h,
|
|
12
|
+
title: c,
|
|
13
|
+
...f && { description: f }
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
}), a;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
w as convertOpenApiSpecToHrefMap
|
|
20
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { isOpenAPIV3orV31Document as d } from "@mintlify/validation";
|
|
2
|
+
function _(t) {
|
|
3
|
+
var p, f;
|
|
4
|
+
if (!d(t))
|
|
5
|
+
throw new Error("Invalid OpenAPI document: must be OpenAPI 3.0 or 3.1");
|
|
6
|
+
const a = [], r = {};
|
|
7
|
+
return t.paths && Object.entries(t.paths).forEach(([i, s]) => {
|
|
8
|
+
s && Object.entries(s).forEach(([e, c]) => {
|
|
9
|
+
if (!["get", "post", "put", "delete", "patch", "options", "head"].includes(e.toLowerCase()) || !c || typeof c != "object") return;
|
|
10
|
+
const o = c, h = o.summary || "", l = o.description;
|
|
11
|
+
(o.tags && o.tags.length > 0 ? o.tags : ["General"]).forEach((n) => {
|
|
12
|
+
r[n] || (r[n] = []);
|
|
13
|
+
const u = n.toLowerCase().replace(/\s+/g, "-"), m = h.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
|
|
14
|
+
r[n].push({
|
|
15
|
+
toc_title: h,
|
|
16
|
+
description: l,
|
|
17
|
+
href: `${u}/${m}`,
|
|
18
|
+
method: e.toUpperCase(),
|
|
19
|
+
path: i
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}), Object.entries(r).forEach(([i, s]) => {
|
|
24
|
+
a.push({
|
|
25
|
+
toc_title: i,
|
|
26
|
+
children: s.map((e) => ({
|
|
27
|
+
toc_title: e.toc_title,
|
|
28
|
+
description: e.description,
|
|
29
|
+
href: e.href,
|
|
30
|
+
method: e.method.toLowerCase()
|
|
31
|
+
}))
|
|
32
|
+
});
|
|
33
|
+
}), {
|
|
34
|
+
items: a,
|
|
35
|
+
metadata: {
|
|
36
|
+
generated_from: "openapi",
|
|
37
|
+
spec_title: ((p = t.info) == null ? void 0 : p.title) || "API Documentation",
|
|
38
|
+
spec_version: ((f = t.info) == null ? void 0 : f.version) || "1.0.0"
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
_ as convertOpenApiSpecToNav
|
|
44
|
+
};
|