@noodleseed/one 0.63.0 → 0.64.0

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 (440) hide show
  1. package/dist/auth-discovery.d.ts +17 -0
  2. package/dist/auth-discovery.d.ts.map +1 -0
  3. package/dist/auth-discovery.js +54 -0
  4. package/dist/auth-discovery.js.map +1 -0
  5. package/dist/cli.d.ts.map +1 -1
  6. package/dist/cli.js +3 -0
  7. package/dist/cli.js.map +1 -1
  8. package/dist/commands/catalog-data-platform-auth.d.ts +7 -0
  9. package/dist/commands/catalog-data-platform-auth.d.ts.map +1 -0
  10. package/dist/commands/catalog-data-platform-auth.js +47 -0
  11. package/dist/commands/catalog-data-platform-auth.js.map +1 -0
  12. package/dist/commands/catalog.d.ts.map +1 -1
  13. package/dist/commands/catalog.js +6 -3
  14. package/dist/commands/catalog.js.map +1 -1
  15. package/dist/commands/docs-mcp.d.ts +3 -3
  16. package/dist/commands/docs-mcp.js +3 -3
  17. package/dist/commands/platform-auth-finalization-args.d.ts +13 -0
  18. package/dist/commands/platform-auth-finalization-args.d.ts.map +1 -0
  19. package/dist/commands/platform-auth-finalization-args.js +29 -0
  20. package/dist/commands/platform-auth-finalization-args.js.map +1 -0
  21. package/dist/commands/platform-auth-migration-args.d.ts +71 -0
  22. package/dist/commands/platform-auth-migration-args.d.ts.map +1 -0
  23. package/dist/commands/platform-auth-migration-args.js +320 -0
  24. package/dist/commands/platform-auth-migration-args.js.map +1 -0
  25. package/dist/commands/platform-auth-migration-ops.d.ts +3 -0
  26. package/dist/commands/platform-auth-migration-ops.d.ts.map +1 -0
  27. package/dist/commands/platform-auth-migration-ops.js +369 -0
  28. package/dist/commands/platform-auth-migration-ops.js.map +1 -0
  29. package/dist/commands/project-setup.js +1 -1
  30. package/dist/commands/project-setup.js.map +1 -1
  31. package/dist/config.d.ts +4 -4
  32. package/dist/config.d.ts.map +1 -1
  33. package/dist/control-plane.d.ts +0 -11
  34. package/dist/control-plane.d.ts.map +1 -1
  35. package/dist/control-plane.js +1 -8
  36. package/dist/control-plane.js.map +1 -1
  37. package/dist/doctor.d.ts.map +1 -1
  38. package/dist/doctor.js +3 -5
  39. package/dist/doctor.js.map +1 -1
  40. package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.d.ts.map +1 -1
  41. package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js +4 -0
  42. package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js.map +1 -1
  43. package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.d.ts.map +1 -1
  44. package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js +1 -0
  45. package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js.map +1 -1
  46. package/node_modules/@noodle-borg/auth/dist/jwt-issuer.d.ts +2 -2
  47. package/node_modules/@noodle-borg/auth/dist/jwt-issuer.d.ts.map +1 -1
  48. package/node_modules/@noodle-borg/auth/dist/jwt-issuer.js +1 -1
  49. package/node_modules/@noodle-borg/auth/dist/verify.d.ts +1 -1
  50. package/node_modules/@noodle-borg/auth/dist/verify.d.ts.map +1 -1
  51. package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.d.ts +26 -0
  52. package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.d.ts.map +1 -1
  53. package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.js +105 -1
  54. package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.js.map +1 -1
  55. package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.d.ts +25 -0
  56. package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.d.ts.map +1 -0
  57. package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.js +99 -0
  58. package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.js.map +1 -0
  59. package/node_modules/@noodle-borg/service/dist/index.d.ts +15 -0
  60. package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
  61. package/node_modules/@noodle-borg/service/dist/index.js +15 -0
  62. package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
  63. package/node_modules/@noodle-borg/service/dist/main.js +112 -19
  64. package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
  65. package/node_modules/@noodle-borg/service/dist/oauth/app.d.ts +1 -1
  66. package/node_modules/@noodle-borg/service/dist/oauth/app.d.ts.map +1 -1
  67. package/node_modules/@noodle-borg/service/dist/oauth/app.js +9 -1
  68. package/node_modules/@noodle-borg/service/dist/oauth/app.js.map +1 -1
  69. package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.d.ts +24 -0
  70. package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.d.ts.map +1 -0
  71. package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.js +88 -0
  72. package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.js.map +1 -0
  73. package/node_modules/@noodle-borg/service/dist/oauth/branding.d.ts +2 -0
  74. package/node_modules/@noodle-borg/service/dist/oauth/branding.d.ts.map +1 -1
  75. package/node_modules/@noodle-borg/service/dist/oauth/branding.js +3 -2
  76. package/node_modules/@noodle-borg/service/dist/oauth/branding.js.map +1 -1
  77. package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.d.ts +1 -1
  78. package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.d.ts.map +1 -1
  79. package/node_modules/@noodle-borg/service/dist/oauth/consent-token.d.ts +5 -0
  80. package/node_modules/@noodle-borg/service/dist/oauth/consent-token.d.ts.map +1 -0
  81. package/node_modules/@noodle-borg/service/dist/oauth/consent-token.js +19 -0
  82. package/node_modules/@noodle-borg/service/dist/oauth/consent-token.js.map +1 -0
  83. package/node_modules/@noodle-borg/service/dist/oauth/consent.js +1 -1
  84. package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.d.ts.map +1 -1
  85. package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.js +216 -28
  86. package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.js.map +1 -1
  87. package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.d.ts +13 -0
  88. package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.d.ts.map +1 -0
  89. package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js +62 -0
  90. package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js.map +1 -0
  91. package/node_modules/@noodle-borg/service/dist/oauth/metadata.d.ts +4 -0
  92. package/node_modules/@noodle-borg/service/dist/oauth/metadata.d.ts.map +1 -0
  93. package/node_modules/@noodle-borg/service/dist/oauth/metadata.js +20 -0
  94. package/node_modules/@noodle-borg/service/dist/oauth/metadata.js.map +1 -0
  95. package/node_modules/@noodle-borg/service/dist/oauth/paths.d.ts.map +1 -1
  96. package/node_modules/@noodle-borg/service/dist/oauth/paths.js +2 -0
  97. package/node_modules/@noodle-borg/service/dist/oauth/paths.js.map +1 -1
  98. package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.d.ts +15 -0
  99. package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.d.ts.map +1 -0
  100. package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.js +58 -0
  101. package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.js.map +1 -0
  102. package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.d.ts +8 -0
  103. package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.d.ts.map +1 -0
  104. package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.js +49 -0
  105. package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.js.map +1 -0
  106. package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.d.ts +3 -0
  107. package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.d.ts.map +1 -0
  108. package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.js +7 -0
  109. package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.js.map +1 -0
  110. package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts +20 -25
  111. package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts.map +1 -1
  112. package/node_modules/@noodle-borg/service/dist/oauth/provider.js +105 -196
  113. package/node_modules/@noodle-borg/service/dist/oauth/provider.js.map +1 -1
  114. package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.d.ts +36 -0
  115. package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.d.ts.map +1 -0
  116. package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.js +157 -0
  117. package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.js.map +1 -0
  118. package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.d.ts +4 -0
  119. package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.d.ts.map +1 -0
  120. package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.js +110 -0
  121. package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.js.map +1 -0
  122. package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.d.ts +7 -4
  123. package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.d.ts.map +1 -1
  124. package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.js +63 -120
  125. package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.js.map +1 -1
  126. package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts +19 -6
  127. package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts.map +1 -1
  128. package/node_modules/@noodle-borg/service/dist/oauth/store.js +24 -2
  129. package/node_modules/@noodle-borg/service/dist/oauth/store.js.map +1 -1
  130. package/node_modules/@noodle-borg/service/dist/oauth/tokens.d.ts +1 -1
  131. package/node_modules/@noodle-borg/service/dist/oauth/tokens.d.ts.map +1 -1
  132. package/node_modules/@noodle-borg/service/dist/oauth/tokens.js +1 -1
  133. package/node_modules/@noodle-borg/service/dist/oauth/tokens.js.map +1 -1
  134. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.d.ts +4 -0
  135. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.d.ts.map +1 -0
  136. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.js +8 -0
  137. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.js.map +1 -0
  138. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.d.ts +34 -0
  139. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.d.ts.map +1 -0
  140. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js +109 -0
  141. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js.map +1 -0
  142. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts +22 -0
  143. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts.map +1 -0
  144. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js +30 -0
  145. package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js.map +1 -0
  146. package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.d.ts +21 -0
  147. package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.d.ts.map +1 -0
  148. package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.js +56 -0
  149. package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.js.map +1 -0
  150. package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.d.ts +30 -0
  151. package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.d.ts.map +1 -0
  152. package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.js +94 -0
  153. package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.js.map +1 -0
  154. package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.d.ts +33 -0
  155. package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.d.ts.map +1 -0
  156. package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.js +27 -0
  157. package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.js.map +1 -0
  158. package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.d.ts +13 -0
  159. package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.d.ts.map +1 -0
  160. package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.js +63 -0
  161. package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.js.map +1 -0
  162. package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.d.ts +20 -0
  163. package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.d.ts.map +1 -0
  164. package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.js +40 -0
  165. package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.js.map +1 -0
  166. package/node_modules/@noodle-borg/service/dist/oauth/workos-events.d.ts +115 -0
  167. package/node_modules/@noodle-borg/service/dist/oauth/workos-events.d.ts.map +1 -0
  168. package/node_modules/@noodle-borg/service/dist/oauth/workos-events.js +310 -0
  169. package/node_modules/@noodle-borg/service/dist/oauth/workos-events.js.map +1 -0
  170. package/node_modules/@noodle-borg/service/dist/oauth/workos.d.ts +65 -0
  171. package/node_modules/@noodle-borg/service/dist/oauth/workos.d.ts.map +1 -0
  172. package/node_modules/@noodle-borg/service/dist/oauth/workos.js +85 -0
  173. package/node_modules/@noodle-borg/service/dist/oauth/workos.js.map +1 -0
  174. package/node_modules/@noodle-borg/service/dist/options.d.ts +11 -2
  175. package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
  176. package/node_modules/@noodle-borg/service/dist/personal-workspace.d.ts +2 -0
  177. package/node_modules/@noodle-borg/service/dist/personal-workspace.d.ts.map +1 -1
  178. package/node_modules/@noodle-borg/service/dist/personal-workspace.js +8 -2
  179. package/node_modules/@noodle-borg/service/dist/personal-workspace.js.map +1 -1
  180. package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.d.ts +67 -0
  181. package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.d.ts.map +1 -0
  182. package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.js +54 -0
  183. package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.js.map +1 -0
  184. package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.d.ts +25 -0
  185. package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.d.ts.map +1 -0
  186. package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.js +61 -0
  187. package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.js.map +1 -0
  188. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.d.ts +32 -0
  189. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.d.ts.map +1 -0
  190. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.js +231 -0
  191. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.js.map +1 -0
  192. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.d.ts +29 -0
  193. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.d.ts.map +1 -0
  194. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.js +350 -0
  195. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.js.map +1 -0
  196. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.d.ts +50 -0
  197. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.d.ts.map +1 -0
  198. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.js +239 -0
  199. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.js.map +1 -0
  200. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.d.ts +66 -0
  201. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.d.ts.map +1 -0
  202. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.js +77 -0
  203. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.js.map +1 -0
  204. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.d.ts +40 -0
  205. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.d.ts.map +1 -0
  206. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.js +355 -0
  207. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.js.map +1 -0
  208. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.d.ts +41 -0
  209. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.d.ts.map +1 -0
  210. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.js +230 -0
  211. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.js.map +1 -0
  212. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.d.ts +20 -0
  213. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.d.ts.map +1 -0
  214. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.js +126 -0
  215. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.js.map +1 -0
  216. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.d.ts +8 -0
  217. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.d.ts.map +1 -0
  218. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.js +86 -0
  219. package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.js.map +1 -0
  220. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.d.ts +42 -0
  221. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.d.ts.map +1 -0
  222. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.js +368 -0
  223. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.js.map +1 -0
  224. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.d.ts +86 -0
  225. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.d.ts.map +1 -0
  226. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.js +474 -0
  227. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.js.map +1 -0
  228. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.d.ts +17 -0
  229. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.d.ts.map +1 -0
  230. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.js +435 -0
  231. package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.js.map +1 -0
  232. package/node_modules/@noodle-borg/service/dist/platform-auth-migration.d.ts +202 -0
  233. package/node_modules/@noodle-borg/service/dist/platform-auth-migration.d.ts.map +1 -0
  234. package/node_modules/@noodle-borg/service/dist/platform-auth-migration.js +313 -0
  235. package/node_modules/@noodle-borg/service/dist/platform-auth-migration.js.map +1 -0
  236. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.d.ts +48 -0
  237. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.d.ts.map +1 -0
  238. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.js +158 -0
  239. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.js.map +1 -0
  240. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.d.ts +43 -0
  241. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.d.ts.map +1 -0
  242. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.js +92 -0
  243. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.js.map +1 -0
  244. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.d.ts +31 -0
  245. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.d.ts.map +1 -0
  246. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.js +94 -0
  247. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.js.map +1 -0
  248. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.d.ts +102 -0
  249. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.d.ts.map +1 -0
  250. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.js +2 -0
  251. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.js.map +1 -0
  252. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.d.ts +17 -0
  253. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.d.ts.map +1 -0
  254. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.js +367 -0
  255. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.js.map +1 -0
  256. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.d.ts +10 -0
  257. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.d.ts.map +1 -0
  258. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.js +37 -0
  259. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.js.map +1 -0
  260. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.d.ts +36 -0
  261. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.d.ts.map +1 -0
  262. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.js +156 -0
  263. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.js.map +1 -0
  264. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.d.ts +4 -0
  265. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.d.ts.map +1 -0
  266. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.js +162 -0
  267. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.js.map +1 -0
  268. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.d.ts +92 -0
  269. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.d.ts.map +1 -0
  270. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.js +271 -0
  271. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.js.map +1 -0
  272. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.d.ts +13 -0
  273. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.d.ts.map +1 -0
  274. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.js +67 -0
  275. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.js.map +1 -0
  276. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.d.ts +15 -0
  277. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.d.ts.map +1 -0
  278. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.js +47 -0
  279. package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.js.map +1 -0
  280. package/node_modules/@noodle-borg/service/dist/platform-auth-operator.d.ts +1569 -0
  281. package/node_modules/@noodle-borg/service/dist/platform-auth-operator.d.ts.map +1 -0
  282. package/node_modules/@noodle-borg/service/dist/platform-auth-operator.js +274 -0
  283. package/node_modules/@noodle-borg/service/dist/platform-auth-operator.js.map +1 -0
  284. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.d.ts +41 -0
  285. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.d.ts.map +1 -0
  286. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.js +163 -0
  287. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.js.map +1 -0
  288. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.d.ts +34 -0
  289. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.d.ts.map +1 -0
  290. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.js +274 -0
  291. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.js.map +1 -0
  292. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.d.ts +3 -0
  293. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.d.ts.map +1 -0
  294. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.js +120 -0
  295. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.js.map +1 -0
  296. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.d.ts +79 -0
  297. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.d.ts.map +1 -0
  298. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.js +88 -0
  299. package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.js.map +1 -0
  300. package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.d.ts +6 -0
  301. package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.d.ts.map +1 -0
  302. package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.js +38 -0
  303. package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.js.map +1 -0
  304. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.d.ts +61 -0
  305. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.d.ts.map +1 -0
  306. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.js +292 -0
  307. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.js.map +1 -0
  308. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.d.ts +19 -0
  309. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.d.ts.map +1 -0
  310. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.js +121 -0
  311. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.js.map +1 -0
  312. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.d.ts +119 -0
  313. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.d.ts.map +1 -0
  314. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.js +194 -0
  315. package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.js.map +1 -0
  316. package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts +36 -0
  317. package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts.map +1 -0
  318. package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js +93 -0
  319. package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js.map +1 -0
  320. package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.d.ts +32 -0
  321. package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.d.ts.map +1 -0
  322. package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.js +68 -0
  323. package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.js.map +1 -0
  324. package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.d.ts +36 -0
  325. package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.d.ts.map +1 -0
  326. package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.js +92 -0
  327. package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.js.map +1 -0
  328. package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.d.ts +23 -0
  329. package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.d.ts.map +1 -0
  330. package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.js +231 -0
  331. package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.js.map +1 -0
  332. package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.d.ts +13 -0
  333. package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.d.ts.map +1 -0
  334. package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.js +399 -0
  335. package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.js.map +1 -0
  336. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.d.ts +18 -0
  337. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.d.ts.map +1 -0
  338. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.js +25 -0
  339. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.js.map +1 -0
  340. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.d.ts +15 -0
  341. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.d.ts.map +1 -0
  342. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.js +74 -0
  343. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.js.map +1 -0
  344. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.d.ts +19 -0
  345. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.d.ts.map +1 -0
  346. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.js +249 -0
  347. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.js.map +1 -0
  348. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.d.ts +34 -0
  349. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.d.ts.map +1 -0
  350. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.js +275 -0
  351. package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.js.map +1 -0
  352. package/node_modules/@noodle-borg/service/dist/platform-identity-sync.d.ts +98 -0
  353. package/node_modules/@noodle-borg/service/dist/platform-identity-sync.d.ts.map +1 -0
  354. package/node_modules/@noodle-borg/service/dist/platform-identity-sync.js +179 -0
  355. package/node_modules/@noodle-borg/service/dist/platform-identity-sync.js.map +1 -0
  356. package/node_modules/@noodle-borg/service/dist/platform-identity.d.ts +110 -0
  357. package/node_modules/@noodle-borg/service/dist/platform-identity.d.ts.map +1 -0
  358. package/node_modules/@noodle-borg/service/dist/platform-identity.js +312 -0
  359. package/node_modules/@noodle-borg/service/dist/platform-identity.js.map +1 -0
  360. package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.d.ts +6 -0
  361. package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.d.ts.map +1 -0
  362. package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.js +36 -0
  363. package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.js.map +1 -0
  364. package/node_modules/@noodle-borg/service/dist/routes/billing-read.d.ts.map +1 -1
  365. package/node_modules/@noodle-borg/service/dist/routes/billing-read.js +3 -9
  366. package/node_modules/@noodle-borg/service/dist/routes/billing-read.js.map +1 -1
  367. package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.d.ts.map +1 -1
  368. package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.js +3 -3
  369. package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.js.map +1 -1
  370. package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.d.ts.map +1 -1
  371. package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js +3 -1
  372. package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js.map +1 -1
  373. package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.d.ts +8 -0
  374. package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.d.ts.map +1 -0
  375. package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.js +40 -0
  376. package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.js.map +1 -0
  377. package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.d.ts +13 -0
  378. package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.d.ts.map +1 -0
  379. package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.js +158 -0
  380. package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.js.map +1 -0
  381. package/node_modules/@noodle-borg/service/dist/serve-options.d.ts +21 -3
  382. package/node_modules/@noodle-borg/service/dist/serve-options.d.ts.map +1 -1
  383. package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
  384. package/node_modules/@noodle-borg/service/dist/serve.js +61 -146
  385. package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
  386. package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts +1 -0
  387. package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts.map +1 -1
  388. package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js +3 -0
  389. package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js.map +1 -1
  390. package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
  391. package/node_modules/@noodle-borg/service/dist/service.js +17 -29
  392. package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
  393. package/node_modules/@noodle-borg/service/dist/store/control-plane.d.ts.map +1 -1
  394. package/node_modules/@noodle-borg/service/dist/store/control-plane.js +60 -19
  395. package/node_modules/@noodle-borg/service/dist/store/control-plane.js.map +1 -1
  396. package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.d.ts +1 -2
  397. package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.d.ts.map +1 -1
  398. package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.js +0 -40
  399. package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.js.map +1 -1
  400. package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.d.ts +5 -0
  401. package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.d.ts.map +1 -0
  402. package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.js +176 -0
  403. package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.js.map +1 -0
  404. package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts +2 -0
  405. package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts.map +1 -1
  406. package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js +43 -1
  407. package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js.map +1 -1
  408. package/node_modules/@noodle-borg/service/dist/store/postgres-signup.js +2 -1
  409. package/node_modules/@noodle-borg/service/dist/store/postgres-signup.js.map +1 -1
  410. package/node_modules/@noodle-borg/service/dist/workos-directory.d.ts +71 -0
  411. package/node_modules/@noodle-borg/service/dist/workos-directory.d.ts.map +1 -0
  412. package/node_modules/@noodle-borg/service/dist/workos-directory.js +175 -0
  413. package/node_modules/@noodle-borg/service/dist/workos-directory.js.map +1 -0
  414. package/node_modules/@noodle-borg/service/package.json +1 -0
  415. package/node_modules/@workos-inc/node/LICENSE +21 -0
  416. package/node_modules/@workos-inc/node/README.md +140 -0
  417. package/node_modules/@workos-inc/node/lib/factory-B8vTFojy.d.cts +9727 -0
  418. package/node_modules/@workos-inc/node/lib/factory-B8vTFojy.d.mts +9727 -0
  419. package/node_modules/@workos-inc/node/lib/factory-CoKXdPX2.cjs +8426 -0
  420. package/node_modules/@workos-inc/node/lib/factory-CoKXdPX2.cjs.map +1 -0
  421. package/node_modules/@workos-inc/node/lib/factory-MKPb5Egh.mjs +8241 -0
  422. package/node_modules/@workos-inc/node/lib/factory-MKPb5Egh.mjs.map +1 -0
  423. package/node_modules/@workos-inc/node/lib/index.cjs +449 -0
  424. package/node_modules/@workos-inc/node/lib/index.cjs.map +1 -0
  425. package/node_modules/@workos-inc/node/lib/index.d.cts +478 -0
  426. package/node_modules/@workos-inc/node/lib/index.d.mts +478 -0
  427. package/node_modules/@workos-inc/node/lib/index.mjs +394 -0
  428. package/node_modules/@workos-inc/node/lib/index.mjs.map +1 -0
  429. package/node_modules/@workos-inc/node/lib/index.worker.cjs +60 -0
  430. package/node_modules/@workos-inc/node/lib/index.worker.cjs.map +1 -0
  431. package/node_modules/@workos-inc/node/lib/index.worker.d.cts +16 -0
  432. package/node_modules/@workos-inc/node/lib/index.worker.d.mts +16 -0
  433. package/node_modules/@workos-inc/node/lib/index.worker.mjs +35 -0
  434. package/node_modules/@workos-inc/node/lib/index.worker.mjs.map +1 -0
  435. package/node_modules/@workos-inc/node/lib/webapi-BgpV54gi.mjs +3224 -0
  436. package/node_modules/@workos-inc/node/lib/webapi-BgpV54gi.mjs.map +1 -0
  437. package/node_modules/@workos-inc/node/lib/webapi-BzGFatFp.cjs +3271 -0
  438. package/node_modules/@workos-inc/node/lib/webapi-BzGFatFp.cjs.map +1 -0
  439. package/node_modules/@workos-inc/node/package.json +96 -0
  440. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-auth-operator.d.ts","sourceRoot":"","sources":["../src/platform-auth-operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,sCAAsC;;;;;;;EAOjD,CAAC;AAEH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;EAiBjD,CAAC;AAgFH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAgC,CAAC;AAChF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAG7C,CAAC;AAuBH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAoB3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAY1F,eAAO,MAAM,oCAAoC;;;;;;;;kBAAgC,CAAC;AAClF,eAAO,MAAM,kCAAkC;;;;;;;;;kBAG7C,CAAC;AACH,eAAO,MAAM,sCAAsC;;;;;;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AS,oCAAoC,EAAE,GAC1D,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;KAChC,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,2BAA2B;IAC1C,WAAW,IAAI,OAAO,CAAC;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClF;AAED,MAAM,MAAM,6BAA6B,GACrC,oCAAoC,GACpC,gCAAgC,GAChC,uBAAuB,GACvB,wBAAwB,GACxB,oBAAoB,GACpB,gBAAgB,GAChB,wBAAwB,GACxB,sBAAsB,GACtB,aAAa,GACb,sBAAsB,GACtB,kBAAkB,GAClB,sBAAsB,GACtB,kBAAkB,GAClB,gCAAgC,GAChC,4BAA4B,GAC5B,8BAA8B,GAC9B,iCAAiC,CAAC;AAEtC,qBAAa,yBAA0B,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,6BAA6B;gBAAnC,IAAI,EAAE,6BAA6B;CAIzD"}
