@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.
- package/dist/auth-discovery.d.ts +17 -0
- package/dist/auth-discovery.d.ts.map +1 -0
- package/dist/auth-discovery.js +54 -0
- package/dist/auth-discovery.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/catalog-data-platform-auth.d.ts +7 -0
- package/dist/commands/catalog-data-platform-auth.d.ts.map +1 -0
- package/dist/commands/catalog-data-platform-auth.js +47 -0
- package/dist/commands/catalog-data-platform-auth.js.map +1 -0
- package/dist/commands/catalog.d.ts.map +1 -1
- package/dist/commands/catalog.js +6 -3
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/docs-mcp.d.ts +3 -3
- package/dist/commands/docs-mcp.js +3 -3
- package/dist/commands/platform-auth-finalization-args.d.ts +13 -0
- package/dist/commands/platform-auth-finalization-args.d.ts.map +1 -0
- package/dist/commands/platform-auth-finalization-args.js +29 -0
- package/dist/commands/platform-auth-finalization-args.js.map +1 -0
- package/dist/commands/platform-auth-migration-args.d.ts +71 -0
- package/dist/commands/platform-auth-migration-args.d.ts.map +1 -0
- package/dist/commands/platform-auth-migration-args.js +320 -0
- package/dist/commands/platform-auth-migration-args.js.map +1 -0
- package/dist/commands/platform-auth-migration-ops.d.ts +3 -0
- package/dist/commands/platform-auth-migration-ops.d.ts.map +1 -0
- package/dist/commands/platform-auth-migration-ops.js +369 -0
- package/dist/commands/platform-auth-migration-ops.js.map +1 -0
- package/dist/commands/project-setup.js +1 -1
- package/dist/commands/project-setup.js.map +1 -1
- package/dist/config.d.ts +4 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/control-plane.d.ts +0 -11
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/control-plane.js +1 -8
- package/dist/control-plane.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +3 -5
- package/dist/doctor.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js +4 -0
- package/node_modules/@noodle-borg/agent-kit/dist/curated/command-groups.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js.map +1 -1
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.d.ts +2 -2
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.d.ts.map +1 -1
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.js +1 -1
- package/node_modules/@noodle-borg/auth/dist/verify.d.ts +1 -1
- package/node_modules/@noodle-borg/auth/dist/verify.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.d.ts +26 -0
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.js +105 -1
- package/node_modules/@noodle-borg/service/dist/auth/deploy-gate.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.js +99 -0
- package/node_modules/@noodle-borg/service/dist/control-plane-auth-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/index.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.js +15 -0
- package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/main.js +112 -19
- package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.js +9 -1
- package/node_modules/@noodle-borg/service/dist/oauth/app.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.d.ts +24 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.js +88 -0
- package/node_modules/@noodle-borg/service/dist/oauth/authorization-initiation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/branding.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/oauth/branding.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/branding.js +3 -2
- package/node_modules/@noodle-borg/service/dist/oauth/branding.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.d.ts +5 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.js +19 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-token.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent.js +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.js +216 -28
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant-page.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js +62 -0
- package/node_modules/@noodle-borg/service/dist/oauth/first-party-client.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.js +20 -0
- package/node_modules/@noodle-borg/service/dist/oauth/metadata.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/paths.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/paths.js +2 -0
- package/node_modules/@noodle-borg/service/dist/oauth/paths.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.js +58 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-guard.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.js +49 -0
- package/node_modules/@noodle-borg/service/dist/oauth/platform-principal-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.js +7 -0
- package/node_modules/@noodle-borg/service/dist/oauth/postgres-time.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts +20 -25
- package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/provider.js +105 -196
- package/node_modules/@noodle-borg/service/dist/oauth/provider.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.js +157 -0
- package/node_modules/@noodle-borg/service/dist/oauth/service-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.js +110 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.d.ts +7 -4
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.js +63 -120
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts +19 -6
- package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store.js +24 -2
- package/node_modules/@noodle-borg/service/dist/oauth/store.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.js +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/tokens.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.js +8 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-availability.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js +109 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-handler.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts +22 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js +30 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-callback-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.d.ts +21 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.js +56 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-consent.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.d.ts +30 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.js +94 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-federation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.js +27 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-human.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.js +63 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-provider-choice.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.js +40 -0
- package/node_modules/@noodle-borg/service/dist/oauth/upstream-rollout-store.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.d.ts +115 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.js +310 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos-events.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.d.ts +65 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.js +85 -0
- package/node_modules/@noodle-borg/service/dist/oauth/workos.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/options.d.ts +11 -2
- package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/personal-workspace.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/personal-workspace.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/personal-workspace.js +8 -2
- package/node_modules/@noodle-borg/service/dist/personal-workspace.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.d.ts +67 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.js +54 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-configuration.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.js +61 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-frozen-candidate-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.d.ts +32 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.js +231 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-legacy-sources-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.d.ts +29 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.js +350 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.d.ts +50 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.js +239 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-local-subjects-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.d.ts +66 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.js +77 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-paging.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.d.ts +40 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.js +355 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.d.ts +41 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.js +230 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-progress-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.js +126 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-source-fence-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.js +86 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-inventory-sources.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.d.ts +42 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.js +368 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.d.ts +86 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.js +474 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-runs-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.js +435 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.d.ts +202 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.js +313 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-migration.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.d.ts +48 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.js +158 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-batches.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.d.ts +43 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.js +92 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-effects.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.d.ts +31 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.js +94 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-operation-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.d.ts +102 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.js +2 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-ports.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.js +367 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.d.ts +10 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.js +37 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-remote-status.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.js +156 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-rollout.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.js +162 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.d.ts +92 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.js +271 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.js +67 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-state-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.js +47 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.d.ts +1569 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.js +274 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-operator.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.d.ts +41 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.js +163 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.js +274 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.js +120 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.d.ts +79 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.js +88 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-remote-verification.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.js +38 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollback-guard.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.d.ts +61 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.js +292 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.d.ts +19 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.js +121 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-readiness-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.d.ts +119 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.js +194 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-rollout-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js +93 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-runtime.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.d.ts +32 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.js +68 -0
- package/node_modules/@noodle-borg/service/dist/platform-auth-service-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.d.ts +36 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.js +92 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-maintenance.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.d.ts +23 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.js +231 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.js +399 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-schema-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.js +25 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-enqueue.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.js +74 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-evidence-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.d.ts +19 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.js +249 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.js +275 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync-recovery-postgres.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.d.ts +98 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.js +179 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity-sync.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.d.ts +110 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.js +312 -0
- package/node_modules/@noodle-borg/service/dist/platform-identity.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.js +36 -0
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.js +3 -9
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.js +3 -3
- package/node_modules/@noodle-borg/service/dist/routes/billing-stripe.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js +3 -1
- package/node_modules/@noodle-borg/service/dist/routes/github-run-claim.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.js +40 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration-dispatch.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.js +158 -0
- package/node_modules/@noodle-borg/service/dist/routes/platform-auth-migration.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/serve-options.d.ts +21 -3
- package/node_modules/@noodle-borg/service/dist/serve-options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.js +61 -146
- package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js +3 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +17 -29
- package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/control-plane.js +60 -19
- package/node_modules/@noodle-borg/service/dist/store/control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.d.ts +1 -2
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.js +0 -40
- package/node_modules/@noodle-borg/service/dist/store/postgres-control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.d.ts +5 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.js +176 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-personal-workspace.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js +43 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-signup.js +2 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-signup.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/workos-directory.d.ts +71 -0
- package/node_modules/@noodle-borg/service/dist/workos-directory.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/workos-directory.js +175 -0
- package/node_modules/@noodle-borg/service/dist/workos-directory.js.map +1 -0
- package/node_modules/@noodle-borg/service/package.json +1 -0
- package/node_modules/@workos-inc/node/LICENSE +21 -0
- package/node_modules/@workos-inc/node/README.md +140 -0
- package/node_modules/@workos-inc/node/lib/factory-B8vTFojy.d.cts +9727 -0
- package/node_modules/@workos-inc/node/lib/factory-B8vTFojy.d.mts +9727 -0
- package/node_modules/@workos-inc/node/lib/factory-CoKXdPX2.cjs +8426 -0
- package/node_modules/@workos-inc/node/lib/factory-CoKXdPX2.cjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/factory-MKPb5Egh.mjs +8241 -0
- package/node_modules/@workos-inc/node/lib/factory-MKPb5Egh.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.cjs +449 -0
- package/node_modules/@workos-inc/node/lib/index.cjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.d.cts +478 -0
- package/node_modules/@workos-inc/node/lib/index.d.mts +478 -0
- package/node_modules/@workos-inc/node/lib/index.mjs +394 -0
- package/node_modules/@workos-inc/node/lib/index.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.worker.cjs +60 -0
- package/node_modules/@workos-inc/node/lib/index.worker.cjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/index.worker.d.cts +16 -0
- package/node_modules/@workos-inc/node/lib/index.worker.d.mts +16 -0
- package/node_modules/@workos-inc/node/lib/index.worker.mjs +35 -0
- package/node_modules/@workos-inc/node/lib/index.worker.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/webapi-BgpV54gi.mjs +3224 -0
- package/node_modules/@workos-inc/node/lib/webapi-BgpV54gi.mjs.map +1 -0
- package/node_modules/@workos-inc/node/lib/webapi-BzGFatFp.cjs +3271 -0
- package/node_modules/@workos-inc/node/lib/webapi-BzGFatFp.cjs.map +1 -0
- package/node_modules/@workos-inc/node/package.json +96 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-rollout.js","sourceRoot":"","sources":["../src/platform-auth-operator-rollout.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,IAAI,IAAI,EAAE,MAAM,4CAA4C,CAAC;AAU9F,MAAM,CAAC,MAAM,4CAA4C,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;AAEtF,MAAM,UAAU,2BAA2B,CACzC,KAAiC,EACjC,QAAsC,EACtC,GAAG,GAAG,IAAI,IAAI,EAAE;IAEhB,IAAI,KAAK,CAAC,SAAS,KAAK,gBAAgB;QAAE,OAAO,EAAE,CAAC;IACpD,IAAI,KAAK,CAAC,SAAS,KAAK,UAAU;QAChC,OAAO,QAAQ,CAAC,OAAO,CAAC,SAAS,KAAK,WAAW;YAC/C,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,4BAA4B,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YACpD,CAAC,CAAC,EAAE,CAAC;IACT,MAAM,QAAQ,GAAuD;QACnE,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;KAC/B,CAAC;IACF,IAAI,QAAQ,CAAC,SAAS,CAAC,KAAK,KAAK,aAAa,IAAI,QAAQ,CAAC,SAAS,CAAC,cA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AAS,EAAE,CAAC;AACvD,CAAC;AAED,SAAS,MAAM,CAAC,MAAyB;IACvC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PlatformIdentityQueryable } from './platform-identity-postgres.js';
|
|
2
|
+
/** Additive persistence for the aggregate-only migration operator surface. */
|
|
3
|
+
export declare function ensurePlatformAuthOperatorSchema(pool: PlatformIdentityQueryable): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=platform-auth-operator-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-schema.d.ts","sourceRoot":"","sources":["../src/platform-auth-operator-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAEjF,8EAA8E;AAC9E,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA8Jf"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { ensurePlatformAuthRemoteVerificationSchema } from './platform-auth-remote-verification-schema.js';
|
|
2
|
+
/** Additive persistence for the aggregate-only migration operator surface. */
|
|
3
|
+
export async function ensurePlatformAuthOperatorSchema(pool) {
|
|
4
|
+
await ensurePlatformAuthRemoteVerificationSchema(pool);
|
|
5
|
+
await pool.query(`
|
|
6
|
+
CREATE TABLE IF NOT EXISTS platform_auth_operator_campaigns (
|
|
7
|
+
import_run_id text PRIMARY KEY REFERENCES identity_migration_runs(id) ON DELETE RESTRICT,
|
|
8
|
+
backfill_run_id text NOT NULL UNIQUE REFERENCES identity_migration_runs(id) ON DELETE RESTRICT,
|
|
9
|
+
inventory_run_id text NOT NULL REFERENCES identity_migration_runs(id) ON DELETE RESTRICT,
|
|
10
|
+
inventory_checksum text NOT NULL CHECK (inventory_checksum ~ '^[0-9a-f]{64}$'),
|
|
11
|
+
import_lineage_checksum text NOT NULL CHECK (import_lineage_checksum ~ '^[0-9a-f]{64}$'),
|
|
12
|
+
workos_realm_fingerprint text NOT NULL CHECK (workos_realm_fingerprint ~ '^[0-9a-f]{64}$'),
|
|
13
|
+
release_sha text NOT NULL CHECK (release_sha ~ '^[0-9a-f]{40}$'),
|
|
14
|
+
state text NOT NULL DEFAULT 'running' CHECK (state IN ('running', 'completed', 'failed')),
|
|
15
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
16
|
+
completed_at timestamptz,
|
|
17
|
+
CONSTRAINT platform_auth_operator_campaign_lineage_unique
|
|
18
|
+
UNIQUE (inventory_run_id, workos_realm_fingerprint)
|
|
19
|
+
)
|
|
20
|
+
`);
|
|
21
|
+
await pool.query(`
|
|
22
|
+
CREATE INDEX IF NOT EXISTS platform_auth_operator_campaigns_latest_idx
|
|
23
|
+
ON platform_auth_operator_campaigns (created_at DESC)
|
|
24
|
+
`);
|
|
25
|
+
await pool.query(`
|
|
26
|
+
CREATE TABLE IF NOT EXISTS platform_auth_operator_previews (
|
|
27
|
+
checksum text PRIMARY KEY CHECK (checksum ~ '^[0-9a-f]{64}$'),
|
|
28
|
+
operation text NOT NULL CHECK (operation IN ('start_import', 'reconcile', 'recover_outbox')),
|
|
29
|
+
expected_generation bigint NOT NULL CHECK (expected_generation >= 0),
|
|
30
|
+
release_sha text NOT NULL CHECK (release_sha ~ '^[0-9a-f]{40}$'),
|
|
31
|
+
target_fingerprint text NOT NULL CHECK (target_fingerprint ~ '^[0-9a-f]{64}$'),
|
|
32
|
+
snapshot_fingerprint text NOT NULL CHECK (snapshot_fingerprint ~ '^[0-9a-f]{64}$'),
|
|
33
|
+
expires_at timestamptz NOT NULL,
|
|
34
|
+
created_at timestamptz NOT NULL DEFAULT now()
|
|
35
|
+
)
|
|
36
|
+
`);
|
|
37
|
+
await pool.query(`
|
|
38
|
+
ALTER TABLE platform_auth_operator_previews
|
|
39
|
+
DROP CONSTRAINT IF EXISTS platform_auth_operator_previews_operation_check;
|
|
40
|
+
ALTER TABLE platform_auth_operator_previews
|
|
41
|
+
ADD CONSTRAINT platform_auth_operator_previews_operation_check
|
|
42
|
+
CHECK (operation IN ('start_import', 'reconcile', 'recover_outbox'))
|
|
43
|
+
`);
|
|
44
|
+
await pool.query(`
|
|
45
|
+
CREATE TABLE IF NOT EXISTS platform_auth_operator_operations (
|
|
46
|
+
idempotency_key_hash text PRIMARY KEY CHECK (idempotency_key_hash ~ '^[0-9a-f]{64}$'),
|
|
47
|
+
request_fingerprint text NOT NULL CHECK (request_fingerprint ~ '^[0-9a-f]{64}$'),
|
|
48
|
+
actor_fingerprint text NOT NULL CHECK (actor_fingerprint ~ '^[0-9a-f]{64}$'),
|
|
49
|
+
reason_fingerprint text CHECK (reason_fingerprint IS NULL OR reason_fingerprint ~ '^[0-9a-f]{64}$'),
|
|
50
|
+
operation text NOT NULL CHECK (operation IN ('start_import', 'reconcile', 'recover_outbox', 'activate', 'rollback', 'finalize')),
|
|
51
|
+
preview_checksum text NOT NULL CHECK (preview_checksum ~ '^[0-9a-f]{64}$'),
|
|
52
|
+
state text NOT NULL,
|
|
53
|
+
lease_token_hash text CHECK (lease_token_hash IS NULL OR lease_token_hash ~ '^[0-9a-f]{64}$'),
|
|
54
|
+
lease_expires_at timestamptz,
|
|
55
|
+
safe_result jsonb,
|
|
56
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
57
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
58
|
+
CONSTRAINT platform_auth_operator_operations_state_check
|
|
59
|
+
CHECK (state IN ('running', 'applied', 'completed')),
|
|
60
|
+
CONSTRAINT platform_auth_operator_operations_lifecycle_check
|
|
61
|
+
CHECK ((state = 'running' AND lease_token_hash IS NOT NULL AND lease_expires_at IS NOT NULL AND safe_result IS NULL)
|
|
62
|
+
OR (state = 'applied' AND lease_token_hash IS NOT NULL AND lease_expires_at IS NOT NULL AND safe_result IS NOT NULL)
|
|
63
|
+
OR (state = 'completed' AND lease_token_hash IS NULL AND lease_expires_at IS NULL AND safe_result IS NOT NULL))
|
|
64
|
+
)
|
|
65
|
+
`);
|
|
66
|
+
await pool.query(`
|
|
67
|
+
ALTER TABLE platform_auth_operator_operations
|
|
68
|
+
ADD COLUMN IF NOT EXISTS reason_fingerprint text
|
|
69
|
+
CHECK (reason_fingerprint IS NULL OR reason_fingerprint ~ '^[0-9a-f]{64}$')
|
|
70
|
+
`);
|
|
71
|
+
await pool.query(`
|
|
72
|
+
ALTER TABLE platform_auth_operator_operations
|
|
73
|
+
DROP CONSTRAINT IF EXISTS platform_auth_operator_operations_operation_check,
|
|
74
|
+
DROP CONSTRAINT IF EXISTS platform_auth_operator_operations_state_check,
|
|
75
|
+
DROP CONSTRAINT IF EXISTS platform_auth_operator_operations_lifecycle_check,
|
|
76
|
+
DROP CONSTRAINT IF EXISTS platform_auth_operator_operations_check;
|
|
77
|
+
ALTER TABLE platform_auth_operator_operations
|
|
78
|
+
ADD CONSTRAINT platform_auth_operator_operations_operation_check
|
|
79
|
+
CHECK (operation IN ('start_import', 'reconcile', 'recover_outbox', 'activate', 'rollback', 'finalize')),
|
|
80
|
+
ADD CONSTRAINT platform_auth_operator_operations_state_check
|
|
81
|
+
CHECK (state IN ('running', 'applied', 'completed')),
|
|
82
|
+
ADD CONSTRAINT platform_auth_operator_operations_lifecycle_check
|
|
83
|
+
CHECK ((state = 'running' AND lease_token_hash IS NOT NULL AND lease_expires_at IS NOT NULL AND safe_result IS NULL)
|
|
84
|
+
OR (state = 'applied' AND lease_token_hash IS NOT NULL AND lease_expires_at IS NOT NULL AND safe_result IS NOT NULL)
|
|
85
|
+
OR (state = 'completed' AND lease_token_hash IS NULL AND lease_expires_at IS NULL AND safe_result IS NOT NULL))
|
|
86
|
+
`);
|
|
87
|
+
await pool.query(`
|
|
88
|
+
CREATE TABLE IF NOT EXISTS platform_auth_operator_sync_health (
|
|
89
|
+
component text PRIMARY KEY CHECK (component IN ('outbox', 'events')),
|
|
90
|
+
last_success_at timestamptz NOT NULL,
|
|
91
|
+
updated_at timestamptz NOT NULL DEFAULT now()
|
|
92
|
+
)
|
|
93
|
+
`);
|
|
94
|
+
await pool.query(`
|
|
95
|
+
CREATE OR REPLACE FUNCTION platform_auth_operator_operation_guard() RETURNS trigger AS $$
|
|
96
|
+
BEGIN
|
|
97
|
+
IF TG_OP = 'DELETE' OR OLD.state = 'completed' THEN
|
|
98
|
+
RAISE EXCEPTION 'platform auth operator operations are append-only';
|
|
99
|
+
END IF;
|
|
100
|
+
IF OLD.idempotency_key_hash IS DISTINCT FROM NEW.idempotency_key_hash
|
|
101
|
+
OR OLD.request_fingerprint IS DISTINCT FROM NEW.request_fingerprint
|
|
102
|
+
OR OLD.actor_fingerprint IS DISTINCT FROM NEW.actor_fingerprint
|
|
103
|
+
OR OLD.reason_fingerprint IS DISTINCT FROM NEW.reason_fingerprint
|
|
104
|
+
OR OLD.operation IS DISTINCT FROM NEW.operation
|
|
105
|
+
OR OLD.preview_checksum IS DISTINCT FROM NEW.preview_checksum THEN
|
|
106
|
+
RAISE EXCEPTION 'platform auth operator operation evidence is immutable';
|
|
107
|
+
END IF;
|
|
108
|
+
IF OLD.state = 'applied' AND (
|
|
109
|
+
NEW.state <> 'completed'
|
|
110
|
+
OR OLD.safe_result IS DISTINCT FROM NEW.safe_result
|
|
111
|
+
) THEN
|
|
112
|
+
RAISE EXCEPTION 'platform auth operator applied result is immutable';
|
|
113
|
+
END IF;
|
|
114
|
+
RETURN NEW;
|
|
115
|
+
END;
|
|
116
|
+
$$ LANGUAGE plpgsql
|
|
117
|
+
`);
|
|
118
|
+
await pool.query(`
|
|
119
|
+
CREATE OR REPLACE FUNCTION platform_auth_operator_campaign_guard() RETURNS trigger AS $$
|
|
120
|
+
BEGIN
|
|
121
|
+
IF TG_OP = 'DELETE' OR OLD.state <> 'running' THEN
|
|
122
|
+
RAISE EXCEPTION 'platform auth operator campaigns are append-only';
|
|
123
|
+
END IF;
|
|
124
|
+
IF OLD.import_run_id IS DISTINCT FROM NEW.import_run_id
|
|
125
|
+
OR OLD.backfill_run_id IS DISTINCT FROM NEW.backfill_run_id
|
|
126
|
+
OR OLD.inventory_run_id IS DISTINCT FROM NEW.inventory_run_id
|
|
127
|
+
OR OLD.inventory_checksum IS DISTINCT FROM NEW.inventory_checksum
|
|
128
|
+
OR OLD.import_lineage_checksum IS DISTINCT FROM NEW.import_lineage_checksum
|
|
129
|
+
OR OLD.workos_realm_fingerprint IS DISTINCT FROM NEW.workos_realm_fingerprint
|
|
130
|
+
OR OLD.release_sha IS DISTINCT FROM NEW.release_sha THEN
|
|
131
|
+
RAISE EXCEPTION 'platform auth operator campaign lineage is immutable';
|
|
132
|
+
END IF;
|
|
133
|
+
RETURN NEW;
|
|
134
|
+
END;
|
|
135
|
+
$$ LANGUAGE plpgsql
|
|
136
|
+
`);
|
|
137
|
+
await pool.query(`
|
|
138
|
+
CREATE OR REPLACE FUNCTION platform_auth_operator_preview_guard() RETURNS trigger AS $$
|
|
139
|
+
BEGIN
|
|
140
|
+
RAISE EXCEPTION 'platform auth operator previews are append-only';
|
|
141
|
+
END;
|
|
142
|
+
$$ LANGUAGE plpgsql
|
|
143
|
+
`);
|
|
144
|
+
await pool.query(`
|
|
145
|
+
DROP TRIGGER IF EXISTS platform_auth_operator_operation_guard_trigger
|
|
146
|
+
ON platform_auth_operator_operations;
|
|
147
|
+
CREATE TRIGGER platform_auth_operator_operation_guard_trigger
|
|
148
|
+
BEFORE UPDATE OR DELETE ON platform_auth_operator_operations
|
|
149
|
+
FOR EACH ROW EXECUTE FUNCTION platform_auth_operator_operation_guard();
|
|
150
|
+
DROP TRIGGER IF EXISTS platform_auth_operator_campaign_guard_trigger
|
|
151
|
+
ON platform_auth_operator_campaigns;
|
|
152
|
+
CREATE TRIGGER platform_auth_operator_campaign_guard_trigger
|
|
153
|
+
BEFORE UPDATE OR DELETE ON platform_auth_operator_campaigns
|
|
154
|
+
FOR EACH ROW EXECUTE FUNCTION platform_auth_operator_campaign_guard();
|
|
155
|
+
DROP TRIGGER IF EXISTS platform_auth_operator_preview_guard_trigger
|
|
156
|
+
ON platform_auth_operator_previews;
|
|
157
|
+
CREATE TRIGGER platform_auth_operator_preview_guard_trigger
|
|
158
|
+
BEFORE UPDATE OR DELETE ON platform_auth_operator_previews
|
|
159
|
+
FOR EACH ROW EXECUTE FUNCTION platform_auth_operator_preview_guard()
|
|
160
|
+
`);
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=platform-auth-operator-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-schema.js","sourceRoot":"","sources":["../src/platform-auth-operator-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0CAA0C,EAAE,MAAM,+CAA+C,CAAC;AAG3G,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,IAA+B;IAE/B,MAAM,0CAA0C,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,IAAI,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;GAehB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;GAGhB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;;;;;;;;;GAWhB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;;;;GAMhB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;GAqBhB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;;GAIhB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;GAehB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;;;;GAMhB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;GAuBhB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;GAkBhB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;;;;GAMhB,CAAC,CAAC;IACH,MAAM,IAAI,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;GAgBhB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { type PlatformAuthOperatorSnapshot } from './platform-auth-operator.js';
|
|
2
|
+
import type { PlatformIdentityQueryable } from './platform-identity-postgres.js';
|
|
3
|
+
export { PLATFORM_AUTH_SYNCHRONIZATION_FRESHNESS_SECONDS } from './platform-auth-operator-state-support.js';
|
|
4
|
+
export type PlatformAuthOperatorPool = PlatformIdentityQueryable & {
|
|
5
|
+
connect?: () => Promise<PlatformIdentityQueryable & {
|
|
6
|
+
release?: () => void;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
export interface OperatorInventoryLineage {
|
|
10
|
+
readonly runId: string;
|
|
11
|
+
readonly checksum: string;
|
|
12
|
+
readonly candidateCount: number;
|
|
13
|
+
readonly excludedCount: number;
|
|
14
|
+
readonly blockers: PlatformAuthOperatorSnapshot['inventory']['blockers'];
|
|
15
|
+
}
|
|
16
|
+
export interface OperatorCampaignLineage {
|
|
17
|
+
readonly importRunId: string;
|
|
18
|
+
readonly backfillRunId: string;
|
|
19
|
+
readonly inventoryRunId: string;
|
|
20
|
+
readonly inventoryChecksum: string;
|
|
21
|
+
readonly importLineageChecksum: string;
|
|
22
|
+
readonly state: 'running' | 'completed' | 'failed';
|
|
23
|
+
}
|
|
24
|
+
export declare class PostgresPlatformAuthOperatorState {
|
|
25
|
+
#private;
|
|
26
|
+
constructor(pool: PlatformAuthOperatorPool);
|
|
27
|
+
currentInventoryRun(input: {
|
|
28
|
+
readonly releaseSha: string;
|
|
29
|
+
readonly workosRealmFingerprint: string;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
readonly runId: string;
|
|
32
|
+
readonly state: 'running' | 'completed';
|
|
33
|
+
readonly terminal: boolean;
|
|
34
|
+
} | undefined>;
|
|
35
|
+
withInventoryLock<T>(input: {
|
|
36
|
+
readonly releaseSha: string;
|
|
37
|
+
readonly workosRealmFingerprint: string;
|
|
38
|
+
}, task: () => Promise<T>): Promise<T>;
|
|
39
|
+
withStartImportLock<T>(input: {
|
|
40
|
+
readonly releaseSha: string;
|
|
41
|
+
readonly workosRealmFingerprint: string;
|
|
42
|
+
readonly inventoryRunId: string;
|
|
43
|
+
readonly backfillRunId: string;
|
|
44
|
+
readonly importRunId: string;
|
|
45
|
+
}, task: () => Promise<T>): Promise<T>;
|
|
46
|
+
latestInventory(input: {
|
|
47
|
+
readonly releaseSha: string;
|
|
48
|
+
readonly workosRealmFingerprint: string;
|
|
49
|
+
}): Promise<OperatorInventoryLineage | undefined>;
|
|
50
|
+
inventoryStatus(input: {
|
|
51
|
+
readonly releaseSha: string;
|
|
52
|
+
readonly workosRealmFingerprint: string;
|
|
53
|
+
}): Promise<PlatformAuthOperatorSnapshot['inventory'] | undefined>;
|
|
54
|
+
latestCampaign(input: {
|
|
55
|
+
readonly releaseSha: string;
|
|
56
|
+
readonly workosRealmFingerprint: string;
|
|
57
|
+
}): Promise<OperatorCampaignLineage | undefined>;
|
|
58
|
+
insertCampaign(input: {
|
|
59
|
+
readonly importRunId: string;
|
|
60
|
+
readonly backfillRunId: string;
|
|
61
|
+
readonly inventoryRunId: string;
|
|
62
|
+
readonly inventoryChecksum: string;
|
|
63
|
+
readonly importLineageChecksum: string;
|
|
64
|
+
readonly workosRealmFingerprint: string;
|
|
65
|
+
readonly releaseSha: string;
|
|
66
|
+
}): Promise<void>;
|
|
67
|
+
importAggregate(inventory: OperatorInventoryLineage | undefined, campaign: OperatorCampaignLineage | undefined): Promise<PlatformAuthOperatorSnapshot['import']>;
|
|
68
|
+
synchronization(input: {
|
|
69
|
+
readonly outboxConfigured: boolean;
|
|
70
|
+
readonly eventsConfigured: boolean;
|
|
71
|
+
}): Promise<PlatformAuthOperatorSnapshot['synchronization']>;
|
|
72
|
+
markSynchronizationSuccess(components: readonly ('outbox' | 'events')[]): Promise<void>;
|
|
73
|
+
savePreview(input: {
|
|
74
|
+
readonly checksum: string;
|
|
75
|
+
readonly operation: 'start_import' | 'reconcile' | 'recover_outbox';
|
|
76
|
+
readonly expectedGeneration: number;
|
|
77
|
+
readonly releaseSha: string;
|
|
78
|
+
readonly targetFingerprint: string;
|
|
79
|
+
readonly snapshotFingerprint: string;
|
|
80
|
+
}): Promise<void>;
|
|
81
|
+
assertPreview(input: {
|
|
82
|
+
readonly checksum: string;
|
|
83
|
+
readonly operation: 'start_import' | 'reconcile' | 'recover_outbox';
|
|
84
|
+
readonly expectedGeneration: number;
|
|
85
|
+
readonly releaseSha: string;
|
|
86
|
+
readonly targetFingerprint: string;
|
|
87
|
+
readonly snapshotFingerprint: string;
|
|
88
|
+
}): Promise<void>;
|
|
89
|
+
markCampaignComplete(campaign: OperatorCampaignLineage): Promise<void>;
|
|
90
|
+
}
|
|
91
|
+
export declare function platformAuthOperatorHash(value: unknown): string;
|
|
92
|
+
//# sourceMappingURL=platform-auth-operator-state-postgres.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-state-postgres.d.ts","sourceRoot":"","sources":["../src/platform-auth-operator-state-postgres.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,6BAA6B,CAAC;AAQrC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAEjF,OAAO,EAAE,+CAA+C,EAAE,MAAM,2CAA2C,CAAC;AAE5G,MAAM,MAAM,wBAAwB,GAAG,yBAAyB,GAAG;IACjE,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,yBAAyB,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;CAC/E,CAAC;AAEF,MAAM,WAA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AAC;CA4B7E;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE/D"}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { PlatformAuthOperatorError, } from './platform-auth-operator.js';
|
|
3
|
+
import { emptyPlatformAuthImport, parsePlatformAuthInventoryBlockers, parsePlatformAuthInventoryResult, platformAuthSynchronizationAgeFresh, platformAuthTimestamp, } from './platform-auth-operator-state-support.js';
|
|
4
|
+
export { PLATFORM_AUTH_SYNCHRONIZATION_FRESHNESS_SECONDS } from './platform-auth-operator-state-support.js';
|
|
5
|
+
export class PostgresPlatformAuthOperatorState {
|
|
6
|
+
#pool;
|
|
7
|
+
constructor(pool) {
|
|
8
|
+
this.#pool = pool;
|
|
9
|
+
}
|
|
10
|
+
async currentInventoryRun(input) {
|
|
11
|
+
const result = await this.#pool.query(`SELECT run.id, run.state, progress.terminal_error
|
|
12
|
+
FROM identity_migration_runs run
|
|
13
|
+
LEFT JOIN platform_auth_inventory_progress progress
|
|
14
|
+
ON progress.migration_run_id = run.id
|
|
15
|
+
WHERE run.kind = 'inventory' AND run.state IN ('running', 'completed')
|
|
16
|
+
AND run.release_sha = $1 AND run.workos_realm_fingerprint = $2
|
|
17
|
+
ORDER BY ${INVENTORY_GENERATION_ORDER} LIMIT 1`, [input.releaseSha, input.workosRealmFingerprint]);
|
|
18
|
+
const row = result.rows[0];
|
|
19
|
+
return row === undefined
|
|
20
|
+
? undefined
|
|
21
|
+
: { runId: row.id, state: row.state, terminal: row.terminal_error !== null };
|
|
22
|
+
}
|
|
23
|
+
async withInventoryLock(input, task) {
|
|
24
|
+
return this.#withLock(`platform-auth-inventory-generation:${input.releaseSha}:${input.workosRealmFingerprint}`, task);
|
|
25
|
+
}
|
|
26
|
+
async withStartImportLock(input, task) {
|
|
27
|
+
return this.#withLock(`platform-auth-start-import:${input.releaseSha}:${input.workosRealmFingerprint}:${input.inventoryRunId}`, async (connection) => {
|
|
28
|
+
const existing = await connection.query(`SELECT backfill_run_id, import_run_id FROM platform_auth_operator_campaigns
|
|
29
|
+
WHERE release_sha = $1 AND workos_realm_fingerprint = $2
|
|
30
|
+
AND inventory_run_id = $3 LIMIT 1`, [input.releaseSha, input.workosRealmFingerprint, input.inventoryRunId]);
|
|
31
|
+
const campaign = existing.rows[0];
|
|
32
|
+
if (campaign !== undefined &&
|
|
33
|
+
(campaign.backfill_run_id !== input.backfillRunId ||
|
|
34
|
+
campaign.import_run_id !== input.importRunId))
|
|
35
|
+
throw new PlatformAuthOperatorError('import_already_started');
|
|
36
|
+
return task();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
async latestInventory(input) {
|
|
40
|
+
const result = await this.#pool.query(`SELECT run.id, run.state, run.frozen_checksum, run.safe_result
|
|
41
|
+
FROM identity_migration_runs run
|
|
42
|
+
WHERE run.kind = 'inventory' AND run.state IN ('running', 'completed')
|
|
43
|
+
AND run.release_sha = $1 AND run.workos_realm_fingerprint = $2
|
|
44
|
+
ORDER BY ${INVENTORY_GENERATION_ORDER} LIMIT 1`, [input.releaseSha, input.workosRealmFingerprint]);
|
|
45
|
+
const row = result.rows[0];
|
|
46
|
+
if (row === undefined || row.state !== 'completed' || row.frozen_checksum === null)
|
|
47
|
+
return undefined;
|
|
48
|
+
const safe = parsePlatformAuthInventoryResult(row.safe_result);
|
|
49
|
+
return { runId: row.id, checksum: row.frozen_checksum, ...safe };
|
|
50
|
+
}
|
|
51
|
+
async inventoryStatus(input) {
|
|
52
|
+
const result = await this.#pool.query(`SELECT run.state, run.frozen_checksum, run.safe_result, progress.phase,
|
|
53
|
+
progress.remote_page_count, progress.remote_user_count,
|
|
54
|
+
progress.local_subject_count, progress.candidate_count,
|
|
55
|
+
progress.excluded_count, progress.blocker_counts, progress.terminal_error
|
|
56
|
+
FROM identity_migration_runs run
|
|
57
|
+
LEFT JOIN platform_auth_inventory_progress progress
|
|
58
|
+
ON progress.migration_run_id = run.id
|
|
59
|
+
WHERE run.kind = 'inventory' AND run.state IN ('running', 'completed')
|
|
60
|
+
AND run.release_sha = $1 AND run.workos_realm_fingerprint = $2
|
|
61
|
+
ORDER BY ${INVENTORY_GENERATION_ORDER} LIMIT 1`, [input.releaseSha, input.workosRealmFingerprint]);
|
|
62
|
+
const row = result.rows[0];
|
|
63
|
+
if (row === undefined)
|
|
64
|
+
return undefined;
|
|
65
|
+
if (row.state === 'completed') {
|
|
66
|
+
if (row.frozen_checksum === null)
|
|
67
|
+
throw new PlatformAuthOperatorError('inventory_unavailable');
|
|
68
|
+
const safe = parsePlatformAuthInventoryResult(row.safe_result);
|
|
69
|
+
return {
|
|
70
|
+
state: safe.blockers.length === 0 ? 'ready' : 'blocked',
|
|
71
|
+
phase: 'completed',
|
|
72
|
+
remotePages: row.remote_page_count ?? 0,
|
|
73
|
+
remoteUsers: row.remote_user_count ?? 0,
|
|
74
|
+
localSubjects: row.local_subject_count ?? safe.candidateCount + safe.excludedCount,
|
|
75
|
+
candidateCount: safe.candidateCount,
|
|
76
|
+
excludedCount: safe.excludedCount,
|
|
77
|
+
checksum: row.frozen_checksum,
|
|
78
|
+
blockers: safe.blockers,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
state: row.terminal_error === null ? 'running' : 'unavailable',
|
|
83
|
+
phase: row.phase,
|
|
84
|
+
remotePages: row.remote_page_count ?? 0,
|
|
85
|
+
remoteUsers: row.remote_user_count ?? 0,
|
|
86
|
+
localSubjects: row.local_subject_count ?? 0,
|
|
87
|
+
candidateCount: row.candidate_count ?? 0,
|
|
88
|
+
excludedCount: row.excluded_count ?? 0,
|
|
89
|
+
checksum: null,
|
|
90
|
+
blockers: parsePlatformAuthInventoryBlockers(row.blocker_counts ?? {}),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
async latestCampaign(input) {
|
|
94
|
+
const result = await this.#pool.query(`SELECT import_run_id, backfill_run_id, inventory_run_id, inventory_checksum,
|
|
95
|
+
import_lineage_checksum, state
|
|
96
|
+
FROM platform_auth_operator_campaigns
|
|
97
|
+
WHERE release_sha = $1 AND workos_realm_fingerprint = $2
|
|
98
|
+
ORDER BY created_at DESC LIMIT 1`, [input.releaseSha, input.workosRealmFingerprint]);
|
|
99
|
+
const row = result.rows[0];
|
|
100
|
+
if (row === undefined)
|
|
101
|
+
return undefined;
|
|
102
|
+
return {
|
|
103
|
+
importRunId: row.import_run_id,
|
|
104
|
+
backfillRunId: row.backfill_run_id,
|
|
105
|
+
inventoryRunId: row.inventory_run_id,
|
|
106
|
+
inventoryChecksum: row.inventory_checksum,
|
|
107
|
+
importLineageChecksum: row.import_lineage_checksum,
|
|
108
|
+
state: row.state,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
async insertCampaign(input) {
|
|
112
|
+
const inserted = await this.#pool.query(`INSERT INTO platform_auth_operator_campaigns
|
|
113
|
+
(import_run_id, backfill_run_id, inventory_run_id, inventory_checksum,
|
|
114
|
+
import_lineage_checksum, workos_realm_fingerprint, release_sha)
|
|
115
|
+
VALUES ($1, $2, $3, $4, $5, $6, $7)
|
|
116
|
+
ON CONFLICT DO NOTHING RETURNING import_run_id`, [
|
|
117
|
+
input.importRunId,
|
|
118
|
+
input.backfillRunId,
|
|
119
|
+
input.inventoryRunId,
|
|
120
|
+
input.inventoryChecksum,
|
|
121
|
+
input.importLineageChecksum,
|
|
122
|
+
input.workosRealmFingerprint,
|
|
123
|
+
input.releaseSha,
|
|
124
|
+
]);
|
|
125
|
+
if (inserted.rows[0] !== undefined)
|
|
126
|
+
return;
|
|
127
|
+
const existing = await this.latestCampaign({
|
|
128
|
+
releaseSha: input.releaseSha,
|
|
129
|
+
workosRealmFingerprint: input.workosRealmFingerprint,
|
|
130
|
+
});
|
|
131
|
+
if (existing?.importRunId !== input.importRunId ||
|
|
132
|
+
existing.backfillRunId !== input.backfillRunId ||
|
|
133
|
+
existing.inventoryRunId !== input.inventoryRunId ||
|
|
134
|
+
existing.inventoryChecksum !== input.inventoryChecksum ||
|
|
135
|
+
existing.importLineageChecksum !== input.importLineageChecksum)
|
|
136
|
+
throw new PlatformAuthOperatorError('import_already_started');
|
|
137
|
+
}
|
|
138
|
+
async importAggregate(inventory, campaign) {
|
|
139
|
+
if (inventory === undefined || campaign === undefined)
|
|
140
|
+
return emptyPlatformAuthImport();
|
|
141
|
+
const result = await this.#pool.query(`SELECT
|
|
142
|
+
(SELECT count(*)::text FROM platform_auth_inventory_candidates
|
|
143
|
+
WHERE migration_run_id = $1) AS total,
|
|
144
|
+
count(*)::text AS ledger_total,
|
|
145
|
+
count(*) FILTER (WHERE state = 'pending')::text AS pending,
|
|
146
|
+
count(*) FILTER (WHERE state = 'reconcile_required')::text AS reconcile_required,
|
|
147
|
+
count(*) FILTER (WHERE state = 'linked')::text AS linked,
|
|
148
|
+
count(*) FILTER (WHERE state = 'blocked')::text AS blocked,
|
|
149
|
+
count(*) FILTER (WHERE state = 'failed')::text AS failed,
|
|
150
|
+
count(*) FILTER (WHERE lease_expires_at > now())::text AS active_leases,
|
|
151
|
+
min(retry_at) FILTER (WHERE state = 'reconcile_required') AS next_retry_at
|
|
152
|
+
FROM workos_import_ledger WHERE migration_run_id = $2`, [inventory.runId, campaign.importRunId]);
|
|
153
|
+
const row = result.rows[0];
|
|
154
|
+
if (row === undefined)
|
|
155
|
+
return emptyPlatformAuthImport();
|
|
156
|
+
const total = Number(row.total);
|
|
157
|
+
const pending = total - Number(row.ledger_total) + Number(row.pending);
|
|
158
|
+
const linked = Number(row.linked);
|
|
159
|
+
const failed = Number(row.failed);
|
|
160
|
+
const state = campaign.state === 'failed' || failed > 0
|
|
161
|
+
? 'failed'
|
|
162
|
+
: total > 0 && linked === total
|
|
163
|
+
? 'completed'
|
|
164
|
+
: 'running';
|
|
165
|
+
return {
|
|
166
|
+
state,
|
|
167
|
+
total,
|
|
168
|
+
pending,
|
|
169
|
+
reconcileRequired: Number(row.reconcile_required),
|
|
170
|
+
linked,
|
|
171
|
+
blocked: Number(row.blocked),
|
|
172
|
+
failed,
|
|
173
|
+
activeLeases: Number(row.active_leases),
|
|
174
|
+
nextRetryAt: platformAuthTimestamp(row.next_retry_at),
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
async synchronization(input) {
|
|
178
|
+
const [outbox, health] = await Promise.all([
|
|
179
|
+
this.#pool.query('SELECT count(*)::text AS pending FROM platform_identity_sync_outbox WHERE delivered_at IS NULL'),
|
|
180
|
+
this.#pool.query(`SELECT component,
|
|
181
|
+
greatest(0, extract(epoch FROM now() - last_success_at)::bigint)::text AS age_seconds
|
|
182
|
+
FROM platform_auth_operator_sync_health`),
|
|
183
|
+
]);
|
|
184
|
+
const ages = new Map(health.rows.map((row) => [row.component, Number(row.age_seconds)]));
|
|
185
|
+
const outboxAge = ages.get('outbox');
|
|
186
|
+
const eventsAge = ages.get('events');
|
|
187
|
+
return {
|
|
188
|
+
outbox: {
|
|
189
|
+
status: !input.outboxConfigured
|
|
190
|
+
? 'not_configured'
|
|
191
|
+
: !platformAuthSynchronizationAgeFresh(outboxAge)
|
|
192
|
+
? 'pending'
|
|
193
|
+
: 'ready',
|
|
194
|
+
pending: Number(outbox.rows[0]?.pending ?? 0),
|
|
195
|
+
lastSuccessAgeSeconds: outboxAge ?? null,
|
|
196
|
+
},
|
|
197
|
+
events: {
|
|
198
|
+
status: !input.eventsConfigured
|
|
199
|
+
? 'not_configured'
|
|
200
|
+
: !platformAuthSynchronizationAgeFresh(eventsAge)
|
|
201
|
+
? 'pending'
|
|
202
|
+
: 'ready',
|
|
203
|
+
lastSuccessAgeSeconds: eventsAge ?? null,
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
async markSynchronizationSuccess(components) {
|
|
208
|
+
for (const component of components) {
|
|
209
|
+
await this.#pool.query(`INSERT INTO platform_auth_operator_sync_health (component, last_success_at, updated_at)
|
|
210
|
+
VALUES ($1, now(), now())
|
|
211
|
+
ON CONFLICT (component) DO UPDATE
|
|
212
|
+
SET last_success_at = excluded.last_success_at, updated_at = excluded.updated_at`, [component]);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
async savePreview(input) {
|
|
216
|
+
await this.#pool.query(`INSERT INTO platform_auth_operator_previews
|
|
217
|
+
(checksum, operation, expected_generation, release_sha, target_fingerprint,
|
|
218
|
+
snapshot_fingerprint, expires_at)
|
|
219
|
+
VALUES ($1, $2, $3, $4, $5, $6, now() + interval '15 minutes')
|
|
220
|
+
ON CONFLICT (checksum) DO NOTHING`, [
|
|
221
|
+
input.checksum,
|
|
222
|
+
input.operation,
|
|
223
|
+
input.expectedGeneration,
|
|
224
|
+
input.releaseSha,
|
|
225
|
+
input.targetFingerprint,
|
|
226
|
+
input.snapshotFingerprint,
|
|
227
|
+
]);
|
|
228
|
+
}
|
|
229
|
+
async assertPreview(input) {
|
|
230
|
+
const result = await this.#pool.query(`SELECT true AS ok FROM platform_auth_operator_previews
|
|
231
|
+
WHERE checksum = $1 AND operation = $2 AND expected_generation = $3
|
|
232
|
+
AND release_sha = $4 AND target_fingerprint = $5 AND snapshot_fingerprint = $6
|
|
233
|
+
AND expires_at > now()`, [
|
|
234
|
+
input.checksum,
|
|
235
|
+
input.operation,
|
|
236
|
+
input.expectedGeneration,
|
|
237
|
+
input.releaseSha,
|
|
238
|
+
input.targetFingerprint,
|
|
239
|
+
input.snapshotFingerprint,
|
|
240
|
+
]);
|
|
241
|
+
if (result.rows[0] === undefined)
|
|
242
|
+
throw new PlatformAuthOperatorError('preview_mismatch');
|
|
243
|
+
}
|
|
244
|
+
async markCampaignComplete(campaign) {
|
|
245
|
+
await this.#pool.query(`UPDATE platform_auth_operator_campaigns
|
|
246
|
+
SET state = 'completed', completed_at = now()
|
|
247
|
+
WHERE import_run_id = $1 AND state = 'running'`, [campaign.importRunId]);
|
|
248
|
+
}
|
|
249
|
+
async #withLock(key, task) {
|
|
250
|
+
const connection = this.#pool.connect === undefined ? this.#pool : await this.#pool.connect();
|
|
251
|
+
try {
|
|
252
|
+
await connection.query('BEGIN');
|
|
253
|
+
await connection.query('SELECT pg_advisory_xact_lock(hashtextextended($1, 0))', [key]);
|
|
254
|
+
const result = await task(connection);
|
|
255
|
+
await connection.query('COMMIT');
|
|
256
|
+
return result;
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
await connection.query('ROLLBACK').catch(() => undefined);
|
|
260
|
+
throw error;
|
|
261
|
+
}
|
|
262
|
+
finally {
|
|
263
|
+
connection.release?.();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
export function platformAuthOperatorHash(value) {
|
|
268
|
+
return createHash('sha256').update(JSON.stringify(value)).digest('hex');
|
|
269
|
+
}
|
|
270
|
+
const INVENTORY_GENERATION_ORDER = "COALESCE((substring(run.id FROM '-generation-([0-9]+)$'))::numeric, 0) DESC, run.created_at DESC";
|
|
271
|
+
//# sourceMappingURL=platform-auth-operator-state-postgres.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-state-postgres.js","sourceRoot":"","sources":["../src/platform-auth-operator-state-postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,yBAAyB,GAE1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,uBAAuB,EACvB,kCAAkC,EAClC,gCAAgC,EAChC,mCAAmC,EACnC,qBAAqB,GACtB,MAAM,2CAA2C,CAAC;AAGnD,OAAO,EAAE,+CAA+C,EAAE,MAAM,2CAA2C,CAAC;AAuB5G,MAAM,OAAO,iCAAiC;IACnC,KAAK,CAA2B;IAEzC,YAAY,IAA8B;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,KAGzB;QAQC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAKnC;;;;;;mBAMa,0B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AM,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAChC,MAAM,UAAU,CAAC,KAAK,CAAC,uDAAuD,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YACvF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC;YACtC,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACjC,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAC1D,MAAM,KAAK,CAAC;QACd,CAAC;gBAAS,CAAC;YACT,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;CACF;AAED,MAAM,UAAU,wBAAwB,CAAC,KAAc;IACrD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,0BAA0B,GAC9B,kGAAkG,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type PlatformAuthOperatorSnapshot } from './platform-auth-operator.js';
|
|
2
|
+
/** Reconciliation runs on a 30-second maintenance cadence; four missed runs fail readiness closed. */
|
|
3
|
+
export declare const PLATFORM_AUTH_SYNCHRONIZATION_FRESHNESS_SECONDS = 120;
|
|
4
|
+
export declare function parsePlatformAuthInventoryResult(value: unknown): {
|
|
5
|
+
readonly candidateCount: number;
|
|
6
|
+
readonly excludedCount: number;
|
|
7
|
+
readonly blockers: PlatformAuthOperatorSnapshot['inventory']['blockers'];
|
|
8
|
+
};
|
|
9
|
+
export declare function parsePlatformAuthInventoryBlockers(value: unknown): PlatformAuthOperatorSnapshot['inventory']['blockers'];
|
|
10
|
+
export declare function emptyPlatformAuthImport(): PlatformAuthOperatorSnapshot['import'];
|
|
11
|
+
export declare function platformAuthTimestamp(value: string | Date | null): string | null;
|
|
12
|
+
export declare function platformAuthSynchronizationAgeFresh(value: number | undefined): value is number;
|
|
13
|
+
//# sourceMappingURL=platform-auth-operator-state-support.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-auth-operator-state-support.d.ts","sourceRoot":"","sources":["../src/platform-auth-operator-state-support.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,6BAA6B,CAAC;AAErC,sGAAsG;AACtG,eAAO,MAAM,+CAA+C,MAAM,CAAC;AAEnE,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,GAAG;IAChE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAC;CAC1E,CAoBA;AAED,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,OAAO,GACb,4BAA4B,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAWvD;AAED,wBAAgB,uBAAuB,IAAI,4BAA4B,CAAC,QAAQ,CAAC,CAYhF;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAGhF;AAED,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,IAAI,MAAM,CAO9F"}
|