@wildo-ai/saas-models 1.1.5 → 1.1.6

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 (888) hide show
  1. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  2. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +2 -1
  3. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  4. package/dist/esm/applications/applications-context.schemas.d.ts +176 -2
  5. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  7. package/dist/esm/applications/applications.shared.resources-config.schemas.js +3 -2
  8. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  9. package/dist/esm/applications/applications.shared.schemas.d.ts +7 -5
  10. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  11. package/dist/esm/applications/applications.shared.schemas.js +6 -4
  12. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  13. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +10 -1
  14. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  15. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +49 -15
  16. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  17. package/dist/esm/billing/billing-account.shared.schemas.js +2 -2
  18. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
  19. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +25 -0
  20. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  21. package/dist/esm/billing/billing-configuration.shared.schemas.js +19 -0
  22. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  23. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +27 -5
  24. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/billing-enums.shared.schemas.js +30 -4
  26. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/billing-types.shared.schemas.d.ts +37 -11
  28. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  29. package/dist/esm/billing/billing-types.shared.schemas.js +31 -19
  30. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  31. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts +2 -0
  32. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  33. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js +18 -7
  34. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
  35. package/dist/esm/billing/credit-pool.shared.schemas.d.ts +2 -0
  36. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  37. package/dist/esm/billing/credit-pool.shared.schemas.js +7 -1
  38. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
  39. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js +6 -6
  40. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
  41. package/dist/esm/billing/invoice-ref.shared.schemas.js +1 -1
  42. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
  43. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  44. package/dist/esm/billing/price.shared.schemas.js +5 -3
  45. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  46. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts +11 -1
  47. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  48. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +39 -23
  49. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  50. package/dist/esm/billing/product-definition.shared.schemas.d.ts +30 -2
  51. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  52. package/dist/esm/billing/product-definition.shared.schemas.js +35 -0
  53. package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
  54. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +6 -3
  55. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  56. package/dist/esm/billing/product.shared.schemas.d.ts +7 -3
  57. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  58. package/dist/esm/billing/product.shared.schemas.js +22 -7
  59. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  60. package/dist/esm/billing/promotions.shared.resources-config.schemas.js +8 -8
  61. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  62. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts +135 -0
  63. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -0
  64. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js +112 -0
  65. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -0
  66. package/dist/esm/billing/public-pricing-catalog.shared.d.ts +30 -0
  67. package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -0
  68. package/dist/esm/billing/public-pricing-catalog.shared.js +53 -0
  69. package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -0
  70. package/dist/esm/billing/referral-reward.shared.schemas.d.ts +51 -0
  71. package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -0
  72. package/dist/esm/billing/referral-reward.shared.schemas.js +92 -0
  73. package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -0
  74. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts +54 -33
  75. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  76. package/dist/esm/billing/referral.shared.resources-config.schemas.js +56 -2
  77. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  78. package/dist/esm/billing/referral.shared.schemas.d.ts +22 -37
  79. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  80. package/dist/esm/billing/referral.shared.schemas.js +24 -44
  81. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  82. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +9 -1
  83. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  84. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +55 -22
  85. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  86. package/dist/esm/billing/subscription.shared.schemas.d.ts +80 -5
  87. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  88. package/dist/esm/billing/subscription.shared.schemas.js +85 -25
  89. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  90. package/dist/esm/billing/usage-record.shared.schemas.js +5 -5
  91. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  92. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +143 -2
  93. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  94. package/dist/esm/companion/provider-discovery.shared.schemas.js +84 -1
  95. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  96. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +14 -1
  97. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  98. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +4 -0
  99. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  100. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts +70 -0
  101. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
  102. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js +87 -0
  103. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
  104. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts +34 -0
  105. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js +137 -3
  107. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -1
  108. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts +7 -0
  109. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  110. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -1
  111. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +28 -2
  112. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  113. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js +29 -8
  114. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
  115. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +29 -6
  116. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  117. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +38 -9
  118. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  119. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +1822 -146
  120. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  121. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +1777 -87
  122. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  123. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts +10 -0
  124. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  125. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +148 -7
  126. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  127. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +2 -0
  128. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  129. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js +2 -0
  130. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  131. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +0 -8
  132. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +0 -1
  133. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +0 -1
  134. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts +17 -8
  135. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
  136. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +43 -20
  137. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
  138. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts +38 -0
  139. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  140. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js +39 -0
  141. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
  142. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts +35 -0
  143. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -0
  144. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js +82 -0
  145. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -0
  146. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts +37 -0
  147. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -0
  148. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js +223 -0
  149. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -0
  150. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts +222 -0
  151. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -0
  152. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js +331 -0
  153. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -0
  154. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +37 -3
  155. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  156. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +33 -4
  157. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  158. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts +52 -0
  159. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -0
  160. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js +116 -0
  161. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -0
  162. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts +11 -0
  163. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -0
  164. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js +11 -0
  165. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -0
  166. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts +93 -0
  167. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -0
  168. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js +149 -0
  169. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -0
  170. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts +43 -0
  171. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -0
  172. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js +106 -0
  173. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -0
  174. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts +209 -0
  175. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -0
  176. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js +226 -0
  177. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -0
  178. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts +129 -5
  179. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  180. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js +128 -4
  181. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -1
  182. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts +53 -0
  183. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -0
  184. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js +74 -0
  185. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -0
  186. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts +311 -0
  187. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -0
  188. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js +355 -0
  189. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -0
  190. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +178 -39
  191. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  192. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +145 -35
  193. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  194. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  195. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js +26 -0
  196. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -1
  197. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts +9 -0
  198. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  199. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  200. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +109 -1
  201. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  202. package/dist/esm/config/app-configuration-shared.shared.schemas.js +57 -0
  203. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  204. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +69 -0
  205. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  206. package/dist/esm/config/entity-identity-config.shared.schemas.js +93 -0
  207. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  208. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +16 -16
  209. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +160 -61
  210. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  211. package/dist/esm/config/frontend/navigation.shared.schemas.js +297 -65
  212. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  213. package/dist/esm/errors/caught-error-description.shared.utils.d.ts +69 -0
  214. package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -0
  215. package/dist/esm/errors/caught-error-description.shared.utils.js +77 -0
  216. package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -0
  217. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +76 -3
  218. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  219. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +76 -2
  220. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  221. package/dist/esm/errors/errors.shared.schemas.d.ts +20 -1
  222. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  223. package/dist/esm/errors/errors.shared.schemas.js +16 -9
  224. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  225. package/dist/esm/errors/errors.shared.utils.d.ts +0 -24
  226. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  227. package/dist/esm/errors/errors.shared.utils.js +0 -39
  228. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  229. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts +6 -7
  230. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
  231. package/dist/esm/errors/thrown-value-description.shared.utils.js +6 -7
  232. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
  233. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts +70 -0
  234. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -0
  235. package/dist/esm/external-data/external-data-pipeline-description.shared.js +92 -0
  236. package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -0
  237. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts +154 -0
  238. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -0
  239. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js +161 -0
  240. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -0
  241. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +1071 -23
  242. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  243. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js +1065 -17
  244. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  245. package/dist/esm/external-data/external-data-provenance.shared.d.ts +71 -0
  246. package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -0
  247. package/dist/esm/external-data/external-data-provenance.shared.js +88 -0
  248. package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -0
  249. package/dist/esm/external-data.exports.d.ts +5 -0
  250. package/dist/esm/external-data.exports.d.ts.map +1 -1
  251. package/dist/esm/external-data.exports.js +11 -0
  252. package/dist/esm/external-data.exports.js.map +1 -1
  253. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +17 -2
  254. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  255. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +22 -4
  256. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  257. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  258. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +3 -0
  259. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  260. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -1
  261. package/dist/esm/external-providers/engine-capability-surface.shared.js +2 -0
  262. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
  263. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +152 -1
  264. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  265. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +4 -3
  266. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +4 -3
  268. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  269. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +45 -0
  270. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  271. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +14 -0
  272. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  273. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +188 -4
  274. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  275. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +76 -9
  276. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  277. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -33
  278. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  279. package/dist/esm/external-providers/frontend-provider-public-config.shared.js +247 -42
  280. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  281. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts +53 -0
  282. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -0
  283. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js +41 -0
  284. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -0
  285. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts +150 -0
  286. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -0
  287. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js +22 -0
  288. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -0
  289. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts +42 -0
  290. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -0
  291. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js +49 -0
  292. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -0
  293. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts +53 -0
  294. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
  295. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js +56 -0
  296. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
  297. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +34 -0
  298. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  299. package/dist/esm/external-providers/provider-capability.shared.schemas.js +34 -0
  300. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  301. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +341 -4
  302. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  303. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +270 -20
  304. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  305. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +6 -2
  306. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  307. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +6 -2
  308. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  309. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +174 -1
  310. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  311. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +125 -0
  312. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  313. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +3 -3
  314. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts +42 -0
  315. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -0
  316. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js +57 -0
  317. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -0
  318. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +6 -0
  319. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  320. package/dist/esm/external-providers/provider-protocol.shared.schemas.js +6 -0
  321. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  322. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts +58 -0
  323. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -0
  324. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js +35 -0
  325. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -0
  326. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts +115 -0
  327. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -0
  328. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js +137 -0
  329. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -0
  330. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts +73 -0
  331. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -0
  332. package/dist/esm/external-providers/provider-usage-cost.shared.js +171 -0
  333. package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -0
  334. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts +12 -0
  335. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -0
  336. package/dist/esm/external-providers/provider-usage-pricing.example.js +40 -0
  337. package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -0
  338. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts +68 -32
  339. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  340. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js +63 -52
  341. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
  342. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts +5 -5
  343. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  344. package/dist/esm/features/application-features.shared.resources-config.schemas.js +13 -5
  345. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  346. package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
  347. package/dist/esm/features/connected-feature.example.js +2 -1
  348. package/dist/esm/features/connected-feature.example.js.map +1 -1
  349. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  350. package/dist/esm/features/core-feature-definitions.shared.js +2 -1
  351. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  352. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  353. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  354. package/dist/esm/features/feature-definition.shared.schemas.d.ts +2 -11
  355. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  356. package/dist/esm/features/feature-definition.shared.schemas.js +0 -12
  357. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
  358. package/dist/esm/features/scope-features.shared.schemas.d.ts +31 -17
  359. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  360. package/dist/esm/features/scope-features.shared.schemas.js +27 -5
  361. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  362. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +5 -5
  363. package/dist/esm/flows-actors/actors.shared.schemas.d.ts +127 -11
  364. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  365. package/dist/esm/flows-actors/actors.shared.schemas.js +32 -1
  366. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  367. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +16 -0
  368. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  369. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js +7 -0
  370. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
  371. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts +68 -0
  372. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -0
  373. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js +276 -0
  374. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -0
  375. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts +468 -0
  376. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -0
  377. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js +472 -0
  378. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -0
  379. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts +118 -0
  380. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -0
  381. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js +144 -0
  382. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -0
  383. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +142 -8
  384. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  385. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +209 -11
  386. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  387. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +37 -2
  388. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  389. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +30 -2
  390. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  391. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts +0 -11
  392. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  393. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js +12 -5
  394. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  395. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts +45 -6
  396. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  397. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js +31 -5
  398. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  399. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +30 -30
  400. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  401. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +15 -7
  402. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  403. package/dist/esm/flows-actors/flows.shared.schemas.d.ts +15 -0
  404. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  405. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts +506 -0
  406. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
  407. package/dist/esm/flows-actors/human-decision.shared.schemas.js +502 -0
  408. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
  409. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts +46 -0
  410. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -0
  411. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js +65 -0
  412. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -0
  413. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts +120 -0
  414. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -0
  415. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js +165 -0
  416. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -0
  417. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts +45 -0
  418. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -0
  419. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js +127 -0
  420. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -0
  421. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts +83 -0
  422. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -0
  423. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js +97 -0
  424. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -0
  425. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts +136 -0
  426. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -0
  427. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js +90 -0
  428. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -0
  429. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts +5 -1
  430. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
  431. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js +19 -4
  432. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
  433. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts +13 -15
  434. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
  435. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js +30 -17
  436. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
  437. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts +268 -0
  438. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -0
  439. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js +576 -0
  440. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -0
  441. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +30 -0
  442. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  443. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts +129 -0
  444. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -0
  445. package/dist/esm/flows-actors/work-attribution.shared.schemas.js +141 -0
  446. package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -0
  447. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts +22 -1
  448. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
  449. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js +23 -0
  450. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
  451. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +61 -0
  452. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  453. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +61 -0
  454. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  455. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  456. package/dist/esm/guidance/guidance-state.shared.schemas.js +11 -10
  457. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  458. package/dist/esm/guidance/lifecycle-state.shared.schemas.js +6 -6
  459. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  460. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  461. package/dist/esm/guidance/progression-state.shared.schemas.js +8 -7
  462. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  463. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js +1 -1
  464. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  465. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +550 -30
  466. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  467. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +498 -34
  468. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  469. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts +62 -0
  470. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -0
  471. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js +66 -0
  472. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -0
  473. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts +133 -0
  474. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -0
  475. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js +191 -0
  476. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -0
  477. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +37 -6
  478. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
  479. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js +37 -6
  480. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
  481. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts +36 -0
  482. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -0
  483. package/dist/esm/i18n/application-config-vocabulary.shared.js +39 -0
  484. package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -0
  485. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts +11 -0
  486. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -0
  487. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js +14 -0
  488. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -0
  489. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts +20 -0
  490. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -0
  491. package/dist/esm/i18n/engine-open-vocabulary.shared.js +21 -0
  492. package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -0
  493. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts +94 -0
  494. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -0
  495. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js +206 -0
  496. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -0
  497. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts +169 -0
  498. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -0
  499. package/dist/esm/inbound/conversation-threads.shared.schemas.js +231 -0
  500. package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -0
  501. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts +195 -0
  502. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -0
  503. package/dist/esm/inbound/inbound-channels.shared.schemas.js +244 -0
  504. package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -0
  505. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts +36 -0
  506. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -0
  507. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js +169 -0
  508. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -0
  509. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts +404 -0
  510. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -0
  511. package/dist/esm/inbound/inbound-delivery.shared.schemas.js +449 -0
  512. package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -0
  513. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts +46 -0
  514. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -0
  515. package/dist/esm/inbound/inbound-endpoint-env.shared.js +57 -0
  516. package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -0
  517. package/dist/esm/index.d.ts +58 -1
  518. package/dist/esm/index.d.ts.map +1 -1
  519. package/dist/esm/index.js +67 -1
  520. package/dist/esm/index.js.map +1 -1
  521. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +28 -0
  522. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  523. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js +29 -0
  524. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  525. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +95 -1
  526. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
  527. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +121 -0
  528. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
  529. package/dist/esm/meta-workflows.exports.d.ts +0 -1
  530. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  531. package/dist/esm/meta-workflows.exports.js +0 -1
  532. package/dist/esm/meta-workflows.exports.js.map +1 -1
  533. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +7 -1
  534. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  535. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js +35 -0
  536. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  537. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts +131 -0
  538. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -0
  539. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js +258 -0
  540. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -0
  541. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts +448 -0
  542. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -0
  543. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js +530 -0
  544. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -0
  545. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  546. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js +4 -3
  547. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  548. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +16 -1
  549. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  550. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +46 -16
  551. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  552. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +19 -12
  553. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  554. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +77 -12
  555. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  556. package/dist/esm/notifications/notification-badges.schemas.d.ts +35 -3
  557. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  558. package/dist/esm/notifications/notification-badges.schemas.js +43 -3
  559. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  560. package/dist/esm/notifications/notifications.shared.schemas.d.ts +66 -399
  561. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  562. package/dist/esm/notifications/notifications.shared.schemas.js +111 -58
  563. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  564. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +5 -5
  565. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +6 -6
  566. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  567. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +3 -0
  568. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  569. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +60 -14
  570. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  571. package/dist/esm/organizations/organization-members.shared.schemas.d.ts +3 -0
  572. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  573. package/dist/esm/organizations/organization-members.shared.schemas.js +30 -0
  574. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  575. package/dist/esm/organizations/organization-notifications.shared.schemas.js +9 -9
  576. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  577. package/dist/esm/organizations/organization-preferences.shared.schemas.js +4 -4
  578. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  579. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts +0 -1
  580. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  581. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +5 -5
  582. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  583. package/dist/esm/organizations/organization-profile.shared.schemas.js +15 -10
  584. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  585. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js +1 -1
  586. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
  587. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  588. package/dist/esm/organizations/organization-unit-members.shared.schemas.js +2 -1
  589. package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
  590. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts +63 -1
  591. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  592. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js +106 -5
  593. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
  594. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  595. package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -0
  596. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  597. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  598. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +7 -2
  599. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  600. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +3 -1
  601. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  602. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +12 -8
  603. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  604. package/dist/esm/organizations/organizations.shared.schemas.d.ts +7 -2
  605. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  606. package/dist/esm/organizations/organizations.shared.schemas.js +51 -1
  607. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  608. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts +58 -0
  609. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -0
  610. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js +188 -0
  611. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -0
  612. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts +122 -0
  613. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -0
  614. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js +136 -0
  615. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -0
  616. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts +36 -0
  617. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -0
  618. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js +155 -0
  619. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -0
  620. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts +229 -0
  621. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -0
  622. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js +290 -0
  623. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -0
  624. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts +48 -0
  625. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -0
  626. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js +50 -0
  627. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -0
  628. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts +97 -0
  629. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -0
  630. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js +572 -0
  631. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -0
  632. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts +590 -0
  633. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -0
  634. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js +869 -0
  635. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -0
  636. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +36 -6
  637. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  638. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +57 -16
  639. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  640. package/dist/esm/provider-registration-runtime.exports.d.ts +0 -1
  641. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  642. package/dist/esm/provider-registration-runtime.exports.js +0 -1
  643. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  644. package/dist/esm/public-runtime/index.d.ts +30 -11
  645. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  646. package/dist/esm/public-runtime/index.js +30 -11
  647. package/dist/esm/public-runtime/index.js.map +1 -1
  648. package/dist/esm/queue/jobs.shared.schemas.d.ts +36 -8
  649. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  650. package/dist/esm/queue/jobs.shared.schemas.js +12 -0
  651. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  652. package/dist/esm/requests/header-keys.shared.d.ts +6 -0
  653. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  654. package/dist/esm/requests/header-keys.shared.js +7 -0
  655. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  656. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  657. package/dist/esm/requests/manual-controllers-routes-documentation.js +147 -8
  658. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  659. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +51 -23
  660. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  661. package/dist/esm/requests/manual-controllers-routes-urls.js +64 -0
  662. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  663. package/dist/esm/requests/websocket.shared.schemas.d.ts +78 -13
  664. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  665. package/dist/esm/requests/websocket.shared.schemas.js +91 -18
  666. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  667. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts +21 -0
  668. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -0
  669. package/dist/esm/resources/embedded-resource-mark.shared.utils.js +22 -0
  670. package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -0
  671. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  672. package/dist/esm/resources/resources-config.shared.factory.js +812 -32
  673. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  674. package/dist/esm/resources/resources-config.shared.schemas.d.ts +244 -48
  675. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  676. package/dist/esm/resources/resources-config.shared.schemas.js +151 -17
  677. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  678. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  679. package/dist/esm/resources/resources-registry.shared.core.definitions.js +353 -12
  680. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  681. package/dist/esm/resources/resources.shared.core.definitions.d.ts +45 -0
  682. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  683. package/dist/esm/resources/resources.shared.core.definitions.js +92 -0
  684. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  685. package/dist/esm/resources/resources.shared.schemas.d.ts +2 -17
  686. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  687. package/dist/esm/resources/resources.shared.schemas.js +24 -20
  688. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  689. package/dist/esm/resources/resources.shared.utils.d.ts +16 -8
  690. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  691. package/dist/esm/resources/resources.shared.utils.js +16 -8
  692. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  693. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts +2 -2
  694. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  695. package/dist/esm/resources/utils/collection-export.shared.utils.js +4 -2
  696. package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
  697. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts +103 -0
  698. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -0
  699. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js +275 -0
  700. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -0
  701. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts +51 -0
  702. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -0
  703. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js +28 -0
  704. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -0
  705. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
  706. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js +30 -19
  707. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
  708. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts +2 -0
  709. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -0
  710. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js +33 -0
  711. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -0
  712. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts +15 -0
  713. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  714. package/dist/esm/resources/utils/resource-polymorphism.factory.js +6 -1
  715. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
  716. package/dist/esm/resources/utils/resource-polymorphism.schemas.js +30 -4
  717. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
  718. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +46 -0
  719. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  720. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +205 -22
  721. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  722. package/dist/esm/resources/utils/resources-serialization.utils.d.ts +19 -2
  723. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  724. package/dist/esm/resources/utils/resources-serialization.utils.js +4 -0
  725. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
  726. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  727. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +15 -9
  728. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  729. package/dist/esm/resources/work-unit.shared.schemas.d.ts +20 -0
  730. package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -0
  731. package/dist/esm/resources/work-unit.shared.schemas.js +19 -0
  732. package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -0
  733. package/dist/esm/runtime/execution-context.shared.schemas.d.ts +48 -1
  734. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  735. package/dist/esm/runtime/execution-context.shared.schemas.js +101 -9
  736. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
  737. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
  738. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  739. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +37 -20
  740. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  741. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
  742. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  743. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +61 -48
  744. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  745. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts +26 -0
  746. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  747. package/dist/esm/security/api-keys/api-keys.shared.schemas.js +39 -5
  748. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
  749. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +5 -3
  750. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  751. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +6 -0
  752. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  753. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +2 -2
  754. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  755. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts +11 -0
  756. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  757. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js +19 -8
  758. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  759. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +1 -1
  760. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +5 -5
  761. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  762. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js +11 -11
  763. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  764. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts +2 -0
  765. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  766. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js +9 -0
  767. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
  768. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts +169 -0
  769. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -0
  770. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js +162 -0
  771. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -0
  772. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  773. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js +10 -8
  774. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  775. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +8 -8
  776. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  777. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  778. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +17 -16
  779. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  780. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  781. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +28 -25
  782. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  783. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts +17 -6
  784. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  785. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js +90 -38
  786. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  787. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +0 -24
  788. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  789. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +79 -68
  790. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  791. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +8 -1
  792. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  793. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +7 -0
  794. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  795. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +1 -1
  796. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  797. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +7 -7
  798. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  799. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  800. package/dist/esm/security/authorizations/roles.shared.defaults.js +56 -0
  801. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  802. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +77 -1
  803. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  804. package/dist/esm/security/authorizations/roles.shared.schemas.js +90 -0
  805. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  806. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts +86 -0
  807. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -0
  808. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js +40 -0
  809. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -0
  810. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +2 -1
  811. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  812. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +2 -1
  813. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  814. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +2 -1
  815. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  816. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +2 -1
  817. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  818. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +46 -14
  819. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  820. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +81 -21
  821. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  822. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts +69 -0
  823. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -0
  824. package/dist/esm/security/credential-rotation-grace.shared.utils.js +77 -0
  825. package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -0
  826. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  827. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +28 -8
  828. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  829. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +3 -1
  830. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  831. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +89 -14
  832. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  833. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +1 -0
  834. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  835. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +25 -4
  836. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  837. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts +7 -1
  838. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
  839. package/dist/esm/security/outbound-target-control.shared.schemas.js +6 -0
  840. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
  841. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts +143 -0
  842. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -0
  843. package/dist/esm/security/submission-challenge/submission-challenge.shared.js +123 -0
  844. package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -0
  845. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts +384 -0
  846. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -0
  847. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js +327 -0
  848. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -0
  849. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts +121 -8
  850. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
  851. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js +83 -4
  852. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
  853. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts +266 -8
  854. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
  855. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js +291 -7
  856. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
  857. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts +313 -3
  858. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
  859. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js +369 -3
  860. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
  861. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
  862. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js +2 -1
  863. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
  864. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +5 -3
  865. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  866. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js +19 -10
  867. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  868. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  869. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +6 -0
  870. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  871. package/dist/esm/users/user-preferences-reset.shared.utils.js +2 -2
  872. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  873. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +0 -3
  874. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  875. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +0 -3
  876. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  877. package/dist/esm/users/user-self.shared.resources-config.schemas.js +1 -1
  878. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  879. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  880. package/dist/esm/users/users.shared.resources-config.schemas.js +82 -20
  881. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  882. package/dist/esm/users/users.shared.schemas.d.ts +12 -9
  883. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  884. package/dist/esm/users/users.shared.schemas.js +49 -18
  885. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  886. package/package.json +4 -4
  887. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js +0 -7
  888. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -20,6 +20,8 @@
