@wildo-ai/saas-models 1.1.2 → 1.1.3

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 (410) hide show
  1. package/dist/esm/applications/applications-context.schemas.d.ts +14 -10
  2. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  3. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  4. package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
  5. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  6. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +0 -4
  7. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  8. package/dist/esm/billing/billing-configuration.shared.schemas.js +59 -17
  9. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  10. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +77 -21
  11. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  12. package/dist/esm/billing/billing-enums.shared.schemas.js +85 -23
  13. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  14. package/dist/esm/billing/billing-types.shared.schemas.d.ts +3 -3
  15. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  16. package/dist/esm/billing/price.shared.schemas.js +7 -1
  17. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  18. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  19. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +52 -11
  20. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  21. package/dist/esm/billing/product-definition.shared.schemas.d.ts +2 -2
  22. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +2 -2
  23. package/dist/esm/billing/product.shared.schemas.d.ts +2 -2
  24. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/product.shared.schemas.js +7 -3
  26. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +1 -1
  28. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  29. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +15 -1
  30. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  31. package/dist/esm/billing/usage-record.shared.schemas.d.ts +7 -3
  32. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  33. package/dist/esm/billing/usage-record.shared.schemas.js +22 -3
  34. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  35. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +69 -2
  36. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  37. package/dist/esm/companion/provider-discovery.shared.schemas.js +20 -1
  38. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  39. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +85 -0
  40. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
  41. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +157 -0
  42. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -0
  43. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +23 -0
  44. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  45. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +56 -0
  46. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  47. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +480 -20
  48. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  49. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +547 -23
  50. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  51. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  52. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +82 -3
  53. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  54. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +31 -30
  55. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  56. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +98 -3
  57. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  58. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +17 -0
  59. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  60. package/dist/esm/compliance/privacy/privacy.shared.schemas.js +27 -4
  61. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  62. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +82 -29
  63. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  64. package/dist/esm/compliance/privacy/redaction.shared.schemas.js +95 -29
  65. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  66. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  67. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +12 -5
  68. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  69. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +21 -0
  70. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  71. package/dist/esm/config/analytics-value-moments.shared.schemas.js +20 -0
  72. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  73. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +7 -5
  74. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  75. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +8 -1
  76. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  77. package/dist/esm/config/auth-config-resolution.shared.utils.js +29 -0
  78. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  79. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +95 -17
  80. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  81. package/dist/esm/config/entity-identity-config.shared.schemas.js +86 -8
  82. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  83. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +12 -12
  84. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +28 -0
  85. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  86. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +28 -0
  87. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  88. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +45 -12
  89. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  90. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  91. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +103 -58
  92. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  93. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +176 -15
  94. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  95. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +15 -3
  96. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  97. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +32 -5
  98. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  99. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +83 -7
  100. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  101. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +59 -0
  102. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -0
  103. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +61 -0
  104. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -0
  105. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +97 -0
  106. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -0
  107. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +41 -0
  108. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -0
  109. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +148 -2
  110. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  111. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +56 -1
  112. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  113. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +5 -28
  114. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  115. package/dist/esm/external-providers/provider-capability.shared.schemas.js +4 -2
  116. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  117. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +18 -8
  118. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  119. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +9 -4
  120. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  121. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +338 -0
  122. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -0
  123. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +332 -0
  124. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -0
  125. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +178 -9
  126. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  127. package/dist/esm/external-providers/provider-metadata.shared.schemas.js +181 -9
  128. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  129. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +7 -5
  130. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  131. package/dist/esm/external-providers/provider-protocol.shared.schemas.js +7 -5
  132. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  133. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts +40 -0
  134. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -0
  135. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js +80 -0
  136. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -0
  137. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  138. package/dist/esm/features/core-feature-definitions.shared.js +7 -1
  139. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  140. package/dist/esm/features/feature-builders.shared.d.ts +32 -0
  141. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  142. package/dist/esm/features/feature-builders.shared.js +32 -0
  143. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  144. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts +14 -2
  145. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  146. package/dist/esm/files/file-upload-grant.shared.schemas.js +44 -5
  147. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  148. package/dist/esm/files/files.shared.schemas.d.ts +15 -8
  149. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  150. package/dist/esm/files/files.shared.schemas.js +15 -8
  151. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  152. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  153. package/dist/esm/flows-actors/actors.shared.schemas.js +3 -2
  154. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  155. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +54 -5
  156. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  157. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  158. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +6 -6
  159. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +0 -3
  160. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  161. package/dist/esm/flows-actors/deliberation.shared.schemas.js +0 -5
  162. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  163. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +14 -0
  164. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  165. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +40 -3
  166. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  167. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +19 -0
  168. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  169. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +33 -0
  170. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  171. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +14 -9
  172. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  173. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +14 -9
  174. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  175. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  176. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +3 -2
  177. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  178. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  179. package/dist/esm/flows-actors/flows.shared.schemas.js +3 -2
  180. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  181. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +128 -0
  182. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -0
  183. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +142 -0
  184. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -0
  185. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -3
  186. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
  187. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +1 -4
  188. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
  189. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +0 -16
  190. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  191. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +1 -17
  192. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  193. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +3 -3
  194. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +3 -3
  195. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  196. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +2 -8
  197. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
  198. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +4 -15
  199. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
  200. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  201. package/dist/esm/guidance/guidance-state.shared.utils.js +1 -0
  202. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  203. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +8 -0
  204. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  205. package/dist/esm/guidance/progression-state.shared.schemas.d.ts +46 -0
  206. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  207. package/dist/esm/guidance/progression-state.shared.schemas.js +49 -0
  208. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  209. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +320 -50
  210. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  211. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +137 -36
  212. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  213. package/dist/esm/index.d.ts +9 -0
  214. package/dist/esm/index.d.ts.map +1 -1
  215. package/dist/esm/index.js +9 -0
  216. package/dist/esm/index.js.map +1 -1
  217. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +11 -2
  218. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  219. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  220. package/dist/esm/notifications/email/email-template.shared.enums.d.ts +15 -0
  221. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  222. package/dist/esm/notifications/email/email-template.shared.enums.js +15 -0
  223. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  224. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +1 -0
  225. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  226. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +19 -0
  227. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  228. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +30 -0
  229. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  230. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +65 -1
  231. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  232. package/dist/esm/notifications/notification-badges.core.definitions.d.ts +6 -4
  233. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  234. package/dist/esm/notifications/notification-badges.core.definitions.js +6 -4
  235. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  236. package/dist/esm/notifications/notification-badges.schemas.d.ts +167 -5
  237. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  238. package/dist/esm/notifications/notification-badges.schemas.js +191 -6
  239. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  240. package/dist/esm/notifications/notifications.shared.schemas.d.ts +107 -0
  241. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  242. package/dist/esm/notifications/notifications.shared.schemas.js +149 -1
  243. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  244. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  245. package/dist/esm/organizations/organization-notifications.shared.schemas.js +22 -1
  246. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  247. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +26 -0
  248. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  249. package/dist/esm/organizations/organization-preferences.shared.schemas.js +25 -0
  250. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  251. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +25 -0
  252. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  253. package/dist/esm/organizations/organization-profile.shared.schemas.js +42 -17
  254. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  255. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +3 -2
  256. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  257. package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -2
  258. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  259. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  260. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +18 -3
  261. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  262. package/dist/esm/public-runtime/index.d.ts +49 -2
  263. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  264. package/dist/esm/public-runtime/index.js +48 -1
  265. package/dist/esm/public-runtime/index.js.map +1 -1
  266. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +6 -5
  267. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  268. package/dist/esm/queue/jobs.shared.resources-config.schemas.js +6 -5
  269. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  270. package/dist/esm/queue/jobs.shared.schemas.d.ts +16 -3
  271. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  272. package/dist/esm/queue/jobs.shared.schemas.js +16 -3
  273. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  274. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts +137 -0
  275. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -0
  276. package/dist/esm/requests/manual-controllers-routes-documentation.js +1201 -0
  277. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -0
  278. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +67 -0
  279. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  280. package/dist/esm/requests/manual-controllers-routes-urls.js +78 -0
  281. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  282. package/dist/esm/requests/rate-limits.shared.schemas.d.ts +11 -1
  283. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  284. package/dist/esm/requests/rate-limits.shared.schemas.js +11 -1
  285. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  286. package/dist/esm/requests/websocket.shared.schemas.d.ts +27 -4
  287. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  288. package/dist/esm/requests/websocket.shared.schemas.js +35 -0
  289. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  290. package/dist/esm/resources/resources-config.shared.factory.d.ts +1 -0
  291. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  292. package/dist/esm/resources/resources-config.shared.factory.js +105 -20
  293. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  294. package/dist/esm/resources/resources-config.shared.schemas.d.ts +254 -72
  295. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  296. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  297. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  298. package/dist/esm/resources/resources-registry.shared.core.definitions.js +97 -5
  299. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  300. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  301. package/dist/esm/resources/resources-relationships.shared.factory.js +15 -0
  302. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  303. package/dist/esm/resources/resources.shared.core.definitions.d.ts +37 -0
  304. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  305. package/dist/esm/resources/resources.shared.core.definitions.js +51 -0
  306. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  307. package/dist/esm/resources/resources.shared.schemas.d.ts +11 -2
  308. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  309. package/dist/esm/resources/resources.shared.schemas.js +34 -3
  310. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  311. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts +51 -0
  312. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -0
  313. package/dist/esm/resources/utils/field-value-disclosure.utils.js +53 -0
  314. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -0
  315. package/dist/esm/resources/utils/resources-summary.utils.d.ts +16 -2
  316. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  317. package/dist/esm/resources/utils/resources-summary.utils.js +19 -5
  318. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  319. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  320. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +11 -0
  321. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  322. package/dist/esm/runtime/domain-module.shared.definitions.d.ts +25 -0
  323. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  324. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  325. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
  326. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  327. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +38 -0
  328. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  329. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
  330. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  331. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +38 -0
  332. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  333. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +4 -11
  334. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  335. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +0 -1
  336. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  337. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +84 -5
  338. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  339. package/dist/esm/security/authentications/authentication.shared.schemas.js +83 -3
  340. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  341. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +1 -0
  342. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  343. package/dist/esm/security/authentications/registration.shared.dto.schemas.js +11 -0
  344. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  345. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +15 -0
  346. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  347. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +21 -4
  348. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  349. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +61 -1
  350. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  351. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +208 -6
  352. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  353. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +37 -27
  354. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  355. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +134 -12
  356. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  357. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +0 -6
  358. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  359. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +17 -8
  360. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  361. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  362. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +27 -0
  363. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  364. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +52 -7
  365. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  366. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +45 -8
  367. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  368. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +31 -0
  369. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -0
  370. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +198 -0
  371. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -0
  372. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +31 -0
  373. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -0
  374. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +191 -0
  375. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -0
  376. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +250 -0
  377. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -0
  378. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +486 -0
  379. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -0
  380. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +4 -1
  381. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  382. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +29 -0
  383. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  384. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +4 -1
  385. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  386. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +29 -0
  387. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  388. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +6 -0
  389. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  390. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +31 -0
  391. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  392. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +13 -0
  393. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  394. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +24 -3
  395. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  396. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +4 -4
  397. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
  398. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  399. package/dist/esm/users/user-self.shared.resources-config.schemas.js +33 -3
  400. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  401. package/dist/esm/users/users.shared.resources-config.schemas.d.ts +17 -1
  402. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  403. package/dist/esm/users/users.shared.resources-config.schemas.js +136 -5
  404. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  405. package/dist/esm/users/users.shared.schemas.d.ts +43 -12
  406. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  407. package/dist/esm/users/users.shared.schemas.js +38 -7
  408. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  409. package/dist/tsconfig.build.tsbuildinfo +1 -1
  410. package/package.json +4 -4
