@wildo-ai/saas-models 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (869) hide show
  1. package/dist/esm/__tests__/setup.d.ts.map +1 -1
  2. package/dist/esm/__tests__/setup.js.map +1 -1
  3. package/dist/esm/_inspect.d.ts.map +1 -1
  4. package/dist/esm/_inspect.js.map +1 -1
  5. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -1
  7. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/application-subject.shared.schemas.js.map +1 -1
  9. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  10. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  11. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  12. package/dist/esm/applications/applications-context.schemas.js.map +1 -1
  13. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  14. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  15. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  16. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  17. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  18. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  19. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  20. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
  21. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  22. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  23. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  24. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  25. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  26. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  28. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
  29. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  30. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
  31. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  32. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
  33. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  34. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
  35. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  36. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  37. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  38. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  39. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  40. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  41. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  42. package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
  43. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  44. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  45. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  46. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  47. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  48. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  49. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  50. package/dist/esm/billing/promotions.shared.schemas.js.map +1 -1
  51. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -1
  52. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -1
  53. package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -1
  54. package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -1
  55. package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -1
  56. package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -1
  57. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  58. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  59. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  60. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  61. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  62. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  63. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  64. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  65. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -1
  66. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -1
  67. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  68. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -1
  69. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  70. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  71. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  72. package/dist/esm/charts/aggregation-query.shared.schemas.js.map +1 -1
  73. package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -1
  74. package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -1
  75. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  76. package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -1
  77. package/dist/esm/companion/artifact-placement.shared.definitions.d.ts.map +1 -1
  78. package/dist/esm/companion/artifact-placement.shared.definitions.js.map +1 -1
  79. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  80. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  81. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  82. package/dist/esm/companion/shared-library-companion.shared.definitions.js.map +1 -1
  83. package/dist/esm/companion-exports.d.ts.map +1 -1
  84. package/dist/esm/companion-exports.js.map +1 -1
  85. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  86. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  87. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
  88. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
  89. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
  90. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -1
  91. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  92. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -1
  93. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  94. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
  95. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  96. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  97. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  98. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  99. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  100. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  101. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts.map +1 -1
  102. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js.map +1 -1
  103. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -1
  104. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -1
  105. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  107. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -1
  108. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -1
  109. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -1
  110. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -1
  111. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  112. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  113. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -1
  114. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -1
  115. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  116. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  117. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -1
  118. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -1
  119. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -1
  120. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -1
  121. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
  122. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
  123. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  124. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
  125. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  126. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
  127. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -1
  128. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -1
  129. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -1
  130. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -1
  131. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -1
  132. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -1
  133. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  134. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  135. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  136. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  137. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  138. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.js.map +1 -1
  139. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  140. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js.map +1 -1
  141. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  142. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  143. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -1
  144. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -1
  145. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -1
  146. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -1
  147. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  148. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  149. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -1
  150. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -1
  151. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -1
  152. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -1
  153. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -1
  154. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -1
  155. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  156. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -1
  157. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -1
  158. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -1
  159. package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -1
  160. package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -1
  161. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -1
  162. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -1
  163. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -1
  164. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -1
  165. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  166. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  167. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  168. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -1
  169. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  170. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  171. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -1
  172. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -1
  173. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -1
  174. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -1
  175. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  176. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  177. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  178. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  179. package/dist/esm/config/app-frontend-type.shared.schemas.d.ts.map +1 -1
  180. package/dist/esm/config/app-frontend-type.shared.schemas.js.map +1 -1
  181. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  182. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  183. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  184. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  185. package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -1
  186. package/dist/esm/config/configuration-validation.shared.schemas.js.map +1 -1
  187. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  188. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  189. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +22 -22
  190. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  191. package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
  192. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  193. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  194. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  195. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  196. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  197. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  198. package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
  199. package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
  200. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  201. package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -1
  202. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  203. package/dist/esm/config-authoring.entry.js.map +1 -1
  204. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  205. package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
  206. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  207. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -1
  208. package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -1
  209. package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -1
  210. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  211. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  212. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  213. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  214. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  215. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  216. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  217. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  218. package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -1
  219. package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -1
  220. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
  221. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
  222. package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -1
  223. package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -1
  224. package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -1
  225. package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -1
  226. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -1
  227. package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -1
  228. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -1
  229. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -1
  230. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  231. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  232. package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -1
  233. package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -1
  234. package/dist/esm/external-data.exports.d.ts.map +1 -1
  235. package/dist/esm/external-data.exports.js.map +1 -1
  236. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  237. package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -1
  238. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  239. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  240. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  241. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  242. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -1
  243. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
  244. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  245. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  246. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  247. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.map +1 -1
  248. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  249. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  250. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  251. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  252. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  253. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  254. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  255. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  256. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -1
  257. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -1
  258. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -1
  259. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -1
  260. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -1
  261. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -1
  262. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -1
  263. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -1
  264. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
  265. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
  266. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  268. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  269. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  270. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  271. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  272. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  273. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  274. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  275. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  276. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -1
  277. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -1
  278. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  279. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  280. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -1
  281. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -1
  282. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -1
  283. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -1
  284. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  285. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  286. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -1
  287. package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -1
  288. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -1
  289. package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -1
  290. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  291. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
  292. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  293. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  294. package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
  295. package/dist/esm/features/connected-feature.example.js.map +1 -1
  296. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  297. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  298. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  299. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  300. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  301. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
  302. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  303. package/dist/esm/features/feature-registry.shared.js.map +1 -1
  304. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  305. package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
  306. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  307. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  308. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  309. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  310. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  311. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  312. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  313. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  314. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  315. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  316. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  317. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  318. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  319. package/dist/esm/files/files.shared.utils.js.map +1 -1
  320. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  321. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -1
  322. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  323. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -1
  324. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  325. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -1
  326. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  327. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.map +1 -1
  328. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  329. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  330. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  331. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
  332. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -1
  333. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -1
  334. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -1
  335. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -1
  336. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +2 -2
  337. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  338. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  339. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -1
  340. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -1
  341. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  342. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  343. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -1
  344. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -1
  345. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  346. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -1
  347. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  348. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  349. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  350. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -1
  351. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  352. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -1
  353. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  354. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  355. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  356. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  357. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  358. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  359. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  360. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  361. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  362. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.js.map +1 -1
  363. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  364. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  365. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  366. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  367. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
  368. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
  369. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  370. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  371. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -1
  372. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -1
  373. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -1
  374. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -1
  375. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -1
  376. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -1
  377. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -1
  378. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -1
  379. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -1
  380. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -1
  381. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  382. package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
  383. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
  384. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
  385. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
  386. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
  387. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -1
  388. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -1
  389. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  390. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  391. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -1
  392. package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -1
  393. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
  394. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
  395. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  396. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  397. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  398. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  399. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  400. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
  401. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  402. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  403. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  404. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  405. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  406. package/dist/esm/guidance/lifecycle-config.shared.schemas.js.map +1 -1
  407. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  408. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
  409. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  410. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  411. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  412. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  413. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  414. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  415. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -1
  416. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -1
  417. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  418. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
  419. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  420. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  421. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  422. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  423. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  424. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  425. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -1
  426. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -1
  427. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -1
  428. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -1
  429. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
  430. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
  431. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -1
  432. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -1
  433. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -1
  434. package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -1
  435. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -1
  436. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -1
  437. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -1
  438. package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -1
  439. package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -1
  440. package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -1
  441. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  442. package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
  443. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -1
  444. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -1
  445. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -1
  446. package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -1
  447. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -1
  448. package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -1
  449. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -1
  450. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -1
  451. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -1
  452. package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -1
  453. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -1
  454. package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -1
  455. package/dist/esm/index.d.ts.map +1 -1
  456. package/dist/esm/index.js.map +1 -1
  457. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
  458. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -1
  459. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
  460. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -1
  461. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -1
  462. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -1
  463. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  464. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  465. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  466. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  467. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
  468. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
  469. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
  470. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -1
  471. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  472. package/dist/esm/meta-workflows.exports.js.map +1 -1
  473. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  474. package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
  475. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  476. package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
  477. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -1
  478. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -1
  479. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  480. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  481. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  482. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  483. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -1
  484. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -1
  485. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -1
  486. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -1
  487. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  488. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js.map +1 -1
  489. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  490. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  491. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  492. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  493. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  494. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  495. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  496. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  497. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  498. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  499. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  500. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  501. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  502. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  503. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  504. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  505. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -1
  506. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -1
  507. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  508. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  509. package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
  510. package/dist/esm/organizations/organization-features.shared.schemas.js.map +1 -1
  511. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  512. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  513. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  514. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  515. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  516. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js.map +1 -1
  517. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  518. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  519. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  520. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js.map +1 -1
  521. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  522. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  523. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  524. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js.map +1 -1
  525. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  526. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  527. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  528. package/dist/esm/organizations/organization-unit-inheritance.shared.js.map +1 -1
  529. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  530. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
  531. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  532. package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
  533. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  534. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
  535. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  536. package/dist/esm/organizations/organization-unit-narrowing.example.js.map +1 -1
  537. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  538. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  539. package/dist/esm/organizations/organization-units.shared.path.d.ts.map +1 -1
  540. package/dist/esm/organizations/organization-units.shared.path.js.map +1 -1
  541. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  542. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  543. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  544. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  545. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  546. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  547. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  548. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  549. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -1
  550. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -1
  551. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -1
  552. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -1
  553. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -1
  554. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -1
  555. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -1
  556. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -1
  557. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -1
  558. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -1
  559. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -1
  560. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -1
  561. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -1
  562. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -1
  563. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  564. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  565. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  566. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  567. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  568. package/dist/esm/public-runtime/index.js.map +1 -1
  569. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  570. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  571. package/dist/esm/queue/jobs.shared.schemas.d.ts +8 -8
  572. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  573. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  574. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  575. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  576. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  577. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  578. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  579. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  580. package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
  581. package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
  582. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -1
  583. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -1
  584. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  585. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  586. package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
  587. package/dist/esm/requests/http-requests.shared.js.map +1 -1
  588. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -1
  589. package/dist/esm/requests/idempotency-key.shared.js.map +1 -1
  590. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  591. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  592. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  593. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  594. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  595. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  596. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  597. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  598. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  599. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  600. package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -1
  601. package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -1
  602. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  603. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  604. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -1
  605. package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -1
  606. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  607. package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -1
  608. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  609. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  610. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  611. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  612. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  613. package/dist/esm/resources/resources-registry.shared.core.definitions.js +18 -2
  614. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  615. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  616. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  617. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  618. package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -1
  619. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  620. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  621. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  622. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  623. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  624. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  625. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  626. package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
  627. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  628. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  629. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  630. package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -1
  631. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  632. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -1
  633. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -1
  634. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -1
  635. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  636. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.map +1 -1
  637. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  638. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  639. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -1
  640. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -1
  641. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -1
  642. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -1
  643. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -1
  644. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -1
  645. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  646. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js.map +1 -1
  647. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
  648. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
  649. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  650. package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
  651. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -1
  652. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -1
  653. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  654. package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -1
  655. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  656. package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
  657. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  658. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
  659. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  660. package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
  661. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  662. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
  663. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  664. package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
  665. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  666. package/dist/esm/resources/utils/resource-subtree.utils.js.map +1 -1
  667. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  668. package/dist/esm/resources/utils/resources-config-context-needs.utils.js.map +1 -1
  669. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  670. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  671. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  672. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  673. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  674. package/dist/esm/resources/utils/resources-config-operations.path.utils.js.map +1 -1
  675. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  676. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  677. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  678. package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
  679. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  680. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
  681. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  682. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  683. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  684. package/dist/esm/resources/utils/schema-family-builder.utils.js.map +1 -1
  685. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  686. package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
  687. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  688. package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
  689. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  690. package/dist/esm/resources/utils/schema-variant-resolver.utils.js.map +1 -1
  691. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  692. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  693. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  694. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  695. package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -1
  696. package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -1
  697. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  698. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  699. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  700. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
  701. package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
  702. package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -1
  703. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  704. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  705. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  706. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  707. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  708. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
  709. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  710. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +1 -1
  711. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  712. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  713. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  714. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  715. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  716. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  717. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  718. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  719. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  720. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  721. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -1
  722. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -1
  723. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -1
  724. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -1
  725. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  726. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -1
  727. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  728. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  729. package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts.map +1 -1
  730. package/dist/esm/security/authentications/same-origin-redirect-path.shared.js.map +1 -1
  731. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  732. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  733. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  734. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  735. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  736. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  737. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  738. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  739. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  740. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
  741. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -1
  742. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -1
  743. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  744. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  745. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  746. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js.map +1 -1
  747. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -1
  748. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -1
  749. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -1
  750. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -1
  751. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  752. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  753. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  754. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  755. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  756. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  757. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  758. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  759. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  760. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  761. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  762. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  763. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  764. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  765. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  766. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  767. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  768. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  769. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  770. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  771. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  772. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  773. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  774. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  775. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  776. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  777. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  778. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  779. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  780. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  781. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -1
  782. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -1
  783. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  784. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  785. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  786. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  787. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  788. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  789. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -1
  790. package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -1
  791. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
  792. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -1
  793. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  794. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  795. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  796. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  797. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  798. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  799. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  800. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -1
  801. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  802. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  803. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  804. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -1
  805. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
  806. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
  807. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -1
  808. package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -1
  809. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -1
  810. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -1
  811. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -1
  812. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -1
  813. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
  814. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
  815. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -1
  816. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -1
  817. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
  818. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
  819. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
  820. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
  821. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
  822. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
  823. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -1
  824. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -1
  825. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  826. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  827. package/dist/esm/testing.d.ts.map +1 -1
  828. package/dist/esm/testing.js.map +1 -1
  829. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  830. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  831. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  832. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  833. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  834. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  835. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  836. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  837. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  838. package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
  839. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -1
  840. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -1
  841. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  842. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
  843. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  844. package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
  845. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  846. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
  847. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  848. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  849. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  850. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  851. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  852. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  853. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  854. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  855. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  856. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  857. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  858. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
  859. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  860. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  861. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  862. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  863. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  864. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  865. package/dist/tsconfig.build.tsbuildinfo +1 -0
  866. package/package.json +4 -4
  867. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +0 -0
  868. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +0 -0
  869. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"file-upload-grant.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/files/file-upload-grant.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC,KAAK,CAAC;AACpD,eAAO,MAAM,sCAAsC,KAAK,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,uEAAwE,CAAC;AAClH,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AACrF,uHAAuH;AACvH,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CAAC;KAAG,CAAC,IAAI,wBAAwB,GAAG,CAAC;CAAE,CAAwC,CAAC;AAEtI;;;GAGG;AACH,oBAAY,oBAAoB;IAC9B,kFAAkF;IAClF,OAAO,YAAY;IACnB,mGAAmG;IACnG,QAAQ,aAAa;IACrB,+DAA+D;IAC/D,OAAO,YAAY;IACnB,mEAAmE;IACnE,OAAO,YAAY;CACpB;AACD,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,oBAAoB,CAAgC,CAAC;AAE/G;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,SAAS,CAAC;IAC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,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,SAAS,CAAC;IACzD,gBAAgB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CAClC,CAQU,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,2DAA2D"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-upload-grant.shared.schemas.js","sourceRoot":"","sources":["../../../../src/files/file-upload-grant.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,eAAe,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,CAAC;AACpD,MAAM,CAAC,MAAM,sCAAsC,GAAG,EAAE,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,CAAC,MAAM,CAAU,CAAC;AAElH,uHA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,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrF,CAAC,CAAC;AAGH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAKxC,CAAC,CAAC,MAAM,CAAC;IACZ,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC,QAAQ,EAAE;IAChG,8GAA8G;IAC9G,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC3C,6EAA6E;IAC7E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC/C,8EAA8E;IAC9E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,2DAA2D","sourcesContent":["import { z } from 'zod';\nimport { FileUploaderEntityType } from '@wildo-ai/zod-decorators';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { FileStatus } from './files.shared.schemas';\n\n/**\n * File upload grant — the shared contract between the two mint doors (REST, MCP), the upload route,\n * the status read, and the browser drop page (issue #312).\n *\n * A grant is a single-use consumable token. Nothing durable is created at mint but the token: an\n * abandoned grant leaves a dead token and nothing else. The upload itself goes through the resource's\n * EXISTING file-upload route, authenticated by the grant alone, and the ordinary authorizer decides.\n */\n\n/**\n * Public frontend route the browser drop page lives on; the token follows as the next path segment\n * (`/upload-grant/<token>`). Declared HERE so the backend (which builds `uploadPageUrl`) and the\n * frontend (which mounts the route) read one source — the backend cannot import frontend route\n * constants.\n */\nexport const FILE_UPLOAD_GRANT_PAGE_PATH = '/upload-grant';\n\n/** @wildo_source:part:start saas.models.file-upload-grant facet:layer:shared facet:family:files\n *\n * Lifetime bounds of an upload grant, in minutes. The ceiling is fixed by the framework and enforced\n * when the grant is minted — a request above it is REFUSED, never clamped, so a caller that asked for\n * two hours learns from an error that the bound is sixty minutes rather than from an expiry it did not\n * expect. The bound is the framework's to own because the grant is designed to leave the trust\n * boundary: it lands in an AI agent's transcript, a model provider's logs, a shell history.\n */\nexport const FILE_UPLOAD_GRANT_DEFAULT_MINUTES = 15;\nexport const FILE_UPLOAD_GRANT_ABSOLUTE_MAX_MINUTES = 60;\n\n/**\n * Which write the grant is for. A grant minted on the CREATE upload route uploads a file that a\n * later CREATE will reference; one minted on the UPDATE route (`…/{resourceId}/files/<field>`) is\n * bound to that row. The two routes authorize differently, so a grant may not cross from one to the\n * other — the upload middleware checks this against the route it is presented on.\n */\nexport const FILE_UPLOAD_GRANT_OPERATIONS = [CoreResourceOperation.CREATE, CoreResourceOperation.UPDATE] as const;\nexport type FileUploadGrantOperation = (typeof FILE_UPLOAD_GRANT_OPERATIONS)[number];\n/** Derived from `CoreResourceOperation` — the named source — rather than a second enum spelling the same two words. */\nexport const FileUploadGrantOperationSchema: z.ZodEnum<{ [K in FileUploadGrantOperation]: K }> = z.enum(FILE_UPLOAD_GRANT_OPERATIONS);\n\n/**\n * Lifecycle of a grant as the status read reports it. Derived from the token row — `isConsumed`,\n * `expiresAt`, `revokedAt` — never stored, so it cannot drift from the row.\n */\nexport enum FileUploadGrantState {\n /** Minted, unexpired, unrevoked, not yet redeemed: an upload will be accepted. */\n PENDING = 'pending',\n /** Redeemed by exactly one upload. `file` names what it produced when the write-back succeeded. */\n REDEEMED = 'redeemed',\n /** Past `expiresAt` without being redeemed. Mint a new one. */\n EXPIRED = 'expired',\n /** Revoked by the minter or an administrator before redemption. */\n REVOKED = 'revoked',\n}\nexport const FileUploadGrantStateSchema: z.ZodEnum<typeof FileUploadGrantState> = z.enum(FileUploadGrantState);\n\n/**\n * The `metadata` a FILE_UPLOAD_GRANT token carries — the ROUTE binding, as opposed to the identity\n * the typed token fields carry. The upload middleware reads this; the execution-context creator\n * deliberately does not.\n */\nexport const FileUploadGrantMetadataSchema: z.ZodObject<{\n fieldName: z.ZodString;\n operation: z.ZodEnum<{ [K in FileUploadGrantOperation]: K }>;\n minter: z.ZodObject<{ entityType: z.ZodEnum<typeof FileUploaderEntityType>; id: z.ZodString }>;\n uploadUrl: z.ZodString;\n producedFileId: z.ZodOptional<z.ZodString>;\n}> = z.object({\n /** The `z_file()` field the upload lands on, as authored (dotted for nested fields). */\n fieldName: z.string().min(1),\n operation: FileUploadGrantOperationSchema,\n /**\n * Who minted — recorded so the uploaded file is attributed to a PERSON or MACHINE, not to the\n * grant.\n *\n * `entityType` is the ENUM, not a string. It was `z.string().min(1)` until 2026-09-08, with the\n * stated reason that \"the uploader enum lives in `zod-decorators`, upstream of this package\" —\n * which is exactly backwards: upstream is what a package MAY import, and this one already does.\n * `files.shared.schemas.ts` in this very directory imports `FileUploaderEntityType` from\n * `@wildo-ai/zod-decorators`, re-exports it, and writes `z.enum(FileUploaderEntityType)` on the\n * FILES row's own `uploadedByEntityType`. So the vocabulary was one import away the whole time and\n * the metadata's copy of the same field was the only one left open.\n *\n * What the enum buys: `metadata` is an UNTYPED bag on the token row, so nothing between the write\n * and the read guarantees its shape — the read is the only place that can. Every reader here goes\n * through `FileUploadGrantMetadataSchema.safeParse`, so an out-of-vocabulary entity type now makes\n * the whole metadata unparseable and the redemption path refuses the grant instead of casting the\n * value into `FileUploaderPrincipal` and carrying it three layers to `validateUploadedByEntityType`.\n *\n * NOT narrowed to the three values `mint` can actually produce (mint refuses an anonymous and a\n * token-borne minter, so `ANONYMOUS_USER` is unreachable): that refusal is a MINT policy, enforced\n * and explained at mint, and re-encoding it here would put half a policy in a schema that cannot\n * say why. The vocabulary of this field is the vocabulary of the principal it names.\n */\n minter: z.object({ entityType: z.enum(FileUploaderEntityType), id: z.string().min(1) }),\n /**\n * The concrete upload URL the grant was minted for. Two jobs, and the second one is why it must be\n * absolute: the status read hands it to the drop page, AND the redemption path compares its PATH\n * against the route the token is presented on (`assertGrantMatchesRoute`). Until 2026-09-08 it was\n * recorded and never read back, so a grant bound to one concrete route could be redeemed on any\n * other route reaching the same (resource, field, operation, row).\n */\n uploadUrl: z.string().url(),\n /** Written after a successful redemption; absent until then. */\n producedFileId: z.string().min(1).optional(),\n});\nexport type FileUploadGrantMetadata = z.infer<typeof FileUploadGrantMetadataSchema>;\n\n/**\n * What a mint returns — identical on the REST door and the MCP tool. Two affordances for one\n * token: `uploadCommand` for a caller that can execute, `uploadPageUrl` for one that must hand a\n * human a link. The token appears in `uploadHeader.value` and inside both commands and the page URL;\n * it is the credential and cannot be omitted. It never appears in any audit row.\n */\nexport const FileUploadGrantSchema: z.ZodObject<{\n grantId: z.ZodString;\n state: z.ZodEnum<typeof FileUploadGrantState>;\n expiresAt: z.ZodString;\n singleUse: z.ZodLiteral<true>;\n target: z.ZodObject<{\n resourceType: z.ZodString;\n fieldName: z.ZodString;\n operation: z.ZodEnum<{ [K in FileUploadGrantOperation]: K }>;\n resourceId: z.ZodNullable<z.ZodString>;\n }>;\n constraints: z.ZodObject<{\n maxBytes: z.ZodNumber;\n allowedMimeTypes: z.ZodArray<z.ZodString>;\n }>;\n uploadUrl: z.ZodString;\n uploadHeader: z.ZodObject<{ name: z.ZodString; value: z.ZodString }>;\n uploadCommand: z.ZodString;\n uploadCommandPowerShell: z.ZodString;\n uploadPageUrl: z.ZodNullable<z.ZodString>;\n statusUrl: z.ZodString;\n note: z.ZodString;\n}> = z.object({\n grantId: z.string().min(1),\n state: FileUploadGrantStateSchema,\n expiresAt: z.string().datetime(),\n singleUse: z.literal(true),\n target: z.object({\n resourceType: z.string().min(1),\n fieldName: z.string().min(1),\n operation: FileUploadGrantOperationSchema,\n resourceId: z.string().min(1).nullable(),\n }),\n /** From the field's own constraint resolver — the same one the upload enforces, so the two cannot disagree. */\n constraints: z.object({\n maxBytes: z.number().int().positive(),\n /** Empty means every type is accepted. */\n allowedMimeTypes: z.array(z.string()),\n }),\n uploadUrl: z.string().url(),\n /** The credential travels in a HEADER on the curl form: paths are logged by every proxy, headers are not. */\n uploadHeader: z.object({ name: z.string().min(1), value: z.string().min(1) }),\n /** No `-f`: on a refusal the JSON error body is the only thing that tells the caller why. */\n uploadCommand: z.string().min(1),\n /** In PowerShell `curl` aliases Invoke-WebRequest, which does not understand `-F`; the real binary is `curl.exe`. */\n uploadCommandPowerShell: z.string().min(1),\n /** `null` when the application declares no frontend service — a headless API has no page to hand a human. */\n uploadPageUrl: z.string().url().nullable(),\n statusUrl: z.string().url(),\n note: z.string().min(1),\n});\nexport type FileUploadGrant = z.infer<typeof FileUploadGrantSchema>;\n\n/**\n * What the public status read returns. The token is the credential, so the read is unauthenticated\n * and returns only what the drop page needs to render and the agent needs to learn the `fileId`:\n * never the file's name (the status URL may be pasted around).\n */\nexport const FileUploadGrantStatusSchema: z.ZodObject<{\n grantId: z.ZodString;\n state: z.ZodEnum<typeof FileUploadGrantState>;\n expiresAt: z.ZodString;\n target: z.ZodObject<{\n resourceType: z.ZodString;\n fieldName: z.ZodString;\n operation: z.ZodEnum<{ [K in FileUploadGrantOperation]: K }>;\n resourceId: z.ZodNullable<z.ZodString>;\n }>;\n constraints: z.ZodObject<{ maxBytes: z.ZodNumber; allowedMimeTypes: z.ZodArray<z.ZodString> }>;\n uploadUrl: z.ZodString;\n uploadHeaderName: z.ZodString;\n file: z.ZodNullable<z.ZodObject<{ fileId: z.ZodString; status: z.ZodEnum<typeof FileStatus> }>>;\n}> = z.object({\n grantId: z.string().min(1),\n state: FileUploadGrantStateSchema,\n expiresAt: z.string().datetime(),\n target: z.object({\n resourceType: z.string().min(1),\n fieldName: z.string().min(1),\n operation: FileUploadGrantOperationSchema,\n resourceId: z.string().min(1).nullable(),\n }),\n constraints: z.object({ maxBytes: z.number().int().positive(), allowedMimeTypes: z.array(z.string()) }),\n uploadUrl: z.string().url(),\n /** The page sets this header itself; the token it already holds is the value. */\n uploadHeaderName: z.string().min(1),\n /** `null` until redeemed, or when the post-redemption write-back failed (re-read the resource instead). */\n file: z.object({ fileId: z.string().min(1), status: z.enum(FileStatus) }).nullable(),\n});\nexport type FileUploadGrantStatus = z.infer<typeof FileUploadGrantStatusSchema>;\n\n/**\n * Body accepted by both mint doors.\n *\n * The three optional file facts mirror what the MCP File Objects proposal has a client declare when\n * it asks to upload (`name`, `mimeType`, `size`): declaring them lets the server refuse a file the\n * field would never accept BEFORE handing out a link, instead of at redemption when the link is\n * already spent. They are advisory for the upload itself — the bytes are validated on receipt\n * regardless — and a declaration that later disagrees with the bytes is refused on receipt too.\n */\nexport const FileUploadGrantMintRequestSchema: z.ZodObject<{\n expiresInMinutes: z.ZodOptional<z.ZodNumber>;\n name: z.ZodOptional<z.ZodString>;\n mimeType: z.ZodOptional<z.ZodString>;\n size: z.ZodOptional<z.ZodNumber>;\n}> = z.object({\n expiresInMinutes: z.number().int().min(1).max(FILE_UPLOAD_GRANT_ABSOLUTE_MAX_MINUTES).optional(),\n /** The file name the caller intends to upload; used for the curl example and checked against nothing else. */\n name: z.string().min(1).max(255).optional(),\n /** Declared MIME type; refused at mint when the field does not accept it. */\n mimeType: z.string().min(1).max(255).optional(),\n /** Declared size in bytes; refused at mint when above the field's maximum. */\n size: z.number().int().positive().optional(),\n}).strict();\nexport type FileUploadGrantMintRequest = z.infer<typeof FileUploadGrantMintRequestSchema>;\n/** @wildo_source:part:end saas.models.file-upload-grant */\n"]}