@@ -0,0 +1,274 @@
1
+ import { z } from 'zod';
2
+ const SHA = z.string().regex(/^[0-9a-f]{40}$/);
3
+ const CHECKSUM = z.string().regex(/^[0-9a-f]{64}$/);
4
+ const BOUNDED_TEXT = z.string().trim().min(1).max(256);
5
+ const CLIENT_IDS = z
6
+ .array(BOUNDED_TEXT)
7
+ .max(100)
8
+ .transform((values) => [...new Set(values)].sort());
9
+ export const PlatformAuthInventoryBlockerCodeSchema = z.enum([
10
+ 'missing_verified_email',
11
+ 'multiple_current_verified_emails',
12
+ 'shared_verified_email',
13
+ 'external_id_too_long',
14
+ 'conflicting_workos_user',
15
+ 'ambiguous_platform_customer_evidence',
16
+ ]);
17
+ export const PlatformAuthOperationBlockerCodeSchema = z.enum([
18
+ ...PlatformAuthInventoryBlockerCodeSchema.options,
19
+ 'inventory_unavailable',
20
+ 'inventory_blocked',
21
+ 'import_already_started',
22
+ 'import_not_started',
23
+ 'unresolved_imports',
24
+ 'pending_outbox',
25
+ 'active_import_leases',
26
+ 'outbox_processor_not_configured',
27
+ 'outbox_recovery_not_configured',
28
+ 'events_processor_not_configured',
29
+ 'outbox_reconciliation_pending',
30
+ 'events_reconciliation_pending',
31
+ 'remote_verification_incomplete',
32
+ 'rollout_transition_invalid',
33
+ 'finalize_precondition_failed',
34
+ ]);
35
+ const BlockerSchema = z.strictObject({
36
+ code: PlatformAuthOperationBlockerCodeSchema,
37
+ count: z.number().int().nonnegative(),
38
+ });
39
+ const RolloutSchema = z.strictObject({
40
+ generation: z.number().int().nonnegative(),
41
+ workosPercentage: z.number().int().min(0).max(100),
42
+ lifecycle: z.enum(['google', 'workos', 'finalized']),
43
+ canaryClientSetHash: CHECKSUM,
44
+ canaryClientCount: z.number().int().nonnegative(),
45
+ recoveryClientSetHash: CHECKSUM,
46
+ recoveryClientCount: z.number().int().nonnegative(),
47
+ workosDefaultSince: z.string().datetime().nullable(),
48
+ });
49
+ const InventorySchema = z.strictObject({
50
+ state: z.enum(['unavailable', 'running', 'ready', 'blocked']),
51
+ phase: z.enum(['remote', 'local', 'completed']).nullable().default(null),
52
+ remotePages: z.number().int().nonnegative().default(0),
53
+ remoteUsers: z.number().int().nonnegative().default(0),
54
+ localSubjects: z.number().int().nonnegative().default(0),
55
+ candidateCount: z.number().int().nonnegative(),
56
+ excludedCount: z.number().int().nonnegative(),
57
+ checksum: CHECKSUM.nullable(),
58
+ blockers: z.array(BlockerSchema),
59
+ });
60
+ const ImportSchema = z.strictObject({
61
+ state: z.enum(['not_started', 'running', 'completed', 'failed']),
62
+ total: z.number().int().nonnegative(),
63
+ pending: z.number().int().nonnegative(),
64
+ reconcileRequired: z.number().int().nonnegative(),
65
+ linked: z.number().int().nonnegative(),
66
+ blocked: z.number().int().nonnegative(),
67
+ failed: z.number().int().nonnegative(),
68
+ activeLeases: z.number().int().nonnegative(),
69
+ nextRetryAt: z.string().datetime().nullable(),
70
+ });
71
+ const ProcessorStatusSchema = z.enum(['ready', 'pending', 'not_configured']);
72
+ const SynchronizationSchema = z.strictObject({
73
+ outbox: z.strictObject({
74
+ status: ProcessorStatusSchema,
75
+ pending: z.number().int().nonnegative(),
76
+ lastSuccessAgeSeconds: z.number().int().nonnegative().nullable(),
77
+ }),
78
+ events: z.strictObject({
79
+ status: ProcessorStatusSchema,
80
+ lastSuccessAgeSeconds: z.number().int().nonnegative().nullable(),
81
+ }),
82
+ });
83
+ const RemoteVerificationSchema = z
84
+ .strictObject({
85
+ state: z.enum(['not_configured', 'not_started', 'running', 'ready', 'blocked']),
86
+ checkedCount: z.number().int().nonnegative(),
87
+ candidateCount: z.number().int().nonnegative(),
88
+ verifiedCount: z.number().int().nonnegative(),
89
+ retryAt: z.string().datetime().nullable(),
90
+ })
91
+ .refine((progress) => progress.verifiedCount <= progress.checkedCount &&
92
+ progress.checkedCount <= progress.candidateCount);
93
+ const SnapshotShape = {
94
+ schemaVersion: z.literal(1),
95
+ releaseSha: SHA,
96
+ rollout: RolloutSchema,
97
+ inventory: InventorySchema,
98
+ import: ImportSchema,
99
+ synchronization: SynchronizationSchema,
100
+ remoteVerification: RemoteVerificationSchema,
101
+ };
102
+ export const PlatformAuthOperatorSnapshotSchema = z.strictObject(SnapshotShape);
103
+ export const PlatformAuthOperatorResponseSchema = z.strictObject({
104
+ ok: z.literal(true),
105
+ data: PlatformAuthOperatorSnapshotSchema,
106
+ });
107
+ const ActivatePreviewPreserveSchema = z.strictObject({
108
+ schemaVersion: z.literal(1),
109
+ operation: z.literal('activate'),
110
+ percentage: z.number().int().min(1).max(100),
111
+ cohortMode: z.literal('preserve'),
112
+ });
113
+ const ActivatePreviewReplaceSchema = z.strictObject({
114
+ schemaVersion: z.literal(1),
115
+ operation: z.literal('activate'),
116
+ percentage: z.number().int().min(1).max(100),
117
+ cohortMode: z.literal('replace'),
118
+ canaryClientIds: CLIENT_IDS,
119
+ recoveryClientIds: CLIENT_IDS,
120
+ });
121
+ const FinalizationEvidenceShape = {
122
+ rollbackRehearsalChecksum: CHECKSUM,
123
+ stagingWorkosOnlySmokeChecksum: CHECKSUM,
124
+ };
125
+ export const PlatformAuthPreviewRequestSchema = z.union([
126
+ z.strictObject({ schemaVersion: z.literal(1), operation: z.literal('start_import') }),
127
+ z.strictObject({
128
+ schemaVersion: z.literal(1),
129
+ operation: z.literal('recover_outbox'),
130
+ batchSize: z.number().int().min(1).max(100),
131
+ }),
132
+ z.strictObject({
133
+ schemaVersion: z.literal(1),
134
+ operation: z.literal('reconcile'),
135
+ batchSize: z.number().int().min(1).max(100),
136
+ }),
137
+ ActivatePreviewPreserveSchema,
138
+ ActivatePreviewReplaceSchema,
139
+ z.strictObject({ schemaVersion: z.literal(1), operation: z.literal('rollback') }),
140
+ z.strictObject({
141
+ schemaVersion: z.literal(1),
142
+ operation: z.literal('finalize'),
143
+ ...FinalizationEvidenceShape,
144
+ }),
145
+ ]);
146
+ const MutationShape = {
147
+ schemaVersion: z.literal(1),
148
+ expectedGeneration: z.number().int().nonnegative(),
149
+ releaseSha: SHA,
150
+ previewChecksum: CHECKSUM,
151
+ idempotencyKey: z.string().min(8).max(256),
152
+ reason: BOUNDED_TEXT,
153
+ confirmed: z.literal(true),
154
+ };
155
+ export const PlatformAuthStartImportRequestSchema = z.strictObject(MutationShape);
156
+ export const PlatformAuthReconcileRequestSchema = z.strictObject({
157
+ ...MutationShape,
158
+ batchSize: z.number().int().min(1).max(100),
159
+ });
160
+ export const PlatformAuthRecoverOutboxRequestSchema = z.strictObject({
161
+ ...MutationShape,
162
+ batchSize: z.number().int().min(1).max(100),
163
+ });
164
+ export const PlatformAuthActivateRequestSchema = z.discriminatedUnion('cohortMode', [
165
+ z.strictObject({
166
+ ...MutationShape,
167
+ percentage: z.number().int().min(1).max(100),
168
+ cohortMode: z.literal('preserve'),
169
+ }),
170
+ z.strictObject({
171
+ ...MutationShape,
172
+ percentage: z.number().int().min(1).max(100),
173
+ cohortMode: z.literal('replace'),
174
+ canaryClientIds: CLIENT_IDS,
175
+ recoveryClientIds: CLIENT_IDS,
176
+ }),
177
+ ]);
178
+ export const PlatformAuthRollbackRequestSchema = z.strictObject(MutationShape);
179
+ export const PlatformAuthFinalizeRequestSchema = z.strictObject({
180
+ ...MutationShape,
181
+ ...FinalizationEvidenceShape,
182
+ });
183
+ const PreviewTargetSchema = z.strictObject({
184
+ percentage: z.number().int().min(0).max(100).nullable(),
185
+ batchSize: z.number().int().min(1).max(100).nullable(),
186
+ cohortMode: z.enum(['preserve', 'replace']).nullable(),
187
+ canaryClientSetHash: CHECKSUM,
188
+ canaryClientCount: z.number().int().nonnegative(),
189
+ recoveryClientSetHash: CHECKSUM,
190
+ recoveryClientCount: z.number().int().nonnegative(),
191
+ });
192
+ const RecoveryPreviewTargetSchema = z
193
+ .strictObject({
194
+ batchSize: z.number().int().min(1).max(100),
195
+ terminalCount: z.number().int().nonnegative(),
196
+ terminalSetHash: CHECKSUM,
197
+ })
198
+ .refine((target) => target.terminalCount <= target.batchSize);
199
+ const OperationPreviewShape = {
200
+ ...SnapshotShape,
201
+ ready: z.boolean(),
202
+ previewChecksum: CHECKSUM.nullable(),
203
+ blockers: z.array(BlockerSchema),
204
+ };
205
+ export const PlatformAuthOperationPreviewSchema = z.union([
206
+ z.strictObject({
207
+ ...OperationPreviewShape,
208
+ operation: z.enum(['start_import', 'reconcile', 'activate', 'rollback', 'finalize']),
209
+ target: PreviewTargetSchema,
210
+ }),
211
+ z.strictObject({
212
+ ...OperationPreviewShape,
213
+ operation: z.literal('recover_outbox'),
214
+ target: RecoveryPreviewTargetSchema,
215
+ }),
216
+ ]);
217
+ export const PlatformAuthOperationPreviewResponseSchema = z.strictObject({
218
+ ok: z.literal(true),
219
+ data: PlatformAuthOperationPreviewSchema,
220
+ });
221
+ const BatchSchema = z.strictObject({
222
+ attempted: z.number().int().nonnegative(),
223
+ linked: z.number().int().nonnegative(),
224
+ blocked: z.number().int().nonnegative(),
225
+ retryRequired: z.number().int().nonnegative(),
226
+ failed: z.number().int().nonnegative(),
227
+ outbox: z.strictObject({
228
+ status: ProcessorStatusSchema,
229
+ attempted: z.number().int().nonnegative(),
230
+ delivered: z.number().int().nonnegative(),
231
+ blocked: z.number().int().nonnegative(),
232
+ retryRequired: z.number().int().nonnegative(),
233
+ }),
234
+ events: z.strictObject({
235
+ status: ProcessorStatusSchema,
236
+ processed: z.number().int().nonnegative(),
237
+ }),
238
+ });
239
+ const RecoveryBatchSchema = z
240
+ .strictObject({
241
+ attempted: z.number().int().nonnegative(),
242
+ recovered: z.number().int().nonnegative(),
243
+ rejected: z.number().int().nonnegative(),
244
+ })
245
+ .refine((batch) => batch.attempted === batch.recovered + batch.rejected);
246
+ const OperationResultShape = {
247
+ ...SnapshotShape,
248
+ replayed: z.boolean(),
249
+ };
250
+ export const PlatformAuthOperationResultSchema = z.union([
251
+ z.strictObject({
252
+ ...OperationResultShape,
253
+ operation: z.enum(['start_import', 'reconcile', 'activate', 'rollback', 'finalize']),
254
+ batch: BatchSchema.nullable(),
255
+ }),
256
+ z.strictObject({
257
+ ...OperationResultShape,
258
+ operation: z.literal('recover_outbox'),
259
+ batch: RecoveryBatchSchema,
260
+ }),
261
+ ]);
262
+ export const PlatformAuthOperationResultResponseSchema = z.strictObject({
263
+ ok: z.literal(true),
264
+ data: PlatformAuthOperationResultSchema,
265
+ });
266
+ export class PlatformAuthOperatorError extends Error {
267
+ code;
268
+ constructor(code) {
269
+ super(code);
270
+ this.code = code;
271
+ this.name = 'PlatformAuthOperatorError';
272
+ }
273
+ }
274
+ //# sourceMappingURL=platform-auth-operator.js.map
@@ -0,0 +1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ACzC,CAAC;KACD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;AAE3E,MAAM,oBAAoB,GAAG;IAC3B,GAAG,aAAa;IAChB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CACb,CAAC;AAEX,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC;IACvD,CAAC,CAAC,YAAY,CAAC;QACb,GAAG,oBAAoB;QACvB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QACpF,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE;KAC9B,CAAC;IACF,CAAC,CAAC,YAAY,CAAC;QACb,GAAG,oBAAoB;QACvB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;QACtC,KAAK,EAAE,mBAAmB;KAC3B,CAAC;CACH,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,CAAC,YAAY,CAAC;IACtE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACnB,IAAI,EAAE,iCAAiC;CACxC,CAAC,CAAC;AAyFH,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAC7B;IAArB,YAAqB,IAAmC;QACtD,KAAK,CAAC,IAAI,CAAC,CAAC;QADO,SAAI,GAAJ,IAAI,CAA+B;QAEtD,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF"}
@@ -0,0 +1,41 @@
1
+ import type { PlatformAuthRemoteVerificationScope, PlatformAuthRemoteVerificationStore, PlatformAuthRemoteVerificationSweepProgress, PlatformAuthRemoteVerificationTarget } from './platform-auth-remote-verification.js';
2
+ import type { PlatformIdentityQueryable } from './platform-identity-postgres.js';
3
+ export interface RemoteVerificationSweepRow {
4
+ readonly id: string;
5
+ readonly state: 'running' | 'completed';
6
+ readonly started_at: Date;
7
+ readonly completed_at: Date | null;
8
+ readonly retry_at: Date | null;
9
+ readonly candidate_count: number;
10
+ readonly verified_count: number;
11
+ readonly provider?: string;
12
+ readonly realm?: string;
13
+ readonly inventory_run_id?: string;
14
+ readonly import_run_id?: string;
15
+ }
16
+ export interface RemoteVerificationTargetRow {
17
+ readonly source_subject: string;
18
+ readonly candidate_fingerprint: string;
19
+ readonly principal_id: string | null;
20
+ readonly normalized_email: string | null;
21
+ readonly blocker_count: number;
22
+ readonly ledger_state: string | null;
23
+ readonly external_id: string | null;
24
+ readonly remote_user_id: string | null;
25
+ readonly ledger_lease_token: string | null;
26
+ readonly ledger_lease_expires_at: Date | null;
27
+ readonly link_ready: boolean;
28
+ }
29
+ export declare const REMOTE_VERIFICATION_SWEEP_SELECT = "SELECT id::text, state, started_at, completed_at, retry_at,\n candidate_count, verified_count\n FROM platform_auth_remote_verification_sweeps";
30
+ export declare const REMOTE_VERIFICATION_TARGET_SELECT = "SELECT candidate.source_subject, candidate.candidate_fingerprint,\n candidate.principal_id, candidate.normalized_email,\n cardinality(candidate.blocker_codes)::int AS blocker_count,\n ledger.state AS ledger_state, ledger.external_id, ledger.remote_user_id,\n ledger.lease_token AS ledger_lease_token, ledger.lease_expires_at AS ledger_lease_expires_at,\n (link.principal_id IS NOT NULL AND link.disabled_at IS NULL) AS link_ready\n FROM platform_auth_inventory_candidates candidate\n LEFT JOIN workos_import_ledger ledger\n ON ledger.principal_id = COALESCE(candidate.principal_id, candidate.source_subject)\n AND ledger.migration_run_id = $2 AND ledger.realm = $3\n LEFT JOIN platform_identity_links link\n ON link.provider = 'workos' AND link.realm = $3 AND link.external_id = ledger.remote_user_id\n AND link.principal_id = COALESCE(candidate.principal_id, candidate.source_subject)";
31
+ export declare function remoteVerificationProgress(pool: PlatformIdentityQueryable, sweep: RemoteVerificationSweepRow): Promise<PlatformAuthRemoteVerificationSweepProgress>;
32
+ export declare function progressResult(sweep: RemoteVerificationSweepRow, checked: number, retryAt: Date | undefined): PlatformAuthRemoteVerificationSweepProgress;
33
+ export declare function remoteVerificationTarget(row: RemoteVerificationTargetRow): PlatformAuthRemoteVerificationTarget;
34
+ export declare function remoteVerificationEvidenceParameters(input: Parameters<PlatformAuthRemoteVerificationStore['recordEvidence']>[0]): readonly unknown[];
35
+ export declare function validateRemoteVerificationEvidence(input: Parameters<PlatformAuthRemoteVerificationStore['recordEvidence']>[0]): void;
36
+ export declare function assertRemoteVerificationRunBinding(pool: PlatformIdentityQueryable, scope: PlatformAuthRemoteVerificationScope): Promise<void>;
37
+ export declare function remoteVerificationCandidateCount(pool: PlatformIdentityQueryable, inventoryRunId: string): Promise<number>;
38
+ export declare function remoteVerificationFingerprint(value: unknown): string;
39
+ export declare function validateRemoteVerificationScope(scope: PlatformAuthRemoteVerificationScope, freshAfter: Date): void;
40
+ export declare function validRemoteVerificationSweepId(value: string): boolean;
41
+ //# sourceMappingURL=platform-auth-remote-verification-postgres-support.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-auth-remote-verification-postgres-support.d.ts","sourceRoot":"","sources":["../src/platform-auth-remote-verification-postgres-support.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mCAAmC,EACnC,mCAAmC,EACnC,2CAA2C,EAC3C,oCAAoC,EACrC,MAAM,wCAAwC,CAAC;AAEhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAEjF,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;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AED,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,2BAA2B,GAC/B,oCAAoC,CAoBtC;AAED,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,UAAU,CAAC,mCAAmC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1E,SAAS,OAAO,EAAE,CA0BpB;AAED,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,UAAU,CAAC,mCAAmC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1E,IAAI,CAaN;AAED,wBAAsB,kCAAkC,CACtD,IAAI,EAAE,yBAAyB,EAC/B,KAAK,EAAE,mCAAmC,GACzC,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,yBAAyB,EAC/B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,MAAM,CAAC,CAUjB;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEpE;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,mCAAmC,EAC1C,UAAU,EAAE,IAAI,GACf,IAAI,CAMN;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAErE"}
@@ -0,0 +1,163 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { PlatformAuthMigrationError } from './platform-auth-migration.js';
3
+ import { normalizePlatformIdentityEmail } from './platform-identity.js';
4
+ export const REMOTE_VERIFICATION_SWEEP_SELECT = `SELECT id::text, state, started_at, completed_at, retry_at,
5
+ candidate_count, verified_count
6
+ FROM platform_auth_remote_verification_sweeps`;
7
+ export const REMOTE_VERIFICATION_TARGET_SELECT = `SELECT candidate.source_subject, candidate.candidate_fingerprint,
8
+ candidate.principal_id, candidate.normalized_email,
9
+ cardinality(candidate.blocker_codes)::int AS blocker_count,
10
+ ledger.state AS ledger_state, ledger.external_id, ledger.remote_user_id,
11
+ ledger.lease_token AS ledger_lease_token, ledger.lease_expires_at AS ledger_lease_expires_at,
12
+ (link.principal_id IS NOT NULL AND link.disabled_at IS NULL) AS link_ready
13
+ FROM platform_auth_inventory_candidates candidate
14
+ LEFT JOIN workos_import_ledger ledger
15
+ ON ledger.principal_id = COALESCE(candidate.principal_id, candidate.source_subject)
16
+ AND ledger.migration_run_id = $2 AND ledger.realm = $3
17
+ LEFT JOIN platform_identity_links link
18
+ ON link.provider = 'workos' AND link.realm = $3 AND link.external_id = ledger.remote_user_id
19
+ AND link.principal_id = COALESCE(candidate.principal_id, candidate.source_subject)`;
20
+ export async function remoteVerificationProgress(pool, sweep) {
21
+ const aggregate = await pool.query(`SELECT count(evidence.sweep_id)::int AS checked,
22
+ count(evidence.sweep_id) FILTER (WHERE evidence.outcome_code = 'verified')::int AS verified,
23
+ min(COALESCE(target.retry_at, target.lease_expires_at)) FILTER (WHERE evidence.sweep_id IS NULL) AS retry_at
24
+ FROM platform_auth_remote_verification_targets target
25
+ LEFT JOIN platform_auth_remote_verification_evidence evidence
26
+ ON evidence.sweep_id = target.sweep_id AND evidence.candidate_fingerprint = target.candidate_fingerprint
27
+ WHERE target.sweep_id = $1`, [sweep.id]);
28
+ const checked = aggregate.rows[0]?.checked ?? 0;
29
+ const verified = aggregate.rows[0]?.verified ?? 0;
30
+ if (checked > sweep.candidate_count)
31
+ throw new PlatformAuthMigrationError('reconciliation_drift');
32
+ let current = { ...sweep, verified_count: verified };
33
+ if (sweep.state === 'running' && checked === sweep.candidate_count) {
34
+ const completed = await pool.query(`UPDATE platform_auth_remote_verification_sweeps
35
+ SET state = 'completed', verified_count = $2, completed_at = now(),
36
+ retry_at = CASE WHEN $2 = candidate_count
37
+ THEN NULL ELSE now() + interval '5 minutes' END
38
+ WHERE id = $1 AND state = 'running'
39
+ RETURNING id::text, state, started_at, completed_at, retry_at,
40
+ candidate_count, verified_count`, [sweep.id, verified]);
41
+ current = completed.rows[0] ?? sweep;
42
+ }
43
+ return progressResult(current, checked, current.retry_at ?? aggregate.rows[0]?.retry_at ?? undefined);
44
+ }
45
+ export function progressResult(sweep, checked, retryAt) {
46
+ return {
47
+ sweepId: sweep.id,
48
+ state: sweep.state,
49
+ startedAt: sweep.started_at,
50
+ candidateCount: sweep.candidate_count,
51
+ checkedCount: checked,
52
+ verifiedCount: sweep.verified_count,
53
+ allVerified: sweep.state === 'completed' && sweep.verified_count === sweep.candidate_count,
54
+ hasMore: sweep.state === 'running',
55
+ ...(retryAt === undefined ? {} : { retryAt }),
56
+ };
57
+ }
58
+ export function remoteVerificationTarget(row) {
59
+ if (!/^[0-9a-f]{64}$/.test(row.candidate_fingerprint))
60
+ throw new PlatformAuthMigrationError('reconciliation_drift');
61
+ const principalId = row.principal_id ?? row.source_subject;
62
+ return {
63
+ candidateFingerprint: row.candidate_fingerprint,
64
+ principalId,
65
+ externalId: row.external_id ?? principalId,
66
+ verifiedEmail: row.normalized_email ?? '',
67
+ ...(row.remote_user_id === null ? {} : { remoteUserId: row.remote_user_id }),
68
+ localBindingReady: row.normalized_email !== null &&
69
+ row.blocker_count === 0 &&
70
+ row.ledger_state === 'linked' &&
71
+ row.external_id === principalId &&
72
+ row.remote_user_id !== null &&
73
+ row.ledger_lease_token === null &&
74
+ row.ledger_lease_expires_at === null &&
75
+ row.link_ready,
76
+ };
77
+ }
78
+ export function remoteVerificationEvidenceParameters(input) {
79
+ const { lease, observed } = input;
80
+ return [
81
+ lease.sweepId,
82
+ lease.target.candidateFingerprint,
83
+ lease.leaseToken,
84
+ lease.attempt,
85
+ input.outcome,
86
+ lease.target.principalId,
87
+ lease.target.externalId,
88
+ lease.target.verifiedEmail,
89
+ lease.target.remoteUserId ?? null,
90
+ lease.target.localBindingReady,
91
+ remoteVerificationFingerprint(lease.target.principalId),
92
+ remoteVerificationFingerprint(lease.target.externalId),
93
+ remoteVerificationFingerprint(lease.target.verifiedEmail),
94
+ lease.target.remoteUserId === undefined
95
+ ? null
96
+ : remoteVerificationFingerprint(lease.target.remoteUserId),
97
+ observed === undefined ? null : remoteVerificationFingerprint(observed.remoteUserId),
98
+ observed?.externalId === undefined ? null : remoteVerificationFingerprint(observed.externalId),
99
+ observed === undefined
100
+ ? null
101
+ : remoteVerificationFingerprint(normalizePlatformIdentityEmail(observed.normalizedEmail)),
102
+ observed?.emailVerified ?? null,
103
+ ];
104
+ }
105
+ export function validateRemoteVerificationEvidence(input) {
106
+ const { target } = input.lease;
107
+ let expected;
108
+ if (!target.localBindingReady || target.remoteUserId === undefined)
109
+ expected = 'local_binding_invalid';
110
+ else if (input.observed === undefined)
111
+ expected = 'not_found';
112
+ else if (input.observed.remoteUserId !== target.remoteUserId)
113
+ expected = 'remote_id_mismatch';
114
+ else if (input.observed.externalId !== target.externalId)
115
+ expected = 'external_id_mismatch';
116
+ else if (!input.observed.emailVerified)
117
+ expected = 'email_unverified';
118
+ else if (normalizePlatformIdentityEmail(input.observed.normalizedEmail) !== target.verifiedEmail)
119
+ expected = 'email_mismatch';
120
+ else
121
+ expected = 'verified';
122
+ if (input.outcome !== expected)
123
+ throw new PlatformAuthMigrationError('reconciliation_drift');
124
+ }
125
+ export async function assertRemoteVerificationRunBinding(pool, scope) {
126
+ if (scope.provider !== 'workos')
127
+ throw new PlatformAuthMigrationError('invalid_import');
128
+ const result = await pool.query(`SELECT imported.inventory_run_id, imported.workos_realm_fingerprint,
129
+ imported.state AS import_state, inventory.state AS inventory_state
130
+ FROM identity_migration_runs imported
131
+ LEFT JOIN identity_migration_runs inventory ON inventory.id = imported.inventory_run_id
132
+ WHERE imported.id = $1 AND imported.kind IN ('import', 'reconcile')`, [scope.importRunId]);
133
+ const row = result.rows[0];
134
+ if (row === undefined ||
135
+ row.inventory_run_id !== scope.inventoryRunId ||
136
+ row.workos_realm_fingerprint !== remoteVerificationFingerprint(scope.realm) ||
137
+ (row.import_state !== 'running' && row.import_state !== 'completed') ||
138
+ row.inventory_state !== 'completed')
139
+ throw new PlatformAuthMigrationError('reconciliation_drift');
140
+ }
141
+ export async function remoteVerificationCandidateCount(pool, inventoryRunId) {
142
+ const result = await pool.query(`SELECT count(*)::int AS count,
143
+ count(*) FILTER (WHERE candidate_fingerprint IS NULL)::int AS invalid
144
+ FROM platform_auth_inventory_candidates WHERE migration_run_id = $1`, [inventoryRunId]);
145
+ if ((result.rows[0]?.invalid ?? 0) !== 0)
146
+ throw new PlatformAuthMigrationError('reconciliation_drift');
147
+ return result.rows[0]?.count ?? 0;
148
+ }
149
+ export function remoteVerificationFingerprint(value) {
150
+ return createHash('sha256').update(JSON.stringify(value)).digest('hex');
151
+ }
152
+ export function validateRemoteVerificationScope(scope, freshAfter) {
153
+ if (![scope.inventoryRunId, scope.importRunId, scope.provider, scope.realm].every(validBounded) ||
154
+ !Number.isFinite(freshAfter.getTime()))
155
+ throw new PlatformAuthMigrationError('invalid_import');
156
+ }
157
+ export function validRemoteVerificationSweepId(value) {
158
+ return /^[1-9][0-9]*$/.test(value);
159
+ }
160
+ function validBounded(value) {
161
+ return value.length > 0 && value.length <= 256 && !value.includes('\0');
162
+ }
163
+ //# sourceMappingURL=platform-auth-remote-verification-postgres-support.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-auth-remote-verification-postgres-support.js","sourceRoot":"","sources":["../src/platform-auth-remote-verification-postgres-support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAO1E,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AA+BxE,MAAM,CAAC,MAAM,gCAAgC,GAAG;;gDAEA,CAAC;AACjD,MAAM,CAAC,MAAM,iCAAiC,GAAG;;;;;;;;;;;;sFAYqC,CAAC;AAEvF,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,IAA+B,EAC/B,KAAiC;IAEjC,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,KAAK,CAKhC;;;;;;iCAM6B,EAC7B,CAAC,KAAK,CAAC,EAAE,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C,CAAC;AAC1E,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { PlatformAuthRemoteVerificationLease, PlatformAuthRemoteVerificationOutcome, PlatformAuthRemoteVerificationReadiness, PlatformAuthRemoteVerificationScope, PlatformAuthRemoteVerificationStore, PlatformAuthRemoteVerificationSweepProgress } from './platform-auth-remote-verification.js';
2
+ import type { PlatformIdentityQueryable } from './platform-identity-postgres.js';
3
+ type Connection = PlatformIdentityQueryable & {
4
+ release?: () => void;
5
+ };
6
+ type Pool = PlatformIdentityQueryable & {
7
+ connect?: () => Promise<Connection>;
8
+ };
9
+ export declare class PostgresPlatformAuthRemoteVerificationStore implements PlatformAuthRemoteVerificationStore {
10
+ #private;
11
+ constructor(pool: Pool);
12
+ beginOrResumeSweep(scope: PlatformAuthRemoteVerificationScope, freshAfter: Date): Promise<PlatformAuthRemoteVerificationSweepProgress>;
13
+ claimBatch(sweepId: string, limit: number): Promise<readonly PlatformAuthRemoteVerificationLease[]>;
14
+ recordEvidence(input: {
15
+ readonly lease: PlatformAuthRemoteVerificationLease;
16
+ readonly outcome: PlatformAuthRemoteVerificationOutcome;
17
+ readonly observed?: {
18
+ readonly remoteUserId: string;
19
+ readonly externalId?: string;
20
+ readonly normalizedEmail: string;
21
+ readonly emailVerified: boolean;
22
+ };
23
+ }): Promise<void>;
24
+ deferVerification(input: {
25
+ readonly lease: PlatformAuthRemoteVerificationLease;
26
+ readonly retryAt: Date;
27
+ }): Promise<void>;
28
+ progress(sweepId: string): Promise<PlatformAuthRemoteVerificationSweepProgress>;
29
+ readiness(scope: PlatformAuthRemoteVerificationScope & {
30
+ readonly freshAfter: Date;
31
+ }): Promise<PlatformAuthRemoteVerificationReadiness>;
32
+ }
33
+ export {};
34
+ //# sourceMappingURL=platform-auth-remote-verification-postgres.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-auth-remote-verification-postgres.d.ts","sourceRoot":"","sources":["../src/platform-auth-remote-verification-postgres.ts"],"names":[],"mappings":"AAE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