20
20
  import { z } from 'zod';
21
21
  import { ResourcePrimaryScope } from '../resources/resources.shared.schemas';
22
22
  import { ProductType, PricingModel, BillingInterval, UsageAggregationType, TaxDisplayMode } from './billing-enums.shared.schemas';
23
+ import { ProductPriceDisclosure, ProductAvailability } from './public-pricing-catalog.shared.atoms';
24
+ import { type ProductBehaviorPolicyInput } from './product-behavior-policy.shared.schemas';
23
25
  /**
24
26
  * Inline price definition for product catalog configuration.
25
27
  * Maps to a separate Price DB record when synced.
@@ -50,7 +52,7 @@ export declare const ProductDefinitionSchema: z.ZodObject<{
50
52
  targetScopes: z.ZodArray<z.ZodEnum<typeof ResourcePrimaryScope>>;
51
53
  grantedFeatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
54
  grantedLimits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
53
- value: z.ZodNumber;
55
+ value: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodNumber>;
54
56
  mode: z.ZodDefault<z.ZodEnum<typeof import("./billing-enums.shared.schemas").LimitGrantMode>>;
55
57
  }, z.core.$strip>>>;
56
58
  prices: z.ZodArray<z.ZodObject<{
@@ -106,6 +108,32 @@ export declare const ProductDefinitionSchema: z.ZodObject<{
106
108
  }, z.core.$strip>>;
107
109
  sortOrder: z.ZodOptional<z.ZodNumber>;
108
110
  isPublic: z.ZodOptional<z.ZodBoolean>;
111
+ isRecommended: z.ZodOptional<z.ZodBoolean>;
112
+ priceDisclosure: z.ZodOptional<z.ZodEnum<typeof ProductPriceDisclosure>>;
113
+ availability: z.ZodOptional<z.ZodEnum<typeof ProductAvailability>>;
109
114
  }, z.core.$strip>;
110
- export type ProductDefinition = z.infer<typeof ProductDefinitionSchema>;
115
+ /**
116
+ * A product as an application authors it. Its `behaviorPolicy` is the policy's INPUT type, so a field the policy
117
+ * defaults may be omitted; the catalog sync parses it onto the persisted `Product`, where the defaults materialize.
118
+ * An interface rather than an intersection alias, so declaration emit keeps the name.
119
+ */
120
+ export interface ProductDefinition extends Omit<z.infer<typeof ProductDefinitionSchema>, 'behaviorPolicy'> {
121
+ behaviorPolicy?: ProductBehaviorPolicyInput;
122
+ }
123
+ /** The three pricing-surface facts of a product, with every omission resolved. */
124
+ export interface ProductPricingSurfaceFacts {
125
+ readonly isRecommended: boolean;
126
+ readonly priceDisclosure: ProductPriceDisclosure;
127
+ readonly availability: ProductAvailability;
128
+ }
129
+ /**
130
+ * Resolve a definition's pricing-surface facts, applying the defaults the persisted `Product`
131
+ * resource declares.
132
+ *
133
+ * ONE place for the fallbacks, because two readers need them and must agree: the catalogue sync,
134
+ * which must WRITE the default rather than leave a field out (an update ignores an absent field, so
135
+ * a definition that stops recommending a plan would otherwise leave it recommended forever), and a
136
+ * website build, which reads the definitions directly and never sees a persisted row.
137
+ */
138
+ export declare function resolveProductPricingSurfaceFacts(definition: Pick<ProductDefinition, 'isRecommended' | 'priceDisclosure' | 'availability'>): ProductPricingSurfaceFacts;
111
139
  //# sourceMappingURL=product-definition.shared.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-definition.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/billing/product-definition.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,cAAc,EACf,MAAM,gCAAgC,CAAC;AAMxC;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;iBAuBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIpE;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2ElC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"product-definition.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/billing/product-definition.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACpG,OAAO,EAAiD,KAAK,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAK1I;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;iBAuBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIpE;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+FlC,CAAC;AAEH;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;IACxG,cAAc,CAAC,EAAE,0BAA0B,CAAC;CAC7C;AAED,kFAAkF;AAClF,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,sBAAsB,CAAC;IACjD,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,IAAI,CAAC,iBAAiB,EAAE,eAAe,GAAG,iBAAiB,GAAG,cAAc,CAAC,GAAG,0BAA0B,CAMvK"}
