@scalar/workspace-store 0.3.2 → 0.4.0
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/CHANGELOG.md +20 -0
- package/dist/client.d.ts +57 -30900
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +38 -22
- package/dist/client.js.map +2 -2
- package/dist/navigation/helpers/get-tag.d.ts +13 -0
- package/dist/navigation/helpers/get-tag.d.ts.map +1 -0
- package/dist/navigation/helpers/get-tag.js +10 -0
- package/dist/navigation/helpers/get-tag.js.map +7 -0
- package/dist/navigation/helpers/traverse-description.d.ts +19 -0
- package/dist/navigation/helpers/traverse-description.d.ts.map +1 -0
- package/dist/navigation/helpers/traverse-description.js +50 -0
- package/dist/navigation/helpers/traverse-description.js.map +7 -0
- package/dist/navigation/helpers/traverse-document.d.ts +16 -0
- package/dist/navigation/helpers/traverse-document.d.ts.map +1 -0
- package/dist/navigation/helpers/traverse-document.js +53 -0
- package/dist/navigation/helpers/traverse-document.js.map +7 -0
- package/dist/navigation/helpers/traverse-paths.d.ts +21 -0
- package/dist/navigation/helpers/traverse-paths.d.ts.map +1 -0
- package/dist/navigation/helpers/traverse-paths.js +39 -0
- package/dist/navigation/helpers/traverse-paths.js.map +7 -0
- package/dist/navigation/helpers/traverse-schemas.d.ts +16 -0
- package/dist/navigation/helpers/traverse-schemas.d.ts.map +1 -0
- package/dist/navigation/helpers/traverse-schemas.js +35 -0
- package/dist/navigation/helpers/traverse-schemas.js.map +7 -0
- package/dist/navigation/helpers/traverse-tags.d.ts +15 -0
- package/dist/navigation/helpers/traverse-tags.d.ts.map +1 -0
- package/dist/navigation/helpers/traverse-tags.js +77 -0
- package/dist/navigation/helpers/traverse-tags.js.map +7 -0
- package/dist/navigation/helpers/traverse-webhooks.d.ts +19 -0
- package/dist/navigation/helpers/traverse-webhooks.d.ts.map +1 -0
- package/dist/navigation/helpers/traverse-webhooks.js +40 -0
- package/dist/navigation/helpers/traverse-webhooks.js.map +7 -0
- package/dist/navigation/helpers/utils.d.ts +39 -0
- package/dist/navigation/helpers/utils.d.ts.map +1 -0
- package/dist/navigation/helpers/utils.js +25 -0
- package/dist/navigation/helpers/utils.js.map +7 -0
- package/dist/navigation/index.d.ts +3 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +5 -0
- package/dist/navigation/index.js.map +7 -0
- package/dist/navigation/types.d.ts +94 -0
- package/dist/navigation/types.d.ts.map +1 -0
- package/dist/navigation/types.js +1 -0
- package/dist/navigation/types.js.map +7 -0
- package/dist/schemas/extensions.d.ts +14 -0
- package/dist/schemas/extensions.d.ts.map +1 -0
- package/dist/schemas/extensions.js +17 -0
- package/dist/schemas/extensions.js.map +7 -0
- package/dist/schemas/{callback.d.ts.map → openapi-v3/callback.d.ts.map} +1 -1
- package/dist/schemas/{callback.js.map → openapi-v3/callback.js.map} +1 -1
- package/dist/schemas/{components.d.ts.map → openapi-v3/components.d.ts.map} +1 -1
- package/dist/schemas/{components.js.map → openapi-v3/components.js.map} +1 -1
- package/dist/schemas/openapi-v3/contact.d.ts.map +1 -0
- package/dist/schemas/{contact.js.map → openapi-v3/contact.js.map} +1 -1
- package/dist/schemas/openapi-v3/discriminator.d.ts.map +1 -0
- package/dist/schemas/{discriminator.js.map → openapi-v3/discriminator.js.map} +1 -1
- package/dist/schemas/openapi-v3/encoding.d.ts.map +1 -0
- package/dist/schemas/{encoding.js.map → openapi-v3/encoding.js.map} +1 -1
- package/dist/schemas/openapi-v3/example.d.ts.map +1 -0
- package/dist/schemas/{example.js.map → openapi-v3/example.js.map} +1 -1
- package/dist/schemas/openapi-v3/external-documentation.d.ts.map +1 -0
- package/dist/schemas/{external-documentation.js.map → openapi-v3/external-documentation.js.map} +1 -1
- package/dist/schemas/openapi-v3/header.d.ts.map +1 -0
- package/dist/schemas/{header.js.map → openapi-v3/header.js.map} +1 -1
- package/dist/schemas/openapi-v3/info.d.ts.map +1 -0
- package/dist/schemas/{info.js.map → openapi-v3/info.js.map} +1 -1
- package/dist/schemas/openapi-v3/license.d.ts.map +1 -0
- package/dist/schemas/{license.js.map → openapi-v3/license.js.map} +1 -1
- package/dist/schemas/openapi-v3/link.d.ts.map +1 -0
- package/dist/schemas/{link.js.map → openapi-v3/link.js.map} +1 -1
- package/dist/schemas/openapi-v3/media-type.d.ts.map +1 -0
- package/dist/schemas/{media-type.js.map → openapi-v3/media-type.js.map} +1 -1
- package/dist/schemas/openapi-v3/oauth-flow.d.ts.map +1 -0
- package/dist/schemas/{oauth-flow.js.map → openapi-v3/oauth-flow.js.map} +1 -1
- package/dist/schemas/openapi-v3/oauthflows.d.ts.map +1 -0
- package/dist/schemas/{oauthflows.js.map → openapi-v3/oauthflows.js.map} +1 -1
- package/dist/schemas/{openapi-document.d.ts.map → openapi-v3/openapi-document.d.ts.map} +1 -1
- package/dist/schemas/{openapi-document.js.map → openapi-v3/openapi-document.js.map} +1 -1
- package/dist/schemas/openapi-v3/operation-without-callback.d.ts.map +1 -0
- package/dist/schemas/{operation-without-callback.js.map → openapi-v3/operation-without-callback.js.map} +1 -1
- package/dist/schemas/openapi-v3/parameter.d.ts.map +1 -0
- package/dist/schemas/{parameter.js.map → openapi-v3/parameter.js.map} +1 -1
- package/dist/schemas/{path-item.d.ts.map → openapi-v3/path-item.d.ts.map} +1 -1
- package/dist/schemas/{path-item.js.map → openapi-v3/path-item.js.map} +1 -1
- package/dist/schemas/{paths.d.ts.map → openapi-v3/paths.d.ts.map} +1 -1
- package/dist/schemas/{paths.js.map → openapi-v3/paths.js.map} +1 -1
- package/dist/schemas/openapi-v3/reference.d.ts.map +1 -0
- package/dist/schemas/{reference.js.map → openapi-v3/reference.js.map} +1 -1
- package/dist/schemas/openapi-v3/request-body.d.ts.map +1 -0
- package/dist/schemas/{request-body.js.map → openapi-v3/request-body.js.map} +1 -1
- package/dist/schemas/openapi-v3/response.d.ts.map +1 -0
- package/dist/schemas/{response.js.map → openapi-v3/response.js.map} +1 -1
- package/dist/schemas/openapi-v3/responses.d.ts.map +1 -0
- package/dist/schemas/{responses.js.map → openapi-v3/responses.js.map} +1 -1
- package/dist/schemas/openapi-v3/schema.d.ts.map +1 -0
- package/dist/schemas/{schema.js.map → openapi-v3/schema.js.map} +1 -1
- package/dist/schemas/openapi-v3/security-requirement.d.ts.map +1 -0
- package/dist/schemas/{security-requirement.js.map → openapi-v3/security-requirement.js.map} +1 -1
- package/dist/schemas/openapi-v3/security-scheme.d.ts.map +1 -0
- package/dist/schemas/{security-scheme.js.map → openapi-v3/security-scheme.js.map} +1 -1
- package/dist/schemas/openapi-v3/server-variable.d.ts.map +1 -0
- package/dist/schemas/{server-variable.js.map → openapi-v3/server-variable.js.map} +1 -1
- package/dist/schemas/openapi-v3/server.d.ts.map +1 -0
- package/dist/schemas/{server.js.map → openapi-v3/server.js.map} +1 -1
- package/dist/schemas/openapi-v3/tag.d.ts.map +1 -0
- package/dist/schemas/{tag.js.map → openapi-v3/tag.js.map} +1 -1
- package/dist/schemas/openapi-v3/xml.d.ts.map +1 -0
- package/dist/schemas/{xml.js.map → openapi-v3/xml.js.map} +1 -1
- package/dist/schemas/{server-workspace.d.ts → workspace.d.ts} +20 -19
- package/dist/schemas/{server-workspace.d.ts.map → workspace.d.ts.map} +1 -1
- package/dist/schemas/workspace.js +31 -0
- package/dist/schemas/workspace.js.map +7 -0
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +1 -1
- package/dist/schemas.js.map +1 -1
- package/dist/server.d.ts +14 -16
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +12 -2
- package/dist/server.js.map +2 -2
- package/package.json +11 -8
- package/dist/schemas/contact.d.ts.map +0 -1
- package/dist/schemas/discriminator.d.ts.map +0 -1
- package/dist/schemas/encoding.d.ts.map +0 -1
- package/dist/schemas/example.d.ts.map +0 -1
- package/dist/schemas/external-documentation.d.ts.map +0 -1
- package/dist/schemas/header.d.ts.map +0 -1
- package/dist/schemas/info.d.ts.map +0 -1
- package/dist/schemas/license.d.ts.map +0 -1
- package/dist/schemas/link.d.ts.map +0 -1
- package/dist/schemas/media-type.d.ts.map +0 -1
- package/dist/schemas/oauth-flow.d.ts.map +0 -1
- package/dist/schemas/oauthflows.d.ts.map +0 -1
- package/dist/schemas/operation-without-callback.d.ts.map +0 -1
- package/dist/schemas/parameter.d.ts.map +0 -1
- package/dist/schemas/reference.d.ts.map +0 -1
- package/dist/schemas/request-body.d.ts.map +0 -1
- package/dist/schemas/response.d.ts.map +0 -1
- package/dist/schemas/responses.d.ts.map +0 -1
- package/dist/schemas/schema.d.ts.map +0 -1
- package/dist/schemas/security-requirement.d.ts.map +0 -1
- package/dist/schemas/security-scheme.d.ts.map +0 -1
- package/dist/schemas/server-variable.d.ts.map +0 -1
- package/dist/schemas/server-workspace.js +0 -29
- package/dist/schemas/server-workspace.js.map +0 -7
- package/dist/schemas/server.d.ts.map +0 -1
- package/dist/schemas/tag.d.ts.map +0 -1
- package/dist/schemas/xml.d.ts.map +0 -1
- /package/dist/schemas/{callback.d.ts → openapi-v3/callback.d.ts} +0 -0
- /package/dist/schemas/{callback.js → openapi-v3/callback.js} +0 -0
- /package/dist/schemas/{components.d.ts → openapi-v3/components.d.ts} +0 -0
- /package/dist/schemas/{components.js → openapi-v3/components.js} +0 -0
- /package/dist/schemas/{contact.d.ts → openapi-v3/contact.d.ts} +0 -0
- /package/dist/schemas/{contact.js → openapi-v3/contact.js} +0 -0
- /package/dist/schemas/{discriminator.d.ts → openapi-v3/discriminator.d.ts} +0 -0
- /package/dist/schemas/{discriminator.js → openapi-v3/discriminator.js} +0 -0
- /package/dist/schemas/{encoding.d.ts → openapi-v3/encoding.d.ts} +0 -0
- /package/dist/schemas/{encoding.js → openapi-v3/encoding.js} +0 -0
- /package/dist/schemas/{example.d.ts → openapi-v3/example.d.ts} +0 -0
- /package/dist/schemas/{example.js → openapi-v3/example.js} +0 -0
- /package/dist/schemas/{external-documentation.d.ts → openapi-v3/external-documentation.d.ts} +0 -0
- /package/dist/schemas/{external-documentation.js → openapi-v3/external-documentation.js} +0 -0
- /package/dist/schemas/{header.d.ts → openapi-v3/header.d.ts} +0 -0
- /package/dist/schemas/{header.js → openapi-v3/header.js} +0 -0
- /package/dist/schemas/{info.d.ts → openapi-v3/info.d.ts} +0 -0
- /package/dist/schemas/{info.js → openapi-v3/info.js} +0 -0
- /package/dist/schemas/{license.d.ts → openapi-v3/license.d.ts} +0 -0
- /package/dist/schemas/{license.js → openapi-v3/license.js} +0 -0
- /package/dist/schemas/{link.d.ts → openapi-v3/link.d.ts} +0 -0
- /package/dist/schemas/{link.js → openapi-v3/link.js} +0 -0
- /package/dist/schemas/{media-type.d.ts → openapi-v3/media-type.d.ts} +0 -0
- /package/dist/schemas/{media-type.js → openapi-v3/media-type.js} +0 -0
- /package/dist/schemas/{oauth-flow.d.ts → openapi-v3/oauth-flow.d.ts} +0 -0
- /package/dist/schemas/{oauth-flow.js → openapi-v3/oauth-flow.js} +0 -0
- /package/dist/schemas/{oauthflows.d.ts → openapi-v3/oauthflows.d.ts} +0 -0
- /package/dist/schemas/{oauthflows.js → openapi-v3/oauthflows.js} +0 -0
- /package/dist/schemas/{openapi-document.d.ts → openapi-v3/openapi-document.d.ts} +0 -0
- /package/dist/schemas/{openapi-document.js → openapi-v3/openapi-document.js} +0 -0
- /package/dist/schemas/{operation-without-callback.d.ts → openapi-v3/operation-without-callback.d.ts} +0 -0
- /package/dist/schemas/{operation-without-callback.js → openapi-v3/operation-without-callback.js} +0 -0
- /package/dist/schemas/{parameter.d.ts → openapi-v3/parameter.d.ts} +0 -0
- /package/dist/schemas/{parameter.js → openapi-v3/parameter.js} +0 -0
- /package/dist/schemas/{path-item.d.ts → openapi-v3/path-item.d.ts} +0 -0
- /package/dist/schemas/{path-item.js → openapi-v3/path-item.js} +0 -0
- /package/dist/schemas/{paths.d.ts → openapi-v3/paths.d.ts} +0 -0
- /package/dist/schemas/{paths.js → openapi-v3/paths.js} +0 -0
- /package/dist/schemas/{reference.d.ts → openapi-v3/reference.d.ts} +0 -0
- /package/dist/schemas/{reference.js → openapi-v3/reference.js} +0 -0
- /package/dist/schemas/{request-body.d.ts → openapi-v3/request-body.d.ts} +0 -0
- /package/dist/schemas/{request-body.js → openapi-v3/request-body.js} +0 -0
- /package/dist/schemas/{response.d.ts → openapi-v3/response.d.ts} +0 -0
- /package/dist/schemas/{response.js → openapi-v3/response.js} +0 -0
- /package/dist/schemas/{responses.d.ts → openapi-v3/responses.d.ts} +0 -0
- /package/dist/schemas/{responses.js → openapi-v3/responses.js} +0 -0
- /package/dist/schemas/{schema.d.ts → openapi-v3/schema.d.ts} +0 -0
- /package/dist/schemas/{schema.js → openapi-v3/schema.js} +0 -0
- /package/dist/schemas/{security-requirement.d.ts → openapi-v3/security-requirement.d.ts} +0 -0
- /package/dist/schemas/{security-requirement.js → openapi-v3/security-requirement.js} +0 -0
- /package/dist/schemas/{security-scheme.d.ts → openapi-v3/security-scheme.d.ts} +0 -0
- /package/dist/schemas/{security-scheme.js → openapi-v3/security-scheme.js} +0 -0
- /package/dist/schemas/{server-variable.d.ts → openapi-v3/server-variable.d.ts} +0 -0
- /package/dist/schemas/{server-variable.js → openapi-v3/server-variable.js} +0 -0
- /package/dist/schemas/{server.d.ts → openapi-v3/server.d.ts} +0 -0
- /package/dist/schemas/{server.js → openapi-v3/server.js} +0 -0
- /package/dist/schemas/{tag.d.ts → openapi-v3/tag.d.ts} +0 -0
- /package/dist/schemas/{tag.js → openapi-v3/tag.js} +0 -0
- /package/dist/schemas/{xml.d.ts → openapi-v3/xml.d.ts} +0 -0
- /package/dist/schemas/{xml.js → openapi-v3/xml.js} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TagsMap, TraversedSchema, TraverseSpecOptions } from '../../navigation/types.js';
|
|
2
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
3
|
+
/** Traverses the schemas in an OpenAPI document to build an array of model entries.
|
|
4
|
+
*
|
|
5
|
+
* This function processes each schema in components.schemas to:
|
|
6
|
+
* - Filter out internal schemas (marked with x-internal) and schemas to ignore (marked with x-scalar-ignore)
|
|
7
|
+
* - Create model entries with unique references and IDs
|
|
8
|
+
* - Store model IDs and titles for mobile header navigation
|
|
9
|
+
*
|
|
10
|
+
* @param content - The OpenAPI document to traverse
|
|
11
|
+
* @param titlesMap - Map to store schema IDs and titles for mobile header navigation
|
|
12
|
+
* @param getModelId - Function to generate unique IDs for schemas
|
|
13
|
+
* @returns Array of traversed schema entries
|
|
14
|
+
*/
|
|
15
|
+
export declare const traverseSchemas: (content: OpenAPIV3_1.Document, tagsMap: TagsMap, titlesMap: Map<string, string>, getModelId: TraverseSpecOptions["getModelId"]) => TraversedSchema[];
|
|
16
|
+
//# sourceMappingURL=traverse-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traverse-schemas.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AA6BxD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,YACjB,WAAW,CAAC,QAAQ,WAEpB,OAAO,aAEL,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,cAClB,mBAAmB,CAAC,YAAY,CAAC,KAC5C,eAAe,EAyBjB,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { getTag } from "../../navigation/helpers/get-tag.js";
|
|
2
|
+
const createModelEntry = (ref, name = "Unknown", titlesMap, getModelId, tag) => {
|
|
3
|
+
const id = getModelId({ name }, tag);
|
|
4
|
+
titlesMap.set(id, name);
|
|
5
|
+
return {
|
|
6
|
+
id,
|
|
7
|
+
title: name,
|
|
8
|
+
name,
|
|
9
|
+
ref,
|
|
10
|
+
type: "model"
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
const traverseSchemas = (content, tagsMap, titlesMap, getModelId) => {
|
|
14
|
+
const schemas = content.components?.schemas ?? {};
|
|
15
|
+
const untagged = [];
|
|
16
|
+
for (const name in schemas) {
|
|
17
|
+
if (schemas[name]["x-internal"] || schemas[name]["x-scalar-ignore"] || !Object.hasOwn(schemas, name)) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
const ref = `#/content/components/schemas/${name}`;
|
|
21
|
+
if (schemas[name]["x-tags"]?.length) {
|
|
22
|
+
schemas[name]["x-tags"].forEach((tagName) => {
|
|
23
|
+
const { tag } = getTag(tagsMap, tagName);
|
|
24
|
+
tagsMap.get(tagName)?.entries.push(createModelEntry(ref, name, titlesMap, getModelId, tag));
|
|
25
|
+
});
|
|
26
|
+
} else {
|
|
27
|
+
untagged.push(createModelEntry(ref, name, titlesMap, getModelId));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return untagged;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
traverseSchemas
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=traverse-schemas.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/navigation/helpers/traverse-schemas.ts"],
|
|
4
|
+
"sourcesContent": ["import { getTag } from '@/navigation/helpers/get-tag'\nimport type { TagsMap, TraversedSchema, TraverseSpecOptions } from '@/navigation/types'\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\n/** Creates a traversed schema entry from an OpenAPI schema object.\n *\n * @param ref - JSON pointer reference to the schema in the OpenAPI document\n * @param name - Name of the schema, defaults to 'Unknown'\n * @param titlesMap - Map to store schema IDs and titles for mobile header navigation\n * @param getModelId - Function to generate unique IDs for schemas\n * @returns A traversed schema entry with ID, title, name and reference\n */\nconst createModelEntry = (\n ref: string,\n name = 'Unknown',\n titlesMap: Map<string, string>,\n getModelId: TraverseSpecOptions['getModelId'],\n tag?: OpenAPIV3_1.TagObject,\n): TraversedSchema => {\n const id = getModelId({ name }, tag)\n titlesMap.set(id, name)\n\n return {\n id,\n title: name,\n name,\n ref,\n type: 'model',\n }\n}\n\n/** Traverses the schemas in an OpenAPI document to build an array of model entries.\n *\n * This function processes each schema in components.schemas to:\n * - Filter out internal schemas (marked with x-internal) and schemas to ignore (marked with x-scalar-ignore)\n * - Create model entries with unique references and IDs\n * - Store model IDs and titles for mobile header navigation\n *\n * @param content - The OpenAPI document to traverse\n * @param titlesMap - Map to store schema IDs and titles for mobile header navigation\n * @param getModelId - Function to generate unique IDs for schemas\n * @returns Array of traversed schema entries\n */\nexport const traverseSchemas = (\n content: OpenAPIV3_1.Document,\n /** Map of tagNames and their entries */\n tagsMap: TagsMap,\n /** Map of titles for the mobile header */\n titlesMap: Map<string, string>,\n getModelId: TraverseSpecOptions['getModelId'],\n): TraversedSchema[] => {\n const schemas = content.components?.schemas ?? {}\n const untagged: TraversedSchema[] = []\n\n for (const name in schemas) {\n if (schemas[name]['x-internal'] || schemas[name]['x-scalar-ignore'] || !Object.hasOwn(schemas, name)) {\n continue\n }\n\n const ref = `#/content/components/schemas/${name}`\n\n // Add to tags\n if (schemas[name]['x-tags']?.length) {\n schemas[name]['x-tags'].forEach((tagName: string) => {\n const { tag } = getTag(tagsMap, tagName)\n tagsMap.get(tagName)?.entries.push(createModelEntry(ref, name, titlesMap, getModelId, tag))\n })\n }\n // Add to untagged\n else {\n untagged.push(createModelEntry(ref, name, titlesMap, getModelId))\n }\n }\n\n return untagged\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,cAAc;AAYvB,MAAM,mBAAmB,CACvB,KACA,OAAO,WACP,WACA,YACA,QACoB;AACpB,QAAM,KAAK,WAAW,EAAE,KAAK,GAAG,GAAG;AACnC,YAAU,IAAI,IAAI,IAAI;AAEtB,SAAO;AAAA,IACL;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,MAAM;AAAA,EACR;AACF;AAcO,MAAM,kBAAkB,CAC7B,SAEA,SAEA,WACA,eACsB;AACtB,QAAM,UAAU,QAAQ,YAAY,WAAW,CAAC;AAChD,QAAM,WAA8B,CAAC;AAErC,aAAW,QAAQ,SAAS;AAC1B,QAAI,QAAQ,IAAI,EAAE,YAAY,KAAK,QAAQ,IAAI,EAAE,iBAAiB,KAAK,CAAC,OAAO,OAAO,SAAS,IAAI,GAAG;AACpG;AAAA,IACF;AAEA,UAAM,MAAM,gCAAgC,IAAI;AAGhD,QAAI,QAAQ,IAAI,EAAE,QAAQ,GAAG,QAAQ;AACnC,cAAQ,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,YAAoB;AACnD,cAAM,EAAE,IAAI,IAAI,OAAO,SAAS,OAAO;AACvC,gBAAQ,IAAI,OAAO,GAAG,QAAQ,KAAK,iBAAiB,KAAK,MAAM,WAAW,YAAY,GAAG,CAAC;AAAA,MAC5F,CAAC;AAAA,IACH,OAEK;AACH,eAAS,KAAK,iBAAiB,KAAK,MAAM,WAAW,UAAU,CAAC;AAAA,IAClE;AAAA,EACF;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
import type { TagsMap, TraversedEntry, TraverseSpecOptions } from '../../navigation/types.js';
|
|
3
|
+
type Options = Pick<TraverseSpecOptions, 'getTagId' | 'tagsSorter' | 'operationsSorter'>;
|
|
4
|
+
/**
|
|
5
|
+
* Traverses the tags map to create navigation entries, handling both grouped and ungrouped tags.
|
|
6
|
+
*
|
|
7
|
+
* This function processes the OpenAPI document's tags to:
|
|
8
|
+
* - Handle tag groups if specified via x-tagGroups
|
|
9
|
+
* - Sort tags and their operations according to provided sorters
|
|
10
|
+
* - Create navigation entries for each tag or tag group
|
|
11
|
+
* - Flatten default tag entries if it's the only tag present
|
|
12
|
+
*/
|
|
13
|
+
export declare const traverseTags: (content: OpenAPIV3_1.Document, tagsMap: TagsMap, titlesMap: Map<string, string>, { getTagId, tagsSorter, operationsSorter }: Options) => TraversedEntry[];
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=traverse-tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traverse-tags.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-tags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAgB,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAEpG,KAAK,OAAO,GAAG,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,YAAY,GAAG,kBAAkB,CAAC,CAAA;AA2HxF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,YACd,WAAW,CAAC,QAAQ,WAEpB,OAAO,aAEL,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,8CACc,OAAO,KAClD,cAAc,EAyBhB,CAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { getTag } from "./get-tag.js";
|
|
2
|
+
const createTagEntry = (tag, titlesMap, getTagId, children, isGroup = false) => {
|
|
3
|
+
const id = getTagId(tag);
|
|
4
|
+
const title = tag["x-displayName"] || tag.name || "Untitled Tag";
|
|
5
|
+
titlesMap.set(id, title);
|
|
6
|
+
return {
|
|
7
|
+
id,
|
|
8
|
+
title,
|
|
9
|
+
name: tag.name || title,
|
|
10
|
+
children,
|
|
11
|
+
isGroup,
|
|
12
|
+
type: "tag"
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const getSortedTagEntries = (_keys, tagsMap, titlesMap, { getTagId, tagsSorter, operationsSorter }) => {
|
|
16
|
+
const hasDefault = _keys.includes("default");
|
|
17
|
+
const keys = hasDefault ? _keys.filter((key) => key !== "default") : _keys;
|
|
18
|
+
if (tagsSorter === "alpha") {
|
|
19
|
+
keys.sort((a, b) => {
|
|
20
|
+
const nameA = getTag(tagsMap, a).tag["x-displayName"] || a || "Untitle Tag";
|
|
21
|
+
const nameB = getTag(tagsMap, b).tag["x-displayName"] || b || "Untitled Tag";
|
|
22
|
+
return nameA.localeCompare(nameB);
|
|
23
|
+
});
|
|
24
|
+
} else if (typeof tagsSorter === "function") {
|
|
25
|
+
keys.sort((a, b) => tagsSorter(getTag(tagsMap, a).tag, getTag(tagsMap, b).tag));
|
|
26
|
+
}
|
|
27
|
+
if (hasDefault) {
|
|
28
|
+
keys.push("default");
|
|
29
|
+
}
|
|
30
|
+
return keys.flatMap((key) => {
|
|
31
|
+
const { tag, entries } = getTag(tagsMap, key);
|
|
32
|
+
if (tag["x-internal"] || tag["x-scalar-ignore"]) {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
if (operationsSorter === "alpha") {
|
|
36
|
+
entries.sort((a, b) => "method" in a && "method" in b ? a.title.localeCompare(b.title) : 0);
|
|
37
|
+
} else if (operationsSorter === "method") {
|
|
38
|
+
entries.sort((a, b) => "method" in a && "method" in b ? a.method.localeCompare(b.method) : 0);
|
|
39
|
+
} else if (typeof operationsSorter === "function") {
|
|
40
|
+
entries.sort((a, b) => {
|
|
41
|
+
if (a.type !== "operation" && a.type !== "webhook" || b.type !== "operation" && b.type !== "webhook") {
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
44
|
+
const pathA = a.type === "operation" ? a.path : a.name;
|
|
45
|
+
const pathB = b.type === "operation" ? b.path : b.name;
|
|
46
|
+
return operationsSorter(
|
|
47
|
+
{ method: a.method, path: pathA, ref: a.ref },
|
|
48
|
+
{ method: b.method, path: pathB, ref: b.ref }
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return entries.length ? createTagEntry(tag, titlesMap, getTagId, entries) : [];
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const traverseTags = (content, tagsMap, titlesMap, { getTagId, tagsSorter, operationsSorter }) => {
|
|
56
|
+
if (content["x-tagGroups"]) {
|
|
57
|
+
const tagGroups = content["x-tagGroups"];
|
|
58
|
+
return tagGroups.flatMap((tagGroup) => {
|
|
59
|
+
const entries = getSortedTagEntries(tagGroup.tags ?? [], tagsMap, titlesMap, {
|
|
60
|
+
getTagId,
|
|
61
|
+
tagsSorter,
|
|
62
|
+
operationsSorter
|
|
63
|
+
});
|
|
64
|
+
return entries.length ? createTagEntry(tagGroup, titlesMap, getTagId, entries, true) : [];
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
const keys = Array.from(tagsMap.keys());
|
|
68
|
+
const tags = getSortedTagEntries(keys, tagsMap, titlesMap, { getTagId, tagsSorter, operationsSorter });
|
|
69
|
+
if (tags.length === 1 && tags[0].title === "default") {
|
|
70
|
+
return tags[0].children ?? [];
|
|
71
|
+
}
|
|
72
|
+
return tags;
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
traverseTags
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=traverse-tags.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/navigation/helpers/traverse-tags.ts"],
|
|
4
|
+
"sourcesContent": ["import type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\nimport { getTag } from './get-tag'\nimport type { TagsMap, TraversedEntry, TraversedTag, TraverseSpecOptions } from '@/navigation/types'\n\ntype Options = Pick<TraverseSpecOptions, 'getTagId' | 'tagsSorter' | 'operationsSorter'>\n\n/** Creates a traversed tag entry from an OpenAPI tag object.\n *\n * @param tag - The OpenAPI tag object\n * @param titlesMap - Map to store tag IDs and titles for mobile header navigation\n * @param getTagId - Function to generate unique IDs for tags\n * @param children - Array of child entries (operations, webhooks, etc.)\n * @param isGroup - Whether this tag represents a group of tags\n * @returns A traversed tag entry with ID, title, name and children\n */\nconst createTagEntry = (\n tag: OpenAPIV3_1.TagObject,\n titlesMap: Map<string, string>,\n getTagId: TraverseSpecOptions['getTagId'],\n children: TraversedEntry[],\n isGroup = false,\n): TraversedTag => {\n const id = getTagId(tag)\n const title = tag['x-displayName'] || tag.name || 'Untitled Tag'\n titlesMap.set(id, title)\n\n return {\n id,\n title,\n name: tag.name || title,\n children,\n isGroup,\n type: 'tag',\n }\n}\n\n/** Sorts and processes tags to create a hierarchical structure of tag entries.\n *\n * This function handles:\n * - Sorting tags alphabetically or using a custom sort function\n * - Ensuring the default tag appears last\n * - Sorting operations within tags by title, method, or custom function\n * - Filtering out internal and ignored tags\n * - Creating tag entries with their associated operations\n *\n * @param _keys - Array of tag keys to process\n * @param tagsMap - Map of tags and their entries\n * @param tagsDict - Dictionary of OpenAPI tags by name\n * @param titlesMap - Map of titles for the mobile header\n * @param options - Sorting and ID generation options\n * @returns Array of processed and sorted tag entries\n */\n/** Sorts tags and returns entries */\nconst getSortedTagEntries = (\n _keys: string[],\n /** Map of tags and their entries */\n tagsMap: TagsMap,\n /** Map of titles for the mobile header */\n titlesMap: Map<string, string>,\n { getTagId, tagsSorter, operationsSorter }: Options,\n) => {\n // Ensure that default is last if it exists\n const hasDefault = _keys.includes('default')\n const keys = hasDefault ? _keys.filter((key) => key !== 'default') : _keys\n\n // Alpha sort\n if (tagsSorter === 'alpha') {\n keys.sort((a, b) => {\n const nameA = getTag(tagsMap, a).tag['x-displayName'] || a || 'Untitle Tag'\n const nameB = getTag(tagsMap, b).tag['x-displayName'] || b || 'Untitled Tag'\n return nameA.localeCompare(nameB)\n })\n }\n // Custom sort\n else if (typeof tagsSorter === 'function') {\n keys.sort((a, b) => tagsSorter(getTag(tagsMap, a).tag, getTag(tagsMap, b).tag))\n }\n\n if (hasDefault) {\n keys.push('default')\n }\n\n /**\n * Process each tag and its entries:\n * - Skip internal and ignored tags\n * - Sort operations within tags\n * - Create tag entries with sorted operations\n */\n return keys.flatMap((key) => {\n const { tag, entries } = getTag(tagsMap, key)\n\n // Skip if the tag is internal or scalar-ignore\n if (tag['x-internal'] || tag['x-scalar-ignore']) {\n return []\n }\n\n // Alpha sort\n if (operationsSorter === 'alpha') {\n entries.sort((a, b) => ('method' in a && 'method' in b ? a.title.localeCompare(b.title) : 0))\n }\n // Method sort\n else if (operationsSorter === 'method') {\n entries.sort((a, b) => ('method' in a && 'method' in b ? a.method.localeCompare(b.method) : 0))\n }\n // Custom sort\n else if (typeof operationsSorter === 'function') {\n entries.sort((a, b) => {\n // Guard against tags\n if ((a.type !== 'operation' && a.type !== 'webhook') || (b.type !== 'operation' && b.type !== 'webhook')) {\n return 0\n }\n\n // Handle webhooks as well as operations\n const pathA = a.type === 'operation' ? a.path : a.name\n const pathB = b.type === 'operation' ? b.path : b.name\n\n return operationsSorter(\n { method: a.method, path: pathA, ref: a.ref },\n { method: b.method, path: pathB, ref: b.ref },\n )\n })\n }\n\n return entries.length ? createTagEntry(tag, titlesMap, getTagId, entries) : []\n })\n}\n\n/**\n * Traverses the tags map to create navigation entries, handling both grouped and ungrouped tags.\n *\n * This function processes the OpenAPI document's tags to:\n * - Handle tag groups if specified via x-tagGroups\n * - Sort tags and their operations according to provided sorters\n * - Create navigation entries for each tag or tag group\n * - Flatten default tag entries if it's the only tag present\n */\nexport const traverseTags = (\n content: OpenAPIV3_1.Document,\n /** Map of tags and their entries */\n tagsMap: TagsMap,\n /** Map of titles for the mobile title */\n titlesMap: Map<string, string>,\n { getTagId, tagsSorter, operationsSorter }: Options,\n): TraversedEntry[] => {\n // x-tagGroups\n if (content['x-tagGroups']) {\n const tagGroups = content['x-tagGroups'] as { tags: string[] }[]\n\n return tagGroups.flatMap((tagGroup) => {\n const entries = getSortedTagEntries(tagGroup.tags ?? [], tagsMap, titlesMap, {\n getTagId,\n tagsSorter,\n operationsSorter,\n })\n return entries.length ? createTagEntry(tagGroup, titlesMap, getTagId, entries, true) : []\n })\n }\n\n // Ungrouped regular tags\n const keys = Array.from(tagsMap.keys())\n const tags = getSortedTagEntries(keys, tagsMap, titlesMap, { getTagId, tagsSorter, operationsSorter })\n\n // Flatten if we only have default tag\n if (tags.length === 1 && tags[0].title === 'default') {\n return tags[0].children ?? []\n }\n\n return tags\n}\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,cAAc;AAcvB,MAAM,iBAAiB,CACrB,KACA,WACA,UACA,UACA,UAAU,UACO;AACjB,QAAM,KAAK,SAAS,GAAG;AACvB,QAAM,QAAQ,IAAI,eAAe,KAAK,IAAI,QAAQ;AAClD,YAAU,IAAI,IAAI,KAAK;AAEvB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,MAAM,IAAI,QAAQ;AAAA,IAClB;AAAA,IACA;AAAA,IACA,MAAM;AAAA,EACR;AACF;AAmBA,MAAM,sBAAsB,CAC1B,OAEA,SAEA,WACA,EAAE,UAAU,YAAY,iBAAiB,MACtC;AAEH,QAAM,aAAa,MAAM,SAAS,SAAS;AAC3C,QAAM,OAAO,aAAa,MAAM,OAAO,CAAC,QAAQ,QAAQ,SAAS,IAAI;AAGrE,MAAI,eAAe,SAAS;AAC1B,SAAK,KAAK,CAAC,GAAG,MAAM;AAClB,YAAM,QAAQ,OAAO,SAAS,CAAC,EAAE,IAAI,eAAe,KAAK,KAAK;AAC9D,YAAM,QAAQ,OAAO,SAAS,CAAC,EAAE,IAAI,eAAe,KAAK,KAAK;AAC9D,aAAO,MAAM,cAAc,KAAK;AAAA,IAClC,CAAC;AAAA,EACH,WAES,OAAO,eAAe,YAAY;AACzC,SAAK,KAAK,CAAC,GAAG,MAAM,WAAW,OAAO,SAAS,CAAC,EAAE,KAAK,OAAO,SAAS,CAAC,EAAE,GAAG,CAAC;AAAA,EAChF;AAEA,MAAI,YAAY;AACd,SAAK,KAAK,SAAS;AAAA,EACrB;AAQA,SAAO,KAAK,QAAQ,CAAC,QAAQ;AAC3B,UAAM,EAAE,KAAK,QAAQ,IAAI,OAAO,SAAS,GAAG;AAG5C,QAAI,IAAI,YAAY,KAAK,IAAI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S,IAAI,IAAI,CAAC;AAAA,IAC1F,CAAC;AAAA,EACH;AAGA,QAAM,OAAO,MAAM,KAAK,QAAQ,KAAK,CAAC;AACtC,QAAM,OAAO,oBAAoB,MAAM,SAAS,WAAW,EAAE,UAAU,YAAY,iBAAiB,CAAC;AAGrG,MAAI,KAAK,WAAW,KAAK,KAAK,CAAC,EAAE,UAAU,WAAW;AACpD,WAAO,KAAK,CAAC,EAAE,YAAY,CAAC;AAAA,EAC9B;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
import type { TagsMap, TraversedWebhook, TraverseSpecOptions } from '../../navigation/types.js';
|
|
3
|
+
/** Traverses the webhooks in an OpenAPI document to build an array of webhook entries.
|
|
4
|
+
*
|
|
5
|
+
* This function processes each webhook in the document to:
|
|
6
|
+
* - Filter out internal webhooks (marked with x-internal) and webhooks to ignore (marked with x-scalar-ignore)
|
|
7
|
+
* - Group webhooks by their tags
|
|
8
|
+
* - Create webhook entries with unique references and IDs
|
|
9
|
+
* - Store webhook IDs and titles for mobile header navigation
|
|
10
|
+
*
|
|
11
|
+
* @param content - The OpenAPI document to traverse
|
|
12
|
+
* @param tagsMap - Map of tag names to arrays of traversed entries from operations
|
|
13
|
+
* @param tagsDict - Dictionary mapping tag names to their OpenAPI tag objects
|
|
14
|
+
* @param titlesMap - Map to store webhook IDs and titles for mobile header navigation
|
|
15
|
+
* @param getWebhookId - Function to generate unique IDs for webhooks
|
|
16
|
+
* @returns Array of untagged webhook entries
|
|
17
|
+
*/
|
|
18
|
+
export declare const traverseWebhooks: (content: OpenAPIV3_1.Document, tagsMap: TagsMap, titlesMap: Map<string, string>, getWebhookId: TraverseSpecOptions["getWebhookId"]) => TraversedWebhook[];
|
|
19
|
+
//# sourceMappingURL=traverse-webhooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traverse-webhooks.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAmCxF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,YAClB,WAAW,CAAC,QAAQ,WAEpB,OAAO,aAEL,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,gBAChB,mBAAmB,CAAC,cAAc,CAAC,KAChD,gBAAgB,EAiClB,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { getTag } from "./get-tag.js";
|
|
2
|
+
const createWebhookEntry = (ref, method, name = "Unknown", title = "Unknown", titlesMap, getWebhookId, tag) => {
|
|
3
|
+
const id = getWebhookId({ name, method }, tag);
|
|
4
|
+
titlesMap.set(id, title);
|
|
5
|
+
return {
|
|
6
|
+
id,
|
|
7
|
+
title,
|
|
8
|
+
name,
|
|
9
|
+
ref,
|
|
10
|
+
method,
|
|
11
|
+
type: "webhook"
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const traverseWebhooks = (content, tagsMap, titlesMap, getWebhookId) => {
|
|
15
|
+
const untagged = [];
|
|
16
|
+
Object.entries(content.webhooks ?? {}).forEach(([name, pathItemObject]) => {
|
|
17
|
+
const pathEntries = Object.entries(pathItemObject ?? {});
|
|
18
|
+
pathEntries.forEach(([method, operation]) => {
|
|
19
|
+
const ref = `#/webhooks/${name}/${method}`;
|
|
20
|
+
if (operation["x-internal"] || operation["x-scalar-ignore"]) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (operation.tags?.length) {
|
|
24
|
+
operation.tags.forEach((tagName) => {
|
|
25
|
+
const { tag } = getTag(tagsMap, tagName);
|
|
26
|
+
tagsMap.get(tagName)?.entries.push(
|
|
27
|
+
createWebhookEntry(ref, method, name, operation.summary ?? name, titlesMap, getWebhookId, tag)
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
} else {
|
|
31
|
+
untagged.push(createWebhookEntry(ref, method, name, operation.summary ?? name, titlesMap, getWebhookId));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
return untagged;
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
traverseWebhooks
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=traverse-webhooks.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/navigation/helpers/traverse-webhooks.ts"],
|
|
4
|
+
"sourcesContent": ["import type { OpenAPIV3_1 } from '@scalar/openapi-types'\n\nimport { getTag } from './get-tag'\nimport type { TagsMap, TraversedWebhook, TraverseSpecOptions } from '@/navigation/types'\n\n/** Creates a traversed webhook entry from an OpenAPI webhook object.\n *\n * @param ref - JSON pointer reference to the webhook in the OpenAPI document\n * @param method - HTTP method of the webhook\n * @param name - Name of the webhook, defaults to 'Unknown'\n * @param title - Title of the webhook, defaults to 'Unknown'\n * @param titlesMap - Map to store webhook IDs and titles for mobile header navigation\n * @param getWebhookId - Function to generate unique IDs for webhooks\n * @param tag - Optional tag object associated with the webhook\n * @returns A traversed webhook entry with ID, title, name, method and reference\n */\nconst createWebhookEntry = (\n ref: string,\n method: OpenAPIV3_1.HttpMethods,\n name = 'Unknown',\n title = 'Unknown',\n titlesMap: Map<string, string>,\n getWebhookId: TraverseSpecOptions['getWebhookId'],\n tag?: OpenAPIV3_1.TagObject,\n): TraversedWebhook => {\n const id = getWebhookId({ name, method }, tag)\n titlesMap.set(id, title)\n\n return {\n id,\n title,\n name,\n ref,\n method: method,\n type: 'webhook',\n }\n}\n\n/** Traverses the webhooks in an OpenAPI document to build an array of webhook entries.\n *\n * This function processes each webhook in the document to:\n * - Filter out internal webhooks (marked with x-internal) and webhooks to ignore (marked with x-scalar-ignore)\n * - Group webhooks by their tags\n * - Create webhook entries with unique references and IDs\n * - Store webhook IDs and titles for mobile header navigation\n *\n * @param content - The OpenAPI document to traverse\n * @param tagsMap - Map of tag names to arrays of traversed entries from operations\n * @param tagsDict - Dictionary mapping tag names to their OpenAPI tag objects\n * @param titlesMap - Map to store webhook IDs and titles for mobile header navigation\n * @param getWebhookId - Function to generate unique IDs for webhooks\n * @returns Array of untagged webhook entries\n */\nexport const traverseWebhooks = (\n content: OpenAPIV3_1.Document,\n /** The tag map from from traversing paths */\n tagsMap: TagsMap,\n /** Map of titles for the mobile title */\n titlesMap: Map<string, string>,\n getWebhookId: TraverseSpecOptions['getWebhookId'],\n): TraversedWebhook[] => {\n const untagged: TraversedWebhook[] = []\n\n // Traverse webhooks\n Object.entries(content.webhooks ?? {}).forEach(([name, pathItemObject]) => {\n const pathEntries = Object.entries(pathItemObject ?? {}) as [OpenAPIV3_1.HttpMethods, OpenAPIV3_1.OperationObject][]\n\n pathEntries.forEach(([method, operation]) => {\n const ref = `#/webhooks/${name}/${method}`\n\n // Skip if the operation is internal or scalar-ignore\n if (operation['x-internal'] || operation['x-scalar-ignore']) {\n return\n }\n\n if (operation.tags?.length) {\n operation.tags.forEach((tagName: string) => {\n const { tag } = getTag(tagsMap, tagName)\n tagsMap\n .get(tagName)\n ?.entries.push(\n createWebhookEntry(ref, method, name, operation.summary ?? name, titlesMap, getWebhookId, tag),\n )\n })\n }\n // Add to untagged\n else {\n untagged.push(createWebhookEntry(ref, method, name, operation.summary ?? name, titlesMap, getWebhookId))\n }\n })\n })\n\n return untagged\n}\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,cAAc;AAcvB,MAAM,qBAAqB,CACzB,KACA,QACA,OAAO,WACP,QAAQ,WACR,WACA,cACA,QACqB;AACrB,QAAM,KAAK,aAAa,EAAE,MAAM,OAAO,GAAG,GAAG;AAC7C,YAAU,IAAI,IAAI,KAAK;AAEvB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,EACR;AACF;AAiBO,MAAM,mBAAmB,CAC9B,SAEA,SAEA,WACA,iBACuB;AACvB,QAAM,WAA+B,CAAC;AAGtC,SAAO,QAAQ,QAAQ,YAAY,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,MAAM,cAAc,MAAM;AACzE,UAAM,cAAc,OAAO,QAAQ,kBAAkB,CAAC,CAAC;AAEvD,gBAAY,QAAQ,CAAC,CAAC,QAAQ,SAAS,MAAM;AAC3C,YAAM,MAAM,cAAc,IAAI,IAAI,MAAM;AAGxC,UAAI,UAAU,YAAY,KAAK,UAAU,iBAAiB,GAAG;AAC3D;AAAA,MACF;AAEA,UAAI,UAAU,MAAM,QAAQ;AAC1B,kBAAU,KAAK,QAAQ,CAAC,YAAoB;AAC1C,gBAAM,EAAE,IAAI,IAAI,OAAO,SAAS,OAAO;AACvC,kBACG,IAAI,OAAO,GACV,QAAQ;AAAA,YACR,mBAAmB,KAAK,QAAQ,MAAM,UAAU,WAAW,MAAM,WAAW,cAAc,GAAG;AAAA,UAC/F;AAAA,QACJ,CAAC;AAAA,MACH,OAEK;AACH,iBAAS,KAAK,mBAAmB,KAAK,QAAQ,MAAM,UAAU,WAAW,MAAM,WAAW,YAAY,CAAC;AAAA,MACzG;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AAED,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Heading } from '../../navigation/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Extracts all headings from a Markdown string and adds URL-friendly slugs to each heading.
|
|
4
|
+
* Uses GithubSlugger to generate consistent slugs that match GitHub's heading anchor format.
|
|
5
|
+
*
|
|
6
|
+
* @param input - The Markdown string to extract headings from
|
|
7
|
+
* @returns Array of heading objects containing value, depth, and slug
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const markdown = `
|
|
11
|
+
* # Getting Started
|
|
12
|
+
* ## Installation
|
|
13
|
+
* ### Requirements
|
|
14
|
+
* `
|
|
15
|
+
* const headings = getHeadingsFromMarkdown(markdown)
|
|
16
|
+
* // Returns:
|
|
17
|
+
* // [
|
|
18
|
+
* // { value: 'Getting Started', depth: 1, slug: 'getting-started' },
|
|
19
|
+
* // { value: 'Installation', depth: 2, slug: 'installation' },
|
|
20
|
+
* // { value: 'Requirements', depth: 3, slug: 'requirements' }
|
|
21
|
+
* // ]
|
|
22
|
+
*/
|
|
23
|
+
export declare function getHeadingsFromMarkdown(input: string): Heading[];
|
|
24
|
+
export type HeadingLevels = 1 | 2 | 3 | 4 | 5 | 6;
|
|
25
|
+
/**
|
|
26
|
+
* Returns the lowest heading level from a list of headings.
|
|
27
|
+
*
|
|
28
|
+
* @param headings - Array of heading objects containing depth property
|
|
29
|
+
* @returns The lowest heading level (1-6) or 1 if no valid headings found
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* const headings = [
|
|
33
|
+
* { value: 'Getting Started', depth: 1 },
|
|
34
|
+
* { value: 'Installation', depth: 2 }
|
|
35
|
+
* ]
|
|
36
|
+
* getLowestHeadingLevel(headings) // Returns: 1
|
|
37
|
+
*/
|
|
38
|
+
export declare const getLowestHeadingLevel: (headings: Heading[]) => HeadingLevels;
|
|
39
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAiCjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAMhE;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEjD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,aAAc,OAAO,EAAE,KAAG,aAQ3D,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getHeadings } from "@scalar/code-highlight/markdown";
|
|
2
|
+
import GithubSlugger from "github-slugger";
|
|
3
|
+
const withSlugs = (headings, slugger) => headings.map((heading) => {
|
|
4
|
+
return {
|
|
5
|
+
...heading,
|
|
6
|
+
slug: slugger.slug(heading.value)
|
|
7
|
+
};
|
|
8
|
+
});
|
|
9
|
+
function getHeadingsFromMarkdown(input) {
|
|
10
|
+
const slugger = new GithubSlugger();
|
|
11
|
+
const headings = getHeadings(input);
|
|
12
|
+
return withSlugs(headings, slugger);
|
|
13
|
+
}
|
|
14
|
+
const getLowestHeadingLevel = (headings) => {
|
|
15
|
+
const lowestLevel = Math.min(...headings.map((heading) => heading.depth));
|
|
16
|
+
if (lowestLevel >= 1 && lowestLevel <= 6) {
|
|
17
|
+
return lowestLevel;
|
|
18
|
+
}
|
|
19
|
+
return 1;
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
getHeadingsFromMarkdown,
|
|
23
|
+
getLowestHeadingLevel
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/navigation/helpers/utils.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Heading } from '@/navigation/types'\nimport { getHeadings } from '@scalar/code-highlight/markdown'\nimport GithubSlugger from 'github-slugger'\n\n/**\n * Adds URL-friendly slugs to each heading in the array.\n * Uses GithubSlugger to generate consistent slugs that match GitHub's heading anchor format.\n *\n * @param headings - Array of heading objects containing value and depth\n * @param slugger - GithubSlugger instance for generating consistent slugs\n * @returns Array of headings with added slug property\n *\n * @example\n * const headings = [\n * { value: 'Getting Started', depth: 1 },\n * { value: 'Installation', depth: 2 }\n * ]\n * const slugger = new GithubSlugger()\n * withSlugs(headings, slugger)\n * // Returns:\n * // [\n * // { value: 'Getting Started', depth: 1, slug: 'getting-started' },\n * // { value: 'Installation', depth: 2, slug: 'installation' }\n * // ]\n */\nconst withSlugs = (headings: Heading[], slugger: GithubSlugger): Heading[] =>\n headings.map((heading) => {\n return {\n ...heading,\n slug: slugger.slug(heading.value),\n }\n })\n\n/**\n * Extracts all headings from a Markdown string and adds URL-friendly slugs to each heading.\n * Uses GithubSlugger to generate consistent slugs that match GitHub's heading anchor format.\n *\n * @param input - The Markdown string to extract headings from\n * @returns Array of heading objects containing value, depth, and slug\n *\n * @example\n * const markdown = `\n * # Getting Started\n * ## Installation\n * ### Requirements\n * `\n * const headings = getHeadingsFromMarkdown(markdown)\n * // Returns:\n * // [\n * // { value: 'Getting Started', depth: 1, slug: 'getting-started' },\n * // { value: 'Installation', depth: 2, slug: 'installation' },\n * // { value: 'Requirements', depth: 3, slug: 'requirements' }\n * // ]\n */\nexport function getHeadingsFromMarkdown(input: string): Heading[] {\n const slugger = new GithubSlugger()\n\n const headings = getHeadings(input)\n\n return withSlugs(headings as Heading[], slugger)\n}\n\nexport type HeadingLevels = 1 | 2 | 3 | 4 | 5 | 6\n\n/**\n * Returns the lowest heading level from a list of headings.\n *\n * @param headings - Array of heading objects containing depth property\n * @returns The lowest heading level (1-6) or 1 if no valid headings found\n *\n * @example\n * const headings = [\n * { value: 'Getting Started', depth: 1 },\n * { value: 'Installation', depth: 2 }\n * ]\n * getLowestHeadingLevel(headings) // Returns: 1\n */\nexport const getLowestHeadingLevel = (headings: Heading[]): HeadingLevels => {\n const lowestLevel = Math.min(...headings.map((heading) => heading.depth))\n\n if (lowestLevel >= 1 && lowestLevel <= 6) {\n return lowestLevel as HeadingLevels\n }\n\n return 1\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,mBAAmB;AAC5B,OAAO,mBAAmB;AAuB1B,MAAM,YAAY,CAAC,UAAqB,YACtC,SAAS,IAAI,CAAC,YAAY;AACxB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,MAAM,QAAQ,KAAK,QAAQ,KAAK;AAAA,EAClC;AACF,CAAC;AAuBI,SAAS,wBAAwB,OAA0B;AAChE,QAAM,UAAU,IAAI,cAAc;AAElC,QAAM,WAAW,YAAY,KAAK;AAElC,SAAO,UAAU,UAAuB,OAAO;AACjD;AAiBO,MAAM,wBAAwB,CAAC,aAAuC;AAC3E,QAAM,cAAc,KAAK,IAAI,GAAG,SAAS,IAAI,CAAC,YAAY,QAAQ,KAAK,CAAC;AAExE,MAAI,eAAe,KAAK,eAAe,GAAG;AACxC,WAAO;AAAA,EACT;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAG7E,OAAO,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/navigation/index.ts"],
|
|
4
|
+
"sourcesContent": ["export type { TraverseSpecOptions as createNavigationOptions } from './types'\n\n// biome-ignore lint/performance/noBarrelFile: <explanation>\nexport { traverseDocument as createNavigation } from './helpers/traverse-document'\n"],
|
|
5
|
+
"mappings": "AAGA,SAA6B,wBAAwB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
/** Map of tagNames and their entries */
|
|
3
|
+
export type TagsMap = Map<string, {
|
|
4
|
+
tag: OpenAPIV3_1.TagObject;
|
|
5
|
+
entries: TraversedEntry[];
|
|
6
|
+
}>;
|
|
7
|
+
type TraverseEntryBase = {
|
|
8
|
+
type: 'text' | 'operation' | 'model' | 'tag' | 'webhook';
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
};
|
|
12
|
+
/** Description entry returned form traversing the document */
|
|
13
|
+
export type TraversedDescription = TraverseEntryBase & {
|
|
14
|
+
type: 'text';
|
|
15
|
+
children?: TraverseEntryBase[];
|
|
16
|
+
};
|
|
17
|
+
/** Operation entry returned form traversing the document */
|
|
18
|
+
export type TraversedOperation = TraverseEntryBase & {
|
|
19
|
+
type: 'operation';
|
|
20
|
+
ref: string;
|
|
21
|
+
method: OpenAPIV3_1.HttpMethods;
|
|
22
|
+
path: string;
|
|
23
|
+
};
|
|
24
|
+
/** Model entry returned form traversing the document */
|
|
25
|
+
export type TraversedSchema = TraverseEntryBase & {
|
|
26
|
+
type: 'model';
|
|
27
|
+
ref: string;
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
/** Tag entry returned form traversing the document, includes tagGroups */
|
|
31
|
+
export type TraversedTag = TraverseEntryBase & {
|
|
32
|
+
type: 'tag';
|
|
33
|
+
name: string;
|
|
34
|
+
children?: TraversedEntry[];
|
|
35
|
+
isGroup: boolean;
|
|
36
|
+
};
|
|
37
|
+
/** Webhook entry returned form traversing the document, basically the same as an operation but with name instead of path */
|
|
38
|
+
export type TraversedWebhook = TraverseEntryBase & {
|
|
39
|
+
type: 'webhook';
|
|
40
|
+
ref: string;
|
|
41
|
+
method: OpenAPIV3_1.HttpMethods;
|
|
42
|
+
name: string;
|
|
43
|
+
};
|
|
44
|
+
/** Entries returned form traversing the document */
|
|
45
|
+
export type TraversedEntry = TraversedDescription | TraversedOperation | TraversedSchema | TraversedTag | TraversedWebhook;
|
|
46
|
+
type OperationSortValue = {
|
|
47
|
+
method: string;
|
|
48
|
+
path: string;
|
|
49
|
+
ref: string;
|
|
50
|
+
};
|
|
51
|
+
/** Configuration options for traversing an OpenAPI specification document.
|
|
52
|
+
*
|
|
53
|
+
* These options control how the document is processed and organized, including:
|
|
54
|
+
* - Sorting of tags and operations
|
|
55
|
+
* - Visibility of models
|
|
56
|
+
* - ID generation for various elements (headings, operations, webhooks, models, tags)
|
|
57
|
+
*/
|
|
58
|
+
export type TraverseSpecOptions = {
|
|
59
|
+
/** Controls how tags are sorted - either alphabetically or using a custom sort function */
|
|
60
|
+
tagsSorter: 'alpha' | ((a: OpenAPIV3_1.TagObject, b: OpenAPIV3_1.TagObject) => number);
|
|
61
|
+
/** Controls how operations are sorted - alphabetically, by method, or using a custom sort function */
|
|
62
|
+
operationsSorter: 'alpha' | 'method' | ((a: OperationSortValue, b: OperationSortValue) => number);
|
|
63
|
+
/** Whether to hide model schemas from the navigation */
|
|
64
|
+
hideModels: boolean;
|
|
65
|
+
/** Function to generate unique IDs for markdown headings */
|
|
66
|
+
getHeadingId: (heading: {
|
|
67
|
+
depth: number;
|
|
68
|
+
value: string;
|
|
69
|
+
slug?: string;
|
|
70
|
+
}) => string;
|
|
71
|
+
/** Function to generate unique IDs for operations */
|
|
72
|
+
getOperationId: (operation: {
|
|
73
|
+
path: string;
|
|
74
|
+
method: OpenAPIV3_1.HttpMethods;
|
|
75
|
+
} & OpenAPIV3_1.OperationObject, parentTag: OpenAPIV3_1.TagObject) => string;
|
|
76
|
+
/** Function to generate unique IDs for webhooks */
|
|
77
|
+
getWebhookId: (webhook?: {
|
|
78
|
+
name: string;
|
|
79
|
+
method?: string;
|
|
80
|
+
}, parentTag?: OpenAPIV3_1.TagObject) => string;
|
|
81
|
+
/** Function to generate unique IDs for models/schemas */
|
|
82
|
+
getModelId: (model?: {
|
|
83
|
+
name: string;
|
|
84
|
+
}, parentTag?: OpenAPIV3_1.TagObject) => string;
|
|
85
|
+
/** Function to generate unique IDs for tags */
|
|
86
|
+
getTagId: (tag: OpenAPIV3_1.TagObject) => string;
|
|
87
|
+
};
|
|
88
|
+
export type Heading = {
|
|
89
|
+
depth: number;
|
|
90
|
+
value: string;
|
|
91
|
+
slug?: string;
|
|
92
|
+
};
|
|
93
|
+
export {};
|
|
94
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,WAAW,CAAC,SAAS,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAAA;AAE5F,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAA;IACxD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,8DAA8D;AAC9D,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAC/B,CAAA;AAED,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG;IACnD,IAAI,EAAE,WAAW,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,wDAAwD;AACxD,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG;IAChD,IAAI,EAAE,OAAO,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,0EAA0E;AAC1E,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG;IAC7C,IAAI,EAAE,KAAK,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ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e,EAC/B,SAAS,EAAE,WAAW,CAAC,SAAS,KAC7B,MAAM,CAAA;IAEX,mDAAmD;IACnD,YAAY,EAAE,CACZ,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,EACD,SAAS,CAAC,EAAE,WAAW,CAAC,SAAS,KAC9B,MAAM,CAAA;IAEX,yDAAyD;IACzD,UAAU,EAAE,CACV,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;KACb,EACD,SAAS,CAAC,EAAE,WAAW,CAAC,SAAS,KAC9B,MAAM,CAAA;IAEX,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC,SAAS,KAAK,MAAM,CAAA;CACjD,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const extensions: {
|
|
2
|
+
readonly document: {
|
|
3
|
+
readonly navigation: "x-scalar-navigation";
|
|
4
|
+
readonly activeAuth: "x-scalar-active-auth";
|
|
5
|
+
readonly activeServer: "x-scalar-active-server";
|
|
6
|
+
};
|
|
7
|
+
readonly workspace: {
|
|
8
|
+
readonly darkMode: "x-scalar-dark-mode";
|
|
9
|
+
readonly defaultClient: "x-scalar-default-client";
|
|
10
|
+
readonly activeDocument: "x-scalar-active-document";
|
|
11
|
+
readonly theme: "x-scalar-theme";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=extensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/schemas/extensions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;CAYb,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const extensions = {
|
|
2
|
+
document: {
|
|
3
|
+
navigation: "x-scalar-navigation",
|
|
4
|
+
activeAuth: "x-scalar-active-auth",
|
|
5
|
+
activeServer: "x-scalar-active-server"
|
|
6
|
+
},
|
|
7
|
+
workspace: {
|
|
8
|
+
darkMode: "x-scalar-dark-mode",
|
|
9
|
+
defaultClient: "x-scalar-default-client",
|
|
10
|
+
activeDocument: "x-scalar-active-document",
|
|
11
|
+
theme: "x-scalar-theme"
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
extensions
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=extensions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/schemas/extensions.ts"],
|
|
4
|
+
"sourcesContent": ["export const extensions = {\n document: {\n navigation: 'x-scalar-navigation',\n activeAuth: 'x-scalar-active-auth',\n activeServer: 'x-scalar-active-server',\n },\n workspace: {\n darkMode: 'x-scalar-dark-mode',\n defaultClient: 'x-scalar-default-client',\n activeDocument: 'x-scalar-active-document',\n theme: 'x-scalar-theme',\n },\n} as const\n"],
|
|
5
|
+
"mappings": "AAAO,MAAM,aAAa;AAAA,EACxB,UAAU;AAAA,IACR,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,WAAW;AAAA,IACT,UAAU;AAAA,IACV,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,OAAO;AAAA,EACT;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["../../../src/schemas/openapi-v3/callback.ts"],"names":[],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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI1B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../src/schemas/openapi-v3/callback.ts"],
|
|
4
4
|
"sourcesContent": ["import { Type } from '@sinclair/typebox'\nimport { PathItemObject } from './path-item'\n\n/**\n * A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the Path Item Object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.\n *\n * To describe incoming requests from the API provider independent from another API call, use the webhooks field.\n */\nexport const CallbackObject = Type.Record(\n Type.String(),\n /** A Path Item Object used to define a callback request and expected responses. A complete example is available. */\n PathItemObject,\n)\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,YAAY;AACrB,SAAS,sBAAsB;AAOxB,MAAM,iBAAiB,KAAK;AAAA,EACjC,KAAK,OAAO;AAAA;AAAA,EAEZ;AACF;",
|
|
6
6
|
"names": []
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/schemas/openapi-v3/components.ts"],"names":[],"mappings":"AAaA,kOAAkO;AAClO,eAAO,MAAM,gBAAgB;IAC3B,iDAAiD;;;;;;;;;;;;;;;;;;;IAEjD,mDAAmD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEnD,oDAAoD;;;;;;;;;;;;;;;IAEpD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEpD,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../src/schemas/openapi-v3/components.ts"],
|
|
4
4
|
"sourcesContent": ["import { Type } from '@sinclair/typebox'\nimport { SchemaObject } from './schema'\nimport { ResponseObject } from './response'\nimport { ReferenceObject } from './reference'\nimport { ParameterObject } from './parameter'\nimport { ExampleObject } from './example'\nimport { RequestBodyObject } from './request-body'\nimport { SecuritySchemeObject } from './security-scheme'\nimport { LinkObject } from './link'\nimport { CallbackObject } from './callback'\nimport { PathItemObject } from './path-item'\nimport { HeaderObject } from './header'\n\n/** Holds a set of reusable objects for different aspects of the OAS. All objects defined within the Components Object will have no effect on the API unless they are explicitly referenced from outside the Components Object. */\nexport const ComponentsObject = Type.Object({\n /** An object to hold reusable Schema Objects. */\n schemas: Type.Optional(Type.Record(Type.String(), SchemaObject)),\n /** An object to hold reusable Response Objects. */\n responses: Type.Optional(Type.Record(Type.String(), Type.Union([ResponseObject, ReferenceObject]))),\n /** An object to hold reusable Parameter Objects. */\n parameters: Type.Optional(Type.Record(Type.String(), Type.Union([ParameterObject, ReferenceObject]))),\n /** An object to hold reusable Example Objects. */\n examples: Type.Optional(Type.Record(Type.String(), Type.Union([ExampleObject, ReferenceObject]))),\n /** An object to hold reusable Request Body Objects. */\n requestBodies: Type.Optional(Type.Record(Type.String(), Type.Union([RequestBodyObject, ReferenceObject]))),\n /** An object to hold reusable Header Objects. */\n headers: Type.Optional(Type.Record(Type.String(), Type.Union([HeaderObject, ReferenceObject]))),\n /** An object to hold reusable Security Scheme Objects. */\n securitySchemes: Type.Optional(Type.Record(Type.String(), Type.Union([SecuritySchemeObject, ReferenceObject]))),\n /** An object to hold reusable Link Objects. */\n links: Type.Optional(Type.Record(Type.String(), Type.Union([LinkObject, ReferenceObject]))),\n /** An object to hold reusable Callback Objects. */\n callbacks: Type.Optional(Type.Record(Type.String(), Type.Union([CallbackObject, ReferenceObject]))),\n /** An object to hold reusable Path Item Objects. */\n pathItems: Type.Optional(Type.Record(Type.String(), PathItemObject)),\n})\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AACrC,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAGtB,MAAM,mBAAmB,KAAK,OAAO;AAAA;AAAA,EAE1C,SAAS,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,YAAY,CAAC;AAAA;AAAA,EAE/D,WAAW,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,gBAAgB,eAAe,CAAC,CAAC,CAAC;AAAA;AAAA,EAElG,YAAY,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,iBAAiB,eAAe,CAAC,CAAC,CAAC;AAAA;AAAA,EAEpG,UAAU,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,eAAe,eAAe,CAAC,CAAC,CAAC;AAAA;AAAA,EAEhG,eAAe,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,mBAAmB,eAAe,CAAC,CAAC,CAAC;AAAA;AAAA,EAEzG,SAAS,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,cAAc,eAAe,CAAC,CAAC,CAAC;AAAA;AAAA,EAE9F,iBAAiB,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,sBAAsB,eAAe,CAAC,CAAC,CAAC;AAAA;AAAA,EAE9G,OAAO,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,YAAY,eAAe,CAAC,CAAC,CAAC;AAAA;AAAA,EAE1F,WAAW,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,MAAM,CAAC,gBAAgB,eAAe,CAAC,CAAC,CAAC;AAAA;AAAA,EAElG,WAAW,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,cAAc,CAAC;AACrE,CAAC;",
|
|
6
6
|
"names": []
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/schemas/openapi-v3/contact.ts"],"names":[],"mappings":"AAEA,+CAA+C;AAC/C,eAAO,MAAM,aAAa;IACxB,+DAA+D;;IAE/D,8EAA8E;;IAE9E,0GAA0G;;EAE1G,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../src/schemas/openapi-v3/contact.ts"],
|
|
4
4
|
"sourcesContent": ["import { Type } from '@sinclair/typebox'\n\n/** Contact information for the exposed API. */\nexport const ContactObject = Type.Object({\n /** The identifying name of the contact person/organization. */\n name: Type.Optional(Type.String()),\n /** The URI for the contact information. This MUST be in the form of a URI. */\n url: Type.Optional(Type.String()),\n /** The email address of the contact person/organization. This MUST be in the form of an email address. */\n email: Type.Optional(Type.String()),\n})\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,YAAY;AAGd,MAAM,gBAAgB,KAAK,OAAO;AAAA;AAAA,EAEvC,MAAM,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,EAEjC,KAAK,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,EAEhC,OAAO,KAAK,SAAS,KAAK,OAAO,CAAC;AACpC,CAAC;",
|
|
6
6
|
"names": []
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discriminator.d.ts","sourceRoot":"","sources":["../../../src/schemas/openapi-v3/discriminator.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAC9B,mNAAmN;;IAEnN,4FAA4F;;EAE5F,CAAA"}
|