@wildo-ai/saas-technical-doc 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/build/csp-emit.d.ts.map +1 -1
- package/dist/esm/build/load-materialized-frontend-providers.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-authentication-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-documentation-chapters.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts.map +1 -1
- package/dist/esm/companion/content/application-consumer-documentation-content-loader.d.ts.map +1 -1
- package/dist/esm/companion/index.d.ts.map +1 -1
- package/dist/esm/companion/manual-controller-route-projection.d.ts.map +1 -1
- package/dist/esm/companion/openapi-example-derivation.d.ts.map +1 -1
- package/dist/esm/companion/openapi-example-derivation.js.map +1 -1
- package/dist/esm/companion/openapi-generator.d.ts.map +1 -1
- package/dist/esm/companion/openapi-generator.js.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.d.ts.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.js.map +1 -1
- package/dist/esm/companion/publish-result.types.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-markdown-links.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts.map +1 -1
- package/dist/esm/companion/spec-to-operation-doc.d.ts.map +1 -1
- package/dist/esm/companion/spec-to-operation-doc.js.map +1 -1
- package/dist/esm/companion/technical-documentation-asset-path.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-definitions.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts.map +1 -1
- package/dist/esm/companion/technical-documentation-placeholder-materializer.d.ts.map +1 -1
- package/dist/esm/companion/zod-to-openapi.d.ts.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/config/define-tech-doc-config.d.ts.map +1 -1
- package/dist/esm/config/index.d.ts.map +1 -1
- package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.js.map +1 -1
- package/dist/esm/content.exports.d.ts.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/openapi/api-reference-link-index.d.ts.map +1 -1
- package/dist/esm/openapi/api-reference-link-index.js.map +1 -1
- package/dist/esm/openapi/api-reference-pages.d.ts.map +1 -1
- package/dist/esm/openapi/api-reference-pages.js.map +1 -1
- package/dist/esm/openapi/api-reference-search.d.ts.map +1 -1
- package/dist/esm/openapi/api-reference-search.js.map +1 -1
- package/dist/esm/openapi/api-reference-targets.d.ts.map +1 -1
- package/dist/esm/openapi/api-reference-targets.js.map +1 -1
- package/dist/esm/openapi/index.d.ts.map +1 -1
- package/dist/esm/openapi/index.js.map +1 -1
- package/dist/esm/openapi/openapi-generation-output.schemas.d.ts.map +1 -1
- package/dist/esm/openapi-reference-model.exports.d.ts.map +1 -1
- package/dist/esm/openapi-reference-model.exports.js.map +1 -1
- package/dist/esm/runtime/AuthExchangePage.d.ts.map +1 -1
- package/dist/esm/runtime/AuthExchangePage.js.map +1 -1
- package/dist/esm/runtime/DocsAuthContext.d.ts.map +1 -1
- package/dist/esm/runtime/DocsFrontendProviders.d.ts.map +1 -1
- package/dist/esm/runtime/DocsFrontendProviders.js.map +1 -1
- package/dist/esm/runtime/DocsProviderComponent.d.ts.map +1 -1
- package/dist/esm/runtime/DocsProviderComponent.js.map +1 -1
- package/dist/esm/runtime/decode-jwt-claims.d.ts.map +1 -1
- package/dist/esm/runtime/docs-auth-client.d.ts.map +1 -1
- package/dist/esm/runtime/docs-auth-session.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/documentation-site-translator.d.ts.map +1 -1
- package/dist/esm/runtime/documentation-site-translator.js.map +1 -1
- package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts.map +1 -1
- package/dist/esm/runtime/index.d.ts.map +1 -1
- package/dist/esm/runtime/index.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-conservation.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-model.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-model.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-navigation.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-navigation.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-samples.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-samples.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-styles.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-styles.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-view.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-view.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-words-context.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-words-context.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-words.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-words.js.map +1 -1
- package/dist/esm/runtime/provider-component-registry.techdoc.d.ts.map +1 -1
- package/dist/esm/runtime/provider-component-registry.techdoc.js.map +1 -1
- package/dist/esm/runtime/use-docs-auth-session.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-provider-component.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-provider-component.js.map +1 -1
- package/dist/esm/runtime/use-docs-provider-scripts.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-provider-scripts.js.map +1 -1
- package/dist/esm/runtime/use-docs-provider-sdks.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.exports.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"content.exports.d.ts","sourceRoot":"","sources":["../../src/content.exports.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,uEAAuE,CAAC;AACtF,cAAc,8DAA8D,CAAC"}
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-reference-link-index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"api-reference-link-index.d.ts","sourceRoot":"","sources":["../../../src/openapi/api-reference-link-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,EAGL,KAAK,0CAA0C,EAChD,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAEL,qCAAqC,EAKtC,MAAM,yBAAyB,CAAC;AAGjC,8EAA8E;AAC9E,oBAAY,4BAA4B;IACtC,kFAAkF;IAClF,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,gBAAgB,qBAAqB;IACrC,iBAAiB,sBAAsB;IACvC,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,gBAAgB,qBAAqB;CACtC;AAED,MAAM,MAAM,wBAAwB,GAChC;IAAE,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC,IAAI,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC,QAAQ,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACrF;IAAE,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC,QAAQ,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACtF;IAAE,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC,gBAAgB,CAAC;IAAC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,GACrG;IAAE,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC,iBAAiB,CAAC;IAAC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAA;CAAE,GACvG;IAAE,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC,OAAO,CAAC;IAAC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAA;CAAE,GAC7F;I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CAGR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-reference-link-index.js","sourceRoot":"","sources":["../../../../src/openapi/api-reference-link-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAA6B,MAAM,qCAAqC,CAAC;AAChG,OAAO,EACL,yCAAyC,EACzC,4CAA4C,GAE7C,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,qCAAqC,EACrC,yCAAyC,EACzC,0CAA0C,EAC1C,0BAA0B,GAE3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAA6B,MAAM,uBAAuB,CAAC;AAEnH,8EAA8E;AAC9E,MAAM,CAAN,IAAY,4BAUX;AAVD,WAAY,4BAA4B;IACtC,kFAAkF;IAClF,6CAAa,CAAA;IACb,qDAAqB,CAAA;IACrB,qDAAqB,CAAA;IACrB,qEAAqC,CAAA;IACrC,uEAAuC,CAAA;IACvC,mDAAmB,CAAA;IACnB,qDAAqB,CAAA;IACrB,qEAAqC,CAAA;AACvC,CAAC,EAVW,4BAA4B,KAA5B,4BAA4B,QAUvC;AAyBD;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,oDAGX;AAHD,WAAY,oDAAoD;IAC9D,+EAAuB,CAAA;IACvB,mFAA2B,CAAA;AAC7B,CAAC,EAHW,oDAAoD,KAApD,oDAAoD,QAG/D;AAID,MAAM,oBAAoB,GAAwB,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAEjI,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,4EAA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,CAAC;AAC3D,CAAC","sourcesContent":["/**\n * Semantic links into the generated API reference.\n *\n * This module projects a canonical OpenAPI document into a small index of\n * public paths. It does not describe or navigate API contracts itself: every\n * entry is derived from standard OpenAPI fields plus the strict `x-wildo`\n * source identities already present in the document. Guide generation can use\n * the index to link to exact API targets without hard-coding Docusaurus URLs\n * or duplicating operations, request DTOs, responses, or schemas.\n */\n\nimport { OpenApiSection, type OpenApiSectionOutput } from './openapi-generation-output.schemas';\nimport {\n TechnicalDocumentationApiReferenceSection,\n TechnicalDocumentationApiReferenceTargetKind,\n type TechnicalDocumentationApiReferenceTargetV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\nimport {\n ApiReferenceTargetKind,\n ApplicationConsumerDocumentationRoute,\n applicationConsumerDocumentationRoutePath,\n applicationConsumerDocumentationTargetPath,\n apiReferenceTargetFragment,\n type ApiReferencePublicTarget,\n} from './api-reference-targets';\nimport { apiReferencePageHref, buildApiReferencePagePlan, type ApiReferencePagePlan } from './api-reference-pages';\n\n/** The semantic source identity a guide may resolve to a consumer API URL. */\nexport enum ApiReferenceLinkIdentityKind {\n /** A generated section exists and its root page is a valid public destination. */\n ROOT = 'ROOT',\n CATEGORY = 'CATEGORY',\n RESOURCE = 'RESOURCE',\n OPERATION_FAMILY = 'OPERATION_FAMILY',\n OPERATION_VARIANT = 'OPERATION_VARIANT',\n REQUEST = 'REQUEST',\n RESPONSE = 'RESPONSE',\n COMPONENT_SCHEMA = 'COMPONENT_SCHEMA',\n}\n\nexport type ApiReferenceLinkIdentity =\n | { readonly kind: ApiReferenceLinkIdentityKind.ROOT }\n | { readonly kind: ApiReferenceLinkIdentityKind.CATEGORY; readonly categoryId: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.RESOURCE; readonly resourceRef: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.OPERATION_FAMILY; readonly operationFamilyRef: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.OPERATION_VARIANT; readonly operationVariantRef: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.REQUEST; readonly operationVariantRef: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.RESPONSE; readonly operationVariantRef: string; readonly status: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.COMPONENT_SCHEMA; readonly schemaName: string };\n\n/** One resolved public URL. `section` keeps an identity unambiguous across both API references. */\nexport interface ApiReferenceLinkIndexEntry {\n readonly section: OpenApiSection;\n readonly identity: ApiReferenceLinkIdentity;\n readonly href: string;\n}\n\n/** JSON-safe result of projecting the selected OpenAPI documents. */\nexport interface ApiReferenceLinkIndex {\n readonly schemaVersion: 1;\n readonly entries: readonly ApiReferenceLinkIndexEntry[];\n}\n\n/**\n * Result of asking whether one semantic guide target exists in the exact\n * generated OpenAPI index. This is deliberately not a boolean: the named\n * vocabulary keeps availability decisions readable at guide-composition call\n * sites and leaves room for future source-owned states without overloading\n * `false`.\n */\nexport enum TechnicalDocumentationApiReferenceTargetAvailability {\n AVAILABLE = 'AVAILABLE',\n UNAVAILABLE = 'UNAVAILABLE',\n}\n\ntype UnknownRecord = Record<string, unknown>;\n\nconst OPENAPI_HTTP_METHODS: ReadonlySet<string> = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace']);\n\nfunction isRecord(value: unknown): value is UnknownRecord {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** The consumer-documentation route that roots an API-reference section. */\nexport function apiReferenceRouteForSection(section: OpenApiSection): ApplicationConsumerDocumentationRoute {\n switch (section) {\n case OpenApiSection.API_REFERENCE:\n return ApplicationConsumerDocumentationRoute.API_REFERENCE;\n case OpenApiSection.APPLICATION_ADMINISTRATION_API_REFERENCE:\n return ApplicationConsumerDocumentationRoute.APPLICATION_ADMINISTRATION_API_REFERENCE;\n default: {\n const exhaustiveSection: never = section;\n throw new Error(`Unsupported API-reference section: ${String(exhaustiveSection)}`);\n }\n }\n}\n\nfunction resourceName(resourceRef: string): string {\n const name = resourceRef.match(/^technical-documentation:resource\\/([^/]+)$/)?.[1];\n if (name === undefined) throw new Error(`API-reference resource identity is not a canonical resource ref: '${resourceRef}'`);\n return name;\n}\n\nfunction familyName(operationFamilyRef: string): string {\n const name = operationFamilyRef.match(/^technical-documentation:resource\\/[^/]+\\/operation-family\\/([^/]+)$/)?.[1];\n if (name === undefined) throw new Error(`API-reference family identity is not canonical: '${operationFamilyRef}'`);\n return name;\n}\n\n/**\n * A target's public href. Each resource has its own page (#1623), so a resource-scoped target is\n * addressed on that page (`/api/tasks#operation-create-task`) and only a category stays on the\n * section root — the page plan that registers the routes decides, so a guide link and a route can\n * never disagree about where a target lives.\n */\nfunction targetHref(section: OpenApiSection, plan: ApiReferencePagePlan, target: ApiReferencePublicTarget): string {\n return apiReferencePageHref(applicationConsumerDocumentationRoutePath(apiReferenceRouteForSection(section)), apiReferenceTargetFragment(target), plan);\n}\n\n/** The root is an index entry too: a guide may cite it only when that section was generated. */\nfunction sectionRootHref(section: OpenApiSection): string {\n return applicationConsumerDocumentationTargetPath(apiReferenceRouteForSection(section));\n}\n\nfunction identityKey(section: OpenApiSection, identity: ApiReferenceLinkIdentity): string {\n switch (identity.kind) {\n case ApiReferenceLinkIdentityKind.ROOT:\n return `${section}\\0${identity.kind}`;\n case ApiReferenceLinkIdentityKind.CATEGORY:\n return `${section}\\0${identity.kind}\\0${identity.categoryId}`;\n case ApiReferenceLinkIdentityKind.RESOURCE:\n return `${section}\\0${identity.kind}\\0${identity.resourceRef}`;\n case ApiReferenceLinkIdentityKind.OPERATION_FAMILY:\n return `${section}\\0${identity.kind}\\0${identity.operationFamilyRef}`;\n case ApiReferenceLinkIdentityKind.OPERATION_VARIANT:\n case ApiReferenceLinkIdentityKind.REQUEST:\n return `${section}\\0${identity.kind}\\0${identity.operationVariantRef}`;\n case ApiReferenceLinkIdentityKind.RESPONSE:\n return `${section}\\0${identity.kind}\\0${identity.operationVariantRef}\\0${identity.status}`;\n case ApiReferenceLinkIdentityKind.COMPONENT_SCHEMA:\n return `${section}\\0${identity.kind}\\0${identity.schemaName}`;\n default: {\n const exhaustiveIdentity: never = identity;\n throw new Error(`Unsupported API-reference link identity: ${JSON.stringify(exhaustiveIdentity)}`);\n }\n }\n}\n\n/**\n * Creates links from the exact generated OpenAPI documents.\n *\n * This is intentionally a fail-closed projection. An HTTP operation without\n * the established source identity, a tag/operation resource mismatch, or a\n * duplicate semantic target means guide links could become ambiguous, so the\n * index is not emitted at all.\n */\nexport function createApiReferenceLinkIndex(sections: readonly OpenApiSectionOutput[]): ApiReferenceLinkIndex {\n const entries: ApiReferenceLinkIndexEntry[] = [];\n const seen = new Set<string>();\n const sectionSet = new Set<OpenApiSection>();\n const identityByHref = new Map<string, string>();\n const add = (section: OpenApiSection, identity: ApiReferenceLinkIdentity, href: string): void => {\n const key = identityKey(section, identity);\n if (seen.has(key)) throw new Error(`API-reference link identity is duplicated: ${key}`);\n const priorIdentity = identityByHref.get(href);\n if (priorIdentity !== undefined && priorIdentity !== key) {\n throw new Error(`API-reference public link '${href}' is ambiguous between ${priorIdentity} and ${key}`);\n }\n seen.add(key);\n identityByHref.set(href, key);\n entries.push({ section, identity, href });\n };\n\n for (const sectionOutput of sections) {\n if (sectionSet.has(sectionOutput.section)) throw new Error(`API-reference section is duplicated: ${sectionOutput.section}`);\n sectionSet.add(sectionOutput.section);\n const document = sectionOutput.document;\n if (!isRecord(document) || !isRecord(document.paths)) throw new Error(`API-reference ${sectionOutput.section} document has no OpenAPI paths object`);\n const pagePlan = buildApiReferencePagePlan(document);\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.ROOT }, sectionRootHref(sectionOutput.section));\n const tags = new Map<string, { resourceRef: string }>();\n const usedResourceRefs = new Set<string>();\n const categoryMetadataById = new Map<string, { label: string; description: string | null }>();\n if (!Array.isArray(document.tags)) throw new Error(`API-reference ${sectionOutput.section} document has no resource tags`);\n for (const tag of document.tags) {\n if (!isRecord(tag) || typeof tag.name !== 'string' || !isRecord(tag['x-wildo']) || typeof tag['x-wildo'].resourceRef !== 'string') {\n throw new Error(`API-reference ${sectionOutput.section} document has a malformed resource tag`);\n }\n if (tags.has(tag.name)) throw new Error(`API-reference ${sectionOutput.section} resource tag is duplicated: '${tag.name}'`);\n const category = tag['x-wildo'].category;\n if (category !== undefined && (!isRecord(category) || typeof category.id !== 'string' || typeof category.label !== 'string'\n || (category.description !== undefined && typeof category.description !== 'string'))) {\n throw new Error(`API-reference resource tag '${tag.name}' has malformed category metadata`);\n }\n const categoryId = isRecord(category) && typeof category.id === 'string' ? category.id : null;\n const categoryLabel = isRecord(category) && typeof category.label === 'string' ? category.label : null;\n const categoryDescription = isRecord(category) && typeof category.description === 'string' ? category.description : null;\n const tagResourceRef = tag['x-wildo'].resourceRef;\n if (resourceName(tagResourceRef) !== tag.name) throw new Error(`API-reference resource tag '${tag.name}' disagrees with its resource identity`);\n tags.set(tag.name, { resourceRef: tagResourceRef });\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.RESOURCE, resourceRef: tagResourceRef }, targetHref(sectionOutput.section, pagePlan, {\n kind: ApiReferenceTargetKind.RESOURCE,\n resourceName: tag.name,\n }));\n if (categoryId !== null) {\n if (categoryLabel === null) throw new Error(`API-reference resource tag '${tag.name}' has malformed category metadata`);\n const priorMetadata = categoryMetadataById.get(categoryId);\n if (priorMetadata !== undefined && (priorMetadata.label !== categoryLabel || priorMetadata.description !== categoryDescription)) {\n throw new Error(`API-reference category '${categoryId}' has inconsistent source metadata`);\n }\n categoryMetadataById.set(categoryId, { label: categoryLabel, description: categoryDescription });\n const categoryIdentity = { kind: ApiReferenceLinkIdentityKind.CATEGORY, categoryId } as const;\n const key = identityKey(sectionOutput.section, categoryIdentity);\n if (!seen.has(key)) add(sectionOutput.section, categoryIdentity, targetHref(sectionOutput.section, pagePlan, {\n kind: ApiReferenceTargetKind.CATEGORY,\n categoryName: categoryId,\n }));\n }\n }\n\n for (const [path, pathItem] of Object.entries(document.paths)) {\n if (!isRecord(pathItem)) continue;\n for (const [method, operation] of Object.entries(pathItem)) {\n if (!OPENAPI_HTTP_METHODS.has(method)) continue;\n if (!isRecord(operation) || !isRecord(operation['x-wildo']) || typeof operation.operationId !== 'string') {\n throw new Error(`API-reference ${method.toUpperCase()} ${path} operation has malformed identity metadata`);\n }\n const metadata = operation['x-wildo'];\n if (typeof metadata.resourceRef !== 'string' || typeof metadata.operationFamilyRef !== 'string' || typeof metadata.operationVariantRef !== 'string') {\n throw new Error(`API-reference ${method.toUpperCase()} ${path} operation has incomplete identity metadata`);\n }\n if (metadata.path !== path || metadata.httpVerb !== method) throw new Error(`API-reference ${method.toUpperCase()} ${path} operation identity disagrees with its OpenAPI location`);\n const tag = tags.get(resourceName(metadata.resourceRef));\n if (tag === undefined || tag.resourceRef !== metadata.resourceRef) throw new Error(`API-reference ${method.toUpperCase()} ${path} operation has no matching resource tag`);\n usedResourceRefs.add(metadata.resourceRef);\n const operationTarget = { kind: ApiReferenceTargetKind.OPERATION, operationId: operation.operationId } as const;\n const familyIdentity = { kind: ApiReferenceLinkIdentityKind.OPERATION_FAMILY, operationFamilyRef: metadata.operationFamilyRef } as const;\n if (!seen.has(identityKey(sectionOutput.section, familyIdentity))) {\n add(sectionOutput.section, familyIdentity, targetHref(sectionOutput.section, pagePlan, {\n kind: ApiReferenceTargetKind.OPERATION_FAMILY,\n resourceName: resourceName(metadata.resourceRef),\n operationName: familyName(metadata.operationFamilyRef),\n }));\n }\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.OPERATION_VARIANT, operationVariantRef: metadata.operationVariantRef }, targetHref(sectionOutput.section, pagePlan, operationTarget));\n if (isRecord(operation.requestBody)) {\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.REQUEST, operationVariantRef: metadata.operationVariantRef }, targetHref(sectionOutput.section, pagePlan, {\n kind: ApiReferenceTargetKind.REQUEST,\n operationId: operation.operationId,\n }));\n }\n if (isRecord(operation.responses)) {\n for (const status of Object.keys(operation.responses)) {\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.RESPONSE, operationVariantRef: metadata.operationVariantRef, status }, targetHref(sectionOutput.section, pagePlan, {\n kind: ApiReferenceTargetKind.RESPONSE,\n operationId: operation.operationId,\n status,\n }));\n }\n }\n }\n }\n\n for (const [tagName, tag] of tags) {\n if (!usedResourceRefs.has(tag.resourceRef)) {\n throw new Error(`API-reference resource tag '${tagName}' has no rendered HTTP operation`);\n }\n }\n\n const componentSchemas = isRecord(document.components) && isRecord(document.components.schemas) ? document.components.schemas : {};\n for (const schemaName of Object.keys(componentSchemas)) {\n const target = { kind: ApiReferenceTargetKind.COMPONENT_SCHEMA, schemaName } as const;\n // A schema no operation reaches is rendered on no page, so it is not offered as a target at all\n // — a guide asking for it gets UNAVAILABLE rather than a link to nothing.\n if (pagePlan.pageSlugByFragment[apiReferenceTargetFragment(target)] === undefined) continue;\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.COMPONENT_SCHEMA, schemaName }, targetHref(sectionOutput.section, pagePlan, target));\n }\n }\n return { schemaVersion: 1, entries: entries.sort((left, right) => identityKey(left.section, left.identity).localeCompare(identityKey(right.section, right.identity))) };\n}\n\n/** Resolves one semantic API target and fails loudly when a guide asks for unavailable documentation. */\nexport function resolveApiReferenceLink(index: ApiReferenceLinkIndex, section: OpenApiSection, identity: ApiReferenceLinkIdentity): string {\n const expectedKey = identityKey(section, identity);\n const entry = index.entries.find((candidate) => identityKey(candidate.section, candidate.identity) === expectedKey);\n if (entry === undefined) throw new Error(`API-reference link target is unavailable: ${expectedKey}`);\n return entry.href;\n}\n\nfunction technicalDocumentationTargetIdentity(target: TechnicalDocumentationApiReferenceTargetV1): {\n readonly section: OpenApiSection;\n readonly identity: ApiReferenceLinkIdentity;\n} {\n const section = target.section === TechnicalDocumentationApiReferenceSection.API_REFERENCE\n ? OpenApiSection.API_REFERENCE\n : OpenApiSection.APPLICATION_ADMINISTRATION_API_REFERENCE;\n switch (target.kind) {\n case TechnicalDocumentationApiReferenceTargetKind.ROOT:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.ROOT } };\n case TechnicalDocumentationApiReferenceTargetKind.CATEGORY:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.CATEGORY, categoryId: target.categoryId } };\n case TechnicalDocumentationApiReferenceTargetKind.RESOURCE:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.RESOURCE, resourceRef: target.resourceRef } };\n case TechnicalDocumentationApiReferenceTargetKind.OPERATION_FAMILY:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.OPERATION_FAMILY, operationFamilyRef: target.operationFamilyRef } };\n case TechnicalDocumentationApiReferenceTargetKind.OPERATION_VARIANT:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.OPERATION_VARIANT, operationVariantRef: target.operationVariantRef } };\n case TechnicalDocumentationApiReferenceTargetKind.REQUEST:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.REQUEST, operationVariantRef: target.operationVariantRef } };\n case TechnicalDocumentationApiReferenceTargetKind.RESPONSE:\n return {\n section,\n identity: {\n kind: ApiReferenceLinkIdentityKind.RESPONSE,\n operationVariantRef: target.operationVariantRef,\n status: target.status,\n },\n };\n case TechnicalDocumentationApiReferenceTargetKind.COMPONENT_SCHEMA:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.COMPONENT_SCHEMA, schemaName: target.schemaName } };\n default: {\n const exhaustiveTarget: never = target;\n throw new Error(`Unsupported technical-documentation API-reference target: ${JSON.stringify(exhaustiveTarget)}`);\n }\n }\n}\n\n/**\n * Answers whether a typed target exists in the generated OpenAPI index without\n * manufacturing a URL or turning normal optional-content selection into an\n * exception path. Included guide links must still use the strict resolver.\n */\nexport function getTechnicalDocumentationApiReferenceTargetAvailability(\n index: ApiReferenceLinkIndex,\n target: TechnicalDocumentationApiReferenceTargetV1,\n): TechnicalDocumentationApiReferenceTargetAvailability {\n const { section, identity } = technicalDocumentationTargetIdentity(target);\n const expectedKey = identityKey(section, identity);\n return index.entries.some((candidate) => identityKey(candidate.section, candidate.identity) === expectedKey)\n ? TechnicalDocumentationApiReferenceTargetAvailability.AVAILABLE\n : TechnicalDocumentationApiReferenceTargetAvailability.UNAVAILABLE;\n}\n\n/**\n * Resolves a portable guide target through the generated OpenAPI index.\n *\n * The technical-documentation contract owns the semantic target because guide\n * content cannot depend on the renderer package. This adapter is the only\n * place that translates that portable target into the OpenAPI identities used\n * to produce public consumer URLs.\n */\nexport function resolveTechnicalDocumentationApiReferenceLink(\n index: ApiReferenceLinkIndex,\n target: TechnicalDocumentationApiReferenceTargetV1,\n): string {\n const { section, identity } = technicalDocumentationTargetIdentity(target);\n return resolveApiReferenceLink(index, section, identity);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"api-reference-link-index.js","sourceRoot":"","sources":["../../../src/openapi/api-reference-link-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAA6B,MAAM,qCAAqC,CAAC;AAChG,OAAO,EACL,yCAAyC,EACzC,4CAA4C,GAE7C,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,qCAAqC,EACrC,yCAAyC,EACzC,0CAA0C,EAC1C,0BAA0B,GAE3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAA6B,MAAM,uBAAuB,CAAC;AAEnH,8EAA8E;AAC9E,MAAM,CAAN,IAAY,4BAUX;AAVD,WAAY,4BAA4B;IACtC,kFAAkF;IAClF,6CAAa,CAAA;IACb,qDAAqB,CAAA;IACrB,qDAAqB,CAAA;IACrB,qEAAqC,CAAA;IACrC,uEAAuC,CAAA;IACvC,mDAAmB,CAAA;IACnB,qDAAqB,CAAA;IACrB,qEAAqC,CAAA;AACvC,CAAC,EAVW,4BAA4B,KAA5B,4BAA4B,QAUvC;AAyBD;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,oDAGX;AAHD,WAAY,oDAAoD;IAC9D,+EAAuB,CAAA;IACvB,mFAA2B,CAAA;AAC7B,C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AC,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,KAAK,WAAW,CAAC;QAC1G,CAAC,CAAC,oDAAoD,CAAC,SAAS;QAChE,CAAC,CAAC,oDAAoD,CAAC,WAAW,CAAC;AACvE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,6CAA6C,CAC3D,KAA4B,EAC5B,MAAkD;IAElD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,oCAAoC,CAAC,MAAM,CAAC,CAAC;IAC3E,OAAO,uBAAuB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["/**\n * Semantic links into the generated API reference.\n *\n * This module projects a canonical OpenAPI document into a small index of\n * public paths. It does not describe or navigate API contracts itself: every\n * entry is derived from standard OpenAPI fields plus the strict `x-wildo`\n * source identities already present in the document. Guide generation can use\n * the index to link to exact API targets without hard-coding Docusaurus URLs\n * or duplicating operations, request DTOs, responses, or schemas.\n */\n\nimport { OpenApiSection, type OpenApiSectionOutput } from './openapi-generation-output.schemas';\nimport {\n TechnicalDocumentationApiReferenceSection,\n TechnicalDocumentationApiReferenceTargetKind,\n type TechnicalDocumentationApiReferenceTargetV1,\n} from '@wildo-ai/saas-specifications/technical-documentation';\nimport {\n ApiReferenceTargetKind,\n ApplicationConsumerDocumentationRoute,\n applicationConsumerDocumentationRoutePath,\n applicationConsumerDocumentationTargetPath,\n apiReferenceTargetFragment,\n type ApiReferencePublicTarget,\n} from './api-reference-targets';\nimport { apiReferencePageHref, buildApiReferencePagePlan, type ApiReferencePagePlan } from './api-reference-pages';\n\n/** The semantic source identity a guide may resolve to a consumer API URL. */\nexport enum ApiReferenceLinkIdentityKind {\n /** A generated section exists and its root page is a valid public destination. */\n ROOT = 'ROOT',\n CATEGORY = 'CATEGORY',\n RESOURCE = 'RESOURCE',\n OPERATION_FAMILY = 'OPERATION_FAMILY',\n OPERATION_VARIANT = 'OPERATION_VARIANT',\n REQUEST = 'REQUEST',\n RESPONSE = 'RESPONSE',\n COMPONENT_SCHEMA = 'COMPONENT_SCHEMA',\n}\n\nexport type ApiReferenceLinkIdentity =\n | { readonly kind: ApiReferenceLinkIdentityKind.ROOT }\n | { readonly kind: ApiReferenceLinkIdentityKind.CATEGORY; readonly categoryId: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.RESOURCE; readonly resourceRef: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.OPERATION_FAMILY; readonly operationFamilyRef: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.OPERATION_VARIANT; readonly operationVariantRef: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.REQUEST; readonly operationVariantRef: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.RESPONSE; readonly operationVariantRef: string; readonly status: string }\n | { readonly kind: ApiReferenceLinkIdentityKind.COMPONENT_SCHEMA; readonly schemaName: string };\n\n/** One resolved public URL. `section` keeps an identity unambiguous across both API references. */\nexport interface ApiReferenceLinkIndexEntry {\n readonly section: OpenApiSection;\n readonly identity: ApiReferenceLinkIdentity;\n readonly href: string;\n}\n\n/** JSON-safe result of projecting the selected OpenAPI documents. */\nexport interface ApiReferenceLinkIndex {\n readonly schemaVersion: 1;\n readonly entries: readonly ApiReferenceLinkIndexEntry[];\n}\n\n/**\n * Result of asking whether one semantic guide target exists in the exact\n * generated OpenAPI index. This is deliberately not a boolean: the named\n * vocabulary keeps availability decisions readable at guide-composition call\n * sites and leaves room for future source-owned states without overloading\n * `false`.\n */\nexport enum TechnicalDocumentationApiReferenceTargetAvailability {\n AVAILABLE = 'AVAILABLE',\n UNAVAILABLE = 'UNAVAILABLE',\n}\n\ntype UnknownRecord = Record<string, unknown>;\n\nconst OPENAPI_HTTP_METHODS: ReadonlySet<string> = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace']);\n\nfunction isRecord(value: unknown): value is UnknownRecord {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** The consumer-documentation route that roots an API-reference section. */\nexport function apiReferenceRouteForSection(section: OpenApiSection): ApplicationConsumerDocumentationRoute {\n switch (section) {\n case OpenApiSection.API_REFERENCE:\n return ApplicationConsumerDocumentationRoute.API_REFERENCE;\n case OpenApiSection.APPLICATION_ADMINISTRATION_API_REFERENCE:\n return ApplicationConsumerDocumentationRoute.APPLICATION_ADMINISTRATION_API_REFERENCE;\n default: {\n const exhaustiveSection: never = section;\n throw new Error(`Unsupported API-reference section: ${String(exhaustiveSection)}`);\n }\n }\n}\n\nfunction resourceName(resourceRef: string): string {\n const name = resourceRef.match(/^technical-documentation:resource\\/([^/]+)$/)?.[1];\n if (name === undefined) throw new Error(`API-reference resource identity is not a canonical resource ref: '${resourceRef}'`);\n return name;\n}\n\nfunction familyName(operationFamilyRef: string): string {\n const name = operationFamilyRef.match(/^technical-documentation:resource\\/[^/]+\\/operation-family\\/([^/]+)$/)?.[1];\n if (name === undefined) throw new Error(`API-reference family identity is not canonical: '${operationFamilyRef}'`);\n return name;\n}\n\n/**\n * A target's public href. Each resource has its own page (#1623), so a resource-scoped target is\n * addressed on that page (`/api/tasks#operation-create-task`) and only a category stays on the\n * section root — the page plan that registers the routes decides, so a guide link and a route can\n * never disagree about where a target lives.\n */\nfunction targetHref(section: OpenApiSection, plan: ApiReferencePagePlan, target: ApiReferencePublicTarget): string {\n return apiReferencePageHref(applicationConsumerDocumentationRoutePath(apiReferenceRouteForSection(section)), apiReferenceTargetFragment(target), plan);\n}\n\n/** The root is an index entry too: a guide may cite it only when that section was generated. */\nfunction sectionRootHref(section: OpenApiSection): string {\n return applicationConsumerDocumentationTargetPath(apiReferenceRouteForSection(section));\n}\n\nfunction identityKey(section: OpenApiSection, identity: ApiReferenceLinkIdentity): string {\n switch (identity.kind) {\n case ApiReferenceLinkIdentityKind.ROOT:\n return `${section}\\0${identity.kind}`;\n case ApiReferenceLinkIdentityKind.CATEGORY:\n return `${section}\\0${identity.kind}\\0${identity.categoryId}`;\n case ApiReferenceLinkIdentityKind.RESOURCE:\n return `${section}\\0${identity.kind}\\0${identity.resourceRef}`;\n case ApiReferenceLinkIdentityKind.OPERATION_FAMILY:\n return `${section}\\0${identity.kind}\\0${identity.operationFamilyRef}`;\n case ApiReferenceLinkIdentityKind.OPERATION_VARIANT:\n case ApiReferenceLinkIdentityKind.REQUEST:\n return `${section}\\0${identity.kind}\\0${identity.operationVariantRef}`;\n case ApiReferenceLinkIdentityKind.RESPONSE:\n return `${section}\\0${identity.kind}\\0${identity.operationVariantRef}\\0${identity.status}`;\n case ApiReferenceLinkIdentityKind.COMPONENT_SCHEMA:\n return `${section}\\0${identity.kind}\\0${identity.schemaName}`;\n default: {\n const exhaustiveIdentity: never = identity;\n throw new Error(`Unsupported API-reference link identity: ${JSON.stringify(exhaustiveIdentity)}`);\n }\n }\n}\n\n/**\n * Creates links from the exact generated OpenAPI documents.\n *\n * This is intentionally a fail-closed projection. An HTTP operation without\n * the established source identity, a tag/operation resource mismatch, or a\n * duplicate semantic target means guide links could become ambiguous, so the\n * index is not emitted at all.\n */\nexport function createApiReferenceLinkIndex(sections: readonly OpenApiSectionOutput[]): ApiReferenceLinkIndex {\n const entries: ApiReferenceLinkIndexEntry[] = [];\n const seen = new Set<string>();\n const sectionSet = new Set<OpenApiSection>();\n const identityByHref = new Map<string, string>();\n const add = (section: OpenApiSection, identity: ApiReferenceLinkIdentity, href: string): void => {\n const key = identityKey(section, identity);\n if (seen.has(key)) throw new Error(`API-reference link identity is duplicated: ${key}`);\n const priorIdentity = identityByHref.get(href);\n if (priorIdentity !== undefined && priorIdentity !== key) {\n throw new Error(`API-reference public link '${href}' is ambiguous between ${priorIdentity} and ${key}`);\n }\n seen.add(key);\n identityByHref.set(href, key);\n entries.push({ section, identity, href });\n };\n\n for (const sectionOutput of sections) {\n if (sectionSet.has(sectionOutput.section)) throw new Error(`API-reference section is duplicated: ${sectionOutput.section}`);\n sectionSet.add(sectionOutput.section);\n const document = sectionOutput.document;\n if (!isRecord(document) || !isRecord(document.paths)) throw new Error(`API-reference ${sectionOutput.section} document has no OpenAPI paths object`);\n const pagePlan = buildApiReferencePagePlan(document);\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.ROOT }, sectionRootHref(sectionOutput.section));\n const tags = new Map<string, { resourceRef: string }>();\n const usedResourceRefs = new Set<string>();\n const categoryMetadataById = new Map<string, { label: string; description: string | null }>();\n if (!Array.isArray(document.tags)) throw new Error(`API-reference ${sectionOutput.section} document has no resource tags`);\n for (const tag of document.tags) {\n if (!isRecord(tag) || typeof tag.name !== 'string' || !isRecord(tag['x-wildo']) || typeof tag['x-wildo'].resourceRef !== 'string') {\n throw new Error(`API-reference ${sectionOutput.section} document has a malformed resource tag`);\n }\n if (tags.has(tag.name)) throw new Error(`API-reference ${sectionOutput.section} resource tag is duplicated: '${tag.name}'`);\n const category = tag['x-wildo'].category;\n if (category !== undefined && (!isRecord(category) || typeof category.id !== 'string' || typeof category.label !== 'string'\n || (category.description !== undefined && typeof category.description !== 'string'))) {\n throw new Error(`API-reference resource tag '${tag.name}' has malformed category metadata`);\n }\n const categoryId = isRecord(category) && typeof category.id === 'string' ? category.id : null;\n const categoryLabel = isRecord(category) && typeof category.label === 'string' ? category.label : null;\n const categoryDescription = isRecord(category) && typeof category.description === 'string' ? category.description : null;\n const tagResourceRef = tag['x-wildo'].resourceRef;\n if (resourceName(tagResourceRef) !== tag.name) throw new Error(`API-reference resource tag '${tag.name}' disagrees with its resource identity`);\n tags.set(tag.name, { resourceRef: tagResourceRef });\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.RESOURCE, resourceRef: tagResourceRef }, targetHref(sectionOutput.section, pagePlan, {\n kind: ApiReferenceTargetKind.RESOURCE,\n resourceName: tag.name,\n }));\n if (categoryId !== null) {\n if (categoryLabel === null) throw new Error(`API-reference resource tag '${tag.name}' has malformed category metadata`);\n const priorMetadata = categoryMetadataById.get(categoryId);\n if (priorMetadata !== undefined && (priorMetadata.label !== categoryLabel || priorMetadata.description !== categoryDescription)) {\n throw new Error(`API-reference category '${categoryId}' has inconsistent source metadata`);\n }\n categoryMetadataById.set(categoryId, { label: categoryLabel, description: categoryDescription });\n const categoryIdentity = { kind: ApiReferenceLinkIdentityKind.CATEGORY, categoryId } as const;\n const key = identityKey(sectionOutput.section, categoryIdentity);\n if (!seen.has(key)) add(sectionOutput.section, categoryIdentity, targetHref(sectionOutput.section, pagePlan, {\n kind: ApiReferenceTargetKind.CATEGORY,\n categoryName: categoryId,\n }));\n }\n }\n\n for (const [path, pathItem] of Object.entries(document.paths)) {\n if (!isRecord(pathItem)) continue;\n for (const [method, operation] of Object.entries(pathItem)) {\n if (!OPENAPI_HTTP_METHODS.has(method)) continue;\n if (!isRecord(operation) || !isRecord(operation['x-wildo']) || typeof operation.operationId !== 'string') {\n throw new Error(`API-reference ${method.toUpperCase()} ${path} operation has malformed identity metadata`);\n }\n const metadata = operation['x-wildo'];\n if (typeof metadata.resourceRef !== 'string' || typeof metadata.operationFamilyRef !== 'string' || typeof metadata.operationVariantRef !== 'string') {\n throw new Error(`API-reference ${method.toUpperCase()} ${path} operation has incomplete identity metadata`);\n }\n if (metadata.path !== path || metadata.httpVerb !== method) throw new Error(`API-reference ${method.toUpperCase()} ${path} operation identity disagrees with its OpenAPI location`);\n const tag = tags.get(resourceName(metadata.resourceRef));\n if (tag === undefined || tag.resourceRef !== metadata.resourceRef) throw new Error(`API-reference ${method.toUpperCase()} ${path} operation has no matching resource tag`);\n usedResourceRefs.add(metadata.resourceRef);\n const operationTarget = { kind: ApiReferenceTargetKind.OPERATION, operationId: operation.operationId } as const;\n const familyIdentity = { kind: ApiReferenceLinkIdentityKind.OPERATION_FAMILY, operationFamilyRef: metadata.operationFamilyRef } as const;\n if (!seen.has(identityKey(sectionOutput.section, familyIdentity))) {\n add(sectionOutput.section, familyIdentity, targetHref(sectionOutput.section, pagePlan, {\n kind: ApiReferenceTargetKind.OPERATION_FAMILY,\n resourceName: resourceName(metadata.resourceRef),\n operationName: familyName(metadata.operationFamilyRef),\n }));\n }\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.OPERATION_VARIANT, operationVariantRef: metadata.operationVariantRef }, targetHref(sectionOutput.section, pagePlan, operationTarget));\n if (isRecord(operation.requestBody)) {\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.REQUEST, operationVariantRef: metadata.operationVariantRef }, targetHref(sectionOutput.section, pagePlan, {\n kind: ApiReferenceTargetKind.REQUEST,\n operationId: operation.operationId,\n }));\n }\n if (isRecord(operation.responses)) {\n for (const status of Object.keys(operation.responses)) {\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.RESPONSE, operationVariantRef: metadata.operationVariantRef, status }, targetHref(sectionOutput.section, pagePlan, {\n kind: ApiReferenceTargetKind.RESPONSE,\n operationId: operation.operationId,\n status,\n }));\n }\n }\n }\n }\n\n for (const [tagName, tag] of tags) {\n if (!usedResourceRefs.has(tag.resourceRef)) {\n throw new Error(`API-reference resource tag '${tagName}' has no rendered HTTP operation`);\n }\n }\n\n const componentSchemas = isRecord(document.components) && isRecord(document.components.schemas) ? document.components.schemas : {};\n for (const schemaName of Object.keys(componentSchemas)) {\n const target = { kind: ApiReferenceTargetKind.COMPONENT_SCHEMA, schemaName } as const;\n // A schema no operation reaches is rendered on no page, so it is not offered as a target at all\n // — a guide asking for it gets UNAVAILABLE rather than a link to nothing.\n if (pagePlan.pageSlugByFragment[apiReferenceTargetFragment(target)] === undefined) continue;\n add(sectionOutput.section, { kind: ApiReferenceLinkIdentityKind.COMPONENT_SCHEMA, schemaName }, targetHref(sectionOutput.section, pagePlan, target));\n }\n }\n return { schemaVersion: 1, entries: entries.sort((left, right) => identityKey(left.section, left.identity).localeCompare(identityKey(right.section, right.identity))) };\n}\n\n/** Resolves one semantic API target and fails loudly when a guide asks for unavailable documentation. */\nexport function resolveApiReferenceLink(index: ApiReferenceLinkIndex, section: OpenApiSection, identity: ApiReferenceLinkIdentity): string {\n const expectedKey = identityKey(section, identity);\n const entry = index.entries.find((candidate) => identityKey(candidate.section, candidate.identity) === expectedKey);\n if (entry === undefined) throw new Error(`API-reference link target is unavailable: ${expectedKey}`);\n return entry.href;\n}\n\nfunction technicalDocumentationTargetIdentity(target: TechnicalDocumentationApiReferenceTargetV1): {\n readonly section: OpenApiSection;\n readonly identity: ApiReferenceLinkIdentity;\n} {\n const section = target.section === TechnicalDocumentationApiReferenceSection.API_REFERENCE\n ? OpenApiSection.API_REFERENCE\n : OpenApiSection.APPLICATION_ADMINISTRATION_API_REFERENCE;\n switch (target.kind) {\n case TechnicalDocumentationApiReferenceTargetKind.ROOT:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.ROOT } };\n case TechnicalDocumentationApiReferenceTargetKind.CATEGORY:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.CATEGORY, categoryId: target.categoryId } };\n case TechnicalDocumentationApiReferenceTargetKind.RESOURCE:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.RESOURCE, resourceRef: target.resourceRef } };\n case TechnicalDocumentationApiReferenceTargetKind.OPERATION_FAMILY:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.OPERATION_FAMILY, operationFamilyRef: target.operationFamilyRef } };\n case TechnicalDocumentationApiReferenceTargetKind.OPERATION_VARIANT:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.OPERATION_VARIANT, operationVariantRef: target.operationVariantRef } };\n case TechnicalDocumentationApiReferenceTargetKind.REQUEST:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.REQUEST, operationVariantRef: target.operationVariantRef } };\n case TechnicalDocumentationApiReferenceTargetKind.RESPONSE:\n return {\n section,\n identity: {\n kind: ApiReferenceLinkIdentityKind.RESPONSE,\n operationVariantRef: target.operationVariantRef,\n status: target.status,\n },\n };\n case TechnicalDocumentationApiReferenceTargetKind.COMPONENT_SCHEMA:\n return { section, identity: { kind: ApiReferenceLinkIdentityKind.COMPONENT_SCHEMA, schemaName: target.schemaName } };\n default: {\n const exhaustiveTarget: never = target;\n throw new Error(`Unsupported technical-documentation API-reference target: ${JSON.stringify(exhaustiveTarget)}`);\n }\n }\n}\n\n/**\n * Answers whether a typed target exists in the generated OpenAPI index without\n * manufacturing a URL or turning normal optional-content selection into an\n * exception path. Included guide links must still use the strict resolver.\n */\nexport function getTechnicalDocumentationApiReferenceTargetAvailability(\n index: ApiReferenceLinkIndex,\n target: TechnicalDocumentationApiReferenceTargetV1,\n): TechnicalDocumentationApiReferenceTargetAvailability {\n const { section, identity } = technicalDocumentationTargetIdentity(target);\n const expectedKey = identityKey(section, identity);\n return index.entries.some((candidate) => identityKey(candidate.section, candidate.identity) === expectedKey)\n ? TechnicalDocumentationApiReferenceTargetAvailability.AVAILABLE\n : TechnicalDocumentationApiReferenceTargetAvailability.UNAVAILABLE;\n}\n\n/**\n * Resolves a portable guide target through the generated OpenAPI index.\n *\n * The technical-documentation contract owns the semantic target because guide\n * content cannot depend on the renderer package. This adapter is the only\n * place that translates that portable target into the OpenAPI identities used\n * to produce public consumer URLs.\n */\nexport function resolveTechnicalDocumentationApiReferenceLink(\n index: ApiReferenceLinkIndex,\n target: TechnicalDocumentationApiReferenceTargetV1,\n): string {\n const { section, identity } = technicalDocumentationTargetIdentity(target);\n return resolveApiReferenceLink(index, section, identity);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-reference-pages.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"api-reference-pages.d.ts","sourceRoot":"","sources":["../../../src/openapi/api-reference-pages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAS1C,qGAAqG;AACrG,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;CAC/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C,QAAQ,CAAC,IAAI,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,kCAAkC,EAAE,EAAE,CAAC,CAAC,CAAC;AACtH,CAAC;AAED,8GAA8G;AAC9G,MAAM,UAAU,4BAA4B,CAAC,kBAAoD;IAC/F,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,+CAA+C,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AACxJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,eAAuB,EAAE,QAAgB,EAAE,IAAsD;IACpI,MAAM,IAAI,GAAG,+BAA+B,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChF,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,GAAG,eAAe,IAAI,QAAQ,EAAE,CAAC;IAChE,OAAO,QAAQ,KAAK,YAAY,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,eAAe,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,eAAe,IAAI,IAAI,IAAI,QAAQ,EAAE,CAAC;AACnH,CAAC","sourcesContent":["/**\n * A page per resource for the API reference, instead of one client-rendered route (#1623).\n *\n * The reference was one route that downloaded and parsed the whole published document on every\n * visit — 9,650,190 bytes for Wonder Todos, measured 2026-09-25 — and addressed every resource,\n * operation and response by `#fragment` state on a ~10,000 px page. Nothing had a page of its own, so\n * nothing had static HTML: not for a reader without JavaScript, not for print, not for the site's\n * search index.\n *\n * This module splits one verified OpenAPI document into what a statically built portal serves:\n *\n * - one PAGE per resource (`/api/<slug>`), carrying that resource's operations and ONLY the\n * components they reach, so a page is complete on its own;\n * - one light INDEX document for the section root: every tag, and every operation reduced to its\n * identity and access, which is all the category grid and the in-page search read;\n * - the map from every public fragment to the page it now lives on, so a link written for the\n * single-page reference (`/api#operation-…`) still reaches its target, and so the link index\n * builds guide links from the same answer.\n *\n * It is pure and imports nothing browser- or Node-specific, so the build plugin that registers the\n * routes and the publication step that writes guide links compute the same plan.\n */\n\nimport {\n ApiReferenceTargetKind,\n apiReferenceResourcePageSlug,\n apiReferenceTargetFragment,\n} from './api-reference-targets';\n\ntype JsonRecord = Record<string, unknown>;\n\nconst HTTP_METHODS: ReadonlySet<string> = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace']);\n\n/** Path segments the section roots already use; a resource page may never shadow one. */\nconst RESERVED_PAGE_SLUGS: ReadonlySet<string> = new Set(['application-administration']);\n\nconst isRecord = (value: unknown): value is JsonRecord => typeof value === 'object' && value !== null && !Array.isArray(value);\n\n/** One resource's page: its slug, its resource name, and the self-sufficient document it renders. */\nexport interface ApiReferenceResourcePage {\n readonly slug: string;\n readonly resourceName: string;\n readonly document: JsonRecord;\n}\n\nexport interface ApiReferencePagePlan {\n /** The section root's document: every tag, and every operation reduced to identity and access. */\n readonly indexDocument: JsonRecord;\n readonly pages: readonly ApiReferenceResourcePage[];\n /** Every public fragment that lives on a resource page, with that page's slug. */\n readonly pageSlugByFragment: Readonly<Record<string, string>>;\n}\n\nfunction resourceNameOf(operation: JsonRecord): string {\n const metadata = operation['x-wildo'];\n const resourceRef = isRecord(metadata) && typeof metadata.resourceRef === 'string' ? metadata.resourceRef : '';\n const name = resourceRef.match(/^technical-documentation:resource\\/([^/]+)$/)?.[1];\n if (name === undefined) throw new Error(`API-reference page plan: operation '${String(operation.operationId)}' has no canonical resource identity`);\n return name;\n}\n\nfunction familyNameOf(operation: JsonRecord): string {\n const metadata = operation['x-wildo'];\n const familyRef = isRecord(metadata) && typeof metadata.operationFamilyRef === 'string' ? metadata.operationFamilyRef : '';\n const name = familyRef.match(/\\/operation-family\\/([^/]+)$/)?.[1];\n if (name === undefined) throw new Error(`API-reference page plan: operation '${String(operation.operationId)}' has no canonical family identity`);\n return name;\n}\n\n/** Every `#/components/<kind>/<name>` reference in `node`, recursively. */\nfunction collectReferences(node: unknown, into: Set<string>): void {\n if (Array.isArray(node)) {\n for (const entry of node) collectReferences(entry, into);\n return;\n }\n if (!isRecord(node)) return;\n if (typeof node.$ref === 'string' && node.$ref.startsWith('#/components/')) into.add(node.$ref);\n for (const value of Object.values(node)) collectReferences(value, into);\n}\n\n/**\n * The components a set of operations reaches, closed transitively: a schema that references another\n * schema brings it along, and a shared response brings the schema its body names.\n */\nfunction componentClosure(paths: JsonRecord, components: JsonRecord): { readonly schemas: JsonRecord; readonly responses: JsonRecord } {\n const componentSchemas = isRecord(components.schemas) ? components.schemas : {};\n const componentResponses = isRecord(components.responses) ? components.responses : {};\n const pending = new Set<string>();\n collectReferences(paths, pending);\n const schemas: JsonRecord = {};\n const responses: JsonRecord = {};\n const visited = new Set<string>();\n while (pending.size > 0) {\n const [reference] = pending;\n pending.delete(reference!);\n if (visited.has(reference!)) continue;\n visited.add(reference!);\n const [, kind, name] = reference!.match(/^#\\/components\\/([^/]+)\\/(.+)$/) ?? [];\n const target = kind === 'schemas' ? componentSchemas[name!] : kind === 'responses' ? componentResponses[name!] : undefined;\n if (target === undefined) continue;\n if (kind === 'schemas') schemas[name!] = target;\n else responses[name!] = target;\n const more = new Set<string>();\n collectReferences(target, more);\n for (const next of more) if (!visited.has(next)) pending.add(next);\n }\n return { schemas, responses };\n}\n\n/**\n * An operation as the index needs it: identity, summary, method, path and access — the fields the\n * category grid and the in-page search read. Parameters, bodies and responses stay on the page, and\n * so does the role prose (the index shows role LABELS), which is most of an operation's weight.\n */\nfunction indexOperation(operation: JsonRecord): JsonRecord {\n const metadata = isRecord(operation['x-wildo']) ? operation['x-wildo'] : {};\n const access = isRecord(metadata.access) ? metadata.access : {};\n const roleRequirements = Array.isArray(access.roleRequirements)\n ? access.roleRequirements.map((requirement) => (isRecord(requirement) ? { role: requirement.role, label: requirement.label } : requirement))\n : [];\n return {\n operationId: operation.operationId,\n ...(operation.summary === undefined ? {} : { summary: operation.summary }),\n ...(operation.tags === undefined ? {} : { tags: operation.tags }),\n ...(operation.security === undefined ? {} : { security: operation.security }),\n 'x-wildo': {\n resourceRef: metadata.resourceRef,\n operationFamilyRef: metadata.operationFamilyRef,\n operationVariantRef: metadata.operationVariantRef,\n path: metadata.path,\n httpVerb: metadata.httpVerb,\n ...(metadata.aliasOfPath === undefined ? {} : { aliasOfPath: metadata.aliasOfPath }),\n access: { authenticationMode: access.authenticationMode, authenticationSummary: access.authenticationSummary, roleRequirements },\n },\n };\n}\n\n/** Split one verified OpenAPI document into resource pages, an index, and the fragment → page map. */\nexport function buildApiReferencePagePlan(document: unknown): ApiReferencePagePlan {\n if (!isRecord(document) || !isRecord(document.paths)) throw new Error('API-reference page plan: document has no OpenAPI paths object');\n const components = isRecord(document.components) ? document.components : {};\n\n const operationsByResource = new Map<string, Array<{ readonly path: string; readonly method: string; readonly operation: JsonRecord }>>();\n for (const [path, pathItem] of Object.entries(document.paths)) {\n if (!isRecord(pathItem)) continue;\n for (const [method, operation] of Object.entries(pathItem)) {\n if (!HTTP_METHODS.has(method) || !isRecord(operation)) continue;\n const resourceName = resourceNameOf(operation);\n operationsByResource.set(resourceName, [...(operationsByResource.get(resourceName) ?? []), { path, method, operation }]);\n }\n }\n\n const pageSlugByFragment: Record<string, string> = {};\n const claim = (fragment: string, slug: string): void => {\n const owner = pageSlugByFragment[fragment];\n if (owner !== undefined && owner !== slug) throw new Error(`API-reference page plan: fragment '${fragment}' belongs to two pages ('${owner}', '${slug}')`);\n pageSlugByFragment[fragment] = slug;\n };\n const slugByResource = new Map<string, string>();\n const pages: ApiReferenceResourcePage[] = [];\n const indexPaths: Record<string, JsonRecord> = {};\n\n for (const resourceName of [...operationsByResource.keys()].sort((left, right) => left.localeCompare(right))) {\n const slug = apiReferenceResourcePageSlug(resourceName);\n if (RESERVED_PAGE_SLUGS.has(slug)) throw new Error(`API-reference page plan: resource '${resourceName}' would shadow the reserved route '${slug}'`);\n const clash = [...slugByResource.entries()].find(([, existing]) => existing === slug);\n if (clash !== undefined) throw new Error(`API-reference page plan: resources '${clash[0]}' and '${resourceName}' share the page '${slug}'`);\n slugByResource.set(resourceName, slug);\n\n const paths: Record<string, JsonRecord> = {};\n claim(apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESOURCE, resourceName }), slug);\n for (const { path, method, operation } of operationsByResource.get(resourceName)!) {\n paths[path] = { ...(paths[path] ?? {}), [method]: operation };\n indexPaths[path] = { ...(indexPaths[path] ?? {}), [method]: indexOperation(operation) };\n const operationId = String(operation.operationId);\n claim(apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.OPERATION_FAMILY, resourceName, operationName: familyNameOf(operation) }), slug);\n claim(apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.OPERATION, operationId }), slug);\n if (isRecord(operation.requestBody)) claim(apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.REQUEST, operationId }), slug);\n for (const status of Object.keys(isRecord(operation.responses) ? operation.responses : {})) {\n claim(apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESPONSE, operationId, status }), slug);\n }\n }\n const closure = componentClosure(paths, components);\n // A reusable schema lives on the first page (by slug) that reaches it; later pages link to it there.\n for (const schemaName of Object.keys(closure.schemas)) {\n const fragment = apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.COMPONENT_SCHEMA, schemaName });\n if (pageSlugByFragment[fragment] === undefined) pageSlugByFragment[fragment] = slug;\n }\n pages.push({\n slug,\n resourceName,\n document: {\n openapi: document.openapi,\n ...(isRecord(document.info) ? { info: { title: document.info.title, version: document.info.version } } : {}),\n ...(document.servers === undefined ? {} : { servers: document.servers }),\n // Every tag, so a relationship to another resource is labelled by that resource's own name.\n ...(document.tags === undefined ? {} : { tags: document.tags }),\n paths,\n components: {\n schemas: closure.schemas,\n ...(Object.keys(closure.responses).length > 0 ? { responses: closure.responses } : {}),\n ...(components.securitySchemes === undefined ? {} : { securitySchemes: components.securitySchemes }),\n },\n },\n });\n }\n\n return {\n indexDocument: {\n openapi: document.openapi,\n ...(document.info === undefined ? {} : { info: document.info }),\n ...(document.servers === undefined ? {} : { servers: document.servers }),\n ...(document.tags === undefined ? {} : { tags: document.tags }),\n paths: indexPaths,\n components: components.securitySchemes === undefined ? {} : { securitySchemes: components.securitySchemes },\n },\n pages,\n pageSlugByFragment,\n };\n}\n\n/**\n * The page slug of `fragment`, reading a request or response fragment as its operation's\n * (`operation-x--response-200` lives wherever `operation-x` does). That lets a landing page carry the\n * map WITHOUT the request and response anchors, which were most of its bytes (572 KB of the 1.6 MB\n * Wonder Todos index, measured 2026-09-25): see `withoutOperationSubFragments`.\n */\nexport function apiReferencePageSlugForFragment(fragment: string, pageSlugByFragment: Readonly<Record<string, string>>): string | undefined {\n return pageSlugByFragment[fragment] ?? pageSlugByFragment[fragment.replace(/--(request|response-[a-z0-9-]+)$/, '')];\n}\n\n/** The fragment map without request and response anchors, which `apiReferencePageSlugForFragment` derives. */\nexport function withoutOperationSubFragments(pageSlugByFragment: Readonly<Record<string, string>>): Readonly<Record<string, string>> {\n return Object.fromEntries(Object.entries(pageSlugByFragment).filter(([fragment]) => !/^operation-.+--(request|response-[a-z0-9-]+)$/.test(fragment)));\n}\n\n/**\n * The href of a public fragment in a section whose resources have pages: the resource page when the\n * fragment lives on one (`/api/tasks#operation-create-task`), the section root otherwise (a category\n * lives on the index). A resource's own fragment is its page, with no fragment.\n */\nexport function apiReferencePageHref(sectionRootPath: string, fragment: string, plan: Pick<ApiReferencePagePlan, 'pageSlugByFragment'>): string {\n const slug = apiReferencePageSlugForFragment(fragment, plan.pageSlugByFragment);\n if (slug === undefined) return `${sectionRootPath}#${fragment}`;\n return fragment === `resource-${slug}` ? `${sectionRootPath}/${slug}` : `${sectionRootPath}/${slug}#${fragment}`;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"api-reference-pages.js","sourceRoot":"","sources":["../../../src/openapi/api-reference-pages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;A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C,EAAE,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,UAAU,CAAC,eAAe,EAAE;SAC5G;QACD,KAAK;QACL,kBAAkB;KACnB,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,+BAA+B,CAAC,QAAgB,EAAE,kBAAoD;IACpH,OAAO,kBAAkB,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,kCAAkC,EAAE,EAAE,CAAC,CAAC,CAAC;AACtH,CAAC;AAED,8GAA8G;AAC9G,MAAM,UAAU,4BAA4B,CAAC,kBAAoD;IAC/F,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,+CAA+C,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AACxJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,eAAuB,EAAE,QAAgB,EAAE,IAAsD;IACpI,MAAM,IAAI,GAAG,+BAA+B,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChF,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,GAAG,eAAe,IAAI,QAAQ,EAAE,CAAC;IAChE,OAAO,QAAQ,KAAK,YAAY,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,eAAe,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,eAAe,IAAI,IAAI,IAAI,QAAQ,EAAE,CAAC;AACnH,CAAC","sourcesContent":["/**\n * A page per resource for the API reference, instead of one client-rendered route (#1623).\n *\n * The reference was one route that downloaded and parsed the whole published document on every\n * visit — 9,650,190 bytes for Wonder Todos, measured 2026-09-25 — and addressed every resource,\n * operation and response by `#fragment` state on a ~10,000 px page. Nothing had a page of its own, so\n * nothing had static HTML: not for a reader without JavaScript, not for print, not for the site's\n * search index.\n *\n * This module splits one verified OpenAPI document into what a statically built portal serves:\n *\n * - one PAGE per resource (`/api/<slug>`), carrying that resource's operations and ONLY the\n * components they reach, so a page is complete on its own;\n * - one light INDEX document for the section root: every tag, and every operation reduced to its\n * identity and access, which is all the category grid and the in-page search read;\n * - the map from every public fragment to the page it now lives on, so a link written for the\n * single-page reference (`/api#operation-…`) still reaches its target, and so the link index\n * builds guide links from the same answer.\n *\n * It is pure and imports nothing browser- or Node-specific, so the build plugin that registers the\n * routes and the publication step that writes guide links compute the same plan.\n */\n\nimport {\n ApiReferenceTargetKind,\n apiReferenceResourcePageSlug,\n apiReferenceTargetFragment,\n} from './api-reference-targets';\n\ntype JsonRecord = Record<string, unknown>;\n\nconst HTTP_METHODS: ReadonlySet<string> = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace']);\n\n/** Path segments the section roots already use; a resource page may never shadow one. */\nconst RESERVED_PAGE_SLUGS: ReadonlySet<string> = new Set(['application-administration']);\n\nconst isRecord = (value: unknown): value is JsonRecord => typeof value === 'object' && value !== null && !Array.isArray(value);\n\n/** One resource's page: its slug, its resource name, and the self-sufficient document it renders. */\nexport interface ApiReferenceResourcePage {\n readonly slug: string;\n readonly resourceName: string;\n readonly document: JsonRecord;\n}\n\nexport interface ApiReferencePagePlan {\n /** The section root's document: every tag, and every operation reduced to identity and access. */\n readonly indexDocument: JsonRecord;\n readonly pages: readonly ApiReferenceResourcePage[];\n /** Every public fragment that lives on a resource page, with that page's slug. */\n readonly pageSlugByFragment: Readonly<Record<string, string>>;\n}\n\nfunction resourceNameOf(operation: JsonRecord): string {\n const metadata = operation['x-wildo'];\n const resourceRef = isRecord(metadata) && typeof metadata.resourceRef === 'string' ? metadata.resourceRef : '';\n const name = resourceRef.match(/^technical-documentation:resource\\/([^/]+)$/)?.[1];\n if (name === undefined) throw new Error(`API-reference page plan: operation '${String(operation.operationId)}' has no canonical resource identity`);\n return name;\n}\n\nfunction familyNameOf(operation: JsonRecord): string {\n const metadata = operation['x-wildo'];\n const familyRef = isRecord(metadata) && typeof metadata.operationFamilyRef === 'string' ? metadata.operationFamilyRef : '';\n const name = familyRef.match(/\\/operation-family\\/([^/]+)$/)?.[1];\n if (name === undefined) throw new Error(`API-reference page plan: operation '${String(operation.operationId)}' has no canonical family identity`);\n return name;\n}\n\n/** Every `#/components/<kind>/<name>` reference in `node`, recursively. */\nfunction collectReferences(node: unknown, into: Set<string>): void {\n if (Array.isArray(node)) {\n for (const entry of node) collectReferences(entry, into);\n return;\n }\n if (!isRecord(node)) return;\n if (typeof node.$ref === 'string' && node.$ref.startsWith('#/components/')) into.add(node.$ref);\n for (const value of Object.values(node)) collectReferences(value, into);\n}\n\n/**\n * The components a set of operations reaches, closed transitively: a schema that references another\n * schema brings it along, and a shared response brings the schema its body names.\n */\nfunction componentClosure(paths: JsonRecord, components: JsonRecord): { readonly schemas: JsonRecord; readonly responses: JsonRecord } {\n const componentSchemas = isRecord(components.schemas) ? components.schemas : {};\n const componentResponses = isRecord(components.responses) ? components.responses : {};\n const pending = new Set<string>();\n collectReferences(paths, pending);\n const schemas: JsonRecord = {};\n const responses: JsonRecord = {};\n const visited = new Set<string>();\n while (pending.size > 0) {\n const [reference] = pending;\n pending.delete(reference!);\n if (visited.has(reference!)) continue;\n visited.add(reference!);\n const [, kind, name] = reference!.match(/^#\\/components\\/([^/]+)\\/(.+)$/) ?? [];\n const target = kind === 'schemas' ? componentSchemas[name!] : kind === 'responses' ? componentResponses[name!] : undefined;\n if (target === undefined) continue;\n if (kind === 'schemas') schemas[name!] = target;\n else responses[name!] = target;\n const more = new Set<string>();\n collectReferences(target, more);\n for (const next of more) if (!visited.has(next)) pending.add(next);\n }\n return { schemas, responses };\n}\n\n/**\n * An operation as the index needs it: identity, summary, method, path and access — the fields the\n * category grid and the in-page search read. Parameters, bodies and responses stay on the page, and\n * so does the role prose (the index shows role LABELS), which is most of an operation's weight.\n */\nfunction indexOperation(operation: JsonRecord): JsonRecord {\n const metadata = isRecord(operation['x-wildo']) ? operation['x-wildo'] : {};\n const access = isRecord(metadata.access) ? metadata.access : {};\n const roleRequirements = Array.isArray(access.roleRequirements)\n ? access.roleRequirements.map((requirement) => (isRecord(requirement) ? { role: requirement.role, label: requirement.label } : requirement))\n : [];\n return {\n operationId: operation.operationId,\n ...(operation.summary === undefined ? {} : { summary: operation.summary }),\n ...(operation.tags === undefined ? {} : { tags: operation.tags }),\n ...(operation.security === undefined ? {} : { security: operation.security }),\n 'x-wildo': {\n resourceRef: metadata.resourceRef,\n operationFamilyRef: metadata.operationFamilyRef,\n operationVariantRef: metadata.operationVariantRef,\n path: metadata.path,\n httpVerb: metadata.httpVerb,\n ...(metadata.aliasOfPath === undefined ? {} : { aliasOfPath: metadata.aliasOfPath }),\n access: { authenticationMode: access.authenticationMode, authenticationSummary: access.authenticationSummary, roleRequirements },\n },\n };\n}\n\n/** Split one verified OpenAPI document into resource pages, an index, and the fragment → page map. */\nexport function buildApiReferencePagePlan(document: unknown): ApiReferencePagePlan {\n if (!isRecord(document) || !isRecord(document.paths)) throw new Error('API-reference page plan: document has no OpenAPI paths object');\n const components = isRecord(document.components) ? document.components : {};\n\n const operationsByResource = new Map<string, Array<{ readonly path: string; readonly method: string; readonly operation: JsonRecord }>>();\n for (const [path, pathItem] of Object.entries(document.paths)) {\n if (!isRecord(pathItem)) continue;\n for (const [method, operation] of Object.entries(pathItem)) {\n if (!HTTP_METHODS.has(method) || !isRecord(operation)) continue;\n const resourceName = resourceNameOf(operation);\n operationsByResource.set(resourceName, [...(operationsByResource.get(resourceName) ?? []), { path, method, operation }]);\n }\n }\n\n const pageSlugByFragment: Record<string, string> = {};\n const claim = (fragment: string, slug: string): void => {\n const owner = pageSlugByFragment[fragment];\n if (owner !== undefined && owner !== slug) throw new Error(`API-reference page plan: fragment '${fragment}' belongs to two pages ('${owner}', '${slug}')`);\n pageSlugByFragment[fragment] = slug;\n };\n const slugByResource = new Map<string, string>();\n const pages: ApiReferenceResourcePage[] = [];\n const indexPaths: Record<string, JsonRecord> = {};\n\n for (const resourceName of [...operationsByResource.keys()].sort((left, right) => left.localeCompare(right))) {\n const slug = apiReferenceResourcePageSlug(resourceName);\n if (RESERVED_PAGE_SLUGS.has(slug)) throw new Error(`API-reference page plan: resource '${resourceName}' would shadow the reserved route '${slug}'`);\n const clash = [...slugByResource.entries()].find(([, existing]) => existing === slug);\n if (clash !== undefined) throw new Error(`API-reference page plan: resources '${clash[0]}' and '${resourceName}' share the page '${slug}'`);\n slugByResource.set(resourceName, slug);\n\n const paths: Record<string, JsonRecord> = {};\n claim(apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESOURCE, resourceName }), slug);\n for (const { path, method, operation } of operationsByResource.get(resourceName)!) {\n paths[path] = { ...(paths[path] ?? {}), [method]: operation };\n indexPaths[path] = { ...(indexPaths[path] ?? {}), [method]: indexOperation(operation) };\n const operationId = String(operation.operationId);\n claim(apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.OPERATION_FAMILY, resourceName, operationName: familyNameOf(operation) }), slug);\n claim(apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.OPERATION, operationId }), slug);\n if (isRecord(operation.requestBody)) claim(apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.REQUEST, operationId }), slug);\n for (const status of Object.keys(isRecord(operation.responses) ? operation.responses : {})) {\n claim(apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESPONSE, operationId, status }), slug);\n }\n }\n const closure = componentClosure(paths, components);\n // A reusable schema lives on the first page (by slug) that reaches it; later pages link to it there.\n for (const schemaName of Object.keys(closure.schemas)) {\n const fragment = apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.COMPONENT_SCHEMA, schemaName });\n if (pageSlugByFragment[fragment] === undefined) pageSlugByFragment[fragment] = slug;\n }\n pages.push({\n slug,\n resourceName,\n document: {\n openapi: document.openapi,\n ...(isRecord(document.info) ? { info: { title: document.info.title, version: document.info.version } } : {}),\n ...(document.servers === undefined ? {} : { servers: document.servers }),\n // Every tag, so a relationship to another resource is labelled by that resource's own name.\n ...(document.tags === undefined ? {} : { tags: document.tags }),\n paths,\n components: {\n schemas: closure.schemas,\n ...(Object.keys(closure.responses).length > 0 ? { responses: closure.responses } : {}),\n ...(components.securitySchemes === undefined ? {} : { securitySchemes: components.securitySchemes }),\n },\n },\n });\n }\n\n return {\n indexDocument: {\n openapi: document.openapi,\n ...(document.info === undefined ? {} : { info: document.info }),\n ...(document.servers === undefined ? {} : { servers: document.servers }),\n ...(document.tags === undefined ? {} : { tags: document.tags }),\n paths: indexPaths,\n components: components.securitySchemes === undefined ? {} : { securitySchemes: components.securitySchemes },\n },\n pages,\n pageSlugByFragment,\n };\n}\n\n/**\n * The page slug of `fragment`, reading a request or response fragment as its operation's\n * (`operation-x--response-200` lives wherever `operation-x` does). That lets a landing page carry the\n * map WITHOUT the request and response anchors, which were most of its bytes (572 KB of the 1.6 MB\n * Wonder Todos index, measured 2026-09-25): see `withoutOperationSubFragments`.\n */\nexport function apiReferencePageSlugForFragment(fragment: string, pageSlugByFragment: Readonly<Record<string, string>>): string | undefined {\n return pageSlugByFragment[fragment] ?? pageSlugByFragment[fragment.replace(/--(request|response-[a-z0-9-]+)$/, '')];\n}\n\n/** The fragment map without request and response anchors, which `apiReferencePageSlugForFragment` derives. */\nexport function withoutOperationSubFragments(pageSlugByFragment: Readonly<Record<string, string>>): Readonly<Record<string, string>> {\n return Object.fromEntries(Object.entries(pageSlugByFragment).filter(([fragment]) => !/^operation-.+--(request|response-[a-z0-9-]+)$/.test(fragment)));\n}\n\n/**\n * The href of a public fragment in a section whose resources have pages: the resource page when the\n * fragment lives on one (`/api/tasks#operation-create-task`), the section root otherwise (a category\n * lives on the index). A resource's own fragment is its page, with no fragment.\n */\nexport function apiReferencePageHref(sectionRootPath: string, fragment: string, plan: Pick<ApiReferencePagePlan, 'pageSlugByFragment'>): string {\n const slug = apiReferencePageSlugForFragment(fragment, plan.pageSlugByFragment);\n if (slug === undefined) return `${sectionRootPath}#${fragment}`;\n return fragment === `resource-${slug}` ? `${sectionRootPath}/${slug}` : `${sectionRootPath}/${slug}#${fragment}`;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-reference-search.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"api-reference-search.d.ts","sourceRoot":"","sources":["../../../src/openapi/api-reference-search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAEhG,qCAAqC;AACrC,oBAAY,2BAA2B;IACrC,wEAAwE;IACxE,QAAQ,aAAa;IACrB,sDAAsD;IACtD,SAAS,cAAc;CACxB;AAED,sGAAsG;AACtG,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAGjF,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8FAA8F;IAC9F,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,8FAA8F;IAC9F,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,aAAa,EAAE,CAAC,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,KAAK,MAAM,OAAO,IAAI,MAAM,EAAE,CAAC;oBAC7B,OAAO,CAAC,IAAI,CAAC;wBACX,IAAI,EAAE,2BAA2B,CAAC,SAAS;wBAC3C,KAAK,EAAE,OAAO,CAAC,OAAO;wBACtB,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC;wBAC3C,OAAO;wBACP,YAAY;wBACZ,aAAa,EAAE,QAAQ,CAAC,KAAK;wBAC7B,WAAW,EAAE,MAAM,CAAC,KAAK;wBACzB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE;wBACpC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;wBAC5C,IAAI,EAAE,oBAAoB,CAAC,eAAe,EAAE,0BAA0B,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC;qBAC5J,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC;AACvC,CAAC","sourcesContent":["/**\n * The API reference's entries in the portal's site search (#1624).\n *\n * The site search read only the consumer-documentation prose units, so a reader who typed an\n * endpoint — `assign task`, `/tasks/{taskId}/assign` — into the search box found nothing, and the\n * reference's own in-page filter worked only on `/api`, one section at a time.\n *\n * The entries are derived from the SAME verified OpenAPI documents the reference renders, through\n * the same model and the same page plan, so a search result links to the page and anchor the\n * reference actually serves and cannot describe an operation the reference does not show.\n *\n * Pure, and free of browser- and Node-specific imports, like the page plan it reads.\n */\n\nimport { createApiReferenceModel, type ApiReferenceVariant } from '../runtime/openapi-reference-model';\nimport { apiReferenceRouteForSection } from './api-reference-link-index';\nimport { apiReferencePageHref, buildApiReferencePagePlan } from './api-reference-pages';\nimport { ApiReferenceTargetKind, apiReferenceTargetFragment, applicationConsumerDocumentationRoutePath } from './api-reference-targets';\nimport { OpenApiSection, type OpenApiSectionOutput } from './openapi-generation-output.schemas';\n\n/** What a search entry points at. */\nexport enum ApiReferenceSearchEntryKind {\n /** A resource's own page: its description and every operation on it. */\n RESOURCE = 'RESOURCE',\n /** One operation, with every path that reaches it. */\n OPERATION = 'OPERATION',\n}\n\n/** The heading each section's pages carry, shown beside a result so two sections never read alike. */\nexport const API_REFERENCE_SECTION_TITLES: Readonly<Record<OpenApiSection, string>> = {\n [OpenApiSection.API_REFERENCE]: 'API reference',\n [OpenApiSection.APPLICATION_ADMINISTRATION_API_REFERENCE]: 'Application administration API reference',\n};\n\nexport interface ApiReferenceSearchEntry {\n readonly kind: ApiReferenceSearchEntryKind;\n readonly title: string;\n /** The first paragraph of the description, shortened; `null` when the document gives none. */\n readonly summary: string | null;\n readonly section: OpenApiSection;\n readonly sectionTitle: string;\n readonly resourceLabel: string;\n /** The operation family (`Read`, `Assign`…); `null` on a resource entry. */\n readonly familyLabel: string | null;\n /** Upper-case HTTP method; `null` on a resource entry. */\n readonly method: string | null;\n /** The operation's canonical path first, then every alias that reaches the same operation. */\n readonly paths: readonly string[];\n /** The page, and on it the anchor, the reference serves this entry at. */\n readonly href: string;\n}\n\nexport interface ApiReferenceSearchIndex {\n readonly schemaVersion: 1;\n readonly entries: readonly ApiReferenceSearchEntry[];\n}\n\n/** Bounds one summary, so a long description cannot make the index the size of the document. */\nconst SUMMARY_CHARACTER_LIMIT = 240;\n\nfunction searchSummary(description: string | null): string | null {\n const paragraph = description?.trim().split(/\\n\\s*\\n/u)[0]?.replace(/\\s+/gu, ' ').trim() ?? '';\n if (paragraph.length === 0) return null;\n return paragraph.length <= SUMMARY_CHARACTER_LIMIT ? paragraph : `${paragraph.slice(0, SUMMARY_CHARACTER_LIMIT - 1).trimEnd()}…`;\n}\n\nfunction resourceNameOf(resourceRef: string): string {\n const name = resourceRef.match(/^technical-documentation:resource\\/([^/]+)$/u)?.[1];\n if (name === undefined) throw new Error(`API-reference search: resource '${resourceRef}' has no canonical resource identity`);\n return name;\n}\n\n/**\n * One entry per resource and one per operation, across every published section.\n *\n * An alias variant (`aliasOfPath` set) is not an entry of its own: the reference shows it under its\n * canonical operation, so its path joins that operation's `paths`, and searching the alias lands\n * where the reference puts it. An alias whose canonical operation is absent keeps an entry of its own.\n */\nexport function buildApiReferenceSearchIndex(sections: readonly Pick<OpenApiSectionOutput, 'section' | 'document'>[]): ApiReferenceSearchIndex {\n const entries: ApiReferenceSearchEntry[] = [];\n for (const { section, document } of sections) {\n const model = createApiReferenceModel(document);\n const plan = buildApiReferencePagePlan(document);\n const sectionRootPath = applicationConsumerDocumentationRoutePath(apiReferenceRouteForSection(section));\n const sectionTitle = API_REFERENCE_SECTION_TITLES[section];\n for (const resource of model.resources) {\n const resourceName = resourceNameOf(resource.resourceRef);\n entries.push({\n kind: ApiReferenceSearchEntryKind.RESOURCE,\n title: resource.label,\n summary: searchSummary(resource.description),\n section,\n sectionTitle,\n resourceLabel: resource.label,\n familyLabel: null,\n method: null,\n paths: [],\n href: apiReferencePageHref(sectionRootPath, apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESOURCE, resourceName }), plan),\n });\n for (const family of resource.families) {\n const aliasesOf = (canonical: ApiReferenceVariant): readonly string[] => family.variants\n .filter((variant) => variant.aliasOfPath === canonical.path && variant.method === canonical.method)\n .map((variant) => variant.path);\n const canonicalKeys = new Set(family.variants.filter((variant) => variant.aliasOfPath === null).map((variant) => `${variant.method} ${variant.path}`));\n // An alias whose canonical operation is not in this family has nothing to join, so it stands alone.\n const listed = family.variants.filter((variant) => variant.aliasOfPath === null || !canonicalKeys.has(`${variant.method} ${variant.aliasOfPath}`));\n for (const variant of listed) {\n entries.push({\n kind: ApiReferenceSearchEntryKind.OPERATION,\n title: variant.summary,\n summary: searchSummary(variant.description),\n section,\n sectionTitle,\n resourceLabel: resource.label,\n familyLabel: family.label,\n method: variant.method.toUpperCase(),\n paths: [variant.path, ...aliasesOf(variant)],\n href: apiReferencePageHref(sectionRootPath, apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.OPERATION, operationId: variant.operationId }), plan),\n });\n }\n }\n }\n }\n return { schemaVersion: 1, entries };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"api-reference-search.js","sourceRoot":"","sources":["../../../src/openapi/api-reference-search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,uBAAuB,EAA4B,MAAM,oCAAoC,CAAC;AACvG,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,yCAAyC,EAAE,MAAM,yBAAyB,CAAC;AACxI,OAAO,EAAE,cAAc,EAA6B,MAAM,qCAAqC,CAAC;AAEhG,qCAAqC;AACrC,MAAM,CAAN,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACrC,wEAAwE;IACxE,oDAAqB,CAAA;IACrB,sDAAsD;IACtD,sDAAuB,CAAA;AACzB,CAAC,EALW,2BAA2B,KAA3B,2BAA2B,QAKtC;AAED,sGAAsG;AACtG,MAAM,CAAC,MAAM,4BAA4B,GAA6C;IACpF,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,eAAe;IAC/C,CAAC,cAAc,CAAC,wCAAwC,CAAC,EAAE,0CAA0C;CACtG,CAAC;AAyBF,gGAAgG;AAChG,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAEpC,SAAS,aAAa,CAAC,WAA0B;IAC/C,MAAM,SAAS,GAAG,WAAW,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;IAC/F,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,O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2BAA2B,CAAC,SAAS;wBAC3C,KAAK,EAAE,OAAO,CAAC,OAAO;wBACtB,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC;wBAC3C,OAAO;wBACP,YAAY;wBACZ,aAAa,EAAE,QAAQ,CAAC,KAAK;wBAC7B,WAAW,EAAE,MAAM,CAAC,KAAK;wBACzB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE;wBACpC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;wBAC5C,IAAI,EAAE,oBAAoB,CAAC,eAAe,EAAE,0BAA0B,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC;qBAC5J,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC;AACvC,CAAC","sourcesContent":["/**\n * The API reference's entries in the portal's site search (#1624).\n *\n * The site search read only the consumer-documentation prose units, so a reader who typed an\n * endpoint — `assign task`, `/tasks/{taskId}/assign` — into the search box found nothing, and the\n * reference's own in-page filter worked only on `/api`, one section at a time.\n *\n * The entries are derived from the SAME verified OpenAPI documents the reference renders, through\n * the same model and the same page plan, so a search result links to the page and anchor the\n * reference actually serves and cannot describe an operation the reference does not show.\n *\n * Pure, and free of browser- and Node-specific imports, like the page plan it reads.\n */\n\nimport { createApiReferenceModel, type ApiReferenceVariant } from '../runtime/openapi-reference-model';\nimport { apiReferenceRouteForSection } from './api-reference-link-index';\nimport { apiReferencePageHref, buildApiReferencePagePlan } from './api-reference-pages';\nimport { ApiReferenceTargetKind, apiReferenceTargetFragment, applicationConsumerDocumentationRoutePath } from './api-reference-targets';\nimport { OpenApiSection, type OpenApiSectionOutput } from './openapi-generation-output.schemas';\n\n/** What a search entry points at. */\nexport enum ApiReferenceSearchEntryKind {\n /** A resource's own page: its description and every operation on it. */\n RESOURCE = 'RESOURCE',\n /** One operation, with every path that reaches it. */\n OPERATION = 'OPERATION',\n}\n\n/** The heading each section's pages carry, shown beside a result so two sections never read alike. */\nexport const API_REFERENCE_SECTION_TITLES: Readonly<Record<OpenApiSection, string>> = {\n [OpenApiSection.API_REFERENCE]: 'API reference',\n [OpenApiSection.APPLICATION_ADMINISTRATION_API_REFERENCE]: 'Application administration API reference',\n};\n\nexport interface ApiReferenceSearchEntry {\n readonly kind: ApiReferenceSearchEntryKind;\n readonly title: string;\n /** The first paragraph of the description, shortened; `null` when the document gives none. */\n readonly summary: string | null;\n readonly section: OpenApiSection;\n readonly sectionTitle: string;\n readonly resourceLabel: string;\n /** The operation family (`Read`, `Assign`…); `null` on a resource entry. */\n readonly familyLabel: string | null;\n /** Upper-case HTTP method; `null` on a resource entry. */\n readonly method: string | null;\n /** The operation's canonical path first, then every alias that reaches the same operation. */\n readonly paths: readonly string[];\n /** The page, and on it the anchor, the reference serves this entry at. */\n readonly href: string;\n}\n\nexport interface ApiReferenceSearchIndex {\n readonly schemaVersion: 1;\n readonly entries: readonly ApiReferenceSearchEntry[];\n}\n\n/** Bounds one summary, so a long description cannot make the index the size of the document. */\nconst SUMMARY_CHARACTER_LIMIT = 240;\n\nfunction searchSummary(description: string | null): string | null {\n const paragraph = description?.trim().split(/\\n\\s*\\n/u)[0]?.replace(/\\s+/gu, ' ').trim() ?? '';\n if (paragraph.length === 0) return null;\n return paragraph.length <= SUMMARY_CHARACTER_LIMIT ? paragraph : `${paragraph.slice(0, SUMMARY_CHARACTER_LIMIT - 1).trimEnd()}…`;\n}\n\nfunction resourceNameOf(resourceRef: string): string {\n const name = resourceRef.match(/^technical-documentation:resource\\/([^/]+)$/u)?.[1];\n if (name === undefined) throw new Error(`API-reference search: resource '${resourceRef}' has no canonical resource identity`);\n return name;\n}\n\n/**\n * One entry per resource and one per operation, across every published section.\n *\n * An alias variant (`aliasOfPath` set) is not an entry of its own: the reference shows it under its\n * canonical operation, so its path joins that operation's `paths`, and searching the alias lands\n * where the reference puts it. An alias whose canonical operation is absent keeps an entry of its own.\n */\nexport function buildApiReferenceSearchIndex(sections: readonly Pick<OpenApiSectionOutput, 'section' | 'document'>[]): ApiReferenceSearchIndex {\n const entries: ApiReferenceSearchEntry[] = [];\n for (const { section, document } of sections) {\n const model = createApiReferenceModel(document);\n const plan = buildApiReferencePagePlan(document);\n const sectionRootPath = applicationConsumerDocumentationRoutePath(apiReferenceRouteForSection(section));\n const sectionTitle = API_REFERENCE_SECTION_TITLES[section];\n for (const resource of model.resources) {\n const resourceName = resourceNameOf(resource.resourceRef);\n entries.push({\n kind: ApiReferenceSearchEntryKind.RESOURCE,\n title: resource.label,\n summary: searchSummary(resource.description),\n section,\n sectionTitle,\n resourceLabel: resource.label,\n familyLabel: null,\n method: null,\n paths: [],\n href: apiReferencePageHref(sectionRootPath, apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESOURCE, resourceName }), plan),\n });\n for (const family of resource.families) {\n const aliasesOf = (canonical: ApiReferenceVariant): readonly string[] => family.variants\n .filter((variant) => variant.aliasOfPath === canonical.path && variant.method === canonical.method)\n .map((variant) => variant.path);\n const canonicalKeys = new Set(family.variants.filter((variant) => variant.aliasOfPath === null).map((variant) => `${variant.method} ${variant.path}`));\n // An alias whose canonical operation is not in this family has nothing to join, so it stands alone.\n const listed = family.variants.filter((variant) => variant.aliasOfPath === null || !canonicalKeys.has(`${variant.method} ${variant.aliasOfPath}`));\n for (const variant of listed) {\n entries.push({\n kind: ApiReferenceSearchEntryKind.OPERATION,\n title: variant.summary,\n summary: searchSummary(variant.description),\n section,\n sectionTitle,\n resourceLabel: resource.label,\n familyLabel: family.label,\n method: variant.method.toUpperCase(),\n paths: [variant.path, ...aliasesOf(variant)],\n href: apiReferencePageHref(sectionRootPath, apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.OPERATION, operationId: variant.operationId }), plan),\n });\n }\n }\n }\n }\n return { schemaVersion: 1, entries };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-reference-targets.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"api-reference-targets.d.ts","sourceRoot":"","sources":["../../../src/openapi/api-reference-targets.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,mFAAmF;AACnF,oBAAY,qCAAqC;IAC/C,WAAW,gBAAgB;IAC3B,mBAAmB,wBAAwB;IAC3C,mBAAmB,wBAAwB;IAC3C,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,wCAAwC,6CAA6C;CACtF;AAED,wFAAwF;AACxF,oBAAY,sBAAsB;IAChC,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,gBAAgB,qBAAqB;IACrC,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,gBAAgB,qBAAqB;CACtC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAChC;IAAE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC,QAAQ,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC,QAAQ,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC,gBAAgB,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACzH;IAAE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC,SAAS,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC,OAAO,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAC/E;IAAE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC,QAAQ,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACzG;IAAE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC,gBAAgB,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5F,+EAA+E;AAC/E,wBAAgB,yCAAyC,CAAC,KAAK,EAAE,qCAAqC,GAAG,MAAM,CAmB9G;AAED;;;;;GAKG;AACH,wBAAgB,0CAA0C,CACxD,KAAK,EAAE,qCAAqC,EAC5C,MAAM,CAAC,EAAE,wBAAwB,GAChC,MAAM,CAQR;AAED,0EAA0E;AAC1E,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,CAqBnF;AAED;;;;GAIG;AACH;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-reference-targets.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"api-reference-targets.js","sourceRoot":"","sources":["../../../src/openapi/api-reference-targets.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,mFAAmF;AACnF,MAAM,CAAN,IAAY,qCAOX;AAPD,WAAY,qCAAqC;IAC/C,oEAA2B,CAAA;IAC3B,oFAA2C,CAAA;IAC3C,oFAA2C,CAAA;IAC3C,sEAA6B,CAAA;IAC7B,wEAA+B,CAAA;IAC/B,8HAAqF,CAAA;AACvF,CAAC,EAPW,qCAAqC,KAArC,qCAAqC,QAOhD;AAED,wFAAwF;AACxF,MAAM,CAAN,IAAY,sBAQX;AARD,WAAY,sBAAsB;IAChC,+CAAqB,CAAA;IACrB,+CAAqB,CAAA;IACrB,+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KAAa;IACzC,IAAI,OAAe,CAAC;IACpB,IAAI,CAAC;QACH,OAAO,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,8DAA8D,KAAK,GAAG,CAAC,CAAC;IAC1F,CAAC;IACD,MAAM,UAAU,GAAG,OAAO;SACvB,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC;SACzC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC;SACxB,WAAW,EAAE,CAAC;IACjB,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,KAAK,CAAC,8DAA8D,KAAK,GAAG,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["/**\n * Public API-reference targets and fragments.\n *\n * Source documentation refers to semantic API identities; the generated\n * reference resolves those identities into these readable public fragments.\n * Do not use OpenAPI array positions, encoded internal refs, or a hand-built\n * URL as a cross-document target: each of those changes for reasons unrelated\n * to the consumer contract.\n */\n\n/** Stable portal roots owned by the application-consumer documentation product. */\nexport enum ApplicationConsumerDocumentationRoute {\n GET_STARTED = 'GET_STARTED',\n ACCESS_AND_IDENTITY = 'ACCESS_AND_IDENTITY',\n USER_ADMINISTRATION = 'USER_ADMINISTRATION',\n INTEGRATIONS = 'INTEGRATIONS',\n API_REFERENCE = 'API_REFERENCE',\n APPLICATION_ADMINISTRATION_API_REFERENCE = 'APPLICATION_ADMINISTRATION_API_REFERENCE',\n}\n\n/** The public contract part a documentation link can target inside an API reference. */\nexport enum ApiReferenceTargetKind {\n CATEGORY = 'CATEGORY',\n RESOURCE = 'RESOURCE',\n OPERATION_FAMILY = 'OPERATION_FAMILY',\n OPERATION = 'OPERATION',\n REQUEST = 'REQUEST',\n RESPONSE = 'RESPONSE',\n COMPONENT_SCHEMA = 'COMPONENT_SCHEMA',\n}\n\n/**\n * Readable identity material used only to construct a public fragment.\n *\n * A later generated link index maps canonical `x-wildo` identities to this\n * shape. Keeping the public shape separate stops an internal namespaced ref\n * from leaking into copied URLs while retaining an exact resolver boundary.\n */\nexport type ApiReferencePublicTarget =\n | { readonly kind: ApiReferenceTargetKind.CATEGORY; readonly categoryName: string }\n | { readonly kind: ApiReferenceTargetKind.RESOURCE; readonly resourceName: string }\n | { readonly kind: ApiReferenceTargetKind.OPERATION_FAMILY; readonly resourceName: string; readonly operationName: string }\n | { readonly kind: ApiReferenceTargetKind.OPERATION; readonly operationId: string }\n | { readonly kind: ApiReferenceTargetKind.REQUEST; readonly operationId: string }\n | { readonly kind: ApiReferenceTargetKind.RESPONSE; readonly operationId: string; readonly status: string }\n | { readonly kind: ApiReferenceTargetKind.COMPONENT_SCHEMA; readonly schemaName: string };\n\n/** Resolves a stable, human-readable route path for a built-in portal root. */\nexport function applicationConsumerDocumentationRoutePath(route: ApplicationConsumerDocumentationRoute): string {\n switch (route) {\n case ApplicationConsumerDocumentationRoute.GET_STARTED:\n return '/get-started';\n case ApplicationConsumerDocumentationRoute.ACCESS_AND_IDENTITY:\n return '/access-and-identity';\n case ApplicationConsumerDocumentationRoute.USER_ADMINISTRATION:\n return '/user-administration';\n case ApplicationConsumerDocumentationRoute.INTEGRATIONS:\n return '/integrations';\n case ApplicationConsumerDocumentationRoute.API_REFERENCE:\n return '/api';\n case ApplicationConsumerDocumentationRoute.APPLICATION_ADMINISTRATION_API_REFERENCE:\n return '/api/application-administration';\n default: {\n const exhaustiveRoute: never = route;\n throw new Error(`Unsupported application-consumer documentation route: ${String(exhaustiveRoute)}`);\n }\n }\n}\n\n/**\n * Resolves a relative documentation URL suitable for prefixing with an\n * application-owned docs base URL. API contract targets are deliberately\n * confined to an API-reference root: a guide cannot silently become a second\n * endpoint-reference renderer merely by carrying an API fragment.\n */\nexport function applicationConsumerDocumentationTargetPath(\n route: ApplicationConsumerDocumentationRoute,\n target?: ApiReferencePublicTarget,\n): string {\n const routePath = applicationConsumerDocumentationRoutePath(route);\n if (target === undefined) return routePath;\n if (route !== ApplicationConsumerDocumentationRoute.API_REFERENCE\n && route !== ApplicationConsumerDocumentationRoute.APPLICATION_ADMINISTRATION_API_REFERENCE) {\n throw new Error(`Documentation route '${route}' cannot target an API-reference contract`);\n }\n return `${routePath}#${apiReferenceTargetFragment(target)}`;\n}\n\n/** Produces a readable fragment for one API-reference contract target. */\nexport function apiReferenceTargetFragment(target: ApiReferencePublicTarget): string {\n switch (target.kind) {\n case ApiReferenceTargetKind.CATEGORY:\n return `category-${readableFragmentPart(target.categoryName)}`;\n case ApiReferenceTargetKind.RESOURCE:\n return `resource-${readableFragmentPart(target.resourceName)}`;\n case ApiReferenceTargetKind.OPERATION_FAMILY:\n return `resource-${readableFragmentPart(target.resourceName)}--operation-${readableFragmentPart(target.operationName)}`;\n case ApiReferenceTargetKind.OPERATION:\n return `operation-${readableFragmentPart(target.operationId)}`;\n case ApiReferenceTargetKind.REQUEST:\n return `operation-${readableFragmentPart(target.operationId)}--request`;\n case ApiReferenceTargetKind.RESPONSE:\n return `operation-${readableFragmentPart(target.operationId)}--response-${readableFragmentPart(target.status)}`;\n case ApiReferenceTargetKind.COMPONENT_SCHEMA:\n return `schema-${readableFragmentPart(target.schemaName)}`;\n default: {\n const exhaustiveTarget: never = target;\n throw new Error(`Unsupported API-reference target: ${JSON.stringify(exhaustiveTarget)}`);\n }\n }\n}\n\n/**\n * Converts a declared identifier to public URL vocabulary without silently\n * accepting arbitrary punctuation. The generated model separately rejects\n * collisions, so this readable form never needs an opaque digest suffix.\n */\n/**\n * The path segment of a resource's own API-reference page (`/api/<slug>`), #1623. It is the readable\n * part of the resource's fragment (`resource-<slug>`), so a page and the anchor that used to address\n * the same resource on the single-page reference can never name it differently.\n */\nexport function apiReferenceResourcePageSlug(resourceName: string): string {\n return readableFragmentPart(resourceName);\n}\n\nfunction readableFragmentPart(value: string): string {\n let decoded: string;\n try {\n decoded = decodeURIComponent(value);\n } catch {\n throw new Error(`API-reference public fragment cannot represent identifier '${value}'`);\n }\n const normalized = decoded\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')\n .replace(/[:_\\s]+/g, '-')\n .toLowerCase();\n if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(normalized)) {\n throw new Error(`API-reference public fragment cannot represent identifier '${value}'`);\n }\n return normalized;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/openapi/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/openapi/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC","sourcesContent":["/**\n * `@wildo-ai/saas-technical-doc` — OpenAPI generation surface.\n *\n * Schemas describing the output of the companion's OpenAPI generation route\n * (saas-technical-doc.md Steps 3 & 4). The generator IMPLEMENTATION lives\n * under `../companion/` and is re-exported via the package's `./companion`\n * subpath export. This sub-tree only ships the type-level contract so it is\n * safely consumable from:\n * - the companion (Node) — to populate the response shape;\n * - the docs site (browser, build-time) — to import the canonical output\n * filenames so the Docusaurus plugin config stays in lockstep;\n * - any CI tooling that needs to inspect a generated artefact.\n *\n * @wildo-boundary\n * No React, no `react-dom`, no Node `fs`/`path` imports. Pure schemas.\n */\n\nexport * from './openapi-generation-output.schemas';\nexport * from './api-reference-targets';\nexport * from './api-reference-link-index';\nexport * from './api-reference-pages';\nexport * from './api-reference-search';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi-generation-output.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"openapi-generation-output.schemas.d.ts","sourceRoot":"","sources":["../../../src/openapi/openapi-generation-output.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,oBAAY,cAAc;IACxB,0EAA0E;IAC1E,aAAa,kBAAkB;IAC/B,6EAA6E;IAC7E,wCAAwC,6CAA6C;CACtF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAS/G,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;;IAIrC;;;OAGG;;kBAEH,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,6BAA6B;IACxC,2DAA2D;;IAE3D,4EAA4E;;;;;QAxB5E;;;WAGG;;;kBAuBH,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi-reference-model.exports.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"openapi-reference-model.exports.d.ts","sourceRoot":"","sources":["../../src/openapi-reference-model.exports.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi-reference-model.exports.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"openapi-reference-model.exports.js","sourceRoot":"","sources":["../../src/openapi-reference-model.exports.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC","sourcesContent":["/**\n * Browser-safe and Node-safe OpenAPI reference-model entrypoint.\n *\n * Managed publication uses this narrow subpath to verify that the native\n * renderer conserves the generated OpenAPI inventory without importing the\n * React/auth runtime barrel. Docusaurus may consume the same projection.\n */\n\nexport * from './runtime/openapi-reference-model';\nexport * from './runtime/openapi-reference-navigation';\nexport * from './runtime/openapi-reference-conservation';\nexport * from './openapi/api-reference-pages';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthExchangePage.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"AuthExchangePage.d.ts","sourceRoot":"","sources":["../../../src/runtime/AuthExchangePage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjG,OAAO,EAAe,KAAK,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAEhG;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IA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