@wildo-ai/saas-models 1.1.5 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1295) hide show
  1. package/dist/esm/__tests__/setup.d.ts.map +1 -1
  2. package/dist/esm/__tests__/setup.js.map +1 -1
  3. package/dist/esm/_inspect.d.ts.map +1 -1
  4. package/dist/esm/_inspect.js.map +1 -1
  5. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -1
  7. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/application-subject.shared.schemas.js.map +1 -1
  9. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  10. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +2 -1
  11. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  12. package/dist/esm/applications/applications-context.schemas.d.ts +176 -2
  13. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  14. package/dist/esm/applications/applications-context.schemas.js.map +1 -1
  15. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  16. package/dist/esm/applications/applications.shared.resources-config.schemas.js +3 -2
  17. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  18. package/dist/esm/applications/applications.shared.schemas.d.ts +7 -5
  19. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  20. package/dist/esm/applications/applications.shared.schemas.js +6 -4
  21. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  22. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +10 -1
  23. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  24. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +49 -15
  25. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  26. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  27. package/dist/esm/billing/billing-account.shared.schemas.js +2 -2
  28. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
  29. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +25 -0
  30. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  31. package/dist/esm/billing/billing-configuration.shared.schemas.js +19 -0
  32. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  33. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +27 -5
  34. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  35. package/dist/esm/billing/billing-enums.shared.schemas.js +30 -4
  36. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  37. package/dist/esm/billing/billing-types.shared.schemas.d.ts +37 -11
  38. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  39. package/dist/esm/billing/billing-types.shared.schemas.js +31 -19
  40. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  41. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts +2 -0
  42. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  43. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js +18 -7
  44. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
  45. package/dist/esm/billing/credit-pool.shared.schemas.d.ts +2 -0
  46. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  47. package/dist/esm/billing/credit-pool.shared.schemas.js +7 -1
  48. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
  49. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  50. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js +6 -6
  51. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
  52. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  53. package/dist/esm/billing/invoice-ref.shared.schemas.js +1 -1
  54. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
  55. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  56. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  57. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  58. package/dist/esm/billing/price.shared.schemas.js +5 -3
  59. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  60. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts +11 -1
  61. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  62. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +39 -23
  63. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  64. package/dist/esm/billing/product-definition.shared.schemas.d.ts +30 -2
  65. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  66. package/dist/esm/billing/product-definition.shared.schemas.js +35 -0
  67. package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
  68. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +6 -3
  69. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  70. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  71. package/dist/esm/billing/product.shared.schemas.d.ts +7 -3
  72. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  73. package/dist/esm/billing/product.shared.schemas.js +22 -7
  74. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  75. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  76. package/dist/esm/billing/promotions.shared.resources-config.schemas.js +8 -8
  77. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  78. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  79. package/dist/esm/billing/promotions.shared.schemas.js.map +1 -1
  80. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts +135 -0
  81. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -0
  82. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js +112 -0
  83. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -0
  84. package/dist/esm/billing/public-pricing-catalog.shared.d.ts +30 -0
  85. package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -0
  86. package/dist/esm/billing/public-pricing-catalog.shared.js +53 -0
  87. package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -0
  88. package/dist/esm/billing/referral-reward.shared.schemas.d.ts +51 -0
  89. package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -0
  90. package/dist/esm/billing/referral-reward.shared.schemas.js +92 -0
  91. package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -0
  92. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts +54 -33
  93. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  94. package/dist/esm/billing/referral.shared.resources-config.schemas.js +56 -2
  95. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  96. package/dist/esm/billing/referral.shared.schemas.d.ts +22 -37
  97. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  98. package/dist/esm/billing/referral.shared.schemas.js +24 -44
  99. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  100. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +9 -1
  101. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  102. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +55 -22
  103. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  104. package/dist/esm/billing/subscription.shared.schemas.d.ts +80 -5
  105. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/billing/subscription.shared.schemas.js +85 -25
  107. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  108. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -1
  109. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -1
  110. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  111. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -1
  112. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  113. package/dist/esm/billing/usage-record.shared.schemas.js +5 -5
  114. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  115. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  116. package/dist/esm/charts/aggregation-query.shared.schemas.js.map +1 -1
  117. package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -1
  118. package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -1
  119. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  120. package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -1
  121. package/dist/esm/companion/artifact-placement.shared.definitions.d.ts.map +1 -1
  122. package/dist/esm/companion/artifact-placement.shared.definitions.js.map +1 -1
  123. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +143 -2
  124. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  125. package/dist/esm/companion/provider-discovery.shared.schemas.js +84 -1
  126. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  127. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  128. package/dist/esm/companion/shared-library-companion.shared.definitions.js.map +1 -1
  129. package/dist/esm/companion-exports.d.ts.map +1 -1
  130. package/dist/esm/companion-exports.js.map +1 -1
  131. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +14 -1
  132. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  133. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +4 -0
  134. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  135. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts +70 -0
  136. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
  137. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js +87 -0
  138. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
  139. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts +34 -0
  140. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
  141. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js +137 -3
  142. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -1
  143. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts +7 -0
  144. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  145. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -1
  146. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +28 -2
  147. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  148. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js +29 -8
  149. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
  150. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +29 -6
  151. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  152. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +38 -9
  153. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  154. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +1822 -146
  155. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  156. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +1777 -87
  157. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  158. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts +10 -0
  159. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  160. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +148 -7
  161. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  162. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts.map +1 -1
  163. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js.map +1 -1
  164. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -1
  165. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -1
  166. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  167. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  168. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -1
  169. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -1
  170. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -1
  171. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -1
  172. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +2 -0
  173. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  174. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js +2 -0
  175. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  176. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -1
  177. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -1
  178. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  179. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  180. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -1
  181. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -1
  182. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -1
  183. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -1
  184. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts +17 -8
  185. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
  186. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +43 -20
  187. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
  188. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  189. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
  190. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts +38 -0
  191. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  192. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js +39 -0
  193. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
  194. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts +35 -0
  195. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -0
  196. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js +82 -0
  197. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -0
  198. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts +37 -0
  199. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -0
  200. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js +223 -0
  201. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -0
  202. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts +222 -0
  203. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -0
  204. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js +331 -0
  205. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -0
  206. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  207. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  208. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +37 -3
  209. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  210. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +33 -4
  211. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  212. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  213. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.js.map +1 -1
  214. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  215. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js.map +1 -1
  216. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  217. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  218. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts +52 -0
  219. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -0
  220. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js +116 -0
  221. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -0
  222. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts +11 -0
  223. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -0
  224. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js +11 -0
  225. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -0
  226. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  227. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  228. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts +93 -0
  229. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -0
  230. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js +149 -0
  231. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -0
  232. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts +43 -0
  233. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -0
  234. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js +106 -0
  235. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -0
  236. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts +209 -0
  237. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -0
  238. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js +226 -0
  239. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -0
  240. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts +129 -5
  241. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  242. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js +128 -4
  243. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -1
  244. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts +53 -0
  245. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -0
  246. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js +74 -0
  247. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -0
  248. package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -1
  249. package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -1
  250. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts +311 -0
  251. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -0
  252. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js +355 -0
  253. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -0
  254. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -1
  255. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -1
  256. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +178 -39
  257. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  258. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +145 -35
  259. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  260. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  261. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js +26 -0
  262. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -1
  263. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts +9 -0
  264. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  265. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  266. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -1
  268. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -1
  269. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -1
  270. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  271. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  272. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +109 -1
  273. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  274. package/dist/esm/config/app-configuration-shared.shared.schemas.js +57 -0
  275. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  276. package/dist/esm/config/app-frontend-type.shared.schemas.d.ts.map +1 -1
  277. package/dist/esm/config/app-frontend-type.shared.schemas.js.map +1 -1
  278. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  279. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  280. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  281. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  282. package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -1
  283. package/dist/esm/config/configuration-validation.shared.schemas.js.map +1 -1
  284. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +69 -0
  285. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  286. package/dist/esm/config/entity-identity-config.shared.schemas.js +93 -0
  287. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  288. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +16 -16
  289. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  290. package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
  291. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  292. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  293. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +160 -61
  294. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  295. package/dist/esm/config/frontend/navigation.shared.schemas.js +297 -65
  296. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  297. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  298. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  299. package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
  300. package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
  301. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  302. package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -1
  303. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  304. package/dist/esm/config-authoring.entry.js.map +1 -1
  305. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  306. package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
  307. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  308. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -1
  309. package/dist/esm/errors/caught-error-description.shared.utils.d.ts +69 -0
  310. package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -0
  311. package/dist/esm/errors/caught-error-description.shared.utils.js +77 -0
  312. package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -0
  313. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +76 -3
  314. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  315. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +76 -2
  316. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  317. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  318. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  319. package/dist/esm/errors/errors.shared.schemas.d.ts +20 -1
  320. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  321. package/dist/esm/errors/errors.shared.schemas.js +16 -9
  322. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  323. package/dist/esm/errors/errors.shared.utils.d.ts +0 -24
  324. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  325. package/dist/esm/errors/errors.shared.utils.js +0 -39
  326. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  327. package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -1
  328. package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -1
  329. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts +6 -7
  330. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
  331. package/dist/esm/errors/thrown-value-description.shared.utils.js +6 -7
  332. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
  333. package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -1
  334. package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -1
  335. package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -1
  336. package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -1
  337. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts +70 -0
  338. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -0
  339. package/dist/esm/external-data/external-data-pipeline-description.shared.js +92 -0
  340. package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -0
  341. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts +154 -0
  342. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -0
  343. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js +161 -0
  344. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -0
  345. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +1071 -23
  346. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  347. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js +1065 -17
  348. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  349. package/dist/esm/external-data/external-data-provenance.shared.d.ts +71 -0
  350. package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -0
  351. package/dist/esm/external-data/external-data-provenance.shared.js +88 -0
  352. package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -0
  353. package/dist/esm/external-data.exports.d.ts +5 -0
  354. package/dist/esm/external-data.exports.d.ts.map +1 -1
  355. package/dist/esm/external-data.exports.js +11 -0
  356. package/dist/esm/external-data.exports.js.map +1 -1
  357. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  358. package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -1
  359. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +17 -2
  360. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  361. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +22 -4
  362. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  363. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  364. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +3 -0
  365. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  366. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -1
  367. package/dist/esm/external-providers/engine-capability-surface.shared.js +2 -0
  368. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
  369. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  370. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  371. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +152 -1
  372. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  373. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.map +1 -1
  374. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +4 -3
  375. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  376. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +4 -3
  377. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  378. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +45 -0
  379. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  380. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +14 -0
  381. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  382. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +188 -4
  383. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  384. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +76 -9
  385. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  386. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -33
  387. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  388. package/dist/esm/external-providers/frontend-provider-public-config.shared.js +247 -42
  389. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  390. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts +53 -0
  391. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -0
  392. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js +41 -0
  393. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -0
  394. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts +150 -0
  395. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -0
  396. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js +22 -0
  397. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -0
  398. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts +42 -0
  399. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -0
  400. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js +49 -0
  401. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -0
  402. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -1
  403. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -1
  404. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts +53 -0
  405. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
  406. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js +56 -0
  407. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
  408. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +34 -0
  409. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  410. package/dist/esm/external-providers/provider-capability.shared.schemas.js +34 -0
  411. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  412. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +341 -4
  413. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  414. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +270 -20
  415. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  416. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +6 -2
  417. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  418. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +6 -2
  419. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  420. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +174 -1
  421. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  422. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +125 -0
  423. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  424. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +3 -3
  425. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  426. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  427. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts +42 -0
  428. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -0
  429. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js +57 -0
  430. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -0
  431. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +6 -0
  432. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  433. package/dist/esm/external-providers/provider-protocol.shared.schemas.js +6 -0
  434. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  435. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts +58 -0
  436. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -0
  437. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js +35 -0
  438. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -0
  439. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts +115 -0
  440. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -0
  441. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js +137 -0
  442. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -0
  443. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  444. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  445. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts +73 -0
  446. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -0
  447. package/dist/esm/external-providers/provider-usage-cost.shared.js +171 -0
  448. package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -0
  449. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts +12 -0
  450. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -0
  451. package/dist/esm/external-providers/provider-usage-pricing.example.js +40 -0
  452. package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -0
  453. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts +68 -32
  454. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  455. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js +63 -52
  456. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
  457. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts +5 -5
  458. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  459. package/dist/esm/features/application-features.shared.resources-config.schemas.js +13 -5
  460. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  461. package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
  462. package/dist/esm/features/connected-feature.example.js +2 -1
  463. package/dist/esm/features/connected-feature.example.js.map +1 -1
  464. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  465. package/dist/esm/features/core-feature-definitions.shared.js +2 -1
  466. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  467. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  468. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  469. package/dist/esm/features/feature-definition.shared.schemas.d.ts +2 -11
  470. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  471. package/dist/esm/features/feature-definition.shared.schemas.js +0 -12
  472. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
  473. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  474. package/dist/esm/features/feature-registry.shared.js.map +1 -1
  475. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  476. package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
  477. package/dist/esm/features/scope-features.shared.schemas.d.ts +31 -17
  478. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  479. package/dist/esm/features/scope-features.shared.schemas.js +27 -5
  480. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  481. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +5 -5
  482. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  483. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  484. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  485. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  486. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  487. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  488. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  489. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  490. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  491. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  492. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  493. package/dist/esm/files/files.shared.utils.js.map +1 -1
  494. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  495. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -1
  496. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  497. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -1
  498. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  499. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -1
  500. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  501. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.map +1 -1
  502. package/dist/esm/flows-actors/actors.shared.schemas.d.ts +127 -11
  503. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  504. package/dist/esm/flows-actors/actors.shared.schemas.js +32 -1
  505. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  506. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +16 -0
  507. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  508. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js +7 -0
  509. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
  510. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts +68 -0
  511. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -0
  512. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js +276 -0
  513. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -0
  514. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts +468 -0
  515. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -0
  516. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js +472 -0
  517. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -0
  518. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +2 -2
  519. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  520. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  521. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts +118 -0
  522. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -0
  523. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js +144 -0
  524. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -0
  525. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  526. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  527. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -1
  528. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -1
  529. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  530. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -1
  531. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +142 -8
  532. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  533. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +209 -11
  534. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  535. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  536. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -1
  537. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  538. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -1
  539. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +37 -2
  540. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  541. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +30 -2
  542. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  543. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts +0 -11
  544. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  545. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js +12 -5
  546. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  547. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts +45 -6
  548. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  549. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js +31 -5
  550. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  551. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  552. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +30 -30
  553. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  554. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  555. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.js.map +1 -1
  556. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +15 -7
  557. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  558. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  559. package/dist/esm/flows-actors/flows.shared.schemas.d.ts +15 -0
  560. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  561. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  562. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts +506 -0
  563. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
  564. package/dist/esm/flows-actors/human-decision.shared.schemas.js +502 -0
  565. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
  566. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  567. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  568. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts +46 -0
  569. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -0
  570. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js +65 -0
  571. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -0
  572. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts +120 -0
  573. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -0
  574. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js +165 -0
  575. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -0
  576. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts +45 -0
  577. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -0
  578. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js +127 -0
  579. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -0
  580. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts +83 -0
  581. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -0
  582. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js +97 -0
  583. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -0
  584. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts +136 -0
  585. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -0
  586. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js +90 -0
  587. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -0
  588. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  589. package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
  590. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts +5 -1
  591. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
  592. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js +19 -4
  593. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
  594. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts +13 -15
  595. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
  596. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js +30 -17
  597. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
  598. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts +268 -0
  599. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -0
  600. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js +576 -0
  601. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -0
  602. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +30 -0
  603. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  604. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  605. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts +129 -0
  606. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -0
  607. package/dist/esm/flows-actors/work-attribution.shared.schemas.js +141 -0
  608. package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -0
  609. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts +22 -1
  610. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
  611. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js +23 -0
  612. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
  613. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +61 -0
  614. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  615. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +61 -0
  616. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  617. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  618. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  619. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  620. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
  621. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  622. package/dist/esm/guidance/guidance-state.shared.schemas.js +11 -10
  623. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  624. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  625. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  626. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  627. package/dist/esm/guidance/lifecycle-config.shared.schemas.js.map +1 -1
  628. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  629. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
  630. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  631. package/dist/esm/guidance/lifecycle-state.shared.schemas.js +6 -6
  632. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  633. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  634. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  635. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  636. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  637. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -1
  638. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -1
  639. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  640. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
  641. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  642. package/dist/esm/guidance/progression-state.shared.schemas.js +8 -7
  643. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  644. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  645. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js +1 -1
  646. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  647. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +550 -30
  648. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  649. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +498 -34
  650. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  651. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts +62 -0
  652. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -0
  653. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js +66 -0
  654. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -0
  655. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts +133 -0
  656. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -0
  657. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js +191 -0
  658. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -0
  659. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +37 -6
  660. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
  661. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js +37 -6
  662. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
  663. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -1
  664. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -1
  665. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts +36 -0
  666. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -0
  667. package/dist/esm/i18n/application-config-vocabulary.shared.js +39 -0
  668. package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -0
  669. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts +11 -0
  670. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -0
  671. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js +14 -0
  672. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -0
  673. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts +20 -0
  674. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -0
  675. package/dist/esm/i18n/engine-open-vocabulary.shared.js +21 -0
  676. package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -0
  677. package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -1
  678. package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -1
  679. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  680. package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
  681. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts +94 -0
  682. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -0
  683. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js +206 -0
  684. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -0
  685. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts +169 -0
  686. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -0
  687. package/dist/esm/inbound/conversation-threads.shared.schemas.js +231 -0
  688. package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -0
  689. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts +195 -0
  690. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -0
  691. package/dist/esm/inbound/inbound-channels.shared.schemas.js +244 -0
  692. package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -0
  693. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts +36 -0
  694. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -0
  695. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js +169 -0
  696. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -0
  697. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts +404 -0
  698. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -0
  699. package/dist/esm/inbound/inbound-delivery.shared.schemas.js +449 -0
  700. package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -0
  701. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts +46 -0
  702. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -0
  703. package/dist/esm/inbound/inbound-endpoint-env.shared.js +57 -0
  704. package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -0
  705. package/dist/esm/index.d.ts +58 -1
  706. package/dist/esm/index.d.ts.map +1 -1
  707. package/dist/esm/index.js +67 -1
  708. package/dist/esm/index.js.map +1 -1
  709. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
  710. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -1
  711. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
  712. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -1
  713. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -1
  714. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -1
  715. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  716. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  717. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +28 -0
  718. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  719. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js +29 -0
  720. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  721. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +95 -1
  722. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
  723. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +121 -0
  724. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
  725. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
  726. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -1
  727. package/dist/esm/meta-workflows.exports.d.ts +0 -1
  728. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  729. package/dist/esm/meta-workflows.exports.js +0 -1
  730. package/dist/esm/meta-workflows.exports.js.map +1 -1
  731. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  732. package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
  733. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  734. package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
  735. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -1
  736. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -1
  737. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +7 -1
  738. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  739. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js +35 -0
  740. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  741. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  742. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  743. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts +131 -0
  744. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -0
  745. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js +258 -0
  746. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -0
  747. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts +448 -0
  748. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -0
  749. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js +530 -0
  750. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -0
  751. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  752. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js.map +1 -1
  753. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  754. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js +4 -3
  755. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  756. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  757. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  758. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +16 -1
  759. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  760. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +46 -16
  761. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  762. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +19 -12
  763. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  764. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +77 -12
  765. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  766. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  767. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  768. package/dist/esm/notifications/notification-badges.schemas.d.ts +35 -3
  769. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  770. package/dist/esm/notifications/notification-badges.schemas.js +43 -3
  771. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  772. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  773. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  774. package/dist/esm/notifications/notifications.shared.schemas.d.ts +66 -399
  775. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  776. package/dist/esm/notifications/notifications.shared.schemas.js +111 -58
  777. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  778. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -1
  779. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -1
  780. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +5 -5
  781. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  782. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +6 -6
  783. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  784. package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
  785. package/dist/esm/organizations/organization-features.shared.schemas.js.map +1 -1
  786. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +3 -0
  787. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  788. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +60 -14
  789. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  790. package/dist/esm/organizations/organization-members.shared.schemas.d.ts +3 -0
  791. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  792. package/dist/esm/organizations/organization-members.shared.schemas.js +30 -0
  793. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  794. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  795. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js.map +1 -1
  796. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  797. package/dist/esm/organizations/organization-notifications.shared.schemas.js +9 -9
  798. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  799. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  800. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js.map +1 -1
  801. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  802. package/dist/esm/organizations/organization-preferences.shared.schemas.js +4 -4
  803. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  804. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts +0 -1
  805. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  806. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js.map +1 -1
  807. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +5 -5
  808. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  809. package/dist/esm/organizations/organization-profile.shared.schemas.js +15 -10
  810. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  811. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  812. package/dist/esm/organizations/organization-unit-inheritance.shared.js.map +1 -1
  813. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  814. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js +1 -1
  815. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
  816. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  817. package/dist/esm/organizations/organization-unit-members.shared.schemas.js +2 -1
  818. package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
  819. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts +63 -1
  820. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  821. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js +106 -5
  822. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
  823. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  824. package/dist/esm/organizations/organization-unit-narrowing.example.js.map +1 -1
  825. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  826. package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -0
  827. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  828. package/dist/esm/organizations/organization-units.shared.path.d.ts.map +1 -1
  829. package/dist/esm/organizations/organization-units.shared.path.js.map +1 -1
  830. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  831. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +7 -2
  832. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  833. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  834. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  835. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +3 -1
  836. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  837. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +12 -8
  838. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  839. package/dist/esm/organizations/organizations.shared.schemas.d.ts +7 -2
  840. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  841. package/dist/esm/organizations/organizations.shared.schemas.js +51 -1
  842. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  843. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts +58 -0
  844. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -0
  845. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js +188 -0
  846. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -0
  847. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts +122 -0
  848. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -0
  849. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js +136 -0
  850. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -0
  851. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts +36 -0
  852. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -0
  853. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js +155 -0
  854. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -0
  855. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts +229 -0
  856. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -0
  857. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js +290 -0
  858. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -0
  859. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts +48 -0
  860. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -0
  861. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js +50 -0
  862. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -0
  863. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts +97 -0
  864. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -0
  865. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js +572 -0
  866. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -0
  867. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts +590 -0
  868. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -0
  869. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js +869 -0
  870. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -0
  871. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +36 -6
  872. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  873. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +57 -16
  874. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  875. package/dist/esm/provider-registration-runtime.exports.d.ts +0 -1
  876. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  877. package/dist/esm/provider-registration-runtime.exports.js +0 -1
  878. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  879. package/dist/esm/public-runtime/index.d.ts +30 -11
  880. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  881. package/dist/esm/public-runtime/index.js +30 -11
  882. package/dist/esm/public-runtime/index.js.map +1 -1
  883. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  884. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  885. package/dist/esm/queue/jobs.shared.schemas.d.ts +30 -2
  886. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  887. package/dist/esm/queue/jobs.shared.schemas.js +12 -0
  888. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  889. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  890. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  891. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  892. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  893. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  894. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  895. package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
  896. package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
  897. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -1
  898. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -1
  899. package/dist/esm/requests/header-keys.shared.d.ts +6 -0
  900. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  901. package/dist/esm/requests/header-keys.shared.js +7 -0
  902. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  903. package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
  904. package/dist/esm/requests/http-requests.shared.js.map +1 -1
  905. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -1
  906. package/dist/esm/requests/idempotency-key.shared.js.map +1 -1
  907. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  908. package/dist/esm/requests/manual-controllers-routes-documentation.js +147 -8
  909. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  910. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +51 -23
  911. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  912. package/dist/esm/requests/manual-controllers-routes-urls.js +64 -0
  913. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  914. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  915. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  916. package/dist/esm/requests/websocket.shared.schemas.d.ts +78 -13
  917. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  918. package/dist/esm/requests/websocket.shared.schemas.js +91 -18
  919. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  920. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  921. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  922. package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -1
  923. package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -1
  924. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  925. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  926. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts +21 -0
  927. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -0
  928. package/dist/esm/resources/embedded-resource-mark.shared.utils.js +22 -0
  929. package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -0
  930. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  931. package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -1
  932. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  933. package/dist/esm/resources/resources-config.shared.factory.js +812 -32
  934. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  935. package/dist/esm/resources/resources-config.shared.schemas.d.ts +244 -48
  936. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  937. package/dist/esm/resources/resources-config.shared.schemas.js +151 -17
  938. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  939. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  940. package/dist/esm/resources/resources-registry.shared.core.definitions.js +369 -12
  941. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  942. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  943. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  944. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  945. package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -1
  946. package/dist/esm/resources/resources.shared.core.definitions.d.ts +45 -0
  947. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  948. package/dist/esm/resources/resources.shared.core.definitions.js +92 -0
  949. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  950. package/dist/esm/resources/resources.shared.schemas.d.ts +2 -17
  951. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  952. package/dist/esm/resources/resources.shared.schemas.js +24 -20
  953. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  954. package/dist/esm/resources/resources.shared.utils.d.ts +16 -8
  955. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  956. package/dist/esm/resources/resources.shared.utils.js +16 -8
  957. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  958. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts +2 -2
  959. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  960. package/dist/esm/resources/utils/collection-export.shared.utils.js +4 -2
  961. package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
  962. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  963. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  964. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  965. package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -1
  966. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  967. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -1
  968. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -1
  969. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -1
  970. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  971. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.map +1 -1
  972. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  973. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  974. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts +103 -0
  975. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -0
  976. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js +275 -0
  977. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -0
  978. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -1
  979. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -1
  980. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts +51 -0
  981. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -0
  982. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js +28 -0
  983. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -0
  984. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  985. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js.map +1 -1
  986. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
  987. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js +30 -19
  988. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
  989. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  990. package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
  991. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts +2 -0
  992. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -0
  993. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js +33 -0
  994. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -0
  995. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  996. package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -1
  997. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  998. package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
  999. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts +15 -0
  1000. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  1001. package/dist/esm/resources/utils/resource-polymorphism.factory.js +6 -1
  1002. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
  1003. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  1004. package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
  1005. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  1006. package/dist/esm/resources/utils/resource-polymorphism.schemas.js +30 -4
  1007. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
  1008. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  1009. package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
  1010. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  1011. package/dist/esm/resources/utils/resource-subtree.utils.js.map +1 -1
  1012. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  1013. package/dist/esm/resources/utils/resources-config-context-needs.utils.js.map +1 -1
  1014. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  1015. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  1016. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +46 -0
  1017. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  1018. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +205 -22
  1019. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  1020. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  1021. package/dist/esm/resources/utils/resources-config-operations.path.utils.js.map +1 -1
  1022. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  1023. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  1024. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  1025. package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
  1026. package/dist/esm/resources/utils/resources-serialization.utils.d.ts +19 -2
  1027. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  1028. package/dist/esm/resources/utils/resources-serialization.utils.js +4 -0
  1029. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
  1030. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  1031. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  1032. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  1033. package/dist/esm/resources/utils/schema-family-builder.utils.js.map +1 -1
  1034. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  1035. package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
  1036. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  1037. package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
  1038. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  1039. package/dist/esm/resources/utils/schema-variant-resolver.utils.js.map +1 -1
  1040. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  1041. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +15 -9
  1042. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  1043. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  1044. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  1045. package/dist/esm/resources/work-unit.shared.schemas.d.ts +20 -0
  1046. package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -0
  1047. package/dist/esm/resources/work-unit.shared.schemas.js +19 -0
  1048. package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -0
  1049. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  1050. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  1051. package/dist/esm/runtime/execution-context.shared.schemas.d.ts +48 -1
  1052. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  1053. package/dist/esm/runtime/execution-context.shared.schemas.js +101 -9
  1054. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
  1055. package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
  1056. package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -1
  1057. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
  1058. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  1059. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +37 -20
  1060. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  1061. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
  1062. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  1063. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +61 -48
  1064. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  1065. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts +26 -0
  1066. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  1067. package/dist/esm/security/api-keys/api-keys.shared.schemas.js +39 -5
  1068. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
  1069. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  1070. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +1 -1
  1071. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +5 -3
  1072. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  1073. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +6 -0
  1074. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  1075. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  1076. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  1077. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  1078. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  1079. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  1080. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  1081. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  1082. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  1083. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -1
  1084. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -1
  1085. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -1
  1086. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -1
  1087. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  1088. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -1
  1089. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  1090. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  1091. package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts.map +1 -1
  1092. package/dist/esm/security/authentications/same-origin-redirect-path.shared.js.map +1 -1
  1093. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  1094. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +2 -2
  1095. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  1096. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts +11 -0
  1097. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  1098. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js +19 -8
  1099. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  1100. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +1 -1
  1101. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  1102. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +5 -5
  1103. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  1104. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  1105. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js +11 -11
  1106. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  1107. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts +2 -0
  1108. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  1109. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js +9 -0
  1110. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
  1111. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts +169 -0
  1112. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -0
  1113. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js +162 -0
  1114. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -0
  1115. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  1116. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js +10 -8
  1117. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  1118. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  1119. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js.map +1 -1
  1120. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -1
  1121. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -1
  1122. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -1
  1123. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -1
  1124. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  1125. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  1126. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  1127. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  1128. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  1129. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +8 -8
  1130. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  1131. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  1132. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +17 -16
  1133. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  1134. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  1135. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +28 -25
  1136. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  1137. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts +17 -6
  1138. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  1139. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js +90 -38
  1140. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  1141. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +0 -24
  1142. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  1143. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +79 -68
  1144. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  1145. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +8 -1
  1146. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  1147. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +7 -0
  1148. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  1149. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  1150. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +1 -1
  1151. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  1152. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  1153. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  1154. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  1155. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +7 -7
  1156. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  1157. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  1158. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  1159. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  1160. package/dist/esm/security/authorizations/roles.shared.defaults.js +56 -0
  1161. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  1162. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +77 -1
  1163. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  1164. package/dist/esm/security/authorizations/roles.shared.schemas.js +90 -0
  1165. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  1166. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  1167. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  1168. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts +86 -0
  1169. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -0
  1170. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js +40 -0
  1171. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -0
  1172. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +2 -1
  1173. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  1174. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +2 -1
  1175. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  1176. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +2 -1
  1177. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  1178. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +2 -1
  1179. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  1180. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +46 -14
  1181. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  1182. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +81 -21
  1183. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  1184. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts +69 -0
  1185. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -0
  1186. package/dist/esm/security/credential-rotation-grace.shared.utils.js +77 -0
  1187. package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -0
  1188. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
  1189. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -1
  1190. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  1191. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +28 -8
  1192. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  1193. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +3 -1
  1194. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  1195. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +89 -14
  1196. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  1197. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +1 -0
  1198. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  1199. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +25 -4
  1200. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  1201. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  1202. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -1
  1203. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  1204. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  1205. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  1206. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -1
  1207. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts +7 -1
  1208. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
  1209. package/dist/esm/security/outbound-target-control.shared.schemas.js +6 -0
  1210. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
  1211. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts +143 -0
  1212. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -0
  1213. package/dist/esm/security/submission-challenge/submission-challenge.shared.js +123 -0
  1214. package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -0
  1215. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts +384 -0
  1216. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -0
  1217. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js +327 -0
  1218. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -0
  1219. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -1
  1220. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -1
  1221. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts +121 -8
  1222. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
  1223. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js +83 -4
  1224. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
  1225. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -1
  1226. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -1
  1227. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts +266 -8
  1228. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
  1229. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js +291 -7
  1230. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
  1231. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts +313 -3
  1232. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
  1233. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js +369 -3
  1234. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
  1235. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
  1236. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js +2 -1
  1237. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
  1238. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -1
  1239. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -1
  1240. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  1241. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  1242. package/dist/esm/testing.d.ts.map +1 -1
  1243. package/dist/esm/testing.js.map +1 -1
  1244. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  1245. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  1246. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +5 -3
  1247. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  1248. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js +19 -10
  1249. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  1250. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  1251. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  1252. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  1253. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +6 -0
  1254. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  1255. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  1256. package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
  1257. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -1
  1258. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -1
  1259. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  1260. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
  1261. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  1262. package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
  1263. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  1264. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
  1265. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  1266. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  1267. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  1268. package/dist/esm/users/user-preferences-reset.shared.utils.js +2 -2
  1269. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  1270. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +0 -3
  1271. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  1272. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  1273. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  1274. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  1275. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +0 -3
  1276. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  1277. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  1278. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  1279. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
  1280. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  1281. package/dist/esm/users/user-self.shared.resources-config.schemas.js +1 -1
  1282. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  1283. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  1284. package/dist/esm/users/users.shared.resources-config.schemas.js +82 -20
  1285. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  1286. package/dist/esm/users/users.shared.schemas.d.ts +12 -9
  1287. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  1288. package/dist/esm/users/users.shared.schemas.js +49 -18
  1289. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  1290. package/dist/tsconfig.build.tsbuildinfo +1 -1
  1291. package/package.json +4 -4
  1292. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +0 -8
  1293. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +0 -1
  1294. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js +0 -7
  1295. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.shared.schemas.js","sourceRoot":"","sources":["../../../../src/billing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F,CAAC,CAAC;AAGH,sEAAsE;AAEtE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG,yBAAyB,CAAC;IAClF,gBAAgB,EAAE,eAAe;IACjC,mBAAmB,EAAE,gBAAgB;IACrC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,6BAA6B;IACzC,qEAAqE;IACrE,uEAAuE;IACvE,QAAQ,EAAE,sBAAsB,CAAC,GAAG,CAAC,gCAAgC,CAAC;CACvE,CAAC,CAAC","sourcesContent":["/**\n * Subscription & Subscription Item Schemas (Shared) — Polymorphic\n *\n * Subscriptions are scope-expanded alongside BillingAccounts. Each subscription\n * variant gets the scope identity FK injected (organizationId / userId)\n * and keeps `billingAccountId` as the FK to its parent billing account variant.\n *\n * The polymorphic expansion produces 2 concrete resources:\n * - organizationSubscriptions (with organizationId + organizationBillingAccountId)\n * - userSubscriptions (with userId + userBillingAccountId)\n *\n *\n * @see polymorphic-scope-approach-A-expansion.md\n * @see billing-and-features-system.md §6.3 (Subscription & Subscription Items)\n */\n\nimport { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\nimport { declarePolymorphicSchemas, optOutPolymorphicAutoBusinessKey } from '../resources/utils/resource-polymorphism.schemas';\nimport { BILLING_SCOPE_VARIANTS, BILLING_SCOPE_FK_VARIANTS } from './billing-account.shared.schemas';\nimport { SubscriptionStatus } from './billing-enums.shared.schemas';\n\n// ── Subscription Item ──────────────────────────────────────────────\n\n/**\n * A line item within a subscription (one product/price pair).\n */\nexport const SubscriptionItemSchema = z.object({\n _id: z.string().min(1).isPrimaryKey(),\n /** Reference to the product */\n productId: z.string().min(1).isForeignKey().isSummaryField({ populate: true }),\n /** Reference to the specific price */\n priceId: z.string().min(1).isForeignKey().isSummaryField({ populate: true }),\n /** Quantity (e.g., number of seats) */\n quantity: z.number().min(1).default(1).isSummaryField(),\n /** Provider sync */\n providerSubscriptionItemId: z.string().optional().isBackendOnly(),\n});\nexport type SubscriptionItem = z.infer<typeof SubscriptionItemSchema>;\n\n// ── Subscription Base Schema ───────────────────────────────────────\n\n/**\n * Subscription base schema — NO identity scope fields.\n * The polymorphic declaration injects the parent scope FK automatically per variant.\n * `billingAccountId` is kept as the FK to the parent billing account variant.\n */\nexport const BillingSubscriptionBaseSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n /** References the parent billing account (polymorphic FK — renamed per variant) */\n billingAccountId: z.string().min(1).isForeignKey({ polymorphicVariants: BILLING_SCOPE_FK_VARIANTS }).isDBIndexed().isSummaryField(),\n\n // `.isAuditEvidence()` — subscription status is the ENTITLEMENT gate: the feature resolver\n // derives a scope's capabilities from it, so a transition to/from ACTIVE silently widens or\n // narrows what the tenant may do. Recording the before/after states makes an entitlement\n // dispute answerable from the trail instead of from the payment provider's own records.\n // Marked on the STATUS only — the provider identifiers on this schema are `.isBackendOnly()`\n // and the money/customer fields are not authorization evidence, so neither is marked.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE — a subscription status transition widens or\n // narrows tenant capability, so the before/after states are entitlement evidence.\n status: z.enum(SubscriptionStatus).isDBIndexed().isSummaryField().systemEnum('SubscriptionStatus').isAuditEvidence(),\n\n /** Subscription items (what products/prices are included) */\n // FINANCIAL — see the note on `billing-account.shared.schemas.ts`. What the account holder pays\n // for, at what quantity; the lifecycle `status` beside it is a state machine, not a datum.\n // No `.dataCategories()`: this is an amount/term about the ACCOUNT, not a description of a person.\n // The person is the scope foreign key, which the never-scrub floor preserves in every mode, and the\n // value must survive erasure for the tax/audit obligation this family exists to serve — so it can be\n // neither scrubbed nor honestly declared as personal data the row holds. See `retentionPolicy` on the\n // resource config (#138).\n items: z.array(SubscriptionItemSchema).min(1),\n\n /** Period */\n currentPeriodStart: z.date().isDBIndexed().isNotEditable(),\n currentPeriodEnd: z.date().isDBIndexed().isSummaryField().isNotEditable(),\n\n /** Trial */\n trialStart: z.date().optional().isNotEditable(),\n trialEnd: z.date().optional().isSummaryField().isNotEditable(),\n\n /** Cancellation */\n cancelAtPeriodEnd: z.boolean().default(false).isSummaryField(),\n cancelledAt: z.date().optional().isNotEditable(),\n cancellationReason: z.string().optional(),\n\n /** Active discount from a coupon/promotion applied to this subscription (populated from provider) */\n discount: z.object({\n providerCouponId: z.string().optional(),\n percentOff: z.number().optional(),\n amountOff: z.number().optional(),\n currency: z.string().optional(),\n duration: z.string().optional(),\n durationInMonths: z.number().optional(),\n end: z.date().optional(),\n }).optional().isNotEditable(),\n\n /** Provider sync (payment methods are managed entirely by provider) */\n providerSubscriptionId: z.string().optional().isBackendOnly(),\n\n /**\n * Open key-value bag for operational tagging (cost-centre, campaign ref, internal correlation id).\n *\n * ⚠️ **AUTHORING RULE — never store personal data here.** This row is RETAINED when its subject is\n * erased: the billing-retention decision keeps the financial record for tax/audit obligations, and\n * subject erasure scrubs the linked USER rather than these rows, because a billing row holds no\n * personal data of its own — the person is a foreign key. An open bag is the one place that\n * assumption can be broken by an app author, and nothing would catch it: the erasure scrub is\n * field-directed (`.impersonalizeWith()`), and it cannot reach inside an arbitrary record whose\n * keys it does not know.\n *\n * Concretely: no names, emails, phone numbers, addresses, free-text notes about a person, or\n * anything else that identifies one. Personal data written here SURVIVES an erasure — a compliance\n * breach that the retained label makes look intentional.\n *\n * Enforcement is deliberately NOT built (Q3, 2026-07-31): scrubbing these rows would require\n * hide/freeze to become separable from scrub — a real capability change with no current consumer.\n * Revisit only if an app is found using the bag this way.\n */\n metadata: z.record(z.string(), z.string()).optional(),\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\nexport type BillingSubscriptionBase = z.infer<typeof BillingSubscriptionBaseSchema>;\n\n// ── Polymorphic Declaration ────────────────────────────────────────\n\n/**\n * Polymorphic declaration for Subscriptions.\n * Produces 2 variants:\n * - organizations → organizationSubscriptions (organizationId injected)\n * - users → userSubscriptions (userId injected)\n *\n *\n * Each variant gets `billingAccountId` renamed to the scoped FK\n * (e.g., `organizationBillingAccountId`) via polymorphic FK transformation.\n */\nexport const billingSubscriptionsPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'subscriptions',\n baseFieldIdentifier: 'subscriptionId',\n baseEnumKey: 'SUBSCRIPTIONS',\n baseSchema: BillingSubscriptionBaseSchema,\n // Many subscriptions per scope (LIST/CREATE/UPDATE) — opt out of the\n // polymorphism engine's singleton-per-scope business-key auto-default.\n variants: BILLING_SCOPE_VARIANTS.map(optOutPolymorphicAutoBusinessKey),\n});\n\n"]}
1
+ {"version":3,"file":"subscription.shared.schemas.js","sourceRoot":"","sources":["../../../src/billing/subscription.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AAC/H,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEvF,sEAAsE;AAEtE;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE;IACrC,+BAA+B;IAC/B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,oEAAoE,CAAC;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AAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uJAAuJ,CAAC;IACvN,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACrF,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACtF,CAAC,CAAC;AAGH,sEAAsE;AAEtE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG,yBAAyB,CAAC;IAClF,gBAAgB,EAAE,eAAe;IACjC,mBAAmB,EAAE,gBAAgB;IACrC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,6BAA6B;IACzC,qEAAqE;IACrE,uEAAuE;IACvE,QAAQ,EAAE,sBAAsB,CAAC,GAAG,CAAC,gCAAgC,CAAC;CACvE,CAAC,CAAC","sourcesContent":["/**\n * Subscription & Subscription Item Schemas (Shared) — Polymorphic\n *\n * Subscriptions are scope-expanded alongside BillingAccounts. Each subscription\n * variant gets the scope identity FK injected (organizationId / userId)\n * and keeps `billingAccountId` as the FK to its parent billing account variant.\n *\n * The polymorphic expansion produces 2 concrete resources:\n * - organizationSubscriptions (with organizationId + organizationBillingAccountId)\n * - userSubscriptions (with userId + userBillingAccountId)\n *\n *\n * @see polymorphic-scope-approach-A-expansion.md\n * @see billing-and-features-system.md §6.3 (Subscription & Subscription Items)\n */\n\nimport { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\nimport { declarePolymorphicSchemas, optOutPolymorphicAutoBusinessKey } from '../resources/utils/resource-polymorphism.schemas';\nimport { BILLING_SCOPE_VARIANTS, BILLING_SCOPE_FK_VARIANTS } from './billing-account.shared.schemas';\nimport { PromotionDuration, SubscriptionStatus } from './billing-enums.shared.schemas';\n\n// ── Subscription Item ──────────────────────────────────────────────\n\n/**\n * A line item within a subscription (one product/price pair).\n */\nexport const SubscriptionItemSchema = z.object({\n _id: z.string().min(1).isPrimaryKey(),\n /** Reference to the product */\n productId: z.string().min(1).isForeignKey().isSummaryField({ populate: true }).describe(\"The id of the product this line bills for: the plan, or an add-on.\"),\n /** Reference to the specific price */\n priceId: z.string().min(1).isForeignKey().isSummaryField({ populate: true }).describe(\"The id of the price this line is billed at. It belongs to the line's product.\"),\n /** Quantity (e.g., number of seats) */\n quantity: z.number().min(1).default(1).isSummaryField().describe(\"How many units of the price are billed, such as seats. Defaults to 1.\"),\n /** Provider sync */\n providerSubscriptionItemId: z.string().optional().isBackendOnly(),\n});\nexport type SubscriptionItem = z.infer<typeof SubscriptionItemSchema>;\n\n/**\n * One line of the items a pending plan change will give the subscription (#1868). Unlike a {@link SubscriptionItemSchema}\n * line it carries the provider price: at renewal the provider's lines are matched to these by price and quantity, and a\n * changed line has no provider item id until the provider creates it.\n */\nexport const PendingPlanChangeItemSchema = z.object({\n _id: z.string().min(1).describe(\"The line's id: the current line's id when the line carries over, a new id when the change adds it.\"),\n productId: z.string().min(1).describe(\"The id of the product this line will bill for.\"),\n priceId: z.string().min(1).describe(\"The id of the price this line will be billed at.\"),\n quantity: z.number().min(1).describe(\"How many units of the price will be billed.\"),\n providerPriceId: z.string().min(1).isBackendOnly(),\n});\nexport type PendingPlanChangeItem = z.infer<typeof PendingPlanChangeItemSchema>;\n\n/**\n * A plan change confirmed to take effect at the end of the current period (#1868): the plan the subscription moves to,\n * when, and the lines it will then carry. Present from the confirmation until renewal applies it — then the subscription's\n * `items` become these lines and this is cleared — or until the change is cancelled.\n */\nexport const PendingPlanChangeSchema = z.object({\n productId: z.string().min(1).describe(\"The id of the plan the subscription moves to.\"),\n priceId: z.string().min(1).describe(\"The id of the price the subscription moves to.\"),\n effectiveAt: z.date().describe(\"When the change takes effect: the end of the billing period in which it was confirmed.\"),\n items: z.array(PendingPlanChangeItemSchema).min(1).describe(\"The lines the subscription will carry once the change takes effect: the new plan and the add-ons that carry over.\"),\n providerScheduleId: z.string().optional().isBackendOnly(),\n});\nexport type PendingPlanChange = z.infer<typeof PendingPlanChangeSchema>;\n\n/**\n * How long before a pending plan change's `effectiveAt` it stops being withdrawable (#1868).\n *\n * The provider moves the subscription onto the new lines at renewal, and releasing its schedule after that keeps them: a withdrawal then\n * would clear the pending change while the provider bills the new plan. The provider refuses a release once the next phase has begun,\n * but reading the phase and releasing are two calls. Refusing a few minutes early covers that window and any clock skew between the\n * engine and the provider, and it covers the time between renewal and the local realization, when the change is still recorded as\n * pending but has already happened. One value: the operation refuses by it, and a frontend withholds the action by it.\n */\nexport const PLAN_CHANGE_WITHDRAWAL_CUTOFF_MS = 5 * 60 * 1000;\n\n/**\n * Whether a pending plan change's renewal is still far enough off for it to be withdrawn at `now`. Time only: the backend also refuses a\n * change recorded with no schedule, which a client cannot see (`providerScheduleId` is backend-only).\n */\nexport function isPendingPlanChangeWithdrawable(pending: { effectiveAt: Date | string }, now: Date = new Date()): boolean {\n return now.getTime() < new Date(pending.effectiveAt).getTime() - PLAN_CHANGE_WITHDRAWAL_CUTOFF_MS;\n}\n\n// ── Subscription Base Schema ───────────────────────────────────────\n\n/**\n * Subscription base schema — NO identity scope fields.\n * The polymorphic declaration injects the parent scope FK automatically per variant.\n * `billingAccountId` is kept as the FK to the parent billing account variant.\n */\nexport const BillingSubscriptionBaseSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n /** References the parent billing account (polymorphic FK — renamed per variant) */\n billingAccountId: z.string().min(1).isForeignKey({ polymorphicVariants: BILLING_SCOPE_FK_VARIANTS }).isDBIndexed().isSummaryField().describe(\"The id of the billing account this subscription belongs to.\"),\n\n // `.isAuditEvidence()` — subscription status is the ENTITLEMENT gate: the feature resolver\n // derives a scope's capabilities from it, so a transition to/from ACTIVE silently widens or\n // narrows what the tenant may do. Recording the before/after states makes an entitlement\n // dispute answerable from the trail instead of from the payment provider's own records.\n // Marked on the STATUS only — the provider identifiers on this schema are `.isBackendOnly()`\n // and the money/customer fields are not authorization evidence, so neither is marked.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE — a subscription status transition widens or\n // narrows tenant capability, so the before/after states are entitlement evidence.\n status: z.enum(SubscriptionStatus).isDBIndexed().isSummaryField().systemEnum('SubscriptionStatus').isAuditEvidence(),\n\n /** Subscription items (what products/prices are included) */\n // FINANCIAL — see the note on `billing-account.shared.schemas.ts`. What the account holder pays\n // for, at what quantity; the lifecycle `status` beside it is a state machine, not a datum.\n // No `.dataCategories()`: this is an amount/term about the ACCOUNT, not a description of a person.\n // The person is the scope foreign key, which the never-scrub floor preserves in every mode, and the\n // value must survive erasure for the tax/audit obligation this family exists to serve — so it can be\n // neither scrubbed nor honestly declared as personal data the row holds. See `retentionPolicy` on the\n // resource config (#138).\n items: z.array(SubscriptionItemSchema).min(1).describe(\"What the subscription bills for: one line for the plan and one for each add-on.\"),\n\n /** Period */\n currentPeriodStart: z.date().isDBIndexed().isNotEditable().describe(\"When the current billing period started, as the billing provider reports it.\"),\n currentPeriodEnd: z.date().isDBIndexed().isSummaryField().isNotEditable().describe(\"When the current billing period ends, as the billing provider reports it. The subscription renews then, or ends if `cancelAtPeriodEnd` is set.\"),\n\n /**\n * Trial — copied from the billing provider (#1798). Nothing wrote either before, so every subscription\n * reported no trial whatever the provider held. Both are kept after the trial is over: they describe\n * the subscription's trial, and `status` says whether it is trialing now.\n */\n trialStart: z.date().optional().isNotEditable().describe(\"When the subscription's trial began, as the billing provider reports it. Absent when the subscription never had a trial.\"),\n trialEnd: z.date().optional().isSummaryField().isNotEditable().describe(\"When the subscription's trial ends, or ended, as the billing provider reports it. Kept after the trial is over; `status` says whether the subscription is trialing now.\"),\n\n /** Cancellation */\n cancelAtPeriodEnd: z.boolean().default(false).isSummaryField().describe(\"Whether the subscription is set to end when the current billing period ends. Set by a cancellation at period end, cleared by resuming, and kept in step with the billing provider.\"),\n cancelledAt: z.date().optional().isNotEditable().describe(\"When the subscription was cancelled through the cancel operation, whether it ended immediately or at period end. Cleared when a scheduled cancellation is resumed.\"),\n cancellationReason: z.string().optional().describe(\"The reason given when the subscription was cancelled, if one was given. Cleared when a scheduled cancellation is resumed.\"),\n\n /**\n * The discounts the billing provider applies to this subscription, in the order it applies them (#1798, #1948).\n * Copied from the provider by every provider event and the reconciliation sweep; absent when none applies, including\n * after the last one ends.\n *\n * A LIST, because a subscription can carry several at once: a referral reward is added BESIDE a promotion code the\n * checkout applied (#1802), and the provider charges both. This was one `discount`, which showed the first and hid the\n * rest, so a customer was told about one discount and billed for two. Order is kept because it is the order the\n * provider applies them in, and a percentage taken after a fixed amount is a different price from the reverse.\n */\n discounts: z.array(z.object({\n providerCouponId: z.string().optional().describe(\"The billing provider's id for the coupon behind the discount.\"),\n percentOff: z.number().optional().describe(\"The percentage taken off, for a percentage discount.\"),\n amountOff: z.number().optional().describe(\"The amount taken off each invoice, in minor units of `currency`, for a fixed-amount discount.\"),\n currency: z.string().optional().describe(\"The ISO 4217 currency of `amountOff`, upper-case.\"),\n duration: z.enum(PromotionDuration).optional().describe(\"How long the discount applies: `once` (the first invoice), `repeating` (for `durationInMonths`) or `forever`.\"),\n durationInMonths: z.number().optional().describe(\"For a `repeating` discount, how many months it applies.\"),\n end: z.date().optional().describe(\"When the discount stops applying, if it ends.\"),\n })).optional().isNotEditable().describe(\"The discounts the billing provider applies to this subscription, in the order it applies them. Absent when none applies, including after the last one ends.\"),\n\n /**\n * A plan change that takes effect at the end of the current period (#1868): written by a CHANGE_PLAN confirmation whose\n * plan's policy says `at_period_end`, cleared when renewal applies it (the provider projection then writes `items`) or when\n * CANCEL_PLAN_CHANGE withdraws it. While it is present the subscription's other changes are refused until it is withdrawn.\n */\n pendingPlanChange: PendingPlanChangeSchema.optional().isNotEditable().describe(\"A plan change confirmed to take effect at the end of the current period, with the plan, the date and the lines it will then carry. Absent when no change is pending.\"),\n\n /** Provider sync (payment methods are managed entirely by provider) */\n providerSubscriptionId: z.string().optional().isBackendOnly(),\n\n /**\n * Open key-value bag for operational tagging (cost-centre, campaign ref, internal correlation id).\n *\n * ⚠️ **AUTHORING RULE — never store personal data here.** This row is RETAINED when its subject is\n * erased: the billing-retention decision keeps the financial record for tax/audit obligations, and\n * subject erasure scrubs the linked USER rather than these rows, because a billing row holds no\n * personal data of its own — the person is a foreign key. An open bag is the one place that\n * assumption can be broken by an app author, and nothing would catch it: the erasure scrub is\n * field-directed (`.impersonalizeWith()`), and it cannot reach inside an arbitrary record whose\n * keys it does not know.\n *\n * Concretely: no names, emails, phone numbers, addresses, free-text notes about a person, or\n * anything else that identifies one. Personal data written here SURVIVES an erasure — a compliance\n * breach that the retained label makes look intentional.\n *\n * Enforcement is deliberately NOT built (Q3, 2026-07-31): scrubbing these rows would require\n * hide/freeze to become separable from scrub — a real capability change with no current consumer.\n * Revisit only if an app is found using the bag this way.\n */\n metadata: z.record(z.string(), z.string()).optional().describe(\"String tags the application's own code may attach to the subscription. Do not store personal data here: this record is kept when its owner is erased.\"),\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\nexport type BillingSubscriptionBase = z.infer<typeof BillingSubscriptionBaseSchema>;\n\n// ── Polymorphic Declaration ────────────────────────────────────────\n\n/**\n * Polymorphic declaration for Subscriptions.\n * Produces 2 variants:\n * - organizations → organizationSubscriptions (organizationId injected)\n * - users → userSubscriptions (userId injected)\n *\n *\n * Each variant gets `billingAccountId` renamed to the scoped FK\n * (e.g., `organizationBillingAccountId`) via polymorphic FK transformation.\n */\nexport const billingSubscriptionsPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'subscriptions',\n baseFieldIdentifier: 'subscriptionId',\n baseEnumKey: 'SUBSCRIPTIONS',\n baseSchema: BillingSubscriptionBaseSchema,\n // Many subscriptions per scope (LIST/CREATE/UPDATE) — opt out of the\n // polymorphism engine's singleton-per-scope business-key auto-default.\n variants: BILLING_SCOPE_VARIANTS.map(optOutPolymorphicAutoBusinessKey),\n});\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"usage-flush-evidence.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/billing/usage-flush-evidence.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;iBAiBnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
1
+ {"version":3,"file":"usage-flush-evidence.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/billing/usage-flush-evidence.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;iBAiBnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"usage-flush-evidence.shared.schemas.js","sourceRoot":"","sources":["../../../../src/billing/usage-flush-evidence.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,6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MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACrD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { UsageRecordUnreportableReason } from './billing-enums.shared.schemas';\n\n/**\n * # The usage flush's terminal states, summarized for an evidence reader\n *\n * assurance-control: WILDO.BILLING.USAGE_REPORTING — a usage row that can never be reported is marked\n * so with a reason, and the marking is answerable without reading any row.\n *\n * What `GET /assurance/usage-flush-evidence` returns for `evidence-requirement:usage-flush-run-record`\n * C3 (\"a row that can never be reported is marked unreportable with a reason, never reported and never\n * retried forever\"). The usage rows are the engine-owned store that answers it directly: each carries\n * its flush state, and an unreportable one its reason and the instant it was decided.\n *\n * ## A STATE, plus the decisions in the window\n *\n * The clause is about where rows STAND, so the counts are over every row the stores hold, not only\n * rows from the window: an unreportable row decided last year is still one that must never be\n * reported. The window adds one thing, how many rows were DECIDED unreportable inside it.\n *\n * ## The contradictions are counted apart\n *\n * Each is a way the clause can be broken while the totals look fine: an unreportable row with no\n * reason, one with no decision instant, and one that also carries `reportedAt`, which would mean a\n * quantity was both billed and declared unbillable. \"Never retried\" needs no count of its own: the\n * flush selects exactly `pending`, so a row in any other state is not work.\n *\n * Counts only: a usage row names a tenant or a person and a quantity, which an evidence reader has\n * no need to hold.\n */\nexport const UsageFlushEvidenceSchema = z.object({\n window: z.object({ from: z.string(), to: z.string() }),\n /** The usage stores measured. An application with billing off registers none, which is an answer. */\n stores: z.array(z.string()),\n pending: z.number().int().min(0),\n reported: z.number().int().min(0),\n unreportable: z.number().int().min(0),\n unreportableByReason: z.array(z.object({\n reason: z.enum(UsageRecordUnreportableReason).nullable(),\n rows: z.number().int().min(0),\n })),\n unreportableWithoutReason: z.number().int().min(0),\n unreportableWithoutDecidedAt: z.number().int().min(0),\n /** Unreportable rows that ALSO carry `reportedAt`: billed and declared unbillable at once. */\n unreportableAlsoMarkedReported: z.number().int().min(0),\n /** Rows decided unreportable inside the window. */\n unreportableDecidedInWindow: z.number().int().min(0),\n});\nexport type UsageFlushEvidence = z.infer<typeof UsageFlushEvidenceSchema>;\n"]}
1
+ {"version":3,"file":"usage-flush-evidence.shared.schemas.js","sourceRoot":"","sources":["../../../src/billing/usage-flush-evidence.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IACtD,qGAAqG;IACrG,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACrC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,QAAQ,EAAE;QACxD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KAC9B,CAAC,CAAC;IACH,yBAAyB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,4BAA4B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,8FAA8F;IAC9F,8BAA8B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvD,mDAAmD;IACnD,2BAA2B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACrD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { UsageRecordUnreportableReason } from './billing-enums.shared.schemas';\n\n/**\n * # The usage flush's terminal states, summarized for an evidence reader\n *\n * assurance-control: WILDO.BILLING.USAGE_REPORTING — a usage row that can never be reported is marked\n * so with a reason, and the marking is answerable without reading any row.\n *\n * What `GET /assurance/usage-flush-evidence` returns for `evidence-requirement:usage-flush-run-record`\n * C3 (\"a row that can never be reported is marked unreportable with a reason, never reported and never\n * retried forever\"). The usage rows are the engine-owned store that answers it directly: each carries\n * its flush state, and an unreportable one its reason and the instant it was decided.\n *\n * ## A STATE, plus the decisions in the window\n *\n * The clause is about where rows STAND, so the counts are over every row the stores hold, not only\n * rows from the window: an unreportable row decided last year is still one that must never be\n * reported. The window adds one thing, how many rows were DECIDED unreportable inside it.\n *\n * ## The contradictions are counted apart\n *\n * Each is a way the clause can be broken while the totals look fine: an unreportable row with no\n * reason, one with no decision instant, and one that also carries `reportedAt`, which would mean a\n * quantity was both billed and declared unbillable. \"Never retried\" needs no count of its own: the\n * flush selects exactly `pending`, so a row in any other state is not work.\n *\n * Counts only: a usage row names a tenant or a person and a quantity, which an evidence reader has\n * no need to hold.\n */\nexport const UsageFlushEvidenceSchema = z.object({\n window: z.object({ from: z.string(), to: z.string() }),\n /** The usage stores measured. An application with billing off registers none, which is an answer. */\n stores: z.array(z.string()),\n pending: z.number().int().min(0),\n reported: z.number().int().min(0),\n unreportable: z.number().int().min(0),\n unreportableByReason: z.array(z.object({\n reason: z.enum(UsageRecordUnreportableReason).nullable(),\n rows: z.number().int().min(0),\n })),\n unreportableWithoutReason: z.number().int().min(0),\n unreportableWithoutDecidedAt: z.number().int().min(0),\n /** Unreportable rows that ALSO carry `reportedAt`: billed and declared unbillable at once. */\n unreportableAlsoMarkedReported: z.number().int().min(0),\n /** Rows decided unreportable inside the window. */\n unreportableDecidedInWindow: z.number().int().min(0),\n});\nexport type UsageFlushEvidence = z.infer<typeof UsageFlushEvidenceSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"usage-record.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/billing/usage-record.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,qBAAqB,EAAoB,MAAM,gDAAgD,CAAC;AAYzG,eAAO,MAAM,gCAAgC,qPA0G5C,CAAC"}
1
+ {"version":3,"file":"usage-record.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/billing/usage-record.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,qBAAqB,EAAoB,MAAM,gDAAgD,CAAC;AAYzG,eAAO,MAAM,gCAAgC,qPA0G5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"usage-record.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/billing/usage-record.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AACzG,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EA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C,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,SAAS,CAAC;wBACtF,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;qBACpD;oBACD,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C,CAAC;SACH;KACF;CACF,CACF,CAAC","sourcesContent":["/**\n * Usage Record Resource Configuration — Polymorphic\n *\n * Produces 3 factory functions (one per scope variant) via the polymorphic factory.\n * Spread into the registry factory map:\n * ...usageRecordsPolymorphicFactories\n */\n\nimport { CoreResourceOperation, CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n} from '../resources/resources.shared.schemas';\nimport { createPolymorphicResourceConfigurations } from '../resources/utils/resource-polymorphism.factory';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { usageRecordsPolymorphicDeclaration } from './usage-record.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\n\nexport const usageRecordsPolymorphicFactories = createPolymorphicResourceConfigurations(\n usageRecordsPolymorphicDeclaration,\n {\n isSystemResource: true,\n /** Subject-export disclosure. The subject's own usage records. Secrets and backend-only values are withheld by the export's security floor regardless of this grant. On a polymorphic resource this grant applies to EVERY generated variant, which is the documented intent of the shared config. */\n systemAccessPolicy: { exportSubject: ResourceSystemAccessMode.ALLOWED },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n /**\n * Subject erasure RETAINS this row and scrubs nothing, because there is nothing here to scrub.\n *\n * `RETAIN_ONLY` is a positive ASSERTION that this resource holds no personal data of its own. The row is\n * metered usage — a product key, a quantity and a period — amounts and contract terms about the ACCOUNT. They\n * describe nobody once the linked USER row is scrubbed, and they must survive erasure for the tax/audit\n * obligation this family exists to serve, so they can be neither scrubbed nor honestly declared as\n * personal data the row holds. The person is the scope foreign key, which the never-scrub floor protects.\n *\n * The assertion is CHECKED in both directions: the factory refuses `RETAIN_ONLY` if any field declares an\n * impersonalize treatment, and (since 2026-08-31) if any non-floor field declares `.dataCategories()`.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_ONLY,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The row is not a person — its owner FK names the ACTOR the\n * record belongs to — and the enum prescribes `NO_PRINCIPAL` for exactly that shape. The subject's own\n * session ends through the `USERS` row, which is `SELF_PRINCIPAL`.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n operationsConfiguration: {\n /*\n * Route-less retention plumbing — INTERNAL_CALL registers no route, so no API surface is added, and it\n * must not be REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n * which matches only INTERNAL_CALL / API_CALL. LIST is LOW (a read-shaped op may not claim the\n * HIGH/CRITICAL band, which carries an audit-emission obligation); UPDATE_MANY is CRITICAL — it is the\n * verb the impersonalize writer uses to stamp the retention markers.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [{\n // API_CALL: usage records are a user-facing collection (Settings Hub → Billing →\n // Usage, and the resource presets' LIST/READ views). REPOSITORY_ONLY would strip\n // the op from the frontend registry and register no HTTP route. Writes are\n // INTERNAL_CALL (service-pipeline; metered internally / by webhooks, not by users).\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n },\n },\n);\n"]}
1
+ {"version":3,"file":"usage-record.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/billing/usage-record.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AACzG,OAAO,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E,0BAA0B,CAAC,GAAG;iBAC1C,CAAC;SACH;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE;wBACf,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,SAAS,CAAC;wBACtF,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;qBACpD;oBACD,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C,CAAC;SACH;KACF;CACF,CACF,CAAC","sourcesContent":["/**\n * Usage Record Resource Configuration — Polymorphic\n *\n * Produces 3 factory functions (one per scope variant) via the polymorphic factory.\n * Spread into the registry factory map:\n * ...usageRecordsPolymorphicFactories\n */\n\nimport { CoreResourceOperation, CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n} from '../resources/resources.shared.schemas';\nimport { createPolymorphicResourceConfigurations } from '../resources/utils/resource-polymorphism.factory';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { usageRecordsPolymorphicDeclaration } from './usage-record.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\n\nexport const usageRecordsPolymorphicFactories = createPolymorphicResourceConfigurations(\n usageRecordsPolymorphicDeclaration,\n {\n isSystemResource: true,\n /** Subject-export disclosure. The subject's own usage records. Secrets and backend-only values are withheld by the export's security floor regardless of this grant. On a polymorphic resource this grant applies to EVERY generated variant, which is the documented intent of the shared config. */\n systemAccessPolicy: { exportSubject: ResourceSystemAccessMode.ALLOWED },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n /**\n * Subject erasure RETAINS this row and scrubs nothing, because there is nothing here to scrub.\n *\n * `RETAIN_ONLY` is a positive ASSERTION that this resource holds no personal data of its own. The row is\n * metered usage — a product key, a quantity and a period — amounts and contract terms about the ACCOUNT. They\n * describe nobody once the linked USER row is scrubbed, and they must survive erasure for the tax/audit\n * obligation this family exists to serve, so they can be neither scrubbed nor honestly declared as\n * personal data the row holds. The person is the scope foreign key, which the never-scrub floor protects.\n *\n * The assertion is CHECKED in both directions: the factory refuses `RETAIN_ONLY` if any field declares an\n * impersonalize treatment, and (since 2026-08-31) if any non-floor field declares `.dataCategories()`.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_ONLY,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The row is not a person — its owner FK names the ACTOR the\n * record belongs to — and the enum prescribes `NO_PRINCIPAL` for exactly that shape. The subject's own\n * session ends through the `USERS` row, which is `SELF_PRINCIPAL`.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n operationsConfiguration: {\n /*\n * Route-less retention plumbing — INTERNAL_CALL registers no route, so no API surface is added, and it\n * must not be REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n * which matches only INTERNAL_CALL / API_CALL. LIST is LOW (a read-shaped op may not claim the\n * HIGH/CRITICAL band, which carries an audit-emission obligation); UPDATE_MANY is CRITICAL — it is the\n * verb the impersonalize writer uses to stamp the retention markers.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [{\n // API_CALL: usage records are a user-facing collection (Settings Hub → Billing →\n // Usage, and the resource presets' LIST/READ views). REPOSITORY_ONLY would strip\n // the op from the frontend registry and register no HTTP route. Writes are\n // INTERNAL_CALL (service-pipeline; metered internally / by webhooks, not by users).\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: {\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n },\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n },\n },\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"usage-record.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/billing/usage-record.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,0BAA0B,CAAC;AAGlC,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEvH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;iBAsE5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAI5D,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;kBAQ7C,CAAC"}
1
+ {"version":3,"file":"usage-record.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/billing/usage-record.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,0BAA0B,CAAC;AAGlC,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEvH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;iBAsE5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAI5D,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;kBAQ7C,CAAC"}
@@ -24,7 +24,7 @@ import { BILLING_SCOPE_VARIANTS, BILLING_SCOPE_FK_VARIANTS } from './billing-acc
24
24
  import { UsageRecordFlushState, UsageRecordUnreportableReason, UsageSourceType } from './billing-enums.shared.schemas.js';
25
25
  export const UsageRecordSchema = z.object({
26
26
  _id: z.string().min(1).isPrimaryKey(),
27
- billingAccountId: z.string().min(1).isForeignKey({ polymorphicVariants: BILLING_SCOPE_FK_VARIANTS }).isDBIndexed().isSummaryField(),
27
+ billingAccountId: z.string().min(1).isForeignKey({ polymorphicVariants: BILLING_SCOPE_FK_VARIANTS }).isDBIndexed().isSummaryField().describe("The id of the billing account this usage is billed to."),
28
28
  /** Product key for grouping/lookup (matches ProductDefinition.key) */
29
29
  // No `.dataCategories()`: this is an amount/term about the ACCOUNT, not a description of a person.
30
30
  // The person is the scope foreign key, which the never-scrub floor preserves in every mode, and the
@@ -40,10 +40,10 @@ export const UsageRecordSchema = z.object({
40
40
  timestamp: z.date().isDBIndexed().isSummaryField().isNotEditable(),
41
41
  /** What generated this usage */
42
42
  source: z.object({
43
- type: z.enum(UsageSourceType),
44
- resourceType: z.string().optional(),
45
- operationIdentifier: z.string().optional(),
46
- description: z.string().optional(),
43
+ type: z.enum(UsageSourceType).describe("What recorded the usage. `operation` is usage a resource operation declares and records when it succeeds; the other values are for usage the application records itself."),
44
+ resourceType: z.string().optional().describe("For `operation` usage, the resource whose operation recorded it."),
45
+ operationIdentifier: z.string().optional().describe("For `operation` usage, the operation that recorded it."),
46
+ description: z.string().optional().describe("A short note on what generated the usage."),
47
47
  }).optional().isNotEditable(),
48
48
  /**
49
49
  * Where this row stands with respect to the provider flush.
@@ -1 +1 @@
1
- {"version":3,"file":"usage-record.shared.schemas.js","sourceRoot":"","sources":["../../../../src/billing/usage-record.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AAC/H,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AACrG,OAAO,EAAE,qBAAqB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C,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,aAAa,EAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAClJ,8FAA8F;IAC9F,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE;IAC/C;;;;;;OAMG;IACH,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAChI,gGAAgG;IAChG,cAAc,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE;IAEnD;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrD,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACtF,CAAC,CAAC;AAGH,sEAAsE;AAEtE,MAAM,CAAC,MAAM,kCAAkC,GAAG,yBAAyB,CAAC;IAC1E,gBAAgB,EAAE,cAAc;IAChC,mBAAmB,EAAE,eAAe;IACpC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,iBAAiB;IAC7B,2EAA2E;IAC3E,iDAAiD;IACjD,QAAQ,EAAE,sBAAsB,CAAC,GAAG,CAAC,gCAAgC,CAAC;CACvE,CAAC,CAAC","sourcesContent":["/**\n * Usage Record Schema (Shared) — Polymorphic\n *\n * Tracks metered usage for METERED products. The current metering service groups\n * unreported rows by billing account and product when its scheduled flush runs.\n * `ProductBehaviorPolicy.metering` is an authored policy surface, but the current\n * flush scheduler does not consume its interval, window or retry members; do not\n * present those values as an effective reporting schedule until that runtime join exists.\n *\n * POLYMORPHIC EXPANSION: Like subscriptions, usage records are scope-expanded.\n * The `billingAccountId` FK is renamed per variant via polymorphic FK transformation:\n * - organizationUsageRecords (with organizationId + organizationBillingAccountId)\n * - userUsageRecords (with userId + userBillingAccountId)\n *\n *\n * @see billing-and-features-system.md §6.6 (Usage Records)\n */\n\nimport { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\nimport { declarePolymorphicSchemas, optOutPolymorphicAutoBusinessKey } from '../resources/utils/resource-polymorphism.schemas';\nimport { BILLING_SCOPE_VARIANTS, BILLING_SCOPE_FK_VARIANTS } from './billing-account.shared.schemas';\nimport { UsageRecordFlushState, UsageRecordUnreportableReason, UsageSourceType } from './billing-enums.shared.schemas';\n\nexport const UsageRecordSchema = z.object({\n _id: z.string().min(1).isPrimaryKey(),\n billingAccountId: z.string().min(1).isForeignKey({ polymorphicVariants: BILLING_SCOPE_FK_VARIANTS }).isDBIndexed().isSummaryField(),\n /** Product key for grouping/lookup (matches ProductDefinition.key) */\n // No `.dataCategories()`: this is an amount/term about the ACCOUNT, not a description of a person.\n // The person is the scope foreign key, which the never-scrub floor preserves in every mode, and the\n // value must survive erasure for the tax/audit obligation this family exists to serve — so it can be\n // neither scrubbed nor honestly declared as personal data the row holds. See `retentionPolicy` on the\n // resource config (#138).\n productKey: z.string().min(1).isDBIndexed().isSummaryField().isNotEditable(),\n\n /** Usage quantity */\n // USAGE, not FINANCIAL. A metered quantity is what the person DID in the product; the money it\n // becomes lives on the invoice. Two different sentences in a notice, and they read differently.\n quantity: z.number().min(0).isSummaryField(),\n /** When the usage occurred */\n timestamp: z.date().isDBIndexed().isSummaryField().isNotEditable(),\n\n /** What generated this usage */\n source: z.object({\n type: z.enum(UsageSourceType),\n resourceType: z.string().optional(),\n operationIdentifier: z.string().optional(),\n description: z.string().optional(),\n }).optional().isNotEditable(),\n\n /**\n * Where this row stands with respect to the provider flush.\n *\n * The flush selects exactly `PENDING`, so this ONE indexed field decides whether a row is still\n * work. It replaced a `reportedToProvider` boolean on 2026-09-09 (#512): a boolean has no way to\n * say \"this can never be reported\", so rows whose billing account had been deleted were\n * re-selected by every run forever. See {@link UsageRecordFlushState} for why all three states are\n * semantically distinct and why the shortcut of marking them reported was refused.\n */\n flushState: z.enum(UsageRecordFlushState).default(UsageRecordFlushState.PENDING).isDBIndexed().isNotEditable().systemEnum('UsageRecordFlushState'),\n /** When the PROVIDER acknowledged the quantity. Set only alongside `flushState: reported`. */\n reportedAt: z.date().optional().isNotEditable(),\n /**\n * Why this row can never be reported. Set only alongside `flushState: unreportable`.\n *\n * Separate from `reportedAt` on purpose: that timestamp records an acknowledgement by the\n * provider, this pair records a determination made locally, and merging them would put two\n * different events under one name.\n */\n unreportableReason: z.enum(UsageRecordUnreportableReason).optional().isNotEditable().systemEnum('UsageRecordUnreportableReason'),\n /** When the flush determined this row unreportable. Set only alongside `unreportableReason`. */\n unreportableAt: z.date().optional().isNotEditable(),\n\n /**\n * Open key-value bag for operational tagging (cost-centre, campaign ref, internal correlation id).\n *\n * ⚠️ **AUTHORING RULE — never store personal data here.** This row is RETAINED when its subject is\n * erased: the billing-retention decision keeps the financial record for tax/audit obligations, and\n * subject erasure scrubs the linked USER rather than these rows, because a billing row holds no\n * personal data of its own — the person is a foreign key. An open bag is the one place that\n * assumption can be broken by an app author, and nothing would catch it: the erasure scrub is\n * field-directed (`.impersonalizeWith()`), and it cannot reach inside an arbitrary record whose\n * keys it does not know.\n *\n * Concretely: no names, emails, phone numbers, addresses, free-text notes about a person, or\n * anything else that identifies one. Personal data written here SURVIVES an erasure — a compliance\n * breach that the retained label makes look intentional.\n *\n * Enforcement is deliberately NOT built (Q3, 2026-07-31): scrubbing these rows would require\n * hide/freeze to become separable from scrub — a real capability change with no current consumer.\n * Revisit only if an app is found using the bag this way.\n */\n metadata: z.record(z.string(), z.string()).optional(),\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\nexport type UsageRecord = z.infer<typeof UsageRecordSchema>;\n\n// ── Polymorphic Declaration ────────────────────────────────────────\n\nexport const usageRecordsPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'usageRecords',\n baseFieldIdentifier: 'usageRecordId',\n baseEnumKey: 'USAGE_RECORDS',\n baseSchema: UsageRecordSchema,\n // Many metered usage rows per scope — opt out of the polymorphism engine's\n // singleton-per-scope business-key auto-default.\n variants: BILLING_SCOPE_VARIANTS.map(optOutPolymorphicAutoBusinessKey),\n});\n"]}
1
+ {"version":3,"file":"usage-record.shared.schemas.js","sourceRoot":"","sources":["../../../src/billing/usage-record.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AAC/H,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AACrG,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEvH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE;IACrC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;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IAC/C;;;;;;OAMG;IACH,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAChI,gGAAgG;IAChG,cAAc,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE;IAEnD;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrD,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACtF,CAAC,CAAC;AAGH,sEAAsE;AAEtE,MAAM,CAAC,MAAM,kCAAkC,GAAG,yBAAyB,CAAC;IAC1E,gBAAgB,EAAE,cAAc;IAChC,mBAAmB,EAAE,eAAe;IACpC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,iBAAiB;IAC7B,2EAA2E;IAC3E,iDAAiD;IACjD,QAAQ,EAAE,sBAAsB,CAAC,GAAG,CAAC,gCAAgC,CAAC;CACvE,CAAC,CAAC","sourcesContent":["/**\n * Usage Record Schema (Shared) — Polymorphic\n *\n * Tracks metered usage for METERED products. The current metering service groups\n * unreported rows by billing account and product when its scheduled flush runs.\n * `ProductBehaviorPolicy.metering` is an authored policy surface, but the current\n * flush scheduler does not consume its interval, window or retry members; do not\n * present those values as an effective reporting schedule until that runtime join exists.\n *\n * POLYMORPHIC EXPANSION: Like subscriptions, usage records are scope-expanded.\n * The `billingAccountId` FK is renamed per variant via polymorphic FK transformation:\n * - organizationUsageRecords (with organizationId + organizationBillingAccountId)\n * - userUsageRecords (with userId + userBillingAccountId)\n *\n *\n * @see billing-and-features-system.md §6.6 (Usage Records)\n */\n\nimport { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\nimport { declarePolymorphicSchemas, optOutPolymorphicAutoBusinessKey } from '../resources/utils/resource-polymorphism.schemas';\nimport { BILLING_SCOPE_VARIANTS, BILLING_SCOPE_FK_VARIANTS } from './billing-account.shared.schemas';\nimport { UsageRecordFlushState, UsageRecordUnreportableReason, UsageSourceType } from './billing-enums.shared.schemas';\n\nexport const UsageRecordSchema = z.object({\n _id: z.string().min(1).isPrimaryKey(),\n billingAccountId: z.string().min(1).isForeignKey({ polymorphicVariants: BILLING_SCOPE_FK_VARIANTS }).isDBIndexed().isSummaryField().describe(\"The id of the billing account this usage is billed to.\"),\n /** Product key for grouping/lookup (matches ProductDefinition.key) */\n // No `.dataCategories()`: this is an amount/term about the ACCOUNT, not a description of a person.\n // The person is the scope foreign key, which the never-scrub floor preserves in every mode, and the\n // value must survive erasure for the tax/audit obligation this family exists to serve — so it can be\n // neither scrubbed nor honestly declared as personal data the row holds. See `retentionPolicy` on the\n // resource config (#138).\n productKey: z.string().min(1).isDBIndexed().isSummaryField().isNotEditable(),\n\n /** Usage quantity */\n // USAGE, not FINANCIAL. A metered quantity is what the person DID in the product; the money it\n // becomes lives on the invoice. Two different sentences in a notice, and they read differently.\n quantity: z.number().min(0).isSummaryField(),\n /** When the usage occurred */\n timestamp: z.date().isDBIndexed().isSummaryField().isNotEditable(),\n\n /** What generated this usage */\n source: z.object({\n type: z.enum(UsageSourceType).describe(\"What recorded the usage. `operation` is usage a resource operation declares and records when it succeeds; the other values are for usage the application records itself.\"),\n resourceType: z.string().optional().describe(\"For `operation` usage, the resource whose operation recorded it.\"),\n operationIdentifier: z.string().optional().describe(\"For `operation` usage, the operation that recorded it.\"),\n description: z.string().optional().describe(\"A short note on what generated the usage.\"),\n }).optional().isNotEditable(),\n\n /**\n * Where this row stands with respect to the provider flush.\n *\n * The flush selects exactly `PENDING`, so this ONE indexed field decides whether a row is still\n * work. It replaced a `reportedToProvider` boolean on 2026-09-09 (#512): a boolean has no way to\n * say \"this can never be reported\", so rows whose billing account had been deleted were\n * re-selected by every run forever. See {@link UsageRecordFlushState} for why all three states are\n * semantically distinct and why the shortcut of marking them reported was refused.\n */\n flushState: z.enum(UsageRecordFlushState).default(UsageRecordFlushState.PENDING).isDBIndexed().isNotEditable().systemEnum('UsageRecordFlushState'),\n /** When the PROVIDER acknowledged the quantity. Set only alongside `flushState: reported`. */\n reportedAt: z.date().optional().isNotEditable(),\n /**\n * Why this row can never be reported. Set only alongside `flushState: unreportable`.\n *\n * Separate from `reportedAt` on purpose: that timestamp records an acknowledgement by the\n * provider, this pair records a determination made locally, and merging them would put two\n * different events under one name.\n */\n unreportableReason: z.enum(UsageRecordUnreportableReason).optional().isNotEditable().systemEnum('UsageRecordUnreportableReason'),\n /** When the flush determined this row unreportable. Set only alongside `unreportableReason`. */\n unreportableAt: z.date().optional().isNotEditable(),\n\n /**\n * Open key-value bag for operational tagging (cost-centre, campaign ref, internal correlation id).\n *\n * ⚠️ **AUTHORING RULE — never store personal data here.** This row is RETAINED when its subject is\n * erased: the billing-retention decision keeps the financial record for tax/audit obligations, and\n * subject erasure scrubs the linked USER rather than these rows, because a billing row holds no\n * personal data of its own — the person is a foreign key. An open bag is the one place that\n * assumption can be broken by an app author, and nothing would catch it: the erasure scrub is\n * field-directed (`.impersonalizeWith()`), and it cannot reach inside an arbitrary record whose\n * keys it does not know.\n *\n * Concretely: no names, emails, phone numbers, addresses, free-text notes about a person, or\n * anything else that identifies one. Personal data written here SURVIVES an erasure — a compliance\n * breach that the retained label makes look intentional.\n *\n * Enforcement is deliberately NOT built (Q3, 2026-07-31): scrubbing these rows would require\n * hide/freeze to become separable from scrub — a real capability change with no current consumer.\n * Revisit only if an app is found using the bag this way.\n */\n metadata: z.record(z.string(), z.string()).optional(),\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\nexport type UsageRecord = z.infer<typeof UsageRecordSchema>;\n\n// ── Polymorphic Declaration ────────────────────────────────────────\n\nexport const usageRecordsPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'usageRecords',\n baseFieldIdentifier: 'usageRecordId',\n baseEnumKey: 'USAGE_RECORDS',\n baseSchema: UsageRecordSchema,\n // Many metered usage rows per scope — opt out of the polymorphism engine's\n // singleton-per-scope business-key auto-default.\n variants: BILLING_SCOPE_VARIANTS.map(optOutPolymorphicAutoBusinessKey),\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"aggregation-query.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/charts/aggregation-query.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAEpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EAChB,MAAM,kCAAkC,CAAC;AAI1C,eAAO,MAAM,aAAa;;;;;;;;;iBAqBxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAIpD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;iBAwC1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAIxD,eAAO,MAAM,qBAAqB;;;;;iBAkBhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIpE,eAAO,MAAM,oBAAoB;;;;;;;;iBAY/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,eAAO,MAAM,kBAAkB;;;;;;iBAW7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,eAAO,MAAM,kBAAkB;;;;iBAO7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,eAAO,MAAM,mBAAmB;;;;;iBAO9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AA0ChE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAaE,CAAC;AACtC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAItE,eAAO,MAAM,iCAAiC,wCAAoC,CAAC;AACnF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,0BAA0B;;;;;iBASrC,CAAC;AAKH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,8BAA8B;;;;;;;;iBAKzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
1
+ {"version":3,"file":"aggregation-query.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/charts/aggregation-query.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAEpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,mBAAmB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AACnF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,0BAA0B;;;;;iBASrC,CAAC;AAKH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,8BAA8B;;;;;;;;iBAKzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"aggregation-query.shared.schemas.js","sourceRoot":"","sources":["../../../../src/charts/aggregation-query.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAEpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAE1C,gEAAgE;AAEhE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,uFAAuF;IACvF,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,oFAAoF;IACpF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,2BAA2B;IAC3B,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACpC,oBAAoB;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAE5B,2BAA2B;IAC3B,+CAA+C;IAC/C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACtD,gCAAgC;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAA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,CAAC;IACjD,uCAAuC;IACvC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,yCAAyC;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,4CAA4C;IAC5C,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACjC,2CAA2C;IAC3C,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAOH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,wEAAwE;IACxE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC;IAChD,+BAA+B;IAC/B,SAAS,EAAE,0BAA0B;CACtC,CAAC,CAAC","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * Aggregation Query Schemas\n * \n * Declarative data query spec — database-agnostic.\n * Charts are the first consumer; other consumers (counts, facets, exports)\n * use AggregationQuerySchema directly.\n * ────────────────────────────────────────────────────────────── */\n\nimport { z } from 'zod';\nimport {\n AggregateFunction,\n TimeGranularity,\n SortDirection,\n ComparisonOperator,\n JoinType,\n ContextFilterSource,\n WindowFunctionType,\n DimensionSortBy,\n} from './aggregation.shared.definitions';\n\n// ── Measure Schema ───────────────────────────────────────────\n\nexport const MeasureSchema = z.object({\n /** Unique ref for this measure (used in computed measures, orderBy, series mapping) */\n ref: z.string(),\n /** Field to aggregate. Use '*' for COUNT(*). Use dot notation for joined fields. */\n field: z.string(),\n /** Aggregation function */\n aggregate: z.enum(AggregateFunction),\n /** Display label */\n label: z.string().optional(),\n\n // Function-specific params\n /** For PERCENTILE: which percentile (0-100) */\n percentileValue: z.number().min(0).max(100).optional(),\n /** For STRING_AGG: separator */\n separator: z.string().optional(),\n /** For ARRAY_AGG: max items */\n arrayLimit: z.number().positive().optional(),\n\n // Measure-level filter\n /** Filter applied ONLY to this measure (SQL FILTER WHERE / MongoDB $cond) */\n filter: z.record(z.string(), z.unknown()).optional(),\n});\nexport type Measure = z.infer<typeof MeasureSchema>;\n\n// ── Dimension Schema ─────────────────────────────────────────\n\nexport const DimensionSchema = z.object({\n /** Unique ref for this dimension */\n ref: z.string(),\n /** Field to group by. Dot notation for joined fields. */\n field: z.string(),\n /** Display label */\n label: z.string().optional(),\n\n // Time dimension\n /** For temporal fields: bucket granularity */\n timeGranularity: z.enum(TimeGranularity).optional(),\n /** For time: fill empty buckets with zero/null */\n fillMissingBuckets: z.boolean().optional(),\n /** For time: custom date range (overrides global filter) */\n dateRange: z.object({\n from: z.string().optional(),\n to: z.string().optional(),\n }).optional(),\n\n // Bucketing (non-time)\n /** Numeric binning: { step: 10 } or { boundaries: [0, 50, 100, 500] } */\n bin: z.union([\n z.object({ step: z.number().positive() }),\n z.object({ boundaries: z.array(z.number()) }),\n ]).optional(),\n\n // Sorting\n sort: z.object({\n direction: z.enum(SortDirection).default(SortDirection.ASC),\n /** Sort by this dimension's values, or by a measure ref */\n by: z.enum(DimensionSortBy).default(DimensionSortBy.SELF),\n /** If by='measure': which measure ref to sort by */\n measureRef: z.string().optional(),\n }).optional(),\n\n // Limiting / top-N\n /** Only return top N values for this dimension */\n topN: z.number().positive().optional(),\n /** Group remaining values into \"Other\" bucket */\n groupOther: z.boolean().optional(),\n});\nexport type Dimension = z.infer<typeof DimensionSchema>;\n\n// ── Computed Measure Schema (post-aggregation) ───────────────\n\nexport const ComputedMeasureSchema = z.object({\n /** Unique ref */\n ref: z.string(),\n /** Display label */\n label: z.string().optional(),\n /**\n * Expression using measure refs as variables.\n * Supported operators: +, -, *, /, %, (, )\n * Built-in functions: round(x, decimals), abs(x), coalesce(x, fallback), min(x, y), max(x, y)\n * \n * Examples:\n * \"completed_count / total_count * 100\"\n * \"round(revenue / order_count, 2)\"\n * \"coalesce(returning_users / total_users * 100, 0)\"\n */\n expression: z.string(),\n /** Measure refs used in the expression (for validation) */\n dependsOn: z.array(z.string()),\n});\nexport type ComputedMeasure = z.infer<typeof ComputedMeasureSchema>;\n\n// ── Window Function Schema ───────────────────────────────────\n\nexport const WindowFunctionSchema = z.object({\n ref: z.string(),\n label: z.string().optional(),\n /** The base measure or dimension ref to transform */\n sourceRef: z.string(),\n type: z.enum(WindowFunctionType),\n /** For moving_avg: window size */\n windowSize: z.number().positive().optional(),\n /** Partition by dimension ref (for segmented windows) */\n partitionBy: z.string().optional(),\n /** Order by dimension ref (defaults to first time dimension) */\n orderBy: z.string().optional(),\n});\nexport type WindowFunction = z.infer<typeof WindowFunctionSchema>;\n\n// ── Cross-Resource Join Schema ───────────────────────────────\n\nexport const ResourceJoinSchema = z.object({\n /** Resource type to join */\n resourceType: z.string(),\n /** FK field on the source side (must exist in ResourceRelationship definitions) */\n foreignKeyField: z.string(),\n /** Alias prefix for joined fields (e.g., \"customer\" → \"customer.name\") */\n alias: z.string(),\n /** Optional: only include specific fields from joined resource */\n selectFields: z.array(z.string()).optional(),\n /** Join type — defaults to LEFT (null-safe for aggregation) */\n joinType: z.enum(JoinType).default(JoinType.LEFT),\n});\nexport type ResourceJoin = z.infer<typeof ResourceJoinSchema>;\n\n// ── HAVING Clause ────────────────────────────────────────────\n\nexport const HavingClauseSchema = z.object({\n /** Measure ref to filter on */\n measureRef: z.string(),\n /** Comparison operator */\n operator: z.enum(ComparisonOperator),\n /** Value to compare against */\n value: z.number(),\n});\nexport type HavingClause = z.infer<typeof HavingClauseSchema>;\n\n// ── Context Filter Schema ────────────────────────────────────\n\nexport const ContextFilterSchema = z.object({\n field: z.string(),\n /** Comparison operator — defaults to EQ. Use GTE/LTE for date ranges. */\n operator: z.enum(ComparisonOperator).default(ComparisonOperator.EQ),\n source: z.enum(ContextFilterSource),\n /** Source field name (URL param name, parent field name, user field name) */\n sourceField: z.string().optional(),\n});\nexport type ContextFilter = z.infer<typeof ContextFilterSchema>;\n\n// ── The Complete AggregationQuery Schema ─────────────────────\n\nconst AggregationQueryObjectSchema = z.object({\n /** Primary resource */\n mainResourceType: z.string(),\n\n /** Static filters (ResourceFilter syntax — same as LIST/SEARCH) */\n filters: z.record(z.string(), z.unknown()).optional(),\n /** Context-injected filters (resolved at query time) */\n contextFilters: z.array(ContextFilterSchema).optional(),\n\n /** Dimensions & Measures */\n dimensions: z.array(DimensionSchema).min(1),\n measures: z.array(MeasureSchema).min(1),\n\n /** Post-aggregation */\n computedMeasures: z.array(ComputedMeasureSchema).optional(),\n windowFunctions: z.array(WindowFunctionSchema).optional(),\n\n /** Cross-resource */\n joins: z.array(ResourceJoinSchema).optional(),\n\n /** Result shaping */\n having: z.array(HavingClauseSchema).optional(),\n limit: z.number().positive().max(10000).optional(),\n orderBy: z.array(z.object({\n ref: z.string(),\n direction: z.enum(SortDirection).default(SortDirection.ASC),\n })).optional(),\n\n /** Max query execution time in ms. Default: 30000 (30s). Max: 60000 (60s). */\n timeoutMs: z.number().positive().max(60_000).default(30_000).optional(),\n\n /**\n * IANA timezone for time dimension bucketing (e.g., 'Europe/Paris', 'America/New_York').\n * If omitted, resolved at query time from the user's session/organization settings.\n */\n timezone: z.string().optional(),\n});\n\n/**\n * `refreshInterval` used to sit on `AggregationQuery`, but polling semantics are\n * owned by `ChartDefinition`. Reject the legacy nested field explicitly so\n * hand-authored configs fail fast instead of being silently stripped.\n */\nexport const AggregationQuerySchema = z.unknown().superRefine((value, ctx) => {\n if (\n value &&\n typeof value === 'object' &&\n !Array.isArray(value) &&\n Object.prototype.hasOwnProperty.call(value, 'refreshInterval')\n ) {\n ctx.addIssue({\n code: 'custom',\n path: ['refreshInterval'],\n message: 'AggregationQuery.refreshInterval has been removed. Use ChartDefinition.refreshInterval instead.',\n });\n }\n}).pipe(AggregationQueryObjectSchema);\nexport type AggregationQuery = z.infer<typeof AggregationQuerySchema>;\n\n// ── Aggregation Query Response Schemas ───────────────────────\n\nexport const AggregationQueryResponseRowSchema = z.record(z.string(), z.unknown());\nexport type AggregationQueryResponseRow = z.infer<typeof AggregationQueryResponseRowSchema>;\n\nexport const AggregationQueryMetaSchema = z.object({\n /** Server-side execution time in ms */\n executionTimeMs: z.number().optional(),\n /** Total rows returned (before limit) */\n totalRows: z.number().optional(),\n /** Whether result was truncated by limit */\n truncated: z.boolean().optional(),\n /** Resolved timezone used for bucketing */\n resolvedTimezone: z.string().optional(),\n});\n// Meta fields are diagnostic/advisory — a chart renders from `data` alone. They are\n// OPTIONAL so a valid `data` payload is never rejected because the producer omitted a\n// meta field (the frontend validates the whole response and would otherwise blank a\n// good chart over a missing `executionTimeMs`/`truncated`/etc.).\nexport type AggregationQueryMeta = z.infer<typeof AggregationQueryMetaSchema>;\n\nexport const AggregationQueryResponseSchema = z.object({\n /** Result rows — each row is a record keyed by dimension/measure ref */\n data: z.array(AggregationQueryResponseRowSchema),\n /** Query execution metadata */\n queryMeta: AggregationQueryMetaSchema,\n});\nexport type AggregationQueryResponse = z.infer<typeof AggregationQueryResponseSchema>;\n"]}
1
+ {"version":3,"file":"aggregation-query.shared.schemas.js","sourceRoot":"","sources":["../../../src/charts/aggregation-query.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAEpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAE1C,gEAAgE;AAEhE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,uFAAuF;IACvF,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,oFAAoF;IACpF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,2BAA2B;IAC3B,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACpC,oBAAoB;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAE5B,2B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4B,CAAC,CAAC;AAGtC,gEAAgE;AAEhE,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAGnF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,uCAAuC;IACvC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,yCAAyC;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,4CAA4C;IAC5C,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACjC,2CAA2C;IAC3C,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAOH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,wEAAwE;IACxE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC;IAChD,+BAA+B;IAC/B,SAAS,EAAE,0BAA0B;CACtC,CAAC,CAAC","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * Aggregation Query Schemas\n * \n * Declarative data query spec — database-agnostic.\n * Charts are the first consumer; other consumers (counts, facets, exports)\n * use AggregationQuerySchema directly.\n * ────────────────────────────────────────────────────────────── */\n\nimport { z } from 'zod';\nimport {\n AggregateFunction,\n TimeGranularity,\n SortDirection,\n ComparisonOperator,\n JoinType,\n ContextFilterSource,\n WindowFunctionType,\n DimensionSortBy,\n} from './aggregation.shared.definitions';\n\n// ── Measure Schema ───────────────────────────────────────────\n\nexport const MeasureSchema = z.object({\n /** Unique ref for this measure (used in computed measures, orderBy, series mapping) */\n ref: z.string(),\n /** Field to aggregate. Use '*' for COUNT(*). Use dot notation for joined fields. */\n field: z.string(),\n /** Aggregation function */\n aggregate: z.enum(AggregateFunction),\n /** Display label */\n label: z.string().optional(),\n\n // Function-specific params\n /** For PERCENTILE: which percentile (0-100) */\n percentileValue: z.number().min(0).max(100).optional(),\n /** For STRING_AGG: separator */\n separator: z.string().optional(),\n /** For ARRAY_AGG: max items */\n arrayLimit: z.number().positive().optional(),\n\n // Measure-level filter\n /** Filter applied ONLY to this measure (SQL FILTER WHERE / MongoDB $cond) */\n filter: z.record(z.string(), z.unknown()).optional(),\n});\nexport type Measure = z.infer<typeof MeasureSchema>;\n\n// ── Dimension Schema ─────────────────────────────────────────\n\nexport const DimensionSchema = z.object({\n /** Unique ref for this dimension */\n ref: z.string(),\n /** Field to group by. Dot notation for joined fields. */\n field: z.string(),\n /** Display label */\n label: z.string().optional(),\n\n // Time dimension\n /** For temporal fields: bucket granularity */\n timeGranularity: z.enum(TimeGranularity).optional(),\n /** For time: fill empty buckets with zero/null */\n fillMissingBuckets: z.boolean().optional(),\n /** For time: custom date range (overrides global filter) */\n dateRange: z.object({\n from: z.string().optional(),\n to: z.string().optional(),\n }).optional(),\n\n // Bucketing (non-time)\n /** Numeric binning: { step: 10 } or { boundaries: [0, 50, 100, 500] } */\n bin: z.union([\n z.object({ step: z.number().positive() }),\n z.object({ boundaries: z.array(z.number()) }),\n ]).optional(),\n\n // Sorting\n sort: z.object({\n direction: z.enum(SortDirection).default(SortDirection.ASC),\n /** Sort by this dimension's values, or by a measure ref */\n by: z.enum(DimensionSortBy).default(DimensionSortBy.SELF),\n /** If by='measure': which measure ref to sort by */\n measureRef: z.string().optional(),\n }).optional(),\n\n // Limiting / top-N\n /** Only return top N values for this dimension */\n topN: z.number().positive().optional(),\n /** Group remaining values into \"Other\" bucket */\n groupOther: z.boolean().optional(),\n});\nexport type Dimension = z.infer<typeof DimensionSchema>;\n\n// ── Computed Measure Schema (post-aggregation) ───────────────\n\nexport const ComputedMeasureSchema = z.object({\n /** Unique ref */\n ref: z.string(),\n /** Display label */\n label: z.string().optional(),\n /**\n * Expression using measure refs as variables.\n * Supported operators: +, -, *, /, %, (, )\n * Built-in functions: round(x, decimals), abs(x), coalesce(x, fallback), min(x, y), max(x, y)\n * \n * Examples:\n * \"completed_count / total_count * 100\"\n * \"round(revenue / order_count, 2)\"\n * \"coalesce(returning_users / total_users * 100, 0)\"\n */\n expression: z.string(),\n /** Measure refs used in the expression (for validation) */\n dependsOn: z.array(z.string()),\n});\nexport type ComputedMeasure = z.infer<typeof ComputedMeasureSchema>;\n\n// ── Window Function Schema ───────────────────────────────────\n\nexport const WindowFunctionSchema = z.object({\n ref: z.string(),\n label: z.string().optional(),\n /** The base measure or dimension ref to transform */\n sourceRef: z.string(),\n type: z.enum(WindowFunctionType),\n /** For moving_avg: window size */\n windowSize: z.number().positive().optional(),\n /** Partition by dimension ref (for segmented windows) */\n partitionBy: z.string().optional(),\n /** Order by dimension ref (defaults to first time dimension) */\n orderBy: z.string().optional(),\n});\nexport type WindowFunction = z.infer<typeof WindowFunctionSchema>;\n\n// ── Cross-Resource Join Schema ───────────────────────────────\n\nexport const ResourceJoinSchema = z.object({\n /** Resource type to join */\n resourceType: z.string(),\n /** FK field on the source side (must exist in ResourceRelationship definitions) */\n foreignKeyField: z.string(),\n /** Alias prefix for joined fields (e.g., \"customer\" → \"customer.name\") */\n alias: z.string(),\n /** Optional: only include specific fields from joined resource */\n selectFields: z.array(z.string()).optional(),\n /** Join type — defaults to LEFT (null-safe for aggregation) */\n joinType: z.enum(JoinType).default(JoinType.LEFT),\n});\nexport type ResourceJoin = z.infer<typeof ResourceJoinSchema>;\n\n// ── HAVING Clause ────────────────────────────────────────────\n\nexport const HavingClauseSchema = z.object({\n /** Measure ref to filter on */\n measureRef: z.string(),\n /** Comparison operator */\n operator: z.enum(ComparisonOperator),\n /** Value to compare against */\n value: z.number(),\n});\nexport type HavingClause = z.infer<typeof HavingClauseSchema>;\n\n// ── Context Filter Schema ────────────────────────────────────\n\nexport const ContextFilterSchema = z.object({\n field: z.string(),\n /** Comparison operator — defaults to EQ. Use GTE/LTE for date ranges. */\n operator: z.enum(ComparisonOperator).default(ComparisonOperator.EQ),\n source: z.enum(ContextFilterSource),\n /** Source field name (URL param name, parent field name, user field name) */\n sourceField: z.string().optional(),\n});\nexport type ContextFilter = z.infer<typeof ContextFilterSchema>;\n\n// ── The Complete AggregationQuery Schema ─────────────────────\n\nconst AggregationQueryObjectSchema = z.object({\n /** Primary resource */\n mainResourceType: z.string(),\n\n /** Static filters (ResourceFilter syntax — same as LIST/SEARCH) */\n filters: z.record(z.string(), z.unknown()).optional(),\n /** Context-injected filters (resolved at query time) */\n contextFilters: z.array(ContextFilterSchema).optional(),\n\n /** Dimensions & Measures */\n dimensions: z.array(DimensionSchema).min(1),\n measures: z.array(MeasureSchema).min(1),\n\n /** Post-aggregation */\n computedMeasures: z.array(ComputedMeasureSchema).optional(),\n windowFunctions: z.array(WindowFunctionSchema).optional(),\n\n /** Cross-resource */\n joins: z.array(ResourceJoinSchema).optional(),\n\n /** Result shaping */\n having: z.array(HavingClauseSchema).optional(),\n limit: z.number().positive().max(10000).optional(),\n orderBy: z.array(z.object({\n ref: z.string(),\n direction: z.enum(SortDirection).default(SortDirection.ASC),\n })).optional(),\n\n /** Max query execution time in ms. Default: 30000 (30s). Max: 60000 (60s). */\n timeoutMs: z.number().positive().max(60_000).default(30_000).optional(),\n\n /**\n * IANA timezone for time dimension bucketing (e.g., 'Europe/Paris', 'America/New_York').\n * If omitted, resolved at query time from the user's session/organization settings.\n */\n timezone: z.string().optional(),\n});\n\n/**\n * `refreshInterval` used to sit on `AggregationQuery`, but polling semantics are\n * owned by `ChartDefinition`. Reject the legacy nested field explicitly so\n * hand-authored configs fail fast instead of being silently stripped.\n */\nexport const AggregationQuerySchema = z.unknown().superRefine((value, ctx) => {\n if (\n value &&\n typeof value === 'object' &&\n !Array.isArray(value) &&\n Object.prototype.hasOwnProperty.call(value, 'refreshInterval')\n ) {\n ctx.addIssue({\n code: 'custom',\n path: ['refreshInterval'],\n message: 'AggregationQuery.refreshInterval has been removed. Use ChartDefinition.refreshInterval instead.',\n });\n }\n}).pipe(AggregationQueryObjectSchema);\nexport type AggregationQuery = z.infer<typeof AggregationQuerySchema>;\n\n// ── Aggregation Query Response Schemas ───────────────────────\n\nexport const AggregationQueryResponseRowSchema = z.record(z.string(), z.unknown());\nexport type AggregationQueryResponseRow = z.infer<typeof AggregationQueryResponseRowSchema>;\n\nexport const AggregationQueryMetaSchema = z.object({\n /** Server-side execution time in ms */\n executionTimeMs: z.number().optional(),\n /** Total rows returned (before limit) */\n totalRows: z.number().optional(),\n /** Whether result was truncated by limit */\n truncated: z.boolean().optional(),\n /** Resolved timezone used for bucketing */\n resolvedTimezone: z.string().optional(),\n});\n// Meta fields are diagnostic/advisory — a chart renders from `data` alone. They are\n// OPTIONAL so a valid `data` payload is never rejected because the producer omitted a\n// meta field (the frontend validates the whole response and would otherwise blank a\n// good chart over a missing `executionTimeMs`/`truncated`/etc.).\nexport type AggregationQueryMeta = z.infer<typeof AggregationQueryMetaSchema>;\n\nexport const AggregationQueryResponseSchema = z.object({\n /** Result rows — each row is a record keyed by dimension/measure ref */\n data: z.array(AggregationQueryResponseRowSchema),\n /** Query execution metadata */\n queryMeta: AggregationQueryMetaSchema,\n});\nexport type AggregationQueryResponse = z.infer<typeof AggregationQueryResponseSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"aggregation.shared.definitions.d.ts","sourceRoot":"","sources":["../../../../src/charts/aggregation.shared.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAIpE,oBAAY,iBAAiB;IAE3B,KAAK,UAAU;IACf,cAAc,mBAAmB;IACjC,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IAGX,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,QAAQ,aAAa;IAGrB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;IAGnB,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B;AAID,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAID,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAID,oBAAY,kBAAkB;IAC5B,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,GAAG,QAAQ;CACZ;AAID,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAID,oBAAY,mBAAmB;IAC7B,YAAY,gBAAgB;IAC5B,oBAAoB,wBAAwB;IAC5C,SAAS,aAAa;IACtB,eAAe,mBAAmB;CACnC;AAID,oBAAY,kBAAkB;IAC5B,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,gBAAgB,qBAAqB;IACrC,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,UAAU,eAAe;CAC1B;AAID,oBAAY,eAAe;IACzB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAKD,oBAAY,oBAAoB;IAC9B,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,gCAAgC,qCAAqC;IACrE,+BAA+B,oCAAoC;IACnE,qCAAqC,0CAA0C;IAC/E,8BAA8B,mCAAmC;CAClE"}
1
+ {"version":3,"file":"aggregation.shared.definitions.d.ts","sourceRoot":"","sources":["../../../src/charts/aggregation.shared.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAIpE,oBAAY,iBAAiB;IAE3B,KAAK,UAAU;IACf,cAAc,mBAAmB;IACjC,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IAGX,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,QAAQ,aAAa;IAGrB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;IAGnB,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B;AAID,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAID,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAID,oBAAY,kBAAkB;IAC5B,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,GAAG,QAAQ;CACZ;AAID,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAID,oBAAY,mBAAmB;IAC7B,YAAY,gBAAgB;IAC5B,oBAAoB,wBAAwB;IAC5C,SAAS,aAAa;IACtB,eAAe,mBAAmB;CACnC;AAID,oBAAY,kBAAkB;IAC5B,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,gBAAgB,qBAAqB;IACrC,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,UAAU,eAAe;CAC1B;AAID,oBAAY,eAAe;IACzB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAKD,oBAAY,oBAAoB;IAC9B,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,gCAAgC,qCAAqC;IACrE,+BAA+B,oCAAoC;IACnE,qCAAqC,0CAA0C;IAC/E,8BAA8B,mCAAmC;CAClE"}
@@ -1 +1 @@
1
- {"version":3,"file":"aggregation.shared.definitions.js","sourceRoot":"","sources":["../../../../src/charts/aggregation.shared.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;oEAM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AgE;AAEhE,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,mDAA4B,CAAA;IAC5B,mEAA4C,CAAA;IAC5C,6CAAsB,CAAA;IACtB,yDAAkC,CAAA;AACpC,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED,gEAAgE;AAEhE,MAAM,CAAN,IAAY,kBAWX;AAXD,WAAY,kBAAkB;IAC5B,qDAA+B,CAAA;IAC/B,iDAA2B,CAAA;IAC3B,2DAAqC,CAAA;IACrC,mCAAa,CAAA;IACb,+CAAyB,CAAA;IACzB,iCAAW,CAAA;IACX,mCAAa,CAAA;IACb,+CAAyB,CAAA;IACzB,uDAAiC,CAAA;IACjC,+CAAyB,CAAA;AAC3B,CAAC,EAXW,kBAAkB,KAAlB,kBAAkB,QAW7B;AAED,gEAAgE;AAEhE,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,sCAAmB,CAAA;AACrB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED,gEAAgE;AAChE,6EAA6E;AAE7E,MAAM,CAAN,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,2DAAmC,CAAA;IACnC,mEAA2C,CAAA;IAC3C,6FAAqE,CAAA;IACrE,2FAAmE,CAAA;IACnE,uGAA+E,CAAA;IAC/E,yFAAiE,CAAA;AACnE,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,QAO/B","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * Aggregation Engine — Enums & Definitions\n * \n * Generic aggregation enums used by the chart system and any future\n * aggregation consumers (resource counts, facets, report exports).\n * All constant sets are TypeScript enums — Zod 4 accepts enums via z.enum(MyEnum).\n * ────────────────────────────────────────────────────────────── */\n\n// ── Aggregate Functions ──────────────────────────────────────\n\nexport enum AggregateFunction {\n // Basic\n COUNT = 'count',\n COUNT_DISTINCT = 'count_distinct',\n SUM = 'sum',\n AVG = 'avg',\n MIN = 'min',\n MAX = 'max',\n\n // Statistical\n MEDIAN = 'median',\n PERCENTILE = 'percentile',\n STDDEV = 'stddev',\n VARIANCE = 'variance',\n\n // Boolean / existence\n ANY_VALUE = 'any_value',\n BOOL_AND = 'bool_and',\n BOOL_OR = 'bool_or',\n\n // Array\n ARRAY_AGG = 'array_agg',\n STRING_AGG = 'string_agg',\n}\n\n// ── Time Granularity ─────────────────────────────────────────\n\nexport enum TimeGranularity {\n MINUTE = 'minute',\n HOUR = 'hour',\n DAY = 'day',\n WEEK = 'week',\n MONTH = 'month',\n QUARTER = 'quarter',\n YEAR = 'year',\n}\n\n// ── Sort Direction ───────────────────────────────────────────\n\nexport enum SortDirection {\n ASC = 'asc',\n DESC = 'desc',\n}\n\n// ── Comparison Operator ──────────────────────────────────────\n\nexport enum ComparisonOperator {\n EQ = 'eq',\n NE = 'ne',\n GT = 'gt',\n GTE = 'gte',\n LT = 'lt',\n LTE = 'lte',\n}\n\n// ── Join Type ────────────────────────────────────────────────\n\nexport enum JoinType {\n INNER = 'inner',\n LEFT = 'left',\n}\n\n// ── Context Filter Source ────────────────────────────────────\n\nexport enum ContextFilterSource {\n CURRENT_USER = 'currentUser',\n CURRENT_ORGANIZATION = 'currentOrganization',\n URL_PARAM = 'urlParam',\n PARENT_RESOURCE = 'parentResource',\n}\n\n// ── Window Function Type ─────────────────────────────────────\n\nexport enum WindowFunctionType {\n RUNNING_TOTAL = 'running_total',\n RUNNING_AVG = 'running_avg',\n PERCENT_OF_TOTAL = 'percent_of_total',\n RANK = 'rank',\n DENSE_RANK = 'dense_rank',\n LAG = 'lag',\n LEAD = 'lead',\n DIFFERENCE = 'difference',\n PERCENT_CHANGE = 'percent_change',\n MOVING_AVG = 'moving_avg',\n}\n\n// ── Dimension Sort By ────────────────────────────────────────\n\nexport enum DimensionSortBy {\n SELF = 'self',\n MEASURE = 'measure',\n}\n\n// ── Aggregation Error Codes ──────────────────────────────────\n// Used by ErrorBuilderBackendService and frontend ChartErrorState component.\n\nexport enum AggregationErrorCode {\n CHART_NOT_FOUND = 'chart_not_found',\n AGGREGATION_TIMEOUT = 'aggregation_timeout',\n AGGREGATION_MAX_BUCKETS_EXCEEDED = 'aggregation_max_buckets_exceeded',\n AGGREGATION_FIELD_ACCESS_DENIED = 'aggregation_field_access_denied',\n AGGREGATION_COMPUTED_EXPRESSION_ERROR = 'aggregation_computed_expression_error',\n AGGREGATION_JOIN_ACCESS_DENIED = 'aggregation_join_access_denied',\n}\n"]}
1
+ {"version":3,"file":"aggregation.shared.definitions.js","sourceRoot":"","sources":["../../../src/charts/aggregation.shared.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAEpE,gEAAgE;AAEhE,MAAM,CAAN,IAAY,iBAuBX;AAvBD,WAAY,iBAAiB;IAC3B,QAAQ;IACR,oCAAe,CAAA;IACf,sDAAiC,CAAA;IACjC,gCAAW,CAAA;IACX,gCAAW,CAAA;IACX,gCAAW,CAAA;IACX,gCAAW,CAAA;IAEX,cAAc;IACd,sCAAiB,CAAA;IACjB,8CAAyB,CAAA;IACzB,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IAErB,sBAAsB;IACtB,4CAAuB,CAAA;IACvB,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;IAEnB,QAAQ;IACR,4CAAuB,CAAA;IACvB,8CAAyB,CAAA;AAC3B,CAAC,EAvBW,iBAAiB,KAAjB,iBAAiB,QAuB5B;AAED,gEAAgE;AAEhE,MAAM,CAAN,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,gCAAa,CAAA;IACb,8BAAW,CAAA;IACX,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,gCAAa,CAAA;AACf,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B;AAED,gEAAgE;AAEhE,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,8BAAa,CAAA;AACf,CAAC,EAHW,aAAa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AAA;IAC/E,yFAAiE,CAAA;AACnE,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,QAO/B","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * Aggregation Engine — Enums & Definitions\n * \n * Generic aggregation enums used by the chart system and any future\n * aggregation consumers (resource counts, facets, report exports).\n * All constant sets are TypeScript enums — Zod 4 accepts enums via z.enum(MyEnum).\n * ────────────────────────────────────────────────────────────── */\n\n// ── Aggregate Functions ──────────────────────────────────────\n\nexport enum AggregateFunction {\n // Basic\n COUNT = 'count',\n COUNT_DISTINCT = 'count_distinct',\n SUM = 'sum',\n AVG = 'avg',\n MIN = 'min',\n MAX = 'max',\n\n // Statistical\n MEDIAN = 'median',\n PERCENTILE = 'percentile',\n STDDEV = 'stddev',\n VARIANCE = 'variance',\n\n // Boolean / existence\n ANY_VALUE = 'any_value',\n BOOL_AND = 'bool_and',\n BOOL_OR = 'bool_or',\n\n // Array\n ARRAY_AGG = 'array_agg',\n STRING_AGG = 'string_agg',\n}\n\n// ── Time Granularity ─────────────────────────────────────────\n\nexport enum TimeGranularity {\n MINUTE = 'minute',\n HOUR = 'hour',\n DAY = 'day',\n WEEK = 'week',\n MONTH = 'month',\n QUARTER = 'quarter',\n YEAR = 'year',\n}\n\n// ── Sort Direction ───────────────────────────────────────────\n\nexport enum SortDirection {\n ASC = 'asc',\n DESC = 'desc',\n}\n\n// ── Comparison Operator ──────────────────────────────────────\n\nexport enum ComparisonOperator {\n EQ = 'eq',\n NE = 'ne',\n GT = 'gt',\n GTE = 'gte',\n LT = 'lt',\n LTE = 'lte',\n}\n\n// ── Join Type ────────────────────────────────────────────────\n\nexport enum JoinType {\n INNER = 'inner',\n LEFT = 'left',\n}\n\n// ── Context Filter Source ────────────────────────────────────\n\nexport enum ContextFilterSource {\n CURRENT_USER = 'currentUser',\n CURRENT_ORGANIZATION = 'currentOrganization',\n URL_PARAM = 'urlParam',\n PARENT_RESOURCE = 'parentResource',\n}\n\n// ── Window Function Type ─────────────────────────────────────\n\nexport enum WindowFunctionType {\n RUNNING_TOTAL = 'running_total',\n RUNNING_AVG = 'running_avg',\n PERCENT_OF_TOTAL = 'percent_of_total',\n RANK = 'rank',\n DENSE_RANK = 'dense_rank',\n LAG = 'lag',\n LEAD = 'lead',\n DIFFERENCE = 'difference',\n PERCENT_CHANGE = 'percent_change',\n MOVING_AVG = 'moving_avg',\n}\n\n// ── Dimension Sort By ────────────────────────────────────────\n\nexport enum DimensionSortBy {\n SELF = 'self',\n MEASURE = 'measure',\n}\n\n// ── Aggregation Error Codes ──────────────────────────────────\n// Used by ErrorBuilderBackendService and frontend ChartErrorState component.\n\nexport enum AggregationErrorCode {\n CHART_NOT_FOUND = 'chart_not_found',\n AGGREGATION_TIMEOUT = 'aggregation_timeout',\n AGGREGATION_MAX_BUCKETS_EXCEEDED = 'aggregation_max_buckets_exceeded',\n AGGREGATION_FIELD_ACCESS_DENIED = 'aggregation_field_access_denied',\n AGGREGATION_COMPUTED_EXPRESSION_ERROR = 'aggregation_computed_expression_error',\n AGGREGATION_JOIN_ACCESS_DENIED = 'aggregation_join_access_denied',\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"chart-definition-builder.shared.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-definition-builder.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;oEAiBoE;AAEpE,OAAO,EACL,SAAS,EAET,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EAEb,QAAQ,EACR,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAc1C,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,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,IAAI;IAQxE,UAAU,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAKzC,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAK9C;;;;;OAKG;IACH,KAAK,CAAC,UAAU,EAAE,oBAAoB,GAAG,IAAI;IAS7C;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI;IAOxD,KAAK,IAAI,eAAe;IAyExB,OAAO,CAAC,mBAAmB;CAO5B;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,sBAAsB,CAE1F"}
1
+ {"version":3,"file":"chart-definition-builder.shared.d.ts","sourceRoot":"","sources":["../../../src/charts/chart-definition-builder.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;oEAiBoE;AAEpE,OAAO,EACL,SAAS,EAET,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EAEb,QAAQ,EACR,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAc1C,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE;QACL,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACxB,UAAU,CAAC,EAAE,MAAM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,CAAC,GAAG,IAAI;IAOxD,KAAK,IAAI,eAAe;IAyExB,OAAO,CAAC,mBAAmB;CAO5B;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,sBAAsB,CAE1F"}
@@ -1 +1 @@
1
- {"version":3,"file":"chart-definition-builder.shared.js","sourceRoot":"","sources":["../../../../src/charts/chart-definition-builder.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;oEAiBoE;AAEpE,OAAO,EACL,SAAS,EACT,qBAAqB,GAStB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,iBAAiB,EAEjB,kBAAkB,EAElB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAsD1C,gEAAgE;AAEhE,MAAM,OAAO,sBAAsB;IAwBd;IACA;IAxBX,UAAU,GAAc,SAAS,CAAC,GAAG,CAAC;IACtC,WAAW,GAAgB,EAAE,CAAC;IAC9B,SAAS,GAAc,EAAE,CAAC;IAC1B,OAAO,GAA4B,EAAE,CAAC;IACtC,eAAe,GAAoB,EAAE,CAAC;IACtC,MAAM,GAAmB,EAAE,CAAC;IAC5B,QAAQ,CAA2B;IACnC,cAAc,CAAsB;IACpC,gBAAgB,CAAU;IAC1B,SAAS,CAAU;IACnB,MAAM,CAAU;IAChB,QAAQ,CAAoD;IAC5D,iBAAiB,CAAU;IAC3B,YAAY,CAAoB;IAChC,OAAO,GAAmB,EAAE,CAAC;IAC7B,iBAAiB,GAAsB,EAAE,CAAC;IAC1C,gBAAgB,GAAqB,EAAE,CAAC;IACxC,WAAW,CAAmB;IAC9B,gBAAgB,CAAmB;IACnC,KAAK,CAA2B;IAChC,OAAO,CAA0B;IAEzC,YACmB,IAAY,EACZ,iBAAyB;QADzB,SAAI,GAAJ,IAAI,CAAQ;QACZ,sBAAiB,GAAjB,iBAAiB,CAAQ;IACzC,C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O,CAAC,GAAG,SAAS;YAC5B,IAAI,EAAE,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG;YAClC,UAAU,EAAE,OAAO,CAAC,GAAG;SACxB,CAAC,CAAC,CAAC;IACN,CAAC;CACF;AAED,gEAAgE;AAEhE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,gBAAwB;IAChE,OAAO,IAAI,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * ChartDefinitionBuilder — Fluent API for building ChartDefinitions\n *\n * Pure function that constructs a ChartDefinition object and validates\n * it against the schema. No backend/frontend deps.\n *\n * View wiring (scope, addressability, launcher) is composed separately\n * in frontend presets/config via InsertedChartDeclaration in saas-frontend-lib.\n * Charts are resource-owned inserted surfaces only; there is no app-level\n * chart view type.\n *\n * Usage:\n * chartBuilder('orders-per-month', 'ORDERS')\n * .type(ChartType.BAR)\n * .timeDimension('createdAt', TimeGranularity.MONTH)\n * .count()\n * .build()\n * ────────────────────────────────────────────────────────────── */\n\nimport {\n ChartType,\n ChartDefinitionSchema,\n type ChartDefinition,\n type ChartSeriesDefinition,\n type ChartAccessControl,\n type ChartInputDefinition,\n type ChartSplitConfig,\n type ChartSeriesStyle,\n type ChartAppearance,\n type ChartTypeConfig,\n} from '../config/frontend/chart-definition.shared.schemas';\nimport {\n AggregateFunction,\n TimeGranularity,\n ComparisonOperator,\n ContextFilterSource,\n SortDirection,\n DimensionSortBy,\n JoinType,\n WindowFunctionType,\n} from './aggregation.shared.definitions';\nimport type {\n Measure,\n Dimension,\n ContextFilter,\n ResourceJoin,\n HavingClause,\n ComputedMeasure,\n WindowFunction,\n AggregationQuery,\n} from './aggregation-query.shared.schemas';\n\n// ── Builder Options Types ────────────────────────────────────\n\nexport interface MeasureOptions {\n label?: string;\n filter?: Record<string, unknown>;\n}\n\nexport interface DimensionOptions {\n label?: string;\n sort?: {\n direction?: SortDirection;\n by?: 'self' | 'measure';\n measureRef?: string;\n };\n topN?: number;\n groupOther?: boolean;\n}\n\nexport interface TimeDimensionOptions extends DimensionOptions {\n fillMissingBuckets?: boolean;\n dateRange?: { from?: string; to?: string };\n}\n\nexport interface SeriesOptions {\n chartType?: ChartType;\n yAxisIndex?: number;\n style?: Partial<ChartSeriesStyle>;\n hidden?: boolean;\n}\n\nexport interface JoinOptions {\n selectFields?: string[];\n joinType?: JoinType;\n}\n\nexport interface WindowFunctionOptions {\n label?: string;\n windowSize?: number;\n partitionBy?: string;\n orderBy?: string;\n}\n\n// ── Builder Class ────────────────────────────────────────────\n\nexport class ChartDefinitionBuilder {\n private _chartType: ChartType = ChartType.BAR;\n private _dimensions: Dimension[] = [];\n private _measures: Measure[] = [];\n private _series: ChartSeriesDefinition[] = [];\n private _contextFilters: ContextFilter[] = [];\n private _joins: ResourceJoin[] = [];\n private _filters?: Record<string, unknown>;\n private _accessControl?: ChartAccessControl;\n private _refreshInterval?: number;\n private _timezone?: string;\n private _limit?: number;\n private _orderBy?: Array<{ ref: string; direction: SortDirection }>;\n private _splitByDimension?: string;\n private _splitConfig?: ChartSplitConfig;\n private _having: HavingClause[] = [];\n private _computedMeasures: ComputedMeasure[] = [];\n private _windowFunctions: WindowFunction[] = [];\n private _appearance?: ChartAppearance;\n private _chartTypeConfig?: ChartTypeConfig;\n private _i18n?: ChartDefinition['i18n'];\n private _inputs?: ChartInputDefinition[];\n\n constructor(\n private readonly _ref: string,\n private readonly _mainResourceType: string,\n ) {}\n\n // ── Chart type ──\n\n type(chartType: ChartType): this {\n this._chartType = chartType;\n return this;\n }\n\n // ── Dimensions ──\n\n dimension(field: string, options?: DimensionOptions): this {\n const ref = options?.label?.toLowerCase().replace(/\\s+/g, '_') || field;\n this._dimensions.push({\n ref,\n field,\n label: options?.label,\n sort: options?.sort ? {\n direction: options.sort.direction ?? SortDirection.ASC,\n by: options.sort.by === 'measure' ? DimensionSortBy.MEASURE : DimensionSortBy.SELF,\n measureRef: options.sort.measureRef,\n } : undefined,\n topN: options?.topN,\n groupOther: options?.groupOther,\n });\n return this;\n }\n\n timeDimension(field: string, granularity: TimeGranularity, options?: TimeDimensionOptions): this {\n const ref = options?.label?.toLowerCase().replace(/\\s+/g, '_') || field;\n this._dimensions.push({\n ref,\n field,\n label: options?.label,\n timeGranularity: granularity,\n fillMissingBuckets: options?.fillMissingBuckets ?? true, // default: true for time dimensions\n dateRange: options?.dateRange,\n sort: options?.sort ? {\n direction: options.sort.direction ?? SortDirection.ASC,\n by: options.sort.by === 'measure' ? DimensionSortBy.MEASURE : DimensionSortBy.SELF,\n measureRef: options.sort.measureRef,\n } : undefined,\n topN: options?.topN,\n groupOther: options?.groupOther,\n });\n return this;\n }\n\n // ── Measures (shorthands) ──\n\n count(options?: MeasureOptions): this {\n return this.measure('*', AggregateFunction.COUNT, {\n ...options,\n label: options?.label ?? 'Count',\n });\n }\n\n sum(field: string, options?: MeasureOptions): this {\n return this.measure(field, AggregateFunction.SUM, options);\n }\n\n avg(field: string, options?: MeasureOptions): this {\n return this.measure(field, AggregateFunction.AVG, options);\n }\n\n min(field: string, options?: MeasureOptions): this {\n return this.measure(field, AggregateFunction.MIN, options);\n }\n\n max(field: string, options?: MeasureOptions): this {\n return this.measure(field, AggregateFunction.MAX, options);\n }\n\n measure(field: string, aggregate: AggregateFunction, options?: MeasureOptions): this {\n const ref = field === '*' ? `*_${aggregate}` : `${field}_${aggregate}`;\n this._measures.push({\n ref,\n field,\n aggregate,\n label: options?.label,\n filter: options?.filter,\n });\n return this;\n }\n\n // ── Series (explicit) ──\n\n series(ref: string, name: string, measureRef: string, options?: SeriesOptions): this {\n const series: ChartSeriesDefinition = {\n ref,\n name,\n measureRef,\n chartType: options?.chartType,\n yAxisIndex: options?.yAxisIndex,\n hidden: options?.hidden,\n style: options?.style ? { ...options.style } : undefined,\n };\n this._series.push(series);\n return this;\n }\n\n // ── Split by dimension ──\n\n splitBy(dimensionRef: string, config?: ChartSplitConfig): this {\n this._splitByDimension = dimensionRef;\n this._splitConfig = config;\n return this;\n }\n\n // ── Access control ──\n\n accessControl(config: ChartAccessControl): this {\n this._accessControl = config;\n return this;\n }\n\n // ── Filters ──\n\n contextFilter(field: string, source: ContextFilterSource, options?: { operator?: ComparisonOperator; sourceField?: string }): this {\n this._contextFilters.push({\n field,\n operator: options?.operator ?? ComparisonOperator.EQ,\n source,\n sourceField: options?.sourceField,\n });\n return this;\n }\n\n filter(filters: Record<string, unknown>): this {\n this._filters = filters;\n return this;\n }\n\n // ── Computed measures (post-aggregation) ──\n\n /**\n * Add a computed measure that evaluates an expression using other measure refs as variables.\n *\n * @param ref - Unique ref for this computed measure\n * @param expression - Safe expression using measure refs (e.g., \"completed / total * 100\")\n * @param dependsOn - Measure refs referenced in the expression\n * @param label - Optional display label\n *\n * @example\n * ```ts\n * .count({ label: 'Total' }) // ref: \"*_count\"\n * .measure('status', AggregateFunction.COUNT, { // ref: \"status_count\"\n * label: 'Completed',\n * filter: { status: 'completed' }\n * })\n * .computedMeasure('completion_rate', 'round(status_count / *_count * 100, 1)', ['status_count', '*_count'])\n * ```\n */\n computedMeasure(ref: string, expression: string, dependsOn: string[], label?: string): this {\n this._computedMeasures.push({\n ref,\n expression,\n dependsOn,\n label,\n });\n return this;\n }\n\n // ── Window functions (post-aggregation transforms) ──\n\n /**\n * Generic window function.\n */\n windowFunction(ref: string, sourceRef: string, type: WindowFunctionType, options?: WindowFunctionOptions): this {\n this._windowFunctions.push({\n ref,\n sourceRef,\n type,\n label: options?.label,\n windowSize: options?.windowSize,\n partitionBy: options?.partitionBy,\n orderBy: options?.orderBy,\n });\n return this;\n }\n\n /**\n * Shorthand: running total (cumulative sum).\n */\n runningTotal(ref: string, sourceRef: string, options?: Omit<WindowFunctionOptions, 'windowSize'>): this {\n return this.windowFunction(ref, sourceRef, WindowFunctionType.RUNNING_TOTAL, options);\n }\n\n /**\n * Shorthand: percent change from previous row.\n */\n percentChange(ref: string, sourceRef: string, options?: Omit<WindowFunctionOptions, 'windowSize'>): this {\n return this.windowFunction(ref, sourceRef, WindowFunctionType.PERCENT_CHANGE, options);\n }\n\n /**\n * Shorthand: moving average over a window of N rows.\n *\n * @param windowSize - Number of rows in the moving window (default: 3)\n */\n movingAvg(ref: string, sourceRef: string, windowSize?: number, options?: Omit<WindowFunctionOptions, 'windowSize'>): this {\n return this.windowFunction(ref, sourceRef, WindowFunctionType.MOVING_AVG, {\n ...options,\n windowSize: windowSize ?? 3,\n });\n }\n\n /**\n * Shorthand: percent of total (value / sum * 100).\n */\n percentOfTotal(ref: string, sourceRef: string, options?: Omit<WindowFunctionOptions, 'windowSize'>): this {\n return this.windowFunction(ref, sourceRef, WindowFunctionType.PERCENT_OF_TOTAL, options);\n }\n\n /**\n * Shorthand: difference from previous row.\n */\n difference(ref: string, sourceRef: string, options?: Omit<WindowFunctionOptions, 'windowSize'>): this {\n return this.windowFunction(ref, sourceRef, WindowFunctionType.DIFFERENCE, options);\n }\n\n // ── Cross-resource joins ──\n\n join(resourceType: string, fkField: string, alias: string, options?: JoinOptions): this {\n this._joins.push({\n resourceType,\n foreignKeyField: fkField,\n alias,\n selectFields: options?.selectFields,\n joinType: options?.joinType ?? JoinType.LEFT,\n });\n return this;\n }\n\n // ── HAVING (filter on aggregated values) ──\n\n /**\n * Add a HAVING clause to filter on aggregated measure values.\n *\n * @param measureRef - Ref of the measure to filter on\n * @param operator - Comparison operator (GT, GTE, LT, LTE, EQ, NEQ)\n * @param value - Numeric value to compare against\n *\n * @example\n * ```ts\n * .count()\n * .having('*_COUNT', ComparisonOperator.GT, 10) // Only groups with count > 10\n * ```\n */\n having(measureRef: string, operator: ComparisonOperator, value: number): this {\n this._having.push({ measureRef, operator, value });\n return this;\n }\n\n // ── Binned dimension shorthand ──\n\n /**\n * Add a numeric dimension with binning (step-based or boundary-based).\n *\n * @example\n * ```ts\n * // Step-based: 0-10, 10-20, 20-30, ...\n * .binDimension('age', { step: 10 })\n *\n * // Boundary-based: <0, 0-50, 50-100, 100-500, ≥500\n * .binDimension('price', { boundaries: [0, 50, 100, 500] })\n * ```\n */\n binDimension(field: string, bin: { step: number } | { boundaries: number[] }, options?: DimensionOptions): this {\n const ref = options?.label?.toLowerCase().replace(/\\s+/g, '_') || field;\n this._dimensions.push({\n ref,\n field,\n label: options?.label,\n bin,\n sort: options?.sort ? {\n direction: options.sort.direction ?? SortDirection.ASC,\n by: options.sort.by === 'measure' ? DimensionSortBy.MEASURE : DimensionSortBy.SELF,\n measureRef: options.sort.measureRef,\n } : undefined,\n topN: options?.topN,\n groupOther: options?.groupOther,\n });\n return this;\n }\n\n // ── Result shaping ──\n\n timezone(tz: string): this {\n this._timezone = tz;\n return this;\n }\n\n refreshInterval(ms: number): this {\n this._refreshInterval = ms;\n return this;\n }\n\n limitResults(n: number): this {\n this._limit = n;\n return this;\n }\n\n orderBy(ref: string, direction: SortDirection = SortDirection.ASC): this {\n if (!this._orderBy) this._orderBy = [];\n this._orderBy.push({ ref, direction });\n return this;\n }\n\n // ── Appearance & type config ──\n\n appearance(config: ChartAppearance): this {\n this._appearance = config;\n return this;\n }\n\n chartTypeConfig(config: ChartTypeConfig): this {\n this._chartTypeConfig = config;\n return this;\n }\n\n /**\n * Declare an explicit runtime input for this chart.\n *\n * Inputs replace raw caller-provided filter fragments with an authored\n * contract that can only bind into approved query seams.\n */\n input(definition: ChartInputDefinition): this {\n if (!this._inputs) {\n this._inputs = [];\n }\n\n this._inputs.push(definition);\n return this;\n }\n\n /**\n * Set i18n labelling keys for chart-level text (title, axes, tooltips, split values).\n * When resolved at render time, these keys replace hardcoded text with translated strings.\n */\n i18n(config: NonNullable<ChartDefinition['i18n']>): this {\n this._i18n = config;\n return this;\n }\n\n // ── Build ──\n\n build(): ChartDefinition {\n // Validate computed measure dependsOn refs against actual measure refs\n if (this._computedMeasures.length > 0) {\n const measureRefs = new Set(this._measures.map(m => m.ref));\n // Also include other computed measure refs (for chained computations)\n const computedRefs = new Set(this._computedMeasures.map(cm => cm.ref));\n\n for (const cm of this._computedMeasures) {\n for (const dep of cm.dependsOn) {\n // Guard: a computed measure cannot reference itself\n if (dep === cm.ref) {\n throw new Error(\n `ChartDefinitionBuilder: computed measure '${cm.ref}' references itself in dependsOn. ` +\n `Self-referencing computed measures are not supported.`,\n );\n }\n if (!measureRefs.has(dep) && !computedRefs.has(dep)) {\n throw new Error(\n `ChartDefinitionBuilder: computed measure '${cm.ref}' depends on '${dep}', ` +\n `but no measure or computed measure with that ref exists. ` +\n `Available measure refs: [${[...measureRefs].join(', ')}]`,\n );\n }\n }\n }\n }\n\n // Auto-generate series from measures if none were explicitly defined\n const series = this._series.length > 0\n ? this._series\n : this._autoGenerateSeries();\n\n // Apply splitByDimension to auto-generated series\n const finalSeries = series.map(s => ({\n ...s,\n splitByDimension: s.splitByDimension ?? this._splitByDimension,\n splitConfig: s.splitConfig ?? this._splitConfig,\n }));\n\n const dataQuery: AggregationQuery = {\n mainResourceType: this._mainResourceType,\n dimensions: this._dimensions,\n measures: this._measures,\n filters: this._filters,\n contextFilters: this._contextFilters.length > 0 ? this._contextFilters : undefined,\n computedMeasures: this._computedMeasures.length > 0 ? this._computedMeasures : undefined,\n windowFunctions: this._windowFunctions.length > 0 ? this._windowFunctions : undefined,\n joins: this._joins.length > 0 ? this._joins : undefined,\n having: this._having.length > 0 ? this._having : undefined,\n timezone: this._timezone,\n limit: this._limit,\n orderBy: this._orderBy,\n };\n\n const definition: Record<string, unknown> = {\n ref: this._ref,\n chartType: this._chartType,\n dataQuery,\n series: finalSeries,\n inputs: this._inputs,\n accessControl: this._accessControl,\n refreshInterval: this._refreshInterval,\n appearance: this._appearance,\n chartTypeConfig: this._chartTypeConfig,\n i18n: this._i18n,\n };\n\n const parsed = ChartDefinitionSchema.parse(definition);\n return parsed as ChartDefinition;\n }\n\n // ── Private helpers ──\n\n private _autoGenerateSeries(): ChartSeriesDefinition[] {\n return this._measures.map(measure => ({\n ref: `${measure.ref}_series`,\n name: measure.label || measure.ref,\n measureRef: measure.ref,\n }));\n }\n}\n\n// ── Factory function ─────────────────────────────────────────\n\n/**\n * Create a ChartDefinitionBuilder.\n *\n * @param ref - Unique chart reference used for registry lookup and the backend data endpoint `/charts/:chartRef/data`\n * @param mainResourceType - Primary resource type for the data query\n *\n * @example\n * ```ts\n * const chart = chartBuilder('orders-per-month', 'ORDERS')\n * .type(ChartType.BAR)\n * .timeDimension('createdAt', TimeGranularity.MONTH)\n * .count()\n * .build();\n * ```\n */\nexport function chartBuilder(ref: string, mainResourceType: string): ChartDefinitionBuilder {\n return new ChartDefinitionBuilder(ref, mainResourceType);\n}\n"]}
1
+ {"version":3,"file":"chart-definition-builder.shared.js","sourceRoot":"","sources":["../../../src/charts/chart-definition-builder.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;oEAiBoE;AAEpE,OAAO,EACL,SAAS,EACT,qBAAqB,GAStB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,iBAAiB,EAEjB,kBAAkB,EAElB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAsD1C,gEAAgE;AAEhE,MAAM,OAAO,sBAAsB;IAwBd;IACA;IAxBX,UAAU,GAAc,SAAS,CAAC,GAAG,CAAC;IACtC,WAAW,GAAgB,EAAE,CAAC;IAC9B,SAAS,GAAc,EAAE,CAAC;IAC1B,OAAO,GAA4B,EAAE,CAAC;IACtC,eAAe,GAAoB,EAAE,CAAC;IACtC,MAAM,GAAmB,EAAE,CAAC;IAC5B,QAAQ,CAA2B;IACnC,cAAc,CAAsB;IACpC,gBAAgB,CAAU;IAC1B,SAAS,CAAU;IACnB,MAAM,CAAU;IAChB,QAAQ,CAAoD;IAC5D,iBAAiB,CAAU;IAC3B,YAAY,CAAoB;IAChC,OAAO,GAAmB,EAAE,CAAC;IAC7B,iBAAiB,GAAsB,EAAE,CAAC;IAC1C,gBAAgB,GAAqB,EAAE,CAAC;IACxC,WAAW,C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CAAC;QACvD,OAAO,MAAyB,CAAC;IACnC,CAAC;IAED,wBAAwB;IAEhB,mBAAmB;QACzB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACpC,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,SAAS;YAC5B,IAAI,EAAE,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG;YAClC,UAAU,EAAE,OAAO,CAAC,GAAG;SACxB,CAAC,CAAC,CAAC;IACN,CAAC;CACF;AAED,gEAAgE;AAEhE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,gBAAwB;IAChE,OAAO,IAAI,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * ChartDefinitionBuilder — Fluent API for building ChartDefinitions\n *\n * Pure function that constructs a ChartDefinition object and validates\n * it against the schema. No backend/frontend deps.\n *\n * View wiring (scope, addressability, launcher) is composed separately\n * in frontend presets/config via InsertedChartDeclaration in saas-frontend-lib.\n * Charts are resource-owned inserted surfaces only; there is no app-level\n * chart view type.\n *\n * Usage:\n * chartBuilder('orders-per-month', 'ORDERS')\n * .type(ChartType.BAR)\n * .timeDimension('createdAt', TimeGranularity.MONTH)\n * .count()\n * .build()\n * ────────────────────────────────────────────────────────────── */\n\nimport {\n ChartType,\n ChartDefinitionSchema,\n type ChartDefinition,\n type ChartSeriesDefinition,\n type ChartAccessControl,\n type ChartInputDefinition,\n type ChartSplitConfig,\n type ChartSeriesStyle,\n type ChartAppearance,\n type ChartTypeConfig,\n} from '../config/frontend/chart-definition.shared.schemas';\nimport {\n AggregateFunction,\n TimeGranularity,\n ComparisonOperator,\n ContextFilterSource,\n SortDirection,\n DimensionSortBy,\n JoinType,\n WindowFunctionType,\n} from './aggregation.shared.definitions';\nimport type {\n Measure,\n Dimension,\n ContextFilter,\n ResourceJoin,\n HavingClause,\n ComputedMeasure,\n WindowFunction,\n AggregationQuery,\n} from './aggregation-query.shared.schemas';\n\n// ── Builder Options Types ────────────────────────────────────\n\nexport interface MeasureOptions {\n label?: string;\n filter?: Record<string, unknown>;\n}\n\nexport interface DimensionOptions {\n label?: string;\n sort?: {\n direction?: SortDirection;\n by?: 'self' | 'measure';\n measureRef?: string;\n };\n topN?: number;\n groupOther?: boolean;\n}\n\nexport interface TimeDimensionOptions extends DimensionOptions {\n fillMissingBuckets?: boolean;\n dateRange?: { from?: string; to?: string };\n}\n\nexport interface SeriesOptions {\n chartType?: ChartType;\n yAxisIndex?: number;\n style?: Partial<ChartSeriesStyle>;\n hidden?: boolean;\n}\n\nexport interface JoinOptions {\n selectFields?: string[];\n joinType?: JoinType;\n}\n\nexport interface WindowFunctionOptions {\n label?: string;\n windowSize?: number;\n partitionBy?: string;\n orderBy?: string;\n}\n\n// ── Builder Class ────────────────────────────────────────────\n\nexport class ChartDefinitionBuilder {\n private _chartType: ChartType = ChartType.BAR;\n private _dimensions: Dimension[] = [];\n private _measures: Measure[] = [];\n private _series: ChartSeriesDefinition[] = [];\n private _contextFilters: ContextFilter[] = [];\n private _joins: ResourceJoin[] = [];\n private _filters?: Record<string, unknown>;\n private _accessControl?: ChartAccessControl;\n private _refreshInterval?: number;\n private _timezone?: string;\n private _limit?: number;\n private _orderBy?: Array<{ ref: string; direction: SortDirection }>;\n private _splitByDimension?: string;\n private _splitConfig?: ChartSplitConfig;\n private _having: HavingClause[] = [];\n private _computedMeasures: ComputedMeasure[] = [];\n private _windowFunctions: WindowFunction[] = [];\n private _appearance?: ChartAppearance;\n private _chartTypeConfig?: ChartTypeConfig;\n private _i18n?: ChartDefinition['i18n'];\n private _inputs?: ChartInputDefinition[];\n\n constructor(\n private readonly _ref: string,\n private readonly _mainResourceType: string,\n ) {}\n\n // ── Chart type ──\n\n type(chartType: ChartType): this {\n this._chartType = chartType;\n return this;\n }\n\n // ── Dimensions ──\n\n dimension(field: string, options?: DimensionOptions): this {\n const ref = options?.label?.toLowerCase().replace(/\\s+/g, '_') || field;\n this._dimensions.push({\n ref,\n field,\n label: options?.label,\n sort: options?.sort ? {\n direction: options.sort.direction ?? SortDirection.ASC,\n by: options.sort.by === 'measure' ? DimensionSortBy.MEASURE : DimensionSortBy.SELF,\n measureRef: options.sort.measureRef,\n } : undefined,\n topN: options?.topN,\n groupOther: options?.groupOther,\n });\n return this;\n }\n\n timeDimension(field: string, granularity: TimeGranularity, options?: TimeDimensionOptions): this {\n const ref = options?.label?.toLowerCase().replace(/\\s+/g, '_') || field;\n this._dimensions.push({\n ref,\n field,\n label: options?.label,\n timeGranularity: granularity,\n fillMissingBuckets: options?.fillMissingBuckets ?? true, // default: true for time dimensions\n dateRange: options?.dateRange,\n sort: options?.sort ? {\n direction: options.sort.direction ?? SortDirection.ASC,\n by: options.sort.by === 'measure' ? DimensionSortBy.MEASURE : DimensionSortBy.SELF,\n measureRef: options.sort.measureRef,\n } : undefined,\n topN: options?.topN,\n groupOther: options?.groupOther,\n });\n return this;\n }\n\n // ── Measures (shorthands) ──\n\n count(options?: MeasureOptions): this {\n return this.measure('*', AggregateFunction.COUNT, {\n ...options,\n label: options?.label ?? 'Count',\n });\n }\n\n sum(field: string, options?: MeasureOptions): this {\n return this.measure(field, AggregateFunction.SUM, options);\n }\n\n avg(field: string, options?: MeasureOptions): this {\n return this.measure(field, AggregateFunction.AVG, options);\n }\n\n min(field: string, options?: MeasureOptions): this {\n return this.measure(field, AggregateFunction.MIN, options);\n }\n\n max(field: string, options?: MeasureOptions): this {\n return this.measure(field, AggregateFunction.MAX, options);\n }\n\n measure(field: string, aggregate: AggregateFunction, options?: MeasureOptions): this {\n const ref = field === '*' ? `*_${aggregate}` : `${field}_${aggregate}`;\n this._measures.push({\n ref,\n field,\n aggregate,\n label: options?.label,\n filter: options?.filter,\n });\n return this;\n }\n\n // ── Series (explicit) ──\n\n series(ref: string, name: string, measureRef: string, options?: SeriesOptions): this {\n const series: ChartSeriesDefinition = {\n ref,\n name,\n measureRef,\n chartType: options?.chartType,\n yAxisIndex: options?.yAxisIndex,\n hidden: options?.hidden,\n style: options?.style ? { ...options.style } : undefined,\n };\n this._series.push(series);\n return this;\n }\n\n // ── Split by dimension ──\n\n splitBy(dimensionRef: string, config?: ChartSplitConfig): this {\n this._splitByDimension = dimensionRef;\n this._splitConfig = config;\n return this;\n }\n\n // ── Access control ──\n\n accessControl(config: ChartAccessControl): this {\n this._accessControl = config;\n return this;\n }\n\n // ── Filters ──\n\n contextFilter(field: string, source: ContextFilterSource, options?: { operator?: ComparisonOperator; sourceField?: string }): this {\n this._contextFilters.push({\n field,\n operator: options?.operator ?? ComparisonOperator.EQ,\n source,\n sourceField: options?.sourceField,\n });\n return this;\n }\n\n filter(filters: Record<string, unknown>): this {\n this._filters = filters;\n return this;\n }\n\n // ── Computed measures (post-aggregation) ──\n\n /**\n * Add a computed measure that evaluates an expression using other measure refs as variables.\n *\n * @param ref - Unique ref for this computed measure\n * @param expression - Safe expression using measure refs (e.g., \"completed / total * 100\")\n * @param dependsOn - Measure refs referenced in the expression\n * @param label - Optional display label\n *\n * @example\n * ```ts\n * .count({ label: 'Total' }) // ref: \"*_count\"\n * .measure('status', AggregateFunction.COUNT, { // ref: \"status_count\"\n * label: 'Completed',\n * filter: { status: 'completed' }\n * })\n * .computedMeasure('completion_rate', 'round(status_count / *_count * 100, 1)', ['status_count', '*_count'])\n * ```\n */\n computedMeasure(ref: string, expression: string, dependsOn: string[], label?: string): this {\n this._computedMeasures.push({\n ref,\n expression,\n dependsOn,\n label,\n });\n return this;\n }\n\n // ── Window functions (post-aggregation transforms) ──\n\n /**\n * Generic window function.\n */\n windowFunction(ref: string, sourceRef: string, type: WindowFunctionType, options?: WindowFunctionOptions): this {\n this._windowFunctions.push({\n ref,\n sourceRef,\n type,\n label: options?.label,\n windowSize: options?.windowSize,\n partitionBy: options?.partitionBy,\n orderBy: options?.orderBy,\n });\n return this;\n }\n\n /**\n * Shorthand: running total (cumulative sum).\n */\n runningTotal(ref: string, sourceRef: string, options?: Omit<WindowFunctionOptions, 'windowSize'>): this {\n return this.windowFunction(ref, sourceRef, WindowFunctionType.RUNNING_TOTAL, options);\n }\n\n /**\n * Shorthand: percent change from previous row.\n */\n percentChange(ref: string, sourceRef: string, options?: Omit<WindowFunctionOptions, 'windowSize'>): this {\n return this.windowFunction(ref, sourceRef, WindowFunctionType.PERCENT_CHANGE, options);\n }\n\n /**\n * Shorthand: moving average over a window of N rows.\n *\n * @param windowSize - Number of rows in the moving window (default: 3)\n */\n movingAvg(ref: string, sourceRef: string, windowSize?: number, options?: Omit<WindowFunctionOptions, 'windowSize'>): this {\n return this.windowFunction(ref, sourceRef, WindowFunctionType.MOVING_AVG, {\n ...options,\n windowSize: windowSize ?? 3,\n });\n }\n\n /**\n * Shorthand: percent of total (value / sum * 100).\n */\n percentOfTotal(ref: string, sourceRef: string, options?: Omit<WindowFunctionOptions, 'windowSize'>): this {\n return this.windowFunction(ref, sourceRef, WindowFunctionType.PERCENT_OF_TOTAL, options);\n }\n\n /**\n * Shorthand: difference from previous row.\n */\n difference(ref: string, sourceRef: string, options?: Omit<WindowFunctionOptions, 'windowSize'>): this {\n return this.windowFunction(ref, sourceRef, WindowFunctionType.DIFFERENCE, options);\n }\n\n // ── Cross-resource joins ──\n\n join(resourceType: string, fkField: string, alias: string, options?: JoinOptions): this {\n this._joins.push({\n resourceType,\n foreignKeyField: fkField,\n alias,\n selectFields: options?.selectFields,\n joinType: options?.joinType ?? JoinType.LEFT,\n });\n return this;\n }\n\n // ── HAVING (filter on aggregated values) ──\n\n /**\n * Add a HAVING clause to filter on aggregated measure values.\n *\n * @param measureRef - Ref of the measure to filter on\n * @param operator - Comparison operator (GT, GTE, LT, LTE, EQ, NEQ)\n * @param value - Numeric value to compare against\n *\n * @example\n * ```ts\n * .count()\n * .having('*_COUNT', ComparisonOperator.GT, 10) // Only groups with count > 10\n * ```\n */\n having(measureRef: string, operator: ComparisonOperator, value: number): this {\n this._having.push({ measureRef, operator, value });\n return this;\n }\n\n // ── Binned dimension shorthand ──\n\n /**\n * Add a numeric dimension with binning (step-based or boundary-based).\n *\n * @example\n * ```ts\n * // Step-based: 0-10, 10-20, 20-30, ...\n * .binDimension('age', { step: 10 })\n *\n * // Boundary-based: <0, 0-50, 50-100, 100-500, ≥500\n * .binDimension('price', { boundaries: [0, 50, 100, 500] })\n * ```\n */\n binDimension(field: string, bin: { step: number } | { boundaries: number[] }, options?: DimensionOptions): this {\n const ref = options?.label?.toLowerCase().replace(/\\s+/g, '_') || field;\n this._dimensions.push({\n ref,\n field,\n label: options?.label,\n bin,\n sort: options?.sort ? {\n direction: options.sort.direction ?? SortDirection.ASC,\n by: options.sort.by === 'measure' ? DimensionSortBy.MEASURE : DimensionSortBy.SELF,\n measureRef: options.sort.measureRef,\n } : undefined,\n topN: options?.topN,\n groupOther: options?.groupOther,\n });\n return this;\n }\n\n // ── Result shaping ──\n\n timezone(tz: string): this {\n this._timezone = tz;\n return this;\n }\n\n refreshInterval(ms: number): this {\n this._refreshInterval = ms;\n return this;\n }\n\n limitResults(n: number): this {\n this._limit = n;\n return this;\n }\n\n orderBy(ref: string, direction: SortDirection = SortDirection.ASC): this {\n if (!this._orderBy) this._orderBy = [];\n this._orderBy.push({ ref, direction });\n return this;\n }\n\n // ── Appearance & type config ──\n\n appearance(config: ChartAppearance): this {\n this._appearance = config;\n return this;\n }\n\n chartTypeConfig(config: ChartTypeConfig): this {\n this._chartTypeConfig = config;\n return this;\n }\n\n /**\n * Declare an explicit runtime input for this chart.\n *\n * Inputs replace raw caller-provided filter fragments with an authored\n * contract that can only bind into approved query seams.\n */\n input(definition: ChartInputDefinition): this {\n if (!this._inputs) {\n this._inputs = [];\n }\n\n this._inputs.push(definition);\n return this;\n }\n\n /**\n * Set i18n labelling keys for chart-level text (title, axes, tooltips, split values).\n * When resolved at render time, these keys replace hardcoded text with translated strings.\n */\n i18n(config: NonNullable<ChartDefinition['i18n']>): this {\n this._i18n = config;\n return this;\n }\n\n // ── Build ──\n\n build(): ChartDefinition {\n // Validate computed measure dependsOn refs against actual measure refs\n if (this._computedMeasures.length > 0) {\n const measureRefs = new Set(this._measures.map(m => m.ref));\n // Also include other computed measure refs (for chained computations)\n const computedRefs = new Set(this._computedMeasures.map(cm => cm.ref));\n\n for (const cm of this._computedMeasures) {\n for (const dep of cm.dependsOn) {\n // Guard: a computed measure cannot reference itself\n if (dep === cm.ref) {\n throw new Error(\n `ChartDefinitionBuilder: computed measure '${cm.ref}' references itself in dependsOn. ` +\n `Self-referencing computed measures are not supported.`,\n );\n }\n if (!measureRefs.has(dep) && !computedRefs.has(dep)) {\n throw new Error(\n `ChartDefinitionBuilder: computed measure '${cm.ref}' depends on '${dep}', ` +\n `but no measure or computed measure with that ref exists. ` +\n `Available measure refs: [${[...measureRefs].join(', ')}]`,\n );\n }\n }\n }\n }\n\n // Auto-generate series from measures if none were explicitly defined\n const series = this._series.length > 0\n ? this._series\n : this._autoGenerateSeries();\n\n // Apply splitByDimension to auto-generated series\n const finalSeries = series.map(s => ({\n ...s,\n splitByDimension: s.splitByDimension ?? this._splitByDimension,\n splitConfig: s.splitConfig ?? this._splitConfig,\n }));\n\n const dataQuery: AggregationQuery = {\n mainResourceType: this._mainResourceType,\n dimensions: this._dimensions,\n measures: this._measures,\n filters: this._filters,\n contextFilters: this._contextFilters.length > 0 ? this._contextFilters : undefined,\n computedMeasures: this._computedMeasures.length > 0 ? this._computedMeasures : undefined,\n windowFunctions: this._windowFunctions.length > 0 ? this._windowFunctions : undefined,\n joins: this._joins.length > 0 ? this._joins : undefined,\n having: this._having.length > 0 ? this._having : undefined,\n timezone: this._timezone,\n limit: this._limit,\n orderBy: this._orderBy,\n };\n\n const definition: Record<string, unknown> = {\n ref: this._ref,\n chartType: this._chartType,\n dataQuery,\n series: finalSeries,\n inputs: this._inputs,\n accessControl: this._accessControl,\n refreshInterval: this._refreshInterval,\n appearance: this._appearance,\n chartTypeConfig: this._chartTypeConfig,\n i18n: this._i18n,\n };\n\n const parsed = ChartDefinitionSchema.parse(definition);\n return parsed as ChartDefinition;\n }\n\n // ── Private helpers ──\n\n private _autoGenerateSeries(): ChartSeriesDefinition[] {\n return this._measures.map(measure => ({\n ref: `${measure.ref}_series`,\n name: measure.label || measure.ref,\n measureRef: measure.ref,\n }));\n }\n}\n\n// ── Factory function ─────────────────────────────────────────\n\n/**\n * Create a ChartDefinitionBuilder.\n *\n * @param ref - Unique chart reference used for registry lookup and the backend data endpoint `/charts/:chartRef/data`\n * @param mainResourceType - Primary resource type for the data query\n *\n * @example\n * ```ts\n * const chart = chartBuilder('orders-per-month', 'ORDERS')\n * .type(ChartType.BAR)\n * .timeDimension('createdAt', TimeGranularity.MONTH)\n * .count()\n * .build();\n * ```\n */\nexport function chartBuilder(ref: string, mainResourceType: string): ChartDefinitionBuilder {\n return new ChartDefinitionBuilder(ref, mainResourceType);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-placement.shared.definitions.d.ts","sourceRoot":"","sources":["../../../../src/companion/artifact-placement.shared.definitions.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,aAAa,kBAAkB;IAC/B,MAAM,WAAW;IACjB,aAAa,kBAAkB;CAChC;AAED,MAAM,WAAW,+BAA+B;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oCAAoC;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,sBAAsB,CAAC;IACtC,WAAW,EAAE,+BAA+B,CAAC;CAC9C;AAED,MAAM,WAAW,oCACf,SAAQ,oCAAoC;IAC5C,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,yCACf,SAAQ,oCAAoC;IAC5C,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB"}
1
+ {"version":3,"file":"artifact-placement.shared.definitions.d.ts","sourceRoot":"","sources":["../../../src/companion/artifact-placement.shared.definitions.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,aAAa,kBAAkB;IAC/B,MAAM,WAAW;IACjB,aAAa,kBAAkB;CAChC;AAED,MAAM,WAAW,+BAA+B;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oCAAoC;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,sBAAsB,CAAC;IACtC,WAAW,EAAE,+BAA+B,CAAC;CAC9C;AAED,MAAM,WAAW,oCACf,SAAQ,oCAAoC;IAC5C,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,yCACf,SAAQ,oCAAoC;IAC5C,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-placement.shared.definitions.js","sourceRoot":"","sources":["../../../../src/companion/artifact-placement.shared.definitions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,yDAA+B,CAAA;IAC/B,2CAAiB,CAAA;IACjB,yDAA+B,CAAA;AACjC,CAAC,EAJW,sBAAsB,KAAtB,sBAAsB,QAIjC","sourcesContent":["export enum CompanionArtifactClass {\n DOMAIN_MODULE = 'domain-module',\n ENGINE = 'engine',\n FRONTEND_ONLY = 'frontend-only',\n}\n\nexport interface CompanionArtifactPlacementRoots {\n shared?: string;\n backend?: string;\n frontend?: string;\n}\n\n/**\n * Tooling-facing ownership descriptor for generated artifacts such as\n * translations or email label files.\n *\n * `ownerId` is intentionally broader than `moduleId`: some generated artifacts\n * belong to engine/frontend-only buckets that are not business\n * modules, but still need a stable owner identity and placement contract.\n */\nexport interface CompanionArtifactPlacementDescriptor {\n ownerId: string;\n artifactClass: CompanionArtifactClass;\n rootsByRole: CompanionArtifactPlacementRoots;\n}\n\nexport interface CompanionResourceOwnershipDescriptor\n extends CompanionArtifactPlacementDescriptor {\n resourceTypes: string[];\n}\n\nexport interface CompanionEmailTemplateOwnershipDescriptor\n extends CompanionArtifactPlacementDescriptor {\n templateRefs: string[];\n}\n"]}
1
+ {"version":3,"file":"artifact-placement.shared.definitions.js","sourceRoot":"","sources":["../../../src/companion/artifact-placement.shared.definitions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,yDAA+B,CAAA;IAC/B,2CAAiB,CAAA;IACjB,yDAA+B,CAAA;AACjC,CAAC,EAJW,sBAAsB,KAAtB,sBAAsB,QAIjC","sourcesContent":["export enum CompanionArtifactClass {\n DOMAIN_MODULE = 'domain-module',\n ENGINE = 'engine',\n FRONTEND_ONLY = 'frontend-only',\n}\n\nexport interface CompanionArtifactPlacementRoots {\n shared?: string;\n backend?: string;\n frontend?: string;\n}\n\n/**\n * Tooling-facing ownership descriptor for generated artifacts such as\n * translations or email label files.\n *\n * `ownerId` is intentionally broader than `moduleId`: some generated artifacts\n * belong to engine/frontend-only buckets that are not business\n * modules, but still need a stable owner identity and placement contract.\n */\nexport interface CompanionArtifactPlacementDescriptor {\n ownerId: string;\n artifactClass: CompanionArtifactClass;\n rootsByRole: CompanionArtifactPlacementRoots;\n}\n\nexport interface CompanionResourceOwnershipDescriptor\n extends CompanionArtifactPlacementDescriptor {\n resourceTypes: string[];\n}\n\nexport interface CompanionEmailTemplateOwnershipDescriptor\n extends CompanionArtifactPlacementDescriptor {\n templateRefs: string[];\n}\n"]}