@@ -21,6 +21,7 @@ import { z } from 'zod';
21
21
  import { z_money, CurrencyAllowed } from '@wildo-ai/zod-decorators';
22
22
  import { ResourcePrimaryScope } from '../resources/resources.shared.schemas.js';
23
23
  import { ProductType, PricingModel, BillingInterval, UsageAggregationType, TaxDisplayMode, } from './billing-enums.shared.schemas.js';
24
+ import { ProductPriceDisclosure, ProductAvailability } from './public-pricing-catalog.shared.atoms.js';
24
25
  import { LimitGrantSchema, ProductBehaviorPolicySchema } from './product-behavior-policy.shared.schemas.js';
25
26
  import { PriceTierSchema } from './price.shared.schemas.js';
26
27
  // ── Price Definition (inline in product config) ────────────────────
@@ -123,5 +124,39 @@ export const ProductDefinitionSchema = z.object({
123
124
  * straight off a `ProductDefinition` must apply the same fallback the resource does.
124
125
  */
125
126
  isPublic: z.boolean().optional(),
127
+ // ── Pricing-surface facts ──
128
+ //
129
+ // What a pricing page needs beyond the price itself, stated here so every surface that lists the
130
+ // catalogue — the application's own pricing table and its public website — reads one answer
131
+ // instead of keeping its own list (#1835). All three are optional for the reason `isPublic`
132
+ // gives: the persisted `Product` resource carries the defaults.
133
+ /**
134
+ * The plan this application recommends to the audience it is designed for, emphasised on a
135
+ * pricing surface. Omitted = not recommended.
136
+ *
137
+ * A RECOMMENDATION, not a popularity claim: nothing here measures what customers chose, so no
138
+ * surface may word it as "most popular". Recommend at most one plan per scope a surface lists.
139
+ */
140
+ isRecommended: z.boolean().optional(),
141
+ /** How much of this product's price a pricing surface may state. Omitted = `LISTED`. */
142
+ priceDisclosure: z.enum(ProductPriceDisclosure).optional(),
143
+ /** Whether this product can be bought today. Omitted = `AVAILABLE`. */
144
+ availability: z.enum(ProductAvailability).optional(),
126
145
  });
