@wildo-ai/saas-technical-doc 1.1.3 → 1.1.5
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/companion/application-documentation/application-connection-documentation.d.ts +37 -0
- package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/application-connection-documentation.js +46 -5
- package/dist/esm/companion/application-documentation/application-connection-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/application-documentation-chapters.d.ts +101 -0
- package/dist/esm/companion/application-documentation/application-documentation-chapters.d.ts.map +1 -0
- package/dist/esm/companion/application-documentation/application-documentation-chapters.js +205 -0
- package/dist/esm/companion/application-documentation/application-documentation-chapters.js.map +1 -0
- package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js +3 -0
- package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js.map +1 -1
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.d.ts +34 -0
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.d.ts.map +1 -0
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.js +45 -0
- package/dist/esm/companion/application-documentation/docs-api-origin-substitution.js.map +1 -0
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts +24 -10
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js +25 -15
- package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts +11 -3
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js +9 -2
- package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts.map +1 -1
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js +10 -4
- package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js.map +1 -1
- package/dist/esm/companion/index.d.ts +2 -0
- package/dist/esm/companion/index.d.ts.map +1 -1
- package/dist/esm/companion/index.js +2 -0
- package/dist/esm/companion/index.js.map +1 -1
- package/dist/esm/companion/openapi-generator.d.ts +8 -4
- package/dist/esm/companion/openapi-generator.d.ts.map +1 -1
- package/dist/esm/companion/openapi-generator.js +43 -17
- package/dist/esm/companion/openapi-generator.js.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.d.ts +21 -1
- package/dist/esm/companion/operation-projection.schemas.d.ts.map +1 -1
- package/dist/esm/companion/operation-projection.schemas.js +11 -0
- package/dist/esm/companion/operation-projection.schemas.js.map +1 -1
- package/dist/esm/companion/publish-result.types.d.ts +37 -4
- package/dist/esm/companion/publish-result.types.d.ts.map +1 -1
- package/dist/esm/companion/publish-result.types.js.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts.map +1 -1
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js +8 -0
- package/dist/esm/companion/rendering/technical-documentation-docusaurus-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-render-model.js +26 -10
- package/dist/esm/companion/rendering/technical-documentation-render-model.js.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts +18 -15
- package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -1
- package/dist/esm/content/application-consumer-documentation-content.techdoc.js +169 -61
- package/dist/esm/content/application-consumer-documentation-content.techdoc.js.map +1 -1
- package/dist/esm/runtime/DocsAuthContext.d.ts +2 -2
- package/dist/esm/runtime/DocsAuthContext.d.ts.map +1 -1
- package/dist/esm/runtime/DocsAuthContext.js +8 -4
- package/dist/esm/runtime/DocsAuthContext.js.map +1 -1
- package/dist/esm/runtime/DocsFrontendProviders.d.ts +16 -0
- package/dist/esm/runtime/DocsFrontendProviders.d.ts.map +1 -0
- package/dist/esm/runtime/DocsFrontendProviders.js +26 -0
- package/dist/esm/runtime/DocsFrontendProviders.js.map +1 -0
- package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts +1 -2
- package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts.map +1 -1
- package/dist/esm/runtime/frontend-provider-registry.techdoc.js.map +1 -1
- package/dist/esm/runtime/index.d.ts +2 -0
- package/dist/esm/runtime/index.d.ts.map +1 -1
- package/dist/esm/runtime/index.js +2 -0
- package/dist/esm/runtime/index.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-model.d.ts +5 -0
- package/dist/esm/runtime/openapi-reference-model.d.ts.map +1 -1
- package/dist/esm/runtime/openapi-reference-model.js +5 -0
- package/dist/esm/runtime/openapi-reference-model.js.map +1 -1
- package/dist/esm/runtime/openapi-reference-view.js +1 -1
- package/dist/esm/runtime/openapi-reference-view.js.map +1 -1
- package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts +1 -0
- package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts.map +1 -1
- package/dist/esm/runtime/use-docs-frontend-provider-registry.js +10 -2
- package/dist/esm/runtime/use-docs-frontend-provider-registry.js.map +1 -1
- package/dist/esm/runtime/use-docs-provider-scripts.d.ts +30 -0
- package/dist/esm/runtime/use-docs-provider-scripts.d.ts.map +1 -0
- package/dist/esm/runtime/use-docs-provider-scripts.js +40 -0
- package/dist/esm/runtime/use-docs-provider-scripts.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -24
- package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts +0 -0
- package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts.map +0 -0
- package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js +0 -0
- package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
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,IAAI,EAAE,CAAC,CAAC,CAAC;AAC3F,CAAC","sourcesContent":["/**\n * Browser-safe projection of one generated OpenAPI document.\n *\n * Navigation is derived in memory from the verified OpenAPI bytes. The model\n * deliberately persists nothing and never invents API meaning: resource tags,\n * `operationId`, standard OpenAPI method/path fields and `x-wildo` source\n * identity are its only inputs.\n */\n\nimport { ApiReferenceTargetKind, apiReferenceTargetFragment } from '../openapi/api-reference-targets';\n\nexport interface ApiReferenceVariant {\n readonly variantRef: string;\n readonly anchorId: string;\n readonly operationId: string;\n readonly summary: string;\n readonly description: string | null;\n readonly method: string;\n readonly path: string;\n /** Source-projected authentication and authorization explanation. */\n readonly access: ApiReferenceAccess;\n readonly securitySchemes: readonly string[];\n readonly parameters: readonly ApiReferenceParameter[];\n readonly requestBody: ApiReferenceRequestBody | null;\n readonly responses: readonly ApiReferenceResponse[];\n readonly idempotent: boolean | null;\n}\n\n/** A standard OpenAPI parameter, normalized for a documentation renderer. */\nexport interface ApiReferenceParameter {\n readonly name: string;\n readonly location: string;\n readonly required: boolean;\n readonly description: string | null;\n /** The exact OpenAPI Schema Object attached to this parameter. */\n readonly schema: ApiReferenceSchemaNode | null;\n /** Source-authored OpenAPI examples for this exact path/query/header parameter. */\n readonly examples: readonly ApiReferenceExample[];\n}\n\n/** The available request representations for an operation. */\nexport interface ApiReferenceRequestBody {\n /** Stable public target for this exact operation's request contract. */\n readonly anchorId: string;\n readonly required: boolean;\n readonly mediaTypes: readonly ApiReferenceMediaType[];\n}\n\n/** A request or response representation declared by the OpenAPI contract. */\nexport interface ApiReferenceMediaType {\n readonly mediaType: string;\n /** The exact OpenAPI Schema Object attached to this representation. */\n readonly schema: ApiReferenceSchemaNode | null;\n /** OpenAPI examples, kept as contract data rather than renderer-authored samples. */\n readonly examples: readonly ApiReferenceExample[];\n}\n\n/** One request or response example declared directly in the OpenAPI document. */\nexport interface ApiReferenceExample {\n readonly name: string;\n readonly summary: string | null;\n readonly description: string | null;\n /** Pretty-printed inline JSON when the OpenAPI example provides a serializable `value`. */\n readonly jsonValue: string | null;\n /** OpenAPI's alternative external example location, when supplied. */\n readonly externalValue: string | null;\n}\n\n/** The browser-safe view of the generated `x-wildo.access` contract. */\nexport interface ApiReferenceAccess {\n readonly authenticationMode: string;\n readonly authenticationSummary: string;\n readonly roleRequirements: readonly ApiReferenceRoleRequirement[];\n}\n\n/** One exact runtime role paired with the specification-owned explanation. */\nexport interface ApiReferenceRoleRequirement {\n readonly role: string;\n readonly label: string;\n readonly businessRole: string | null;\n readonly authorityBoundary: string | null;\n}\n\n/** One documented HTTP response. */\nexport interface ApiReferenceResponse {\n /** Stable public target for this exact operation/status response contract. */\n readonly anchorId: string;\n readonly status: string;\n readonly description: string | null;\n readonly mediaTypes: readonly ApiReferenceMediaType[];\n}\n\nexport interface ApiReferenceFamily {\n readonly familyRef: string;\n readonly anchorId: string;\n readonly label: string;\n readonly variants: readonly ApiReferenceVariant[];\n}\n\nexport interface ApiReferenceResource {\n readonly resourceRef: string;\n readonly anchorId: string;\n readonly label: string;\n /** Source-owned category transported through the OpenAPI resource tag. */\n readonly category: ApiReferenceResourceCategory | null;\n readonly description: string | null;\n readonly lifecycleRole: string | null;\n readonly relationships: readonly ApiReferenceResourceRelationship[];\n readonly families: readonly ApiReferenceFamily[];\n}\n\n/** A source-declared API-resource category, never inferred from resource names. */\nexport interface ApiReferenceResourceCategory {\n readonly id: string;\n /** Readable category fragment derived from the public target utility. */\n readonly anchorId: string;\n readonly label: string;\n readonly description: string | null;\n}\n\n/** One reusable `components.schemas` contract from the same OpenAPI document. */\nexport interface ApiReferenceComponentSchema {\n readonly name: string;\n readonly anchorId: string;\n readonly schema: ApiReferenceSchemaNode;\n}\n\n/**\n * A browser-safe, recursive projection of one OpenAPI 3.1 Schema Object.\n *\n * `$ref` nodes deliberately remain links instead of being resolved. This both\n * preserves the document's canonical component boundary and makes recursive\n * schemas cycle-safe without imposing a renderer-authored traversal limit.\n */\nexport interface ApiReferenceSchemaNode {\n /** A JSON Schema boolean schema; `null` means this node is an object schema. */\n readonly booleanSchema: boolean | null;\n readonly referenceName: string | null;\n readonly referenceAnchorId: string | null;\n readonly types: readonly string[];\n readonly description: string | null;\n readonly format: string | null;\n readonly properties: readonly ApiReferenceSchemaProperty[];\n readonly items: ApiReferenceSchemaNode | null;\n readonly compositions: readonly ApiReferenceSchemaComposition[];\n readonly enumValues: readonly ApiReferenceSchemaEnumValue[];\n readonly constValue: string | null;\n readonly defaultValue: string | null;\n readonly constraints: readonly ApiReferenceSchemaConstraint[];\n /** `null` means the keyword is absent; a schema-valued keyword remains recursive. */\n readonly additionalProperties: boolean | ApiReferenceSchemaNode | null;\n}\n\n/** One named child of an OpenAPI object schema. */\nexport interface ApiReferenceSchemaProperty {\n readonly name: string;\n readonly required: boolean;\n readonly schema: ApiReferenceSchemaNode;\n}\n\n/** OpenAPI composition keywords are distinct contracts, not interchangeable labels. */\nexport enum ApiReferenceSchemaCompositionKind {\n ONE_OF = 'oneOf',\n ANY_OF = 'anyOf',\n ALL_OF = 'allOf',\n}\n\nexport interface ApiReferenceSchemaComposition {\n readonly kind: ApiReferenceSchemaCompositionKind;\n readonly branches: readonly ApiReferenceSchemaNode[];\n}\n\n/** One JSON value admitted by an OpenAPI enum and its optional source description. */\nexport interface ApiReferenceSchemaEnumValue {\n readonly jsonValue: string;\n readonly description: string | null;\n}\n\n/** Standard Schema Object constraint keywords preserved without interpretation. */\nexport enum ApiReferenceSchemaConstraintKind {\n MINIMUM = 'minimum',\n MAXIMUM = 'maximum',\n EXCLUSIVE_MINIMUM = 'exclusiveMinimum',\n EXCLUSIVE_MAXIMUM = 'exclusiveMaximum',\n MULTIPLE_OF = 'multipleOf',\n MIN_LENGTH = 'minLength',\n MAX_LENGTH = 'maxLength',\n PATTERN = 'pattern',\n MIN_ITEMS = 'minItems',\n MAX_ITEMS = 'maxItems',\n UNIQUE_ITEMS = 'uniqueItems',\n MIN_PROPERTIES = 'minProperties',\n MAX_PROPERTIES = 'maxProperties',\n}\n\nexport interface ApiReferenceSchemaConstraint {\n readonly kind: ApiReferenceSchemaConstraintKind;\n readonly jsonValue: string;\n}\n\n/** A compiled resource-relationship fact projected through the OpenAPI tag. */\nexport interface ApiReferenceResourceRelationship {\n readonly relatedResourceName: string;\n readonly relatedResourceLabel: string;\n readonly foreignKeyField: string | null;\n readonly resourceCardinality: string;\n readonly relatedResourceCardinality: string;\n readonly nature: string;\n readonly lifecycleModel: string;\n readonly onParentDelete: {\n readonly enabled: boolean;\n readonly mode: string;\n readonly strategy: string;\n readonly maxDepth: number;\n } | null;\n}\n\nexport interface ApiReferenceModel {\n /** Standard OpenAPI document title, when authored by the generator. */\n readonly title: string | null;\n /** Standard CommonMark description; presentation never authors substitute prose. */\n readonly description: string | null;\n /** Exact OpenAPI server choices used to compose an operation URL. */\n readonly servers: readonly ApiReferenceServer[];\n /** Exact reusable authentication mechanisms declared by OpenAPI. */\n readonly securitySchemes: readonly ApiReferenceSecurityScheme[];\n readonly resources: readonly ApiReferenceResource[];\n readonly componentSchemas: readonly ApiReferenceComponentSchema[];\n readonly operationCount: number;\n}\n\nexport interface ApiReferenceServer {\n readonly url: string;\n readonly description: string | null;\n}\n\n/** Browser-safe projection of an OpenAPI Security Scheme Object. */\nexport interface ApiReferenceSecurityScheme {\n readonly name: string;\n readonly type: string;\n readonly scheme: string | null;\n readonly bearerFormat: string | null;\n readonly location: string | null;\n readonly parameterName: string | null;\n readonly description: string | null;\n}\n\ntype UnknownRecord = Record<string, unknown>;\n\n/**\n * OpenAPI path-item members that describe an HTTP operation. Other members,\n * such as path-level parameters, are not individually navigable reference\n * entries. Every member in this vocabulary must carry Wildo identity metadata:\n * silently ignoring one would make the rendered reference incomplete.\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\nfunction documentInfo(value: unknown): { readonly title: string | null; readonly description: string | null } {\n if (value === undefined) return { title: null, description: null };\n if (!isRecord(value)) throw new Error('API reference document has malformed OpenAPI info');\n if (value.title !== undefined && typeof value.title !== 'string') throw new Error('API reference document has malformed OpenAPI info.title');\n if (value.description !== undefined && typeof value.description !== 'string') throw new Error('API reference document has malformed OpenAPI info.description');\n return {\n title: typeof value.title === 'string' ? value.title : null,\n description: typeof value.description === 'string' ? value.description : null,\n };\n}\n\nfunction documentServers(value: unknown): readonly ApiReferenceServer[] {\n if (value === undefined) return [];\n if (!Array.isArray(value)) throw new Error('API reference document has malformed OpenAPI servers');\n return value.map((server, index) => {\n if (!isRecord(server) || typeof server.url !== 'string') throw new Error(`API reference server at index ${index} has no URL`);\n if (server.description !== undefined && typeof server.description !== 'string') {\n throw new Error(`API reference server at index ${index} has a malformed description`);\n }\n return {\n url: server.url,\n description: typeof server.description === 'string' ? server.description : null,\n };\n });\n}\n\nfunction documentSecuritySchemes(value: unknown): readonly ApiReferenceSecurityScheme[] {\n if (value === undefined) return [];\n if (!isRecord(value)) throw new Error('API reference document has malformed OpenAPI security schemes');\n return Object.entries(value).map(([name, scheme]) => {\n if (!isRecord(scheme) || typeof scheme.type !== 'string') throw new Error(`API reference security scheme '${name}' is malformed`);\n for (const field of ['scheme', 'bearerFormat', 'in', 'name', 'description'] as const) {\n if (scheme[field] !== undefined && typeof scheme[field] !== 'string') {\n throw new Error(`API reference security scheme '${name}' has malformed '${field}'`);\n }\n }\n return {\n name,\n type: scheme.type,\n scheme: typeof scheme.scheme === 'string' ? scheme.scheme : null,\n bearerFormat: typeof scheme.bearerFormat === 'string' ? scheme.bearerFormat : null,\n location: typeof scheme.in === 'string' ? scheme.in : null,\n parameterName: typeof scheme.name === 'string' ? scheme.name : null,\n description: typeof scheme.description === 'string' ? scheme.description : null,\n };\n }).sort((left, right) => left.name.localeCompare(right.name));\n}\n\nfunction access(value: unknown): ApiReferenceAccess {\n if (!isRecord(value) || typeof value.authenticationMode !== 'string' || typeof value.authenticationSummary !== 'string' || !Array.isArray(value.roleRequirements)) {\n throw new Error('API reference operation has no valid x-wildo access contract');\n }\n const roleRequirements = value.roleRequirements.map((requirement) => {\n if (!isRecord(requirement) || typeof requirement.role !== 'string' || typeof requirement.label !== 'string') {\n throw new Error('API reference operation has a malformed x-wildo role requirement');\n }\n if (requirement.businessRole !== null && requirement.businessRole !== undefined && typeof requirement.businessRole !== 'string') {\n throw new Error('API reference operation has a malformed role business explanation');\n }\n if (requirement.authorityBoundary !== null && requirement.authorityBoundary !== undefined && typeof requirement.authorityBoundary !== 'string') {\n throw new Error('API reference operation has a malformed role authority boundary');\n }\n return {\n role: requirement.role,\n label: requirement.label,\n businessRole: typeof requirement.businessRole === 'string' ? requirement.businessRole : null,\n authorityBoundary: typeof requirement.authorityBoundary === 'string' ? requirement.authorityBoundary : null,\n };\n });\n return {\n authenticationMode: value.authenticationMode,\n authenticationSummary: value.authenticationSummary,\n roleRequirements,\n };\n}\n\nfunction componentSchemaReference(value: unknown): { readonly name: string; readonly anchorId: string } | null {\n if (!isRecord(value) || typeof value.$ref !== 'string') return null;\n const schemaName = value.$ref.match(/^#\\/components\\/schemas\\/([^/]+)$/)?.[1];\n return schemaName === undefined\n ? { name: value.$ref, anchorId: null }\n : {\n name: schemaName,\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.COMPONENT_SCHEMA, schemaName }),\n };\n}\n\nfunction serializeExampleJson(value: unknown): string | null {\n if (value === undefined) return null;\n try {\n const serialized = JSON.stringify(value, null, 2);\n return typeof serialized === 'string' ? serialized : null;\n } catch {\n // A malformed external OpenAPI document must not make the reference page\n // unusable merely because an example cannot be represented as JSON.\n return null;\n }\n}\n\nfunction schemaConstraint(\n schema: UnknownRecord,\n kind: ApiReferenceSchemaConstraintKind,\n): ApiReferenceSchemaConstraint | null {\n const jsonValue = serializeExampleJson(schema[kind]);\n return jsonValue === null ? null : { kind, jsonValue };\n}\n\nfunction schemaNodeOrThrow(value: unknown, owner: string): ApiReferenceSchemaNode {\n const schema = schemaNode(value);\n if (schema === null) throw new Error(`API reference ${owner} has a malformed OpenAPI schema`);\n return schema;\n}\n\n/**\n * Recursively projects only fields supplied by the OpenAPI Schema Object.\n *\n * semantic-literal-boundary: OpenAPI 3.1 Schema Object keywords are translated\n * once at this browser boundary; React consumes the named model exclusively.\n */\nfunction schemaNode(value: unknown): ApiReferenceSchemaNode | null {\n if (typeof value === 'boolean') {\n return {\n booleanSchema: value,\n referenceName: null,\n referenceAnchorId: null,\n types: [],\n description: null,\n format: null,\n properties: [],\n items: null,\n compositions: [],\n enumValues: [],\n constValue: null,\n defaultValue: null,\n constraints: [],\n additionalProperties: null,\n };\n }\n if (!isRecord(value)) return null;\n\n const reference = componentSchemaReference(value);\n const requiredPropertyNames = Array.isArray(value.required)\n ? new Set(value.required.filter((propertyName): propertyName is string => typeof propertyName === 'string'))\n : new Set<string>();\n const properties = isRecord(value.properties)\n ? Object.entries(value.properties).map(([name, propertySchema]) => ({\n name,\n required: requiredPropertyNames.has(name),\n schema: schemaNodeOrThrow(propertySchema, `property '${name}'`),\n })).sort((left, right) => left.name.localeCompare(right.name))\n : [];\n const compositionSources: ReadonlyArray<readonly [ApiReferenceSchemaCompositionKind, unknown]> = [\n [ApiReferenceSchemaCompositionKind.ONE_OF, value.oneOf],\n [ApiReferenceSchemaCompositionKind.ANY_OF, value.anyOf],\n [ApiReferenceSchemaCompositionKind.ALL_OF, value.allOf],\n ];\n const compositions = compositionSources.flatMap(([kind, branches]) => {\n if (!Array.isArray(branches)) return [];\n return [{ kind, branches: branches.map((branch, index) => schemaNodeOrThrow(branch, `${kind} branch ${index}`)) }];\n });\n const enumDescriptions = isRecord(value['x-enum-descriptions']) ? value['x-enum-descriptions'] : {};\n const enumValues = Array.isArray(value.enum)\n ? value.enum.flatMap((enumValue) => {\n const jsonValue = serializeExampleJson(enumValue);\n if (jsonValue === null) return [];\n const description = enumDescriptions[String(enumValue)];\n return [{ jsonValue, description: typeof description === 'string' ? description : null }];\n })\n : [];\n const types = typeof value.type === 'string'\n ? [value.type]\n : Array.isArray(value.type)\n ? value.type.filter((type): type is string => typeof type === 'string')\n : [];\n const additionalProperties = value.additionalProperties === undefined\n ? null\n : typeof value.additionalProperties === 'boolean'\n ? value.additionalProperties\n : schemaNodeOrThrow(value.additionalProperties, 'additionalProperties');\n\n return {\n booleanSchema: null,\n referenceName: reference?.name ?? null,\n referenceAnchorId: reference?.anchorId ?? null,\n types,\n description: typeof value.description === 'string' ? value.description : null,\n format: typeof value.format === 'string' ? value.format : null,\n properties,\n items: value.items === undefined ? null : schemaNodeOrThrow(value.items, 'array items'),\n compositions,\n enumValues,\n constValue: serializeExampleJson(value.const),\n defaultValue: serializeExampleJson(value.default),\n constraints: [\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MINIMUM),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAXIMUM),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.EXCLUSIVE_MINIMUM),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.EXCLUSIVE_MAXIMUM),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MULTIPLE_OF),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MIN_LENGTH),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAX_LENGTH),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.PATTERN),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MIN_ITEMS),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAX_ITEMS),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.UNIQUE_ITEMS),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MIN_PROPERTIES),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAX_PROPERTIES),\n ].filter((constraint): constraint is ApiReferenceSchemaConstraint => constraint !== null),\n additionalProperties,\n };\n}\n\nfunction openApiExamples(value: unknown): readonly ApiReferenceExample[] {\n if (!isRecord(value)) return [];\n return Object.entries(value)\n .map(([name, example]) => {\n if (!isRecord(example)) return null;\n return {\n name,\n summary: typeof example.summary === 'string' ? example.summary : null,\n description: typeof example.description === 'string' ? example.description : null,\n jsonValue: serializeExampleJson(example.value),\n externalValue: typeof example.externalValue === 'string' ? example.externalValue : null,\n };\n })\n .filter((example): example is ApiReferenceExample => example !== null)\n .sort((left, right) => left.name.localeCompare(right.name));\n}\n\nfunction mediaTypes(value: unknown): readonly ApiReferenceMediaType[] {\n if (!isRecord(value)) return [];\n return Object.entries(value).map(([mediaType, representation]) => {\n if (!isRecord(representation)) return { mediaType, schema: null, examples: [] };\n const namedExamples = openApiExamples(representation.examples);\n const inlineExample = representation.example === undefined\n ? []\n : [{ name: 'Example', summary: null, description: null, jsonValue: serializeExampleJson(representation.example), externalValue: null }];\n return {\n mediaType,\n schema: representation.schema === undefined ? null : schemaNodeOrThrow(representation.schema, `media type '${mediaType}'`),\n examples: [...namedExamples, ...inlineExample],\n };\n }).sort((a, b) => a.mediaType.localeCompare(b.mediaType));\n}\n\n/** Projects reusable OpenAPI components without re-authoring their schema meaning in React. */\nfunction componentSchemas(value: unknown): readonly ApiReferenceComponentSchema[] {\n if (!isRecord(value)) return [];\n return Object.entries(value).map(([name, sourceSchema]) => {\n const schema = schemaNodeOrThrow(sourceSchema, `component schema '${name}'`);\n return {\n name,\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.COMPONENT_SCHEMA, schemaName: name }),\n schema,\n };\n }).sort((left, right) => left.name.localeCompare(right.name));\n}\n\nfunction parameter(value: unknown): ApiReferenceParameter | null {\n if (!isRecord(value) || typeof value.name !== 'string' || typeof value.in !== 'string') return null;\n const namedExamples = openApiExamples(value.examples);\n const inlineExample = value.example === undefined\n ? []\n : [{ name: 'Example', summary: null, description: null, jsonValue: serializeExampleJson(value.example), externalValue: null }];\n return {\n name: value.name,\n location: value.in,\n required: value.required === true,\n description: typeof value.description === 'string' ? value.description : null,\n schema: value.schema === undefined ? null : schemaNodeOrThrow(value.schema, `parameter '${value.name}'`),\n // Parameter Object supports the same named-example and single-inline-example\n // forms as Media Type Object. Preserve either form from external OpenAPI;\n // source generation currently emits the named form for query inputs.\n examples: [...namedExamples, ...inlineExample],\n };\n}\n\nfunction requestBody(value: unknown, operationId: string): ApiReferenceRequestBody | null {\n if (!isRecord(value)) return null;\n return {\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.REQUEST, operationId }),\n required: value.required === true,\n mediaTypes: mediaTypes(value.content),\n };\n}\n\nfunction responses(value: unknown, operationId: string): readonly ApiReferenceResponse[] {\n if (!isRecord(value)) return [];\n return Object.entries(value).map(([status, response]) => ({\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESPONSE, operationId, status }),\n status,\n description: isRecord(response) && typeof response.description === 'string' ? response.description : null,\n mediaTypes: isRecord(response) ? mediaTypes(response.content) : [],\n })).sort((a, b) => a.status.localeCompare(b.status, undefined, { numeric: true }));\n}\n\nfunction securitySchemes(value: unknown): readonly string[] {\n if (!Array.isArray(value)) return [];\n return [...new Set(value.flatMap((requirement) => isRecord(requirement) ? Object.keys(requirement) : []))].sort((a, b) => a.localeCompare(b));\n}\n\nfunction resourceRelationships(value: unknown): readonly ApiReferenceResourceRelationship[] {\n if (!Array.isArray(value)) return [];\n return value.map((relationship, index) => {\n if (!isRecord(relationship)\n || typeof relationship.relatedResourceName !== 'string'\n || typeof relationship.resourceCardinality !== 'string'\n || typeof relationship.relatedResourceCardinality !== 'string'\n || typeof relationship.nature !== 'string'\n || typeof relationship.lifecycleModel !== 'string') {\n throw new Error(`API reference resource relationship at index ${index} is malformed`);\n }\n const parentDelete = relationship.onParentDelete;\n if (parentDelete !== undefined && (!isRecord(parentDelete)\n || typeof parentDelete.enabled !== 'boolean'\n || typeof parentDelete.mode !== 'string'\n || typeof parentDelete.strategy !== 'string'\n || typeof parentDelete.maxDepth !== 'number')) {\n throw new Error(`API reference resource relationship at index ${index} has malformed parent-delete lifecycle`);\n }\n return {\n relatedResourceName: relationship.relatedResourceName,\n relatedResourceLabel: relationship.relatedResourceName,\n foreignKeyField: typeof relationship.foreignKeyField === 'string' ? relationship.foreignKeyField : null,\n resourceCardinality: relationship.resourceCardinality,\n relatedResourceCardinality: relationship.relatedResourceCardinality,\n nature: relationship.nature,\n lifecycleModel: relationship.lifecycleModel,\n onParentDelete: isRecord(parentDelete) ? {\n enabled: parentDelete.enabled as boolean,\n mode: parentDelete.mode as string,\n strategy: parentDelete.strategy as string,\n maxDepth: parentDelete.maxDepth as number,\n } : null,\n };\n });\n}\n\n/** Parses the strict category contract carried by `tags[].x-wildo.category`. */\nfunction resourceCategory(value: unknown): ApiReferenceResourceCategory | null {\n if (value === undefined) return null;\n if (!isRecord(value) || typeof value.id !== 'string' || typeof value.label !== 'string') {\n throw new Error('API reference resource tag has malformed x-wildo category');\n }\n if (value.description !== undefined && typeof value.description !== 'string') {\n throw new Error('API reference resource tag has malformed category description');\n }\n return {\n id: value.id,\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.CATEGORY, categoryName: value.id }),\n label: value.label,\n description: typeof value.description === 'string' ? value.description : null,\n };\n}\n\nfunction operationFamilyLabel(familyRef: string): string {\n const identifier = familyRef.split('/operation-family/').at(-1)?.split('/').at(0) ?? familyRef;\n return identifier.replace(/([a-z])([A-Z])/g, '$1 $2').replace(/[-_]/g, ' ').replace(/^./, (character) => character.toUpperCase());\n}\n\n/**\n * Presentation-only fallback for a resource whose related tag is absent from\n * this section (for example, a cron-only resource). It never changes the\n * canonical resource identity; it only prevents raw camelCase identifiers from\n * leaking into the reference when no source-authored display tag is available.\n */\nfunction resourceDisplayLabel(identifier: string): string {\n return identifier\n .replace(/([a-z0-9])([A-Z])/g, '$1 $2')\n .replace(/[-_]/g, ' ')\n .replace(/\\b\\w/g, (character) => character.toUpperCase());\n}\n\n/** Creates the two-level resource → operation-family view from OpenAPI. */\nexport function createApiReferenceModel(document: unknown): ApiReferenceModel {\n if (!isRecord(document) || !isRecord(document.paths)) throw new Error('API reference document has no OpenAPI paths object');\n const info = documentInfo(document.info);\n const resourceTags = new Map<string, {\n readonly resourceRef: string;\n readonly label: string;\n readonly description: string | null;\n readonly category: ApiReferenceResourceCategory | null;\n readonly lifecycleRole: string | null;\n readonly relationships: readonly ApiReferenceResourceRelationship[];\n }>();\n if (Array.isArray(document.tags)) {\n for (const tag of document.tags) {\n if (isRecord(tag) && typeof tag.name === 'string') {\n if (!isRecord(tag['x-wildo']) || typeof tag['x-wildo'].resourceRef !== 'string') {\n throw new Error(`API reference resource tag '${tag.name}' has no x-wildo resource identity`);\n }\n if (resourceTags.has(tag.name)) throw new Error(`API reference resource tag is duplicated: ${tag.name}`);\n resourceTags.set(tag.name, {\n resourceRef: tag['x-wildo'].resourceRef,\n label: typeof tag['x-displayName'] === 'string' ? tag['x-displayName'] : resourceDisplayLabel(tag.name),\n description: typeof tag.description === 'string' ? tag.description : null,\n category: resourceCategory(tag['x-wildo'].category),\n lifecycleRole: typeof tag['x-wildo'].lifecycleRole === 'string' ? tag['x-wildo'].lifecycleRole : null,\n relationships: resourceRelationships(tag['x-wildo'].relationships),\n });\n }\n }\n }\n const resources = new Map<string, Map<string, ApiReferenceVariant[]>>();\n const operationIds = new Set<string>();\n const operationVariantRefs = new Set<string>();\n for (const [path, item] of Object.entries(document.paths)) {\n if (!isRecord(item)) continue;\n for (const [method, operation] of Object.entries(item)) {\n if (!OPENAPI_HTTP_METHODS.has(method)) continue;\n if (!isRecord(operation)) throw new Error(`API reference ${method.toUpperCase()} ${path} operation is malformed`);\n if (!isRecord(operation['x-wildo'])) throw new Error(`API reference ${method.toUpperCase()} ${path} operation has no x-wildo identity`);\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 operation has malformed x-wildo identity');\n }\n if (metadata.path !== path || metadata.httpVerb !== method.toLowerCase()) throw new Error('API reference operation x-wildo identity does not match its OpenAPI method/path');\n if (typeof operation.operationId !== 'string' || operation.operationId.length === 0) throw new Error('API reference operation has no operationId');\n if (operationIds.has(operation.operationId)) throw new Error(`API reference operationId is duplicated: ${operation.operationId}`);\n operationIds.add(operation.operationId);\n if (operationVariantRefs.has(metadata.operationVariantRef)) throw new Error(`API reference operation variant identity is duplicated: ${metadata.operationVariantRef}`);\n operationVariantRefs.add(metadata.operationVariantRef);\n const resource = resources.get(metadata.resourceRef) ?? new Map<string, ApiReferenceVariant[]>();\n const family = resource.get(metadata.operationFamilyRef) ?? [];\n family.push({\n variantRef: metadata.operationVariantRef,\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.OPERATION, operationId: operation.operationId }),\n operationId: operation.operationId,\n summary: typeof operation.summary === 'string' ? operation.summary : `${method.toUpperCase()} ${path}`,\n description: typeof operation.description === 'string' ? operation.description : null,\n method: method.toUpperCase(),\n path,\n access: access(metadata.access),\n securitySchemes: securitySchemes(operation.security),\n parameters: Array.isArray(operation.parameters) ? operation.parameters.map(parameter).filter((item): item is ApiReferenceParameter => item !== null) : [],\n requestBody: requestBody(operation.requestBody, operation.operationId),\n responses: responses(operation.responses, operation.operationId),\n idempotent: typeof operation['x-idempotent'] === 'boolean' ? operation['x-idempotent'] : null,\n });\n resource.set(metadata.operationFamilyRef, family);\n resources.set(metadata.resourceRef, resource);\n }\n }\n const result = [...resources.entries()].map(([resourceRef, families]) => {\n const tagName = resourceRef.split('/').at(-1) ?? resourceRef;\n const tag = resourceTags.get(tagName);\n if (tag === undefined) throw new Error(`API reference resource '${resourceRef}' has no generated OpenAPI tag`);\n if (tag.resourceRef !== resourceRef) throw new Error(`API reference tag '${tagName}' resource identity does not match its operation identities`);\n return {\n resourceRef,\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESOURCE, resourceName: tagName }),\n label: tag.label,\n category: tag.category,\n description: tag.description,\n lifecycleRole: tag.lifecycleRole,\n relationships: tag.relationships.map((relationship) => ({\n ...relationship,\n relatedResourceLabel: resourceTags.get(relationship.relatedResourceName)?.label ?? resourceDisplayLabel(relationship.relatedResourceName),\n })),\n families: [...families.entries()].map(([familyRef, variants]) => ({\n familyRef,\n anchorId: apiReferenceTargetFragment({\n kind: ApiReferenceTargetKind.OPERATION_FAMILY,\n resourceName: tagName,\n operationName: familyRef.split('/').at(-1) ?? familyRef,\n }),\n label: operationFamilyLabel(familyRef),\n variants: variants.sort((a, b) => `${a.path}:${a.method}`.localeCompare(`${b.path}:${b.method}`)),\n })).sort((a, b) => a.familyRef.localeCompare(b.familyRef)),\n };\n }).sort((a, b) => a.label.localeCompare(b.label));\n const parsedComponentSchemas = componentSchemas(isRecord(document.components) ? document.components.schemas : undefined);\n assertCategoryMetadataIsConsistent(result);\n assertPublicAnchorsAreUnique(result, parsedComponentSchemas);\n return {\n title: info.title,\n description: info.description,\n servers: documentServers(document.servers),\n securitySchemes: documentSecuritySchemes(isRecord(document.components) ? document.components.securitySchemes : undefined),\n resources: result,\n componentSchemas: parsedComponentSchemas,\n operationCount: result.flatMap((resource) => resource.families).reduce((count, family) => count + family.variants.length, 0),\n };\n}\n\n/** A category id has one source-owned label and description throughout one document. */\nfunction assertCategoryMetadataIsConsistent(resources: readonly ApiReferenceResource[]): void {\n const categories = new Map<string, ApiReferenceResourceCategory>();\n for (const resource of resources) {\n if (resource.category === null) continue;\n const prior = categories.get(resource.category.id);\n if (prior !== undefined && (prior.label !== resource.category.label || prior.description !== resource.category.description)) {\n throw new Error(`API reference category '${resource.category.id}' has inconsistent source metadata`);\n }\n categories.set(resource.category.id, resource.category);\n }\n}\n\n/**\n * Public fragments must remain readable, but readability cannot excuse a\n * collision. Rejecting a collision keeps copied links deterministic and makes\n * the source identity that needs refinement visible to the generator owner.\n */\nfunction assertPublicAnchorsAreUnique(\n resources: readonly ApiReferenceResource[],\n schemas: readonly ApiReferenceComponentSchema[],\n): void {\n const ownerByAnchor = new Map<string, string>();\n const claim = (anchorId: string, owner: string): void => {\n const existingOwner = ownerByAnchor.get(anchorId);\n if (existingOwner !== undefined) {\n throw new Error(`API reference public fragment '${anchorId}' collides between ${existingOwner} and ${owner}`);\n }\n ownerByAnchor.set(anchorId, owner);\n };\n const categories = new Map(resources.flatMap((resource) => resource.category === null ? [] : [[resource.category.id, resource.category] as const]));\n categories.forEach((category) => claim(category.anchorId, `category '${category.id}'`));\n resources.forEach((resource) => {\n claim(resource.anchorId, resource.resourceRef);\n resource.families.forEach((family) => {\n claim(family.anchorId, family.familyRef);\n family.variants.forEach((variant) => {\n claim(variant.anchorId, variant.variantRef);\n if (variant.requestBody !== null) claim(variant.requestBody.anchorId, `${variant.variantRef}:request`);\n variant.responses.forEach((response) => claim(response.anchorId, `${variant.variantRef}:response:${response.status}`));\n });\n });\n });\n schemas.forEach((schema) => claim(schema.anchorId, `components.schemas.${schema.name}`));\n}\n"]}
|
|
1
|
+
{"version":3,"file":"openapi-reference-model.js","sourceRoot":"","sources":["../../../../src/runtime/openapi-reference-model.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAuJtG,uFAAuF;AACvF,MAAM,CAAN,IAAY,iCAIX;AAJD,WAAY,iCAAiC;IAC3C,qDAAgB,CAAA;IAChB,qDAAgB,CAAA;IAChB,qDAAgB,CAAA;AAClB,CAAC,EAJW,iCAAiC,KAAjC,iCAAiC,QAI5C;AAaD,mFAAmF;AACnF,MAAM,CAAN,IAAY,gCAcX;AAdD,WAAY,gCAAgC;IAC1C,uDAAmB,CAAA;IACnB,uDAAmB,CAAA;IACnB,0EAAsC,CAAA;IACtC,0EAAsC,CAAA;IACtC,8DAA0B,CAAA;IAC1B,4DAAwB,CAAA;IACxB,4DAAwB,CAAA;IACxB,uDAAmB,CAAA;IACnB,0DAAsB,CAAA;IACtB,0DAAsB,CAAA;IACtB,gEAA4B,CAAA;IAC5B,oEAAgC,CAAA;IAChC,oEAAgC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CAAC;YACzC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAClC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;gBAC5C,IAAI,OAAO,CAAC,WAAW,KAAK,IAAI;oBAAE,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,UAAU,CAAC,CAAC;gBACvG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,aAAa,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YACzH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,sBAAsB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAC3F,CAAC","sourcesContent":["/**\n * Browser-safe projection of one generated OpenAPI document.\n *\n * Navigation is derived in memory from the verified OpenAPI bytes. The model\n * deliberately persists nothing and never invents API meaning: resource tags,\n * `operationId`, standard OpenAPI method/path fields and `x-wildo` source\n * identity are its only inputs.\n */\n\nimport { ApiReferenceTargetKind, apiReferenceTargetFragment } from '../openapi/api-reference-targets';\n\nexport interface ApiReferenceVariant {\n readonly variantRef: string;\n readonly anchorId: string;\n readonly operationId: string;\n readonly summary: string;\n readonly description: string | null;\n readonly method: string;\n readonly path: string;\n /** Source-projected authentication and authorization explanation. */\n readonly access: ApiReferenceAccess;\n readonly securitySchemes: readonly string[];\n readonly parameters: readonly ApiReferenceParameter[];\n readonly requestBody: ApiReferenceRequestBody | null;\n readonly responses: readonly ApiReferenceResponse[];\n readonly idempotent: boolean | null;\n}\n\n/** A standard OpenAPI parameter, normalized for a documentation renderer. */\nexport interface ApiReferenceParameter {\n readonly name: string;\n readonly location: string;\n readonly required: boolean;\n readonly description: string | null;\n /** The exact OpenAPI Schema Object attached to this parameter. */\n readonly schema: ApiReferenceSchemaNode | null;\n /** Source-authored OpenAPI examples for this exact path/query/header parameter. */\n readonly examples: readonly ApiReferenceExample[];\n}\n\n/** The available request representations for an operation. */\nexport interface ApiReferenceRequestBody {\n /** Stable public target for this exact operation's request contract. */\n readonly anchorId: string;\n readonly required: boolean;\n readonly mediaTypes: readonly ApiReferenceMediaType[];\n}\n\n/** A request or response representation declared by the OpenAPI contract. */\nexport interface ApiReferenceMediaType {\n readonly mediaType: string;\n /** The exact OpenAPI Schema Object attached to this representation. */\n readonly schema: ApiReferenceSchemaNode | null;\n /** OpenAPI examples, kept as contract data rather than renderer-authored samples. */\n readonly examples: readonly ApiReferenceExample[];\n}\n\n/** One request or response example declared directly in the OpenAPI document. */\nexport interface ApiReferenceExample {\n readonly name: string;\n readonly summary: string | null;\n readonly description: string | null;\n /** Pretty-printed inline JSON when the OpenAPI example provides a serializable `value`. */\n readonly jsonValue: string | null;\n /** OpenAPI's alternative external example location, when supplied. */\n readonly externalValue: string | null;\n}\n\n/** The browser-safe view of the generated `x-wildo.access` contract. */\nexport interface ApiReferenceAccess {\n readonly authenticationMode: string;\n readonly authenticationSummary: string;\n readonly roleRequirements: readonly ApiReferenceRoleRequirement[];\n}\n\n/** One exact runtime role paired with the specification-owned explanation. */\nexport interface ApiReferenceRoleRequirement {\n readonly role: string;\n readonly label: string;\n readonly businessRole: string | null;\n readonly authorityBoundary: string | null;\n}\n\n/** One documented HTTP response. */\nexport interface ApiReferenceResponse {\n /** Stable public target for this exact operation/status response contract. */\n readonly anchorId: string;\n readonly status: string;\n readonly description: string | null;\n readonly mediaTypes: readonly ApiReferenceMediaType[];\n}\n\nexport interface ApiReferenceFamily {\n readonly familyRef: string;\n readonly anchorId: string;\n readonly label: string;\n readonly variants: readonly ApiReferenceVariant[];\n}\n\nexport interface ApiReferenceResource {\n readonly resourceRef: string;\n readonly anchorId: string;\n readonly label: string;\n /** Source-owned category transported through the OpenAPI resource tag. */\n readonly category: ApiReferenceResourceCategory | null;\n readonly description: string | null;\n readonly lifecycleRole: string | null;\n readonly relationships: readonly ApiReferenceResourceRelationship[];\n readonly families: readonly ApiReferenceFamily[];\n}\n\n/** A source-declared API-resource category, never inferred from resource names. */\nexport interface ApiReferenceResourceCategory {\n readonly id: string;\n /** Readable category fragment derived from the public target utility. */\n readonly anchorId: string;\n readonly label: string;\n readonly description: string | null;\n}\n\n/** One reusable `components.schemas` contract from the same OpenAPI document. */\nexport interface ApiReferenceComponentSchema {\n readonly name: string;\n readonly anchorId: string;\n readonly schema: ApiReferenceSchemaNode;\n}\n\n/**\n * A browser-safe, recursive projection of one OpenAPI 3.1 Schema Object.\n *\n * `$ref` nodes deliberately remain links instead of being resolved. This both\n * preserves the document's canonical component boundary and makes recursive\n * schemas cycle-safe without imposing a renderer-authored traversal limit.\n */\nexport interface ApiReferenceSchemaNode {\n /** A JSON Schema boolean schema; `null` means this node is an object schema. */\n readonly booleanSchema: boolean | null;\n readonly referenceName: string | null;\n readonly referenceAnchorId: string | null;\n readonly types: readonly string[];\n readonly description: string | null;\n readonly format: string | null;\n readonly properties: readonly ApiReferenceSchemaProperty[];\n readonly items: ApiReferenceSchemaNode | null;\n readonly compositions: readonly ApiReferenceSchemaComposition[];\n readonly enumValues: readonly ApiReferenceSchemaEnumValue[];\n readonly constValue: string | null;\n readonly defaultValue: string | null;\n readonly constraints: readonly ApiReferenceSchemaConstraint[];\n /** `null` means the keyword is absent; a schema-valued keyword remains recursive. */\n readonly additionalProperties: boolean | ApiReferenceSchemaNode | null;\n}\n\n/** One named child of an OpenAPI object schema. */\nexport interface ApiReferenceSchemaProperty {\n readonly name: string;\n readonly required: boolean;\n readonly schema: ApiReferenceSchemaNode;\n}\n\n/** OpenAPI composition keywords are distinct contracts, not interchangeable labels. */\nexport enum ApiReferenceSchemaCompositionKind {\n ONE_OF = 'oneOf',\n ANY_OF = 'anyOf',\n ALL_OF = 'allOf',\n}\n\nexport interface ApiReferenceSchemaComposition {\n readonly kind: ApiReferenceSchemaCompositionKind;\n readonly branches: readonly ApiReferenceSchemaNode[];\n}\n\n/** One JSON value admitted by an OpenAPI enum and its optional source description. */\nexport interface ApiReferenceSchemaEnumValue {\n readonly jsonValue: string;\n readonly description: string | null;\n}\n\n/** Standard Schema Object constraint keywords preserved without interpretation. */\nexport enum ApiReferenceSchemaConstraintKind {\n MINIMUM = 'minimum',\n MAXIMUM = 'maximum',\n EXCLUSIVE_MINIMUM = 'exclusiveMinimum',\n EXCLUSIVE_MAXIMUM = 'exclusiveMaximum',\n MULTIPLE_OF = 'multipleOf',\n MIN_LENGTH = 'minLength',\n MAX_LENGTH = 'maxLength',\n PATTERN = 'pattern',\n MIN_ITEMS = 'minItems',\n MAX_ITEMS = 'maxItems',\n UNIQUE_ITEMS = 'uniqueItems',\n MIN_PROPERTIES = 'minProperties',\n MAX_PROPERTIES = 'maxProperties',\n}\n\nexport interface ApiReferenceSchemaConstraint {\n readonly kind: ApiReferenceSchemaConstraintKind;\n readonly jsonValue: string;\n}\n\n/** A compiled resource-relationship fact projected through the OpenAPI tag. */\nexport interface ApiReferenceResourceRelationship {\n readonly relatedResourceName: string;\n readonly relatedResourceLabel: string;\n readonly foreignKeyField: string | null;\n readonly resourceCardinality: string;\n readonly relatedResourceCardinality: string;\n readonly nature: string;\n readonly lifecycleModel: string;\n readonly onParentDelete: {\n readonly enabled: boolean;\n readonly mode: string;\n readonly strategy: string;\n readonly maxDepth: number;\n /**\n * True for the RESTRICT posture: the parent's delete is refused while these rows exist. Nothing is torn\n * down, so `mode` and `maxDepth` describe nothing and a renderer must not present them.\n */\n readonly refusesWhileChildrenExist: boolean;\n } | null;\n}\n\nexport interface ApiReferenceModel {\n /** Standard OpenAPI document title, when authored by the generator. */\n readonly title: string | null;\n /** Standard CommonMark description; presentation never authors substitute prose. */\n readonly description: string | null;\n /** Exact OpenAPI server choices used to compose an operation URL. */\n readonly servers: readonly ApiReferenceServer[];\n /** Exact reusable authentication mechanisms declared by OpenAPI. */\n readonly securitySchemes: readonly ApiReferenceSecurityScheme[];\n readonly resources: readonly ApiReferenceResource[];\n readonly componentSchemas: readonly ApiReferenceComponentSchema[];\n readonly operationCount: number;\n}\n\nexport interface ApiReferenceServer {\n readonly url: string;\n readonly description: string | null;\n}\n\n/** Browser-safe projection of an OpenAPI Security Scheme Object. */\nexport interface ApiReferenceSecurityScheme {\n readonly name: string;\n readonly type: string;\n readonly scheme: string | null;\n readonly bearerFormat: string | null;\n readonly location: string | null;\n readonly parameterName: string | null;\n readonly description: string | null;\n}\n\ntype UnknownRecord = Record<string, unknown>;\n\n/**\n * OpenAPI path-item members that describe an HTTP operation. Other members,\n * such as path-level parameters, are not individually navigable reference\n * entries. Every member in this vocabulary must carry Wildo identity metadata:\n * silently ignoring one would make the rendered reference incomplete.\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\nfunction documentInfo(value: unknown): { readonly title: string | null; readonly description: string | null } {\n if (value === undefined) return { title: null, description: null };\n if (!isRecord(value)) throw new Error('API reference document has malformed OpenAPI info');\n if (value.title !== undefined && typeof value.title !== 'string') throw new Error('API reference document has malformed OpenAPI info.title');\n if (value.description !== undefined && typeof value.description !== 'string') throw new Error('API reference document has malformed OpenAPI info.description');\n return {\n title: typeof value.title === 'string' ? value.title : null,\n description: typeof value.description === 'string' ? value.description : null,\n };\n}\n\nfunction documentServers(value: unknown): readonly ApiReferenceServer[] {\n if (value === undefined) return [];\n if (!Array.isArray(value)) throw new Error('API reference document has malformed OpenAPI servers');\n return value.map((server, index) => {\n if (!isRecord(server) || typeof server.url !== 'string') throw new Error(`API reference server at index ${index} has no URL`);\n if (server.description !== undefined && typeof server.description !== 'string') {\n throw new Error(`API reference server at index ${index} has a malformed description`);\n }\n return {\n url: server.url,\n description: typeof server.description === 'string' ? server.description : null,\n };\n });\n}\n\nfunction documentSecuritySchemes(value: unknown): readonly ApiReferenceSecurityScheme[] {\n if (value === undefined) return [];\n if (!isRecord(value)) throw new Error('API reference document has malformed OpenAPI security schemes');\n return Object.entries(value).map(([name, scheme]) => {\n if (!isRecord(scheme) || typeof scheme.type !== 'string') throw new Error(`API reference security scheme '${name}' is malformed`);\n for (const field of ['scheme', 'bearerFormat', 'in', 'name', 'description'] as const) {\n if (scheme[field] !== undefined && typeof scheme[field] !== 'string') {\n throw new Error(`API reference security scheme '${name}' has malformed '${field}'`);\n }\n }\n return {\n name,\n type: scheme.type,\n scheme: typeof scheme.scheme === 'string' ? scheme.scheme : null,\n bearerFormat: typeof scheme.bearerFormat === 'string' ? scheme.bearerFormat : null,\n location: typeof scheme.in === 'string' ? scheme.in : null,\n parameterName: typeof scheme.name === 'string' ? scheme.name : null,\n description: typeof scheme.description === 'string' ? scheme.description : null,\n };\n }).sort((left, right) => left.name.localeCompare(right.name));\n}\n\nfunction access(value: unknown): ApiReferenceAccess {\n if (!isRecord(value) || typeof value.authenticationMode !== 'string' || typeof value.authenticationSummary !== 'string' || !Array.isArray(value.roleRequirements)) {\n throw new Error('API reference operation has no valid x-wildo access contract');\n }\n const roleRequirements = value.roleRequirements.map((requirement) => {\n if (!isRecord(requirement) || typeof requirement.role !== 'string' || typeof requirement.label !== 'string') {\n throw new Error('API reference operation has a malformed x-wildo role requirement');\n }\n if (requirement.businessRole !== null && requirement.businessRole !== undefined && typeof requirement.businessRole !== 'string') {\n throw new Error('API reference operation has a malformed role business explanation');\n }\n if (requirement.authorityBoundary !== null && requirement.authorityBoundary !== undefined && typeof requirement.authorityBoundary !== 'string') {\n throw new Error('API reference operation has a malformed role authority boundary');\n }\n return {\n role: requirement.role,\n label: requirement.label,\n businessRole: typeof requirement.businessRole === 'string' ? requirement.businessRole : null,\n authorityBoundary: typeof requirement.authorityBoundary === 'string' ? requirement.authorityBoundary : null,\n };\n });\n return {\n authenticationMode: value.authenticationMode,\n authenticationSummary: value.authenticationSummary,\n roleRequirements,\n };\n}\n\nfunction componentSchemaReference(value: unknown): { readonly name: string; readonly anchorId: string } | null {\n if (!isRecord(value) || typeof value.$ref !== 'string') return null;\n const schemaName = value.$ref.match(/^#\\/components\\/schemas\\/([^/]+)$/)?.[1];\n return schemaName === undefined\n ? { name: value.$ref, anchorId: null }\n : {\n name: schemaName,\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.COMPONENT_SCHEMA, schemaName }),\n };\n}\n\nfunction serializeExampleJson(value: unknown): string | null {\n if (value === undefined) return null;\n try {\n const serialized = JSON.stringify(value, null, 2);\n return typeof serialized === 'string' ? serialized : null;\n } catch {\n // A malformed external OpenAPI document must not make the reference page\n // unusable merely because an example cannot be represented as JSON.\n return null;\n }\n}\n\nfunction schemaConstraint(\n schema: UnknownRecord,\n kind: ApiReferenceSchemaConstraintKind,\n): ApiReferenceSchemaConstraint | null {\n const jsonValue = serializeExampleJson(schema[kind]);\n return jsonValue === null ? null : { kind, jsonValue };\n}\n\nfunction schemaNodeOrThrow(value: unknown, owner: string): ApiReferenceSchemaNode {\n const schema = schemaNode(value);\n if (schema === null) throw new Error(`API reference ${owner} has a malformed OpenAPI schema`);\n return schema;\n}\n\n/**\n * Recursively projects only fields supplied by the OpenAPI Schema Object.\n *\n * semantic-literal-boundary: OpenAPI 3.1 Schema Object keywords are translated\n * once at this browser boundary; React consumes the named model exclusively.\n */\nfunction schemaNode(value: unknown): ApiReferenceSchemaNode | null {\n if (typeof value === 'boolean') {\n return {\n booleanSchema: value,\n referenceName: null,\n referenceAnchorId: null,\n types: [],\n description: null,\n format: null,\n properties: [],\n items: null,\n compositions: [],\n enumValues: [],\n constValue: null,\n defaultValue: null,\n constraints: [],\n additionalProperties: null,\n };\n }\n if (!isRecord(value)) return null;\n\n const reference = componentSchemaReference(value);\n const requiredPropertyNames = Array.isArray(value.required)\n ? new Set(value.required.filter((propertyName): propertyName is string => typeof propertyName === 'string'))\n : new Set<string>();\n const properties = isRecord(value.properties)\n ? Object.entries(value.properties).map(([name, propertySchema]) => ({\n name,\n required: requiredPropertyNames.has(name),\n schema: schemaNodeOrThrow(propertySchema, `property '${name}'`),\n })).sort((left, right) => left.name.localeCompare(right.name))\n : [];\n const compositionSources: ReadonlyArray<readonly [ApiReferenceSchemaCompositionKind, unknown]> = [\n [ApiReferenceSchemaCompositionKind.ONE_OF, value.oneOf],\n [ApiReferenceSchemaCompositionKind.ANY_OF, value.anyOf],\n [ApiReferenceSchemaCompositionKind.ALL_OF, value.allOf],\n ];\n const compositions = compositionSources.flatMap(([kind, branches]) => {\n if (!Array.isArray(branches)) return [];\n return [{ kind, branches: branches.map((branch, index) => schemaNodeOrThrow(branch, `${kind} branch ${index}`)) }];\n });\n const enumDescriptions = isRecord(value['x-enum-descriptions']) ? value['x-enum-descriptions'] : {};\n const enumValues = Array.isArray(value.enum)\n ? value.enum.flatMap((enumValue) => {\n const jsonValue = serializeExampleJson(enumValue);\n if (jsonValue === null) return [];\n const description = enumDescriptions[String(enumValue)];\n return [{ jsonValue, description: typeof description === 'string' ? description : null }];\n })\n : [];\n const types = typeof value.type === 'string'\n ? [value.type]\n : Array.isArray(value.type)\n ? value.type.filter((type): type is string => typeof type === 'string')\n : [];\n const additionalProperties = value.additionalProperties === undefined\n ? null\n : typeof value.additionalProperties === 'boolean'\n ? value.additionalProperties\n : schemaNodeOrThrow(value.additionalProperties, 'additionalProperties');\n\n return {\n booleanSchema: null,\n referenceName: reference?.name ?? null,\n referenceAnchorId: reference?.anchorId ?? null,\n types,\n description: typeof value.description === 'string' ? value.description : null,\n format: typeof value.format === 'string' ? value.format : null,\n properties,\n items: value.items === undefined ? null : schemaNodeOrThrow(value.items, 'array items'),\n compositions,\n enumValues,\n constValue: serializeExampleJson(value.const),\n defaultValue: serializeExampleJson(value.default),\n constraints: [\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MINIMUM),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAXIMUM),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.EXCLUSIVE_MINIMUM),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.EXCLUSIVE_MAXIMUM),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MULTIPLE_OF),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MIN_LENGTH),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAX_LENGTH),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.PATTERN),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MIN_ITEMS),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAX_ITEMS),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.UNIQUE_ITEMS),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MIN_PROPERTIES),\n schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAX_PROPERTIES),\n ].filter((constraint): constraint is ApiReferenceSchemaConstraint => constraint !== null),\n additionalProperties,\n };\n}\n\nfunction openApiExamples(value: unknown): readonly ApiReferenceExample[] {\n if (!isRecord(value)) return [];\n return Object.entries(value)\n .map(([name, example]) => {\n if (!isRecord(example)) return null;\n return {\n name,\n summary: typeof example.summary === 'string' ? example.summary : null,\n description: typeof example.description === 'string' ? example.description : null,\n jsonValue: serializeExampleJson(example.value),\n externalValue: typeof example.externalValue === 'string' ? example.externalValue : null,\n };\n })\n .filter((example): example is ApiReferenceExample => example !== null)\n .sort((left, right) => left.name.localeCompare(right.name));\n}\n\nfunction mediaTypes(value: unknown): readonly ApiReferenceMediaType[] {\n if (!isRecord(value)) return [];\n return Object.entries(value).map(([mediaType, representation]) => {\n if (!isRecord(representation)) return { mediaType, schema: null, examples: [] };\n const namedExamples = openApiExamples(representation.examples);\n const inlineExample = representation.example === undefined\n ? []\n : [{ name: 'Example', summary: null, description: null, jsonValue: serializeExampleJson(representation.example), externalValue: null }];\n return {\n mediaType,\n schema: representation.schema === undefined ? null : schemaNodeOrThrow(representation.schema, `media type '${mediaType}'`),\n examples: [...namedExamples, ...inlineExample],\n };\n }).sort((a, b) => a.mediaType.localeCompare(b.mediaType));\n}\n\n/** Projects reusable OpenAPI components without re-authoring their schema meaning in React. */\nfunction componentSchemas(value: unknown): readonly ApiReferenceComponentSchema[] {\n if (!isRecord(value)) return [];\n return Object.entries(value).map(([name, sourceSchema]) => {\n const schema = schemaNodeOrThrow(sourceSchema, `component schema '${name}'`);\n return {\n name,\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.COMPONENT_SCHEMA, schemaName: name }),\n schema,\n };\n }).sort((left, right) => left.name.localeCompare(right.name));\n}\n\nfunction parameter(value: unknown): ApiReferenceParameter | null {\n if (!isRecord(value) || typeof value.name !== 'string' || typeof value.in !== 'string') return null;\n const namedExamples = openApiExamples(value.examples);\n const inlineExample = value.example === undefined\n ? []\n : [{ name: 'Example', summary: null, description: null, jsonValue: serializeExampleJson(value.example), externalValue: null }];\n return {\n name: value.name,\n location: value.in,\n required: value.required === true,\n description: typeof value.description === 'string' ? value.description : null,\n schema: value.schema === undefined ? null : schemaNodeOrThrow(value.schema, `parameter '${value.name}'`),\n // Parameter Object supports the same named-example and single-inline-example\n // forms as Media Type Object. Preserve either form from external OpenAPI;\n // source generation currently emits the named form for query inputs.\n examples: [...namedExamples, ...inlineExample],\n };\n}\n\nfunction requestBody(value: unknown, operationId: string): ApiReferenceRequestBody | null {\n if (!isRecord(value)) return null;\n return {\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.REQUEST, operationId }),\n required: value.required === true,\n mediaTypes: mediaTypes(value.content),\n };\n}\n\nfunction responses(value: unknown, operationId: string): readonly ApiReferenceResponse[] {\n if (!isRecord(value)) return [];\n return Object.entries(value).map(([status, response]) => ({\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESPONSE, operationId, status }),\n status,\n description: isRecord(response) && typeof response.description === 'string' ? response.description : null,\n mediaTypes: isRecord(response) ? mediaTypes(response.content) : [],\n })).sort((a, b) => a.status.localeCompare(b.status, undefined, { numeric: true }));\n}\n\nfunction securitySchemes(value: unknown): readonly string[] {\n if (!Array.isArray(value)) return [];\n return [...new Set(value.flatMap((requirement) => isRecord(requirement) ? Object.keys(requirement) : []))].sort((a, b) => a.localeCompare(b));\n}\n\nfunction resourceRelationships(value: unknown): readonly ApiReferenceResourceRelationship[] {\n if (!Array.isArray(value)) return [];\n return value.map((relationship, index) => {\n if (!isRecord(relationship)\n || typeof relationship.relatedResourceName !== 'string'\n || typeof relationship.resourceCardinality !== 'string'\n || typeof relationship.relatedResourceCardinality !== 'string'\n || typeof relationship.nature !== 'string'\n || typeof relationship.lifecycleModel !== 'string') {\n throw new Error(`API reference resource relationship at index ${index} is malformed`);\n }\n const parentDelete = relationship.onParentDelete;\n if (parentDelete !== undefined && (!isRecord(parentDelete)\n || typeof parentDelete.enabled !== 'boolean'\n || typeof parentDelete.mode !== 'string'\n || typeof parentDelete.strategy !== 'string'\n || typeof parentDelete.maxDepth !== 'number')) {\n throw new Error(`API reference resource relationship at index ${index} has malformed parent-delete lifecycle`);\n }\n return {\n relatedResourceName: relationship.relatedResourceName,\n relatedResourceLabel: relationship.relatedResourceName,\n foreignKeyField: typeof relationship.foreignKeyField === 'string' ? relationship.foreignKeyField : null,\n resourceCardinality: relationship.resourceCardinality,\n relatedResourceCardinality: relationship.relatedResourceCardinality,\n nature: relationship.nature,\n lifecycleModel: relationship.lifecycleModel,\n onParentDelete: isRecord(parentDelete) ? {\n enabled: parentDelete.enabled as boolean,\n mode: parentDelete.mode as string,\n strategy: parentDelete.strategy as string,\n maxDepth: parentDelete.maxDepth as number,\n // semantic-literal-boundary: the wire value of ResourceRelationshipDocumentationDeleteStrategy.REFUSE_WHILE_CHILDREN_EXIST, read from the published OpenAPI document this runtime model parses without importing the companion schemas.\n refusesWhileChildrenExist: parentDelete.strategy === 'refuse_while_children_exist',\n } : null,\n };\n });\n}\n\n/** Parses the strict category contract carried by `tags[].x-wildo.category`. */\nfunction resourceCategory(value: unknown): ApiReferenceResourceCategory | null {\n if (value === undefined) return null;\n if (!isRecord(value) || typeof value.id !== 'string' || typeof value.label !== 'string') {\n throw new Error('API reference resource tag has malformed x-wildo category');\n }\n if (value.description !== undefined && typeof value.description !== 'string') {\n throw new Error('API reference resource tag has malformed category description');\n }\n return {\n id: value.id,\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.CATEGORY, categoryName: value.id }),\n label: value.label,\n description: typeof value.description === 'string' ? value.description : null,\n };\n}\n\nfunction operationFamilyLabel(familyRef: string): string {\n const identifier = familyRef.split('/operation-family/').at(-1)?.split('/').at(0) ?? familyRef;\n // invented-display-text: generated API REFERENCE prose. The technical-doc lane has no label tree\n // and is not translated — the identifier it renders is the API's own public name.\n return identifier.replace(/([a-z])([A-Z])/g, '$1 $2').replace(/[-_]/g, ' ').replace(/^./, (character) => character.toUpperCase());\n}\n\n/**\n * Presentation-only fallback for a resource whose related tag is absent from\n * this section (for example, a cron-only resource). It never changes the\n * canonical resource identity; it only prevents raw camelCase identifiers from\n * leaking into the reference when no source-authored display tag is available.\n */\nfunction resourceDisplayLabel(identifier: string): string {\n // invented-display-text: generated API reference prose, as above.\n return identifier\n .replace(/([a-z0-9])([A-Z])/g, '$1 $2')\n .replace(/[-_]/g, ' ')\n .replace(/\\b\\w/g, (character) => character.toUpperCase());\n}\n\n/** Creates the two-level resource → operation-family view from OpenAPI. */\nexport function createApiReferenceModel(document: unknown): ApiReferenceModel {\n if (!isRecord(document) || !isRecord(document.paths)) throw new Error('API reference document has no OpenAPI paths object');\n const info = documentInfo(document.info);\n const resourceTags = new Map<string, {\n readonly resourceRef: string;\n readonly label: string;\n readonly description: string | null;\n readonly category: ApiReferenceResourceCategory | null;\n readonly lifecycleRole: string | null;\n readonly relationships: readonly ApiReferenceResourceRelationship[];\n }>();\n if (Array.isArray(document.tags)) {\n for (const tag of document.tags) {\n if (isRecord(tag) && typeof tag.name === 'string') {\n if (!isRecord(tag['x-wildo']) || typeof tag['x-wildo'].resourceRef !== 'string') {\n throw new Error(`API reference resource tag '${tag.name}' has no x-wildo resource identity`);\n }\n if (resourceTags.has(tag.name)) throw new Error(`API reference resource tag is duplicated: ${tag.name}`);\n resourceTags.set(tag.name, {\n resourceRef: tag['x-wildo'].resourceRef,\n label: typeof tag['x-displayName'] === 'string' ? tag['x-displayName'] : resourceDisplayLabel(tag.name),\n description: typeof tag.description === 'string' ? tag.description : null,\n category: resourceCategory(tag['x-wildo'].category),\n lifecycleRole: typeof tag['x-wildo'].lifecycleRole === 'string' ? tag['x-wildo'].lifecycleRole : null,\n relationships: resourceRelationships(tag['x-wildo'].relationships),\n });\n }\n }\n }\n const resources = new Map<string, Map<string, ApiReferenceVariant[]>>();\n const operationIds = new Set<string>();\n const operationVariantRefs = new Set<string>();\n for (const [path, item] of Object.entries(document.paths)) {\n if (!isRecord(item)) continue;\n for (const [method, operation] of Object.entries(item)) {\n if (!OPENAPI_HTTP_METHODS.has(method)) continue;\n if (!isRecord(operation)) throw new Error(`API reference ${method.toUpperCase()} ${path} operation is malformed`);\n if (!isRecord(operation['x-wildo'])) throw new Error(`API reference ${method.toUpperCase()} ${path} operation has no x-wildo identity`);\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 operation has malformed x-wildo identity');\n }\n if (metadata.path !== path || metadata.httpVerb !== method.toLowerCase()) throw new Error('API reference operation x-wildo identity does not match its OpenAPI method/path');\n if (typeof operation.operationId !== 'string' || operation.operationId.length === 0) throw new Error('API reference operation has no operationId');\n if (operationIds.has(operation.operationId)) throw new Error(`API reference operationId is duplicated: ${operation.operationId}`);\n operationIds.add(operation.operationId);\n if (operationVariantRefs.has(metadata.operationVariantRef)) throw new Error(`API reference operation variant identity is duplicated: ${metadata.operationVariantRef}`);\n operationVariantRefs.add(metadata.operationVariantRef);\n const resource = resources.get(metadata.resourceRef) ?? new Map<string, ApiReferenceVariant[]>();\n const family = resource.get(metadata.operationFamilyRef) ?? [];\n family.push({\n variantRef: metadata.operationVariantRef,\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.OPERATION, operationId: operation.operationId }),\n operationId: operation.operationId,\n summary: typeof operation.summary === 'string' ? operation.summary : `${method.toUpperCase()} ${path}`,\n description: typeof operation.description === 'string' ? operation.description : null,\n method: method.toUpperCase(),\n path,\n access: access(metadata.access),\n securitySchemes: securitySchemes(operation.security),\n parameters: Array.isArray(operation.parameters) ? operation.parameters.map(parameter).filter((item): item is ApiReferenceParameter => item !== null) : [],\n requestBody: requestBody(operation.requestBody, operation.operationId),\n responses: responses(operation.responses, operation.operationId),\n idempotent: typeof operation['x-idempotent'] === 'boolean' ? operation['x-idempotent'] : null,\n });\n resource.set(metadata.operationFamilyRef, family);\n resources.set(metadata.resourceRef, resource);\n }\n }\n const result = [...resources.entries()].map(([resourceRef, families]) => {\n const tagName = resourceRef.split('/').at(-1) ?? resourceRef;\n const tag = resourceTags.get(tagName);\n if (tag === undefined) throw new Error(`API reference resource '${resourceRef}' has no generated OpenAPI tag`);\n if (tag.resourceRef !== resourceRef) throw new Error(`API reference tag '${tagName}' resource identity does not match its operation identities`);\n return {\n resourceRef,\n anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESOURCE, resourceName: tagName }),\n label: tag.label,\n category: tag.category,\n description: tag.description,\n lifecycleRole: tag.lifecycleRole,\n relationships: tag.relationships.map((relationship) => ({\n ...relationship,\n relatedResourceLabel: resourceTags.get(relationship.relatedResourceName)?.label ?? resourceDisplayLabel(relationship.relatedResourceName),\n })),\n families: [...families.entries()].map(([familyRef, variants]) => ({\n familyRef,\n anchorId: apiReferenceTargetFragment({\n kind: ApiReferenceTargetKind.OPERATION_FAMILY,\n resourceName: tagName,\n operationName: familyRef.split('/').at(-1) ?? familyRef,\n }),\n label: operationFamilyLabel(familyRef),\n variants: variants.sort((a, b) => `${a.path}:${a.method}`.localeCompare(`${b.path}:${b.method}`)),\n })).sort((a, b) => a.familyRef.localeCompare(b.familyRef)),\n };\n }).sort((a, b) => a.label.localeCompare(b.label));\n const parsedComponentSchemas = componentSchemas(isRecord(document.components) ? document.components.schemas : undefined);\n assertCategoryMetadataIsConsistent(result);\n assertPublicAnchorsAreUnique(result, parsedComponentSchemas);\n return {\n title: info.title,\n description: info.description,\n servers: documentServers(document.servers),\n securitySchemes: documentSecuritySchemes(isRecord(document.components) ? document.components.securitySchemes : undefined),\n resources: result,\n componentSchemas: parsedComponentSchemas,\n operationCount: result.flatMap((resource) => resource.families).reduce((count, family) => count + family.variants.length, 0),\n };\n}\n\n/** A category id has one source-owned label and description throughout one document. */\nfunction assertCategoryMetadataIsConsistent(resources: readonly ApiReferenceResource[]): void {\n const categories = new Map<string, ApiReferenceResourceCategory>();\n for (const resource of resources) {\n if (resource.category === null) continue;\n const prior = categories.get(resource.category.id);\n if (prior !== undefined && (prior.label !== resource.category.label || prior.description !== resource.category.description)) {\n throw new Error(`API reference category '${resource.category.id}' has inconsistent source metadata`);\n }\n categories.set(resource.category.id, resource.category);\n }\n}\n\n/**\n * Public fragments must remain readable, but readability cannot excuse a\n * collision. Rejecting a collision keeps copied links deterministic and makes\n * the source identity that needs refinement visible to the generator owner.\n */\nfunction assertPublicAnchorsAreUnique(\n resources: readonly ApiReferenceResource[],\n schemas: readonly ApiReferenceComponentSchema[],\n): void {\n const ownerByAnchor = new Map<string, string>();\n const claim = (anchorId: string, owner: string): void => {\n const existingOwner = ownerByAnchor.get(anchorId);\n if (existingOwner !== undefined) {\n throw new Error(`API reference public fragment '${anchorId}' collides between ${existingOwner} and ${owner}`);\n }\n ownerByAnchor.set(anchorId, owner);\n };\n const categories = new Map(resources.flatMap((resource) => resource.category === null ? [] : [[resource.category.id, resource.category] as const]));\n categories.forEach((category) => claim(category.anchorId, `category '${category.id}'`));\n resources.forEach((resource) => {\n claim(resource.anchorId, resource.resourceRef);\n resource.families.forEach((family) => {\n claim(family.anchorId, family.familyRef);\n family.variants.forEach((variant) => {\n claim(variant.anchorId, variant.variantRef);\n if (variant.requestBody !== null) claim(variant.requestBody.anchorId, `${variant.variantRef}:request`);\n variant.responses.forEach((response) => claim(response.anchorId, `${variant.variantRef}:response:${response.status}`));\n });\n });\n });\n schemas.forEach((schema) => claim(schema.anchorId, `components.schemas.${schema.name}`));\n}\n"]}
|
|
@@ -140,7 +140,7 @@ function ResourceReference({ resource, activeFragment }) {
|
|
|
140
140
|
}
|
|
141
141
|
function RelationshipSemantics({ relationships }) {
|
|
142
142
|
return _jsxs("details", { className: "margin-bottom--lg", children: [_jsxs("summary", { children: ["Data relationships (", relationships.length, ")"] }), _jsx("ul", { className: "margin-top--md", children: relationships.map((relationship, index) => _jsxs("li", { children: [_jsx("strong", { children: relationship.relatedResourceLabel }), relationship.foreignKeyField !== null ? _jsxs(_Fragment, { children: [" via ", _jsx("code", { children: relationship.foreignKeyField })] }) : null, ": ", relationship.nature, " relationship (", relationship.resourceCardinality, " to ", relationship.relatedResourceCardinality, "); lifecycle: ", relationship.lifecycleModel, ".", relationship.onParentDelete !== null
|
|
143
|
-
? _jsxs(_Fragment, { children: [" Parent-delete policy: ", relationship.onParentDelete.enabled ? `${relationship.onParentDelete.strategy} (${relationship.onParentDelete.mode}, depth ${relationship.onParentDelete.maxDepth})
|
|
143
|
+
? _jsxs(_Fragment, { children: [" Parent-delete policy: ", !relationship.onParentDelete.enabled ? 'does not cascade' : relationship.onParentDelete.refusesWhileChildrenExist ? relationship.onParentDelete.strategy : `${relationship.onParentDelete.strategy} (${relationship.onParentDelete.mode}, depth ${relationship.onParentDelete.maxDepth})`, "."] })
|
|
144
144
|
: null] }, `${relationship.relatedResourceName}:${relationship.foreignKeyField ?? 'none'}:${relationship.nature}:${index}`)) })] });
|
|
145
145
|
}
|
|
146
146
|
function clearResourceSelection() {
|