@wildo-ai/saas-technical-doc 1.1.2 → 1.1.4

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 (130) hide show
  1. package/dist/esm/build/csp-emit.d.ts.map +1 -1
  2. package/dist/esm/build/load-materialized-frontend-providers.d.ts.map +1 -1
  3. package/dist/esm/companion/application-documentation/application-administration-documentation.d.ts.map +1 -1
  4. package/dist/esm/companion/application-documentation/application-administration-documentation.js.map +1 -1
  5. package/dist/esm/companion/application-documentation/application-authentication-documentation.d.ts.map +1 -1
  6. package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts +25 -1
  7. package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts.map +1 -1
  8. package/dist/esm/companion/application-documentation/application-connection-documentation.js +28 -1
  9. package/dist/esm/companion/application-documentation/application-connection-documentation.js.map +1 -1
  10. package/dist/esm/companion/application-documentation/application-domain-documentation.d.ts +133 -0
  11. package/dist/esm/companion/application-documentation/application-domain-documentation.d.ts.map +1 -0
  12. package/dist/esm/companion/application-documentation/application-domain-documentation.js +243 -0
  13. package/dist/esm/companion/application-documentation/application-domain-documentation.js.map +1 -0
  14. package/dist/esm/companion/application-documentation/application-integration-documentation.d.ts.map +1 -1
  15. package/dist/esm/companion/application-documentation/application-integration-documentation.js +23 -0
  16. package/dist/esm/companion/application-documentation/application-integration-documentation.js.map +1 -1
  17. package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts +30 -0
  18. package/dist/esm/companion/application-documentation/application-organization-role-documentation.d.ts.map +1 -1
  19. package/dist/esm/companion/application-documentation/application-organization-role-documentation.js +38 -0
  20. package/dist/esm/companion/application-documentation/application-organization-role-documentation.js.map +1 -1
  21. package/dist/esm/companion/application-documentation/application-organization-unit-resource-documentation.d.ts.map +1 -1
  22. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts +61 -1
  23. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -1
  24. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js +255 -218
  25. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js.map +1 -1
  26. package/dist/esm/companion/application-documentation/technical-documentation-operational-evidence.d.ts.map +1 -1
  27. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts +2 -0
  28. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -1
  29. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js +1 -0
  30. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js.map +1 -1
  31. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.d.ts.map +1 -1
  32. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js +1 -1
  33. package/dist/esm/companion/application-documentation/technical-documentation-publication-policy.js.map +1 -1
  34. package/dist/esm/companion/content/application-consumer-documentation-content-loader.d.ts.map +1 -1
  35. package/dist/esm/companion/index.d.ts +2 -1
  36. package/dist/esm/companion/index.d.ts.map +1 -1
  37. package/dist/esm/companion/index.js +2 -1
  38. package/dist/esm/companion/index.js.map +1 -1
  39. package/dist/esm/companion/manual-controller-route-projection.d.ts +112 -0
  40. package/dist/esm/companion/manual-controller-route-projection.d.ts.map +1 -0
  41. package/dist/esm/companion/manual-controller-route-projection.js +249 -0
  42. package/dist/esm/companion/manual-controller-route-projection.js.map +1 -0
  43. package/dist/esm/companion/openapi-generator.d.ts +16 -0
  44. package/dist/esm/companion/openapi-generator.d.ts.map +1 -1
  45. package/dist/esm/companion/openapi-generator.js +493 -26
  46. package/dist/esm/companion/openapi-generator.js.map +1 -1
  47. package/dist/esm/companion/operation-projection.schemas.d.ts +44 -0
  48. package/dist/esm/companion/operation-projection.schemas.d.ts.map +1 -1
  49. package/dist/esm/companion/operation-projection.schemas.js +37 -0
  50. package/dist/esm/companion/operation-projection.schemas.js.map +1 -1
  51. package/dist/esm/companion/publish-result.types.d.ts +37 -4
  52. package/dist/esm/companion/publish-result.types.d.ts.map +1 -1
  53. package/dist/esm/companion/publish-result.types.js.map +1 -1
  54. package/dist/esm/companion/rendering/technical-documentation-authorized-bundle-reader.d.ts.map +1 -1
  55. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts +7 -1
  56. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts.map +1 -1
  57. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js +34 -18
  58. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js.map +1 -1
  59. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.d.ts.map +1 -1
  60. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js +8 -1
  61. package/dist/esm/companion/rendering/technical-documentation-managed-tree-validator.js.map +1 -1
  62. package/dist/esm/companion/rendering/technical-documentation-openapi-renderer.d.ts.map +1 -1
  63. package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts.map +1 -1
  64. package/dist/esm/companion/rendering/technical-documentation-render-model.js +30 -13
  65. package/dist/esm/companion/rendering/technical-documentation-render-model.js.map +1 -1
  66. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts +10 -0
  67. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.d.ts.map +1 -1
  68. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js +10 -15
  69. package/dist/esm/companion/rendering/technical-documentation-search-index-renderer.js.map +1 -1
  70. package/dist/esm/companion/technical-documentation-asset-path.d.ts.map +1 -1
  71. package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts +27 -1
  72. package/dist/esm/companion/technical-documentation-capture-execution-port.d.ts.map +1 -1
  73. package/dist/esm/companion/technical-documentation-capture-execution-port.js.map +1 -1
  74. package/dist/esm/companion/technical-documentation-diagram-definitions.d.ts +33 -0
  75. package/dist/esm/companion/technical-documentation-diagram-definitions.d.ts.map +1 -0
  76. package/dist/esm/companion/technical-documentation-diagram-definitions.js +54 -0
  77. package/dist/esm/companion/technical-documentation-diagram-definitions.js.map +1 -0
  78. package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts +10 -18
  79. package/dist/esm/companion/technical-documentation-diagram-materializer.d.ts.map +1 -1
  80. package/dist/esm/companion/technical-documentation-diagram-materializer.js +9 -39
  81. package/dist/esm/companion/technical-documentation-diagram-materializer.js.map +1 -1
  82. package/dist/esm/companion/technical-documentation-placeholder-materializer.d.ts.map +1 -1
  83. package/dist/esm/companion/zod-to-openapi.d.ts.map +1 -1
  84. package/dist/esm/companion-exports.d.ts.map +1 -1
  85. package/dist/esm/config/define-tech-doc-config.d.ts.map +1 -1
  86. package/dist/esm/config/index.d.ts.map +1 -1
  87. package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts +8 -4
  88. package/dist/esm/config/wildo-tech-doc-config.schemas.d.ts.map +1 -1
  89. package/dist/esm/config/wildo-tech-doc-config.schemas.js +8 -4
  90. package/dist/esm/config/wildo-tech-doc-config.schemas.js.map +1 -1
  91. package/dist/esm/content/application-consumer-documentation-content-manifest.schemas.d.ts.map +1 -1
  92. package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts +42 -64
  93. package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -1
  94. package/dist/esm/content/application-consumer-documentation-content.techdoc.js +164 -925
  95. package/dist/esm/content/application-consumer-documentation-content.techdoc.js.map +1 -1
  96. package/dist/esm/content.exports.d.ts.map +1 -1
  97. package/dist/esm/index.d.ts.map +1 -1
  98. package/dist/esm/openapi/api-reference-link-index.d.ts.map +1 -1
  99. package/dist/esm/openapi/index.d.ts.map +1 -1
  100. package/dist/esm/openapi/openapi-generation-output.schemas.d.ts.map +1 -1
  101. package/dist/esm/openapi-reference-model.exports.d.ts.map +1 -1
  102. package/dist/esm/runtime/AuthExchangePage.d.ts.map +1 -1
  103. package/dist/esm/runtime/DocsAuthContext.d.ts +16 -1
  104. package/dist/esm/runtime/DocsAuthContext.d.ts.map +1 -1
  105. package/dist/esm/runtime/DocsAuthContext.js +18 -2
  106. package/dist/esm/runtime/DocsAuthContext.js.map +1 -1
  107. package/dist/esm/runtime/decode-jwt-claims.d.ts.map +1 -1
  108. package/dist/esm/runtime/docs-auth-client.d.ts.map +1 -1
  109. package/dist/esm/runtime/docs-auth-session.schemas.d.ts.map +1 -1
  110. package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts +35 -13
  111. package/dist/esm/runtime/frontend-provider-registry.techdoc.d.ts.map +1 -1
  112. package/dist/esm/runtime/frontend-provider-registry.techdoc.js +28 -19
  113. package/dist/esm/runtime/frontend-provider-registry.techdoc.js.map +1 -1
  114. package/dist/esm/runtime/index.d.ts +1 -0
  115. package/dist/esm/runtime/index.d.ts.map +1 -1
  116. package/dist/esm/runtime/index.js +1 -0
  117. package/dist/esm/runtime/index.js.map +1 -1
  118. package/dist/esm/runtime/openapi-reference-conservation.d.ts.map +1 -1
  119. package/dist/esm/runtime/use-docs-auth-session.d.ts.map +1 -1
  120. package/dist/esm/runtime/use-docs-frontend-provider-registry.d.ts.map +1 -1
  121. package/dist/esm/runtime/use-docs-provider-sdks.d.ts +21 -0
  122. package/dist/esm/runtime/use-docs-provider-sdks.d.ts.map +1 -0
  123. package/dist/esm/runtime/use-docs-provider-sdks.js +49 -0
  124. package/dist/esm/runtime/use-docs-provider-sdks.js.map +1 -0
  125. package/dist/tsconfig.build.tsbuildinfo +1 -1
  126. package/package.json +6 -5
  127. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts +0 -9
  128. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts.map +0 -1
  129. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js +0 -111
  130. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js.map +0 -1
@@ -381,6 +381,22 @@ export declare const OperationProjectionSchema: z.ZodObject<{
381
381
  errorCode: z.ZodOptional<z.ZodString>;
382
382
  }, z.core.$strict>>>;
383
383
  idempotent: z.ZodOptional<z.ZodBoolean>;
384
+ /**
385
+ * The outbound webhook events this operation fires, if any.
386
+ *
387
+ * Carried on the OPERATION because that is the fact a reader needs where they are standing: a
388
+ * developer looking at `changeStatus` wants to know that calling it notifies every configured
389
+ * endpoint, and a receiver author wants to know which call produced the delivery they are
390
+ * holding. The delivery mechanics — retries, signature, timeouts — belong to the webhook
391
+ * contract and are described once, not per operation.
392
+ */
393
+ m2mNotifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
394
+ /** Stable identifier of the notification declaration. */
395
+ identifier: z.ZodString;
396
+ /** The channel that carries it, which is also its delivery scope (`webhook_organization`, …). */
397
+ channel: z.ZodString;
398
+ level: z.ZodOptional<z.ZodString>;
399
+ }, z.core.$strict>>>;
384
400
  rateLimitNote: z.ZodOptional<z.ZodString>;
385
401
  examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
386
402
  title: z.ZodString;
@@ -424,6 +440,18 @@ export declare enum ResourceRelationshipDocumentationDeleteStrategy {
424
440
  DELETE = "delete",
425
441
  IMPERSONALIZE_AND_RETAIN = "impersonalize_and_retain"
426
442
  }
443
+ /**
444
+ * Consumer words for the relationship vocabularies.
445
+ *
446
+ * Beside the enums rather than in the documentation projection, so the values and the words that
447
+ * explain them cannot drift apart, and a member added to an enum has one obvious place to gain a
448
+ * meaning. Same reason the sign-in methods carry theirs next to `AuthMethod`.
449
+ *
450
+ * `NATURE` deliberately avoids the framework's own vocabulary: a customer reading "composition"
451
+ * learns nothing, while "part of it" is the thing they can act on.
452
+ */
453
+ export declare const RESOURCE_RELATIONSHIP_CARDINALITY_MEANINGS: Readonly<Record<ResourceRelationshipDocumentationCardinality, string>>;
454
+ export declare const RESOURCE_RELATIONSHIP_NATURE_MEANINGS: Readonly<Record<ResourceRelationshipDocumentationNature, string>>;
427
455
  /**
428
456
  * One relationship fact from the perspective of a resource OpenAPI tag.
429
457
  *
@@ -708,6 +736,22 @@ export declare const OpenApiGenerationInputSchema: z.ZodObject<{
708
736
  errorCode: z.ZodOptional<z.ZodString>;
709
737
  }, z.core.$strict>>>;
710
738
  idempotent: z.ZodOptional<z.ZodBoolean>;
739
+ /**
740
+ * The outbound webhook events this operation fires, if any.
741
+ *
742
+ * Carried on the OPERATION because that is the fact a reader needs where they are standing: a
743
+ * developer looking at `changeStatus` wants to know that calling it notifies every configured
744
+ * endpoint, and a receiver author wants to know which call produced the delivery they are
745
+ * holding. The delivery mechanics — retries, signature, timeouts — belong to the webhook
746
+ * contract and are described once, not per operation.
747
+ */
748
+ m2mNotifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
749
+ /** Stable identifier of the notification declaration. */
750
+ identifier: z.ZodString;
751
+ /** The channel that carries it, which is also its delivery scope (`webhook_organization`, …). */
752
+ channel: z.ZodString;
753
+ level: z.ZodOptional<z.ZodString>;
754
+ }, z.core.$strict>>>;
711
755
  rateLimitNote: z.ZodOptional<z.ZodString>;
712
756
  examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