1
+ {"version":3,"file":"file-upload-grant.shared.schemas.js","sourceRoot":"","sources":["../../../src/files/file-upload-grant.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,wB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AC,EAAE,CAAC;IACvG,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC3B,iFAAiF;IACjF,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,2GAA2G;IAC3G,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrF,CAAC,CAAC;AAGH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAKxC,CAAC,CAAC,MAAM,CAAC;IACZ,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC,QAAQ,EAAE;IAChG,8GAA8G;IAC9G,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC3C,6EAA6E;IAC7E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC/C,8EAA8E;IAC9E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,2DAA2D","sourcesContent":["import { z } from 'zod';\nimport { FileUploaderEntityType } from '@wildo-ai/zod-decorators';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { FileStatus } from './files.shared.schemas';\n\n/**\n * File upload grant — the shared contract between the two mint doors (REST, MCP), the upload route,\n * the status read, and the browser drop page (issue #312).\n *\n * A grant is a single-use consumable token. Nothing durable is created at mint but the token: an\n * abandoned grant leaves a dead token and nothing else. The upload itself goes through the resource's\n * EXISTING file-upload route, authenticated by the grant alone, and the ordinary authorizer decides.\n */\n\n/**\n * Public frontend route the browser drop page lives on; the token follows as the next path segment\n * (`/upload-grant/<token>`). Declared HERE so the backend (which builds `uploadPageUrl`) and the\n * frontend (which mounts the route) read one source — the backend cannot import frontend route\n * constants.\n */\nexport const FILE_UPLOAD_GRANT_PAGE_PATH = '/upload-grant';\n\n/** @wildo_source:part:start saas.models.file-upload-grant facet:layer:shared facet:family:files\n *\n * Lifetime bounds of an upload grant, in minutes. The ceiling is fixed by the framework and enforced\n * when the grant is minted — a request above it is REFUSED, never clamped, so a caller that asked for\n * two hours learns from an error that the bound is sixty minutes rather than from an expiry it did not\n * expect. The bound is the framework's to own because the grant is designed to leave the trust\n * boundary: it lands in an AI agent's transcript, a model provider's logs, a shell history.\n */\nexport const FILE_UPLOAD_GRANT_DEFAULT_MINUTES = 15;\nexport const FILE_UPLOAD_GRANT_ABSOLUTE_MAX_MINUTES = 60;\n\n/**\n * Which write the grant is for. A grant minted on the CREATE upload route uploads a file that a\n * later CREATE will reference; one minted on the UPDATE route (`…/{resourceId}/files/<field>`) is\n * bound to that row. The two routes authorize differently, so a grant may not cross from one to the\n * other — the upload middleware checks this against the route it is presented on.\n */\nexport const FILE_UPLOAD_GRANT_OPERATIONS = [CoreResourceOperation.CREATE, CoreResourceOperation.UPDATE] as const;\nexport type FileUploadGrantOperation = (typeof FILE_UPLOAD_GRANT_OPERATIONS)[number];\n/** Derived from `CoreResourceOperation` — the named source — rather than a second enum spelling the same two words. */\nexport const FileUploadGrantOperationSchema: z.ZodEnum<{ [K in FileUploadGrantOperation]: K }> = z.enum(FILE_UPLOAD_GRANT_OPERATIONS);\n\n/**\n * Lifecycle of a grant as the status read reports it. Derived from the token row — `isConsumed`,\n * `expiresAt`, `revokedAt` — never stored, so it cannot drift from the row.\n */\nexport enum FileUploadGrantState {\n /** Minted, unexpired, unrevoked, not yet redeemed: an upload will be accepted. */\n PENDING = 'pending',\n /** Redeemed by exactly one upload. `file` names what it produced when the write-back succeeded. */\n REDEEMED = 'redeemed',\n /** Past `expiresAt` without being redeemed. Mint a new one. */\n EXPIRED = 'expired',\n /** Revoked by the minter or an administrator before redemption. */\n REVOKED = 'revoked',\n}\nexport const FileUploadGrantStateSchema: z.ZodEnum<typeof FileUploadGrantState> = z.enum(FileUploadGrantState);\n\n/**\n * The `metadata` a FILE_UPLOAD_GRANT token carries — the ROUTE binding, as opposed to the identity\n * the typed token fields carry. The upload middleware reads this; the execution-context creator\n * deliberately does not.\n */\nexport const FileUploadGrantMetadataSchema: z.ZodObject<{\n fieldName: z.ZodString;\n operation: z.ZodEnum<{ [K in FileUploadGrantOperation]: K }>;\n minter: z.ZodObject<{ entityType: z.ZodEnum<typeof FileUploaderEntityType>; id: z.ZodString }>;\n uploadUrl: z.ZodString;\n producedFileId: z.ZodOptional<z.ZodString>;\n}> = z.object({\n /** The `z_file()` field the upload lands on, as authored (dotted for nested fields). */\n fieldName: z.string().min(1),\n operation: FileUploadGrantOperationSchema,\n /**\n * Who minted — recorded so the uploaded file is attributed to a PERSON or MACHINE, not to the\n * grant.\n *\n * `entityType` is the ENUM, not a string. It was `z.string().min(1)` until 2026-09-08, with the\n * stated reason that \"the uploader enum lives in `zod-decorators`, upstream of this package\" —\n * which is exactly backwards: upstream is what a package MAY import, and this one already does.\n * `files.shared.schemas.ts` in this very directory imports `FileUploaderEntityType` from\n * `@wildo-ai/zod-decorators`, re-exports it, and writes `z.enum(FileUploaderEntityType)` on the\n * FILES row's own `uploadedByEntityType`. So the vocabulary was one import away the whole time and\n * the metadata's copy of the same field was the only one left open.\n *\n * What the enum buys: `metadata` is an UNTYPED bag on the token row, so nothing between the write\n * and the read guarantees its shape — the read is the only place that can. Every reader here goes\n * through `FileUploadGrantMetadataSchema.safeParse`, so an out-of-vocabulary entity type now makes\n * the whole metadata unparseable and the redemption path refuses the grant instead of casting the\n * value into `FileUploaderPrincipal` and carrying it three layers to `validateUploadedByEntityType`.\n *\n * NOT narrowed to the three values `mint` can actually produce (mint refuses an anonymous and a\n * token-borne minter, so `ANONYMOUS_USER` is unreachable): that refusal is a MINT policy, enforced\n * and explained at mint, and re-encoding it here would put half a policy in a schema that cannot\n * say why. The vocabulary of this field is the vocabulary of the principal it names.\n */\n minter: z.object({ entityType: z.enum(FileUploaderEntityType), id: z.string().min(1) }),\n /**\n * The concrete upload URL the grant was minted for. Two jobs, and the second one is why it must be\n * absolute: the status read hands it to the drop page, AND the redemption path compares its PATH\n * against the route the token is presented on (`assertGrantMatchesRoute`). Until 2026-09-08 it was\n * recorded and never read back, so a grant bound to one concrete route could be redeemed on any\n * other route reaching the same (resource, field, operation, row).\n */\n uploadUrl: z.string().url(),\n /** Written after a successful redemption; absent until then. */\n producedFileId: z.string().min(1).optional(),\n});\nexport type FileUploadGrantMetadata = z.infer<typeof FileUploadGrantMetadataSchema>;\n\n/**\n * What a mint returns — identical on the REST door and the MCP tool. Two affordances for one\n * token: `uploadCommand` for a caller that can execute, `uploadPageUrl` for one that must hand a\n * human a link. The token appears in `uploadHeader.value` and inside both commands and the page URL;\n * it is the credential and cannot be omitted. It never appears in any audit row.\n */\nexport const FileUploadGrantSchema: z.ZodObject<{\n grantId: z.ZodString;\n state: z.ZodEnum<typeof FileUploadGrantState>;\n expiresAt: z.ZodString;\n singleUse: z.ZodLiteral<true>;\n target: z.ZodObject<{\n resourceType: z.ZodString;\n fieldName: z.ZodString;\n operation: z.ZodEnum<{ [K in FileUploadGrantOperation]: K }>;\n resourceId: z.ZodNullable<z.ZodString>;\n }>;\n constraints: z.ZodObject<{\n maxBytes: z.ZodNumber;\n allowedMimeTypes: z.ZodArray<z.ZodString>;\n }>;\n uploadUrl: z.ZodString;\n uploadHeader: z.ZodObject<{ name: z.ZodString; value: z.ZodString }>;\n uploadCommand: z.ZodString;\n uploadCommandPowerShell: z.ZodString;\n uploadPageUrl: z.ZodNullable<z.ZodString>;\n statusUrl: z.ZodString;\n note: z.ZodString;\n}> = z.object({\n grantId: z.string().min(1),\n state: FileUploadGrantStateSchema,\n expiresAt: z.string().datetime(),\n singleUse: z.literal(true),\n target: z.object({\n resourceType: z.string().min(1),\n fieldName: z.string().min(1),\n operation: FileUploadGrantOperationSchema,\n resourceId: z.string().min(1).nullable(),\n }),\n /** From the field's own constraint resolver — the same one the upload enforces, so the two cannot disagree. */\n constraints: z.object({\n maxBytes: z.number().int().positive(),\n /** Empty means every type is accepted. */\n allowedMimeTypes: z.array(z.string()),\n }),\n uploadUrl: z.string().url(),\n /** The credential travels in a HEADER on the curl form: paths are logged by every proxy, headers are not. */\n uploadHeader: z.object({ name: z.string().min(1), value: z.string().min(1) }),\n /** No `-f`: on a refusal the JSON error body is the only thing that tells the caller why. */\n uploadCommand: z.string().min(1),\n /** In PowerShell `curl` aliases Invoke-WebRequest, which does not understand `-F`; the real binary is `curl.exe`. */\n uploadCommandPowerShell: z.string().min(1),\n /** `null` when the application declares no frontend service — a headless API has no page to hand a human. */\n uploadPageUrl: z.string().url().nullable(),\n statusUrl: z.string().url(),\n note: z.string().min(1),\n});\nexport type FileUploadGrant = z.infer<typeof FileUploadGrantSchema>;\n\n/**\n * What the public status read returns. The token is the credential, so the read is unauthenticated\n * and returns only what the drop page needs to render and the agent needs to learn the `fileId`:\n * never the file's name (the status URL may be pasted around).\n */\nexport const FileUploadGrantStatusSchema: z.ZodObject<{\n grantId: z.ZodString;\n state: z.ZodEnum<typeof FileUploadGrantState>;\n expiresAt: z.ZodString;\n target: z.ZodObject<{\n resourceType: z.ZodString;\n fieldName: z.ZodString;\n operation: z.ZodEnum<{ [K in FileUploadGrantOperation]: K }>;\n resourceId: z.ZodNullable<z.ZodString>;\n }>;\n constraints: z.ZodObject<{ maxBytes: z.ZodNumber; allowedMimeTypes: z.ZodArray<z.ZodString> }>;\n uploadUrl: z.ZodString;\n uploadHeaderName: z.ZodString;\n file: z.ZodNullable<z.ZodObject<{ fileId: z.ZodString; status: z.ZodEnum<typeof FileStatus> }>>;\n}> = z.object({\n grantId: z.string().min(1),\n state: FileUploadGrantStateSchema,\n expiresAt: z.string().datetime(),\n target: z.object({\n resourceType: z.string().min(1),\n fieldName: z.string().min(1),\n operation: FileUploadGrantOperationSchema,\n resourceId: z.string().min(1).nullable(),\n }),\n constraints: z.object({ maxBytes: z.number().int().positive(), allowedMimeTypes: z.array(z.string()) }),\n uploadUrl: z.string().url(),\n /** The page sets this header itself; the token it already holds is the value. */\n uploadHeaderName: z.string().min(1),\n /** `null` until redeemed, or when the post-redemption write-back failed (re-read the resource instead). */\n file: z.object({ fileId: z.string().min(1), status: z.enum(FileStatus) }).nullable(),\n});\nexport type FileUploadGrantStatus = z.infer<typeof FileUploadGrantStatusSchema>;\n\n/**\n * Body accepted by both mint doors.\n *\n * The three optional file facts mirror what the MCP File Objects proposal has a client declare when\n * it asks to upload (`name`, `mimeType`, `size`): declaring them lets the server refuse a file the\n * field would never accept BEFORE handing out a link, instead of at redemption when the link is\n * already spent. They are advisory for the upload itself — the bytes are validated on receipt\n * regardless — and a declaration that later disagrees with the bytes is refused on receipt too.\n */\nexport const FileUploadGrantMintRequestSchema: z.ZodObject<{\n expiresInMinutes: z.ZodOptional<z.ZodNumber>;\n name: z.ZodOptional<z.ZodString>;\n mimeType: z.ZodOptional<z.ZodString>;\n size: z.ZodOptional<z.ZodNumber>;\n}> = z.object({\n expiresInMinutes: z.number().int().min(1).max(FILE_UPLOAD_GRANT_ABSOLUTE_MAX_MINUTES).optional(),\n /** The file name the caller intends to upload; used for the curl example and checked against nothing else. */\n name: z.string().min(1).max(255).optional(),\n /** Declared MIME type; refused at mint when the field does not accept it. */\n mimeType: z.string().min(1).max(255).optional(),\n /** Declared size in bytes; refused at mint when above the field's maximum. */\n size: z.number().int().positive().optional(),\n}).strict();\nexport type FileUploadGrantMintRequest = z.infer<typeof FileUploadGrantMintRequestSchema>;\n/** @wildo_source:part:end saas.models.file-upload-grant */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"files.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/files/files.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAI7J,KAAK,mBAAmB,GACpB,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,gDAAgD,GAC3D,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsE9C,CAAC"}
1
+ {"version":3,"file":"files.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/files/files.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAI7J,KAAK,mBAAmB,GACpB,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,gDAAgD,GAC3D,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsE9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"files.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/files/files.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAA8C,MAAM,uCAAuC,CAAC;AAC7J,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AASpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,MAAM,gDAAgD,GAAG,CAC9D,sBAA8C,EAC9C,EAAE,CAAC,0CAA0C,CAI7C;IACA,UAAU,EAAE,UAAU;IACtB,kBAAkB,EAAE,gBAAgB,CAAC,KAAK;IAC1C,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACnF,qBAAqB,EAAE,sBAAsB;IAC7C,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE;QACd,qBAAqB,CAAC,IAAI;QAC1B,qBAAqB,CAAC,IAAI;QAC1B,qBAAqB,CAAC,MAAM;QAC5B,qBAAqB,CAAC,MAAM;QAC5B,qBAAqB,CAAC,MAAM;KAC7B;IACD,uBAAuB,EAAE;QACvB,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE;YAC5B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE;YAC5B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Files Resource Configuration (Repository-only)\n * \n * Provides repository operations for file metadata management.\n * Files are managed internally by the file upload system.\n * \n * ## Scope Model\n * \n * Files use a **dynamic scope** that is derived from the parent resource's\n * resourcePrimaryScope when linked. The canonical FILES registry relationship gives it\n * APPLICATION as its repository primaryScope, but individual file records\n * store their actual scope in the `primaryScope` field.\n * \n * This allows files to be correctly scoped to:\n * - APPLICATION: App-level shared files\n * - ORGANIZATIONS: Org-scoped files\n * - USER_SELF: User-private files\n *\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 { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship, ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport { CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { FileSchema } from './files.shared.schemas';\n\ntype FilesCoreOperations = \n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\n/**\n * Files Resource Configuration Factory\n * \n * Creates a REPOSITORY_ONLY resource configuration for file metadata.\n * Files are managed internally by the file upload system and not exposed\n * as standard REST API endpoints. Repository operations are used internally\n * by FilesBackendService.\n *\n * ## Persistence\n *\n * There is deliberately NO `persistenceAdapter` here: FILES FOLLOWS the application's default\n * adapter. It used to be pinned to MongoDB, on the grounds that \"file metadata relies on\n * Mongo-backed transactional/link semantics throughout the upload/link/unlink/cleanup pipeline\".\n * Measured rather than trusted, that was substantially true when written and is no longer:\n *\n * - the upload/link transaction opened on `MongoDBService` BY NAME; it now opens on whichever\n * store FILES resolves to;\n * - the cleanup batch cleared link metadata through a raw-MongoDB `$unset`; it now uses the\n * adapter-neutral guarded set-and-clear on the repository contract;\n * - the file-id validation was believed to require an ObjectId shape. It never did —\n * `Resources_SharedUtils.isValidResourceId` has always accepted ObjectId AND UUID, and only the\n * comment claimed otherwise.\n *\n * Blobs were never the issue: there is no GridFS. They live in object storage, and MongoDB held\n * only this metadata row.\n *\n * **The pin was also what forced file metadata into a SECOND store**, which is why removing it\n * closes more than it opens: a resource and its file metadata on one adapter share ONE native\n * transaction, so generated-document materialization (PDFs) stops being refused as a cross-adapter\n * boundary, and no saga or outbox is needed to make it atomic.\n *\n * An application is expected to be wholly one adapter (plan Wave 4.5). Following the default is\n * what makes that true for FILES instead of quietly exempting it.\n */\nexport const filesResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n) => createResourceConfiguration_Initialization<\n undefined,\n FilesCoreOperations,\n typeof FileSchema\n>({\n mainSchema: FileSchema,\n resourceIdentifier: CoreResourceType.FILES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.FILES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n ],\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n },\n});\n"]}
1
+ {"version":3,"file":"files.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/files/files.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAA8C,MAAM,uCAAuC,CAAC;AAC7J,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AASpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,MAAM,gDAAgD,GAAG,CAC9D,sBAA8C,EAC9C,EAAE,CAAC,0CAA0C,CAI7C;IACA,UAAU,EAAE,UAAU;IACtB,kBAAkB,EAAE,gBAAgB,CAAC,KAAK;IAC1C,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACnF,qBAAqB,EAAE,sBAAsB;IAC7C,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE;QACd,qBAAqB,CAAC,IAAI;QAC1B,qBAAqB,CAAC,IAAI;QAC1B,qBAAqB,CAAC,MAAM;QAC5B,qBAAqB,CAAC,MAAM;QAC5B,qBAAqB,CAAC,MAAM;KAC7B;IACD,uBAAuB,EAAE;QACvB,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE;YAC5B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE;YAC5B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Files Resource Configuration (Repository-only)\n * \n * Provides repository operations for file metadata management.\n * Files are managed internally by the file upload system.\n * \n * ## Scope Model\n * \n * Files use a **dynamic scope** that is derived from the parent resource's\n * resourcePrimaryScope when linked. The canonical FILES registry relationship gives it\n * APPLICATION as its repository primaryScope, but individual file records\n * store their actual scope in the `primaryScope` field.\n * \n * This allows files to be correctly scoped to:\n * - APPLICATION: App-level shared files\n * - ORGANIZATIONS: Org-scoped files\n * - USER_SELF: User-private files\n *\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 { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship, ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport { CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { FileSchema } from './files.shared.schemas';\n\ntype FilesCoreOperations = \n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\n/**\n * Files Resource Configuration Factory\n * \n * Creates a REPOSITORY_ONLY resource configuration for file metadata.\n * Files are managed internally by the file upload system and not exposed\n * as standard REST API endpoints. Repository operations are used internally\n * by FilesBackendService.\n *\n * ## Persistence\n *\n * There is deliberately NO `persistenceAdapter` here: FILES FOLLOWS the application's default\n * adapter. It used to be pinned to MongoDB, on the grounds that \"file metadata relies on\n * Mongo-backed transactional/link semantics throughout the upload/link/unlink/cleanup pipeline\".\n * Measured rather than trusted, that was substantially true when written and is no longer:\n *\n * - the upload/link transaction opened on `MongoDBService` BY NAME; it now opens on whichever\n * store FILES resolves to;\n * - the cleanup batch cleared link metadata through a raw-MongoDB `$unset`; it now uses the\n * adapter-neutral guarded set-and-clear on the repository contract;\n * - the file-id validation was believed to require an ObjectId shape. It never did —\n * `Resources_SharedUtils.isValidResourceId` has always accepted ObjectId AND UUID, and only the\n * comment claimed otherwise.\n *\n * Blobs were never the issue: there is no GridFS. They live in object storage, and MongoDB held\n * only this metadata row.\n *\n * **The pin was also what forced file metadata into a SECOND store**, which is why removing it\n * closes more than it opens: a resource and its file metadata on one adapter share ONE native\n * transaction, so generated-document materialization (PDFs) stops being refused as a cross-adapter\n * boundary, and no saga or outbox is needed to make it atomic.\n *\n * An application is expected to be wholly one adapter (plan Wave 4.5). Following the default is\n * what makes that true for FILES instead of quietly exempting it.\n */\nexport const filesResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n) => createResourceConfiguration_Initialization<\n undefined,\n FilesCoreOperations,\n typeof FileSchema\n>({\n mainSchema: FileSchema,\n resourceIdentifier: CoreResourceType.FILES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.FILES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n ],\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"files.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/files/files.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtI,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAG7E,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACvF,YAAY,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IAEjB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,WAAW,gBAAgB;CAC5B;AAED;;;;;;;;;;;;GAYG;AACH,oBAAY,gBAAgB;IAC1B,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,CAIpE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,UAAU,CAK7D,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,+BAA+B,EAAE,WAAW,CAAC,UAAU,CAElE,CAAC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AAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACnG,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE;CACjE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IACjE,oBAAoB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAEhC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;QACvB,+FAA+F;QAC/F,kFAAkF;QAClF,IAAI,2BAA2B,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACjG,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,cAAc,CAAC;gBACtB,OAAO,EAAE,oEAAoE;aAC9E,CAAC,CAAC;QACL,CAAC;QACD,OAAO;IACT,CAAC;IAED,IAAI,CAAC,4BAA4B,CAAC;QAChC,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAC,EAAE,CAAC;QACH,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,cAAc,CAAC;YACtB,OAAO,EAAE,6DAA6D;SACvE,CAAC,CAAC;IACL,CAAC;AAEH,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Files Shared Schemas\n *\n * Reusable schemas for file uploads and file handling.\n *\n * ## Scope Model\n *\n * Files use a **segregated scope model** where scope identifiers are separate fields\n * (not hierarchical). A file belongs to exactly one primary scope:\n * - APPLICATION: App-level shared files (e.g., branding assets)\n * - ORGANIZATIONS: Org-scoped files (e.g., org documents)\n * - USER_SELF: User-private files owned by a single user (NO org — USER_SELF and\n * ORGANIZATIONS are independent primary-scope axes; `applicationId` is the bucket anchor)\n *\n * `ANONYMOUS` is intentionally excluded from the file contract for now. The\n * file layer does not yet define anonymous upload, storage, and access semantics\n * end to end, so file resources fail closed instead of pretending support.\n *\n * Scope is **derived from the parent resource's resourcePrimaryScope** when linking.\n * Access rights are **inherited from the z_file() field** on the parent resource.\n *\n * Note: FileMetadata is defined in @wildo-ai/zod-decorators\n */\n\nimport { z } from 'zod';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { FileDisplayNature, FileStorageAccepted, FileUploaderEntityType, type FileUploaderOwnership } from '@wildo-ai/zod-decorators';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\n\n// Re-export FileMetadata from zod-decorators for convenience\nexport type { FileMetadata } from '@wildo-ai/zod-decorators';\nexport { FileUploaderEntityType, FileStorageAccepted } from '@wildo-ai/zod-decorators';\nexport type { FileUploaderOwnership } from '@wildo-ai/zod-decorators';\n\n/**\n * File status lifecycle enum\n *\n * NOTE — no extraction/indexing members. `EXTRACTING` / `EXTRACTED` / `INDEXED` were removed\n * 2026-08-26 with the resource-native RAG reshape (plan `resource-rag-capability`, Phase 1):\n * text extraction and embedding state are per-FIELD, per-CHUNK facts, and the RAG chunk rows\n * (Phase 2's derived-data tier, keyed `(resourceType, resourceId, fieldName, chunkIndex)` with a\n * NULLABLE `vector` as the \"needs embedding\" ledger) carry them. A single file-level status could\n * never say WHICH field's corpus was current — it was the wrong shape, not merely unused — and\n * `INDEXED` had already shipped one false claim (written to mean \"text was copied\", read as\n * \"searchable\": https://github.com/wildo-ai/wildo-ai/issues/46). The file lifecycle now ends at\n * upload/scan/link/erasure concerns, which really are per-file.\n */\nexport enum FileStatus {\n PENDING = 'pending',\n UPLOADED = 'uploaded',\n LINKED = 'linked',\n DELETED = 'deleted',\n ORPHANED = 'orphaned',\n FAILED = 'failed',\n\n SCANNING = 'scanning',\n CLEAN = 'clean',\n INFECTED = 'infected',\n QUARANTINED = 'quarantined',\n}\n\n/**\n * Rendition of a file's bytes requested from the serve route via `?variant=`.\n *\n * - `ORIGINAL` — the stored bytes, unchanged (the default when the param is absent).\n * - `THUMBNAIL` — a small, downscaled `webp` derived on the fly for preview surfaces\n * (nav avatar, list/card image) so a preview never pulls a multi-MB original. Only\n * raster images are eligible; for any other file the serve route transparently\n * falls back to the original bytes.\n *\n * This is the WIRE CONTRACT for the serve route's `variant` query parameter — shared\n * by the frontend (which builds `?variant=thumbnail` preview URLs) and the backend\n * serve route (which parses it). Keep the string values stable across releases.\n */\nexport enum FileServeVariant {\n ORIGINAL = 'original',\n THUMBNAIL = 'thumbnail',\n}\n\n/**\n * Parse an untrusted `?variant=` query value into a {@link FileServeVariant}.\n * Absent or unrecognized values fall back to `ORIGINAL` (fail-safe: an unknown\n * variant serves the untransformed bytes rather than erroring).\n */\nexport function parseFileServeVariant(raw: unknown): FileServeVariant {\n return raw === FileServeVariant.THUMBNAIL\n ? FileServeVariant.THUMBNAIL\n : FileServeVariant.ORIGINAL;\n}\n\n/**\n * Statuses in which a file's bytes are safe to serve for download.\n *\n * AV scanning IS wired: `FileScanningBackendService` is bound in the container and the resource\n * upload handler calls `shouldScan` then `initiateScan`, so a scanned file moves through SCANNING\n * to CLEAN / INFECTED / QUARANTINED. `SCANNING`, `INFECTED` and `QUARANTINED` are absent from this\n * set and therefore blocked, which is the post-scan half of the original Wave 1 note.\n *\n * `UPLOADED` IS admitted, and that is correct rather than a leftover — but only because of where\n * the scan gate now sits. Scanning is opt-in per field (`shouldScan` reads the field's\n * `fileMetadata`), so an unscanned file legitimately terminates at UPLOADED and removing it from\n * this set would make every such field undownloadable.\n *\n * The window that used to sit behind that reasoning is CLOSED (#433, 2026-09-08). A file whose\n * field requires a scan never sits at UPLOADED at all: `resource-file-upload-handler` now AWAITS\n * `initiateScan` — which awaits the UPLOADED -> SCANNING transition and only then fires the scan\n * pipeline — BEFORE the upload response is sent. Previously it was fired afterwards without being\n * awaited, so the bytes were servable for the gap between the upload committing and the transition\n * landing.\n *\n * So the invariant this set relies on is external to it: **a required scan reaches SCANNING before\n * anyone learns the upload succeeded.** Do not restore a fire-and-forget scan initiation, and do\n * not add UPLOADED-adjacent statuses here without asking which side of that gate they fall on.\n */\nexport const FILE_DOWNLOADABLE_STATUSES: ReadonlySet<FileStatus> = new Set([\n FileStatus.UPLOADED,\n FileStatus.LINKED,\n FileStatus.ORPHANED,\n FileStatus.CLEAN,\n]);\n\n/**\n * Statuses in which a file's own METADATA must no longer be disclosed on the GLOBAL\n * `GET /files/:fileId/metadata` route (gate **G-FILE**).\n *\n * Blocking the BYTES is not enough. A privacy erasure marks the file `DELETED`, but physical cleanup\n * is a batch that runs much later — so between the two, `originalFilename` (`passport-jane-doe.pdf`)\n * and `uploadedBy` stayed readable by any member of the file's scope. \"Erased\" that leaves the\n * filename readable for weeks is not erased.\n *\n * DELIBERATELY NARROWER than {@link FILE_BLOCKED_STATUSES}: `PENDING`, `SCANNING`, `FAILED` and\n * `INFECTED` files are not servable either, but their metadata IS the diagnostic surface an uploader\n * legitimately polls (\"upload failed\", \"scan in progress\"). Withholding those would break upload UX\n * while protecting nothing — none of them is an erasure outcome. `DELETED` is the terminal state (it\n * has no outgoing transition in {@link FILE_STATUS_TRANSITIONS}) and the one an erasure produces.\n */\nexport const FILE_METADATA_WITHHELD_STATUSES: ReadonlySet<FileStatus> = new Set([\n FileStatus.DELETED,\n]);\n\n/**\n * Value written over a file's `filename` / `originalFilename` when the file is erased for privacy.\n *\n * Both fields are REQUIRED (`z.string().min(1)`), so an erasure cannot null them without a schema\n * reshape; overwriting with one shared, non-identifying constant erases the personal data while\n * keeping the row valid, greppable and obviously-erased in logs and admin surfaces. Deliberately a\n * fixed constant rather than a per-file token: two erased files must not be distinguishable by name.\n */\nexport const ERASED_FILE_NAME_PLACEHOLDER = '[erased]';\n\n/**\n * Statuses that represent terminal or non-servable states.\n * Files in these states must not be served for download.\n */\nexport const FILE_BLOCKED_STATUSES: ReadonlySet<FileStatus> = new Set([\n FileStatus.PENDING,\n FileStatus.DELETED,\n FileStatus.FAILED,\n FileStatus.SCANNING,\n FileStatus.INFECTED,\n FileStatus.QUARANTINED,\n]);\n\n/**\n * Valid lifecycle transitions.\n *\n * Each key is a source status; the value is the set of statuses it can\n * transition to. Any transition not listed here is invalid.\n */\nexport const FILE_STATUS_TRANSITIONS: Readonly<Record<FileStatus, readonly FileStatus[]>> = {\n [FileStatus.PENDING]: [FileStatus.UPLOADED, FileStatus.FAILED],\n [FileStatus.UPLOADED]: [FileStatus.LINKED, FileStatus.SCANNING, FileStatus.ORPHANED, FileStatus.DELETED, FileStatus.FAILED],\n [FileStatus.SCANNING]: [FileStatus.CLEAN, FileStatus.INFECTED, FileStatus.FAILED],\n [FileStatus.CLEAN]: [FileStatus.LINKED, FileStatus.ORPHANED, FileStatus.DELETED],\n [FileStatus.INFECTED]: [FileStatus.QUARANTINED, FileStatus.DELETED],\n [FileStatus.QUARANTINED]: [FileStatus.DELETED],\n [FileStatus.LINKED]: [FileStatus.ORPHANED, FileStatus.DELETED],\n [FileStatus.ORPHANED]: [FileStatus.LINKED, FileStatus.DELETED],\n [FileStatus.DELETED]: [],\n [FileStatus.FAILED]: [FileStatus.DELETED],\n};\n\n/**\n * Statuses from which a file may be LINKED to a resource field — the set the link-time checks\n * (`FileOperationHandlerBackendService.validateFileFieldsForCreate/Update`,\n * `FilesBackendService.linkFileToResource`) consult.\n *\n * ## Why this set exists (issue #320)\n *\n * Those checks used to compare against the literal `FileStatus.UPLOADED`, while\n * {@link FILE_STATUS_TRANSITIONS} — the authority on what a status MEANS — already allowed\n * `CLEAN → LINKED`. So a file the scanner had just certified safe was refused at the one moment it was\n * needed, with an error naming `UPLOADED` as the expected state, and whether a scanned file could be\n * attached at all depended on how fast the caller was relative to the scanner. Two `$in` queries in\n * `FilesBackendService` had meanwhile grown their own `[UPLOADED, CLEAN]` pairs — three copies of one\n * answer, one of them wrong. This is the single copy.\n *\n * ## Derived-CHECKED against the map, not computed from it\n *\n * Every member here has `LINKED` among its outgoing transitions (pinned by\n * `files.shared.status-sets.test.ts`), so this set can never admit a transition the map forbids.\n * It is nonetheless written out rather than computed, because the map is a superset of what linking\n * should admit today:\n *\n * - `ORPHANED → LINKED` is legal in the map (a re-link after the parent was deleted with the file\n * kept) and is DELIBERATELY NOT admitted here. Re-linking an orphan is a distinct capability with\n * its own questions — whose scope does the file re-enter, what happens to its old key — and\n * admitting it as a side effect of fixing the `CLEAN` refusal would decide those questions by\n * accident. The pin asserts this exclusion by name so widening it is a choice, not drift.\n * - `SCANNING` is absent because the map forbids `SCANNING → LINKED`: a file whose scan is in\n * flight is not yet known to be safe. The link path names that case with\n * `FILE_SCAN_IN_PROGRESS` so the caller learns to retry, rather than the generic refusal.\n */\nexport const FILE_LINKABLE_STATUSES: ReadonlySet<FileStatus> = new Set([\n FileStatus.UPLOADED,\n FileStatus.CLEAN,\n]);\n\n\nexport const FILE_PRIMARY_SCOPES = [\n ResourcePrimaryScope.APPLICATION,\n ResourcePrimaryScope.ORGANIZATIONS,\n ResourcePrimaryScope.USER_SELF,\n] as const;\n\nexport type FilePrimaryScope = (typeof FILE_PRIMARY_SCOPES)[number];\n\nfunction hasFileScopeIdentifierValue(value: string | undefined): boolean {\n return typeof value === 'string' && value.trim() !== '';\n}\n\nfunction validateUploaderPair(\n file: {\n uploadedBy?: string;\n uploadedByEntityType?: FileUploaderEntityType;\n },\n ctx: z.RefinementCtx,\n): void {\n const hasUploadedBy = hasFileScopeIdentifierValue(file.uploadedBy);\n const hasUploadedByEntityType = file.uploadedByEntityType !== undefined;\n\n if (hasUploadedBy !== hasUploadedByEntityType) {\n ctx.addIssue({\n code: 'custom',\n path: hasUploadedBy ? ['uploadedByEntityType'] : ['uploadedBy'],\n message: 'uploadedBy and uploadedByEntityType must either both be set or both be omitted',\n });\n }\n}\n\nexport function validateFileScopeIdentifiers(scope: {\n primaryScope: FilePrimaryScope;\n applicationId: string;\n organizationId?: string;\n userId?: string;\n}): boolean {\n const hasApplicationId = hasFileScopeIdentifierValue(scope.applicationId);\n const hasOrganizationId = hasFileScopeIdentifierValue(scope.organizationId);\n const hasUserId = hasFileScopeIdentifierValue(scope.userId);\n\n switch (scope.primaryScope) {\n case ResourcePrimaryScope.APPLICATION:\n return hasApplicationId && !hasOrganizationId && !hasUserId;\n case ResourcePrimaryScope.ORGANIZATIONS:\n // applicationId is always required (tenant isolation); organizationId is the scope discriminator.\n return hasApplicationId && hasOrganizationId && !hasUserId;\n case ResourcePrimaryScope.USER_SELF:\n // Primary scopes are a SEPARATION OF CONCERN: USER_SELF and ORGANIZATIONS are\n // independent axes. A user's self-owned file is user-owned, NOT org-owned —\n // `userId` is the scope discriminator and `applicationId` is the tenant/bucket\n // anchor. `organizationId` MUST be absent (a present org would conflate the two\n // scopes). Fail closed on any org value.\n return hasApplicationId && hasUserId && !hasOrganizationId;\n default:\n return false;\n }\n}\n\n/**\n * File resource schema\n *\n * Stores file metadata and links files to resources.\n * Files are stored via app-managed storage providers (MinIO/S3, local directory, etc.),\n * this schema tracks metadata only.\n *\n * ## Storage Identity Convention\n * `storageProvider` + `storageRef` are the persisted routing truth used to\n * reach the active storage backend. `storageKey` remains framework metadata\n * that captures the file's derived scope path for bookkeeping, diagnostics,\n * and future storage contract evolution.\n *\n * `storageKey` includes scope path derived from primaryScope:\n * - APPLICATION: `app/{applicationId}/{fileId}`\n * - ORGANIZATIONS: `org/{organizationId}/{fileId}`\n * - USER_SELF: `user/{userId}/{fileId}` (owner is the user; no org segment)\n */\nconst FileSchemaBase = z.object({\n fileId: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n // ========== File Metadata ==========\n // USER_CONTENT on both names. A filename is chosen by the person and routinely IS the personal\n // datum — \"scan-2026-medical.pdf\" discloses a special category before the file is opened. The\n // file's BYTES are not a field here (this resource is metadata over object storage), so this is the\n // only place the content axis can be declared at all.\n filename: z.string().min(1).isDBIndexed().isSummaryField().dataCategories(PersonalDataCategory.USER_CONTENT),\n originalFilename: z.string().min(1).isSummaryField().dataCategories(PersonalDataCategory.USER_CONTENT),\n mimeType: z.string().min(1).isDBIndexed().isSummaryField(),\n size: z.number().min(0).isSummaryField(),\n extension: z.string().optional(),\n checksum: z.string().optional().isDBIndexed(),\n\n // ========== Storage ==========\n // `storageProvider` + `storageRef` are the persisted backend-routing truth.\n storageProvider: z.enum(FileStorageAccepted).optional().isDBIndexed(),\n storageRef: z.string().min(1).optional().isDBIndexed(),\n // `storageKey` is still scoped metadata, not the storage backend handle. It embeds the\n // file identity (`_id`, surfaced as the `fileId` virtual), so it is derived + persisted\n // AFTER the row is created (insert-first) — hence optional at create time. `createFile`\n // sets it once `_id` exists, and `linkFileToResource` re-derives it when the file's scope\n // is finalized.\n storageKey: z.string().min(1).optional().isDBIndexed(),\n url: z.url().optional(), // Cached URL (may be presigned)\n\n // ========== Status & Lifecycle ==========\n status: z.enum(FileStatus).default(FileStatus.PENDING).isDBIndexed().isSummaryField(),\n\n // ========== Nature-specific Metadata ==========\n // Inferred from MIME type or set by analysis services (F4-03)\n // Resolved display nature (IMAGE/VIDEO/AUDIO/DOCUMENT/GENERIC) — NOT the schema-level FileNature.\n // Set by resolveFileDisplayNature() during upload or inferred from MIME type in toMetadataResponse().\n // Schema declares FileNature (e.g., PDF, OFFICE), but the DB stores the resolved FileDisplayNature.\n nature: z.enum(FileDisplayNature).optional().isDBIndexed(),\n // Image-specific\n width: z.number().positive().optional(),\n height: z.number().positive().optional(),\n thumbnailUrl: z.url().optional(),\n // Video/Audio-specific (populated by IFileVideoAnalyzer / IFileAudioAnalyzer)\n duration: z.number().positive().optional(), // Duration in seconds\n // Document-specific (populated by IFileDocumentAnalyzer)\n pageCount: z.number().positive().optional(),\n\n // ========== Resource Linking ==========\n // When linked, scope is derived from parent resource's resourcePrimaryScope\n linkedResourceType: z.string().optional().isDBIndexed(),\n linkedResourceId: z.string().optional().isDBIndexed(),\n linkedFieldName: z.string().optional(),\n\n // ========== Primary Scope ==========\n // Derived from parent resource's resourcePrimaryScope when linking\n // Determines access control and storage path\n primaryScope: z.enum(FILE_PRIMARY_SCOPES).optional().isDBIndexed(),\n\n // ========== Scope Identifiers ==========\n // applicationId is ALWAYS set (from execution context at creation time) — it is the\n // top-level tenant isolation field present on every file record regardless of primaryScope.\n // organizationId and userId are populated only when the file's primaryScope requires them.\n\n applicationId: z.string().isDBIndexed(),\n\n // ORGANIZATIONS scope: org-scoped files. Set ONLY for ORGANIZATIONS-scoped files —\n // never for USER_SELF (the two scopes are independent axes, separation of concern).\n organizationId: z.string().optional().isDBIndexed(),\n\n // USER_SELF scope: user-private files owned by one user. Set ONLY for USER_SELF-scoped\n // files; the owner is the user (no org). `applicationId` is the tenant/bucket anchor.\n userId: z.string().optional().isDBIndexed(),\n\n // ========== Upload Metadata ==========\n // The uploader principal is persisted as a raw id + type pair only.\n // Any richer label/entity hydration is intentionally client-driven.\n uploadedBy: z.string().trim().min(1).optional().isDBIndexed(),\n uploadedByEntityType: z.enum(FileUploaderEntityType).optional().isDBIndexed(),\n\n // ========== Timestamps ==========\n uploadedAt: z.date().default(() => new Date()).isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n deletedAt: z.date().optional().isDBIndexed().excludeFromCreate(),\n});\n\nexport const FileSchema = FileSchemaBase.superRefine((file, ctx) => {\n validateUploaderPair(file, ctx);\n\n if (!file.primaryScope) {\n // Pre-link state: applicationId is always present (set from execution context at upload time),\n // but organizationId/userId must not be set without a primaryScope discriminator.\n if (hasFileScopeIdentifierValue(file.organizationId) || hasFileScopeIdentifierValue(file.userId)) {\n ctx.addIssue({\n code: 'custom',\n path: ['primaryScope'],\n message: 'primaryScope is required when organizationId or userId are present',\n });\n }\n return;\n }\n\n if (!validateFileScopeIdentifiers({\n primaryScope: file.primaryScope,\n applicationId: file.applicationId,\n organizationId: file.organizationId,\n userId: file.userId,\n })) {\n ctx.addIssue({\n code: 'custom',\n path: ['primaryScope'],\n message: 'File scope identifiers must match the declared primaryScope',\n });\n }\n\n});\nexport type File = z.infer<typeof FileSchema> & FileUploaderOwnership;\n\n/**\n * Scope identifiers for file access control.\n * Populated based on primaryScope when file is created/linked.\n */\nexport interface FileScopeIdentifiers {\n primaryScope: FilePrimaryScope;\n /** Always required — top-level tenant isolation key, set from execution context at file creation. */\n applicationId: string;\n organizationId?: string;\n userId?: string;\n}\n"]}
1
+ {"version":3,"file":"files.shared.schemas.js","sourceRoot":"","sources":["../../../src/files/files.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,sBAAsB,EAA8B,MAAM,0BAA0B,CAAC;AACtI,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAI7E,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGvF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,UAYX;AAZD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;IAEjB,mCAAqB,CAAA;IACrB,6BAAe,CAAA;IACf,mCAAqB,CAAA;IACrB,yCAA2B,CAAA;AAC7B,CAAC,EAZW,UAAU,KAAV,UAAU,QAYrB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,yCAA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C,IAAI,CAAC,YAAY,EAAE,CAAC;QACvB,+FAA+F;QAC/F,kFAAkF;QAClF,IAAI,2BAA2B,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACjG,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,cAAc,CAAC;gBACtB,OAAO,EAAE,oEAAoE;aAC9E,CAAC,CAAC;QACL,CAAC;QACD,OAAO;IACT,CAAC;IAED,IAAI,CAAC,4BAA4B,CAAC;QAChC,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAC,EAAE,CAAC;QACH,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,cAAc,CAAC;YACtB,OAAO,EAAE,6DAA6D;SACvE,CAAC,CAAC;IACL,CAAC;AAEH,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Files Shared Schemas\n *\n * Reusable schemas for file uploads and file handling.\n *\n * ## Scope Model\n *\n * Files use a **segregated scope model** where scope identifiers are separate fields\n * (not hierarchical). A file belongs to exactly one primary scope:\n * - APPLICATION: App-level shared files (e.g., branding assets)\n * - ORGANIZATIONS: Org-scoped files (e.g., org documents)\n * - USER_SELF: User-private files owned by a single user (NO org — USER_SELF and\n * ORGANIZATIONS are independent primary-scope axes; `applicationId` is the bucket anchor)\n *\n * `ANONYMOUS` is intentionally excluded from the file contract for now. The\n * file layer does not yet define anonymous upload, storage, and access semantics\n * end to end, so file resources fail closed instead of pretending support.\n *\n * Scope is **derived from the parent resource's resourcePrimaryScope** when linking.\n * Access rights are **inherited from the z_file() field** on the parent resource.\n *\n * Note: FileMetadata is defined in @wildo-ai/zod-decorators\n */\n\nimport { z } from 'zod';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { FileDisplayNature, FileStorageAccepted, FileUploaderEntityType, type FileUploaderOwnership } from '@wildo-ai/zod-decorators';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\n\n// Re-export FileMetadata from zod-decorators for convenience\nexport type { FileMetadata } from '@wildo-ai/zod-decorators';\nexport { FileUploaderEntityType, FileStorageAccepted } from '@wildo-ai/zod-decorators';\nexport type { FileUploaderOwnership } from '@wildo-ai/zod-decorators';\n\n/**\n * File status lifecycle enum\n *\n * NOTE — no extraction/indexing members. `EXTRACTING` / `EXTRACTED` / `INDEXED` were removed\n * 2026-08-26 with the resource-native RAG reshape (plan `resource-rag-capability`, Phase 1):\n * text extraction and embedding state are per-FIELD, per-CHUNK facts, and the RAG chunk rows\n * (Phase 2's derived-data tier, keyed `(resourceType, resourceId, fieldName, chunkIndex)` with a\n * NULLABLE `vector` as the \"needs embedding\" ledger) carry them. A single file-level status could\n * never say WHICH field's corpus was current — it was the wrong shape, not merely unused — and\n * `INDEXED` had already shipped one false claim (written to mean \"text was copied\", read as\n * \"searchable\": https://github.com/wildo-ai/wildo-ai/issues/46). The file lifecycle now ends at\n * upload/scan/link/erasure concerns, which really are per-file.\n */\nexport enum FileStatus {\n PENDING = 'pending',\n UPLOADED = 'uploaded',\n LINKED = 'linked',\n DELETED = 'deleted',\n ORPHANED = 'orphaned',\n FAILED = 'failed',\n\n SCANNING = 'scanning',\n CLEAN = 'clean',\n INFECTED = 'infected',\n QUARANTINED = 'quarantined',\n}\n\n/**\n * Rendition of a file's bytes requested from the serve route via `?variant=`.\n *\n * - `ORIGINAL` — the stored bytes, unchanged (the default when the param is absent).\n * - `THUMBNAIL` — a small, downscaled `webp` derived on the fly for preview surfaces\n * (nav avatar, list/card image) so a preview never pulls a multi-MB original. Only\n * raster images are eligible; for any other file the serve route transparently\n * falls back to the original bytes.\n *\n * This is the WIRE CONTRACT for the serve route's `variant` query parameter — shared\n * by the frontend (which builds `?variant=thumbnail` preview URLs) and the backend\n * serve route (which parses it). Keep the string values stable across releases.\n */\nexport enum FileServeVariant {\n ORIGINAL = 'original',\n THUMBNAIL = 'thumbnail',\n}\n\n/**\n * Parse an untrusted `?variant=` query value into a {@link FileServeVariant}.\n * Absent or unrecognized values fall back to `ORIGINAL` (fail-safe: an unknown\n * variant serves the untransformed bytes rather than erroring).\n */\nexport function parseFileServeVariant(raw: unknown): FileServeVariant {\n return raw === FileServeVariant.THUMBNAIL\n ? FileServeVariant.THUMBNAIL\n : FileServeVariant.ORIGINAL;\n}\n\n/**\n * Statuses in which a file's bytes are safe to serve for download.\n *\n * AV scanning IS wired: `FileScanningBackendService` is bound in the container and the resource\n * upload handler calls `shouldScan` then `initiateScan`, so a scanned file moves through SCANNING\n * to CLEAN / INFECTED / QUARANTINED. `SCANNING`, `INFECTED` and `QUARANTINED` are absent from this\n * set and therefore blocked, which is the post-scan half of the original Wave 1 note.\n *\n * `UPLOADED` IS admitted, and that is correct rather than a leftover — but only because of where\n * the scan gate now sits. Scanning is opt-in per field (`shouldScan` reads the field's\n * `fileMetadata`), so an unscanned file legitimately terminates at UPLOADED and removing it from\n * this set would make every such field undownloadable.\n *\n * The window that used to sit behind that reasoning is CLOSED (#433, 2026-09-08). A file whose\n * field requires a scan never sits at UPLOADED at all: `resource-file-upload-handler` now AWAITS\n * `initiateScan` — which awaits the UPLOADED -> SCANNING transition and only then fires the scan\n * pipeline — BEFORE the upload response is sent. Previously it was fired afterwards without being\n * awaited, so the bytes were servable for the gap between the upload committing and the transition\n * landing.\n *\n * So the invariant this set relies on is external to it: **a required scan reaches SCANNING before\n * anyone learns the upload succeeded.** Do not restore a fire-and-forget scan initiation, and do\n * not add UPLOADED-adjacent statuses here without asking which side of that gate they fall on.\n */\nexport const FILE_DOWNLOADABLE_STATUSES: ReadonlySet<FileStatus> = new Set([\n FileStatus.UPLOADED,\n FileStatus.LINKED,\n FileStatus.ORPHANED,\n FileStatus.CLEAN,\n]);\n\n/**\n * Statuses in which a file's own METADATA must no longer be disclosed on the GLOBAL\n * `GET /files/:fileId/metadata` route (gate **G-FILE**).\n *\n * Blocking the BYTES is not enough. A privacy erasure marks the file `DELETED`, but physical cleanup\n * is a batch that runs much later — so between the two, `originalFilename` (`passport-jane-doe.pdf`)\n * and `uploadedBy` stayed readable by any member of the file's scope. \"Erased\" that leaves the\n * filename readable for weeks is not erased.\n *\n * DELIBERATELY NARROWER than {@link FILE_BLOCKED_STATUSES}: `PENDING`, `SCANNING`, `FAILED` and\n * `INFECTED` files are not servable either, but their metadata IS the diagnostic surface an uploader\n * legitimately polls (\"upload failed\", \"scan in progress\"). Withholding those would break upload UX\n * while protecting nothing — none of them is an erasure outcome. `DELETED` is the terminal state (it\n * has no outgoing transition in {@link FILE_STATUS_TRANSITIONS}) and the one an erasure produces.\n */\nexport const FILE_METADATA_WITHHELD_STATUSES: ReadonlySet<FileStatus> = new Set([\n FileStatus.DELETED,\n]);\n\n/**\n * Value written over a file's `filename` / `originalFilename` when the file is erased for privacy.\n *\n * Both fields are REQUIRED (`z.string().min(1)`), so an erasure cannot null them without a schema\n * reshape; overwriting with one shared, non-identifying constant erases the personal data while\n * keeping the row valid, greppable and obviously-erased in logs and admin surfaces. Deliberately a\n * fixed constant rather than a per-file token: two erased files must not be distinguishable by name.\n */\nexport const ERASED_FILE_NAME_PLACEHOLDER = '[erased]';\n\n/**\n * Statuses that represent terminal or non-servable states.\n * Files in these states must not be served for download.\n */\nexport const FILE_BLOCKED_STATUSES: ReadonlySet<FileStatus> = new Set([\n FileStatus.PENDING,\n FileStatus.DELETED,\n FileStatus.FAILED,\n FileStatus.SCANNING,\n FileStatus.INFECTED,\n FileStatus.QUARANTINED,\n]);\n\n/**\n * Valid lifecycle transitions.\n *\n * Each key is a source status; the value is the set of statuses it can\n * transition to. Any transition not listed here is invalid.\n */\nexport const FILE_STATUS_TRANSITIONS: Readonly<Record<FileStatus, readonly FileStatus[]>> = {\n [FileStatus.PENDING]: [FileStatus.UPLOADED, FileStatus.FAILED],\n [FileStatus.UPLOADED]: [FileStatus.LINKED, FileStatus.SCANNING, FileStatus.ORPHANED, FileStatus.DELETED, FileStatus.FAILED],\n [FileStatus.SCANNING]: [FileStatus.CLEAN, FileStatus.INFECTED, FileStatus.FAILED],\n [FileStatus.CLEAN]: [FileStatus.LINKED, FileStatus.ORPHANED, FileStatus.DELETED],\n [FileStatus.INFECTED]: [FileStatus.QUARANTINED, FileStatus.DELETED],\n [FileStatus.QUARANTINED]: [FileStatus.DELETED],\n [FileStatus.LINKED]: [FileStatus.ORPHANED, FileStatus.DELETED],\n [FileStatus.ORPHANED]: [FileStatus.LINKED, FileStatus.DELETED],\n [FileStatus.DELETED]: [],\n [FileStatus.FAILED]: [FileStatus.DELETED],\n};\n\n/**\n * Statuses from which a file may be LINKED to a resource field — the set the link-time checks\n * (`FileOperationHandlerBackendService.validateFileFieldsForCreate/Update`,\n * `FilesBackendService.linkFileToResource`) consult.\n *\n * ## Why this set exists (issue #320)\n *\n * Those checks used to compare against the literal `FileStatus.UPLOADED`, while\n * {@link FILE_STATUS_TRANSITIONS} — the authority on what a status MEANS — already allowed\n * `CLEAN → LINKED`. So a file the scanner had just certified safe was refused at the one moment it was\n * needed, with an error naming `UPLOADED` as the expected state, and whether a scanned file could be\n * attached at all depended on how fast the caller was relative to the scanner. Two `$in` queries in\n * `FilesBackendService` had meanwhile grown their own `[UPLOADED, CLEAN]` pairs — three copies of one\n * answer, one of them wrong. This is the single copy.\n *\n * ## Derived-CHECKED against the map, not computed from it\n *\n * Every member here has `LINKED` among its outgoing transitions (pinned by\n * `files.shared.status-sets.test.ts`), so this set can never admit a transition the map forbids.\n * It is nonetheless written out rather than computed, because the map is a superset of what linking\n * should admit today:\n *\n * - `ORPHANED → LINKED` is legal in the map (a re-link after the parent was deleted with the file\n * kept) and is DELIBERATELY NOT admitted here. Re-linking an orphan is a distinct capability with\n * its own questions — whose scope does the file re-enter, what happens to its old key — and\n * admitting it as a side effect of fixing the `CLEAN` refusal would decide those questions by\n * accident. The pin asserts this exclusion by name so widening it is a choice, not drift.\n * - `SCANNING` is absent because the map forbids `SCANNING → LINKED`: a file whose scan is in\n * flight is not yet known to be safe. The link path names that case with\n * `FILE_SCAN_IN_PROGRESS` so the caller learns to retry, rather than the generic refusal.\n */\nexport const FILE_LINKABLE_STATUSES: ReadonlySet<FileStatus> = new Set([\n FileStatus.UPLOADED,\n FileStatus.CLEAN,\n]);\n\n\nexport const FILE_PRIMARY_SCOPES = [\n ResourcePrimaryScope.APPLICATION,\n ResourcePrimaryScope.ORGANIZATIONS,\n ResourcePrimaryScope.USER_SELF,\n] as const;\n\nexport type FilePrimaryScope = (typeof FILE_PRIMARY_SCOPES)[number];\n\nfunction hasFileScopeIdentifierValue(value: string | undefined): boolean {\n return typeof value === 'string' && value.trim() !== '';\n}\n\nfunction validateUploaderPair(\n file: {\n uploadedBy?: string;\n uploadedByEntityType?: FileUploaderEntityType;\n },\n ctx: z.RefinementCtx,\n): void {\n const hasUploadedBy = hasFileScopeIdentifierValue(file.uploadedBy);\n const hasUploadedByEntityType = file.uploadedByEntityType !== undefined;\n\n if (hasUploadedBy !== hasUploadedByEntityType) {\n ctx.addIssue({\n code: 'custom',\n path: hasUploadedBy ? ['uploadedByEntityType'] : ['uploadedBy'],\n message: 'uploadedBy and uploadedByEntityType must either both be set or both be omitted',\n });\n }\n}\n\nexport function validateFileScopeIdentifiers(scope: {\n primaryScope: FilePrimaryScope;\n applicationId: string;\n organizationId?: string;\n userId?: string;\n}): boolean {\n const hasApplicationId = hasFileScopeIdentifierValue(scope.applicationId);\n const hasOrganizationId = hasFileScopeIdentifierValue(scope.organizationId);\n const hasUserId = hasFileScopeIdentifierValue(scope.userId);\n\n switch (scope.primaryScope) {\n case ResourcePrimaryScope.APPLICATION:\n return hasApplicationId && !hasOrganizationId && !hasUserId;\n case ResourcePrimaryScope.ORGANIZATIONS:\n // applicationId is always required (tenant isolation); organizationId is the scope discriminator.\n return hasApplicationId && hasOrganizationId && !hasUserId;\n case ResourcePrimaryScope.USER_SELF:\n // Primary scopes are a SEPARATION OF CONCERN: USER_SELF and ORGANIZATIONS are\n // independent axes. A user's self-owned file is user-owned, NOT org-owned —\n // `userId` is the scope discriminator and `applicationId` is the tenant/bucket\n // anchor. `organizationId` MUST be absent (a present org would conflate the two\n // scopes). Fail closed on any org value.\n return hasApplicationId && hasUserId && !hasOrganizationId;\n default:\n return false;\n }\n}\n\n/**\n * File resource schema\n *\n * Stores file metadata and links files to resources.\n * Files are stored via app-managed storage providers (MinIO/S3, local directory, etc.),\n * this schema tracks metadata only.\n *\n * ## Storage Identity Convention\n * `storageProvider` + `storageRef` are the persisted routing truth used to\n * reach the active storage backend. `storageKey` remains framework metadata\n * that captures the file's derived scope path for bookkeeping, diagnostics,\n * and future storage contract evolution.\n *\n * `storageKey` includes scope path derived from primaryScope:\n * - APPLICATION: `app/{applicationId}/{fileId}`\n * - ORGANIZATIONS: `org/{organizationId}/{fileId}`\n * - USER_SELF: `user/{userId}/{fileId}` (owner is the user; no org segment)\n */\nconst FileSchemaBase = z.object({\n fileId: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n // ========== File Metadata ==========\n // USER_CONTENT on both names. A filename is chosen by the person and routinely IS the personal\n // datum — \"scan-2026-medical.pdf\" discloses a special category before the file is opened. The\n // file's BYTES are not a field here (this resource is metadata over object storage), so this is the\n // only place the content axis can be declared at all.\n filename: z.string().min(1).isDBIndexed().isSummaryField().dataCategories(PersonalDataCategory.USER_CONTENT),\n originalFilename: z.string().min(1).isSummaryField().dataCategories(PersonalDataCategory.USER_CONTENT),\n mimeType: z.string().min(1).isDBIndexed().isSummaryField(),\n size: z.number().min(0).isSummaryField(),\n extension: z.string().optional(),\n checksum: z.string().optional().isDBIndexed(),\n\n // ========== Storage ==========\n // `storageProvider` + `storageRef` are the persisted backend-routing truth.\n storageProvider: z.enum(FileStorageAccepted).optional().isDBIndexed(),\n storageRef: z.string().min(1).optional().isDBIndexed(),\n // `storageKey` is still scoped metadata, not the storage backend handle. It embeds the\n // file identity (`_id`, surfaced as the `fileId` virtual), so it is derived + persisted\n // AFTER the row is created (insert-first) — hence optional at create time. `createFile`\n // sets it once `_id` exists, and `linkFileToResource` re-derives it when the file's scope\n // is finalized.\n storageKey: z.string().min(1).optional().isDBIndexed(),\n url: z.url().optional(), // Cached URL (may be presigned)\n\n // ========== Status & Lifecycle ==========\n status: z.enum(FileStatus).default(FileStatus.PENDING).isDBIndexed().isSummaryField(),\n\n // ========== Nature-specific Metadata ==========\n // Inferred from MIME type or set by analysis services (F4-03)\n // Resolved display nature (IMAGE/VIDEO/AUDIO/DOCUMENT/GENERIC) — NOT the schema-level FileNature.\n // Set by resolveFileDisplayNature() during upload or inferred from MIME type in toMetadataResponse().\n // Schema declares FileNature (e.g., PDF, OFFICE), but the DB stores the resolved FileDisplayNature.\n nature: z.enum(FileDisplayNature).optional().isDBIndexed(),\n // Image-specific\n width: z.number().positive().optional(),\n height: z.number().positive().optional(),\n thumbnailUrl: z.url().optional(),\n // Video/Audio-specific (populated by IFileVideoAnalyzer / IFileAudioAnalyzer)\n duration: z.number().positive().optional(), // Duration in seconds\n // Document-specific (populated by IFileDocumentAnalyzer)\n pageCount: z.number().positive().optional(),\n\n // ========== Resource Linking ==========\n // When linked, scope is derived from parent resource's resourcePrimaryScope\n linkedResourceType: z.string().optional().isDBIndexed(),\n linkedResourceId: z.string().optional().isDBIndexed(),\n linkedFieldName: z.string().optional(),\n\n // ========== Primary Scope ==========\n // Derived from parent resource's resourcePrimaryScope when linking\n // Determines access control and storage path\n primaryScope: z.enum(FILE_PRIMARY_SCOPES).optional().isDBIndexed(),\n\n // ========== Scope Identifiers ==========\n // applicationId is ALWAYS set (from execution context at creation time) — it is the\n // top-level tenant isolation field present on every file record regardless of primaryScope.\n // organizationId and userId are populated only when the file's primaryScope requires them.\n\n applicationId: z.string().isDBIndexed(),\n\n // ORGANIZATIONS scope: org-scoped files. Set ONLY for ORGANIZATIONS-scoped files —\n // never for USER_SELF (the two scopes are independent axes, separation of concern).\n organizationId: z.string().optional().isDBIndexed(),\n\n // USER_SELF scope: user-private files owned by one user. Set ONLY for USER_SELF-scoped\n // files; the owner is the user (no org). `applicationId` is the tenant/bucket anchor.\n userId: z.string().optional().isDBIndexed(),\n\n // ========== Upload Metadata ==========\n // The uploader principal is persisted as a raw id + type pair only.\n // Any richer label/entity hydration is intentionally client-driven.\n uploadedBy: z.string().trim().min(1).optional().isDBIndexed(),\n uploadedByEntityType: z.enum(FileUploaderEntityType).optional().isDBIndexed(),\n\n // ========== Timestamps ==========\n uploadedAt: z.date().default(() => new Date()).isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n deletedAt: z.date().optional().isDBIndexed().excludeFromCreate(),\n});\n\nexport const FileSchema = FileSchemaBase.superRefine((file, ctx) => {\n validateUploaderPair(file, ctx);\n\n if (!file.primaryScope) {\n // Pre-link state: applicationId is always present (set from execution context at upload time),\n // but organizationId/userId must not be set without a primaryScope discriminator.\n if (hasFileScopeIdentifierValue(file.organizationId) || hasFileScopeIdentifierValue(file.userId)) {\n ctx.addIssue({\n code: 'custom',\n path: ['primaryScope'],\n message: 'primaryScope is required when organizationId or userId are present',\n });\n }\n return;\n }\n\n if (!validateFileScopeIdentifiers({\n primaryScope: file.primaryScope,\n applicationId: file.applicationId,\n organizationId: file.organizationId,\n userId: file.userId,\n })) {\n ctx.addIssue({\n code: 'custom',\n path: ['primaryScope'],\n message: 'File scope identifiers must match the declared primaryScope',\n });\n }\n\n});\nexport type File = z.infer<typeof FileSchema> & FileUploaderOwnership;\n\n/**\n * Scope identifiers for file access control.\n * Populated based on primaryScope when file is created/linked.\n */\nexport interface FileScopeIdentifiers {\n primaryScope: FilePrimaryScope;\n /** Always required — top-level tenant isolation key, set from execution context at file creation. */\n applicationId: string;\n organizationId?: string;\n userId?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"files.shared.utils.d.ts","sourceRoot":"","sources":["../../../../src/files/files.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAEL,KAAK,IAAI,EACT,KAAK,oBAAoB,EAC1B,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,qBAAa,cAAc;IACzB;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO;IAIrD;;;;;;;;OAQG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAiB5E;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,oBAAoB,GAAG,IAAI;CAahE"}
1
+ {"version":3,"file":"files.shared.utils.d.ts","sourceRoot":"","sources":["../../../src/files/files.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAEL,KAAK,IAAI,EACT,KAAK,oBAAoB,EAC1B,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,qBAAa,cAAc;IACzB;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO;IAIrD;;;;;;;;OAQG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAiB5E;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,oBAAoB,GAAG,IAAI;CAahE"}
@@ -1 +1 @@
1
- {"version":3,"file":"files.shared.utils.js","sourceRoot":"","sources":["../../../../src/files/files.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,E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CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C,CAAC;CACF","sourcesContent":["/**\n * File Scope Utilities\n * \n * Utility class for file scope operations including validation, \n * storage path construction, and scope extraction.\n */\n\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport {\n validateFileScopeIdentifiers,\n type File,\n type FileScopeIdentifiers,\n} from './files.shared.schemas';\n\n/**\n * Utility class for file scope operations.\n * All methods are static and can be called without instantiation.\n */\nexport class FileScopeUtils {\n /**\n * Validates that scope identifiers are consistent with primaryScope.\n *\n * applicationId is always required for all scope types — it is the tenant isolation field\n * set from the execution context at file creation time, regardless of primaryScope.\n *\n * Rules:\n * - APPLICATION: requires applicationId only (no organizationId, no userId)\n * - ORGANIZATIONS: requires applicationId + organizationId (no userId)\n * - USER_SELF: requires applicationId + userId, and NO organizationId (USER_SELF and\n * ORGANIZATIONS are independent primary-scope axes — a self-owned file is never org-scoped)\n *\n * ANONYMOUS is intentionally not supported for files yet. The file layer\n * fails closed until anonymous file semantics are defined end to end.\n *\n * @param scope - The scope identifiers to validate\n * @returns true if valid, false otherwise\n */\n static validate(scope: FileScopeIdentifiers): boolean {\n return validateFileScopeIdentifiers(scope);\n }\n\n /**\n * Builds storage path suffix based on scope identifiers.\n * Full path is constructed by gateway as: applications/{appId}/environments/{appEnv}/files/{scopePath}\n * \n * @param scope - The scope identifiers\n * @param fileId - The file identifier\n * @returns Path suffix like \"org/{orgId}/{fileId}\" or \"user/{userId}/{fileId}\"\n * @throws Error if primaryScope is unsupported or unknown\n */\n static buildStoragePath(scope: FileScopeIdentifiers, fileId: string): string {\n if (!this.validate(scope)) {\n throw new Error(`Invalid scope identifiers for primaryScope: ${scope.primaryScope}`);\n }\n\n switch (scope.primaryScope) {\n case ResourcePrimaryScope.APPLICATION:\n return `app/${scope.applicationId}/${fileId}`;\n case ResourcePrimaryScope.ORGANIZATIONS:\n return `org/${scope.organizationId}/${fileId}`;\n case ResourcePrimaryScope.USER_SELF:\n return `user/${scope.userId}/${fileId}`;\n default:\n throw new Error(`Unknown primaryScope: ${scope.primaryScope}`);\n }\n }\n\n /**\n * Extracts scope identifiers from a File record.\n * \n * @param file - The file record to extract scope from\n * @returns FileScopeIdentifiers if primaryScope is set, null otherwise\n */\n static extractFromFile(file: File): FileScopeIdentifiers | null {\n if (!file.primaryScope) {\n return null;\n }\n const scope = {\n primaryScope: file.primaryScope,\n applicationId: file.applicationId,\n organizationId: file.organizationId,\n userId: file.userId,\n };\n\n return this.validate(scope) ? scope : null;\n }\n}\n"]}
1
+ {"version":3,"file":"files.shared.utils.js","sourceRoot":"","sources":["../../../src/files/files.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EACL,4BAA4B,GAG7B,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,MAAM,OAAO,cAAc;IACzB;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,QAAQ,CAAC,KAA2B;QACzC,OAAO,4BAA4B,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAA2B,EAAE,MAAc;QACjE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,+CAA+C,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;QACvF,CAAC;QAED,QAAQ,KAAK,CAAC,YAAY,EAAE,CAAC;YAC3B,KAAK,oBAAoB,CAAC,WAAW;gBACnC,OAAO,OAAO,KAAK,CAAC,aAAa,IAAI,MAAM,EAAE,CAAC;YAChD,KAAK,oBAAoB,CAAC,aAAa;gBACrC,OAAO,OAAO,KAAK,CAAC,cAAc,IAAI,MAAM,EAAE,CAAC;YACjD,KAAK,oBAAoB,CAAC,SAAS;gBACjC,OAAO,QAAQ,KAAK,CAAC,MAAM,IAAI,MAAM,EAAE,CAAC;YAC1C;gBACE,MAAM,IAAI,KAAK,CAAC,yBAAyB,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,IAAU;QAC/B,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,KAAK,GAAG;YACZ,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;QAEF,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C,CAAC;CACF","sourcesContent":["/**\n * File Scope Utilities\n * \n * Utility class for file scope operations including validation, \n * storage path construction, and scope extraction.\n */\n\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport {\n validateFileScopeIdentifiers,\n type File,\n type FileScopeIdentifiers,\n} from './files.shared.schemas';\n\n/**\n * Utility class for file scope operations.\n * All methods are static and can be called without instantiation.\n */\nexport class FileScopeUtils {\n /**\n * Validates that scope identifiers are consistent with primaryScope.\n *\n * applicationId is always required for all scope types — it is the tenant isolation field\n * set from the execution context at file creation time, regardless of primaryScope.\n *\n * Rules:\n * - APPLICATION: requires applicationId only (no organizationId, no userId)\n * - ORGANIZATIONS: requires applicationId + organizationId (no userId)\n * - USER_SELF: requires applicationId + userId, and NO organizationId (USER_SELF and\n * ORGANIZATIONS are independent primary-scope axes — a self-owned file is never org-scoped)\n *\n * ANONYMOUS is intentionally not supported for files yet. The file layer\n * fails closed until anonymous file semantics are defined end to end.\n *\n * @param scope - The scope identifiers to validate\n * @returns true if valid, false otherwise\n */\n static validate(scope: FileScopeIdentifiers): boolean {\n return validateFileScopeIdentifiers(scope);\n }\n\n /**\n * Builds storage path suffix based on scope identifiers.\n * Full path is constructed by gateway as: applications/{appId}/environments/{appEnv}/files/{scopePath}\n * \n * @param scope - The scope identifiers\n * @param fileId - The file identifier\n * @returns Path suffix like \"org/{orgId}/{fileId}\" or \"user/{userId}/{fileId}\"\n * @throws Error if primaryScope is unsupported or unknown\n */\n static buildStoragePath(scope: FileScopeIdentifiers, fileId: string): string {\n if (!this.validate(scope)) {\n throw new Error(`Invalid scope identifiers for primaryScope: ${scope.primaryScope}`);\n }\n\n switch (scope.primaryScope) {\n case ResourcePrimaryScope.APPLICATION:\n return `app/${scope.applicationId}/${fileId}`;\n case ResourcePrimaryScope.ORGANIZATIONS:\n return `org/${scope.organizationId}/${fileId}`;\n case ResourcePrimaryScope.USER_SELF:\n return `user/${scope.userId}/${fileId}`;\n default:\n throw new Error(`Unknown primaryScope: ${scope.primaryScope}`);\n }\n }\n\n /**\n * Extracts scope identifiers from a File record.\n * \n * @param file - The file record to extract scope from\n * @returns FileScopeIdentifiers if primaryScope is set, null otherwise\n */\n static extractFromFile(file: File): FileScopeIdentifiers | null {\n if (!file.primaryScope) {\n return null;\n }\n const scope = {\n primaryScope: file.primaryScope,\n applicationId: file.applicationId,\n organizationId: file.organizationId,\n userId: file.userId,\n };\n\n return this.validate(scope) ? scope : null;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"a2a-push-delivery-log.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,EACL,qBAAqB,EAEtB,MAAM,gDAAgD,CAAC;AAuCxD,eAAO,MAAM,sCAAsC,uVA+KlD,CAAC"}
1
+ {"version":3,"file":"a2a-push-delivery-log.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,EACL,qBAAqB,EAEtB,MAAM,gDAAgD,CAAC;AAuCxD,eAAO,MAAM,sCAAsC,uVA+KlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"a2a-push-delivery-log.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACvH,OAAO,EACL,wCAAwC,EACxC,qBAAqB,GACtB,MAAM,wCAAwC,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,MAAM,gBAAgB,GAAG;IACvB,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;IACnD,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;IAC7D,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;CAC1D,CAAC;AAEF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,IAAI;oBACf,eAAe,EAAE,kBAAkB;oBACnC,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C,CAAC;SACH;KACF;CACF,CACF,CAAC","sourcesContent":["/**\n * A2A Push Delivery Log Resource Configuration — polymorphic across the three A2A owner scopes.\n *\n * Produces 3 factory functions (USER + ORG + APP). Spread into the registry factory map:\n * ...a2aPushDeliveryLogPolymorphicFactories\n *\n * Operation set, and why each one is shaped the way it is:\n * - READ / LIST / SEARCH (API) : an owner inspects what was delivered on its behalf\n * - CREATE (INTERNAL_CALL) : dispatcher-only — a delivery row is EVIDENCE, and a\n * client that could author one could fabricate proof\n * that a notification was sent\n * - UPDATE (INTERNAL_CALL) : the worker's lifecycle transitions\n * (PENDING → IN_FLIGHT → DELIVERED/FAILED)\n * - DELETE / DELETE_MANY (REPOSITORY_ONLY) : reserved for retention purging. Deliberately NO\n * external single-row delete — a trail an owner can\n * selectively erase is not a trail\n *\n * **Route-lessness and TIER are two different questions, and conflating them broke this resource.**\n * `INTERNAL_CALL` and `REPOSITORY_ONLY` are both route-less — neither exposes an HTTP surface, so the\n * \"never a public mutation\" property above holds identically under either. What they differ on is which\n * tier can REACH them. CREATE and UPDATE are written by `A2APushDeliveryLogRepository` through\n * `*AsSystem` (the service tier), which resolves via `getServiceOperationPathDefault` and matches only\n * `INTERNAL_CALL` / `API_CALL`; they were authored `REPOSITORY_ONLY` and therefore threw on every write\n * until 2026-08-11. DELETE / DELETE_MANY correctly STAY `REPOSITORY_ONLY`: nothing calls them through\n * `*AsSystem` — retention purging and the owner-scope composition cascade both run at the repository\n * tier, which is exactly the tier `REPOSITORY_ONLY` serves. Enumerated deliberately rather than swept:\n * changing a variant nothing calls would have been churn, and leaving one a caller DOES reach was the bug.\n *\n * Deliberately NO `RETRY` custom operation, unlike the M2M delivery log. Retry there is an admin\n * repairing a tenant's own integration; here the caller is an external agent client, and letting it\n * re-fire deliveries on demand would hand it an amplifier pointed at a URL it also chose. Retries\n * are the worker's, on its own backoff schedule. If an operator-driven retry is ever wanted it\n * belongs on an admin surface, not on this resource.\n *\n * @see notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.ts — the pattern\n * @see a2a-token-budget-state.shared.resources-config.schemas.ts — the 3-scope role precedent\n */\n\nimport { z } from 'zod';\nimport {\n CoreResourceOperation,\n CoreResourceType,\n} from '../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n} from '../resources/resources.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { createPolymorphicResourceConfigurations } from '../resources/utils/resource-polymorphism.factory';\nimport { CORE_ORG_ROLES, CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport {\n a2aPushDeliveryLogPolymorphicDeclaration,\n A2APushDeliveryStatus,\n} from './a2a-push-delivery-log.shared.schemas';\n\n/**\n * Who may read a delivery row.\n *\n * A row names a webhook URL the owner itself registered and the outcome of contacting it. It\n * carries no message content by construction (the payload is a `statusUpdate`, never a `Task` — see\n * `a2a-push-notification-delivery.backend.utils.ts`), so owner-level read is the right bar rather\n * than an admin one: the party that configured the delivery is the party that needs to see whether\n * it worked, and forcing them to an admin to diagnose their own webhook helps nobody.\n *\n * Follows the token-budget precedent for the same three scopes.\n */\nconst OWNER_READ_ROLES = {\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_MEMBER],\n [CoreResourceType.APPLICATION]: [CORE_APP_ROLES.APP_USER],\n};\n\n/** Writes are the dispatcher's and the worker's; the role here gates nothing reachable over HTTP. */\nconst SYSTEM_WRITE_ROLES = {\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.APPLICATION]: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n};\n\nexport const a2aPushDeliveryLogPolymorphicFactories = createPolymorphicResourceConfigurations(\n a2aPushDeliveryLogPolymorphicDeclaration,\n {\n isSystemResource: true,\n\n /**\n * Opt the runtime into scoped writes on the owner's behalf. Absent this, every `*AsSystem` verb\n * fails closed.\n *\n * This resource follows the TASK service's pattern rather than the M2M delivery log's, and the\n * difference is not stylistic: the M2M dispatcher runs inside the resource operation that\n * triggered the webhook and therefore holds that operation's `ExecutionContext`, whereas a push\n * notification is triggered by `advanceTask` — a system-owned transition with no caller context\n * to borrow. Synthesising one at the call site would fabricate an authority nobody granted;\n * `*AsSystem` is the door built for exactly this.\n *\n * No `delete` mode: nothing system-deletes a delivery row. Removal is retention purging or the\n * owner-scope cascade, both of which run through their own paths.\n */\n systemAccessPolicy: {\n // The subject's own delivery evidence — including the webhook URLs they registered. Granted\n // because the owner can already READ/LIST/SEARCH these rows over the API, so withholding them\n // from a subject export would make the export narrower than the product surface.\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n read: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n },\n // Art. 20 portability provenance for the field sweep this user-DEPENDENT resource enters.\n // Every field on a delivery row is delivery mechanics the SYSTEM observed while attempting the\n // webhook (attempt counts, timestamps, response status, the destination recorded at send time)\n // — none of it is content the subject provided on THIS row, so the blanket default is OBSERVED,\n // matching the A2A siblings (task, execution, token-budget state). Without this declaration the\n // fail-closed subject-export authority refuses the whole runtime graph at companion bootstrap\n // (\"no effective portability provenance … (undeclared)\" for every field).\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n /**\n * Subject erasure RETAINS this row and scrubs the delivered payload.\n *\n * The delivery record — what was sent, when, to which endpoint, and whether it succeeded — is the\n * operational evidence this resource exists to keep. The `payload` is not: it carries the task's own\n * content, which originated with the person, and a payload can hold anything a task held.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The row is work performed for a person, not the person;\n * its owner FK names the scope the work ran in. The subject's session ends through the `USERS` row.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n CoreResourceOperation.DELETE_MANY,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n operationsConfiguration: {\n /*\n * Route-less retention plumbing — INTERNAL_CALL registers no route, so no API surface is added, and it\n * must not be REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n * which matches only INTERNAL_CALL / API_CALL. LIST is LOW (a read-shaped op may not claim the\n * HIGH/CRITICAL band, which carries an audit-emission obligation); UPDATE_MANY is CRITICAL — it is the\n * verb the impersonalize writer uses to stamp the retention markers.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_READ_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_READ_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_READ_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n // `failureReason` is searchable because \"why did my webhook stop working\" is the question\n // this resource exists to answer. `httpUrl` is NOT: it would let a caller enumerate rows\n // by destination, and the owner already knows its own URLs from the configuration plane.\n searchableFields: ['taskId', 'pushNotificationConfigId', 'failureReason'],\n filterFields: {\n status: z.enum(A2APushDeliveryStatus),\n taskId: z.string(),\n resourceServerInstanceRef: z.string(),\n createdAt: z.date(),\n },\n sortFields: ['createdAt', 'status', 'attemptCount'] as const,\n }],\n },\n // A delivery row is EVIDENCE that a notification was attempted. Authoring one from outside\n // would let a caller fabricate that evidence — so CREATE carries NO HTTP surface.\n //\n // ⚠️ `INTERNAL_CALL`, not `REPOSITORY_ONLY`, and the distinction is load-bearing rather than\n // stylistic. Both are route-less, so both withhold the surface equally; what differs is which\n // TIER can reach them. `A2APushDeliveryLogRepository` writes through `*AsSystem`, which\n // dispatches via the service tier and resolves through `getServiceOperationPathDefault` —\n // matching only `INTERNAL_CALL` / `API_CALL`. This op was authored `REPOSITORY_ONLY`, so every\n // `open()` threw `resources_registry_operation_path_not_found`, the dispatcher's no-throw\n // contract swallowed it at WARN, and the whole push-delivery feature was inert for eleven days\n // while the agent card advertised it (measured 2026-08-11 by the live lane; the config was green\n // at boot throughout, because a variant satisfies every \"the op exists\" check and fails only when\n // a service-tier caller invokes it).\n //\n // The sibling `flows-actors-task` config states the same rule for the same reason and is the\n // pattern this follows: \"INTERNAL_CALL (not REPOSITORY_ONLY) is mandatory\". Keep the two in step —\n // both are written by the A2A runtime through `*AsSystem`, governed by `systemAccessPolicy` above\n // rather than by the op RBAC (`SYSTEM_WRITE_ROLES` gates nothing reachable here).\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: SYSTEM_WRITE_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n // The worker's lifecycle transitions, reached through `updateAsSystem` — so `INTERNAL_CALL` for\n // exactly the reason CREATE is, and broken the same way while it was not. Still no HTTP surface:\n // exposing UPDATE would let a caller mark its own undelivered notifications DELIVERED.\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: SYSTEM_WRITE_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n polymorphicRole: SYSTEM_WRITE_ROLES,\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n // Retention purging. Bulk twin of DELETE, and REPOSITORY_ONLY for the same reason: a trail an\n // owner can selectively erase is not a trail.\n [CoreResourceOperation.DELETE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n polymorphicRole: SYSTEM_WRITE_ROLES,\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n },\n },\n);\n"]}
1
+ {"version":3,"file":"a2a-push-delivery-log.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,uCAAuC,EAAE,MA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AE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,kBAAkB;oBACnC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C,CAAC;SACH;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,kBAAkB;oBACnC,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C,CAAC;SACH;QACD,8FAA8F;QAC9F,8CAA8C;QAC9C,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE;YACnC,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,kBAAkB;oBACnC,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C,CAAC;SACH;KACF;CACF,CACF,CAAC","sourcesContent":["/**\n * A2A Push Delivery Log Resource Configuration — polymorphic across the three A2A owner scopes.\n *\n * Produces 3 factory functions (USER + ORG + APP). Spread into the registry factory map:\n * ...a2aPushDeliveryLogPolymorphicFactories\n *\n * Operation set, and why each one is shaped the way it is:\n * - READ / LIST / SEARCH (API) : an owner inspects what was delivered on its behalf\n * - CREATE (INTERNAL_CALL) : dispatcher-only — a delivery row is EVIDENCE, and a\n * client that could author one could fabricate proof\n * that a notification was sent\n * - UPDATE (INTERNAL_CALL) : the worker's lifecycle transitions\n * (PENDING → IN_FLIGHT → DELIVERED/FAILED)\n * - DELETE / DELETE_MANY (REPOSITORY_ONLY) : reserved for retention purging. Deliberately NO\n * external single-row delete — a trail an owner can\n * selectively erase is not a trail\n *\n * **Route-lessness and TIER are two different questions, and conflating them broke this resource.**\n * `INTERNAL_CALL` and `REPOSITORY_ONLY` are both route-less — neither exposes an HTTP surface, so the\n * \"never a public mutation\" property above holds identically under either. What they differ on is which\n * tier can REACH them. CREATE and UPDATE are written by `A2APushDeliveryLogRepository` through\n * `*AsSystem` (the service tier), which resolves via `getServiceOperationPathDefault` and matches only\n * `INTERNAL_CALL` / `API_CALL`; they were authored `REPOSITORY_ONLY` and therefore threw on every write\n * until 2026-08-11. DELETE / DELETE_MANY correctly STAY `REPOSITORY_ONLY`: nothing calls them through\n * `*AsSystem` — retention purging and the owner-scope composition cascade both run at the repository\n * tier, which is exactly the tier `REPOSITORY_ONLY` serves. Enumerated deliberately rather than swept:\n * changing a variant nothing calls would have been churn, and leaving one a caller DOES reach was the bug.\n *\n * Deliberately NO `RETRY` custom operation, unlike the M2M delivery log. Retry there is an admin\n * repairing a tenant's own integration; here the caller is an external agent client, and letting it\n * re-fire deliveries on demand would hand it an amplifier pointed at a URL it also chose. Retries\n * are the worker's, on its own backoff schedule. If an operator-driven retry is ever wanted it\n * belongs on an admin surface, not on this resource.\n *\n * @see notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.ts — the pattern\n * @see a2a-token-budget-state.shared.resources-config.schemas.ts — the 3-scope role precedent\n */\n\nimport { z } from 'zod';\nimport {\n CoreResourceOperation,\n CoreResourceType,\n} from '../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n} from '../resources/resources.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { createPolymorphicResourceConfigurations } from '../resources/utils/resource-polymorphism.factory';\nimport { CORE_ORG_ROLES, CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport {\n a2aPushDeliveryLogPolymorphicDeclaration,\n A2APushDeliveryStatus,\n} from './a2a-push-delivery-log.shared.schemas';\n\n/**\n * Who may read a delivery row.\n *\n * A row names a webhook URL the owner itself registered and the outcome of contacting it. It\n * carries no message content by construction (the payload is a `statusUpdate`, never a `Task` — see\n * `a2a-push-notification-delivery.backend.utils.ts`), so owner-level read is the right bar rather\n * than an admin one: the party that configured the delivery is the party that needs to see whether\n * it worked, and forcing them to an admin to diagnose their own webhook helps nobody.\n *\n * Follows the token-budget precedent for the same three scopes.\n */\nconst OWNER_READ_ROLES = {\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_MEMBER],\n [CoreResourceType.APPLICATION]: [CORE_APP_ROLES.APP_USER],\n};\n\n/** Writes are the dispatcher's and the worker's; the role here gates nothing reachable over HTTP. */\nconst SYSTEM_WRITE_ROLES = {\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.APPLICATION]: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n};\n\nexport const a2aPushDeliveryLogPolymorphicFactories = createPolymorphicResourceConfigurations(\n a2aPushDeliveryLogPolymorphicDeclaration,\n {\n isSystemResource: true,\n\n /**\n * Opt the runtime into scoped writes on the owner's behalf. Absent this, every `*AsSystem` verb\n * fails closed.\n *\n * This resource follows the TASK service's pattern rather than the M2M delivery log's, and the\n * difference is not stylistic: the M2M dispatcher runs inside the resource operation that\n * triggered the webhook and therefore holds that operation's `ExecutionContext`, whereas a push\n * notification is triggered by `advanceTask` — a system-owned transition with no caller context\n * to borrow. Synthesising one at the call site would fabricate an authority nobody granted;\n * `*AsSystem` is the door built for exactly this.\n *\n * No `delete` mode: nothing system-deletes a delivery row. Removal is retention purging or the\n * owner-scope cascade, both of which run through their own paths.\n */\n systemAccessPolicy: {\n // The subject's own delivery evidence — including the webhook URLs they registered. Granted\n // because the owner can already READ/LIST/SEARCH these rows over the API, so withholding them\n // from a subject export would make the export narrower than the product surface.\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n read: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n },\n // Art. 20 portability provenance for the field sweep this user-DEPENDENT resource enters.\n // Every field on a delivery row is delivery mechanics the SYSTEM observed while attempting the\n // webhook (attempt counts, timestamps, response status, the destination recorded at send time)\n // — none of it is content the subject provided on THIS row, so the blanket default is OBSERVED,\n // matching the A2A siblings (task, execution, token-budget state). Without this declaration the\n // fail-closed subject-export authority refuses the whole runtime graph at companion bootstrap\n // (\"no effective portability provenance … (undeclared)\" for every field).\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n /**\n * Subject erasure RETAINS this row and scrubs the delivered payload.\n *\n * The delivery record — what was sent, when, to which endpoint, and whether it succeeded — is the\n * operational evidence this resource exists to keep. The `payload` is not: it carries the task's own\n * content, which originated with the person, and a payload can hold anything a task held.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The row is work performed for a person, not the person;\n * its owner FK names the scope the work ran in. The subject's session ends through the `USERS` row.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n CoreResourceOperation.DELETE_MANY,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n operationsConfiguration: {\n /*\n * Route-less retention plumbing — INTERNAL_CALL registers no route, so no API surface is added, and it\n * must not be REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n * which matches only INTERNAL_CALL / API_CALL. LIST is LOW (a read-shaped op may not claim the\n * HIGH/CRITICAL band, which carries an audit-emission obligation); UPDATE_MANY is CRITICAL — it is the\n * verb the impersonalize writer uses to stamp the retention markers.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_READ_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_READ_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_READ_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n // `failureReason` is searchable because \"why did my webhook stop working\" is the question\n // this resource exists to answer. `httpUrl` is NOT: it would let a caller enumerate rows\n // by destination, and the owner already knows its own URLs from the configuration plane.\n searchableFields: ['taskId', 'pushNotificationConfigId', 'failureReason'],\n filterFields: {\n status: z.enum(A2APushDeliveryStatus),\n taskId: z.string(),\n resourceServerInstanceRef: z.string(),\n createdAt: z.date(),\n },\n sortFields: ['createdAt', 'status', 'attemptCount'] as const,\n }],\n },\n // A delivery row is EVIDENCE that a notification was attempted. Authoring one from outside\n // would let a caller fabricate that evidence — so CREATE carries NO HTTP surface.\n //\n // ⚠️ `INTERNAL_CALL`, not `REPOSITORY_ONLY`, and the distinction is load-bearing rather than\n // stylistic. Both are route-less, so both withhold the surface equally; what differs is which\n // TIER can reach them. `A2APushDeliveryLogRepository` writes through `*AsSystem`, which\n // dispatches via the service tier and resolves through `getServiceOperationPathDefault` —\n // matching only `INTERNAL_CALL` / `API_CALL`. This op was authored `REPOSITORY_ONLY`, so every\n // `open()` threw `resources_registry_operation_path_not_found`, the dispatcher's no-throw\n // contract swallowed it at WARN, and the whole push-delivery feature was inert for eleven days\n // while the agent card advertised it (measured 2026-08-11 by the live lane; the config was green\n // at boot throughout, because a variant satisfies every \"the op exists\" check and fails only when\n // a service-tier caller invokes it).\n //\n // The sibling `flows-actors-task` config states the same rule for the same reason and is the\n // pattern this follows: \"INTERNAL_CALL (not REPOSITORY_ONLY) is mandatory\". Keep the two in step —\n // both are written by the A2A runtime through `*AsSystem`, governed by `systemAccessPolicy` above\n // rather than by the op RBAC (`SYSTEM_WRITE_ROLES` gates nothing reachable here).\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: SYSTEM_WRITE_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n // The worker's lifecycle transitions, reached through `updateAsSystem` — so `INTERNAL_CALL` for\n // exactly the reason CREATE is, and broken the same way while it was not. Still no HTTP surface:\n // exposing UPDATE would let a caller mark its own undelivered notifications DELIVERED.\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n polymorphicRole: SYSTEM_WRITE_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n polymorphicRole: SYSTEM_WRITE_ROLES,\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n // Retention purging. Bulk twin of DELETE, and REPOSITORY_ONLY for the same reason: a trail an\n // owner can selectively erase is not a trail.\n [CoreResourceOperation.DELETE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n polymorphicRole: SYSTEM_WRITE_ROLES,\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n },\n },\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"a2a-push-delivery-log.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/flows-actors/a2a-push-delivery-log.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,kDAAkD,CAAC;AAI1D;;;;;;;;;;;;GAYG;AACH,oBAAY,qBAAqB;IAC/B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;iBAqFnC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE9E;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,EAAE,4BAA4B,EAI1E,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;kBAMnD,CAAC"}
1
+ {"version":3,"file":"a2a-push-delivery-log.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/flows-actors/a2a-push-delivery-log.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,kDAAkD,CAAC;AAI1D;;;;;;;;;;;;GAYG;AACH,oBAAY,qBAAqB;IAC/B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;iBAqFnC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE9E;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,EAAE,4BAA4B,EAI1E,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;kBAMnD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"a2a-push-delivery-log.shared.schemas.js","sourceRoot":"","sources":["../../../../src/flows-actors/a2a-push-delivery-log.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAE/E,OAAO,EACL,gBAAgB,EAChB,kCAAkC,GACnC,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GAEjC,MAAM,kDAAkD,CAAC;AAE1D,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAErB;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,gDAAuB,CAAA;IACvB,gDAAuB,CAAA;IACvB,0CAAiB,CAAA;AACnB,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,0EAA0E;IAC1E,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IAEtD;;;;;;;OAOG;IACH,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,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mBAAmB,EAAE,sBAAsB;IAC3C,WAAW,EAAE,uBAAuB;IACpC,UAAU,EAAE,wBAAwB;IACpC,QAAQ,EAAE,gCAAgC,CAAC,GAAG,CAAC,gCAAgC,CAAC;CACjF,CAAC,CAAC","sourcesContent":["/**\n * A2A push-notification delivery log — one row per (task state change × registered webhook).\n *\n * ## Why this is a SIBLING of the M2M webhook delivery log rather than a variant of it\n *\n * The two share a delivery PATTERN — write the row before enqueueing, one queue job per row, the\n * worker classifies the response and either retries or terminates — and that pattern is reused\n * deliberately, down to the transport primitive. What they do not share is a SCOPE SET:\n * `M2MWebhookDeliveryLog` is stamped out for `ORGANIZATIONS` and `APPLICATION`, while an A2A task\n * can be owned by a **USER** as well. A delegated-user A2A caller is the ordinary case, not an edge\n * one, so extending the M2M resource would have meant adding a user-scoped variant — a whole\n * user-facing resource surface — to a shipped feature on behalf of a different subsystem.\n *\n * Keeping them separate also keeps the two producers separable in every query: a resource-operation\n * notification and a task-lifecycle notification are different facts about different things, and an\n * operator filtering one should never have to exclude the other by hand.\n *\n * ## Why the row is written BEFORE the delivery is attempted\n *\n * Copied from the M2M dispatcher's reasoning, because it is the property that makes this table\n * worth having: if the worker created the row on its first attempt, an unreachable queue would\n * leave no trace at all. Writing it up front means an operator always sees an entry per\n * (task transition × webhook), including the deliveries that never got as far as being tried.\n *\n * spec-cite: A2A 1.0 §4.3.3 — *\"Agents MUST attempt delivery at least once for each configured\n * webhook\"* — and §13.2, which asks for retry with exponential backoff and permits giving up after\n * a configured number of consecutive failures. This row is where all three become observable.\n *\n * @see notifications/m2m/m2m-webhook-delivery-log.shared.schemas.ts — the pattern this mirrors\n * @see a2a-token-budget-state.shared.schemas.ts — the 3-scope A2A polymorphic precedent\n */\n\nimport { z } from 'zod';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { addDataCategories, initZodDecorators, addImpersonalizeWith } from '@wildo-ai/zod-decorators';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\n\nimport {\n CoreResourceType,\n coreResourceShared_FieldIdentifier,\n} from '../resources/resources.shared.core.definitions';\nimport {\n declarePolymorphicSchemas,\n optOutPolymorphicAutoBusinessKey,\n type PolymorphicVariantDefinition,\n} from '../resources/utils/resource-polymorphism.schemas';\n\ninitZodDecorators(z);\n\n/**\n * The delivery lifecycle:\n * PENDING → IN_FLIGHT → DELIVERED (acknowledged with 2xx)\n * PENDING → IN_FLIGHT → PENDING (transient failure — retry scheduled with backoff)\n * PENDING → IN_FLIGHT → FAILED (terminal — non-retryable status, or attempts exhausted)\n *\n * Deliberately its OWN enum rather than a reuse of `M2MWebhookDeliveryLogStatus`, even though the\n * members coincide. That enum is named for, and owned by, the M2M notifications feature; importing\n * it here would couple flows-actors to that subsystem's release cycle for no gain, and would make\n * either feature's future state change a cross-feature edit. If a third outbound-delivery consumer\n * ever appears, the answer is to extract ONE shared vocabulary — not to have the second consumer\n * borrow the first one's.\n */\nexport enum A2APushDeliveryStatus {\n PENDING = 'pending',\n IN_FLIGHT = 'in_flight',\n DELIVERED = 'delivered',\n FAILED = 'failed',\n}\n\nexport const A2APushDeliveryLogSchema = z.object({\n /** Document id — auto-generated / auto-managed (excluded from create). */\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /**\n * The stable identity of this delivery, generated once when the row is written and sent with\n * every attempt so a receiver can deduplicate.\n *\n * spec-cite: A2A 1.0 §4.3.3 — *\"Clients SHOULD process notifications idempotently, as duplicate\n * deliveries may occur\"*. A client can only honour that if duplicates are RECOGNISABLE, which\n * means the id must be stable across retries — hence generated at row creation, never per attempt.\n */\n deliveryId: z.string().min(1).isDBIndexed().isSummaryField(),\n\n /** The task whose transition triggered this notification. */\n taskId: z.string().min(1).isDBIndexed().isSummaryField(),\n\n /** Which registered configuration this row delivers to — a task may have several. */\n pushNotificationConfigId: z.string().min(1).isSummaryField(),\n\n /**\n * The agent instance the task belongs to. Carried so an operator can attribute deliveries per\n * agent, and so a per-instance purge never reaches another agent's rows — the same isolation\n * axis the task read enforces.\n */\n resourceServerInstanceRef: z.string().min(1).isDBIndexed().isSummaryField(),\n\n /**\n * The machine credential that owns the task, when one does.\n *\n * Carried because the worker must RE-READ the live configuration to obtain the client's\n * credential (see the worker for why the secret is not copied onto this row), and that read\n * enforces all four isolation axes. Without this field the read falls back to the \"no credential\"\n * sentinel and matches nothing for any task a machine client created — which is most A2A tasks,\n * since client-credentials auth is the ordinary way an agent connects.\n *\n * Optional rather than sentinel-defaulted: a delegated-user task genuinely has no machine\n * credential, and storing a sentinel here would make \"absent\" and \"explicitly none\" the same\n * value on a row whose whole job is to be evidence.\n */\n machineCredentialId: z.string().min(1).optional(),\n\n /** The destination, captured as it was AT DISPATCH — a later config edit must not rewrite history. */\n httpUrl: z.url(),\n\n payloadHash: z.string().min(1),\n // USER_CONTENT — the delivered payload carries the task's own content, which originated with the\n // person. The declaration says what the field is FOR; a payload can hold anything a task held.\n //\n // `addDataCategories` rather than the fluent form: `z.unknown()` is one of the types that carry NO\n // prototype-installed decorators at all (a decorator-WIDE gap, not specific to this one), so\n // `.dataCategories(...)` does not type-check on it. The helper is the documented escape hatch.\n // REMOVE on erasure. The delivered payload carries the task's own content, which originated with the\n // person — so it is content this row HOLDS. `z.unknown()` accepts null, so REMOVE is clearable here even\n // though the field is not written `.optional()`.\n payload: addImpersonalizeWith(\n addDataCategories(z.unknown(), PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n\n status: z\n .enum(A2APushDeliveryStatus)\n .default(A2APushDeliveryStatus.PENDING)\n .isDBIndexed()\n .isSummaryField(),\n\n attemptCount: z.number().int().nonnegative().default(0).isSummaryField(),\n\n lastAttemptAt: z.date().optional(),\n /** When the next retry becomes eligible. Indexed — this is the worker's drain query. */\n nextAttemptAt: z.date().optional().isDBIndexed(),\n\n responseStatus: z.number().int().optional(),\n /** Truncated by the worker before persistence: a webhook may answer with an unbounded body. */\n responseBodyTruncated: z.string().optional(),\n failureReason: z.string().optional().isSummaryField(),\n\n deliveredAt: z.date().optional(),\n failedAt: z.date().optional(),\n\n createdAt: z\n .date()\n .default(() => new Date())\n .isDBIndexed()\n .isSummaryField(),\n});\n\nexport type A2APushDeliveryLogBase = z.infer<typeof A2APushDeliveryLogSchema>;\n\n/**\n * The three owner scopes an A2A task — and therefore its deliveries — can belong to.\n *\n * Mirrors `flowActorTasksPolymorphicDeclaration`'s scope set exactly, and must keep mirroring it: a\n * task owner with no delivery-log variant is a task whose notifications cannot be recorded, which\n * is the audit hole this table exists to close.\n */\nexport const A2A_PUSH_DELIVERY_SCOPE_VARIANTS: PolymorphicVariantDefinition[] = [\n { parentResourceType: CoreResourceType.USERS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USERS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.ORGANIZATIONS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.APPLICATION, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION], isPrimaryScope: true },\n];\n\n/**\n * Produces 3 variants:\n * - users → `userA2aPushDeliveryLog` (`userId` injected)\n * - organizations → `organizationA2aPushDeliveryLog` (`organizationId` injected)\n * - applications → `applicationA2aPushDeliveryLog` (`applicationId` injected)\n *\n * Multi-row, so it opts OUT of the singleton auto-business-key: unlike the token-budget\n * accumulator, there are many delivery rows per owner and the owner FK is not their identity.\n */\nexport const a2aPushDeliveryLogPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'a2aPushDeliveryLog',\n baseFieldIdentifier: 'a2aPushDeliveryLogId',\n baseEnumKey: 'A2A_PUSH_DELIVERY_LOG',\n baseSchema: A2APushDeliveryLogSchema,\n variants: A2A_PUSH_DELIVERY_SCOPE_VARIANTS.map(optOutPolymorphicAutoBusinessKey),\n});\n"]}
1
+ {"version":3,"file":"a2a-push-delivery-log.shared.schemas.js","sourceRoot":"","sources":["../../../src/flows-actors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EAAE;IAC5C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE;IAErD,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAE7B,SAAS,EAAE,CAAC;SACT,IAAI,EAAE;SACN,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;SACzB,WAAW,EAAE;SACb,cAAc,EAAE;CACpB,CAAC,CAAC;AAIH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAmC;IAC9E,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,KAAK,EAAU,qBAAqB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAU,cAAc,EAAE,IAAI,EAAE;IACvK,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,aAAa,EAAE,qBAAqB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE;IACvK,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,WAAW,EAAI,qBAAqB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAI,cAAc,EAAE,IAAI,EAAE;CACxK,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,yBAAyB,CAAC;IAChF,gBAAgB,EAAE,oBAAoB;IACtC,mBAAmB,EAAE,sBAAsB;IAC3C,WAAW,EAAE,uBAAuB;IACpC,UAAU,EAAE,wBAAwB;IACpC,QAAQ,EAAE,gCAAgC,CAAC,GAAG,CAAC,gCAAgC,CAAC;CACjF,CAAC,CAAC","sourcesContent":["/**\n * A2A push-notification delivery log — one row per (task state change × registered webhook).\n *\n * ## Why this is a SIBLING of the M2M webhook delivery log rather than a variant of it\n *\n * The two share a delivery PATTERN — write the row before enqueueing, one queue job per row, the\n * worker classifies the response and either retries or terminates — and that pattern is reused\n * deliberately, down to the transport primitive. What they do not share is a SCOPE SET:\n * `M2MWebhookDeliveryLog` is stamped out for `ORGANIZATIONS` and `APPLICATION`, while an A2A task\n * can be owned by a **USER** as well. A delegated-user A2A caller is the ordinary case, not an edge\n * one, so extending the M2M resource would have meant adding a user-scoped variant — a whole\n * user-facing resource surface — to a shipped feature on behalf of a different subsystem.\n *\n * Keeping them separate also keeps the two producers separable in every query: a resource-operation\n * notification and a task-lifecycle notification are different facts about different things, and an\n * operator filtering one should never have to exclude the other by hand.\n *\n * ## Why the row is written BEFORE the delivery is attempted\n *\n * Copied from the M2M dispatcher's reasoning, because it is the property that makes this table\n * worth having: if the worker created the row on its first attempt, an unreachable queue would\n * leave no trace at all. Writing it up front means an operator always sees an entry per\n * (task transition × webhook), including the deliveries that never got as far as being tried.\n *\n * spec-cite: A2A 1.0 §4.3.3 — *\"Agents MUST attempt delivery at least once for each configured\n * webhook\"* — and §13.2, which asks for retry with exponential backoff and permits giving up after\n * a configured number of consecutive failures. This row is where all three become observable.\n *\n * @see notifications/m2m/m2m-webhook-delivery-log.shared.schemas.ts — the pattern this mirrors\n * @see a2a-token-budget-state.shared.schemas.ts — the 3-scope A2A polymorphic precedent\n */\n\nimport { z } from 'zod';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { addDataCategories, initZodDecorators, addImpersonalizeWith } from '@wildo-ai/zod-decorators';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\n\nimport {\n CoreResourceType,\n coreResourceShared_FieldIdentifier,\n} from '../resources/resources.shared.core.definitions';\nimport {\n declarePolymorphicSchemas,\n optOutPolymorphicAutoBusinessKey,\n type PolymorphicVariantDefinition,\n} from '../resources/utils/resource-polymorphism.schemas';\n\ninitZodDecorators(z);\n\n/**\n * The delivery lifecycle:\n * PENDING → IN_FLIGHT → DELIVERED (acknowledged with 2xx)\n * PENDING → IN_FLIGHT → PENDING (transient failure — retry scheduled with backoff)\n * PENDING → IN_FLIGHT → FAILED (terminal — non-retryable status, or attempts exhausted)\n *\n * Deliberately its OWN enum rather than a reuse of `M2MWebhookDeliveryLogStatus`, even though the\n * members coincide. That enum is named for, and owned by, the M2M notifications feature; importing\n * it here would couple flows-actors to that subsystem's release cycle for no gain, and would make\n * either feature's future state change a cross-feature edit. If a third outbound-delivery consumer\n * ever appears, the answer is to extract ONE shared vocabulary — not to have the second consumer\n * borrow the first one's.\n */\nexport enum A2APushDeliveryStatus {\n PENDING = 'pending',\n IN_FLIGHT = 'in_flight',\n DELIVERED = 'delivered',\n FAILED = 'failed',\n}\n\nexport const A2APushDeliveryLogSchema = z.object({\n /** Document id — auto-generated / auto-managed (excluded from create). */\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /**\n * The stable identity of this delivery, generated once when the row is written and sent with\n * every attempt so a receiver can deduplicate.\n *\n * spec-cite: A2A 1.0 §4.3.3 — *\"Clients SHOULD process notifications idempotently, as duplicate\n * deliveries may occur\"*. A client can only honour that if duplicates are RECOGNISABLE, which\n * means the id must be stable across retries — hence generated at row creation, never per attempt.\n */\n deliveryId: z.string().min(1).isDBIndexed().isSummaryField(),\n\n /** The task whose transition triggered this notification. */\n taskId: z.string().min(1).isDBIndexed().isSummaryField(),\n\n /** Which registered configuration this row delivers to — a task may have several. */\n pushNotificationConfigId: z.string().min(1).isSummaryField(),\n\n /**\n * The agent instance the task belongs to. Carried so an operator can attribute deliveries per\n * agent, and so a per-instance purge never reaches another agent's rows — the same isolation\n * axis the task read enforces.\n */\n resourceServerInstanceRef: z.string().min(1).isDBIndexed().isSummaryField(),\n\n /**\n * The machine credential that owns the task, when one does.\n *\n * Carried because the worker must RE-READ the live configuration to obtain the client's\n * credential (see the worker for why the secret is not copied onto this row), and that read\n * enforces all four isolation axes. Without this field the read falls back to the \"no credential\"\n * sentinel and matches nothing for any task a machine client created — which is most A2A tasks,\n * since client-credentials auth is the ordinary way an agent connects.\n *\n * Optional rather than sentinel-defaulted: a delegated-user task genuinely has no machine\n * credential, and storing a sentinel here would make \"absent\" and \"explicitly none\" the same\n * value on a row whose whole job is to be evidence.\n */\n machineCredentialId: z.string().min(1).optional(),\n\n /** The destination, captured as it was AT DISPATCH — a later config edit must not rewrite history. */\n httpUrl: z.url(),\n\n payloadHash: z.string().min(1),\n // USER_CONTENT — the delivered payload carries the task's own content, which originated with the\n // person. The declaration says what the field is FOR; a payload can hold anything a task held.\n //\n // `addDataCategories` rather than the fluent form: `z.unknown()` is one of the types that carry NO\n // prototype-installed decorators at all (a decorator-WIDE gap, not specific to this one), so\n // `.dataCategories(...)` does not type-check on it. The helper is the documented escape hatch.\n // REMOVE on erasure. The delivered payload carries the task's own content, which originated with the\n // person — so it is content this row HOLDS. `z.unknown()` accepts null, so REMOVE is clearable here even\n // though the field is not written `.optional()`.\n payload: addImpersonalizeWith(\n addDataCategories(z.unknown(), PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n\n status: z\n .enum(A2APushDeliveryStatus)\n .default(A2APushDeliveryStatus.PENDING)\n .isDBIndexed()\n .isSummaryField(),\n\n attemptCount: z.number().int().nonnegative().default(0).isSummaryField(),\n\n lastAttemptAt: z.date().optional(),\n /** When the next retry becomes eligible. Indexed — this is the worker's drain query. */\n nextAttemptAt: z.date().optional().isDBIndexed(),\n\n responseStatus: z.number().int().optional(),\n /** Truncated by the worker before persistence: a webhook may answer with an unbounded body. */\n responseBodyTruncated: z.string().optional(),\n failureReason: z.string().optional().isSummaryField(),\n\n deliveredAt: z.date().optional(),\n failedAt: z.date().optional(),\n\n createdAt: z\n .date()\n .default(() => new Date())\n .isDBIndexed()\n .isSummaryField(),\n});\n\nexport type A2APushDeliveryLogBase = z.infer<typeof A2APushDeliveryLogSchema>;\n\n/**\n * The three owner scopes an A2A task — and therefore its deliveries — can belong to.\n *\n * Mirrors `flowActorTasksPolymorphicDeclaration`'s scope set exactly, and must keep mirroring it: a\n * task owner with no delivery-log variant is a task whose notifications cannot be recorded, which\n * is the audit hole this table exists to close.\n */\nexport const A2A_PUSH_DELIVERY_SCOPE_VARIANTS: PolymorphicVariantDefinition[] = [\n { parentResourceType: CoreResourceType.USERS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USERS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.ORGANIZATIONS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.APPLICATION, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION], isPrimaryScope: true },\n];\n\n/**\n * Produces 3 variants:\n * - users → `userA2aPushDeliveryLog` (`userId` injected)\n * - organizations → `organizationA2aPushDeliveryLog` (`organizationId` injected)\n * - applications → `applicationA2aPushDeliveryLog` (`applicationId` injected)\n *\n * Multi-row, so it opts OUT of the singleton auto-business-key: unlike the token-budget\n * accumulator, there are many delivery rows per owner and the owner FK is not their identity.\n */\nexport const a2aPushDeliveryLogPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'a2aPushDeliveryLog',\n baseFieldIdentifier: 'a2aPushDeliveryLogId',\n baseEnumKey: 'A2A_PUSH_DELIVERY_LOG',\n baseSchema: A2APushDeliveryLogSchema,\n variants: A2A_PUSH_DELIVERY_SCOPE_VARIANTS.map(optOutPolymorphicAutoBusinessKey),\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"a2a-token-budget-state.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,qBAAqB,EAAoB,MAAM,gDAAgD,CAAC;AA4BzG;;;;;;;;;GASG;AACH,eAAO,MAAM,uCAAuC,qPA8InD,CAAC"}
1
+ {"version":3,"file":"a2a-token-budget-state.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,qBAAqB,EAAoB,MAAM,gDAAgD,CAAC;AA4BzG;;;;;;;;;GASG;AACH,eAAO,MAAM,uCAAuC,qPA8InD,CAAC"}