@wildo-ai/saas-technical-doc 1.1.1

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.
Files changed (216) hide show
  1. package/LICENSE +34 -0
  2. package/dist/esm/.builder.pid +9 -0
  3. package/dist/esm/build/csp-emit.d.ts +9 -0
  4. package/dist/esm/build/csp-emit.d.ts.map +1 -0
  5. package/dist/esm/build/csp-emit.js +8 -0
  6. package/dist/esm/build/csp-emit.js.map +1 -0
  7. package/dist/esm/build/load-materialized-frontend-providers.d.ts +9 -0
  8. package/dist/esm/build/load-materialized-frontend-providers.d.ts.map +1 -0
  9. package/dist/esm/build/load-materialized-frontend-providers.js +9 -0
  10. package/dist/esm/build/load-materialized-frontend-providers.js.map +1 -0
  11. package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts +66 -0
  12. package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts.map +1 -0
  13. package/dist/esm/companion/application-documentation/application-organization-role-documentation.js +195 -0
  14. package/dist/esm/companion/application-documentation/application-organization-role-documentation.js.map +1 -0
  15. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.d.ts +36 -0
  16. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.d.ts.map +1 -0
  17. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js +71 -0
  18. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.js.map +1 -0
  19. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts +37 -0
  20. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -0
  21. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js +1865 -0
  22. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js.map +1 -0
  23. package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.d.ts +22 -0
  24. package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.d.ts.map +1 -0
  25. package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.js +31 -0
  26. package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.js.map +1 -0
  27. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts +31 -0
  28. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -0
  29. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js +33 -0
  30. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js.map +1 -0
  31. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts +13 -0
  32. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts.map +1 -0
  33. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js +93 -0
  34. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js.map +1 -0
  35. package/dist/esm/companion/content/application-consumer-documentation-content-loader.d.ts +52 -0
  36. package/dist/esm/companion/content/application-consumer-documentation-content-loader.d.ts.map +1 -0
  37. package/dist/esm/companion/content/application-consumer-documentation-content-loader.js +191 -0
  38. package/dist/esm/companion/content/application-consumer-documentation-content-loader.js.map +1 -0
  39. package/dist/esm/companion/index.d.ts +39 -0
  40. package/dist/esm/companion/index.d.ts.map +1 -0
  41. package/dist/esm/companion/index.js +39 -0
  42. package/dist/esm/companion/index.js.map +1 -0
  43. package/dist/esm/companion/openapi-generator.d.ts +94 -0
  44. package/dist/esm/companion/openapi-generator.d.ts.map +1 -0
  45. package/dist/esm/companion/openapi-generator.js +1562 -0
  46. package/dist/esm/companion/openapi-generator.js.map +1 -0
  47. package/dist/esm/companion/operation-projection.schemas.d.ts +797 -0
  48. package/dist/esm/companion/operation-projection.schemas.d.ts.map +1 -0
  49. package/dist/esm/companion/operation-projection.schemas.js +610 -0
  50. package/dist/esm/companion/operation-projection.schemas.js.map +1 -0
  51. package/dist/esm/companion/publish-result.types.d.ts +124 -0
  52. package/dist/esm/companion/publish-result.types.d.ts.map +1 -0
  53. package/dist/esm/companion/publish-result.types.js +28 -0
  54. package/dist/esm/companion/publish-result.types.js.map +1 -0
  55. package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.d.ts +26 -0
  56. package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.d.ts.map +1 -0
  57. package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.js +63 -0
  58. package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.js.map +1 -0
  59. package/dist/esm/companion/rendering/technical-documentation-build-measurement.d.ts +23 -0
  60. package/dist/esm/companion/rendering/technical-documentation-build-measurement.d.ts.map +1 -0
  61. package/dist/esm/companion/rendering/technical-documentation-build-measurement.js +104 -0
  62. package/dist/esm/companion/rendering/technical-documentation-build-measurement.js.map +1 -0
  63. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts +9 -0
  64. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts.map +1 -0
  65. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js +421 -0
  66. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js.map +1 -0
  67. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts +72 -0
  68. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts.map +1 -0
  69. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js +204 -0
  70. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js.map +1 -0
  71. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts +9 -0
  72. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts.map +1 -0
  73. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js +106 -0
  74. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js.map +1 -0
  75. package/dist/esm/companion/rendering/technical-documentation-mdx-escaping.d.ts +43 -0
  76. package/dist/esm/companion/rendering/technical-documentation-mdx-escaping.d.ts.map +1 -0
  77. package/dist/esm/companion/rendering/technical-documentation-mdx-escaping.js +88 -0
  78. package/dist/esm/companion/rendering/technical-documentation-mdx-escaping.js.map +1 -0
  79. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts +7 -0
  80. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts.map +1 -0
  81. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.js +51 -0
  82. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.js.map +1 -0
  83. package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts +45 -0
  84. package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts.map +1 -0
  85. package/dist/esm/companion/rendering/technical-documentation-render-model.js +178 -0
  86. package/dist/esm/companion/rendering/technical-documentation-render-model.js.map +1 -0
  87. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts +3 -0
  88. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts.map +1 -0
  89. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js +49 -0
  90. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js.map +1 -0
  91. package/dist/esm/companion/spec-to-operation-doc.d.ts +176 -0
  92. package/dist/esm/companion/spec-to-operation-doc.d.ts.map +1 -0
  93. package/dist/esm/companion/spec-to-operation-doc.js +326 -0
  94. package/dist/esm/companion/spec-to-operation-doc.js.map +1 -0
  95. package/dist/esm/companion/technical-documentation-asset-path.d.ts +16 -0
  96. package/dist/esm/companion/technical-documentation-asset-path.d.ts.map +1 -0
  97. package/dist/esm/companion/technical-documentation-asset-path.js +19 -0
  98. package/dist/esm/companion/technical-documentation-asset-path.js.map +1 -0
  99. package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts +14 -0
  100. package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts.map +1 -0
  101. package/dist/esm/companion/technical-documentation-capture-execution-port.js +1 -0
  102. package/dist/esm/companion/technical-documentation-capture-execution-port.js.map +1 -0
  103. package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts +25 -0
  104. package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts.map +1 -0
  105. package/dist/esm/companion/technical-documentation-diagram-materializer.js +86 -0
  106. package/dist/esm/companion/technical-documentation-diagram-materializer.js.map +1 -0
  107. package/dist/esm/companion/technical-documentation-placeholder-materializer.d.ts +17 -0
  108. package/dist/esm/companion/technical-documentation-placeholder-materializer.d.ts.map +1 -0
  109. package/dist/esm/companion/technical-documentation-placeholder-materializer.js +63 -0
  110. package/dist/esm/companion/technical-documentation-placeholder-materializer.js.map +1 -0
  111. package/dist/esm/companion/zod-to-openapi.d.ts +67 -0
  112. package/dist/esm/companion/zod-to-openapi.d.ts.map +1 -0
  113. package/dist/esm/companion/zod-to-openapi.js +211 -0
  114. package/dist/esm/companion/zod-to-openapi.js.map +1 -0
  115. package/dist/esm/companion-exports.d.ts +32 -0
  116. package/dist/esm/companion-exports.d.ts.map +1 -0
  117. package/dist/esm/companion-exports.js +32 -0
  118. package/dist/esm/companion-exports.js.map +1 -0
  119. package/dist/esm/config/define-tech-doc-config.d.ts +38 -0
  120. package/dist/esm/config/define-tech-doc-config.d.ts.map +1 -0
  121. package/dist/esm/config/define-tech-doc-config.js +40 -0
  122. package/dist/esm/config/define-tech-doc-config.js.map +1 -0
  123. package/dist/esm/config/index.d.ts +22 -0
  124. package/dist/esm/config/index.d.ts.map +1 -0
  125. package/dist/esm/config/index.js +22 -0
  126. package/dist/esm/config/index.js.map +1 -0
  127. package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts +204 -0
  128. package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts.map +1 -0
  129. package/dist/esm/config/wildo-tech-doc-config.schemas.js +192 -0
  130. package/dist/esm/config/wildo-tech-doc-config.schemas.js.map +1 -0
  131. package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts +82 -0
  132. package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts.map +1 -0
  133. package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.js +114 -0
  134. package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.js.map +1 -0
  135. package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts +420 -0
  136. package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -0
  137. package/dist/esm/content/application-consumer-documentation-content.techdoc.js +9619 -0
  138. package/dist/esm/content/application-consumer-documentation-content.techdoc.js.map +1 -0
  139. package/dist/esm/content.exports.d.ts +9 -0
  140. package/dist/esm/content.exports.d.ts.map +1 -0
  141. package/dist/esm/content.exports.js +9 -0
  142. package/dist/esm/content.exports.js.map +1 -0
  143. package/dist/esm/index.d.ts +26 -0
  144. package/dist/esm/index.d.ts.map +1 -0
  145. package/dist/esm/index.js +26 -0
  146. package/dist/esm/index.js.map +1 -0
  147. package/dist/esm/openapi/api-reference-link-index.d.ts +98 -0
  148. package/dist/esm/openapi/api-reference-link-index.d.ts.map +1 -0
  149. package/dist/esm/openapi/api-reference-link-index.js +301 -0
  150. package/dist/esm/openapi/api-reference-link-index.js.map +1 -0
  151. package/dist/esm/openapi/api-reference-targets.d.ts +71 -0
  152. package/dist/esm/openapi/api-reference-targets.d.ts.map +1 -0
  153. package/dist/esm/openapi/api-reference-targets.js +114 -0
  154. package/dist/esm/openapi/api-reference-targets.js.map +1 -0
  155. package/dist/esm/openapi/index.d.ts +20 -0
  156. package/dist/esm/openapi/index.d.ts.map +1 -0
  157. package/dist/esm/openapi/index.js +20 -0
  158. package/dist/esm/openapi/index.js.map +1 -0
  159. package/dist/esm/openapi/openapi-generation-output.schemas.d.ts +80 -0
  160. package/dist/esm/openapi/openapi-generation-output.schemas.d.ts.map +1 -0
  161. package/dist/esm/openapi/openapi-generation-output.schemas.js +76 -0
  162. package/dist/esm/openapi/openapi-generation-output.schemas.js.map +1 -0
  163. package/dist/esm/openapi-reference-model.exports.d.ts +10 -0
  164. package/dist/esm/openapi-reference-model.exports.d.ts.map +1 -0
  165. package/dist/esm/openapi-reference-model.exports.js +10 -0
  166. package/dist/esm/openapi-reference-model.exports.js.map +1 -0
  167. package/dist/esm/runtime/AuthExchangePage.d.ts +84 -0
  168. package/dist/esm/runtime/AuthExchangePage.d.ts.map +1 -0
  169. package/dist/esm/runtime/AuthExchangePage.js +188 -0
  170. package/dist/esm/runtime/AuthExchangePage.js.map +1 -0
  171. package/dist/esm/runtime/DocsAuthContext.d.ts +119 -0
  172. package/dist/esm/runtime/DocsAuthContext.d.ts.map +1 -0
  173. package/dist/esm/runtime/DocsAuthContext.js +171 -0
  174. package/dist/esm/runtime/DocsAuthContext.js.map +1 -0
  175. package/dist/esm/runtime/decode-jwt-claims.d.ts +39 -0
  176. package/dist/esm/runtime/decode-jwt-claims.d.ts.map +1 -0
  177. package/dist/esm/runtime/decode-jwt-claims.js +86 -0
  178. package/dist/esm/runtime/decode-jwt-claims.js.map +1 -0
  179. package/dist/esm/runtime/docs-auth-client.d.ts +193 -0
  180. package/dist/esm/runtime/docs-auth-client.d.ts.map +1 -0
  181. package/dist/esm/runtime/docs-auth-client.js +211 -0
  182. package/dist/esm/runtime/docs-auth-client.js.map +1 -0
  183. package/dist/esm/runtime/docs-auth-session.schemas.d.ts +77 -0
  184. package/dist/esm/runtime/docs-auth-session.schemas.d.ts.map +1 -0
  185. package/dist/esm/runtime/docs-auth-session.schemas.js +50 -0
  186. package/dist/esm/runtime/docs-auth-session.schemas.js.map +1 -0
  187. package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts +17 -0
  188. package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts.map +1 -0
  189. package/dist/esm/runtime/frontend-provider-registry.techdoc.js +23 -0
  190. package/dist/esm/runtime/frontend-provider-registry.techdoc.js.map +1 -0
  191. package/dist/esm/runtime/index.d.ts +57 -0
  192. package/dist/esm/runtime/index.d.ts.map +1 -0
  193. package/dist/esm/runtime/index.js +76 -0
  194. package/dist/esm/runtime/index.js.map +1 -0
  195. package/dist/esm/runtime/openapi-reference-conservation.d.ts +20 -0
  196. package/dist/esm/runtime/openapi-reference-conservation.d.ts.map +1 -0
  197. package/dist/esm/runtime/openapi-reference-conservation.js +102 -0
  198. package/dist/esm/runtime/openapi-reference-conservation.js.map +1 -0
  199. package/dist/esm/runtime/openapi-reference-model.d.ts +224 -0
  200. package/dist/esm/runtime/openapi-reference-model.d.ts.map +1 -0
  201. package/dist/esm/runtime/openapi-reference-model.js +579 -0
  202. package/dist/esm/runtime/openapi-reference-model.js.map +1 -0
  203. package/dist/esm/runtime/openapi-reference-view.d.ts +13 -0
  204. package/dist/esm/runtime/openapi-reference-view.d.ts.map +1 -0
  205. package/dist/esm/runtime/openapi-reference-view.js +284 -0
  206. package/dist/esm/runtime/openapi-reference-view.js.map +1 -0
  207. package/dist/esm/runtime/use-docs-auth-session.d.ts +26 -0
  208. package/dist/esm/runtime/use-docs-auth-session.d.ts.map +1 -0
  209. package/dist/esm/runtime/use-docs-auth-session.js +34 -0
  210. package/dist/esm/runtime/use-docs-auth-session.js.map +1 -0
  211. package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts +3 -0
  212. package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts.map +1 -0
  213. package/dist/esm/runtime/use-docs-frontend-provider-registry.js +5 -0
  214. package/dist/esm/runtime/use-docs-frontend-provider-registry.js.map +1 -0
  215. package/dist/tsconfig.build.tsbuildinfo +1 -0
  216. package/package.json +117 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi-reference-model.d.ts","sourceRoot":"","sources":["../../../../src/runtime/openapi-reference-model.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,C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AAE,SAAS,0BAA0B,EAAE,CAAC;IAChE,QAAQ,CAAC,SAAS,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACpD,QAAQ,CAAC,gBAAgB,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAClE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,oEAAoE;AACpE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAqYD,2EAA2E;AAC3E,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,OAAO,GAAG,iBAAiB,CA6G5E"}