713
757
  title: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"operation-projection.schemas.d.ts","sourceRoot":"","sources":["../../../../src/companion/operation-projection.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,oBAAY,8BAA8B;IACxC,QAAQ,aAAa;IACrB,sBAAsB,2BAA2B;CAClD;AAED;;;;;;;;;GASG;AACH,oBAAY,+BAA+B;IACzC,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,WAAW,iBAAiB;IAC5B,SAAS,cAAc;CACxB;AAED;;;;;;;;;GASG;AACH,oBAAY,2BAA2B;IACrC,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED;;;;;GAKG;AACH,oBAAY,qCAAqC;I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IG;AACH,eAAO,MAAM,4BAA4B;IACvC;;;;;;;OAOG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;IAEH,sFAAsF;;IAEtF;;;;OAIG;;;;QAvXH;;;;;;;;;;WAUG;;QAEH,oFAAoF;;;;;;QAMpF;;;;WAIG;;QAEH;;;;WAIG;;;;;;;;;;;QASH;;;;WAIG;;;;;;;;;;;;;;;;;;;QAUH;;;;;;;;;;WAUG;;QAEH;;;;;WAKG;;QAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;WA2BG;;;;;QAKH;;;;WAIG;;QAEH;;;;;;;WAOG;;;;;;;;;;;QAWH;;;;;;;;WAQG;;YAED,yDAAyD;;YAEzD,iGAAiG;;;;;;;;;;;;IA+OnG;;;;;;;OAOG;;IAEH;;;;;OAKG;;QAtFH,8EAA8E;;QAE9E,qDAAqD;;QAErD,8EAA8E;;QAE9E,6DAA6D;;;YAlD7D,4EAA4E;;;;;;;;;;;;;QAoD5E,oEAAoE;;YA1BpE,wEAAwE;;YAExE,gEAAgE;;YAEhE,8EAA8E;;;;IAsG9E;;;;;;OAMG;;QAvEH;;;;;;WAMG;;QAEH,gFAAgF;;;IAiEhF;;;;;;;OAOG;;kBAEH,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -374,6 +374,22 @@ export const OperationProjectionSchema = z.strictObject({
374
374
  errorCode: z.string().min(1).optional(),
375
375
  })).optional(),
376
376
  idempotent: z.boolean().optional(),
377
+ /**
378
+ * The outbound webhook events this operation fires, if any.
379
+ *
380
+ * Carried on the OPERATION because that is the fact a reader needs where they are standing: a
381
+ * developer looking at `changeStatus` wants to know that calling it notifies every configured
382
+ * endpoint, and a receiver author wants to know which call produced the delivery they are
383
+ * holding. The delivery mechanics — retries, signature, timeouts — belong to the webhook
384
+ * contract and are described once, not per operation.
385
+ */
386
+ m2mNotifications: z.array(z.strictObject({
387
+ /** Stable identifier of the notification declaration. */
388
+ identifier: z.string().min(1),
389
+ /** The channel that carries it, which is also its delivery scope (`webhook_organization`, …). */
390
+ channel: z.string().min(1),
391
+ level: z.string().min(1).optional(),
392
+ })).optional(),
377
393
  rateLimitNote: z.string().min(1).optional(),
