@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.
@@ -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 P } from "../api-playground-2/schemaGraph/addApiReferenceDataFromMdxAndDocsConfig.js";
4
- import { processSecurityOptions as u } from "../api-playground-2/schemaGraph/processSecurityOptions.js";
5
- const a = o({ pageMetadata: {} }), c = o({}), p = o({}), s = o({ apiReferenceData: {} }), C = o({
6
- apiReferenceData2: {}
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
- a.displayName = "PageContext";
13
+ p.displayName = "PageContext";
9
14
  c.displayName = "DeploymentMetadataContext";
10
- p.displayName = "DocsConfigContext";
11
- s.displayName = "ApiReferenceContext";
12
- function l({ value: e, children: t }) {
13
- return /* @__PURE__ */ n(a.Provider, { value: e, children: t });
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 A({
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 M({
26
+ function F({
22
27
  value: e,
23
28
  children: t
24
29
  }) {
25
- return /* @__PURE__ */ n(p.Provider, { value: e, children: t });
30
+ return /* @__PURE__ */ n(s.Provider, { value: e, children: t });
26
31
  }
27
- function N({
32
+ function L({
28
33
  value: e,
29
34
  children: t
30
35
  }) {
31
- return /* @__PURE__ */ n(s.Provider, { value: e, children: t });
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: d,
37
- apiReferenceData2: f,
38
- children: m
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 = P({
41
- apiReferenceData2: f,
42
- mdxExtracts: d,
48
+ const r = y({
49
+ apiReferenceData2: m,
50
+ mdxExtracts: f,
43
51
  docsConfig: t,
44
52
  pageMetadata: e
45
- }), i = u(r);
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 D = r;
52
- return /* @__PURE__ */ n(C.Provider, { value: { apiReferenceData2: D ?? {} }, children: m });
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
- s as ApiReferenceContext,
56
- C as ApiReferenceContext2,
57
- N as ApiReferenceProvider,
63
+ d as ApiReferenceContext,
64
+ A as ApiReferenceContext2,
65
+ L as ApiReferenceProvider,
58
66
  O as ApiReferenceProvider2,
59
67
  c as DeploymentMetadataContext,
60
- A as DeploymentMetadataProvider,
61
- p as DocsConfigContext,
62
- M as DocsConfigProvider,
63
- a as PageContext,
64
- l as PageProvider
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 o, useMemo as i } from "react";
2
- import { DocsConfigContext as s, PageContext as a, ApiReferenceContext2 as c } from "../contexts/ConfigContext.js";
3
- import { useEndpoint as f } from "./useEndpoint.js";
4
- const g = () => {
5
- const { docsConfig: p } = o(s), { pageMetadata: r } = o(a), e = f(), { apiReferenceData2: n } = o(c);
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
- g as useApiPlaygroundDisplay
8
+ p as useApiPlaygroundDisplay
11
9
  };
@@ -1,16 +1,15 @@
1
1
  import "react";
2
- import "../env.js";
3
- const i = (r, t) => Object.entries(t).reduce((e, [o, n]) => n == null ? e : e.replace(
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), l = (r, t) => {
5
+ ), r), i = (r, t) => {
7
6
  let e = r;
8
- return Object.entries(t).forEach(([o, n]) => {
9
- n && (e = e.replace(`{${o}}`, n));
7
+ return Object.entries(t).forEach(([c, n]) => {
8
+ n && (e = e.replace(`{${c}}`, n));
10
9
  }), e;
11
- }, s = (r, t) => r.replace(/\/$/, "") + "/" + t.replace(/^\//, "");
10
+ }, l = (r, t) => r.replace(/\/$/, "") + "/" + t.replace(/^\//, "");
12
11
  export {
13
- i as addPathParams,
14
- l as addServerVariables,
15
- s as joinWithSingleSlash
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 function ApiPage({ theme, className, pathname, markdownContent, allPages, baseUrl, LinkComponent, contextMenu, apiReferenceData, pageMetadata }: ApiPageProps): JSX_2.Element;
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 C } from "./context/components-context.js";
7
- import { NavTree as P } from "./components/nav-tree/index.js";
8
- import { useApiReference as u } from "./components/Api/ApiReferenceProvider.js";
9
- import { ApiReferenceContext as T, ApiReferenceContext2 as b, ApiReferenceProvider as v, ApiReferenceProvider2 as A, DeploymentMetadataContext as H, DeploymentMetadataProvider as h, DocsConfigContext as D, DocsConfigProvider as R, PageContext as M, PageProvider as k } from "./contexts/ConfigContext.js";
10
- import { TableOfContents as w } from "./components/toc/index.js";
11
- import { PivotAwareTOC as F } from "./components/toc/pivot-aware-toc.js";
12
- import { PageContextMenu as N } from "./components/page-context-menu.js";
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 X, generateLlmsTxt as q } from "./utils/generate-llms-txt.js";
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 ge } from "./api-playground-2/SchemaPage.js";
27
- import { ApiExamples as ce } from "./api-playground-2/ApiExamples.js";
28
- import { ApiFields as ye } from "./api-playground-2/ApiFields.js";
29
- import { Playground as be } from "./api-playground-2/Playground.js";
30
- import { EndpointHeader as Ae } from "./api-playground-2/EndpointHeader.js";
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 Se } from "./api-playground-2/hooks/useSendPlaygroundRequest.js";
34
- import { useInitializeInputs as Le } from "./api-playground-2/hooks/useInitializeInputs.js";
35
- import { useCopyPathWithInputs as Ie } from "./api-playground-2/hooks/useCopyPathWithInputs.js";
36
- import { useSelectedSecurityOption as Oe } from "./api-playground-2/hooks/useSelectedSecurityOption.js";
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 qe } from "./api-playground-2/schemaGraph/getApiReferenceDataFromGraph.js";
39
+ import { getApiReferenceDataFromGraph as Xe } from "./api-playground-2/schemaGraph/getApiReferenceDataFromGraph.js";
40
40
  import { ApiPage as Je } from "./components/apiPage.js";
41
- import { CodeBlock as je } from "./components/content-components/code-block.js";
42
- import { Heading as Qe } from "./components/content-components/heading.js";
43
- import { Link as Ve } from "./components/content-components/link.js";
44
- import { Callout as _e } from "./components/content-components/callouts.js";
45
- import { ZonePivot as eo } from "./components/content-components/zone-pivots/zone-pivot.js";
46
- import { ZoneTarget as ro } from "./components/content-components/zone-pivots/zone-target.js";
47
- import { ZonePivotProvider as po } from "./components/content-components/zone-pivots/zone-pivot-context.js";
48
- import { ZonePivotSelector as ao } from "./components/content-components/zone-pivots/zone-pivot-selector.js";
49
- import { ParamName as no } from "./components/content-components/param-name.js";
50
- import { Tabs as lo } from "./components/content-components/tabs/tabs.js";
51
- import { Tab as so } from "./components/content-components/tabs/tab.js";
52
- import { Details as go, Summary as Po } from "./components/content-components/details/details.js";
53
- import { Table as uo, TableBody as yo, TableCaption as To, TableCell as bo, TableFooter as vo, TableHead as Ao, TableHeader as Ho, TableRow as ho } from "./components/content-components/table/index.js";
54
- import { LaTeX as Ro } from "./components/content-components/latex.js";
55
- import { allComponents as ko } from "./components/content-components/all-components.js";
56
- import { Home as wo } from "./components/content-components/home.js";
57
- import { MobileNavTree as Fo } from "./components/nav-tree/mobile-nav.js";
58
- import { rehypeCodeblocks as No } from "./plugins/rehype/rehype-code-blocks.js";
59
- import { remarkHeadingIds as Zo } from "./plugins/remark/remark-heading-ids.js";
60
- import { sanitizePreTags as Eo } from "./plugins/sanitize/rehype-pre-to-mdx-fence.js";
61
- import { rehypeCallouts as Xo } from "./plugins/sanitize/rehype-callouts.js";
62
- import { rehypeParamName as Go } from "./plugins/sanitize/rehype-param-name.js";
63
- import { rehypeTabs as Wo } from "./plugins/sanitize/rehype-tabs.js";
64
- import { rehypeDetails as Ko } from "./plugins/sanitize/rehype-details.js";
65
- import { rehypeHeadingIds as Uo } from "./plugins/sanitize/rehype-heading-ids.js";
66
- import { rehypeZonePivots as Yo } from "./plugins/sanitize/rehype-zone-pivots.js";
67
- import { mdxJsxFlowElementHandler as $o, rehypeRemark as er } from "./plugins/sanitize/rehype-remark.js";
68
- import { rehypeLatex as rr } from "./plugins/sanitize/rehype-latex.js";
69
- import { tableCellHandler as pr, tableHandler as mr, tableRowHandler as ar } from "./plugins/sanitize/rehype-table-align.js";
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
- ce as ApiExamples,
73
- ye as ApiFields,
75
+ Pe as ApiExamples,
76
+ ue as ApiFields,
74
77
  Je as ApiPage,
75
78
  he as ApiPlaygroundContext,
76
79
  De as ApiPlaygroundContextLegacy,
77
- T as ApiReferenceContext,
78
- b as ApiReferenceContext2,
79
- v as ApiReferenceProvider,
80
- A as ApiReferenceProvider2,
81
- _e as Callout,
82
- je as CodeBlock,
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
- go as Details,
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
- Ae as EndpointHeader,
92
- Qe as Heading,
93
- wo as Home,
94
- Ro as LaTeX,
95
- Ve as Link,
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
- Fo as MobileNavTree,
98
- P as NavTree,
100
+ Eo as MobileNavTree,
101
+ g as NavTree,
99
102
  de as OperationPage,
100
103
  M as PageContext,
101
- N as PageContextMenu,
102
- k as PageProvider,
103
- no as ParamName,
104
- F as PivotAwareTOC,
104
+ F as PageContextMenu,
105
+ S as PageProvider,
106
+ Co as ParamName,
107
+ L as PivotAwareTOC,
105
108
  n as PlainTextPage,
106
- be as Playground,
107
- ge as SchemaPage,
108
- Po as Summary,
109
- so as Tab,
110
- uo as Table,
111
- yo as TableBody,
112
- To as TableCaption,
113
- bo as TableCell,
114
- vo as TableFooter,
115
- Ao as TableHead,
116
- Ho as TableHeader,
117
- w as TableOfContents,
118
- ho as TableRow,
119
- lo as Tabs,
120
- eo as ZonePivot,
121
- po as ZonePivotProvider,
122
- ao as ZonePivotSelector,
123
- ro as ZoneTarget,
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
- ko as allComponents,
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
- X as generateLlmsFullTxt,
135
- q as generateLlmsTxt,
136
- qe as getApiReferenceDataFromGraph,
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
- $o as mdxJsxFlowElementHandler,
148
+ mr as mdxJsxFlowElementHandler,
143
149
  Be as processSecurityOptions,
144
- Xo as rehypeCallouts,
145
- No as rehypeCodeblocks,
146
- Ko as rehypeDetails,
147
- Uo as rehypeHeadingIds,
148
- rr as rehypeLatex,
149
- Go as rehypeParamName,
150
- er as rehypeRemark,
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
- Wo as rehypeTabs,
153
- Yo as rehypeZonePivots,
154
- Zo as remarkHeadingIds,
158
+ Yo as rehypeTabs,
159
+ tr as rehypeZonePivots,
160
+ qo as remarkHeadingIds,
155
161
  fe as removeHtmlComments,
156
- Eo as sanitizePreTags,
162
+ Wo as sanitizePreTags,
157
163
  pe as serializeMdx,
158
- pr as tableCellHandler,
159
- mr as tableHandler,
160
- ar as tableRowHandler,
161
- u as useApiReference,
162
- C as useComponents,
163
- Ie as useCopyPathWithInputs,
164
- Le as useInitializeInputs,
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
- Oe as useSelectedSecurityOption,
168
- Se as useSendPlaygroundRequest
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
+ };