146
+ /**
147
+ * Resolve a definition's pricing-surface facts, applying the defaults the persisted `Product`
148
+ * resource declares.
149
+ *
150
+ * ONE place for the fallbacks, because two readers need them and must agree: the catalogue sync,
151
+ * which must WRITE the default rather than leave a field out (an update ignores an absent field, so
152
+ * a definition that stops recommending a plan would otherwise leave it recommended forever), and a
153
+ * website build, which reads the definitions directly and never sees a persisted row.
154
+ */
155
+ export function resolveProductPricingSurfaceFacts(definition) {
156
+ return {
157
+ isRecommended: definition.isRecommended ?? false,
158
+ priceDisclosure: definition.priceDisclosure ?? ProductPriceDisclosure.LISTED,
159
+ availability: definition.availability ?? ProductAvailability.AVAILABLE,
160
+ };
161
+ }
127
162
  //# sourceMappingURL=product-definition.shared.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-definition.shared.schemas.js","sourceRoot":"","sources":["../../../../src/billing/product-definition.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAA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E,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACpD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC5C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACrC,CAAC,CAAC,QAAQ,EAAE;IAEb;;OAEG;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC","sourcesContent":["/**\n * Product Definition Schema (Shared)\n *\n * The bridge between what developers write in the product catalog config\n * and the DB-level Product + Price schemas.\n *\n * Unlike ProductSchema (the DB record), ProductDefinition:\n * - Has prices INLINE (not separate records)\n * - Has no _id, providerProductId, or DB timestamps\n * - Uses `key` as the unique identifier (maps to Product.key in DB)\n *\n * ProductCatalogSyncBackendService.ensureProductSynced(key):\n * 1. Look up ProductDefinition from catalog config by key\n * 2. Upsert Product DB record (key → _id mapping)\n * 3. Upsert Price DB records for each inline price\n * 4. On first provider use: sync to billing provider (fill providerProductId/providerPriceId)\n *\n * @see billing-and-features-system.md §6.2b (Product Definition)\n */\n\nimport { z } from 'zod';\nimport { z_money, CurrencyAllowed } from '@wildo-ai/zod-decorators';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport {\n ProductType,\n PricingModel,\n BillingInterval,\n UsageAggregationType,\n TaxDisplayMode,\n} from './billing-enums.shared.schemas';\nimport { LimitGrantSchema, ProductBehaviorPolicySchema } from './product-behavior-policy.shared.schemas';\nimport { PriceTierSchema } from './price.shared.schemas';\n\n// ── Price Definition (inline in product config) ────────────────────\n\n/**\n * Inline price definition for product catalog configuration.\n * Maps to a separate Price DB record when synced.\n */\nexport const PriceDefinitionSchema = z.object({\n /** Pricing model (flat, per_unit, tiered, graduated, package) */\n model: z.enum(PricingModel),\n /**\n * Unit price for FLAT/PER_UNIT models.\n * Uses z_money for consistent monetary representation across the billing system.\n * Undefined for TIERED/GRADUATED models (use `tiers` instead).\n */\n unitPrice: z_money({ currenciesAllowed: [CurrencyAllowed.FIAT], minAmount: 0n }),\n /** Billing interval (undefined = one-time) */\n interval: z.enum(BillingInterval).optional(),\n /** Interval count (e.g., 3 for quarterly = interval:'month', intervalCount:3) */\n intervalCount: z.number().min(1).default(1),\n /** Tiers for TIERED/GRADUATED pricing models */\n tiers: z.array(PriceTierSchema).optional(),\n /** Package size for PACKAGE pricing model */\n packageSize: z.number().min(1).optional(),\n /** Usage aggregation for metered prices */\n usageAggregation: z.enum(UsageAggregationType).optional(),\n /** Per-price tax behavior override */\n taxBehavior: z.enum(TaxDisplayMode).optional(),\n /** Whether this is the default price */\n isDefault: z.boolean().default(true),\n});\n\nexport type PriceDefinition = z.infer<typeof PriceDefinitionSchema>;\n\n// ── Product Definition (what developers write) ─────────────────────\n\n/**\n * ProductDefinition: what custom app developers write in their product catalog config.\n * This is the declarative product definition that lives in shared-lib code.\n */\nexport const ProductDefinitionSchema = z.object({\n /** Unique product key (matches Product.key in DB) */\n key: z.string().min(1),\n type: z.enum(ProductType),\n\n /** Which scopes can subscribe/purchase this product */\n targetScopes: z.array(z.enum(ResourcePrimaryScope)).min(1),\n\n /**\n * Features this product grants (boolean features: present = enabled).\n * Optional — omit to grant none. See the defaults note on `isPublic`.\n */\n grantedFeatures: z.array(z.string()).optional(),\n /**\n * Limits this product grants, with mode (SET for plans, ADD for addons).\n * Optional — omit to grant none. See the defaults note on `isPublic`.\n */\n grantedLimits: z.record(z.string(), LimitGrantSchema).optional(),\n\n /** Inline price definitions (transformed into separate Price records on sync) */\n prices: z.array(PriceDefinitionSchema).min(1),\n\n /** Behavior policy (trial, proration, cancellation, metering) */\n behaviorPolicy: ProductBehaviorPolicySchema.optional(),\n\n // ── PLAN-specific ──\n /** Tier identifier for mutual exclusion (e.g., 'free', 'professional', 'enterprise') */\n planTier: z.string().optional(),\n /** Tier sort order (higher = higher tier, for upgrade/downgrade direction) */\n planTierOrder: z.number().optional(),\n\n // ── ADDON-specific ──\n /** Required plan tiers to subscribe (empty/undefined = no restriction) */\n requiredPlanTiers: z.array(z.string()).optional(),\n\n // ── Tax ──\n /** Per-product tax display override */\n taxDisplayMode: z.enum(TaxDisplayMode).optional(),\n\n // ── Non-subscription specific ──\n /** Purchase config for ONE_TIME/CREDIT_PACK/ITEM products */\n purchaseConfig: z.object({\n maxQuantityPerPurchase: z.number().min(1).optional(),\n creditsPerUnit: z.number().min(1).optional(),\n creditPoolKey: z.string().optional(),\n }).optional(),\n\n /**\n * Sort order in pricing tables. Optional — see the defaults note on `isPublic`.\n */\n sortOrder: z.number().optional(),\n /**\n * Show in public pricing pages. Optional — omitting it yields a PUBLIC product,\n * because the persisted resource defaults it to `true`.\n *\n * WHY `.optional()` AND NOT `.default(...)`\n * This schema is a declarative authoring surface: an application hand-writes\n * `const PLAN: ProductDefinition = { ... }` and nothing ever calls\n * `ProductDefinitionSchema.parse()` on it. A `.default(...)` here would be dead\n * code that never runs, while `z.infer` would still type the field as REQUIRED —\n * so every app author was forced to hand-write `isPublic: true`, `grantedLimits: {}`\n * and friends purely to satisfy the compiler.\n *\n * The real defaults live one layer down, on the PERSISTED `Product` resource\n * (`product.shared.schemas.ts`), which mirrors all four of these fields with\n * identical default values and IS parsed on write. `ProductCatalogSyncBackendService`\n * maps this definition into a `Partial<Product>`, so an omitted field arrives as\n * `undefined` and the resource default materializes it — `grantedFeatures: []`,\n * `grantedLimits: {}`, `sortOrder: 0`, `isPublic: true`.\n *\n * Do NOT \"restore\" `.default(...)` here to make the type look tidier: that would\n * re-assert a guarantee nothing enforces at this layer. Any consumer reading these\n * straight off a `ProductDefinition` must apply the same fallback the resource does.\n */\n isPublic: z.boolean().optional(),\n});\n\nexport type ProductDefinition = z.infer<typeof ProductDefinitionSchema>;\n"]}