378
394
  examples: z.array(z.strictObject({
379
395
  title: z.string().min(1),
@@ -453,6 +469,27 @@ export var ResourceRelationshipDocumentationDeleteStrategy;
453
469
  ResourceRelationshipDocumentationDeleteStrategy["DELETE"] = "delete";
454
470
  ResourceRelationshipDocumentationDeleteStrategy["IMPERSONALIZE_AND_RETAIN"] = "impersonalize_and_retain";
455
471
  })(ResourceRelationshipDocumentationDeleteStrategy || (ResourceRelationshipDocumentationDeleteStrategy = {}));
472
+ /**
473
+ * Consumer words for the relationship vocabularies.
474
+ *
475
+ * Beside the enums rather than in the documentation projection, so the values and the words that
476
+ * explain them cannot drift apart, and a member added to an enum has one obvious place to gain a
477
+ * meaning. Same reason the sign-in methods carry theirs next to `AuthMethod`.
478
+ *
479
+ * `NATURE` deliberately avoids the framework's own vocabulary: a customer reading "composition"
480
+ * learns nothing, while "part of it" is the thing they can act on.
481
+ */
482
+ export const RESOURCE_RELATIONSHIP_CARDINALITY_MEANINGS = Object.freeze({
483
+ [ResourceRelationshipDocumentationCardinality.ONE]: 'exactly one',
484
+ [ResourceRelationshipDocumentationCardinality.ZERO_OR_ONE]: 'at most one',
485
+ [ResourceRelationshipDocumentationCardinality.ONE_OR_MANY]: 'one or more',
486
+ [ResourceRelationshipDocumentationCardinality.MANY]: 'any number of',
487
+ });
488
+ export const RESOURCE_RELATIONSHIP_NATURE_MEANINGS = Object.freeze({
489
+ [ResourceRelationshipDocumentationNature.COMPOSITION]: 'Part of it',
490
+ [ResourceRelationshipDocumentationNature.REFERENCE]: 'Points at it',
491
+ [ResourceRelationshipDocumentationNature.ASSOCIATION]: 'Linked to it',
492
+ });
456
493
  /**
457
494
  * One relationship fact from the perspective of a resource OpenAPI tag.
458
495
  *
@@ -1 +1 @@
1
- {"version":3,"file":"operation-projection.schemas.js","sourceRoot":"","sources":["../../../../src/companion/operation-projection.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,+CAA+C,EAAE,MAAM,uDAAuD,CAAC;AACxH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,8BAGX;AAHD,WAAY,8BAA8B;IACxC,uDAAqB,CAAA;IACrB,mFAAiD,CAAA;AACnD,CAAC,EAHW,8BAA8B,KAA9B,8BAA8B,QAGzC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,+BAKX;AALD,WAAY,+BAA+B;IACzC,0DAAuB,CAAA;IACvB,kEAA+B,CAAA;IAC/B,+DAA4B,CAAA;IAC5B,0DAAuB,CAAA;AACzB,CAAC,EALW,+BAA+B,KAA/B,+BAA+B,QAK1C;AAED;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,4CAAa,CAAA;IACb,0CAAW,CAAA;IACX,gDAAiB,CAAA;IACjB,8CAAe,CAAA;AACjB,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,qCAKX;AALD,WAAY,qCAAqC;IAC/C,0DAAiB,CAAA;IACjB,gFAAuC,CAAA;IACvC,wEAA+B,CAAA;IAC/B,kGAAyD,CAAA;AAC3D,CAAC,EALW,qCAAqC,KAArC,qCAAqC,QAKhD;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;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AAC,QAAQ,EAAE;CACnD,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,YAAY,CAAC;IACzD;;;;;;;OAOG;IACH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B;;;;;OAKG;IACH,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC;;;;OAIG;IACH,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC3D,sFAAsF;IACtF,mBAAmB,EAAE,+CAA+C;IACpE;;;;OAIG;IACH,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,CAAC;IAC9C;;;;;;;OAOG;IACH,mBAAmB,EAAE,CAAC,CAAC,OAAO,EAAE;IAChC;;;;;OAKG;IACH,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;IACnD;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE;IAChD;;;;;;;OAOG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC","sourcesContent":["/**\n * @wildo-package @wildo-ai/saas-technical-doc/companion (input projection)\n *\n * Input shape consumed by the companion-side OpenAPI generator\n * (saas-technical-doc.md Step 3).\n *\n * Why a dedicated projection (and NOT importing `ResourcesRegistry` from\n * `@wildo-ai/saas-models`):\n *\n * - The full `ResourceConfiguration` carries ~40 internal-only fields\n * (factory metadata, repository wiring, validation hooks, frontend\n * presets, lifecycle bindings, …). The OpenAPI generator does NOT need\n * any of them — it needs ONLY operation-level HTTP shape data\n * (method + path + request/response Zod schemas + role binding +\n * primary scope + authentication-mode flags). Coupling the\n * generator to the full type would (a) drag the entire schema graph\n * + decorator framework into the companion bundle, defeating the\n * point of `@wildo-ai/saas-models/public-runtime`; (b) couple test\n * fixtures to dozens of irrelevant fields, making generator unit\n * tests brittle to unrelated framework changes; (c) make the\n * introspection-subprocess hop's wire format depend on the entire\n * framework's type stability.\n *\n * - The introspection subprocess (wonder-todos backend) ALREADY has\n * the resolved `ResourceConfiguration` graph — it's the natural\n * place to flatten it into this minimal projection. The companion\n * process then transforms the projection into YAML without ever\n * needing the framework's resource-config types.\n *\n * - This file re-declares the small subset of enums/literals the\n * projection carries (`ResourceOperationVariantTypeProjection`,\n * `ResourcePrimaryScopeProjection`) rather than importing them from\n * `@wildo-ai/saas-models` so that `engine/saas-technical-doc/companion`\n * does NOT pull the heavy package's root barrel (which boots\n * `initZodDecorators()` — see `saas-models-public-runtime.md` K-3 for\n * the rationale). The projection's enum members MUST stay in\n * one-to-one alignment with `ResourceOperationVariantType` and\n * `ResourcePrimaryScope`; if the source enums grow a new member,\n * update this file in the same commit and rerun the boundary tests.\n *\n * @wildo-boundary\n * This file imports only Zod and the portable technical-documentation\n * contract subpath — no React, no `@wildo-ai/saas-models` root, no\n * decorators. The supported API version deliberately reuses the publication\n * contract's named runtime schema rather than creating a parallel vocabulary.\n */\n\nimport { TechnicalDocumentationSupportedApiVersionSchema } from '@wildo-ai/saas-specifications/technical-documentation';\nimport { z } from 'zod';\n\nimport { OpenApiSection } from '../openapi/openapi-generation-output.schemas';\n\n/**\n * Mirror of `@wildo-ai/saas-models` `ResourceOperationVariantType` —\n * narrowed to the two variants the OpenAPI generator emits per K-5\n * (`API_CALL` is the default URL-bearing operation; `API_CALL_WITH_CALLBACK`\n * additionally carries an asynchronous callback URL). Other variants\n * (`CRON_JOB`, `BATCH_JOB`, `INTERNAL_CALL`, `REPOSITORY_ONLY`) are\n * intentionally NOT included — they have no HTTP surface to document.\n *\n * The introspection emitter MUST drop non-API operations BEFORE\n * projecting; the generator additionally re-asserts the variant via\n * Zod parse so a future bug at the projector layer cannot inject\n * non-API ops into an API doc.\n */\nexport enum OperationProjectionVariantType {\n API_CALL = 'api_call',\n API_CALL_WITH_CALLBACK = 'api_call_with_callback',\n}\n\n/**\n * Mirror of `@wildo-ai/saas-models` `ResourcePrimaryScope` — kept\n * complete (4 members) because scope remains part of the documented operation\n * contract even though consumer sectioning is now an explicit separate fact.\n *\n * If `ResourcePrimaryScope` grows a new member upstream, update this\n * enum in the same commit AND extend the audience splitter to either\n * route the new scope into one of the existing buckets or fail-closed\n * with a clear \"unsupported scope\" error — never silently drop the op.\n */\nexport enum OperationProjectionPrimaryScope {\n USER_SELF = 'user_self',\n ORGANIZATIONS = 'organizations',\n APPLICATION = 'applications',\n ANONYMOUS = 'anonymous',\n}\n\n/**\n * Allowed HTTP methods carried on a projected operation. Mirrors the\n * `HttpMethod` enum in `@wildo-ai/saas-models` but kept local for the\n * same boundary reason as the variant + scope enums above.\n *\n * Lowercase string values match the OpenAPI 3.1 path-item keys\n * (`get`, `post`, `put`, `delete`, `patch`) — keeping the projection\n * value verbatim consumable by the YAML emitter avoids one hop of\n * case-translation in the hot path.\n */\nexport enum OperationProjectionHttpVerb {\n GET = 'get',\n POST = 'post',\n PUT = 'put',\n DELETE = 'delete',\n PATCH = 'patch',\n}\n\n/**\n * Authentication posture resolved from the same role binding the backend\n * enforces. This is intentionally a documentation fact rather than a browser\n * inference: `APP_PUBLIC` and `APP_ANONYMOUS` are access-mode sentinels, while\n * every other role is an authorization requirement.\n */\nexport enum OperationProjectionAuthenticationMode {\n PUBLIC = 'public',\n ANONYMOUS_SESSION = 'anonymous_session',\n AUTHENTICATED = 'authenticated',\n ANONYMOUS_OR_AUTHENTICATED = 'anonymous_or_authenticated',\n}\n\n/**\n * One role requirement as it should be understood by an integrator. `role`\n * remains the exact runtime token; `label` is resolved once at generation time\n * and the explanatory fields come from the application role specification —\n * never from a browser-side naming heuristic.\n */\nexport const OperationRoleRequirementSchema = z.strictObject({\n role: z.string().min(1),\n label: z.string().min(1).max(200),\n businessRole: z.string().min(1).max(4000).nullable(),\n authorityBoundary: z.string().min(1).max(4000).nullable(),\n});\nexport type OperationRoleRequirement = z.infer<typeof OperationRoleRequirementSchema>;\n\n/**\n * Consumer-facing access contract emitted into the operation's `x-wildo`\n * metadata. Its prose is assembled in the introspection subprocess from the\n * authoritative role specifications; the OpenAPI generator and browser only\n * transport and render it.\n */\nexport const OperationAccessDocumentationSchema = z.strictObject({\n authenticationMode: z.enum(OperationProjectionAuthenticationMode),\n authenticationSummary: z.string().min(1).max(500),\n roleRequirements: z.array(OperationRoleRequirementSchema),\n});\nexport type OperationAccessDocumentation = z.infer<typeof OperationAccessDocumentationSchema>;\n\n/** Versioned identity carried from the resolved HTTP operation into OpenAPI. */\nexport const OPENAPI_OPERATION_IDENTITY_CONTRACT_VERSION = 1;\n\n/** Versioned identity carried by each generated OpenAPI resource tag. */\nexport const OPENAPI_RESOURCE_IDENTITY_CONTRACT_VERSION = 1;\n\n/**\n * The non-editorial identity of one externally exposed HTTP operation.\n *\n * This deliberately excludes `operationKey`: that key exists to create a\n * readable OpenAPI `operationId` and can contain a defensive positional\n * fallback for unusual multi-path configurations. Conservation, generated\n * routes and framework metadata must instead join this stable source tuple.\n */\nexport const OpenApiOperationIdentitySchema = z.strictObject({\n contractVersion: z.literal(OPENAPI_OPERATION_IDENTITY_CONTRACT_VERSION),\n resourceRef: z.string().min(1),\n operationFamilyRef: z.string().min(1),\n operationVariantRef: z.string().min(1),\n variantType: z.enum(OperationProjectionVariantType),\n httpVerb: z.enum(OperationProjectionHttpVerb),\n path: z.string().min(1),\n});\nexport type OpenApiOperationIdentity = z.infer<typeof OpenApiOperationIdentitySchema>;\n\n/**\n * Derives stable semantic refs for the resolved operation tuple. This is the\n * sole constructor so the subprocess projector, generator and future browser\n * reader cannot gradually invent incompatible identities.\n */\nexport function createOpenApiOperationIdentity(input: {\n readonly resourceIdentifier: string;\n readonly baseOperationIdentifier: string;\n readonly variantKey: string | null;\n readonly variantType: OperationProjectionVariantType;\n readonly httpVerb: OperationProjectionHttpVerb;\n readonly path: string;\n}): OpenApiOperationIdentity {\n const encode = (value: string): string => encodeURIComponent(value);\n const resourceRef = `technical-documentation:resource/${encode(input.resourceIdentifier)}`;\n const operationFamilyRef = `${resourceRef}/operation-family/${encode(input.baseOperationIdentifier)}`;\n const variantSegment = input.variantKey === null ? 'default' : encode(input.variantKey);\n return {\n contractVersion: OPENAPI_OPERATION_IDENTITY_CONTRACT_VERSION,\n resourceRef,\n operationFamilyRef,\n operationVariantRef:\n `${operationFamilyRef}/variant/${variantSegment}/${input.variantType}/${input.httpVerb}/${encode(input.path)}`,\n variantType: input.variantType,\n httpVerb: input.httpVerb,\n path: input.path,\n };\n}\n\n/**\n * Single projected operation — the atomic unit consumed by the URL-bearing\n * operation guard and the explicit consumer-section grouping.\n *\n * Field decisions:\n *\n * - `resourceIdentifier` is a free string (NOT typed against\n * `CoreResourceType`) because applications can declare custom\n * resource types beyond the core enum. The generator uses this\n * string as the OpenAPI tag name, so we want the wire format to\n * survive any application-extended vocabulary without a schema\n * bump.\n *\n * - `operationKey` is the framework's canonical operation identifier\n * (e.g. `'CREATE'`, `'LIST'`, `'READ'`, custom-named ops); used\n * verbatim as the OpenAPI `operationId` after a small\n * PascalCase prefix (`<Resource><OperationKey>`). Stable across\n * runs so client-codegen consumers can rely on it.\n *\n * - `httpVerb` and `path` carry the wire-level routing details. The\n * `path` MUST be the OpenAPI-style template path (e.g.\n * `/api/v1/{organizationId}/users/{userId}`), NOT an Express\n * `:userId` form — the projector at the introspection side is\n * responsible for the Express → OpenAPI brace conversion so the\n * generator can pass the value through unchanged.\n *\n * - `roles` is the resolved string list (after enum → string\n * flattening) so the splitter can audience-classify without\n * re-importing the role enums. Empty array is rejected via Zod's\n * `.min(1)` because every operation in the framework MUST declare\n * at least one role binding (the framework's resource-config\n * schema enforces this on the source side; the Zod check here is\n * defense-in-depth).\n *\n * - `requestBodySchema` / `responseBodySchema` carry pre-converted\n * JSON Schema fragments (from `z.toJSONSchema()` at the projector\n * side). The generator does NOT see the source Zod schemas — the\n * projector does the conversion so the generator stays\n * decorator-framework-free (importing a Zod schema graph would\n * pull `initZodDecorators()` for any `@wildo-ai/saas-models`-typed\n * schema).\n *\n * - `summary` and `description` are optional human-readable strings;\n * when omitted, the YAML emitter falls back to the canonical\n * `<HTTP_VERB> <Resource>.<OperationKey>` derivation so the docs\n * site never renders a literal \"undefined\" title.\n *\n * - `isApiKeyAccessDisabled` is an authentication-mode fact. The\n * introspection projector forwards it verbatim; the generator keeps the\n * operation and omits only its API-key security alternative.\n *\n * - `stepUpAuthentication` is present only when the resolved operation\n * requires a fresh, single-use re-authentication proof. Both values are\n * projected from the framework's named route/header constants so OpenAPI\n * never invents or duplicates the protocol vocabulary.\n *\n * - `acceptsIfMatch` is the resolved optimistic-locking capability of this\n * exact HTTP operation. It is true only for the controller's supported\n * single-resource UPDATE-like lane, including custom operations borrowing\n * UPDATE semantics; the generator uses it to expose the optional header and\n * its framework-owned 400/409 outcomes without resource-level duplication.\n *\n * - `callbackPath` is OPTIONAL and MUST be present iff\n * `variantType === API_CALL_WITH_CALLBACK`. The generator emits an\n * OpenAPI 3.1 `callbacks:` block when set. The schema's\n * `superRefine` enforces this invariant at parse time so the\n * generator's hot path can assume the field is correctly populated.\n */\nexport const OperationProjectionSchema = z.strictObject({\n resourceIdentifier: z.string().min(1),\n operationKey: z.string().min(1),\n /**\n * The RAW operation identifier (e.g. `CREATE`, `LIST`, `EXPORT_AUDIT_LOGS`,\n * `ROTATE_TOKEN`) WITHOUT the variant / bulk / multi-path qualifiers that\n * `operationKey` appends. `buildOperationId` needs this to compose a\n * verb-first developer-facing operationId (`createOrganization`): the verb\n * is derived from the base identifier and the resource noun from\n * `resourceIdentifier`, while the qualifiers are `operationKey` with this\n * prefix removed. Carried separately because a base identifier can itself\n * contain `_` (e.g. `EXPORT_AUDIT_LOGS`), so the qualifier boundary cannot be\n * recovered from `operationKey` alone.\n */\n baseOperationIdentifier: z.string().min(1),\n /** Exact runtime variant discriminator. `null` is the canonical default variant. */\n variantKey: z.string().min(1).nullable(),\n variantType: z.enum(OperationProjectionVariantType),\n httpVerb: z.enum(OperationProjectionHttpVerb),\n path: z.string().min(1),\n primaryScope: z.enum(OperationProjectionPrimaryScope),\n /**\n * Consumer-facing documentation section resolved at the source-authority\n * boundary. The OpenAPI generator groups by this explicit fact; it must not\n * reinterpret internal scopes or role strings into product navigation.\n */\n consumerApiSection: z.enum(OpenApiSection),\n /**\n * Stable source identity used for conservation and the strict `x-wildo`\n * extension. It is not a human-facing operationId and never depends on\n * iteration order or display prose.\n */\n identity: OpenApiOperationIdentitySchema,\n // Resolved role list (enum → string). MAY be empty: an operation with no\n // declared roles is a real, intentional runtime state — an open / no-specific-\n // role-gate endpoint (e.g. the core `users` LIST: \"app users can list users\").\n // Each entry must be a non-empty string, but the array itself can be `[]`. The\n // source classifier treats an empty role set as normal API, not application\n // administration. NOT `.min(1)` — not every engine endpoint is role-gated.\n roles: z.array(z.string().min(1)),\n /**\n * Source-resolved consumer access explanation. This must remain aligned with\n * `roles`: the projector is the only place allowed to interpret access-mode\n * sentinels and attach the app's role-specification prose.\n */\n access: OperationAccessDocumentationSchema,\n isApiKeyAccessDisabled: z.boolean(),\n stepUpAuthentication: z.strictObject({\n headerName: z.string().min(1),\n tokenEndpointPath: z.string().min(1),\n }).optional(),\n acceptsIfMatch: z.boolean(),\n summary: z.string().min(1).max(200).optional(),\n description: z.string().min(1).max(2000).optional(),\n /**\n * JSON-Schema fragment representing the request body (or query for\n * GET / DELETE if the projector chose to flatten query parameters\n * into a single schema). The exact shape is whatever\n * `z.toJSONSchema()` emits. For POST / PUT / PATCH style verbs the\n * generator passes it through unchanged into the OpenAPI\n * `requestBody.content.application/json.schema` slot. For GET /\n * DELETE the generator expects an object-shaped schema and explodes\n * the top-level properties into `parameters[]` entries with\n * `in: 'query'`. `null` means \"no request input\".\n */\n requestBodySchema: z.unknown().nullable(),\n /**\n * JSON-Schema fragment representing the 2xx response body. `null`\n * means \"no body\" → emitted as a 204-style `responses` entry with\n * description only. `unknown` to stay format-agnostic; the\n * projector is responsible for emitting valid JSON Schema.\n */\n responseBodySchema: z.unknown().nullable(),\n /**\n * Paginated-collection query contract — present iff the operation is a\n * framework paginated collection operation (a `LIST` / `SEARCH` core\n * operation, or a custom operation borrowing one via\n * `resourceOperationLike`). Those operations universally accept the flat\n * `page` / `limit` / `sort` query parameters and return the\n * `{ data, pagination }` envelope (the backend controller forces\n * `paginated: true` for every HTTP LIST/SEARCH dispatch), but NONE of that\n * appears in the operation's request DTO — without this block the generator\n * would document a paginated endpoint with no way to page it.\n *\n * The PROJECTOR resolves the per-operation values (it sees the resolved\n * runtime operation); the GENERATOR owns the universal parameter shapes and\n * the framework-constant defaults (`page` defaults to 1, `limit` to 20 —\n * mirrors of the repository `_doList` defaults). Split chosen so this wire\n * schema stays framework-decoupled: the projection carries FACTS, not\n * OpenAPI fragments.\n *\n * - `maxLimit` — largest accepted `limit` value. Resolved from the\n * operation's `maxPaginatedResultPerPageLimit ?? 50` (the same fallback\n * the frontend HTTP client clamps with; only SEARCH-like operations can\n * author a different cap today).\n * - `sortableFields` — the operation's declared `sortFields` allow-list.\n * Non-empty: only these fields may be named in `sort` (unrecognised\n * fields are silently ignored by the backend validator) and the default\n * ordering is the first entry, descending. Empty: the backend applies\n * any requested field verbatim and defaults to `createdAt:desc`.\n */\n pagination: z.strictObject({\n maxLimit: z.number().int().min(1),\n sortableFields: z.array(z.string().min(1)),\n }).optional(),\n /**\n * Path of the asynchronous callback (`API_CALL_WITH_CALLBACK` only).\n * The generator turns this into an OpenAPI `callbacks:` block\n * referencing the same `responseBodySchema`.\n */\n callbackPath: z.string().min(1).optional(),\n /**\n * Tier-3 authored HTTP documentation, projected from the resource\n * specification's operation overlay. All optional; when present the\n * generator emits real `responses` (success + error), request/response\n * `examples`, an `x-idempotent` extension, and a rate-limit note instead of\n * the default single `200`/`204`. `code` / `forStatus` are OpenAPI status\n * keys (`'200'`, `'404'`, …).\n */\n responseStatuses: z.array(z.strictObject({\n code: z.string().min(1),\n meaning: z.string().min(1),\n })).optional(),\n errorScenarios: z.array(z.strictObject({\n code: z.string().min(1),\n when: z.string().min(1),\n errorCode: z.string().min(1).optional(),\n })).optional(),\n idempotent: z.boolean().optional(),\n rateLimitNote: z.string().min(1).optional(),\n examples: z.array(z.strictObject({\n title: z.string().min(1),\n request: z.unknown().optional(),\n response: z.unknown().optional(),\n forStatus: z.string().min(1).optional(),\n })).optional(),\n}).superRefine((projection, ctx) => {\n if (\n projection.identity.variantType !== projection.variantType\n || projection.identity.httpVerb !== projection.httpVerb\n || projection.identity.path !== projection.path\n ) {\n ctx.addIssue({\n code: 'custom',\n path: ['identity'],\n message: 'OperationProjection identity must exactly mirror the resolved variant type, HTTP verb and path.',\n });\n }\n if (projection.variantType === OperationProjectionVariantType.API_CALL_WITH_CALLBACK) {\n if (projection.callbackPath === undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['callbackPath'],\n message:\n `OperationProjection for '${projection.resourceIdentifier}.${projection.operationKey}' ` +\n `has variantType=${OperationProjectionVariantType.API_CALL_WITH_CALLBACK} but no callbackPath. ` +\n `The introspection projector MUST populate callbackPath for callback variants — without it the generator ` +\n `cannot emit an OpenAPI \\`callbacks:\\` block, which would silently produce a misleading doc that ` +\n `looks like a regular synchronous endpoint.`,\n });\n }\n } else if (projection.callbackPath !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['callbackPath'],\n message:\n `OperationProjection for '${projection.resourceIdentifier}.${projection.operationKey}' ` +\n `has callbackPath but variantType=${projection.variantType} (expected ${OperationProjectionVariantType.API_CALL_WITH_CALLBACK}). ` +\n `Reject at parse time so the projector bug surfaces immediately rather than producing a doc with phantom callback metadata.`,\n });\n }\n});\nexport type OperationProjection = z.infer<typeof OperationProjectionSchema>;\n\n/**\n * Closed projection vocabulary mirroring the relationship cardinalities in\n * `@wildo-ai/saas-models`. It deliberately lives in the narrow IPC/OpenAPI\n * contract so the generator and browser never need to import the full resource\n * registry just to render a resource's public relationship semantics.\n */\nexport enum ResourceRelationshipDocumentationCardinality {\n ONE = 'one',\n ZERO_OR_ONE = 'zero_or_one',\n ONE_OR_MANY = 'one_or_many',\n MANY = 'many',\n}\n\n/** The three developer-authored relationship meanings projected into OpenAPI. */\nexport enum ResourceRelationshipDocumentationNature {\n COMPOSITION = 'composition',\n REFERENCE = 'reference',\n ASSOCIATION = 'association',\n}\n\n/** The compiled lifecycle dependency of a relationship, not a presentation hint. */\nexport enum ResourceRelationshipDocumentationLifecycleModel {\n DEPENDENT = 'dependent',\n INDEPENDENT = 'independent',\n LINK_ONLY = 'link_only',\n}\n\n/** Execution timing for an explicitly configured parent-delete lifecycle. */\nexport enum ResourceRelationshipDocumentationDeleteMode {\n IMMEDIATE = 'immediate',\n LAZY = 'lazy',\n}\n\n/** Effect of an explicitly configured parent-delete lifecycle. */\nexport enum ResourceRelationshipDocumentationDeleteStrategy {\n DELETE = 'delete',\n IMPERSONALIZE_AND_RETAIN = 'impersonalize_and_retain',\n}\n\n/**\n * One relationship fact from the perspective of a resource OpenAPI tag.\n *\n * `relatedResourceName` and the two cardinalities are deliberately symmetric:\n * resource configurations include both ordinary parent → child relationships\n * and FK-reference declarations, so this public contract must not guess an\n * ownership direction from declaration order. `lifecycleModel` and the\n * optional `onParentDelete` policy carry the framework's already-resolved\n * lifecycle truth without exposing registry implementation details.\n */\nexport const ResourceRelationshipDocumentationSchema = z.strictObject({\n relatedResourceName: z.string().min(1),\n /** Resolved FK identity when the relationship is represented by a field. */\n foreignKeyField: z.string().min(1).optional(),\n resourceCardinality: z.enum(ResourceRelationshipDocumentationCardinality),\n relatedResourceCardinality: z.enum(ResourceRelationshipDocumentationCardinality),\n nature: z.enum(ResourceRelationshipDocumentationNature),\n lifecycleModel: z.enum(ResourceRelationshipDocumentationLifecycleModel),\n onParentDelete: z.strictObject({\n enabled: z.boolean(),\n mode: z.enum(ResourceRelationshipDocumentationDeleteMode),\n strategy: z.enum(ResourceRelationshipDocumentationDeleteStrategy),\n maxDepth: z.number().int().min(0),\n }).optional(),\n});\nexport type ResourceRelationshipDocumentation = z.infer<typeof ResourceRelationshipDocumentationSchema>;\n\n/**\n * A source-declared grouping for resources in one consumer API reference.\n *\n * API resource categories are navigation meaning, not a renderer inference.\n * An application declares the category once in `wildo.tech-doc.config.ts`; the\n * companion attaches it to the corresponding resource tag and the generator\n * transports the fact through strict OpenAPI metadata. The identifier is\n * deliberately application-defined: different products can have genuinely\n * different business domains while still using the same renderer.\n */\nexport const ApiReferenceResourceCategorySchema = z.strictObject({\n /** Stable, readable public identity used in API-reference fragments. */\n id: z.string().regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/).max(100),\n /** Consumer-facing category label displayed by the renderer. */\n label: z.string().min(1).max(200),\n /** Optional category orientation supplied by the application, never React. */\n description: z.string().min(1).max(2000).optional(),\n});\nexport type ApiReferenceResourceCategory = z.infer<typeof ApiReferenceResourceCategorySchema>;\n\n/**\n * Optional per-resource OpenAPI tag descriptor (specification + registry enrichment).\n *\n * The generator groups operations under a tag named after the resource\n * identifier. Each emitted OpenAPI tag has a strict `x-wildo` resource identity;\n * this descriptor enriches it with its specification-owned purpose/lifecycle\n * prose and the compiled relationship facts from the resolved resource graph.\n */\nexport const ResourceTagSchema = z.strictObject({\n /** Must equal the `resourceIdentifier` the generator derives the tag from. */\n name: z.string().min(1),\n /** Business-purpose prose for the resource group. */\n description: z.string().min(1).max(2000).optional(),\n /** Specification-owned explanation of how this resource changes over time. */\n lifecycleRole: z.string().min(1).max(4000).optional(),\n /** Compiled relationship facts relevant to this resource. */\n relationships: z.array(ResourceRelationshipDocumentationSchema).optional(),\n /** Explicit application-owned API-reference navigation grouping. */\n category: ApiReferenceResourceCategorySchema.optional(),\n});\nexport type ResourceTag = z.infer<typeof ResourceTagSchema>;\n\n/**\n * One OpenAPI `servers[]` entry — a base URL the API is reachable at, plus an\n * optional human label. **App-enriched**: deployment URLs are an\n * application/environment concern (the framework cannot know an app's prod\n * domain), so they are authored on `WildoTechnicalDocConfig.apiServers` and\n * threaded into `OpenApiGenerationInput.servers`. The shared shape lives here\n * (the boundary-clean, zod-only module the generator consumes); the config\n * schema imports it so the two never drift.\n */\nexport const OpenApiServerSchema = z.strictObject({\n /**\n * Base URL — the bare ORIGIN the API is served from, e.g.\n * `http://localhost:4241` or `https://api.example.com`. Do NOT append the\n * `/api/v1` mount: the generated operation `paths` are already mount-prefixed\n * (`/api/v1/...`), and the effective request URL is `server.url` + path — so\n * including the mount here would DOUBLE it (`…/api/v1/api/v1/...`).\n */\n url: z.string().min(1),\n /** Optional human label shown in the docs server picker (e.g. \"Production\"). */\n description: z.string().min(1).max(200).optional(),\n});\nexport type OpenApiServer = z.infer<typeof OpenApiServerSchema>;\n\n/**\n * Top-level wire format consumed by the OpenAPI generator. Wrapped\n * in an object so the projector can attach metadata (app slug, build\n * timestamp, framework version) without a schema-shape break later.\n */\nexport const OpenApiGenerationInputSchema = z.strictObject({\n /**\n * App slug from `WildoSaasConfig.slug`. Surfaces in the generated\n * `openapi.info.title` so a\n * multi-app generation run can be disambiguated. Free-string\n * (no validation against `WildoSaasConfigSchema.slug` regex) because\n * the generator should not gate on the same constraint twice; the\n * `defineSaasConfig` parser already enforced the shape at author time.\n */\n appSlug: z.string().min(1),\n /**\n * App display name from `WildoSaasConfig.displayName` — used as the\n * default base title in the generated `openapi.info.title`. The\n * companion route concatenates it with the section name\n * (`\"Wonder Todos API reference\"`).\n */\n appDisplayName: z.string().min(1),\n /**\n * Optional public marketing title from `WildoSaasConfig.technicalDoc.publicMarketingTitle`.\n * When present, replaces `appDisplayName` in the generated title so\n * the OpenAPI docs match the docs site landing page.\n */\n publicMarketingTitle: z.string().min(1).max(200).optional(),\n /** Exact supported public API contract release surfaced in `openapi.info.version`. */\n supportedApiVersion: TechnicalDocumentationSupportedApiVersionSchema,\n /**\n * Flat list of all URL-bearing operation projections. The projector includes\n * every exposed operation and resolves its consumer section explicitly; the\n * generator validates, groups and renders without eligibility inference.\n */\n operations: z.array(OperationProjectionSchema),\n /**\n * JSON Schema for the canonical framework HTTP error envelope. The\n * subprocess converts the same `ErrorResponseSchema` the backend serializes;\n * the generator registers it once as `components.schemas.ErrorResponse` and\n * references it from every documented non-success response. Keeping this\n * here makes the OpenAPI document an exact projection of the runtime wire\n * contract rather than a renderer-owned approximation.\n */\n errorResponseSchema: z.unknown(),\n /**\n * Optional resource → tag-description descriptors. The generator emits each\n * one as an OpenAPI top-level `tags[].description` for the tags it derives\n * from a section's operations; resources without a descriptor still get a\n * bare `{ name }` tag. Order-independent (the generator looks up by `name`).\n */\n resourceTags: z.array(ResourceTagSchema).optional(),\n /**\n * Optional OpenAPI `servers[]` — the base URLs the API is reachable at.\n * App-enriched via `WildoTechnicalDocConfig.apiServers` (deployment URLs are\n * application/environment knowledge, not framework knowledge). When omitted\n * the generator emits no `servers` block (back-compatible with the\n * pre-servers output). Each entry is `{ url, description? }`.\n */\n servers: z.array(OpenApiServerSchema).optional(),\n /**\n * Optional app-authored markdown intro for the API reference landing page,\n * from `WildoTechnicalDocConfig.apiOverview`. The generator PREPENDS it to the\n * framework-universal \"## API conventions\" block (auth / pagination /\n * idempotency / errors — which it always emits) to form `info.description`.\n * App enrichment: the conventions are framework knowledge; the overview is the\n * app's own framing.\n */\n apiOverview: z.string().min(1).max(8000).optional(),\n});\nexport type OpenApiGenerationInput = z.infer<typeof OpenApiGenerationInputSchema>;\n"]}
1
+ {"version":3,"file":"operation-projection.schemas.js","sourceRoot":"","sources":["../../../src/companion/operation-projection.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,+CAA+C,EAAE,MAAM,uDAAuD,CAAC;AACxH,OAAO,EAAE,CAAC,EAAE,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CAAC;IAC9C;;;;;;;OAOG;IACH,mBAAmB,EAAE,CAAC,CAAC,OAAO,EAAE;IAChC;;;;;OAKG;IACH,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;IACnD;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE;IAChD;;;;;;;OAOG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC","sourcesContent":["/**\n * @wildo-package @wildo-ai/saas-technical-doc/companion (input projection)\n *\n * Input shape consumed by the companion-side OpenAPI generator\n * (saas-technical-doc.md Step 3).\n *\n * Why a dedicated projection (and NOT importing `ResourcesRegistry` from\n * `@wildo-ai/saas-models`):\n *\n * - The full `ResourceConfiguration` carries ~40 internal-only fields\n * (factory metadata, repository wiring, validation hooks, frontend\n * presets, lifecycle bindings, …). The OpenAPI generator does NOT need\n * any of them — it needs ONLY operation-level HTTP shape data\n * (method + path + request/response Zod schemas + role binding +\n * primary scope + authentication-mode flags). Coupling the\n * generator to the full type would (a) drag the entire schema graph\n * + decorator framework into the companion bundle, defeating the\n * point of `@wildo-ai/saas-models/public-runtime`; (b) couple test\n * fixtures to dozens of irrelevant fields, making generator unit\n * tests brittle to unrelated framework changes; (c) make the\n * introspection-subprocess hop's wire format depend on the entire\n * framework's type stability.\n *\n * - The introspection subprocess (wonder-todos backend) ALREADY has\n * the resolved `ResourceConfiguration` graph — it's the natural\n * place to flatten it into this minimal projection. The companion\n * process then transforms the projection into YAML without ever\n * needing the framework's resource-config types.\n *\n * - This file re-declares the small subset of enums/literals the\n * projection carries (`ResourceOperationVariantTypeProjection`,\n * `ResourcePrimaryScopeProjection`) rather than importing them from\n * `@wildo-ai/saas-models` so that `engine/saas-technical-doc/companion`\n * does NOT pull the heavy package's root barrel (which boots\n * `initZodDecorators()` — see `saas-models-public-runtime.md` K-3 for\n * the rationale). The projection's enum members MUST stay in\n * one-to-one alignment with `ResourceOperationVariantType` and\n * `ResourcePrimaryScope`; if the source enums grow a new member,\n * update this file in the same commit and rerun the boundary tests.\n *\n * @wildo-boundary\n * This file imports only Zod and the portable technical-documentation\n * contract subpath — no React, no `@wildo-ai/saas-models` root, no\n * decorators. The supported API version deliberately reuses the publication\n * contract's named runtime schema rather than creating a parallel vocabulary.\n */\n\nimport { TechnicalDocumentationSupportedApiVersionSchema } from '@wildo-ai/saas-specifications/technical-documentation';\nimport { z } from 'zod';\n\nimport { OpenApiSection } from '../openapi/openapi-generation-output.schemas';\n\n/**\n * Mirror of `@wildo-ai/saas-models` `ResourceOperationVariantType` —\n * narrowed to the two variants the OpenAPI generator emits per K-5\n * (`API_CALL` is the default URL-bearing operation; `API_CALL_WITH_CALLBACK`\n * additionally carries an asynchronous callback URL). Other variants\n * (`CRON_JOB`, `BATCH_JOB`, `INTERNAL_CALL`, `REPOSITORY_ONLY`) are\n * intentionally NOT included — they have no HTTP surface to document.\n *\n * The introspection emitter MUST drop non-API operations BEFORE\n * projecting; the generator additionally re-asserts the variant via\n * Zod parse so a future bug at the projector layer cannot inject\n * non-API ops into an API doc.\n */\nexport enum OperationProjectionVariantType {\n API_CALL = 'api_call',\n API_CALL_WITH_CALLBACK = 'api_call_with_callback',\n}\n\n/**\n * Mirror of `@wildo-ai/saas-models` `ResourcePrimaryScope` — kept\n * complete (4 members) because scope remains part of the documented operation\n * contract even though consumer sectioning is now an explicit separate fact.\n *\n * If `ResourcePrimaryScope` grows a new member upstream, update this\n * enum in the same commit AND extend the audience splitter to either\n * route the new scope into one of the existing buckets or fail-closed\n * with a clear \"unsupported scope\" error — never silently drop the op.\n */\nexport enum OperationProjectionPrimaryScope {\n USER_SELF = 'user_self',\n ORGANIZATIONS = 'organizations',\n APPLICATION = 'applications',\n ANONYMOUS = 'anonymous',\n}\n\n/**\n * Allowed HTTP methods carried on a projected operation. Mirrors the\n * `HttpMethod` enum in `@wildo-ai/saas-models` but kept local for the\n * same boundary reason as the variant + scope enums above.\n *\n * Lowercase string values match the OpenAPI 3.1 path-item keys\n * (`get`, `post`, `put`, `delete`, `patch`) — keeping the projection\n * value verbatim consumable by the YAML emitter avoids one hop of\n * case-translation in the hot path.\n */\nexport enum OperationProjectionHttpVerb {\n GET = 'get',\n POST = 'post',\n PUT = 'put',\n DELETE = 'delete',\n PATCH = 'patch',\n}\n\n/**\n * Authentication posture resolved from the same role binding the backend\n * enforces. This is intentionally a documentation fact rather than a browser\n * inference: `APP_PUBLIC` and `APP_ANONYMOUS` are access-mode sentinels, while\n * every other role is an authorization requirement.\n */\nexport enum OperationProjectionAuthenticationMode {\n PUBLIC = 'public',\n ANONYMOUS_SESSION = 'anonymous_session',\n AUTHENTICATED = 'authenticated',\n ANONYMOUS_OR_AUTHENTICATED = 'anonymous_or_authenticated',\n}\n\n/**\n * One role requirement as it should be understood by an integrator. `role`\n * remains the exact runtime token; `label` is resolved once at generation time\n * and the explanatory fields come from the application role specification —\n * never from a browser-side naming heuristic.\n */\nexport const OperationRoleRequirementSchema = z.strictObject({\n role: z.string().min(1),\n label: z.string().min(1).max(200),\n businessRole: z.string().min(1).max(4000).nullable(),\n authorityBoundary: z.string().min(1).max(4000).nullable(),\n});\nexport type OperationRoleRequirement = z.infer<typeof OperationRoleRequirementSchema>;\n\n/**\n * Consumer-facing access contract emitted into the operation's `x-wildo`\n * metadata. Its prose is assembled in the introspection subprocess from the\n * authoritative role specifications; the OpenAPI generator and browser only\n * transport and render it.\n */\nexport const OperationAccessDocumentationSchema = z.strictObject({\n authenticationMode: z.enum(OperationProjectionAuthenticationMode),\n authenticationSummary: z.string().min(1).max(500),\n roleRequirements: z.array(OperationRoleRequirementSchema),\n});\nexport type OperationAccessDocumentation = z.infer<typeof OperationAccessDocumentationSchema>;\n\n/** Versioned identity carried from the resolved HTTP operation into OpenAPI. */\nexport const OPENAPI_OPERATION_IDENTITY_CONTRACT_VERSION = 1;\n\n/** Versioned identity carried by each generated OpenAPI resource tag. */\nexport const OPENAPI_RESOURCE_IDENTITY_CONTRACT_VERSION = 1;\n\n/**\n * The non-editorial identity of one externally exposed HTTP operation.\n *\n * This deliberately excludes `operationKey`: that key exists to create a\n * readable OpenAPI `operationId` and can contain a defensive positional\n * fallback for unusual multi-path configurations. Conservation, generated\n * routes and framework metadata must instead join this stable source tuple.\n */\nexport const OpenApiOperationIdentitySchema = z.strictObject({\n contractVersion: z.literal(OPENAPI_OPERATION_IDENTITY_CONTRACT_VERSION),\n resourceRef: z.string().min(1),\n operationFamilyRef: z.string().min(1),\n operationVariantRef: z.string().min(1),\n variantType: z.enum(OperationProjectionVariantType),\n httpVerb: z.enum(OperationProjectionHttpVerb),\n path: z.string().min(1),\n});\nexport type OpenApiOperationIdentity = z.infer<typeof OpenApiOperationIdentitySchema>;\n\n/**\n * Derives stable semantic refs for the resolved operation tuple. This is the\n * sole constructor so the subprocess projector, generator and future browser\n * reader cannot gradually invent incompatible identities.\n */\nexport function createOpenApiOperationIdentity(input: {\n readonly resourceIdentifier: string;\n readonly baseOperationIdentifier: string;\n readonly variantKey: string | null;\n readonly variantType: OperationProjectionVariantType;\n readonly httpVerb: OperationProjectionHttpVerb;\n readonly path: string;\n}): OpenApiOperationIdentity {\n const encode = (value: string): string => encodeURIComponent(value);\n const resourceRef = `technical-documentation:resource/${encode(input.resourceIdentifier)}`;\n const operationFamilyRef = `${resourceRef}/operation-family/${encode(input.baseOperationIdentifier)}`;\n const variantSegment = input.variantKey === null ? 'default' : encode(input.variantKey);\n return {\n contractVersion: OPENAPI_OPERATION_IDENTITY_CONTRACT_VERSION,\n resourceRef,\n operationFamilyRef,\n operationVariantRef:\n `${operationFamilyRef}/variant/${variantSegment}/${input.variantType}/${input.httpVerb}/${encode(input.path)}`,\n variantType: input.variantType,\n httpVerb: input.httpVerb,\n path: input.path,\n };\n}\n\n/**\n * Single projected operation — the atomic unit consumed by the URL-bearing\n * operation guard and the explicit consumer-section grouping.\n *\n * Field decisions:\n *\n * - `resourceIdentifier` is a free string (NOT typed against\n * `CoreResourceType`) because applications can declare custom\n * resource types beyond the core enum. The generator uses this\n * string as the OpenAPI tag name, so we want the wire format to\n * survive any application-extended vocabulary without a schema\n * bump.\n *\n * - `operationKey` is the framework's canonical operation identifier\n * (e.g. `'CREATE'`, `'LIST'`, `'READ'`, custom-named ops); used\n * verbatim as the OpenAPI `operationId` after a small\n * PascalCase prefix (`<Resource><OperationKey>`). Stable across\n * runs so client-codegen consumers can rely on it.\n *\n * - `httpVerb` and `path` carry the wire-level routing details. The\n * `path` MUST be the OpenAPI-style template path (e.g.\n * `/api/v1/{organizationId}/users/{userId}`), NOT an Express\n * `:userId` form — the projector at the introspection side is\n * responsible for the Express → OpenAPI brace conversion so the\n * generator can pass the value through unchanged.\n *\n * - `roles` is the resolved string list (after enum → string\n * flattening) so the splitter can audience-classify without\n * re-importing the role enums. Empty array is rejected via Zod's\n * `.min(1)` because every operation in the framework MUST declare\n * at least one role binding (the framework's resource-config\n * schema enforces this on the source side; the Zod check here is\n * defense-in-depth).\n *\n * - `requestBodySchema` / `responseBodySchema` carry pre-converted\n * JSON Schema fragments (from `z.toJSONSchema()` at the projector\n * side). The generator does NOT see the source Zod schemas — the\n * projector does the conversion so the generator stays\n * decorator-framework-free (importing a Zod schema graph would\n * pull `initZodDecorators()` for any `@wildo-ai/saas-models`-typed\n * schema).\n *\n * - `summary` and `description` are optional human-readable strings;\n * when omitted, the YAML emitter falls back to the canonical\n * `<HTTP_VERB> <Resource>.<OperationKey>` derivation so the docs\n * site never renders a literal \"undefined\" title.\n *\n * - `isApiKeyAccessDisabled` is an authentication-mode fact. The\n * introspection projector forwards it verbatim; the generator keeps the\n * operation and omits only its API-key security alternative.\n *\n * - `stepUpAuthentication` is present only when the resolved operation\n * requires a fresh, single-use re-authentication proof. Both values are\n * projected from the framework's named route/header constants so OpenAPI\n * never invents or duplicates the protocol vocabulary.\n *\n * - `acceptsIfMatch` is the resolved optimistic-locking capability of this\n * exact HTTP operation. It is true only for the controller's supported\n * single-resource UPDATE-like lane, including custom operations borrowing\n * UPDATE semantics; the generator uses it to expose the optional header and\n * its framework-owned 400/409 outcomes without resource-level duplication.\n *\n * - `callbackPath` is OPTIONAL and MUST be present iff\n * `variantType === API_CALL_WITH_CALLBACK`. The generator emits an\n * OpenAPI 3.1 `callbacks:` block when set. The schema's\n * `superRefine` enforces this invariant at parse time so the\n * generator's hot path can assume the field is correctly populated.\n */\nexport const OperationProjectionSchema = z.strictObject({\n resourceIdentifier: z.string().min(1),\n operationKey: z.string().min(1),\n /**\n * The RAW operation identifier (e.g. `CREATE`, `LIST`, `EXPORT_AUDIT_LOGS`,\n * `ROTATE_TOKEN`) WITHOUT the variant / bulk / multi-path qualifiers that\n * `operationKey` appends. `buildOperationId` needs this to compose a\n * verb-first developer-facing operationId (`createOrganization`): the verb\n * is derived from the base identifier and the resource noun from\n * `resourceIdentifier`, while the qualifiers are `operationKey` with this\n * prefix removed. Carried separately because a base identifier can itself\n * contain `_` (e.g. `EXPORT_AUDIT_LOGS`), so the qualifier boundary cannot be\n * recovered from `operationKey` alone.\n */\n baseOperationIdentifier: z.string().min(1),\n /** Exact runtime variant discriminator. `null` is the canonical default variant. */\n variantKey: z.string().min(1).nullable(),\n variantType: z.enum(OperationProjectionVariantType),\n httpVerb: z.enum(OperationProjectionHttpVerb),\n path: z.string().min(1),\n primaryScope: z.enum(OperationProjectionPrimaryScope),\n /**\n * Consumer-facing documentation section resolved at the source-authority\n * boundary. The OpenAPI generator groups by this explicit fact; it must not\n * reinterpret internal scopes or role strings into product navigation.\n */\n consumerApiSection: z.enum(OpenApiSection),\n /**\n * Stable source identity used for conservation and the strict `x-wildo`\n * extension. It is not a human-facing operationId and never depends on\n * iteration order or display prose.\n */\n identity: OpenApiOperationIdentitySchema,\n // Resolved role list (enum → string). MAY be empty: an operation with no\n // declared roles is a real, intentional runtime state — an open / no-specific-\n // role-gate endpoint (e.g. the core `users` LIST: \"app users can list users\").\n // Each entry must be a non-empty string, but the array itself can be `[]`. The\n // source classifier treats an empty role set as normal API, not application\n // administration. NOT `.min(1)` — not every engine endpoint is role-gated.\n roles: z.array(z.string().min(1)),\n /**\n * Source-resolved consumer access explanation. This must remain aligned with\n * `roles`: the projector is the only place allowed to interpret access-mode\n * sentinels and attach the app's role-specification prose.\n */\n access: OperationAccessDocumentationSchema,\n isApiKeyAccessDisabled: z.boolean(),\n stepUpAuthentication: z.strictObject({\n headerName: z.string().min(1),\n tokenEndpointPath: z.string().min(1),\n }).optional(),\n acceptsIfMatch: z.boolean(),\n summary: z.string().min(1).max(200).optional(),\n description: z.string().min(1).max(2000).optional(),\n /**\n * JSON-Schema fragment representing the request body (or query for\n * GET / DELETE if the projector chose to flatten query parameters\n * into a single schema). The exact shape is whatever\n * `z.toJSONSchema()` emits. For POST / PUT / PATCH style verbs the\n * generator passes it through unchanged into the OpenAPI\n * `requestBody.content.application/json.schema` slot. For GET /\n * DELETE the generator expects an object-shaped schema and explodes\n * the top-level properties into `parameters[]` entries with\n * `in: 'query'`. `null` means \"no request input\".\n */\n requestBodySchema: z.unknown().nullable(),\n /**\n * JSON-Schema fragment representing the 2xx response body. `null`\n * means \"no body\" → emitted as a 204-style `responses` entry with\n * description only. `unknown` to stay format-agnostic; the\n * projector is responsible for emitting valid JSON Schema.\n */\n responseBodySchema: z.unknown().nullable(),\n /**\n * Paginated-collection query contract — present iff the operation is a\n * framework paginated collection operation (a `LIST` / `SEARCH` core\n * operation, or a custom operation borrowing one via\n * `resourceOperationLike`). Those operations universally accept the flat\n * `page` / `limit` / `sort` query parameters and return the\n * `{ data, pagination }` envelope (the backend controller forces\n * `paginated: true` for every HTTP LIST/SEARCH dispatch), but NONE of that\n * appears in the operation's request DTO — without this block the generator\n * would document a paginated endpoint with no way to page it.\n *\n * The PROJECTOR resolves the per-operation values (it sees the resolved\n * runtime operation); the GENERATOR owns the universal parameter shapes and\n * the framework-constant defaults (`page` defaults to 1, `limit` to 20 —\n * mirrors of the repository `_doList` defaults). Split chosen so this wire\n * schema stays framework-decoupled: the projection carries FACTS, not\n * OpenAPI fragments.\n *\n * - `maxLimit` — largest accepted `limit` value. Resolved from the\n * operation's `maxPaginatedResultPerPageLimit ?? 50` (the same fallback\n * the frontend HTTP client clamps with; only SEARCH-like operations can\n * author a different cap today).\n * - `sortableFields` — the operation's declared `sortFields` allow-list.\n * Non-empty: only these fields may be named in `sort` (unrecognised\n * fields are silently ignored by the backend validator) and the default\n * ordering is the first entry, descending. Empty: the backend applies\n * any requested field verbatim and defaults to `createdAt:desc`.\n */\n pagination: z.strictObject({\n maxLimit: z.number().int().min(1),\n sortableFields: z.array(z.string().min(1)),\n }).optional(),\n /**\n * Path of the asynchronous callback (`API_CALL_WITH_CALLBACK` only).\n * The generator turns this into an OpenAPI `callbacks:` block\n * referencing the same `responseBodySchema`.\n */\n callbackPath: z.string().min(1).optional(),\n /**\n * Tier-3 authored HTTP documentation, projected from the resource\n * specification's operation overlay. All optional; when present the\n * generator emits real `responses` (success + error), request/response\n * `examples`, an `x-idempotent` extension, and a rate-limit note instead of\n * the default single `200`/`204`. `code` / `forStatus` are OpenAPI status\n * keys (`'200'`, `'404'`, …).\n */\n responseStatuses: z.array(z.strictObject({\n code: z.string().min(1),\n meaning: z.string().min(1),\n })).optional(),\n errorScenarios: z.array(z.strictObject({\n code: z.string().min(1),\n when: z.string().min(1),\n errorCode: z.string().min(1).optional(),\n })).optional(),\n idempotent: z.boolean().optional(),\n /**\n * The outbound webhook events this operation fires, if any.\n *\n * Carried on the OPERATION because that is the fact a reader needs where they are standing: a\n * developer looking at `changeStatus` wants to know that calling it notifies every configured\n * endpoint, and a receiver author wants to know which call produced the delivery they are\n * holding. The delivery mechanics — retries, signature, timeouts — belong to the webhook\n * contract and are described once, not per operation.\n */\n m2mNotifications: z.array(z.strictObject({\n /** Stable identifier of the notification declaration. */\n identifier: z.string().min(1),\n /** The channel that carries it, which is also its delivery scope (`webhook_organization`, …). */\n channel: z.string().min(1),\n level: z.string().min(1).optional(),\n })).optional(),\n rateLimitNote: z.string().min(1).optional(),\n examples: z.array(z.strictObject({\n title: z.string().min(1),\n request: z.unknown().optional(),\n response: z.unknown().optional(),\n forStatus: z.string().min(1).optional(),\n })).optional(),\n}).superRefine((projection, ctx) => {\n if (\n projection.identity.variantType !== projection.variantType\n || projection.identity.httpVerb !== projection.httpVerb\n || projection.identity.path !== projection.path\n ) {\n ctx.addIssue({\n code: 'custom',\n path: ['identity'],\n message: 'OperationProjection identity must exactly mirror the resolved variant type, HTTP verb and path.',\n });\n }\n if (projection.variantType === OperationProjectionVariantType.API_CALL_WITH_CALLBACK) {\n if (projection.callbackPath === undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['callbackPath'],\n message:\n `OperationProjection for '${projection.resourceIdentifier}.${projection.operationKey}' ` +\n `has variantType=${OperationProjectionVariantType.API_CALL_WITH_CALLBACK} but no callbackPath. ` +\n `The introspection projector MUST populate callbackPath for callback variants — without it the generator ` +\n `cannot emit an OpenAPI \\`callbacks:\\` block, which would silently produce a misleading doc that ` +\n `looks like a regular synchronous endpoint.`,\n });\n }\n } else if (projection.callbackPath !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['callbackPath'],\n message:\n `OperationProjection for '${projection.resourceIdentifier}.${projection.operationKey}' ` +\n `has callbackPath but variantType=${projection.variantType} (expected ${OperationProjectionVariantType.API_CALL_WITH_CALLBACK}). ` +\n `Reject at parse time so the projector bug surfaces immediately rather than producing a doc with phantom callback metadata.`,\n });\n }\n});\nexport type OperationProjection = z.infer<typeof OperationProjectionSchema>;\n\n/**\n * Closed projection vocabulary mirroring the relationship cardinalities in\n * `@wildo-ai/saas-models`. It deliberately lives in the narrow IPC/OpenAPI\n * contract so the generator and browser never need to import the full resource\n * registry just to render a resource's public relationship semantics.\n */\nexport enum ResourceRelationshipDocumentationCardinality {\n ONE = 'one',\n ZERO_OR_ONE = 'zero_or_one',\n ONE_OR_MANY = 'one_or_many',\n MANY = 'many',\n}\n\n/** The three developer-authored relationship meanings projected into OpenAPI. */\nexport enum ResourceRelationshipDocumentationNature {\n COMPOSITION = 'composition',\n REFERENCE = 'reference',\n ASSOCIATION = 'association',\n}\n\n/** The compiled lifecycle dependency of a relationship, not a presentation hint. */\nexport enum ResourceRelationshipDocumentationLifecycleModel {\n DEPENDENT = 'dependent',\n INDEPENDENT = 'independent',\n LINK_ONLY = 'link_only',\n}\n\n/** Execution timing for an explicitly configured parent-delete lifecycle. */\nexport enum ResourceRelationshipDocumentationDeleteMode {\n IMMEDIATE = 'immediate',\n LAZY = 'lazy',\n}\n\n/** Effect of an explicitly configured parent-delete lifecycle. */\nexport enum ResourceRelationshipDocumentationDeleteStrategy {\n DELETE = 'delete',\n IMPERSONALIZE_AND_RETAIN = 'impersonalize_and_retain',\n}\n\n/**\n * Consumer words for the relationship vocabularies.\n *\n * Beside the enums rather than in the documentation projection, so the values and the words that\n * explain them cannot drift apart, and a member added to an enum has one obvious place to gain a\n * meaning. Same reason the sign-in methods carry theirs next to `AuthMethod`.\n *\n * `NATURE` deliberately avoids the framework's own vocabulary: a customer reading \"composition\"\n * learns nothing, while \"part of it\" is the thing they can act on.\n */\nexport const RESOURCE_RELATIONSHIP_CARDINALITY_MEANINGS: Readonly<Record<ResourceRelationshipDocumentationCardinality, string>> = Object.freeze({\n [ResourceRelationshipDocumentationCardinality.ONE]: 'exactly one',\n [ResourceRelationshipDocumentationCardinality.ZERO_OR_ONE]: 'at most one',\n [ResourceRelationshipDocumentationCardinality.ONE_OR_MANY]: 'one or more',\n [ResourceRelationshipDocumentationCardinality.MANY]: 'any number of',\n});\n\nexport const RESOURCE_RELATIONSHIP_NATURE_MEANINGS: Readonly<Record<ResourceRelationshipDocumentationNature, string>> = Object.freeze({\n [ResourceRelationshipDocumentationNature.COMPOSITION]: 'Part of it',\n [ResourceRelationshipDocumentationNature.REFERENCE]: 'Points at it',\n [ResourceRelationshipDocumentationNature.ASSOCIATION]: 'Linked to it',\n});\n\n/**\n * One relationship fact from the perspective of a resource OpenAPI tag.\n *\n * `relatedResourceName` and the two cardinalities are deliberately symmetric:\n * resource configurations include both ordinary parent → child relationships\n * and FK-reference declarations, so this public contract must not guess an\n * ownership direction from declaration order. `lifecycleModel` and the\n * optional `onParentDelete` policy carry the framework's already-resolved\n * lifecycle truth without exposing registry implementation details.\n */\nexport const ResourceRelationshipDocumentationSchema = z.strictObject({\n relatedResourceName: z.string().min(1),\n /** Resolved FK identity when the relationship is represented by a field. */\n foreignKeyField: z.string().min(1).optional(),\n resourceCardinality: z.enum(ResourceRelationshipDocumentationCardinality),\n relatedResourceCardinality: z.enum(ResourceRelationshipDocumentationCardinality),\n nature: z.enum(ResourceRelationshipDocumentationNature),\n lifecycleModel: z.enum(ResourceRelationshipDocumentationLifecycleModel),\n onParentDelete: z.strictObject({\n enabled: z.boolean(),\n mode: z.enum(ResourceRelationshipDocumentationDeleteMode),\n strategy: z.enum(ResourceRelationshipDocumentationDeleteStrategy),\n maxDepth: z.number().int().min(0),\n }).optional(),\n});\nexport type ResourceRelationshipDocumentation = z.infer<typeof ResourceRelationshipDocumentationSchema>;\n\n/**\n * A source-declared grouping for resources in one consumer API reference.\n *\n * API resource categories are navigation meaning, not a renderer inference.\n * An application declares the category once in `wildo.tech-doc.config.ts`; the\n * companion attaches it to the corresponding resource tag and the generator\n * transports the fact through strict OpenAPI metadata. The identifier is\n * deliberately application-defined: different products can have genuinely\n * different business domains while still using the same renderer.\n */\nexport const ApiReferenceResourceCategorySchema = z.strictObject({\n /** Stable, readable public identity used in API-reference fragments. */\n id: z.string().regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/).max(100),\n /** Consumer-facing category label displayed by the renderer. */\n label: z.string().min(1).max(200),\n /** Optional category orientation supplied by the application, never React. */\n description: z.string().min(1).max(2000).optional(),\n});\nexport type ApiReferenceResourceCategory = z.infer<typeof ApiReferenceResourceCategorySchema>;\n\n/**\n * Optional per-resource OpenAPI tag descriptor (specification + registry enrichment).\n *\n * The generator groups operations under a tag named after the resource\n * identifier. Each emitted OpenAPI tag has a strict `x-wildo` resource identity;\n * this descriptor enriches it with its specification-owned purpose/lifecycle\n * prose and the compiled relationship facts from the resolved resource graph.\n */\nexport const ResourceTagSchema = z.strictObject({\n /** Must equal the `resourceIdentifier` the generator derives the tag from. */\n name: z.string().min(1),\n /** Business-purpose prose for the resource group. */\n description: z.string().min(1).max(2000).optional(),\n /** Specification-owned explanation of how this resource changes over time. */\n lifecycleRole: z.string().min(1).max(4000).optional(),\n /** Compiled relationship facts relevant to this resource. */\n relationships: z.array(ResourceRelationshipDocumentationSchema).optional(),\n /** Explicit application-owned API-reference navigation grouping. */\n category: ApiReferenceResourceCategorySchema.optional(),\n});\nexport type ResourceTag = z.infer<typeof ResourceTagSchema>;\n\n/**\n * One OpenAPI `servers[]` entry — a base URL the API is reachable at, plus an\n * optional human label. **App-enriched**: deployment URLs are an\n * application/environment concern (the framework cannot know an app's prod\n * domain), so they are authored on `WildoTechnicalDocConfig.apiServers` and\n * threaded into `OpenApiGenerationInput.servers`. The shared shape lives here\n * (the boundary-clean, zod-only module the generator consumes); the config\n * schema imports it so the two never drift.\n */\nexport const OpenApiServerSchema = z.strictObject({\n /**\n * Base URL — the bare ORIGIN the API is served from, e.g.\n * `http://localhost:4241` or `https://api.example.com`. Do NOT append the\n * `/api/v1` mount: the generated operation `paths` are already mount-prefixed\n * (`/api/v1/...`), and the effective request URL is `server.url` + path — so\n * including the mount here would DOUBLE it (`…/api/v1/api/v1/...`).\n */\n url: z.string().min(1),\n /** Optional human label shown in the docs server picker (e.g. \"Production\"). */\n description: z.string().min(1).max(200).optional(),\n});\nexport type OpenApiServer = z.infer<typeof OpenApiServerSchema>;\n\n/**\n * Top-level wire format consumed by the OpenAPI generator. Wrapped\n * in an object so the projector can attach metadata (app slug, build\n * timestamp, framework version) without a schema-shape break later.\n */\nexport const OpenApiGenerationInputSchema = z.strictObject({\n /**\n * App slug from `WildoSaasConfig.slug`. Surfaces in the generated\n * `openapi.info.title` so a\n * multi-app generation run can be disambiguated. Free-string\n * (no validation against `WildoSaasConfigSchema.slug` regex) because\n * the generator should not gate on the same constraint twice; the\n * `defineSaasConfig` parser already enforced the shape at author time.\n */\n appSlug: z.string().min(1),\n /**\n * App display name from `WildoSaasConfig.displayName` — used as the\n * default base title in the generated `openapi.info.title`. The\n * companion route concatenates it with the section name\n * (`\"Wonder Todos API reference\"`).\n */\n appDisplayName: z.string().min(1),\n /**\n * Optional public marketing title from `WildoSaasConfig.technicalDoc.publicMarketingTitle`.\n * When present, replaces `appDisplayName` in the generated title so\n * the OpenAPI docs match the docs site landing page.\n */\n publicMarketingTitle: z.string().min(1).max(200).optional(),\n /** Exact supported public API contract release surfaced in `openapi.info.version`. */\n supportedApiVersion: TechnicalDocumentationSupportedApiVersionSchema,\n /**\n * Flat list of all URL-bearing operation projections. The projector includes\n * every exposed operation and resolves its consumer section explicitly; the\n * generator validates, groups and renders without eligibility inference.\n */\n operations: z.array(OperationProjectionSchema),\n /**\n * JSON Schema for the canonical framework HTTP error envelope. The\n * subprocess converts the same `ErrorResponseSchema` the backend serializes;\n * the generator registers it once as `components.schemas.ErrorResponse` and\n * references it from every documented non-success response. Keeping this\n * here makes the OpenAPI document an exact projection of the runtime wire\n * contract rather than a renderer-owned approximation.\n */\n errorResponseSchema: z.unknown(),\n /**\n * Optional resource → tag-description descriptors. The generator emits each\n * one as an OpenAPI top-level `tags[].description` for the tags it derives\n * from a section's operations; resources without a descriptor still get a\n * bare `{ name }` tag. Order-independent (the generator looks up by `name`).\n */\n resourceTags: z.array(ResourceTagSchema).optional(),\n /**\n * Optional OpenAPI `servers[]` — the base URLs the API is reachable at.\n * App-enriched via `WildoTechnicalDocConfig.apiServers` (deployment URLs are\n * application/environment knowledge, not framework knowledge). When omitted\n * the generator emits no `servers` block (back-compatible with the\n * pre-servers output). Each entry is `{ url, description? }`.\n */\n servers: z.array(OpenApiServerSchema).optional(),\n /**\n * Optional app-authored markdown intro for the API reference landing page,\n * from `WildoTechnicalDocConfig.apiOverview`. The generator PREPENDS it to the\n * framework-universal \"## API conventions\" block (auth / pagination /\n * idempotency / errors — which it always emits) to form `info.description`.\n * App enrichment: the conventions are framework knowledge; the overview is the\n * app's own framing.\n */\n apiOverview: z.string().min(1).max(8000).optional(),\n});\nexport type OpenApiGenerationInput = z.infer<typeof OpenApiGenerationInputSchema>;\n"]}
@@ -40,11 +40,20 @@ import type { OpenApiOperationIdentity } from './operation-projection.schemas';
40
40
  * - `resourceCount`: distinct resources observed by the projector
41
41
  * (BEFORE the K-5 / K-6 filter — exposed-zero-ops resources are
42
42
  * already dropped by the projector).
43
- * - `consideredOperationCount`: operations the projector emitted into
44
- * the input payload (AFTER the variant filter, BEFORE the audience
45
- * splitter).
43
+ * - `consideredOperationCount`: REGISTRY operations the projector
44
+ * considered (AFTER the variant filter, BEFORE the audience splitter).
45
+ * Not a payload total, and deliberately not widened to become one: the
46
+ * manual controller-route catalog is not "considered" in this sense —
47
+ * every published route in it reaches the document unconditionally, with
48
+ * no variant filter to survive — so adding it here would fuse a
49
+ * survived-a-filter count with an always-published one and leave neither
50
+ * number readable. `projectedRowCount` is the payload total.
46
51
  * - `projectedRowCount`: total `OperationProjection` rows in the
47
- * payload (one per operation × initiator-info pair).
52
+ * payload (one per operation × initiator-info pair) — across BOTH
53
+ * producers, so it is the number of operations the published document
54
+ * actually contains.
55
+ * - `manualControllerRouteRowCount`: how many of those rows the manual
56
+ * controller-route catalog contributed.
48
57
  */
49
58
  export interface OpenApiGenerationProjectorStats {
50
59
  resourceCount: number;
@@ -55,12 +64,36 @@ export interface OpenApiGenerationProjectorStats {
55
64
  * Every entry must reach one `OperationProjection` and then exactly one
56
65
  * OpenAPI operation; the parent companion validates that first join and the
57
66
  * generator validates the second one.
67
+ *
68
+ * REGISTRY-DERIVED ONLY. Manually mounted controller routes are deliberately
69
+ * outside this inventory — see the placement comment in the projector — so
70
+ * this array is NOT the payload's row count, and the two were equal only for
71
+ * as long as the registry was the projector's single producer of operations.
72
+ * {@link manualControllerRouteRowCount} carries the other half.
58
73
  */
59
74
  resolvedExternalHttpOperations: Array<{
60
75
  identity: OpenApiOperationIdentity;
61
76
  section: OpenApiSection;
62
77
  roles: string[];
63
78
  }>;
79
+ /**
80
+ * Rows contributed by the manual controller-route catalog — the projector's
81
+ * SECOND producer of `OperationProjection`s, added after the registry family
82
+ * and never part of {@link resolvedExternalHttpOperations}.
83
+ *
84
+ * It exists so the parent-side conservation join stays TOTAL over the
85
+ * payload: `resolvedExternalHttpOperations.length + manualControllerRouteRowCount`
86
+ * must equal {@link projectedRowCount}, and every registry entry must still
87
+ * reach exactly one row. Without it the parent can only compare the registry
88
+ * inventory against a payload that has grown a second, legitimate source —
89
+ * which is exactly what refused every `wildo docs publish` when the manual
90
+ * family landed (351 registry rows against a 454-row payload).
91
+ *
92
+ * A future third producer adds its own count here rather than being folded
93
+ * into either of the existing two: a conservation identity is only as honest
94
+ * as the terms it names.
95
+ */
96
+ manualControllerRouteRowCount: number;
64
97
  skippedOperationWithoutInitiatorInfosCount: number;
65
98
  skippedOperationsWithoutInitiatorInfos: Array<{
66
99
  resourceIdentifier: string;
@@ -1 +1 @@
1
- {"version":3,"file":"publish-result.types.d.ts","sourceRoot":"","sources":["../../../../src/companion/publish-result.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,wBAAwB,EAAE,MAAM,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,8BAA8B,EAAE,KAAK,CAAC;QACpC,QAAQ,EAAE,wBAAwB,CAAC;QACnC,OAAO,EAAE,cAAc,CAAC;QACxB,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC,CAAC;IACH,0CAA0C,EAAE,MAAM,CAAC;IACnD,sCAAsC,EAAE,KAAK,CAAC;QAC5C,kBAAkB,EAAE,MAAM,CAAC;QAC3B,mBAAmB,EAAE,MAAM,CAAC;QAC5B,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC,CAAC;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvE,uBAAuB,CAAC,EAAE,KAAK,CAAC;QAC9B,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,sFAAsF;IACtF,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,uBAAuB,CAAC;IACnC,KAAK,EAAE,+BAA+B,CAAC;IACvC,QAAQ,EAAE,iCAAiC,CAAC;CAC7C"}
1
+ {"version":3,"file":"publish-result.types.d.ts","sourceRoot":"","sources":["../../../src/companion/publish-result.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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GAaG;AACH,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,uBAAuB,CAAC;IACnC,KAAK,EAAE,+BAA+B,CAAC;IACvC,QAAQ,EAAE,iCAAiC,CAAC;CAC7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"publish-result.types.js","sourceRoot":"","sources":["../../../../src/companion/publish-result.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG","sourcesContent":["/**\n * @wildo-package @wildo-ai/saas-technical-doc/companion (publish wire types)\n *\n * Public, companion-implemented diagnostic contract for\n * `POST /api/companion/technical-doc/generate-openapi`.\n *\n * Why these types live here (engine), not in each app's companion:\n *\n * The managed-publication route has a distinct pointer/fact result. It does\n * not reuse the diagnostic result and never writes an app-local YAML folder.\n *\n * - Kept as TypeScript `interface`s (not Zod schemas) on purpose:\n * a) the companion is the SOLE producer; the consumer is internal\n * tooling that already has a typed Result import path,\n * b) introducing a Zod schema would force every consumer to thread\n * a `safeParse` round-trip even though no untrusted input crosses\n * the boundary,\n * c) follows the same boundary policy as\n * `OperationProjectionSchema` neighbour file (Zod for SUBPROCESS\n * wire-IO; interfaces for COMPANION → CALLER outputs).\n * Promote to a Zod schema if a future consumer becomes untrusted\n * (e.g. the docs-site browser runtime calling these routes directly).\n *\n * @wildo-boundary\n * Imports ONLY the portable OpenAPI generation output. No React, no\n * decorator framework, no `saas-models` dependency.\n */\n\nimport { OpenApiSection, type OpenApiGenerationOutput } from '../openapi/index';\nimport type { OpenApiOperationIdentity } from './operation-projection.schemas';\n\n/**\n * Stats surfaced by the introspection-subprocess projector\n * (`'openapi-generation-input'` behavior — see\n * `examples/<app>/.wildo-saas/wildo-dev-companion/src/technical-doc/\n * services/technical-doc.companion.service.ts > callSubprocessProjector`).\n *\n * Companions return these unchanged on the `result.stats` field so the\n * caller can render a \"considered N operations across M resources\" ribbon\n * without re-parsing the YAML.\n *\n * - `resourceCount`: distinct resources observed by the projector\n * (BEFORE the K-5 / K-6 filter — exposed-zero-ops resources are\n * already dropped by the projector).\n * - `consideredOperationCount`: operations the projector emitted into\n * the input payload (AFTER the variant filter, BEFORE the audience\n * splitter).\n * - `projectedRowCount`: total `OperationProjection` rows in the\n * payload (one per operation × initiator-info pair).\n */\nexport interface OpenApiGenerationProjectorStats {\n resourceCount: number;\n consideredOperationCount: number;\n projectedRowCount: number;\n /**\n * Exact resolved HTTP-operation inventory captured before flat projection.\n * Every entry must reach one `OperationProjection` and then exactly one\n * OpenAPI operation; the parent companion validates that first join and the\n * generator validates the second one.\n */\n resolvedExternalHttpOperations: Array<{\n identity: OpenApiOperationIdentity;\n section: OpenApiSection;\n roles: string[];\n }>;\n skippedOperationWithoutInitiatorInfosCount: number;\n skippedOperationsWithoutInitiatorInfos: Array<{\n resourceIdentifier: string;\n operationIdentifier: string;\n variantType: string;\n variantKey?: string;\n isOperationDefault?: boolean;\n isBulkOperation?: boolean;\n }>;\n skippedCoreResources?: Array<{ resourceType: string; reason: string }>;\n collapsedCoreOperations?: Array<{\n resourceType: string;\n operationKey: string;\n httpVerb: string;\n path: string;\n }>;\n /** Core resources omitted because resolved application feature gates exclude them. */\n excludedCoreResources?: string[];\n}\n\n/**\n * Echoed input metadata so the caller can confirm what was generated\n * without re-reading the SaaS config. Every field originates from\n * `WildoSaasConfig` or the per-service `wildo.tech-doc.config.ts`.\n *\n * - `appSlug` + `appDisplayName`: ALWAYS present (sourced from\n * `WildoSaasConfig.slug` / `.displayName`, both required).\n * - `publicMarketingTitle`: optional; sourced from the per-service\n * `wildo.tech-doc.config.ts > publicMarketingTitle` (Step 7.5\n * refactor — was previously on `WildoSaasConfig.technicalDoc`).\n * - `supportedApiVersion`: required; sourced from the per-service\n * `wildo.tech-doc.config.ts` and bound into both OpenAPI output and the\n * aggregate immutable render manifest.\n */\nexport interface TechnicalDocOpenApiResultMetadata {\n appSlug: string;\n appDisplayName: string;\n publicMarketingTitle?: string;\n supportedApiVersion: string;\n}\n\n/**\n * Result of the generate route — the in-memory pipeline output without\n * any disk-side effects. Returned verbatim by the companion service's\n * `generateOpenApiDocuments()` method and by\n * `POST /api/companion/technical-doc/generate-openapi`.\n *\n * Composes:\n * - `documents`: the rendered YAML payloads, one per emitted section.\n * - `stats`: projector-side diagnostic counts (see\n * {@link OpenApiGenerationProjectorStats}).\n * - `metadata`: echoed input metadata (see\n * {@link TechnicalDocOpenApiResultMetadata}).\n */\nexport interface TechnicalDocGenerateOpenApiResult {\n documents: OpenApiGenerationOutput;\n stats: OpenApiGenerationProjectorStats;\n metadata: TechnicalDocOpenApiResultMetadata;\n}\n"]}
1
+ {"version":3,"file":"publish-result.types.js","sourceRoot":"","sources":["../../../src/companion/publish-result.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG","sourcesContent":["/**\n * @wildo-package @wildo-ai/saas-technical-doc/companion (publish wire types)\n *\n * Public, companion-implemented diagnostic contract for\n * `POST /api/companion/technical-doc/generate-openapi`.\n *\n * Why these types live here (engine), not in each app's companion:\n *\n * The managed-publication route has a distinct pointer/fact result. It does\n * not reuse the diagnostic result and never writes an app-local YAML folder.\n *\n * - Kept as TypeScript `interface`s (not Zod schemas) on purpose:\n * a) the companion is the SOLE producer; the consumer is internal\n * tooling that already has a typed Result import path,\n * b) introducing a Zod schema would force every consumer to thread\n * a `safeParse` round-trip even though no untrusted input crosses\n * the boundary,\n * c) follows the same boundary policy as\n * `OperationProjectionSchema` neighbour file (Zod for SUBPROCESS\n * wire-IO; interfaces for COMPANION → CALLER outputs).\n * Promote to a Zod schema if a future consumer becomes untrusted\n * (e.g. the docs-site browser runtime calling these routes directly).\n *\n * @wildo-boundary\n * Imports ONLY the portable OpenAPI generation output. No React, no\n * decorator framework, no `saas-models` dependency.\n */\n\nimport { OpenApiSection, type OpenApiGenerationOutput } from '../openapi/index';\nimport type { OpenApiOperationIdentity } from './operation-projection.schemas';\n\n/**\n * Stats surfaced by the introspection-subprocess projector\n * (`'openapi-generation-input'` behavior — see\n * `examples/<app>/.wildo-saas/wildo-dev-companion/src/technical-doc/\n * services/technical-doc.companion.service.ts > callSubprocessProjector`).\n *\n * Companions return these unchanged on the `result.stats` field so the\n * caller can render a \"considered N operations across M resources\" ribbon\n * without re-parsing the YAML.\n *\n * - `resourceCount`: distinct resources observed by the projector\n * (BEFORE the K-5 / K-6 filter — exposed-zero-ops resources are\n * already dropped by the projector).\n * - `consideredOperationCount`: REGISTRY operations the projector\n * considered (AFTER the variant filter, BEFORE the audience splitter).\n * Not a payload total, and deliberately not widened to become one: the\n * manual controller-route catalog is not \"considered\" in this sense —\n * every published route in it reaches the document unconditionally, with\n * no variant filter to survive — so adding it here would fuse a\n * survived-a-filter count with an always-published one and leave neither\n * number readable. `projectedRowCount` is the payload total.\n * - `projectedRowCount`: total `OperationProjection` rows in the\n * payload (one per operation × initiator-info pair) — across BOTH\n * producers, so it is the number of operations the published document\n * actually contains.\n * - `manualControllerRouteRowCount`: how many of those rows the manual\n * controller-route catalog contributed.\n */\nexport interface OpenApiGenerationProjectorStats {\n resourceCount: number;\n consideredOperationCount: number;\n projectedRowCount: number;\n /**\n * Exact resolved HTTP-operation inventory captured before flat projection.\n * Every entry must reach one `OperationProjection` and then exactly one\n * OpenAPI operation; the parent companion validates that first join and the\n * generator validates the second one.\n *\n * REGISTRY-DERIVED ONLY. Manually mounted controller routes are deliberately\n * outside this inventory — see the placement comment in the projector — so\n * this array is NOT the payload's row count, and the two were equal only for\n * as long as the registry was the projector's single producer of operations.\n * {@link manualControllerRouteRowCount} carries the other half.\n */\n resolvedExternalHttpOperations: Array<{\n identity: OpenApiOperationIdentity;\n section: OpenApiSection;\n roles: string[];\n }>;\n /**\n * Rows contributed by the manual controller-route catalog — the projector's\n * SECOND producer of `OperationProjection`s, added after the registry family\n * and never part of {@link resolvedExternalHttpOperations}.\n *\n * It exists so the parent-side conservation join stays TOTAL over the\n * payload: `resolvedExternalHttpOperations.length + manualControllerRouteRowCount`\n * must equal {@link projectedRowCount}, and every registry entry must still\n * reach exactly one row. Without it the parent can only compare the registry\n * inventory against a payload that has grown a second, legitimate source —\n * which is exactly what refused every `wildo docs publish` when the manual\n * family landed (351 registry rows against a 454-row payload).\n *\n * A future third producer adds its own count here rather than being folded\n * into either of the existing two: a conservation identity is only as honest\n * as the terms it names.\n */\n manualControllerRouteRowCount: number;\n skippedOperationWithoutInitiatorInfosCount: number;\n skippedOperationsWithoutInitiatorInfos: Array<{\n resourceIdentifier: string;\n operationIdentifier: string;\n variantType: string;\n variantKey?: string;\n isOperationDefault?: boolean;\n isBulkOperation?: boolean;\n }>;\n skippedCoreResources?: Array<{ resourceType: string; reason: string }>;\n collapsedCoreOperations?: Array<{\n resourceType: string;\n operationKey: string;\n httpVerb: string;\n path: string;\n }>;\n /** Core resources omitted because resolved application feature gates exclude them. */\n excludedCoreResources?: string[];\n}\n\n/**\n * Echoed input metadata so the caller can confirm what was generated\n * without re-reading the SaaS config. Every field originates from\n * `WildoSaasConfig` or the per-service `wildo.tech-doc.config.ts`.\n *\n * - `appSlug` + `appDisplayName`: ALWAYS present (sourced from\n * `WildoSaasConfig.slug` / `.displayName`, both required).\n * - `publicMarketingTitle`: optional; sourced from the per-service\n * `wildo.tech-doc.config.ts > publicMarketingTitle` (Step 7.5\n * refactor — was previously on `WildoSaasConfig.technicalDoc`).\n * - `supportedApiVersion`: required; sourced from the per-service\n * `wildo.tech-doc.config.ts` and bound into both OpenAPI output and the\n * aggregate immutable render manifest.\n */\nexport interface TechnicalDocOpenApiResultMetadata {\n appSlug: string;\n appDisplayName: string;\n publicMarketingTitle?: string;\n supportedApiVersion: string;\n}\n\n/**\n * Result of the generate route — the in-memory pipeline output without\n * any disk-side effects. Returned verbatim by the companion service's\n * `generateOpenApiDocuments()` method and by\n * `POST /api/companion/technical-doc/generate-openapi`.\n *\n * Composes:\n * - `documents`: the rendered YAML payloads, one per emitted section.\n * - `stats`: projector-side diagnostic counts (see\n * {@link OpenApiGenerationProjectorStats}).\n * - `metadata`: echoed input metadata (see\n * {@link TechnicalDocOpenApiResultMetadata}).\n */\nexport interface TechnicalDocGenerateOpenApiResult {\n documents: OpenApiGenerationOutput;\n stats: OpenApiGenerationProjectorStats;\n metadata: TechnicalDocOpenApiResultMetadata;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"technical-documentation-authorized-bundle-reader.d.ts","sourceRoot":"","sources":["../../../../../src/companion/rendering/technical-documentation-authorized-bundle-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,gDAAgD,EACrD,KAAK,mDAAmD,EACzD,MAAM,uDAAuD,CAAC;AAkB/D,MAAM,WAAW,yCAAyC;IACxD,QAAQ,CAAC,gBAAgB,EAAE,gDAAgD,CAAC;IAC5E,QAAQ,CAAC,mBAAmB,EAAE,mDAAmD,CAAC;IAClF,QAAQ,CAAC,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAC5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,+CAA+C,CAAC,KAAK,EAAE;IACrE,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAC5D,GAAG,yCAAyC,CA+B5C"}
1
+ {"version":3,"file":"technical-documentation-authorized-bundle-reader.d.ts","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-authorized-bundle-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,gDAAgD,EACrD,KAAK,mDAAmD,EACzD,MAAM,uDAAuD,CAAC;AAkB/D,MAAM,WAAW,yCAAyC;IACxD,QAAQ,CAAC,gBAAgB,EAAE,gDAAgD,CAAC;IAC5E,QAAQ,CAAC,mBAAmB,EAAE,mDAAmD,CAAC;IAClF,QAAQ,CAAC,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAC5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,+CAA+C,CAAC,KAAK,EAAE;IACrE,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAC5D,GAAG,yCAAyC,CA+B5C"}
@@ -4,6 +4,12 @@ export declare function renderTechnicalDocumentationDocusaurus(input: {
4
4
  readonly model: TechnicalDocumentationRenderModel;
5
5
  readonly resolvedAssetBundle: TechnicalDocumentationResolvedAssetBundleManifestV1;
6
6
  readonly assetBytesByPath: ReadonlyMap<string, Uint8Array>;
7
- readonly resolveApiReferenceTarget?: (target: TechnicalDocumentationApiReferenceTargetV1) => string;
7
+ /**
8
+ * Resolves a guide's API-reference target to a public href, or returns `null` when this
9
+ * application does not publish it — a link to a feature-gated resource. `null` degrades the link
10
+ * to plain text rather than failing the render (#472). Reporting the degradation belongs to
11
+ * whoever supplies this function; the renderer only renders.
12
+ */
13
+ readonly resolveApiReferenceTarget?: (target: TechnicalDocumentationApiReferenceTargetV1) => string | null;
8
14
  }): TechnicalDocumentationRendererResult;
9
15
  //# sourceMappingURL=technical-documentation-docusaurus-renderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"technical-documentation-docusaurus-renderer.d.ts","sourceRoot":"","sources":["../../../../../src/companion/rendering/technical-documentation-docusaurus-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,mDAAmD,EACxD,KAAK,0CAA0C,EAEhD,MAAM,uDAAuD,CAAC;AAO/D,OAAO,EAEL,KAAK,iCAAiC,EACtC,KAAK,oCAAoC,EAE1C,MAAM,wCAAwC,CAAC;AA8XhD,wBAAgB,sCAAsC,CAAC,KAAK,EAAE;IAC5D,QAAQ,CAAC,KAAK,EAAE,iCAAiC,CAAC;IAClD,QAAQ,CAAC,mBAAmB,EAAE,mDAAmD,CAAC;IAClF,QAAQ,CAAC,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC3D,QAAQ,CAAC,yBAAyB,CAAC,EAAE,CAAC,MAAM,EAAE,0CAA0C,KAAK,MAAM,CAAC;CACrG,GAAG,oCAAoC,CAgEvC"}
1
+ {"version":3,"file":"technical-documentation-docusaurus-renderer.d.ts","sourceRoot":"","sources":["../../../../src/companion/rendering/technical-documentation-docusaurus-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,mDAAmD,EACxD,KAAK,0CAA0C,EAEhD,MAAM,uDAAuD,CAAC;AAO/D,OAAO,EAEL,KAAK,iCAAiC,EACtC,KAAK,oCAAoC,EAE1C,MAAM,wCAAwC,CAAC;AA8YhD,wBAAgB,sCAAsC,CAAC,KAAK,EAAE;IAC5D,QAAQ,CAAC,KAAK,EAAE,iCAAiC,CAAC;IAClD,QAAQ,CAAC,mBAAmB,EAAE,mDAAmD,CAAC;IAClF,QAAQ,CAAC,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC3D;;;;;OAKG;IACH,QAAQ,CAAC,yBAAyB,CAAC,EAAE,CAAC,MAAM,EAAE,0CAA0C,KAAK,MAAM,GAAG,IAAI,CAAC;CAC5G,GAAG,oCAAoC,CAgEvC"}
@@ -30,7 +30,18 @@ const DOCUSAURUS_RENDERER_REF = 'technical-documentation:renderer/docusaurus';
30
30
  */
31
31
  const DOCUSAURUS_CATEGORY_LABEL_BY_DIRECTORY = {
32
32
  'access-and-identity': 'Access and identity',
33
- 'billing-and-subscriptions': 'Billing and subscriptions',
33
+ /*
34
+ * The per-resource pages nest under the page that lists them, which makes this a category the
35
+ * moment an application publishes a resource of its own. It has a LANDING document at the
36
+ * category's canonical root path — the overview — so a reader selects it for orientation and
37
+ * expands it for one resource.
38
+ *
39
+ * The label is generic where the pages beneath it are not, and deliberately: an application's
40
+ * own name for this part of its product is a fact only the application has, and it already
41
+ * states it inside the page. Putting a projected value here would make the sidebar the one
42
+ * surface whose words come from somewhere the renderer cannot see.
43
+ */
44
+ 'what-this-application-manages': 'What this application manages',
34
45
  integrations: 'Integrations',
35
46
  'security-and-audit': 'Security and audit',
36
47
  'user-administration': 'User administration',
@@ -46,23 +57,10 @@ const DOCUSAURUS_CATEGORY_LABEL_BY_DIRECTORY = {
46
57
  * remain direct children for work that spans several journeys.
47
58
  */
48
59
  const DOCUSAURUS_CATEGORY_JOURNEY_BY_DIRECTORY = {
49
- 'billing-and-subscriptions': [
50
- {
51
- landingPath: 'billing-and-subscriptions/plans-and-access',
52
- childPaths: ['billing-and-subscriptions/start-subscription'],
53
- },
54
- 'billing-and-subscriptions/change-or-end-subscription',
55
- {
56
- landingPath: 'billing-and-subscriptions/billing-records',
57
- childPaths: [
58
- 'billing-and-subscriptions/invoices-and-payments',
59
- 'billing-and-subscriptions/metered-usage',
60
- ],
61
- },
62
- 'billing-and-subscriptions/reconcile-access',
63
- 'billing-and-subscriptions/troubleshoot',
64
- ],
65
60
  'security-and-audit': [
61
+ // First in the section on purpose: somebody reaching this during an incident has no time to
62
+ // browse, and every other page here is a capability rather than a response.
63
+ 'security-and-audit/respond-to-leaked-credential',
66
64
  'security-and-audit/investigate-event',
67
65
  'security-and-audit/review-access-changes',
68
66
  'security-and-audit/export-audit-records',
@@ -289,7 +287,25 @@ function renderUnit(unit, model, assetPathByRef, resolveApiReferenceTarget) {
289
287
  if (link.kind === TechnicalDocumentationLinkKind.API_REFERENCE) {
290
288
  if (resolveApiReferenceTarget === undefined)
291
289
  throw new Error(`technical-documentation API-reference link was not resolved before Docusaurus rendering: ${link.linkRef}`);
292
- return [`- [${label}](${resolveApiReferenceTarget(link.apiReferenceTarget)})`];
290
+ /*
291
+ * A `null` resolution means the target is not published by THIS application — a guide links to
292
+ * a resource the application has feature-gated off. It degrades to plain text; the rest of the
293
+ * portal publishes (#472, decided 2026-09-08).
294
+ *
295
+ * This used to throw, from inside `renderUnit`, which runs BEFORE the generated tree is
296
+ * synchronized — so one missing target wrote NOTHING AT ALL. Not a broken link: no portal.
297
+ * With 43 hardcoded engine `apiReferenceTargets` naming resources an application may switch
298
+ * off, any application not enabling all 43 could not publish documentation.
299
+ *
300
+ * The `undefined` guard above is a DIFFERENT failure and still throws: it means the caller
301
+ * wired no resolver, so nothing was even asked. Degrading there would hide a wiring mistake.
302
+ *
303
+ * Reporting the degradation is the CALLER's job — see the resolver the companion supplies. A
304
+ * portal that quietly drops links would be worse than one that failed loudly, which is why
305
+ * this half is not the whole fix.
306
+ */
307
+ const href = resolveApiReferenceTarget(link.apiReferenceTarget);
308
+ return href === null ? [`- ${label}`] : [`- [${label}](${href})`];
293
309
  }
294
310
  return [];
295
311
  });