@@ -0,0 +1,579 @@
1
+ /**
2
+ * Browser-safe projection of one generated OpenAPI document.
3
+ *
4
+ * Navigation is derived in memory from the verified OpenAPI bytes. The model
5
+ * deliberately persists nothing and never invents API meaning: resource tags,
6
+ * `operationId`, standard OpenAPI method/path fields and `x-wildo` source
7
+ * identity are its only inputs.
8
+ */
9
+ import { ApiReferenceTargetKind, apiReferenceTargetFragment } from '../openapi/api-reference-targets.js';
10
+ /** OpenAPI composition keywords are distinct contracts, not interchangeable labels. */
11
+ export var ApiReferenceSchemaCompositionKind;
12
+ (function (ApiReferenceSchemaCompositionKind) {
13
+ ApiReferenceSchemaCompositionKind["ONE_OF"] = "oneOf";
14
+ ApiReferenceSchemaCompositionKind["ANY_OF"] = "anyOf";
15
+ ApiReferenceSchemaCompositionKind["ALL_OF"] = "allOf";
16
+ })(ApiReferenceSchemaCompositionKind || (ApiReferenceSchemaCompositionKind = {}));
17
+ /** Standard Schema Object constraint keywords preserved without interpretation. */
18
+ export var ApiReferenceSchemaConstraintKind;
19
+ (function (ApiReferenceSchemaConstraintKind) {
20
+ ApiReferenceSchemaConstraintKind["MINIMUM"] = "minimum";
21
+ ApiReferenceSchemaConstraintKind["MAXIMUM"] = "maximum";
22
+ ApiReferenceSchemaConstraintKind["EXCLUSIVE_MINIMUM"] = "exclusiveMinimum";
23
+ ApiReferenceSchemaConstraintKind["EXCLUSIVE_MAXIMUM"] = "exclusiveMaximum";
24
+ ApiReferenceSchemaConstraintKind["MULTIPLE_OF"] = "multipleOf";
25
+ ApiReferenceSchemaConstraintKind["MIN_LENGTH"] = "minLength";
26
+ ApiReferenceSchemaConstraintKind["MAX_LENGTH"] = "maxLength";
27
+ ApiReferenceSchemaConstraintKind["PATTERN"] = "pattern";
28
+ ApiReferenceSchemaConstraintKind["MIN_ITEMS"] = "minItems";
29
+ ApiReferenceSchemaConstraintKind["MAX_ITEMS"] = "maxItems";
30
+ ApiReferenceSchemaConstraintKind["UNIQUE_ITEMS"] = "uniqueItems";
31
+ ApiReferenceSchemaConstraintKind["MIN_PROPERTIES"] = "minProperties";
32
+ ApiReferenceSchemaConstraintKind["MAX_PROPERTIES"] = "maxProperties";
33
+ })(ApiReferenceSchemaConstraintKind || (ApiReferenceSchemaConstraintKind = {}));
34
+ /**
35
+ * OpenAPI path-item members that describe an HTTP operation. Other members,
36
+ * such as path-level parameters, are not individually navigable reference
37
+ * entries. Every member in this vocabulary must carry Wildo identity metadata:
38
+ * silently ignoring one would make the rendered reference incomplete.
39
+ */
40
+ const OPENAPI_HTTP_METHODS = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace']);
41
+ function isRecord(value) {
42
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
43
+ }
44
+ function documentInfo(value) {
45
+ if (value === undefined)
46
+ return { title: null, description: null };
47
+ if (!isRecord(value))
48
+ throw new Error('API reference document has malformed OpenAPI info');
49
+ if (value.title !== undefined && typeof value.title !== 'string')
50
+ throw new Error('API reference document has malformed OpenAPI info.title');
51
+ if (value.description !== undefined && typeof value.description !== 'string')
52
+ throw new Error('API reference document has malformed OpenAPI info.description');
53
+ return {
54
+ title: typeof value.title === 'string' ? value.title : null,
55
+ description: typeof value.description === 'string' ? value.description : null,
56
+ };
57
+ }
58
+ function documentServers(value) {
59
+ if (value === undefined)
60
+ return [];
61
+ if (!Array.isArray(value))
62
+ throw new Error('API reference document has malformed OpenAPI servers');
63
+ return value.map((server, index) => {
64
+ if (!isRecord(server) || typeof server.url !== 'string')
65
+ throw new Error(`API reference server at index ${index} has no URL`);
66
+ if (server.description !== undefined && typeof server.description !== 'string') {
67
+ throw new Error(`API reference server at index ${index} has a malformed description`);
68
+ }
69
+ return {
70
+ url: server.url,
71
+ description: typeof server.description === 'string' ? server.description : null,
72
+ };
73
+ });
74
+ }
75
+ function documentSecuritySchemes(value) {
76
+ if (value === undefined)
77
+ return [];
78
+ if (!isRecord(value))
79
+ throw new Error('API reference document has malformed OpenAPI security schemes');
80
+ return Object.entries(value).map(([name, scheme]) => {
81
+ if (!isRecord(scheme) || typeof scheme.type !== 'string')
82
+ throw new Error(`API reference security scheme '${name}' is malformed`);
83
+ for (const field of ['scheme', 'bearerFormat', 'in', 'name', 'description']) {
84
+ if (scheme[field] !== undefined && typeof scheme[field] !== 'string') {
85
+ throw new Error(`API reference security scheme '${name}' has malformed '${field}'`);
86
+ }
87
+ }
88
+ return {
89
+ name,
90
+ type: scheme.type,
91
+ scheme: typeof scheme.scheme === 'string' ? scheme.scheme : null,
92
+ bearerFormat: typeof scheme.bearerFormat === 'string' ? scheme.bearerFormat : null,
93
+ location: typeof scheme.in === 'string' ? scheme.in : null,
94
+ parameterName: typeof scheme.name === 'string' ? scheme.name : null,
95
+ description: typeof scheme.description === 'string' ? scheme.description : null,
96
+ };
97
+ }).sort((left, right) => left.name.localeCompare(right.name));
98
+ }
99
+ function access(value) {
100
+ if (!isRecord(value) || typeof value.authenticationMode !== 'string' || typeof value.authenticationSummary !== 'string' || !Array.isArray(value.roleRequirements)) {
101
+ throw new Error('API reference operation has no valid x-wildo access contract');
102
+ }
103
+ const roleRequirements = value.roleRequirements.map((requirement) => {
104
+ if (!isRecord(requirement) || typeof requirement.role !== 'string' || typeof requirement.label !== 'string') {
105
+ throw new Error('API reference operation has a malformed x-wildo role requirement');
106
+ }
107
+ if (requirement.businessRole !== null && requirement.businessRole !== undefined && typeof requirement.businessRole !== 'string') {
108
+ throw new Error('API reference operation has a malformed role business explanation');
109
+ }
110
+ if (requirement.authorityBoundary !== null && requirement.authorityBoundary !== undefined && typeof requirement.authorityBoundary !== 'string') {
111
+ throw new Error('API reference operation has a malformed role authority boundary');
112
+ }
113
+ return {
114
+ role: requirement.role,
115
+ label: requirement.label,
116
+ businessRole: typeof requirement.businessRole === 'string' ? requirement.businessRole : null,
117
+ authorityBoundary: typeof requirement.authorityBoundary === 'string' ? requirement.authorityBoundary : null,
118
+ };
119
+ });
120
+ return {
121
+ authenticationMode: value.authenticationMode,
122
+ authenticationSummary: value.authenticationSummary,
123
+ roleRequirements,
124
+ };
125
+ }
126
+ function componentSchemaReference(value) {
127
+ if (!isRecord(value) || typeof value.$ref !== 'string')
128
+ return null;
129
+ const schemaName = value.$ref.match(/^#\/components\/schemas\/([^/]+)$/)?.[1];
130
+ return schemaName === undefined
131
+ ? { name: value.$ref, anchorId: null }
132
+ : {
133
+ name: schemaName,
134
+ anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.COMPONENT_SCHEMA, schemaName }),
135
+ };
136
+ }
137
+ function serializeExampleJson(value) {
138
+ if (value === undefined)
139
+ return null;
140
+ try {
141
+ const serialized = JSON.stringify(value, null, 2);
142
+ return typeof serialized === 'string' ? serialized : null;
143
+ }
144
+ catch {
145
+ // A malformed external OpenAPI document must not make the reference page
146
+ // unusable merely because an example cannot be represented as JSON.
147
+ return null;
148
+ }
149
+ }
150
+ function schemaConstraint(schema, kind) {
151
+ const jsonValue = serializeExampleJson(schema[kind]);
152
+ return jsonValue === null ? null : { kind, jsonValue };
153
+ }
154
+ function schemaNodeOrThrow(value, owner) {
155
+ const schema = schemaNode(value);
156
+ if (schema === null)
157
+ throw new Error(`API reference ${owner} has a malformed OpenAPI schema`);
158
+ return schema;
159
+ }
160
+ /**
161
+ * Recursively projects only fields supplied by the OpenAPI Schema Object.
162
+ *
163
+ * semantic-literal-boundary: OpenAPI 3.1 Schema Object keywords are translated
164
+ * once at this browser boundary; React consumes the named model exclusively.
165
+ */
166
+ function schemaNode(value) {
167
+ if (typeof value === 'boolean') {
168
+ return {
169
+ booleanSchema: value,
170
+ referenceName: null,
171
+ referenceAnchorId: null,
172
+ types: [],
173
+ description: null,
174
+ format: null,
175
+ properties: [],
176
+ items: null,
177
+ compositions: [],
178
+ enumValues: [],
179
+ constValue: null,
180
+ defaultValue: null,
181
+ constraints: [],
182
+ additionalProperties: null,
183
+ };
184
+ }
185
+ if (!isRecord(value))
186
+ return null;
187
+ const reference = componentSchemaReference(value);
188
+ const requiredPropertyNames = Array.isArray(value.required)
189
+ ? new Set(value.required.filter((propertyName) => typeof propertyName === 'string'))
190
+ : new Set();
191
+ const properties = isRecord(value.properties)
192
+ ? Object.entries(value.properties).map(([name, propertySchema]) => ({
193
+ name,
194
+ required: requiredPropertyNames.has(name),
195
+ schema: schemaNodeOrThrow(propertySchema, `property '${name}'`),
196
+ })).sort((left, right) => left.name.localeCompare(right.name))
197
+ : [];
198
+ const compositionSources = [
199
+ [ApiReferenceSchemaCompositionKind.ONE_OF, value.oneOf],
200
+ [ApiReferenceSchemaCompositionKind.ANY_OF, value.anyOf],
201
+ [ApiReferenceSchemaCompositionKind.ALL_OF, value.allOf],
202
+ ];
203
+ const compositions = compositionSources.flatMap(([kind, branches]) => {
204
+ if (!Array.isArray(branches))
205
+ return [];
206
+ return [{ kind, branches: branches.map((branch, index) => schemaNodeOrThrow(branch, `${kind} branch ${index}`)) }];
207
+ });
208
+ const enumDescriptions = isRecord(value['x-enum-descriptions']) ? value['x-enum-descriptions'] : {};
209
+ const enumValues = Array.isArray(value.enum)
210
+ ? value.enum.flatMap((enumValue) => {
211
+ const jsonValue = serializeExampleJson(enumValue);
212
+ if (jsonValue === null)
213
+ return [];
214
+ const description = enumDescriptions[String(enumValue)];
215
+ return [{ jsonValue, description: typeof description === 'string' ? description : null }];
216
+ })
217
+ : [];
218
+ const types = typeof value.type === 'string'
219
+ ? [value.type]
220
+ : Array.isArray(value.type)
221
+ ? value.type.filter((type) => typeof type === 'string')
222
+ : [];
223
+ const additionalProperties = value.additionalProperties === undefined
224
+ ? null
225
+ : typeof value.additionalProperties === 'boolean'
226
+ ? value.additionalProperties
227
+ : schemaNodeOrThrow(value.additionalProperties, 'additionalProperties');
228
+ return {
229
+ booleanSchema: null,
230
+ referenceName: reference?.name ?? null,
231
+ referenceAnchorId: reference?.anchorId ?? null,
232
+ types,
233
+ description: typeof value.description === 'string' ? value.description : null,
234
+ format: typeof value.format === 'string' ? value.format : null,
235
+ properties,
236
+ items: value.items === undefined ? null : schemaNodeOrThrow(value.items, 'array items'),
237
+ compositions,
238
+ enumValues,
239
+ constValue: serializeExampleJson(value.const),
240
+ defaultValue: serializeExampleJson(value.default),
241
+ constraints: [
242
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.MINIMUM),
243
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAXIMUM),
244
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.EXCLUSIVE_MINIMUM),
245
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.EXCLUSIVE_MAXIMUM),
246
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.MULTIPLE_OF),
247
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.MIN_LENGTH),
248
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAX_LENGTH),
249
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.PATTERN),
250
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.MIN_ITEMS),
251
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAX_ITEMS),
252
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.UNIQUE_ITEMS),
253
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.MIN_PROPERTIES),
254
+ schemaConstraint(value, ApiReferenceSchemaConstraintKind.MAX_PROPERTIES),
255
+ ].filter((constraint) => constraint !== null),
256
+ additionalProperties,
257
+ };
258
+ }
259
+ function openApiExamples(value) {
260
+ if (!isRecord(value))
261
+ return [];
262
+ return Object.entries(value)
263
+ .map(([name, example]) => {
264
+ if (!isRecord(example))
265
+ return null;
266
+ return {
267
+ name,
268
+ summary: typeof example.summary === 'string' ? example.summary : null,
269
+ description: typeof example.description === 'string' ? example.description : null,
270
+ jsonValue: serializeExampleJson(example.value),
271
+ externalValue: typeof example.externalValue === 'string' ? example.externalValue : null,
272
+ };
273
+ })
274
+ .filter((example) => example !== null)
275
+ .sort((left, right) => left.name.localeCompare(right.name));
276
+ }
277
+ function mediaTypes(value) {
278
+ if (!isRecord(value))
279
+ return [];
280
+ return Object.entries(value).map(([mediaType, representation]) => {
281
+ if (!isRecord(representation))
282
+ return { mediaType, schema: null, examples: [] };
283
+ const namedExamples = openApiExamples(representation.examples);
284
+ const inlineExample = representation.example === undefined
285
+ ? []
286
+ : [{ name: 'Example', summary: null, description: null, jsonValue: serializeExampleJson(representation.example), externalValue: null }];
287
+ return {
288
+ mediaType,
289
+ schema: representation.schema === undefined ? null : schemaNodeOrThrow(representation.schema, `media type '${mediaType}'`),
290
+ examples: [...namedExamples, ...inlineExample],
291
+ };
292
+ }).sort((a, b) => a.mediaType.localeCompare(b.mediaType));
293
+ }
294
+ /** Projects reusable OpenAPI components without re-authoring their schema meaning in React. */
295
+ function componentSchemas(value) {
296
+ if (!isRecord(value))
297
+ return [];
298
+ return Object.entries(value).map(([name, sourceSchema]) => {
299
+ const schema = schemaNodeOrThrow(sourceSchema, `component schema '${name}'`);
300
+ return {
301
+ name,
302
+ anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.COMPONENT_SCHEMA, schemaName: name }),
303
+ schema,
304
+ };
305
+ }).sort((left, right) => left.name.localeCompare(right.name));
306
+ }
307
+ function parameter(value) {
308
+ if (!isRecord(value) || typeof value.name !== 'string' || typeof value.in !== 'string')
309
+ return null;
310
+ const namedExamples = openApiExamples(value.examples);
311
+ const inlineExample = value.example === undefined
312
+ ? []
313
+ : [{ name: 'Example', summary: null, description: null, jsonValue: serializeExampleJson(value.example), externalValue: null }];
314
+ return {
315
+ name: value.name,
316
+ location: value.in,
317
+ required: value.required === true,
318
+ description: typeof value.description === 'string' ? value.description : null,
319
+ schema: value.schema === undefined ? null : schemaNodeOrThrow(value.schema, `parameter '${value.name}'`),
320
+ // Parameter Object supports the same named-example and single-inline-example
321
+ // forms as Media Type Object. Preserve either form from external OpenAPI;
322
+ // source generation currently emits the named form for query inputs.
323
+ examples: [...namedExamples, ...inlineExample],
324
+ };
325
+ }
326
+ function requestBody(value, operationId) {
327
+ if (!isRecord(value))
328
+ return null;
329
+ return {
330
+ anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.REQUEST, operationId }),
331
+ required: value.required === true,
332
+ mediaTypes: mediaTypes(value.content),
333
+ };
334
+ }
335
+ function responses(value, operationId) {
336
+ if (!isRecord(value))
337
+ return [];
338
+ return Object.entries(value).map(([status, response]) => ({
339
+ anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESPONSE, operationId, status }),
340
+ status,
341
+ description: isRecord(response) && typeof response.description === 'string' ? response.description : null,
342
+ mediaTypes: isRecord(response) ? mediaTypes(response.content) : [],
343
+ })).sort((a, b) => a.status.localeCompare(b.status, undefined, { numeric: true }));
344
+ }
345
+ function securitySchemes(value) {
346
+ if (!Array.isArray(value))
347
+ return [];
348
+ return [...new Set(value.flatMap((requirement) => isRecord(requirement) ? Object.keys(requirement) : []))].sort((a, b) => a.localeCompare(b));
349
+ }
350
+ function resourceRelationships(value) {
351
+ if (!Array.isArray(value))
352
+ return [];
353
+ return value.map((relationship, index) => {
354
+ if (!isRecord(relationship)
355
+ || typeof relationship.relatedResourceName !== 'string'
356
+ || typeof relationship.resourceCardinality !== 'string'
357
+ || typeof relationship.relatedResourceCardinality !== 'string'
358
+ || typeof relationship.nature !== 'string'
359
+ || typeof relationship.lifecycleModel !== 'string') {
360
+ throw new Error(`API reference resource relationship at index ${index} is malformed`);
361
+ }
362
+ const parentDelete = relationship.onParentDelete;
363
+ if (parentDelete !== undefined && (!isRecord(parentDelete)
364
+ || typeof parentDelete.enabled !== 'boolean'
365
+ || typeof parentDelete.mode !== 'string'
366
+ || typeof parentDelete.strategy !== 'string'
367
+ || typeof parentDelete.maxDepth !== 'number')) {
368
+ throw new Error(`API reference resource relationship at index ${index} has malformed parent-delete lifecycle`);
369
+ }
370
+ return {
371
+ relatedResourceName: relationship.relatedResourceName,
372
+ relatedResourceLabel: relationship.relatedResourceName,
373
+ foreignKeyField: typeof relationship.foreignKeyField === 'string' ? relationship.foreignKeyField : null,
374
+ resourceCardinality: relationship.resourceCardinality,
375
+ relatedResourceCardinality: relationship.relatedResourceCardinality,
376
+ nature: relationship.nature,
377
+ lifecycleModel: relationship.lifecycleModel,
378
+ onParentDelete: isRecord(parentDelete) ? {
379
+ enabled: parentDelete.enabled,
380
+ mode: parentDelete.mode,
381
+ strategy: parentDelete.strategy,
382
+ maxDepth: parentDelete.maxDepth,
383
+ } : null,
384
+ };
385
+ });
386
+ }
387
+ /** Parses the strict category contract carried by `tags[].x-wildo.category`. */
388
+ function resourceCategory(value) {
389
+ if (value === undefined)
390
+ return null;
391
+ if (!isRecord(value) || typeof value.id !== 'string' || typeof value.label !== 'string') {
392
+ throw new Error('API reference resource tag has malformed x-wildo category');
393
+ }
394
+ if (value.description !== undefined && typeof value.description !== 'string') {
395
+ throw new Error('API reference resource tag has malformed category description');
396
+ }
397
+ return {
398
+ id: value.id,
399
+ anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.CATEGORY, categoryName: value.id }),
400
+ label: value.label,
401
+ description: typeof value.description === 'string' ? value.description : null,
402
+ };
403
+ }
404
+ function operationFamilyLabel(familyRef) {
405
+ const identifier = familyRef.split('/operation-family/').at(-1)?.split('/').at(0) ?? familyRef;
406
+ return identifier.replace(/([a-z])([A-Z])/g, '$1 $2').replace(/[-_]/g, ' ').replace(/^./, (character) => character.toUpperCase());
407
+ }
408
+ /**
409
+ * Presentation-only fallback for a resource whose related tag is absent from
410
+ * this section (for example, a cron-only resource). It never changes the
411
+ * canonical resource identity; it only prevents raw camelCase identifiers from
412
+ * leaking into the reference when no source-authored display tag is available.
413
+ */
414
+ function resourceDisplayLabel(identifier) {
415
+ return identifier
416
+ .replace(/([a-z0-9])([A-Z])/g, '$1 $2')
417
+ .replace(/[-_]/g, ' ')
418
+ .replace(/\b\w/g, (character) => character.toUpperCase());
419
+ }
420
+ /** Creates the two-level resource → operation-family view from OpenAPI. */
421
+ export function createApiReferenceModel(document) {
422
+ if (!isRecord(document) || !isRecord(document.paths))
423
+ throw new Error('API reference document has no OpenAPI paths object');
424
+ const info = documentInfo(document.info);
425
+ const resourceTags = new Map();
426
+ if (Array.isArray(document.tags)) {
427
+ for (const tag of document.tags) {
428
+ if (isRecord(tag) && typeof tag.name === 'string') {
429
+ if (!isRecord(tag['x-wildo']) || typeof tag['x-wildo'].resourceRef !== 'string') {
430
+ throw new Error(`API reference resource tag '${tag.name}' has no x-wildo resource identity`);
431
+ }
432
+ if (resourceTags.has(tag.name))
433
+ throw new Error(`API reference resource tag is duplicated: ${tag.name}`);
434
+ resourceTags.set(tag.name, {
435
+ resourceRef: tag['x-wildo'].resourceRef,
436
+ label: typeof tag['x-displayName'] === 'string' ? tag['x-displayName'] : resourceDisplayLabel(tag.name),
437
+ description: typeof tag.description === 'string' ? tag.description : null,
438
+ category: resourceCategory(tag['x-wildo'].category),
439
+ lifecycleRole: typeof tag['x-wildo'].lifecycleRole === 'string' ? tag['x-wildo'].lifecycleRole : null,
440
+ relationships: resourceRelationships(tag['x-wildo'].relationships),
441
+ });
442
+ }
443
+ }
444
+ }
445
+ const resources = new Map();
446
+ const operationIds = new Set();
447
+ const operationVariantRefs = new Set();
448
+ for (const [path, item] of Object.entries(document.paths)) {
449
+ if (!isRecord(item))
450
+ continue;
451
+ for (const [method, operation] of Object.entries(item)) {
452
+ if (!OPENAPI_HTTP_METHODS.has(method))
453
+ continue;
454
+ if (!isRecord(operation))
455
+ throw new Error(`API reference ${method.toUpperCase()} ${path} operation is malformed`);
456
+ if (!isRecord(operation['x-wildo']))
457
+ throw new Error(`API reference ${method.toUpperCase()} ${path} operation has no x-wildo identity`);
458
+ const metadata = operation['x-wildo'];
459
+ if (typeof metadata.resourceRef !== 'string' || typeof metadata.operationFamilyRef !== 'string' || typeof metadata.operationVariantRef !== 'string') {
460
+ throw new Error('API reference operation has malformed x-wildo identity');
461
+ }
462
+ if (metadata.path !== path || metadata.httpVerb !== method.toLowerCase())
463
+ throw new Error('API reference operation x-wildo identity does not match its OpenAPI method/path');
464
+ if (typeof operation.operationId !== 'string' || operation.operationId.length === 0)
465
+ throw new Error('API reference operation has no operationId');
466
+ if (operationIds.has(operation.operationId))
467
+ throw new Error(`API reference operationId is duplicated: ${operation.operationId}`);
468
+ operationIds.add(operation.operationId);
469
+ if (operationVariantRefs.has(metadata.operationVariantRef))
470
+ throw new Error(`API reference operation variant identity is duplicated: ${metadata.operationVariantRef}`);
471
+ operationVariantRefs.add(metadata.operationVariantRef);
472
+ const resource = resources.get(metadata.resourceRef) ?? new Map();
473
+ const family = resource.get(metadata.operationFamilyRef) ?? [];
474
+ family.push({
475
+ variantRef: metadata.operationVariantRef,
476
+ anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.OPERATION, operationId: operation.operationId }),
477
+ operationId: operation.operationId,
478
+ summary: typeof operation.summary === 'string' ? operation.summary : `${method.toUpperCase()} ${path}`,
479
+ description: typeof operation.description === 'string' ? operation.description : null,
480
+ method: method.toUpperCase(),
481
+ path,
482
+ access: access(metadata.access),
483
+ securitySchemes: securitySchemes(operation.security),
484
+ parameters: Array.isArray(operation.parameters) ? operation.parameters.map(parameter).filter((item) => item !== null) : [],
485
+ requestBody: requestBody(operation.requestBody, operation.operationId),
486
+ responses: responses(operation.responses, operation.operationId),
487
+ idempotent: typeof operation['x-idempotent'] === 'boolean' ? operation['x-idempotent'] : null,
488
+ });
489
+ resource.set(metadata.operationFamilyRef, family);
490
+ resources.set(metadata.resourceRef, resource);
491
+ }
492
+ }
493
+ const result = [...resources.entries()].map(([resourceRef, families]) => {
494
+ const tagName = resourceRef.split('/').at(-1) ?? resourceRef;
495
+ const tag = resourceTags.get(tagName);
496
+ if (tag === undefined)
497
+ throw new Error(`API reference resource '${resourceRef}' has no generated OpenAPI tag`);
498
+ if (tag.resourceRef !== resourceRef)
499
+ throw new Error(`API reference tag '${tagName}' resource identity does not match its operation identities`);
500
+ return {
501
+ resourceRef,
502
+ anchorId: apiReferenceTargetFragment({ kind: ApiReferenceTargetKind.RESOURCE, resourceName: tagName }),
503
+ label: tag.label,
504
+ category: tag.category,
505
+ description: tag.description,
506
+ lifecycleRole: tag.lifecycleRole,
507
+ relationships: tag.relationships.map((relationship) => ({
508
+ ...relationship,
509
+ relatedResourceLabel: resourceTags.get(relationship.relatedResourceName)?.label ?? resourceDisplayLabel(relationship.relatedResourceName),
510
+ })),
511
+ families: [...families.entries()].map(([familyRef, variants]) => ({
512
+ familyRef,
513
+ anchorId: apiReferenceTargetFragment({
514
+ kind: ApiReferenceTargetKind.OPERATION_FAMILY,
515
+ resourceName: tagName,
516
+ operationName: familyRef.split('/').at(-1) ?? familyRef,
517
+ }),
518
+ label: operationFamilyLabel(familyRef),
519
+ variants: variants.sort((a, b) => `${a.path}:${a.method}`.localeCompare(`${b.path}:${b.method}`)),
520
+ })).sort((a, b) => a.familyRef.localeCompare(b.familyRef)),
521
+ };
522
+ }).sort((a, b) => a.label.localeCompare(b.label));
523
+ const parsedComponentSchemas = componentSchemas(isRecord(document.components) ? document.components.schemas : undefined);
524
+ assertCategoryMetadataIsConsistent(result);
525
+ assertPublicAnchorsAreUnique(result, parsedComponentSchemas);
526
+ return {
527
+ title: info.title,
528
+ description: info.description,
529
+ servers: documentServers(document.servers),
530
+ securitySchemes: documentSecuritySchemes(isRecord(document.components) ? document.components.securitySchemes : undefined),
531
+ resources: result,
532
+ componentSchemas: parsedComponentSchemas,
533
+ operationCount: result.flatMap((resource) => resource.families).reduce((count, family) => count + family.variants.length, 0),
534
+ };
535
+ }
536
+ /** A category id has one source-owned label and description throughout one document. */
537
+ function assertCategoryMetadataIsConsistent(resources) {
538
+ const categories = new Map();
539
+ for (const resource of resources) {
540
+ if (resource.category === null)
541
+ continue;
542
+ const prior = categories.get(resource.category.id);
543
+ if (prior !== undefined && (prior.label !== resource.category.label || prior.description !== resource.category.description)) {
544
+ throw new Error(`API reference category '${resource.category.id}' has inconsistent source metadata`);
545
+ }
546
+ categories.set(resource.category.id, resource.category);
547
+ }
548
+ }
549
+ /**
550
+ * Public fragments must remain readable, but readability cannot excuse a
551
+ * collision. Rejecting a collision keeps copied links deterministic and makes
552
+ * the source identity that needs refinement visible to the generator owner.
553
+ */
554
+ function assertPublicAnchorsAreUnique(resources, schemas) {
555
+ const ownerByAnchor = new Map();
556
+ const claim = (anchorId, owner) => {
557
+ const existingOwner = ownerByAnchor.get(anchorId);
558
+ if (existingOwner !== undefined) {
559
+ throw new Error(`API reference public fragment '${anchorId}' collides between ${existingOwner} and ${owner}`);
560
+ }
561
+ ownerByAnchor.set(anchorId, owner);
562
+ };
563
+ const categories = new Map(resources.flatMap((resource) => resource.category === null ? [] : [[resource.category.id, resource.category]]));
564
+ categories.forEach((category) => claim(category.anchorId, `category '${category.id}'`));
565
+ resources.forEach((resource) => {
566
+ claim(resource.anchorId, resource.resourceRef);
567
+ resource.families.forEach((family) => {
568
+ claim(family.anchorId, family.familyRef);
569
+ family.variants.forEach((variant) => {
570
+ claim(variant.anchorId, variant.variantRef);
571
+ if (variant.requestBody !== null)
572
+ claim(variant.requestBody.anchorId, `${variant.variantRef}:request`);
573
+ variant.responses.forEach((response) => claim(response.anchorId, `${variant.variantRef}:response:${response.status}`));
574
+ });
575
+ });
576
+ });
577
+ schemas.forEach((schema) => claim(schema.anchorId, `components.schemas.${schema.name}`));
578
+ }
579
+ //# sourceMappingURL=openapi-reference-model.js.map