@@ -0,0 +1,198 @@
1
+ /**
2
+ * Organization Provider Credentials — resource configuration.
3
+ *
4
+ * The tenant-owned service credential toward a third-party provider. See
5
+ * `provider-credentials.shared.schemas.ts` for what the resource is and what it deliberately is not.
6
+ */
7
+ import { z } from 'zod';
8
+ import { OrganizationProviderCredentialSchema, ProviderCredentialValidationState, } from './provider-credentials.shared.schemas.js';
9
+ import { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas.js';
10
+ import { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory.js';
11
+ import { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas.js';
12
+ import { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions.js';
13
+ import { ResourceOperationRiskLevel, ResourceOperationVariantType } from '../../resources/resources.shared.schemas.js';
14
+ import { CORE_APP_ROLES, CORE_ORG_ROLES } from '../authorizations/roles.shared.schemas.js';
15
+ const ORG_PROVIDER_CREDENTIALS_SORT_FIELDS = ['createdAt', 'updatedAt', 'providerRef', 'lastUsedAt'];
16
+ const ORG_PROVIDER_CREDENTIALS_FILTER_FIELDS = {
17
+ providerRef: z.string(),
18
+ secretSlug: z.string(),
19
+ enabled: z.boolean(),
20
+ validationState: z.enum(ProviderCredentialValidationState),
21
+ };
22
+ export const orgProviderCredentialsResourceConfiguration_InitializationFactory = (resourcesRelationships) => createResourceConfiguration_Initialization({
23
+ mainSchema: OrganizationProviderCredentialSchema,
24
+ resourceIdentifier: CoreResourceType.ORG_PROVIDER_CREDENTIALS,
25
+ resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORG_PROVIDER_CREDENTIALS],
26
+ resourceRelationships: resourcesRelationships,
27
+ isSystemResource: true,
28
+ /**
29
+ * ## `read` / `list` — the RESOLVER's door
30
+ *
31
+ * A provider call happens on whatever execution context the caller holds: a batch, a queue
32
+ * consumer, an anonymous webhook return leg. None of those carry an ORG_ADMIN role, and the
33
+ * resolution must still work — so the resolver reads through `readAsSystem`, which is fail-closed
34
+ * on this opt-in. The scope is supplied as the organization FK in the system context map, so the
35
+ * bypass is of the ROLE check only, never of the tenant boundary.
36
+ *
37
+ * ## `update` — the resolver's WRITE-BACK door
38
+ *
39
+ * `lastUsedAt`, `validationState`, `validationError` and `lastValidatedAt` are all
40
+ * `.excludeFromUpdate()`, so the strict re-parse on the ordinary update path strips them. The
41
+ * trusted `updateAsSystem` path is the only one that re-attaches them, which is why it is opted
42
+ * into here and why those fields are not client-writable: a tenant administrator must not be able
43
+ * to declare their own credential `VALID`.
44
+ *
45
+ * ## `create` — deliberately NOT opted in
46
+ *
47
+ * A credential comes into existence only when a human supplies one. There is no seed, no
48
+ * provisioning step and no import that should mint one on a tenant's behalf, so the system create
49
+ * door stays shut.
50
+ *
51
+ * ## `exportSubject: FORBIDDEN`
52
+ *
53
+ * The reserved class. This row is a live credential toward a third party; a subject export that
54
+ * carried one would hand a working secret to whoever requested the export.
55
+ */
56
+ /**
57
+ * `create` is open for the reason its user-owned sibling documents at length: a credential a
58
+ * vendor MINTS has no HTTP write that could carry it. An OAuth2 grant arrives through a redirect
59
+ * after a tenant administrator authorized it on the vendor's consent screen, so the exchange —
60
+ * engine code, never a request payload — is the only thing that can store it.
61
+ */
62
+ systemAccessPolicy: {
63
+ exportSubject: ResourceSystemAccessMode.FORBIDDEN,
64
+ read: ResourceSystemAccessMode.ALLOWED,
65
+ list: ResourceSystemAccessMode.ALLOWED,
66
+ update: ResourceSystemAccessMode.ALLOWED,
67
+ create: ResourceSystemAccessMode.ALLOWED,
68
+ },
69
+ /**
70
+ * Subject erasure RETAINS this row and scrubs nothing, because there is nothing here that belongs
71
+ * to a person.
72
+ *
73
+ * The row is a TENANT's credential. `setByUserId` names an ACTOR — the administrator who typed it
74
+ * — which is the first population `NO_PRINCIPAL` describes, and it is exactly the field an
75
+ * erasure must not use as a reason to destroy the row: a tenant losing its Slack integration
76
+ * because the admin who configured it left the company is a bug, not a privacy guarantee.
77
+ *
78
+ * The erasure walk cannot reach this resource in any case, because no `USERS` relationship is
79
+ * registered for `setByUserId` — withheld deliberately, since that edge would also put a
80
+ * credential on the Art. 15 export graph. `RETAIN_ONLY` is therefore a statement of what WOULD
81
+ * happen rather than a path that runs today, and it is worth declaring for that reason: the next
82
+ * author who registers a USERS edge inherits the correct answer instead of the default.
83
+ *
84
+ * The assertion is checked in both directions by the factory — `RETAIN_ONLY` is refused if any
85
+ * field carries an impersonalize treatment or declares a personal-data category.
86
+ */
87
+ retentionPolicy: {
88
+ mode: ErasureRetentionMode.RETAIN_ONLY,
89
+ },
90
+ dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },
91
+ coreOperations: [
92
+ CoreResourceOperation.READ,
93
+ CoreResourceOperation.LIST,
94
+ CoreResourceOperation.CREATE,
95
+ CoreResourceOperation.UPDATE,
96
+ // Required by the ORGANIZATIONS cascade: `onParentDelete` dispatches the child's DELETE, and a
97
+ // relationship declaring the cascade against a resource with no DELETE core operation throws at
98
+ // config build. It is also the tenant's own "remove this credential" door.
99
+ CoreResourceOperation.DELETE,
100
+ // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.
101
+ CoreResourceOperation.UPDATE_MANY,
102
+ ],
103
+ operationsConfiguration: {
104
+ /*
105
+ * ORG_ADMIN everywhere, and NO super-administrator variant anywhere — a deliberate refusal, not
106
+ * an omission.
107
+ *
108
+ * Every sibling security resource (org API keys, org OAuth clients) carries an `admin` variant
109
+ * so a platform operator can support a tenant. This one does not, because the thing being
110
+ * supported is a live credential toward a THIRD PARTY: an operator who can list, rotate or spend
111
+ * a tenant's Slack token can act as that tenant toward Slack, and no audit event afterwards
112
+ * makes that reversible. `administrative-continuity-floors.md` asks for the reversibility test
113
+ * before crossing a tenant boundary, and this verb fails it in both directions — reading is
114
+ * masked but LISTing reveals which vendors a tenant integrates with, and rotating locks the
115
+ * tenant out of its own integration.
116
+ *
117
+ * The cost is real and accepted: a tenant that loses every ORG_ADMIN cannot have its credentials
118
+ * repaired by support. That is what `organizationMembers.grantOwnership` exists for — restore an
119
+ * administrator to the tenant, and the tenant repairs its own credentials. The repair path runs
120
+ * through identity, where it is audited and reversible, rather than through the credential
121
+ * store, where it would not be.
122
+ */
123
+ [CoreResourceOperation.READ]: {
124
+ variants: [
125
+ {
126
+ variantType: ResourceOperationVariantType.API_CALL,
127
+ isDefault: true,
128
+ roles: [CORE_ORG_ROLES.ORG_ADMIN],
129
+ // LOW because the value never leaves: `.isWriteOnlySecret()` redacts it at the client
130
+ // boundary, so a READ returns metadata and a placeholder.
131
+ riskLevel: ResourceOperationRiskLevel.LOW,
132
+ },
133
+ ],
134
+ },
135
+ [CoreResourceOperation.LIST]: {
136
+ variants: [
137
+ {
138
+ variantType: ResourceOperationVariantType.API_CALL,
139
+ isDefault: true,
140
+ roles: [CORE_ORG_ROLES.ORG_ADMIN],
141
+ riskLevel: ResourceOperationRiskLevel.LOW,
142
+ filterFields: ORG_PROVIDER_CREDENTIALS_FILTER_FIELDS,
143
+ sortFields: ORG_PROVIDER_CREDENTIALS_SORT_FIELDS,
144
+ maxPaginatedResultPerPageLimit: 100,
145
+ },
146
+ ],
147
+ },
148
+ [CoreResourceOperation.CREATE]: {
149
+ variants: [
150
+ {
151
+ variantType: ResourceOperationVariantType.API_CALL,
152
+ isDefault: true,
153
+ roles: [CORE_ORG_ROLES.ORG_ADMIN],
154
+ // CRITICAL: this is the act of granting the application authority to act as the tenant
155
+ // toward a third party.
156
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
157
+ },
158
+ ],
159
+ },
160
+ [CoreResourceOperation.UPDATE]: {
161
+ variants: [
162
+ {
163
+ variantType: ResourceOperationVariantType.API_CALL,
164
+ isDefault: true,
165
+ roles: [CORE_ORG_ROLES.ORG_ADMIN],
166
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
167
+ },
168
+ ],
169
+ },
170
+ [CoreResourceOperation.DELETE]: {
171
+ variants: [
172
+ {
173
+ variantType: ResourceOperationVariantType.API_CALL,
174
+ isDefault: true,
175
+ roles: [CORE_ORG_ROLES.ORG_ADMIN],
176
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
177
+ },
178
+ ],
179
+ },
180
+ /*
181
+ * Route-less retention plumbing. INTERNAL_CALL registers NO route, and must not be
182
+ * REPOSITORY_ONLY: that satisfies the factory's boot-time presence guard and then fails to
183
+ * resolve when an erasure actually runs, because the retention primitives resolve through
184
+ * `getServiceOperationPathDefault`, which excludes REPOSITORY_ONLY.
185
+ */
186
+ [CoreResourceOperation.UPDATE_MANY]: {
187
+ variants: [
188
+ {
189
+ variantType: ResourceOperationVariantType.INTERNAL_CALL,
190
+ isDefault: true,
191
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
192
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
193
+ },
194
+ ],
195
+ },
196
+ },
197
+ });
198
+ //# sourceMappingURL=provider-credentials-organization.shared.resources-config.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-credentials-organization.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../../src/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Organization Provider Credentials — resource configuration.\n *\n * The tenant-owned service credential toward a third-party provider. See\n * `provider-credentials.shared.schemas.ts` for what the resource is and what it deliberately is not.\n */\n\nimport { z } from 'zod';\n\nimport {\n OrganizationProviderCredentialSchema,\n ProviderCredentialValidationState,\n} from './provider-credentials.shared.schemas';\n\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../authorizations/roles.shared.schemas';\n\nconst ORG_PROVIDER_CREDENTIALS_SORT_FIELDS = ['createdAt', 'updatedAt', 'providerRef', 'lastUsedAt'] as const;\n\nconst ORG_PROVIDER_CREDENTIALS_FILTER_FIELDS = {\n providerRef: z.string(),\n secretSlug: z.string(),\n enabled: z.boolean(),\n validationState: z.enum(ProviderCredentialValidationState),\n};\n\ntype OrgProviderCredentialsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE\n | CoreResourceOperation.UPDATE_MANY;\n\nexport const orgProviderCredentialsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[],\n) => createResourceConfiguration_Initialization<\n undefined,\n OrgProviderCredentialsCoreOperations,\n typeof OrganizationProviderCredentialSchema\n>({\n mainSchema: OrganizationProviderCredentialSchema,\n resourceIdentifier: CoreResourceType.ORG_PROVIDER_CREDENTIALS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORG_PROVIDER_CREDENTIALS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /**\n * ## `read` / `list` — the RESOLVER's door\n *\n * A provider call happens on whatever execution context the caller holds: a batch, a queue\n * consumer, an anonymous webhook return leg. None of those carry an ORG_ADMIN role, and the\n * resolution must still work — so the resolver reads through `readAsSystem`, which is fail-closed\n * on this opt-in. The scope is supplied as the organization FK in the system context map, so the\n * bypass is of the ROLE check only, never of the tenant boundary.\n *\n * ## `update` — the resolver's WRITE-BACK door\n *\n * `lastUsedAt`, `validationState`, `validationError` and `lastValidatedAt` are all\n * `.excludeFromUpdate()`, so the strict re-parse on the ordinary update path strips them. The\n * trusted `updateAsSystem` path is the only one that re-attaches them, which is why it is opted\n * into here and why those fields are not client-writable: a tenant administrator must not be able\n * to declare their own credential `VALID`.\n *\n * ## `create` — deliberately NOT opted in\n *\n * A credential comes into existence only when a human supplies one. There is no seed, no\n * provisioning step and no import that should mint one on a tenant's behalf, so the system create\n * door stays shut.\n *\n * ## `exportSubject: FORBIDDEN`\n *\n * The reserved class. This row is a live credential toward a third party; a subject export that\n * carried one would hand a working secret to whoever requested the export.\n */\n /**\n * `create` is open for the reason its user-owned sibling documents at length: a credential a\n * vendor MINTS has no HTTP write that could carry it. An OAuth2 grant arrives through a redirect\n * after a tenant administrator authorized it on the vendor's consent screen, so the exchange —\n * engine code, never a request payload — is the only thing that can store it.\n */\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.FORBIDDEN,\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n },\n\n /**\n * Subject erasure RETAINS this row and scrubs nothing, because there is nothing here that belongs\n * to a person.\n *\n * The row is a TENANT's credential. `setByUserId` names an ACTOR — the administrator who typed it\n * — which is the first population `NO_PRINCIPAL` describes, and it is exactly the field an\n * erasure must not use as a reason to destroy the row: a tenant losing its Slack integration\n * because the admin who configured it left the company is a bug, not a privacy guarantee.\n *\n * The erasure walk cannot reach this resource in any case, because no `USERS` relationship is\n * registered for `setByUserId` — withheld deliberately, since that edge would also put a\n * credential on the Art. 15 export graph. `RETAIN_ONLY` is therefore a statement of what WOULD\n * happen rather than a path that runs today, and it is worth declaring for that reason: the next\n * author who registers a USERS edge inherits the correct answer instead of the default.\n *\n * The assertion is checked in both directions by the factory — `RETAIN_ONLY` is refused if any\n * field carries an impersonalize treatment or declares a personal-data category.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_ONLY,\n },\n\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // Required by the ORGANIZATIONS cascade: `onParentDelete` dispatches the child's DELETE, and a\n // relationship declaring the cascade against a resource with no DELETE core operation throws at\n // config build. It is also the tenant's own \"remove this credential\" door.\n CoreResourceOperation.DELETE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n operationsConfiguration: {\n /*\n * ORG_ADMIN everywhere, and NO super-administrator variant anywhere — a deliberate refusal, not\n * an omission.\n *\n * Every sibling security resource (org API keys, org OAuth clients) carries an `admin` variant\n * so a platform operator can support a tenant. This one does not, because the thing being\n * supported is a live credential toward a THIRD PARTY: an operator who can list, rotate or spend\n * a tenant's Slack token can act as that tenant toward Slack, and no audit event afterwards\n * makes that reversible. `administrative-continuity-floors.md` asks for the reversibility test\n * before crossing a tenant boundary, and this verb fails it in both directions — reading is\n * masked but LISTing reveals which vendors a tenant integrates with, and rotating locks the\n * tenant out of its own integration.\n *\n * The cost is real and accepted: a tenant that loses every ORG_ADMIN cannot have its credentials\n * repaired by support. That is what `organizationMembers.grantOwnership` exists for — restore an\n * administrator to the tenant, and the tenant repairs its own credentials. The repair path runs\n * through identity, where it is audited and reversible, rather than through the credential\n * store, where it would not be.\n */\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n // LOW because the value never leaves: `.isWriteOnlySecret()` redacts it at the client\n // boundary, so a READ returns metadata and a placeholder.\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n filterFields: ORG_PROVIDER_CREDENTIALS_FILTER_FIELDS,\n sortFields: ORG_PROVIDER_CREDENTIALS_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n },\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n // CRITICAL: this is the act of granting the application authority to act as the tenant\n // toward a third party.\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n /*\n * Route-less retention plumbing. INTERNAL_CALL registers NO route, and must not be\n * REPOSITORY_ONLY: that satisfies the factory's boot-time presence guard and then fails to\n * resolve when an erasure actually runs, because the retention primitives resolve through\n * `getServiceOperationPathDefault`, which excludes REPOSITORY_ONLY.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [\n {\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 },\n});\n"]}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * User Provider Credentials — resource configuration.
3
+ *
4
+ * A PERSON's own credential toward a third party. See `provider-credentials.shared.schemas.ts` for
5
+ * what the resource is, why it is separate from the organization-owned sibling, and why it is not a
6
+ * delegated OAuth grant.
7
+ */
8
+ import { z } from 'zod';
9
+ import { ProviderCredentialValidationState } from './provider-credentials.shared.schemas';
10
+ import { CoreResourceOperation } from '../../resources/resources.shared.core.definitions';
11
+ import { ResourceRelationship } from '../../resources/resources.shared.schemas';
12
+ type UserProviderCredentialsCoreOperations = CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.CREATE | CoreResourceOperation.UPDATE | CoreResourceOperation.DELETE | CoreResourceOperation.UPDATE_MANY;
13
+ export declare const userProviderCredentialsResourceConfiguration_InitializationFactory: (resourcesRelationships: ResourceRelationship[]) => import("../..").ResourceConfiguration<undefined, UserProviderCredentialsCoreOperations, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodObject<{
14
+ _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
15
+ userId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>>>;
16
+ providerRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>>;
17
+ secretSlug: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>>;
18
+ secretValue: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>;
19
+ enabled: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>>;
20
+ validationState: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodEnum<typeof ProviderCredentialValidationState>>>>;
21
+ validationError: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>>;
22
+ lastValidatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodDate>>>;
23
+ lastUsedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodDate>>>>;
24
+ secretSetAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodDate>>>;
25
+ connectionParameters: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
26
+ description: z.ZodOptional<z.ZodString>;
27
+ createdAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodDate>>>>>;
28
+ updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodDate>>>>;
29
+ }, z.core.$strip>>>;
30
+ export {};
31
+ //# sourceMappingURL=provider-credentials-user.shared.resources-config.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-credentials-user.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iCAAiC,EAElC,MAAM,uCAAuC,CAAC;AAK/C,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAA4D,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAY1I,KAAK,qCAAqC,GACtC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,kEAAkE,GAC7E,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;mBAsL9C,CAAC"}
@@ -0,0 +1,191 @@
1
+ /**
2
+ * User Provider Credentials — resource configuration.
3
+ *
4
+ * A PERSON's own credential toward a third party. See `provider-credentials.shared.schemas.ts` for
5
+ * what the resource is, why it is separate from the organization-owned sibling, and why it is not a
6
+ * delegated OAuth grant.
7
+ */
8
+ import { z } from 'zod';
9
+ import { ProviderCredentialValidationState, UserProviderCredentialSchema, } from './provider-credentials.shared.schemas.js';
10
+ import { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas.js';
11
+ import { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory.js';
12
+ import { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas.js';
13
+ import { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions.js';
14
+ import { ResourceOperationRiskLevel, ResourceOperationVariantType } from '../../resources/resources.shared.schemas.js';
15
+ import { CORE_APP_ROLES } from '../authorizations/roles.shared.schemas.js';
16
+ const USER_PROVIDER_CREDENTIALS_SORT_FIELDS = ['createdAt', 'updatedAt', 'providerRef', 'lastUsedAt'];
17
+ const USER_PROVIDER_CREDENTIALS_FILTER_FIELDS = {
18
+ providerRef: z.string(),
19
+ secretSlug: z.string(),
20
+ enabled: z.boolean(),
21
+ validationState: z.enum(ProviderCredentialValidationState),
22
+ };
23
+ export const userProviderCredentialsResourceConfiguration_InitializationFactory = (resourcesRelationships) => createResourceConfiguration_Initialization({
24
+ mainSchema: UserProviderCredentialSchema,
25
+ resourceIdentifier: CoreResourceType.USER_PROVIDER_CREDENTIALS,
26
+ resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_PROVIDER_CREDENTIALS],
27
+ resourceRelationships: resourcesRelationships,
28
+ isSystemResource: true,
29
+ /**
30
+ * The same four system doors as the organization-owned sibling, for the same reasons: a provider
31
+ * call runs on whatever execution context the caller holds, so the resolver reads through
32
+ * `readAsSystem`, and writes back `lastUsedAt` / `validationState` through `updateAsSystem` because
33
+ * those fields are `.excludeFromUpdate()` and a holder must not be able to declare their own
34
+ * credential VALID.
35
+ *
36
+ * ## `create` was shut, and the sentence that shut it stopped being true
37
+ *
38
+ * It read: "a credential exists only because a person supplied one." That is exactly right for a
39
+ * credential somebody PASTES, and false for one a vendor MINTS. An OAuth2 grant exists because a
40
+ * person authorized it on the vendor's own consent screen and came back through a redirect;
41
+ * nobody ever types it, so there is no HTTP write that could carry it. Leaving the door shut would
42
+ * mean the authorization exchange completes, the vendor records the grant, and this application
43
+ * has nowhere to put it.
44
+ *
45
+ * What keeps that narrow is the door itself rather than a second check: `createAsSystem` is
46
+ * reachable only from engine code — never an HTTP payload — its re-attach allowlist is DERIVED
47
+ * from the schema rather than caller-supplied, and the row identity the seal binds to comes from
48
+ * the scope map, so a caller cannot name whose credential it is writing.
49
+ *
50
+ * ## `exportSubject: FORBIDDEN` matters MORE here than on the sibling, and the difference is real
51
+ *
52
+ * The organization-owned row is unreachable on the subject-export graph anyway, because no `USERS`
53
+ * relationship is registered for its `setByUserId` — the export walk simply never arrives. This row
54
+ * IS reachable: `userId` is a registered `USERS` composition, which is what gives the resource its
55
+ * USER_SELF scope in the first place. So the export walk arrives here BY CONSTRUCTION, and this
56
+ * refusal is the only thing standing between a subject-access request and a working third-party
57
+ * credential in the response.
58
+ */
59
+ systemAccessPolicy: {
60
+ exportSubject: ResourceSystemAccessMode.FORBIDDEN,
61
+ read: ResourceSystemAccessMode.ALLOWED,
62
+ list: ResourceSystemAccessMode.ALLOWED,
63
+ update: ResourceSystemAccessMode.ALLOWED,
64
+ create: ResourceSystemAccessMode.ALLOWED,
65
+ },
66
+ /**
67
+ * `RETAIN_ONLY`, and the row still does not survive its owner — the CASCADE removes it.
68
+ *
69
+ * These are two different mechanisms and reading them as one produces the wrong answer in both
70
+ * directions. The retention policy governs what the erasure WALK does to a row it retains: here,
71
+ * nothing, because a secret is not personal data to be pseudonymised. You do not scrub a
72
+ * credential, you destroy it. The `USERS → USER_PROVIDER_CREDENTIALS` composition is what destroys
73
+ * it, dispatching this resource's DELETE when the person is removed.
74
+ *
75
+ * So a person who exercises erasure does not leave a live credential behind, and the mechanism that
76
+ * guarantees it is the relationship rather than the policy. Declaring `RETAIN_AND_IMPERSONALIZE`
77
+ * instead would be actively wrong: it would keep the row and replace its fields, leaving a sealed
78
+ * envelope whose key material still opens against a subject who asked to be forgotten.
79
+ */
80
+ retentionPolicy: {
81
+ mode: ErasureRetentionMode.RETAIN_ONLY,
82
+ },
83
+ /**
84
+ * `NO_PRINCIPAL` on the axis this enum actually decides: erasing a credential revokes no session,
85
+ * because no login is reachable from it. `userId` names the OWNER, not a login this row confers.
86
+ */
87
+ dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },
88
+ coreOperations: [
89
+ CoreResourceOperation.READ,
90
+ CoreResourceOperation.LIST,
91
+ CoreResourceOperation.CREATE,
92
+ CoreResourceOperation.UPDATE,
93
+ // Required by the USERS cascade — `onParentDelete` dispatches this DELETE — and it is also the
94
+ // holder's own "remove this credential" door.
95
+ CoreResourceOperation.DELETE,
96
+ // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.
97
+ CoreResourceOperation.UPDATE_MANY,
98
+ ],
99
+ operationsConfiguration: {
100
+ /*
101
+ * `APP_USER` everywhere, and NO administrative variant anywhere — a stronger refusal than the
102
+ * organization-owned sibling's, which refuses only the PLATFORM operator.
103
+ *
104
+ * Here an organization administrator is refused too. The row is a key its holder authored against
105
+ * their own account with a vendor; consent to store it is not consent for somebody else to spend
106
+ * it, and the vendor would record the act as the holder's own. There is no support story that
107
+ * makes that reversible, and the USER_SELF primary-scope filter is what enforces it structurally
108
+ * rather than by a role list somebody could widen.
109
+ *
110
+ * The cost is that a personal credential cannot be repaired by anyone but its owner, which is the
111
+ * correct outcome: if the person is gone, the credential should be too, and the cascade sees to it.
112
+ */
113
+ [CoreResourceOperation.READ]: {
114
+ variants: [
115
+ {
116
+ variantType: ResourceOperationVariantType.API_CALL,
117
+ isDefault: true,
118
+ roles: [CORE_APP_ROLES.APP_USER],
119
+ // LOW because the value never leaves: `.isWriteOnlySecret()` redacts it at the client
120
+ // boundary, so a READ returns metadata and a placeholder.
121
+ riskLevel: ResourceOperationRiskLevel.LOW,
122
+ },
123
+ ],
124
+ },
125
+ [CoreResourceOperation.LIST]: {
126
+ variants: [
127
+ {
128
+ variantType: ResourceOperationVariantType.API_CALL,
129
+ isDefault: true,
130
+ roles: [CORE_APP_ROLES.APP_USER],
131
+ riskLevel: ResourceOperationRiskLevel.LOW,
132
+ filterFields: USER_PROVIDER_CREDENTIALS_FILTER_FIELDS,
133
+ sortFields: USER_PROVIDER_CREDENTIALS_SORT_FIELDS,
134
+ maxPaginatedResultPerPageLimit: 100,
135
+ },
136
+ ],
137
+ },
138
+ [CoreResourceOperation.CREATE]: {
139
+ variants: [
140
+ {
141
+ variantType: ResourceOperationVariantType.API_CALL,
142
+ isDefault: true,
143
+ roles: [CORE_APP_ROLES.APP_USER],
144
+ // CRITICAL: the act of granting this application authority to act as the person toward a
145
+ // third party. That it is the person's own decision makes it consented, not low-risk.
146
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
147
+ },
148
+ ],
149
+ },
150
+ [CoreResourceOperation.UPDATE]: {
151
+ variants: [
152
+ {
153
+ variantType: ResourceOperationVariantType.API_CALL,
154
+ isDefault: true,
155
+ roles: [CORE_APP_ROLES.APP_USER],
156
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
157
+ },
158
+ ],
159
+ },
160
+ [CoreResourceOperation.DELETE]: {
161
+ variants: [
162
+ {
163
+ variantType: ResourceOperationVariantType.API_CALL,
164
+ isDefault: true,
165
+ roles: [CORE_APP_ROLES.APP_USER],
166
+ // Revoking one's own credential is the safe direction and must never be harder than
167
+ // granting it.
168
+ riskLevel: ResourceOperationRiskLevel.LOW,
169
+ },
170
+ ],
171
+ },
172
+ /**
173
+ * Route-less and INTERNAL_CALL only — the retention machinery's own door, never a client's.
174
+ *
175
+ * `retentionPolicy` requires READ + LIST + UPDATE_MANY to exist, and a bulk update reachable over
176
+ * HTTP on this resource would be a way to change many credentials at once, which no holder needs
177
+ * and no administrator may have.
178
+ */
179
+ [CoreResourceOperation.UPDATE_MANY]: {
180
+ variants: [
181
+ {
182
+ variantType: ResourceOperationVariantType.INTERNAL_CALL,
183
+ isDefault: true,
184
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
185
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
186
+ },
187
+ ],
188
+ },
189
+ },
190
+ });
191
+ //# sourceMappingURL=provider-credentials-user.shared.resources-config.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-credentials-user.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../../src/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * User Provider Credentials — resource configuration.\n *\n * A PERSON's own credential toward a third party. See `provider-credentials.shared.schemas.ts` for\n * what the resource is, why it is separate from the organization-owned sibling, and why it is not a\n * delegated OAuth grant.\n */\n\nimport { z } from 'zod';\n\nimport {\n ProviderCredentialValidationState,\n UserProviderCredentialSchema,\n} from './provider-credentials.shared.schemas';\n\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../authorizations/roles.shared.schemas';\n\nconst USER_PROVIDER_CREDENTIALS_SORT_FIELDS = ['createdAt', 'updatedAt', 'providerRef', 'lastUsedAt'] as const;\n\nconst USER_PROVIDER_CREDENTIALS_FILTER_FIELDS = {\n providerRef: z.string(),\n secretSlug: z.string(),\n enabled: z.boolean(),\n validationState: z.enum(ProviderCredentialValidationState),\n};\n\ntype UserProviderCredentialsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE\n | CoreResourceOperation.UPDATE_MANY;\n\nexport const userProviderCredentialsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[],\n) => createResourceConfiguration_Initialization<\n undefined,\n UserProviderCredentialsCoreOperations,\n typeof UserProviderCredentialSchema\n>({\n mainSchema: UserProviderCredentialSchema,\n resourceIdentifier: CoreResourceType.USER_PROVIDER_CREDENTIALS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_PROVIDER_CREDENTIALS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /**\n * The same four system doors as the organization-owned sibling, for the same reasons: a provider\n * call runs on whatever execution context the caller holds, so the resolver reads through\n * `readAsSystem`, and writes back `lastUsedAt` / `validationState` through `updateAsSystem` because\n * those fields are `.excludeFromUpdate()` and a holder must not be able to declare their own\n * credential VALID.\n *\n * ## `create` was shut, and the sentence that shut it stopped being true\n *\n * It read: \"a credential exists only because a person supplied one.\" That is exactly right for a\n * credential somebody PASTES, and false for one a vendor MINTS. An OAuth2 grant exists because a\n * person authorized it on the vendor's own consent screen and came back through a redirect;\n * nobody ever types it, so there is no HTTP write that could carry it. Leaving the door shut would\n * mean the authorization exchange completes, the vendor records the grant, and this application\n * has nowhere to put it.\n *\n * What keeps that narrow is the door itself rather than a second check: `createAsSystem` is\n * reachable only from engine code — never an HTTP payload — its re-attach allowlist is DERIVED\n * from the schema rather than caller-supplied, and the row identity the seal binds to comes from\n * the scope map, so a caller cannot name whose credential it is writing.\n *\n * ## `exportSubject: FORBIDDEN` matters MORE here than on the sibling, and the difference is real\n *\n * The organization-owned row is unreachable on the subject-export graph anyway, because no `USERS`\n * relationship is registered for its `setByUserId` — the export walk simply never arrives. This row\n * IS reachable: `userId` is a registered `USERS` composition, which is what gives the resource its\n * USER_SELF scope in the first place. So the export walk arrives here BY CONSTRUCTION, and this\n * refusal is the only thing standing between a subject-access request and a working third-party\n * credential in the response.\n */\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.FORBIDDEN,\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n },\n\n /**\n * `RETAIN_ONLY`, and the row still does not survive its owner — the CASCADE removes it.\n *\n * These are two different mechanisms and reading them as one produces the wrong answer in both\n * directions. The retention policy governs what the erasure WALK does to a row it retains: here,\n * nothing, because a secret is not personal data to be pseudonymised. You do not scrub a\n * credential, you destroy it. The `USERS → USER_PROVIDER_CREDENTIALS` composition is what destroys\n * it, dispatching this resource's DELETE when the person is removed.\n *\n * So a person who exercises erasure does not leave a live credential behind, and the mechanism that\n * guarantees it is the relationship rather than the policy. Declaring `RETAIN_AND_IMPERSONALIZE`\n * instead would be actively wrong: it would keep the row and replace its fields, leaving a sealed\n * envelope whose key material still opens against a subject who asked to be forgotten.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_ONLY,\n },\n\n /**\n * `NO_PRINCIPAL` on the axis this enum actually decides: erasing a credential revokes no session,\n * because no login is reachable from it. `userId` names the OWNER, not a login this row confers.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // Required by the USERS cascade — `onParentDelete` dispatches this DELETE — and it is also the\n // holder's own \"remove this credential\" door.\n CoreResourceOperation.DELETE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n operationsConfiguration: {\n /*\n * `APP_USER` everywhere, and NO administrative variant anywhere — a stronger refusal than the\n * organization-owned sibling's, which refuses only the PLATFORM operator.\n *\n * Here an organization administrator is refused too. The row is a key its holder authored against\n * their own account with a vendor; consent to store it is not consent for somebody else to spend\n * it, and the vendor would record the act as the holder's own. There is no support story that\n * makes that reversible, and the USER_SELF primary-scope filter is what enforces it structurally\n * rather than by a role list somebody could widen.\n *\n * The cost is that a personal credential cannot be repaired by anyone but its owner, which is the\n * correct outcome: if the person is gone, the credential should be too, and the cascade sees to it.\n */\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n // LOW because the value never leaves: `.isWriteOnlySecret()` redacts it at the client\n // boundary, so a READ returns metadata and a placeholder.\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n filterFields: USER_PROVIDER_CREDENTIALS_FILTER_FIELDS,\n sortFields: USER_PROVIDER_CREDENTIALS_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n },\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n // CRITICAL: the act of granting this application authority to act as the person toward a\n // third party. That it is the person's own decision makes it consented, not low-risk.\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n // Revoking one's own credential is the safe direction and must never be harder than\n // granting it.\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n /**\n * Route-less and INTERNAL_CALL only — the retention machinery's own door, never a client's.\n *\n * `retentionPolicy` requires READ + LIST + UPDATE_MANY to exist, and a bulk update reachable over\n * HTTP on this resource would be a way to change many credentials at once, which no holder needs\n * and no administrator may have.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [\n {\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 },\n});\n"]}