1
+ {"version":3,"file":"product-definition.shared.schemas.js","sourceRoot":"","sources":["../../../../src/billing/product-definition.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAmC,MAAM,0CAA0C,CAAC;AAC1I,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,sEAAsE;AAEtE;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,iEAAiE;IACjE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;IAC3B;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAChF,8CAA8C;IAC9C,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;IAC5C,iFAAiF;IACjF,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,gDAAgD;IAChD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;IAC1C,6CAA6C;IAC7C,WAAW,EAAE,CAAC,CAAC,MA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QACL,aAAa,EAAE,UAAU,CAAC,aAAa,IAAI,KAAK;QAChD,eAAe,EAAE,UAAU,CAAC,eAAe,IAAI,sBAAsB,CAAC,MAAM;QAC5E,YAAY,EAAE,UAAU,CAAC,YAAY,IAAI,mBAAmB,CAAC,SAAS;KACvE,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Product Definition Schema (Shared)\n *\n * The bridge between what developers write in the product catalog config\n * and the DB-level Product + Price schemas.\n *\n * Unlike ProductSchema (the DB record), ProductDefinition:\n * - Has prices INLINE (not separate records)\n * - Has no _id, providerProductId, or DB timestamps\n * - Uses `key` as the unique identifier (maps to Product.key in DB)\n *\n * ProductCatalogSyncBackendService.ensureProductSynced(key):\n * 1. Look up ProductDefinition from catalog config by key\n * 2. Upsert Product DB record (key → _id mapping)\n * 3. Upsert Price DB records for each inline price\n * 4. On first provider use: sync to billing provider (fill providerProductId/providerPriceId)\n *\n * @see billing-and-features-system.md §6.2b (Product Definition)\n */\n\nimport { z } from 'zod';\nimport { z_money, CurrencyAllowed } from '@wildo-ai/zod-decorators';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport {\n ProductType,\n PricingModel,\n BillingInterval,\n UsageAggregationType,\n TaxDisplayMode,\n} from './billing-enums.shared.schemas';\nimport { ProductPriceDisclosure, ProductAvailability } from './public-pricing-catalog.shared.atoms';\nimport { LimitGrantSchema, ProductBehaviorPolicySchema, type ProductBehaviorPolicyInput } from './product-behavior-policy.shared.schemas';\nimport { PriceTierSchema } from './price.shared.schemas';\n\n// ── Price Definition (inline in product config) ────────────────────\n\n/**\n * Inline price definition for product catalog configuration.\n * Maps to a separate Price DB record when synced.\n */\nexport const PriceDefinitionSchema = z.object({\n /** Pricing model (flat, per_unit, tiered, graduated, package) */\n model: z.enum(PricingModel),\n /**\n * Unit price for FLAT/PER_UNIT models.\n * Uses z_money for consistent monetary representation across the billing system.\n * Undefined for TIERED/GRADUATED models (use `tiers` instead).\n */\n unitPrice: z_money({ currenciesAllowed: [CurrencyAllowed.FIAT], minAmount: 0n }),\n /** Billing interval (undefined = one-time) */\n interval: z.enum(BillingInterval).optional(),\n /** Interval count (e.g., 3 for quarterly = interval:'month', intervalCount:3) */\n intervalCount: z.number().min(1).default(1),\n /** Tiers for TIERED/GRADUATED pricing models */\n tiers: z.array(PriceTierSchema).optional(),\n /** Package size for PACKAGE pricing model */\n packageSize: z.number().min(1).optional(),\n /** Usage aggregation for metered prices */\n usageAggregation: z.enum(UsageAggregationType).optional(),\n /** Per-price tax behavior override */\n taxBehavior: z.enum(TaxDisplayMode).optional(),\n /** Whether this is the default price */\n isDefault: z.boolean().default(true),\n});\n\nexport type PriceDefinition = z.infer<typeof PriceDefinitionSchema>;\n\n// ── Product Definition (what developers write) ─────────────────────\n\n/**\n * ProductDefinition: what custom app developers write in their product catalog config.\n * This is the declarative product definition that lives in shared-lib code.\n */\nexport const ProductDefinitionSchema = z.object({\n /** Unique product key (matches Product.key in DB) */\n key: z.string().min(1),\n type: z.enum(ProductType),\n\n /** Which scopes can subscribe/purchase this product */\n targetScopes: z.array(z.enum(ResourcePrimaryScope)).min(1),\n\n /**\n * Features this product grants (boolean features: present = enabled).\n * Optional — omit to grant none. See the defaults note on `isPublic`.\n */\n grantedFeatures: z.array(z.string()).optional(),\n /**\n * Limits this product grants, with mode (SET for plans, ADD for addons).\n * Optional — omit to grant none. See the defaults note on `isPublic`.\n */\n grantedLimits: z.record(z.string(), LimitGrantSchema).optional(),\n\n /** Inline price definitions (transformed into separate Price records on sync) */\n prices: z.array(PriceDefinitionSchema).min(1),\n\n /** Behavior policy (trial, proration, cancellation, metering) */\n behaviorPolicy: ProductBehaviorPolicySchema.optional(),\n\n // ── PLAN-specific ──\n /** Tier identifier for mutual exclusion (e.g., 'free', 'professional', 'enterprise') */\n planTier: z.string().optional(),\n /** Tier sort order (higher = higher tier, for upgrade/downgrade direction) */\n planTierOrder: z.number().optional(),\n\n // ── ADDON-specific ──\n /** Required plan tiers to subscribe (empty/undefined = no restriction) */\n requiredPlanTiers: z.array(z.string()).optional(),\n\n // ── Tax ──\n /** Per-product tax display override */\n taxDisplayMode: z.enum(TaxDisplayMode).optional(),\n\n // ── Non-subscription specific ──\n /** Purchase config for ONE_TIME/CREDIT_PACK/ITEM products */\n purchaseConfig: z.object({\n maxQuantityPerPurchase: z.number().min(1).optional(),\n creditsPerUnit: z.number().min(1).optional(),\n creditPoolKey: z.string().optional(),\n }).optional(),\n\n /**\n * Sort order in pricing tables. Optional — see the defaults note on `isPublic`.\n */\n sortOrder: z.number().optional(),\n /**\n * Show in public pricing pages. Optional — omitting it yields a PUBLIC product,\n * because the persisted resource defaults it to `true`.\n *\n * WHY `.optional()` AND NOT `.default(...)`\n * This schema is a declarative authoring surface: an application hand-writes\n * `const PLAN: ProductDefinition = { ... }` and nothing ever calls\n * `ProductDefinitionSchema.parse()` on it. A `.default(...)` here would be dead\n * code that never runs, while `z.infer` would still type the field as REQUIRED —\n * so every app author was forced to hand-write `isPublic: true`, `grantedLimits: {}`\n * and friends purely to satisfy the compiler.\n *\n * The real defaults live one layer down, on the PERSISTED `Product` resource\n * (`product.shared.schemas.ts`), which mirrors all four of these fields with\n * identical default values and IS parsed on write. `ProductCatalogSyncBackendService`\n * maps this definition into a `Partial<Product>`, so an omitted field arrives as\n * `undefined` and the resource default materializes it — `grantedFeatures: []`,\n * `grantedLimits: {}`, `sortOrder: 0`, `isPublic: true`.\n *\n * Do NOT \"restore\" `.default(...)` here to make the type look tidier: that would\n * re-assert a guarantee nothing enforces at this layer. Any consumer reading these\n * straight off a `ProductDefinition` must apply the same fallback the resource does.\n */\n isPublic: z.boolean().optional(),\n\n // ── Pricing-surface facts ──\n //\n // What a pricing page needs beyond the price itself, stated here so every surface that lists the\n // catalogue — the application's own pricing table and its public website — reads one answer\n // instead of keeping its own list (#1835). All three are optional for the reason `isPublic`\n // gives: the persisted `Product` resource carries the defaults.\n\n /**\n * The plan this application recommends to the audience it is designed for, emphasised on a\n * pricing surface. Omitted = not recommended.\n *\n * A RECOMMENDATION, not a popularity claim: nothing here measures what customers chose, so no\n * surface may word it as \"most popular\". Recommend at most one plan per scope a surface lists.\n */\n isRecommended: z.boolean().optional(),\n /** How much of this product's price a pricing surface may state. Omitted = `LISTED`. */\n priceDisclosure: z.enum(ProductPriceDisclosure).optional(),\n /** Whether this product can be bought today. Omitted = `AVAILABLE`. */\n availability: z.enum(ProductAvailability).optional(),\n});\n\n/**\n * A product as an application authors it. Its `behaviorPolicy` is the policy's INPUT type, so a field the policy\n * defaults may be omitted; the catalog sync parses it onto the persisted `Product`, where the defaults materialize.\n * An interface rather than an intersection alias, so declaration emit keeps the name.\n */\nexport interface ProductDefinition extends Omit<z.infer<typeof ProductDefinitionSchema>, 'behaviorPolicy'> {\n behaviorPolicy?: ProductBehaviorPolicyInput;\n}\n\n/** The three pricing-surface facts of a product, with every omission resolved. */\nexport interface ProductPricingSurfaceFacts {\n readonly isRecommended: boolean;\n readonly priceDisclosure: ProductPriceDisclosure;\n readonly availability: ProductAvailability;\n}\n\n/**\n * Resolve a definition's pricing-surface facts, applying the defaults the persisted `Product`\n * resource declares.\n *\n * ONE place for the fallbacks, because two readers need them and must agree: the catalogue sync,\n * which must WRITE the default rather than leave a field out (an update ignores an absent field, so\n * a definition that stops recommending a plan would otherwise leave it recommended forever), and a\n * website build, which reads the definitions directly and never sees a persisted row.\n */\nexport function resolveProductPricingSurfaceFacts(definition: Pick<ProductDefinition, 'isRecommended' | 'priceDisclosure' | 'availability'>): ProductPricingSurfaceFacts {\n return {\n isRecommended: definition.isRecommended ?? false,\n priceDisclosure: definition.priceDisclosure ?? ProductPriceDisclosure.LISTED,\n availability: definition.availability ?? ProductAvailability.AVAILABLE,\n };\n}\n"]}
@@ -11,9 +11,9 @@ export declare const productsResourceConfiguration_InitializationFactory: (resou
11
11
  type: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof import("./billing-enums.shared.schemas").ProductType>>>>>;
12
12
  key: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
13
13
  targetScopes: import("zod").ZodArray<import("zod").ZodEnum<typeof import("..").ResourcePrimaryScope>>;
14
- grantedFeatures: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>>;
15
- grantedLimits: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
16
- value: import("zod").ZodNumber;
14
+ grantedFeatures: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>>;
15
+ grantedLimits: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodRecord<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>, import("zod").ZodObject<{
16
+ value: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodNumber>;
17
17
  mode: import("zod").ZodDefault<import("zod").ZodEnum<typeof import("./billing-enums.shared.schemas").LimitGrantMode>>;
18
18
  }, import("zod/v4/core").$strip>>>>;
19
19
  planTier: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>;
@@ -56,6 +56,9 @@ export declare const productsResourceConfiguration_InitializationFactory: (resou
56
56
  sortOrder: import("zod").ZodDefault<import("zod").ZodNumber>;
57
57
  isPublic: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodBoolean>>;
58
58
  isActive: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodBoolean>>>;
59
+ isRecommended: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodBoolean>>>;
60
+ priceDisclosure: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodEnum<typeof import("./public-pricing-catalog.shared.atoms").ProductPriceDisclosure>>>>;
61
+ availability: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodEnum<typeof import("./public-pricing-catalog.shared.atoms").ProductAvailability>>>>>;
59
62
  metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
60
63
  createdAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>;
61
64
  updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodDate>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"product.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/billing/product.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAGL,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAI/C,KAAK,eAAe,GAChB,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,mDAAmD,GAC9D,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAgG9C,CAAC"}
1
+ {"version":3,"file":"product.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/billing/product.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAGL,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAI/C,KAAK,eAAe,GAChB,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,mDAAmD,GAC9D,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAgG9C,CAAC"}
@@ -20,14 +20,15 @@ import { z } from 'zod';
20
20
  import '@wildo-ai/zod-decorators';
21
21
  import { ResourcePrimaryScope } from '../resources/resources.shared.schemas';
22
22
  import { ProductType, TaxDisplayMode } from './billing-enums.shared.schemas';
23
+ import { ProductPriceDisclosure, ProductAvailability } from './public-pricing-catalog.shared.atoms';
23
24
  export declare const ProductSchema: z.ZodObject<{
24
25
  _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
25
26
  type: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof ProductType>>>>>;
26
27
  key: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>>;
27
28
  targetScopes: z.ZodArray<z.ZodEnum<typeof ResourcePrimaryScope>>;
28
- grantedFeatures: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodArray<z.ZodString>>>;
29
- grantedLimits: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
30
- value: z.ZodNumber;
29
+ grantedFeatures: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>>>;
30
+ grantedLimits: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodRecord<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>, z.ZodObject<{
31
+ value: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodNumber>;
31
32
  mode: z.ZodDefault<z.ZodEnum<typeof import("./billing-enums.shared.schemas").LimitGrantMode>>;
32
33
  }, z.core.$strip>>>>;
33
34
  planTier: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>;
@@ -70,6 +71,9 @@ export declare const ProductSchema: z.ZodObject<{
70
71
  sortOrder: z.ZodDefault<z.ZodNumber>;
71
72
  isPublic: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>;
72
73
  isActive: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>>;
74
+ isRecommended: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>>;
75
+ priceDisclosure: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodEnum<typeof ProductPriceDisclosure>>>>;
76
+ availability: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodEnum<typeof ProductAvailability>>>>>;
73
77
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
74
78
  createdAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodDate>>>;
75
79
  updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodDate>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"product.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/billing/product.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,cAAc,EACf,MAAM,gCAAgC,CAAC;AAIxC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8ExB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"product.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/billing/product.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAIpG,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4FxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -20,8 +20,10 @@ import { z } from 'zod';
20
20
  // Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —
21
21
  // never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.
22
22
  import '@wildo-ai/zod-decorators';
23
+ import { SectionedVocabulary } from '@wildo-ai/presets-components-models';
23
24
  import { ResourcePrimaryScope } from '../resources/resources.shared.schemas.js';
24
25
  import { ProductType, TaxDisplayMode, } from './billing-enums.shared.schemas.js';
26
+ import { ProductPriceDisclosure, ProductAvailability } from './public-pricing-catalog.shared.atoms.js';
25
27
  import { LimitGrantSchema } from './product-behavior-policy.shared.schemas.js';
26
28
  import { ProductBehaviorPolicySchema } from './product-behavior-policy.shared.schemas.js';
27
29
  export const ProductSchema = z.object({
@@ -32,7 +34,7 @@ export const ProductSchema = z.object({
32
34
  /** Which scopes can subscribe to this product (code-driven, not user-editable) */
33
35
  targetScopes: z.array(z.enum(ResourcePrimaryScope)).min(1),
34
36
  /** Features this product grants (boolean: present = enabled) */
35
- grantedFeatures: z.array(z.string()).default([]).isNotEditable(),
37
+ grantedFeatures: z.array(z.string().systemEnum(SectionedVocabulary.FEATURE)).default([]).isNotEditable(),
36
38
  /**
37
39
  * Limits this product grants, with aggregation mode.
38
40
  * - SET: absolute value (for PLAN products: "Professional gives you 50 projects")
@@ -44,7 +46,7 @@ export const ProductSchema = z.object({
44
46
  * 3. For each active ADDON with SET mode: take max(current, addon value)
45
47
  * 4. FEATURES_UNLIMITED always wins in any comparison
46
48
  */
47
- grantedLimits: z.record(z.string(), LimitGrantSchema).default({}).isNotEditable(),
49
+ grantedLimits: z.record(z.string().systemEnum(SectionedVocabulary.LIMIT), LimitGrantSchema).default({}).isNotEditable(),
48
50
  /** For PLAN type: mutually exclusive tier ordering (higher number = higher tier) */
49
51
  planTier: z.string().optional().isSummaryField(),
50
52
  /** For PLAN type: tier sort order (used for upgrade/downgrade direction detection) */
@@ -69,12 +71,16 @@ export const ProductSchema = z.object({
69
71
  * Ignored for subscription products (PLAN, ADDON, METERED).
70
72
  */
71
73
  purchaseConfig: z.object({
72
- /** Maximum quantity per purchase (for CREDIT_PACK/ITEM). undefined = no limit */
73
- maxQuantityPerPurchase: z.number().min(1).optional(),
74
+ /**
75
+ * The most units one purchase may carry (for ONE_TIME/CREDIT_PACK/ITEM). Absent means no cap beyond the
76
+ * checkout's own bound. ENFORCED since #1798: opening a checkout for more is refused with
77
+ * `BILLING_PURCHASE_QUANTITY_EXCEEDS_LIMIT` (422). Nothing read it before.
78
+ */
79
+ maxQuantityPerPurchase: z.number().int().min(1).optional().describe("The most units one purchase of this product may carry. Opening a checkout for more is refused. Absent means no cap beyond the checkout's own bound. Ignored for subscription products."),
74
80
  /** For CREDIT_PACK: how many credits per pack unit */
75
- creditsPerUnit: z.number().min(1).optional(),
81
+ creditsPerUnit: z.number().min(1).optional().describe("For a credit pack, how many credits each unit bought adds to the credit pool. Defaults to 1."),
76
82
  /** For CREDIT_PACK: which "credit pool" this feeds (e.g., 'ai_tokens', 'sms_credits') */
77
- creditPoolKey: z.string().optional(),
83
+ creditPoolKey: z.string().optional().describe("For a credit pack, the key of the credit pool a completed purchase adds credits to. A credit pack without one grants no credits."),
78
84
  }).optional(),
79
85
  /** Behavior policy: trial, proration, cancellation, metering */
80
86
  behaviorPolicy: ProductBehaviorPolicySchema.optional(),
@@ -84,8 +90,17 @@ export const ProductSchema = z.object({
84
90
  sortOrder: z.number().default(0),
85
91
  /** Whether this product is visible to end users */
86
92
  isPublic: z.boolean().default(true).isSummaryField(),
87
- /** Whether this product is available for purchase */
93
+ /**
94
+ * Whether this product is RETIRED (`false`): withdrawn from the code catalogue, no longer sold or
95
+ * offered. Not the same question as `availability`, which announces a product not yet on sale.
96
+ */
88
97
  isActive: z.boolean().default(true).isDBIndexed().isSummaryField(),
98
+ /** The plan this application recommends on pricing surfaces — a recommendation, never a popularity claim. */
99
+ isRecommended: z.boolean().default(false).isNotEditable().isSummaryField(),
100
+ /** How much of this product's price a pricing surface may state (display only; not an acquisition gate). */
101
+ priceDisclosure: z.enum(ProductPriceDisclosure).default(ProductPriceDisclosure.LISTED).isNotEditable().systemEnum('ProductPriceDisclosure'),
102
+ /** Whether this product can be bought today; `UPCOMING` is listed and refused at every acquisition door. */
103
+ availability: z.enum(ProductAvailability).default(ProductAvailability.AVAILABLE).isNotEditable().isSummaryField().systemEnum('ProductAvailability'),
89
104
  metadata: z.record(z.string(), z.string()).optional(),
90
105
  createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),
91
106
  updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),
@@ -1 +1 @@
1
- {"version":3,"file":"product.shared.schemas.js","sourceRoot":"","sources":["../../../../src/billing/product.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,cAAc,GACf,MAAM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E,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","sourcesContent":["/**\n * Product Schema (Shared)\n *\n * Products define what you sell. They live in the DB as APPLICATION-scoped records,\n * populated lazily from the code-defined ProductDefinition catalog.\n *\n * Config-driven, lazy-populated:\n * 1. Config is the source of truth: Product definitions live in code (shared lib)\n * 2. Populate on demand: DB records created on first checkout/admin view\n * 3. Provider sync on demand: providerProductId filled when first used in provider ops\n * 4. Bulk sync available: Admin action to pre-populate all products\n * 5. Startup is lightweight: No blocking provider calls at boot\n *\n * The admin UI shows products as read-only resources (view + \"Sync to Provider\" action),\n * NOT as CRUD-editable. Changes require code deployment.\n *\n * @see billing-and-features-system.md §6.2 (Product & Price Catalog)\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 { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport {\n ProductType,\n TaxDisplayMode,\n} from './billing-enums.shared.schemas';\nimport { LimitGrantSchema } from './product-behavior-policy.shared.schemas';\nimport { ProductBehaviorPolicySchema } from './product-behavior-policy.shared.schemas';\n\nexport const ProductSchema = z.object({\n\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n type: z.enum(ProductType).isDBIndexed().isSummaryField().isNotEditable().systemEnum('ProductType'),\n /** Unique product key (maps to ProductDefinition.key in code catalog) */\n key: z.string().min(1).isUnique({ scope: 'global' }).isSummaryField().isNotEditable(),\n\n /** Which scopes can subscribe to this product (code-driven, not user-editable) */\n targetScopes: z.array(z.enum(ResourcePrimaryScope)).min(1),\n\n /** Features this product grants (boolean: present = enabled) */\n grantedFeatures: z.array(z.string()).default([]).isNotEditable(),\n\n /**\n * Limits this product grants, with aggregation mode.\n * - SET: absolute value (for PLAN products: \"Professional gives you 50 projects\")\n * - ADD: additive to current limits (for ADDON products: \"+10 extra projects\")\n *\n * Aggregation algorithm in BillingFeatureSyncBackendService:\n * 1. Start with active PLAN's SET limits (only one active plan per billing account)\n * 2. For each active ADDON with ADD mode: sum onto current limit\n * 3. For each active ADDON with SET mode: take max(current, addon value)\n * 4. FEATURES_UNLIMITED always wins in any comparison\n */\n grantedLimits: z.record(z.string(), LimitGrantSchema).default({}).isNotEditable(),\n\n /** For PLAN type: mutually exclusive tier ordering (higher number = higher tier) */\n planTier: z.string().optional().isSummaryField(),\n /** For PLAN type: tier sort order (used for upgrade/downgrade direction detection) */\n planTierOrder: z.number().optional(),\n\n /** For ADDON type: required plan tiers to subscribe to this addon (empty = no restriction) */\n requiredPlanTiers: z.array(z.string()).optional(),\n\n /**\n * Tax display intent for this product, recorded on the product row.\n * - 'exclusive': price amounts are HT (tax added at checkout)\n * - 'inclusive': price amounts are TTC (tax embedded)\n *\n * It is DECLARATIVE ONLY and does not reach the billing provider. The catalog sync stores it on\n * the product and then sends each price's own `taxBehavior` unchanged, so a price that declares\n * none is created without `tax_behavior` regardless of what this field says. To make the\n * intention effective, set `taxBehavior` on the prices as well.\n *\n * Common pattern: org products exclusive, user products inclusive.\n */\n taxDisplayMode: z.enum(TaxDisplayMode).optional(),\n\n /**\n * Purchase configuration for non-subscription products (ONE_TIME, CREDIT_PACK, ITEM).\n * Ignored for subscription products (PLAN, ADDON, METERED).\n */\n purchaseConfig: z.object({\n /** Maximum quantity per purchase (for CREDIT_PACK/ITEM). undefined = no limit */\n maxQuantityPerPurchase: z.number().min(1).optional(),\n /** For CREDIT_PACK: how many credits per pack unit */\n creditsPerUnit: z.number().min(1).optional(),\n /** For CREDIT_PACK: which \"credit pool\" this feeds (e.g., 'ai_tokens', 'sms_credits') */\n creditPoolKey: z.string().optional(),\n }).optional(),\n\n /** Behavior policy: trial, proration, cancellation, metering */\n behaviorPolicy: ProductBehaviorPolicySchema.optional(),\n\n /** Provider sync (lazy: populated on first checkout or sync action, NOT at startup) */\n providerProductId: z.string().optional().isBackendOnly(),\n\n /** Display sort order in pricing tables */\n sortOrder: z.number().default(0),\n /** Whether this product is visible to end users */\n isPublic: z.boolean().default(true).isSummaryField(),\n /** Whether this product is available for purchase */\n isActive: z.boolean().default(true).isDBIndexed().isSummaryField(),\n metadata: z.record(z.string(), z.string()).optional(),\n\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\nexport type Product = z.infer<typeof ProductSchema>;\n"]}
1
+ {"version":3,"file":"product.shared.schemas.js","sourceRoot":"","sources":["../../../../src/billing/product.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAEvF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAEpC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IAEtD,IAAI,EA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C3I,4GAA4G;IAC5G,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,aAAa,EAAE,CAAC,cAAc,EAAE,CAAC,UAAU,CAAC,qBAAqB,CAAC;IACnJ,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAErD,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","sourcesContent":["/**\n * Product Schema (Shared)\n *\n * Products define what you sell. They live in the DB as APPLICATION-scoped records,\n * populated lazily from the code-defined ProductDefinition catalog.\n *\n * Config-driven, lazy-populated:\n * 1. Config is the source of truth: Product definitions live in code (shared lib)\n * 2. Populate on demand: DB records created on first checkout/admin view\n * 3. Provider sync on demand: providerProductId filled when first used in provider ops\n * 4. Bulk sync available: Admin action to pre-populate all products\n * 5. Startup is lightweight: No blocking provider calls at boot\n *\n * The admin UI shows products as read-only resources (view + \"Sync to Provider\" action),\n * NOT as CRUD-editable. Changes require code deployment.\n *\n * @see billing-and-features-system.md §6.2 (Product & Price Catalog)\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 { SectionedVocabulary } from '@wildo-ai/presets-components-models';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport {\n ProductType,\n TaxDisplayMode,\n} from './billing-enums.shared.schemas';\nimport { ProductPriceDisclosure, ProductAvailability } from './public-pricing-catalog.shared.atoms';\nimport { LimitGrantSchema } from './product-behavior-policy.shared.schemas';\nimport { ProductBehaviorPolicySchema } from './product-behavior-policy.shared.schemas';\n\nexport const ProductSchema = z.object({\n\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n type: z.enum(ProductType).isDBIndexed().isSummaryField().isNotEditable().systemEnum('ProductType'),\n /** Unique product key (maps to ProductDefinition.key in code catalog) */\n key: z.string().min(1).isUnique({ scope: 'global' }).isSummaryField().isNotEditable(),\n\n /** Which scopes can subscribe to this product (code-driven, not user-editable) */\n targetScopes: z.array(z.enum(ResourcePrimaryScope)).min(1),\n\n /** Features this product grants (boolean: present = enabled) */\n grantedFeatures: z.array(z.string().systemEnum(SectionedVocabulary.FEATURE)).default([]).isNotEditable(),\n\n /**\n * Limits this product grants, with aggregation mode.\n * - SET: absolute value (for PLAN products: \"Professional gives you 50 projects\")\n * - ADD: additive to current limits (for ADDON products: \"+10 extra projects\")\n *\n * Aggregation algorithm in BillingFeatureSyncBackendService:\n * 1. Start with active PLAN's SET limits (only one active plan per billing account)\n * 2. For each active ADDON with ADD mode: sum onto current limit\n * 3. For each active ADDON with SET mode: take max(current, addon value)\n * 4. FEATURES_UNLIMITED always wins in any comparison\n */\n grantedLimits: z.record(z.string().systemEnum(SectionedVocabulary.LIMIT), LimitGrantSchema).default({}).isNotEditable(),\n\n /** For PLAN type: mutually exclusive tier ordering (higher number = higher tier) */\n planTier: z.string().optional().isSummaryField(),\n /** For PLAN type: tier sort order (used for upgrade/downgrade direction detection) */\n planTierOrder: z.number().optional(),\n\n /** For ADDON type: required plan tiers to subscribe to this addon (empty = no restriction) */\n requiredPlanTiers: z.array(z.string()).optional(),\n\n /**\n * Tax display intent for this product, recorded on the product row.\n * - 'exclusive': price amounts are HT (tax added at checkout)\n * - 'inclusive': price amounts are TTC (tax embedded)\n *\n * It is DECLARATIVE ONLY and does not reach the billing provider. The catalog sync stores it on\n * the product and then sends each price's own `taxBehavior` unchanged, so a price that declares\n * none is created without `tax_behavior` regardless of what this field says. To make the\n * intention effective, set `taxBehavior` on the prices as well.\n *\n * Common pattern: org products exclusive, user products inclusive.\n */\n taxDisplayMode: z.enum(TaxDisplayMode).optional(),\n\n /**\n * Purchase configuration for non-subscription products (ONE_TIME, CREDIT_PACK, ITEM).\n * Ignored for subscription products (PLAN, ADDON, METERED).\n */\n purchaseConfig: z.object({\n /**\n * The most units one purchase may carry (for ONE_TIME/CREDIT_PACK/ITEM). Absent means no cap beyond the\n * checkout's own bound. ENFORCED since #1798: opening a checkout for more is refused with\n * `BILLING_PURCHASE_QUANTITY_EXCEEDS_LIMIT` (422). Nothing read it before.\n */\n maxQuantityPerPurchase: z.number().int().min(1).optional().describe(\"The most units one purchase of this product may carry. Opening a checkout for more is refused. Absent means no cap beyond the checkout's own bound. Ignored for subscription products.\"),\n /** For CREDIT_PACK: how many credits per pack unit */\n creditsPerUnit: z.number().min(1).optional().describe(\"For a credit pack, how many credits each unit bought adds to the credit pool. Defaults to 1.\"),\n /** For CREDIT_PACK: which \"credit pool\" this feeds (e.g., 'ai_tokens', 'sms_credits') */\n creditPoolKey: z.string().optional().describe(\"For a credit pack, the key of the credit pool a completed purchase adds credits to. A credit pack without one grants no credits.\"),\n }).optional(),\n\n /** Behavior policy: trial, proration, cancellation, metering */\n behaviorPolicy: ProductBehaviorPolicySchema.optional(),\n\n /** Provider sync (lazy: populated on first checkout or sync action, NOT at startup) */\n providerProductId: z.string().optional().isBackendOnly(),\n\n /** Display sort order in pricing tables */\n sortOrder: z.number().default(0),\n /** Whether this product is visible to end users */\n isPublic: z.boolean().default(true).isSummaryField(),\n /**\n * Whether this product is RETIRED (`false`): withdrawn from the code catalogue, no longer sold or\n * offered. Not the same question as `availability`, which announces a product not yet on sale.\n */\n isActive: z.boolean().default(true).isDBIndexed().isSummaryField(),\n\n /** The plan this application recommends on pricing surfaces — a recommendation, never a popularity claim. */\n isRecommended: z.boolean().default(false).isNotEditable().isSummaryField(),\n /** How much of this product's price a pricing surface may state (display only; not an acquisition gate). */\n priceDisclosure: z.enum(ProductPriceDisclosure).default(ProductPriceDisclosure.LISTED).isNotEditable().systemEnum('ProductPriceDisclosure'),\n /** Whether this product can be bought today; `UPCOMING` is listed and refused at every acquisition door. */\n availability: z.enum(ProductAvailability).default(ProductAvailability.AVAILABLE).isNotEditable().isSummaryField().systemEnum('ProductAvailability'),\n metadata: z.record(z.string(), z.string()).optional(),\n\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n});\nexport type Product = z.infer<typeof ProductSchema>;\n"]}
@@ -122,17 +122,17 @@ export const promotionsResourceConfiguration_InitializationFactory = (resourcesR
122
122
  // NOT the Promotion resource row. Without this the service output fails
123
123
  // `transformOutput`'s `internalDto.parse` against the resource schema → 500.
124
124
  customResponseDto: z.object({
125
- valid: z.boolean(),
126
- promotionId: z.string(),
127
- providerCouponId: z.string().nullish(),
128
- providerPromotionId: z.string().nullish(),
125
+ valid: z.boolean().describe("Always `true`. A promotion that cannot be used is refused with an error instead."),
126
+ promotionId: z.string().describe("The id of the promotion that was checked."),
127
+ providerCouponId: z.string().nullish().describe("The billing provider's id for the coupon behind the promotion. Absent when the promotion is not set up with the provider, in which case checkout refuses its code."),
128
+ providerPromotionId: z.string().nullish().describe("The billing provider's id for the promotion code. Present only for a promotion with a code that is set up with the provider."),
129
129
  discount: z.object({
130
- type: z.string(),
131
- percentage: z.number().optional(),
130
+ type: z.string().describe("The kind of discount: `percentage` or `fixed_amount`."),
131
+ percentage: z.number().optional().describe("For a `percentage` discount, the percentage taken off, from 0 to 100."),
132
132
  // `amount` is a MoneyValue (z_money) — modelled permissively to avoid
133
133
  // pulling the money factory into this response contract.
134
- amount: z.unknown().optional(),
135
- }),
134
+ amount: z.unknown().optional().describe("For a `fixed_amount` discount, the amount taken off, as a money value with `amount`, `currency` and `decimals`."),
135
+ }).describe("The discount the promotion gives. Checking a code does not redeem it: a redemption is counted when a checkout using the code completes."),
136
136
  }),
137
137
  }],
138
138
  },
@@ -1 +1 @@
1
- {"version":3,"file":"promotions.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/billing/promotions.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,GAE7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,wEAAwE;AAExE,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,2DAA2D;IAC3D,uCAAe,CAAA;IACf,sDAAsD;IACtD,iDAAyB,CAAA;AAC3B,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AASD,MAAM,CAAC,MAAM,qDAAqD,GAAG,CACnE,sBAA8C,EAC9C,EAAE,CAAC,0CAA0C,CAI7C;IACA,UAAU,EAAE,eAAe;IAC3B,kBAAkB,EAAE,gBAAgB,CAAC,UAAU;IAC/C,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,UAAU,CAAC;IACxF,qBAAqB,EAAE,sBAAsB;IAC7C,gBAAgB,EAAE,IAAI;IACtB,eAAe,EAAE,oBAAoB;IACrC,cAAc,EAAE;QACd,qBAAqB,CAAC,IAAI;QAC1B,qBAAqB,CAAC,IAAI;QAC1B,qBAAqB,CAAC,MAAM;QAC5B,qBAAqB,CAAC,MAA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,CAAC;4BACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;4BAChB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;4BACjC,sEAAsE;4BACtE,yDAAyD;4BACzD,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;yBAC/B,CAAC;qBACH,CAAC;iBACH,CAAC;SACH;QACD,CAAC,oBAAoB,CAAC,UAAU,CAAC,EAAE;YACjC,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,MAAM;oBAC5C,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,iBAAiB,EAAE,IAAI;oBACvB,kFAAkF;oBAClF,sFAAsF;oBACtF,kFAAkF;oBAClF,oFAAoF;oBACpF,8EAA8E;oBAC9E,wBAAwB;oBACxB,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;oBACxB,2EAA2E;oBAC3E,kCAAkC;oBAClC,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC;wBAC1B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;qBACtB,CAAC;iBACH,CAAC;SACH;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Promotions Resource Configuration\n *\n * Admin-managed: discount mechanisms synced to provider.\n */\n\nimport { z } from 'zod';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n ResourceRelationship,\n} from '../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { PromotionSchema } from './promotions.shared.schemas';\n\n// ── Custom Operations ────────────────────────────────────────────────\n\nexport enum Promotion_Operations {\n /** Apply a promotion code (validates and records usage) */\n APPLY = 'apply',\n /** Deactivate a promotion (sets isActive to false) */\n DEACTIVATE = 'deactivate',\n}\n\ntype PromotionsCoreOps =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE;\n\nexport const promotionsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n) => createResourceConfiguration_Initialization<\n typeof Promotion_Operations,\n PromotionsCoreOps,\n typeof PromotionSchema\n>({\n mainSchema: PromotionSchema,\n resourceIdentifier: CoreResourceType.PROMOTIONS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.PROMOTIONS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n customOperation: Promotion_Operations,\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n ],\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n {\n /*\n * The OPERATOR's door onto the catalogue — added 2026-09-18 for issue #1295.\n *\n * The `INTERNAL_CALL` variant above is route-less by design: the billing back-office drives\n * this resource through the service pipeline, and states that these catalog reads have \"NO\n * HTTP surface\". That stays true and stays the DEFAULT, so `createForInternalServiceOperation`\n * keeps resolving it and no internal seam moves.\n *\n * What was missing is the surface an application ADMINISTRATOR needs. The `billing-catalog`\n * settings destination targets `promotions.list` and could never load — the rail entry, the tab and the\n * heading all rendered, and every request 404'd at the ROUTER, because no route was ever\n * mounted. An operator cannot price what they cannot see.\n *\n * Gated on `APP_ADMIN_SUPER_ADMIN`, exactly what that destination already requires. Not a\n * widening: the aggregated billing state already ships products, prices and active promotions\n * to EVERY authenticated client, so an admin-only list is strictly narrower than what the\n * application discloses today.\n *\n * Two `isDefault: true` variants is the shape `organizations.CREATE` already uses — default is\n * per variant TYPE, so the internal door and the HTTP door each stay the default of their own\n * transport and the HTTP one needs no `variantKey` in its URL.\n */\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['name', 'code'],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }],\n },\n [Promotion_Operations.APPLY]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n code: z.string().min(1),\n }),\n // Borrows UPDATE for its route/verb but returns discount info for the caller,\n // NOT the Promotion resource row. Without this the service output fails\n // `transformOutput`'s `internalDto.parse` against the resource schema → 500.\n customResponseDto: z.object({\n valid: z.boolean(),\n promotionId: z.string(),\n providerCouponId: z.string().nullish(),\n providerPromotionId: z.string().nullish(),\n discount: z.object({\n type: z.string(),\n percentage: z.number().optional(),\n // `amount` is a MoneyValue (z_money) — modelled permissively to avoid\n // pulling the money factory into this response contract.\n amount: z.unknown().optional(),\n }),\n }),\n }],\n },\n [Promotion_Operations.DEACTIVATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n haveBulkOperation: true,\n // DEACTIVATE forces `isActive: false` from its prefix implementation and takes no\n // caller input. Omitting `requestDto` would auto-derive the FULL promotion update DTO\n // — including `isActive` itself (so \"deactivate\" could re-activate), plus `code`,\n // `discountPercentage` and `maxRedemptions`. The prefix's return is MERGED onto the\n // caller payload rather than replacing it, so narrowing here is what actually\n // constrains the write.\n requestDto: z.object({}),\n // Borrows UPDATE for its route/verb but returns a bare `{ isActive }` ack,\n // NOT the Promotion resource row.\n customResponseDto: z.object({\n isActive: z.boolean(),\n }),\n }],\n },\n },\n});\n"]}
1
+ {"version":3,"file":"promotions.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/billing/promotions.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAC7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AC3J,CAAC,CAAC,QAAQ,CAAC,yIAAyI,CAAC;qBACvJ,CAAC;iBACH,CAAC;SACH;QACD,CAAC,oBAAoB,CAAC,UAAU,CAAC,EAAE;YACjC,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,MAAM;oBAC5C,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,iBAAiB,EAAE,IAAI;oBACvB,kFAAkF;oBAClF,sFAAsF;oBACtF,kFAAkF;oBAClF,oFAAoF;oBACpF,8EAA8E;oBAC9E,wBAAwB;oBACxB,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;oBACxB,2EAA2E;oBAC3E,kCAAkC;oBAClC,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC;wBAC1B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;qBACtB,CAAC;iBACH,CAAC;SACH;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Promotions Resource Configuration\n *\n * Admin-managed: discount mechanisms synced to provider.\n */\n\nimport { z } from 'zod';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n ResourceRelationship,\n} from '../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { PromotionSchema } from './promotions.shared.schemas';\n\n// ── Custom Operations ────────────────────────────────────────────────\n\nexport enum Promotion_Operations {\n /** Apply a promotion code (validates and records usage) */\n APPLY = 'apply',\n /** Deactivate a promotion (sets isActive to false) */\n DEACTIVATE = 'deactivate',\n}\n\ntype PromotionsCoreOps =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE;\n\nexport const promotionsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n) => createResourceConfiguration_Initialization<\n typeof Promotion_Operations,\n PromotionsCoreOps,\n typeof PromotionSchema\n>({\n mainSchema: PromotionSchema,\n resourceIdentifier: CoreResourceType.PROMOTIONS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.PROMOTIONS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n customOperation: Promotion_Operations,\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n ],\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n {\n /*\n * The OPERATOR's door onto the catalogue — added 2026-09-18 for issue #1295.\n *\n * The `INTERNAL_CALL` variant above is route-less by design: the billing back-office drives\n * this resource through the service pipeline, and states that these catalog reads have \"NO\n * HTTP surface\". That stays true and stays the DEFAULT, so `createForInternalServiceOperation`\n * keeps resolving it and no internal seam moves.\n *\n * What was missing is the surface an application ADMINISTRATOR needs. The `billing-catalog`\n * settings destination targets `promotions.list` and could never load — the rail entry, the tab and the\n * heading all rendered, and every request 404'd at the ROUTER, because no route was ever\n * mounted. An operator cannot price what they cannot see.\n *\n * Gated on `APP_ADMIN_SUPER_ADMIN`, exactly what that destination already requires. Not a\n * widening: the aggregated billing state already ships products, prices and active promotions\n * to EVERY authenticated client, so an admin-only list is strictly narrower than what the\n * application discloses today.\n *\n * Two `isDefault: true` variants is the shape `organizations.CREATE` already uses — default is\n * per variant TYPE, so the internal door and the HTTP door each stay the default of their own\n * transport and the HTTP one needs no `variantKey` in its URL.\n */\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['name', 'code'],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n }],\n },\n [Promotion_Operations.APPLY]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n code: z.string().min(1),\n }),\n // Borrows UPDATE for its route/verb but returns discount info for the caller,\n // NOT the Promotion resource row. Without this the service output fails\n // `transformOutput`'s `internalDto.parse` against the resource schema → 500.\n customResponseDto: z.object({\n valid: z.boolean().describe(\"Always `true`. A promotion that cannot be used is refused with an error instead.\"),\n promotionId: z.string().describe(\"The id of the promotion that was checked.\"),\n providerCouponId: z.string().nullish().describe(\"The billing provider's id for the coupon behind the promotion. Absent when the promotion is not set up with the provider, in which case checkout refuses its code.\"),\n providerPromotionId: z.string().nullish().describe(\"The billing provider's id for the promotion code. Present only for a promotion with a code that is set up with the provider.\"),\n discount: z.object({\n type: z.string().describe(\"The kind of discount: `percentage` or `fixed_amount`.\"),\n percentage: z.number().optional().describe(\"For a `percentage` discount, the percentage taken off, from 0 to 100.\"),\n // `amount` is a MoneyValue (z_money) — modelled permissively to avoid\n // pulling the money factory into this response contract.\n amount: z.unknown().optional().describe(\"For a `fixed_amount` discount, the amount taken off, as a money value with `amount`, `currency` and `decimals`.\"),\n }).describe(\"The discount the promotion gives. Checking a code does not redeem it: a redemption is counted when a checkout using the code completes.\"),\n }),\n }],\n },\n [Promotion_Operations.DEACTIVATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n haveBulkOperation: true,\n // DEACTIVATE forces `isActive: false` from its prefix implementation and takes no\n // caller input. Omitting `requestDto` would auto-derive the FULL promotion update DTO\n // — including `isActive` itself (so \"deactivate\" could re-activate), plus `code`,\n // `discountPercentage` and `maxRedemptions`. The prefix's return is MERGED onto the\n // caller payload rather than replacing it, so narrowing here is what actually\n // constrains the write.\n requestDto: z.object({}),\n // Borrows UPDATE for its route/verb but returns a bare `{ isActive }` ack,\n // NOT the Promotion resource row.\n customResponseDto: z.object({\n isActive: z.boolean(),\n }),\n }],\n },\n },\n});\n"]}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * The PUBLIC pricing catalogue: what a pricing surface outside the application (the public website)
3
+ * may know about the application's billing catalogue, as plain JSON-safe data (#1835).
4
+ *
5
+ * ## Why this file imports nothing
6
+ *
7
+ * It is an ATOM on the `@wildo-ai/saas-models/public-runtime` seam. The website's pricing section is a
8
+ * browser island, and the billing vocabulary it would otherwise need (`ProductType`, `BillingInterval`,
9
+ * `PricingModel`) lives behind the decorator-framework root barrel and the provider models, neither of
10
+ * which may reach a browser bundle. So the catalogue is DERIVED on the build side, where those
11
+ * vocabularies are available (`derivePublicPricingCatalog` in `./public-pricing-catalog.shared`), and
12
+ * crosses into the browser as the plain shape declared here.
13
+ *
14
+ * ## Why a price carries `amountMinor` as a STRING
15
+ *
16
+ * A `z_money` amount is a `bigint` in minor units. A bigint does not survive `JSON.stringify` (it
17
+ * throws), and the catalogue crosses Astro's island serialization boundary, so it travels as the
18
+ * decimal digits of that integer — lossless, where a `number` would not be for large amounts.
19
+ */
20
+ /** @wildo_source:part:start saas.models.billing.catalog-vocabularies facet:layer:shared facet:audience:app-developer */
21
+ /**
22
+ * How much of a product's price a pricing surface may state.
23
+ *
24
+ * The catalogue always carries typed prices — a product cannot sync to the billing provider
25
+ * without one — but a commercial offer is not always fully decided by them. A plan sold as "per
26
+ * member, plus a platform fee we quote" has a real unit price and an unsettled total; an
27
+ * enterprise plan sold by a sales conversation may carry a placeholder price nobody should read.
28
+ * Before this vocabulary existed, every pricing surface either printed that price as if it were
29
+ * the whole offer, or kept its own hand-written list of exceptions (#1835).
30
+ *
31
+ * This is a DISPLAY fact and deliberately NOT an acquisition gate: a customer handed a checkout
32
+ * link for an on-request plan by a salesperson must still be able to pay it, for the same reason a
33
+ * private-but-active plan stays purchasable. Whether the product can
34
+ * be bought today is {@link ProductAvailability}'s question.
35
+ */
36
+ export declare enum ProductPriceDisclosure {
37
+ /** The listed prices ARE the offer: a pricing page states them, and structured data may publish them. */
38
+ LISTED = "listed",
39
+ /**
40
+ * The listed price is a FLOOR: part of the total is not settled (a quoted fee, a volume term).
41
+ * A pricing page states it as a starting price, and structured data must not publish it as the
42
+ * price, because a search engine would show it as the whole offer.
43
+ */
44
+ STARTING_AT = "starting_at",
45
+ /** No price is stated: the offer is quoted on request (a "contact sales" plan). */
46
+ ON_REQUEST = "on_request"
47
+ }
48
+ /**
49
+ * Whether a product can be bought today.
50
+ *
51
+ * Distinct from `Product.isActive`, which is RETIREMENT — a product the catalogue withdrew, no
52
+ * longer sold and no longer offered. An UPCOMING product is the opposite end of the same life: it is
53
+ * announced on pricing surfaces so a visitor can see where the product is going, and it cannot be
54
+ * bought yet. Folding it into `isActive: false` would hide it from the very pages that announce it.
55
+ */
56
+ export declare enum ProductAvailability {
57
+ /** On sale: the acquisition doors accept it (subject to retirement). */
58
+ AVAILABLE = "available",
59
+ /** Announced, not yet on sale: listed on pricing surfaces, refused at every acquisition door. */
60
+ UPCOMING = "upcoming"
61
+ }
62
+ /** @wildo_source:part:end saas.models.billing.catalog-vocabularies */
63
+ /**
64
+ * How a public price RECURS, as a pricing page states it.
65
+ *
66
+ * Not a copy of the provider's `BillingInterval`: that vocabulary has no member for a one-time price
67
+ * (an absent interval means one-time), and this one must name it, because "once" and "per month" are
68
+ * different sentences on a pricing page. Every `BillingInterval` member maps onto one of these in
69
+ * `derivePublicPricingCatalog`, through a table that is total over it.
70
+ */
71
+ export declare enum PublicPricingRecurrenceUnit {
72
+ /** Paid once — no recurrence. */
73
+ ONE_TIME = "one_time",
74
+ /** Recurs every `count` months. */
75
+ MONTH = "month",
76
+ /** Recurs every `count` years. */
77
+ YEAR = "year"
78
+ }
79
+ /**
80
+ * What one public price amount MEANS.
81
+ *
82
+ * A single amount can state a flat price or a per-unit price. It cannot state a tiered, graduated or
83
+ * package price, whose total depends on quantity; for those the amount is indicative only, so no
84
+ * surface may present it — or publish it in structured data — as the price.
85
+ */
86
+ export declare enum PublicPricingAmountBasis {
87
+ /** The amount is the whole price for the period. */
88
+ FLAT = "flat",
89
+ /** The amount is per unit (a seat, a member) for the period. */
90
+ PER_UNIT = "per_unit",
91
+ /** The total depends on quantity (tiered, graduated, package): the amount is indicative only. */
92
+ VARIABLE = "variable"
93
+ }
94
+ /** One public price of a plan. */
95
+ export interface PublicPricingPrice {
96
+ /** The price amount in the currency's MINOR units, as decimal digits (see the file header). */
97
+ readonly amountMinor: string;
98
+ /** How many decimal places `amountMinor` carries: the value is `amountMinor / 10 ** decimals`. */
99
+ readonly decimals: number;
100
+ /** ISO 4217 currency code. */
101
+ readonly currency: string;
102
+ readonly recurrence: {
103
+ readonly unit: PublicPricingRecurrenceUnit;
104
+ readonly count: number;
105
+ };
106
+ readonly amountBasis: PublicPricingAmountBasis;
107
+ /** The price the catalogue marks as the plan's default. */
108
+ readonly isDefault: boolean;
109
+ }
110
+ /** One public plan: a product the catalogue lists publicly, with its pricing-surface facts resolved. */
111
+ export interface PublicPricingPlan {
112
+ /** The catalogue key — also the label namespace a surface names the plan by. */
113
+ readonly key: string;
114
+ readonly planTier?: string;
115
+ /** Ascending order on a pricing surface. */
116
+ readonly sortOrder: number;
117
+ /** The scopes that may subscribe (wire values of `ResourcePrimaryScope`). */
118
+ readonly targetScopes: readonly string[];
119
+ readonly isRecommended: boolean;
120
+ readonly priceDisclosure: ProductPriceDisclosure;
121
+ readonly availability: ProductAvailability;
122
+ /** Free-trial length when the plan offers one. */
123
+ readonly trialDays?: number;
124
+ readonly prices: readonly PublicPricingPrice[];
125
+ }
126
+ /** The public pricing catalogue: every publicly listed plan, in display order. */
127
+ export interface PublicPricingCatalog {
128
+ readonly plans: readonly PublicPricingPlan[];
129
+ }
130
+ /**
131
+ * The amount of a public price as a plain decimal string (`"4"`, `"29.9"`, `"0.0001"`), exact — no
132
+ * floating point. What structured data publishes as `price`, and what a surface formats for display.
133
+ */
134
+ export declare function publicPricingAmountDecimal(price: Pick<PublicPricingPrice, 'amountMinor' | 'decimals'>): string;
135
+ //# sourceMappingURL=public-pricing-catalog.shared.atoms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-pricing-catalog.shared.atoms.d.ts","sourceRoot":"","sources":["../../../../src/billing/public-pricing-catalog.shared.at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