@noodleseed/one 0.63.1 → 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/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/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,310 @@
|
|
|
1
|
+
import { WorkOS } from '@workos-inc/node';
|
|
2
|
+
import { normalizePlatformIdentityEmail } from '../platform-identity.js';
|
|
3
|
+
const WORKOS_EVENT_TYPES = [
|
|
4
|
+
'user.created',
|
|
5
|
+
'user.updated',
|
|
6
|
+
'user.deleted',
|
|
7
|
+
'session.revoked',
|
|
8
|
+
];
|
|
9
|
+
/** Official SDK boundary for Events API reads; it has no mutation capability. */
|
|
10
|
+
export class WorkOSEventsSdkClient {
|
|
11
|
+
#events;
|
|
12
|
+
constructor(apiKey, events) {
|
|
13
|
+
if (events !== undefined) {
|
|
14
|
+
this.#events = events;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const sdkEvents = new WorkOS(apiKey).events;
|
|
18
|
+
this.#events = {
|
|
19
|
+
listEvents: async (input) => sdkEvents.listEvents(input.after === undefined
|
|
20
|
+
? { events: input.events, order: input.order }
|
|
21
|
+
: { events: input.events, order: input.order, after: input.after }),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
async listEvents(input) {
|
|
25
|
+
const page = await this.#events.listEvents({ ...input, events: [...input.events] });
|
|
26
|
+
return {
|
|
27
|
+
data: page.data.map((event) => ({
|
|
28
|
+
id: event.id,
|
|
29
|
+
event: event.event,
|
|
30
|
+
data: event.data,
|
|
31
|
+
})),
|
|
32
|
+
listMetadata: page.listMetadata.after === null || page.listMetadata.after === undefined
|
|
33
|
+
? {}
|
|
34
|
+
: { after: page.listMetadata.after },
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Explicit job boundary — this is never a live poller and makes no upstream mutation. */
|
|
39
|
+
export class WorkOSEventProcessor {
|
|
40
|
+
#client;
|
|
41
|
+
#store;
|
|
42
|
+
#realm;
|
|
43
|
+
#maxPages;
|
|
44
|
+
constructor(input) {
|
|
45
|
+
const maxPages = input.maxPages ?? 10;
|
|
46
|
+
if (!Number.isInteger(maxPages) || maxPages < 1 || maxPages > 100)
|
|
47
|
+
throw new Error('WorkOS Events max pages must be between 1 and 100');
|
|
48
|
+
this.#client = input.client;
|
|
49
|
+
this.#store = input.store;
|
|
50
|
+
this.#realm = input.realm;
|
|
51
|
+
this.#maxPages = maxPages;
|
|
52
|
+
}
|
|
53
|
+
async processOnce() {
|
|
54
|
+
let cursor = await this.#store.getCursor();
|
|
55
|
+
let processed = 0;
|
|
56
|
+
let after = cursor;
|
|
57
|
+
const pageCursors = new Set();
|
|
58
|
+
for (let pageNumber = 0; pageNumber < this.#maxPages; pageNumber += 1) {
|
|
59
|
+
const page = await this.#client.listEvents({
|
|
60
|
+
events: WORKOS_EVENT_TYPES,
|
|
61
|
+
order: 'asc',
|
|
62
|
+
...(after === undefined ? {} : { after }),
|
|
63
|
+
});
|
|
64
|
+
for (const event of page.data) {
|
|
65
|
+
const result = await this.#store.applyAndAdvance({
|
|
66
|
+
event,
|
|
67
|
+
realm: this.#realm,
|
|
68
|
+
...(cursor === undefined ? {} : { expectedCursor: cursor }),
|
|
69
|
+
});
|
|
70
|
+
if (result.stale)
|
|
71
|
+
throw new Error('WorkOS Events catch-up incomplete');
|
|
72
|
+
cursor = event.id;
|
|
73
|
+
if (result.applied)
|
|
74
|
+
processed += 1;
|
|
75
|
+
}
|
|
76
|
+
const next = page.listMetadata.after;
|
|
77
|
+
if (next === undefined)
|
|
78
|
+
return { processed, ...(cursor === undefined ? {} : { cursor }), caughtUp: true };
|
|
79
|
+
if (page.data.length === 0 || next === after || pageCursors.has(next))
|
|
80
|
+
throw new Error('WorkOS Events catch-up incomplete');
|
|
81
|
+
pageCursors.add(next);
|
|
82
|
+
after = next;
|
|
83
|
+
}
|
|
84
|
+
throw new Error('WorkOS Events catch-up incomplete');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/** Test/local durable-behavior model. The Postgres implementation below is the production persistence port. */
|
|
88
|
+
export class InMemoryWorkOSIdentityEventStore {
|
|
89
|
+
#events = new Set();
|
|
90
|
+
#users = new Map();
|
|
91
|
+
#cursor;
|
|
92
|
+
getCursor() {
|
|
93
|
+
return Promise.resolve(this.#cursor);
|
|
94
|
+
}
|
|
95
|
+
/** Convenience for focused store tests; production workers use `applyAndAdvance`. */
|
|
96
|
+
async apply(event, realm) {
|
|
97
|
+
const cursor = this.#cursor;
|
|
98
|
+
return (await this.applyAndAdvance({
|
|
99
|
+
event,
|
|
100
|
+
realm,
|
|
101
|
+
...(cursor === undefined ? {} : { expectedCursor: cursor }),
|
|
102
|
+
})).applied;
|
|
103
|
+
}
|
|
104
|
+
async applyAndAdvance(input) {
|
|
105
|
+
if (this.#cursor !== input.expectedCursor)
|
|
106
|
+
return { applied: false, stale: true };
|
|
107
|
+
const parsed = parseEvent(input.event);
|
|
108
|
+
if (parsed === undefined)
|
|
109
|
+
throw new Error('malformed WorkOS event');
|
|
110
|
+
const duplicate = this.#events.has(input.event.id);
|
|
111
|
+
let applied = false;
|
|
112
|
+
if (!duplicate && parsed.kind === 'user.deleted') {
|
|
113
|
+
const prior = this.#users.get(parsed.user.id);
|
|
114
|
+
if (prior !== undefined) {
|
|
115
|
+
this.#users.set(parsed.user.id, { ...prior, status: 'suspended' });
|
|
116
|
+
applied = true;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else if (!duplicate && parsed.kind !== 'session.revoked') {
|
|
120
|
+
const prior = this.#users.get(parsed.user.id);
|
|
121
|
+
if (prior === undefined || prior.updatedAt < parsed.user.updatedAt) {
|
|
122
|
+
this.#users.set(parsed.user.id, {
|
|
123
|
+
email: parsed.user.email,
|
|
124
|
+
status: parsed.kind === 'user.deleted' ? 'suspended' : 'active',
|
|
125
|
+
updatedAt: parsed.user.updatedAt,
|
|
126
|
+
});
|
|
127
|
+
applied = true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
this.#events.add(input.event.id);
|
|
131
|
+
this.#cursor = input.event.id;
|
|
132
|
+
return { applied, stale: false };
|
|
133
|
+
}
|
|
134
|
+
appliedEvents() {
|
|
135
|
+
return [...this.#events].sort();
|
|
136
|
+
}
|
|
137
|
+
user(id) {
|
|
138
|
+
const user = this.#users.get(id);
|
|
139
|
+
return user === undefined ? undefined : { email: user.email, status: user.status };
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/** Durable Task 2 event store. Receipt, effect, freshness, and cursor move in one transaction. */
|
|
143
|
+
export class PostgresWorkOSIdentityEventStore {
|
|
144
|
+
#pool;
|
|
145
|
+
#stream;
|
|
146
|
+
constructor(pool, options = {}) {
|
|
147
|
+
this.#pool = pool;
|
|
148
|
+
this.#stream = options.stream ?? 'authkit-users';
|
|
149
|
+
}
|
|
150
|
+
async getCursor() {
|
|
151
|
+
const result = await this.#pool.query(`SELECT cursor FROM platform_identity_event_cursors
|
|
152
|
+
WHERE provider = 'workos' AND stream = $1`, [this.#stream]);
|
|
153
|
+
return result.rows[0]?.cursor;
|
|
154
|
+
}
|
|
155
|
+
async apply(event, realm) {
|
|
156
|
+
const cursor = await this.getCursor();
|
|
157
|
+
const result = await this.applyAndAdvance({
|
|
158
|
+
event,
|
|
159
|
+
realm,
|
|
160
|
+
...(cursor === undefined ? {} : { expectedCursor: cursor }),
|
|
161
|
+
});
|
|
162
|
+
return result.applied;
|
|
163
|
+
}
|
|
164
|
+
async applyAndAdvance(input) {
|
|
165
|
+
const parsed = parseEvent(input.event);
|
|
166
|
+
if (parsed === undefined)
|
|
167
|
+
throw new Error('malformed WorkOS event');
|
|
168
|
+
const client = await this.#pool.connect();
|
|
169
|
+
try {
|
|
170
|
+
await client.query('BEGIN');
|
|
171
|
+
await client.query('SELECT pg_advisory_xact_lock(hashtextextended($1, 0))', [
|
|
172
|
+
`workos-event-stream:${this.#stream}`,
|
|
173
|
+
]);
|
|
174
|
+
const cursor = await client.query(`SELECT cursor FROM platform_identity_event_cursors
|
|
175
|
+
WHERE provider = 'workos' AND stream = $1 FOR UPDATE`, [this.#stream]);
|
|
176
|
+
if (cursor.rows[0]?.cursor !== input.expectedCursor) {
|
|
177
|
+
await client.query('COMMIT');
|
|
178
|
+
return { applied: false, stale: true };
|
|
179
|
+
}
|
|
180
|
+
const receipt = await client.query(`INSERT INTO platform_identity_event_receipts (provider, event_id, occurred_at)
|
|
181
|
+
VALUES ('workos', $1, $2::timestamptz)
|
|
182
|
+
ON CONFLICT (provider, event_id) DO NOTHING RETURNING event_id`, [input.event.id, parsed.updatedAt]);
|
|
183
|
+
let applied = false;
|
|
184
|
+
if (receipt.rows.length > 0)
|
|
185
|
+
applied = await applyWorkOSEventEffect(client, parsed, input.realm);
|
|
186
|
+
await client.query(`INSERT INTO platform_identity_event_cursors (provider, stream, cursor, updated_at)
|
|
187
|
+
VALUES ('workos', $1, $2, now())
|
|
188
|
+
ON CONFLICT (provider, stream)
|
|
189
|
+
DO UPDATE SET cursor = EXCLUDED.cursor, updated_at = EXCLUDED.updated_at`, [this.#stream, input.event.id]);
|
|
190
|
+
await client.query('COMMIT');
|
|
191
|
+
return { applied, stale: false };
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
await client.query('ROLLBACK').catch(() => undefined);
|
|
195
|
+
throw error;
|
|
196
|
+
}
|
|
197
|
+
finally {
|
|
198
|
+
client.release();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function parseEvent(event) {
|
|
203
|
+
if (event.event === 'session.revoked') {
|
|
204
|
+
const userId = stringField(event.data, 'user_id', 'userId');
|
|
205
|
+
const updatedAt = timestampField(event.data);
|
|
206
|
+
return userId === undefined || updatedAt === undefined
|
|
207
|
+
? undefined
|
|
208
|
+
: { kind: 'session.revoked', userId, updatedAt };
|
|
209
|
+
}
|
|
210
|
+
if (event.event !== 'user.created' &&
|
|
211
|
+
event.event !== 'user.updated' &&
|
|
212
|
+
event.event !== 'user.deleted')
|
|
213
|
+
return undefined;
|
|
214
|
+
const id = stringField(event.data, 'id');
|
|
215
|
+
const email = stringField(event.data, 'email');
|
|
216
|
+
const emailVerified = booleanField(event.data, 'email_verified', 'emailVerified');
|
|
217
|
+
const updatedAt = timestampField(event.data);
|
|
218
|
+
return id === undefined ||
|
|
219
|
+
email === undefined ||
|
|
220
|
+
emailVerified === undefined ||
|
|
221
|
+
updatedAt === undefined
|
|
222
|
+
? undefined
|
|
223
|
+
: { kind: event.event, user: { id, email, emailVerified, updatedAt }, updatedAt };
|
|
224
|
+
}
|
|
225
|
+
async function applyWorkOSEventEffect(client, event, realm) {
|
|
226
|
+
const externalId = event.kind === 'session.revoked' ? event.userId : event.user.id;
|
|
227
|
+
// Session revocation and account deletion are receipt-idempotent security events, not profile updates.
|
|
228
|
+
// A newer `user.updated_at` watermark must never mask either effect.
|
|
229
|
+
if (event.kind === 'session.revoked' || event.kind === 'user.deleted') {
|
|
230
|
+
const link = await client.query(`SELECT principal_id FROM platform_identity_links
|
|
231
|
+
WHERE provider = 'workos' AND realm = $1 AND external_id = $2 AND disabled_at IS NULL FOR UPDATE`, [realm, externalId]);
|
|
232
|
+
const principalId = link.rows[0]?.principal_id;
|
|
233
|
+
if (principalId === undefined)
|
|
234
|
+
return false;
|
|
235
|
+
await client.query('SELECT pg_advisory_xact_lock(hashtextextended($1, 0))', [
|
|
236
|
+
`platform-principal:${principalId}`,
|
|
237
|
+
]);
|
|
238
|
+
if (event.kind === 'user.deleted') {
|
|
239
|
+
await client.query(`UPDATE platform_identity_links
|
|
240
|
+
SET disabled_at = now()
|
|
241
|
+
WHERE provider = 'workos' AND realm = $1 AND external_id = $2
|
|
242
|
+
AND principal_id = $3 AND disabled_at IS NULL`, [realm, externalId, principalId]);
|
|
243
|
+
await client.query(`UPDATE platform_verified_emails SET status = 'superseded', observed_at = now()
|
|
244
|
+
WHERE principal_id = $1 AND provider = 'workos' AND realm = $2 AND status = 'active'`, [principalId, realm]);
|
|
245
|
+
await client.query(`UPDATE platform_principals
|
|
246
|
+
SET status = 'suspended', suspended_at = now()
|
|
247
|
+
WHERE principal_id = $1 AND status = 'active'`, [principalId]);
|
|
248
|
+
}
|
|
249
|
+
await revokePlatformRefreshFamilies(client, principalId);
|
|
250
|
+
return true;
|
|
251
|
+
}
|
|
252
|
+
const version = await client.query(`INSERT INTO platform_identity_upstream_versions
|
|
253
|
+
(provider, realm, external_id, upstream_updated_at)
|
|
254
|
+
VALUES ('workos', $1, $2, $3::timestamptz)
|
|
255
|
+
ON CONFLICT (provider, realm, external_id) DO UPDATE
|
|
256
|
+
SET upstream_updated_at = EXCLUDED.upstream_updated_at
|
|
257
|
+
WHERE platform_identity_upstream_versions.upstream_updated_at < EXCLUDED.upstream_updated_at
|
|
258
|
+
RETURNING external_id`, [realm, externalId, event.updatedAt]);
|
|
259
|
+
if (version.rows.length === 0)
|
|
260
|
+
return false;
|
|
261
|
+
const link = await client.query(`SELECT principal_id FROM platform_identity_links
|
|
262
|
+
WHERE provider = 'workos' AND realm = $1 AND external_id = $2 AND disabled_at IS NULL FOR UPDATE`, [realm, externalId]);
|
|
263
|
+
const principalId = link.rows[0]?.principal_id;
|
|
264
|
+
if (principalId === undefined)
|
|
265
|
+
return false;
|
|
266
|
+
await client.query('SELECT pg_advisory_xact_lock(hashtextextended($1, 0))', [
|
|
267
|
+
`platform-principal:${principalId}`,
|
|
268
|
+
]);
|
|
269
|
+
if (!event.user.emailVerified) {
|
|
270
|
+
await client.query(`UPDATE platform_verified_emails SET status = 'superseded', observed_at = now()
|
|
271
|
+
WHERE principal_id = $1 AND provider = 'workos' AND realm = $2 AND status = 'active'`, [principalId, realm]);
|
|
272
|
+
await revokePlatformRefreshFamilies(client, principalId);
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
const normalizedEmail = normalizePlatformIdentityEmail(event.user.email);
|
|
276
|
+
await client.query(`UPDATE platform_verified_emails SET status = 'superseded', observed_at = now()
|
|
277
|
+
WHERE principal_id = $1 AND provider = 'workos' AND realm = $2
|
|
278
|
+
AND status = 'active' AND normalized_email <> $3`, [principalId, realm, normalizedEmail]);
|
|
279
|
+
await client.query(`INSERT INTO platform_verified_emails
|
|
280
|
+
(principal_id, original_email, normalized_email, provider, realm, status, verified_at, observed_at)
|
|
281
|
+
VALUES ($1, $2, $3, 'workos', $4, 'active', now(), now())
|
|
282
|
+
ON CONFLICT (principal_id, normalized_email, provider, realm)
|
|
283
|
+
DO UPDATE SET original_email = EXCLUDED.original_email, status = 'active', observed_at = EXCLUDED.observed_at`, [principalId, event.user.email, normalizedEmail, realm]);
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
async function revokePlatformRefreshFamilies(client, principalId) {
|
|
287
|
+
const relation = await client.query("SELECT to_regclass('oauth_refresh_tokens')::text AS relation");
|
|
288
|
+
if (relation.rows[0]?.relation !== null) {
|
|
289
|
+
await client.query("DELETE FROM oauth_refresh_tokens WHERE owner_subject = $1 AND identity_kind IS DISTINCT FROM 'customer'", [principalId]);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
function stringField(data, ...names) {
|
|
293
|
+
for (const name of names) {
|
|
294
|
+
const value = data[name];
|
|
295
|
+
if (typeof value === 'string' && value.length > 0)
|
|
296
|
+
return value;
|
|
297
|
+
}
|
|
298
|
+
return undefined;
|
|
299
|
+
}
|
|
300
|
+
function booleanField(data, ...names) {
|
|
301
|
+
for (const name of names)
|
|
302
|
+
if (typeof data[name] === 'boolean')
|
|
303
|
+
return data[name];
|
|
304
|
+
return undefined;
|
|
305
|
+
}
|
|
306
|
+
function timestampField(data) {
|
|
307
|
+
const value = stringField(data, 'updated_at', 'updatedAt');
|
|
308
|
+
return value === undefined || Number.isNaN(Date.parse(value)) ? undefined : value;
|
|
309
|
+
}
|
|
310
|
+
//# sourceMappingURL=workos-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workos-events.js","sourceRoot":"","sources":["../../src/oauth/workos-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAA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AQ,GAAG,MAAM,MAAM,CAAC,KAAK,CACjC,8DAA8D,CAC/D,CAAC;IACF,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,KAAK,IAAI,EAAE,CAAC;QACxC,MAAM,MAAM,CAAC,KAAK,CAChB,yGAAyG,EACzG,CAAC,WAAW,CAAC,CACd,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAClB,IAAuC,EACvC,GAAG,KAAwB;IAE3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;IAClE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,YAAY,CACnB,IAAuC,EACvC,GAAG,KAAwB;IAE3B,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC,IAAI,CAAY,CAAC;IAC5F,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,cAAc,CAAC,IAAuC;IAC7D,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IAC3D,OAAO,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { UpstreamHumanOAuthAuthenticator } from './upstream-human.js';
|
|
2
|
+
export interface WorkOSUser {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly email: string;
|
|
5
|
+
readonly emailVerified: boolean;
|
|
6
|
+
readonly locale: string | null;
|
|
7
|
+
}
|
|
8
|
+
/** Narrow injectable SDK port; tests exercise the credential-disposal boundary without a live WorkOS call. */
|
|
9
|
+
export interface WorkOSUserManagementClient {
|
|
10
|
+
getAuthorizationUrl(input: {
|
|
11
|
+
readonly provider: 'authkit';
|
|
12
|
+
readonly clientId: string;
|
|
13
|
+
readonly redirectUri: string;
|
|
14
|
+
readonly state: string;
|
|
15
|
+
}): string;
|
|
16
|
+
authenticateWithCode(input: {
|
|
17
|
+
readonly code: string;
|
|
18
|
+
readonly clientId: string;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
readonly user: WorkOSUser;
|
|
21
|
+
readonly accessToken: string;
|
|
22
|
+
readonly refreshToken: string;
|
|
23
|
+
readonly authenticationMethod?: string;
|
|
24
|
+
readonly impersonator?: unknown;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
export interface WorkOSHumanAuthenticatorConfig {
|
|
28
|
+
readonly clientId: string;
|
|
29
|
+
readonly apiKey: string;
|
|
30
|
+
readonly redirectUri: string;
|
|
31
|
+
/** Stable WorkOS environment/connection realm used by immutable local identity links. */
|
|
32
|
+
readonly realm: string;
|
|
33
|
+
/** Explicit rollout gate. Launch defaults to Google + Magic Auth; later methods require a release change. */
|
|
34
|
+
readonly allowedAuthenticationMethods?: readonly WorkOSPlatformAuthenticationMethod[];
|
|
35
|
+
}
|
|
36
|
+
export type WorkOSPlatformAuthenticationMethod = 'GoogleOAuth' | 'MagicAuth' | 'GitHubOAuth' | 'Password' | 'SSO';
|
|
37
|
+
/** Operator input is deliberately separate from the derived callback URL. */
|
|
38
|
+
export interface WorkOSRuntimeConfig {
|
|
39
|
+
readonly clientId?: string;
|
|
40
|
+
readonly apiKey?: string;
|
|
41
|
+
readonly realm?: string;
|
|
42
|
+
readonly allowedAuthenticationMethods?: readonly WorkOSPlatformAuthenticationMethod[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Validates the optional WorkOS unit as one all-or-nothing production setting. Constructing the SDK is local;
|
|
46
|
+
* no WorkOS network request is made during service boot.
|
|
47
|
+
*/
|
|
48
|
+
export declare function createConfiguredWorkOSHumanAuthenticator(issuer: string, config: WorkOSRuntimeConfig | undefined): WorkOSHumanAuthenticator | undefined;
|
|
49
|
+
/** WorkOS AuthKit adapter. It intentionally exposes identity claims only, never upstream credentials. */
|
|
50
|
+
export declare class WorkOSHumanAuthenticator implements UpstreamHumanOAuthAuthenticator {
|
|
51
|
+
#private;
|
|
52
|
+
readonly provider: "workos";
|
|
53
|
+
readonly realm: string;
|
|
54
|
+
constructor(config: WorkOSHumanAuthenticatorConfig, userManagement?: WorkOSUserManagementClient);
|
|
55
|
+
authorizationUrl(state: string): string;
|
|
56
|
+
exchange(code: string): Promise<{
|
|
57
|
+
readonly provider: 'workos';
|
|
58
|
+
readonly realm: string;
|
|
59
|
+
readonly subject: string;
|
|
60
|
+
readonly email: string;
|
|
61
|
+
readonly emailVerified: boolean;
|
|
62
|
+
readonly locale?: string;
|
|
63
|
+
}>;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=workos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workos.d.ts","sourceRoot":"","sources":["../../src/oauth/workos.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAE3E,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,8GAA8G;AAC9G,MAAM,WAAW,0BAA0B;IACzC,mBAAmB,CAAC,KAAK,EAAE;QACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,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MAAM,EACd,MAAM,EAAE,mBAAmB,GAAG,SAAS,GACtC,wBAAwB,GAAG,SAAS,CActC;AAED,yGAAyG;AACzG,qBAAa,wBAAyB,YAAW,+BAA+B;;IAC9E,QAAQ,CAAC,QAAQ,EAAG,QAAQ,CAAU;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAQrB,MAAM,EAAE,8BAA8B,EACtC,cAAc,GAAE,0BAGC;IAYnB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IASjC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;QAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CAyBH"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { WorkOS } from '@workos-inc/node';
|
|
2
|
+
/**
|
|
3
|
+
* Validates the optional WorkOS unit as one all-or-nothing production setting. Constructing the SDK is local;
|
|
4
|
+
* no WorkOS network request is made during service boot.
|
|
5
|
+
*/
|
|
6
|
+
export function createConfiguredWorkOSHumanAuthenticator(issuer, config) {
|
|
7
|
+
if (config === undefined)
|
|
8
|
+
return undefined;
|
|
9
|
+
const clientId = requiredWorkOSConfig('client id', config.clientId);
|
|
10
|
+
const apiKey = requiredWorkOSConfig('api key', config.apiKey);
|
|
11
|
+
const realm = requiredWorkOSConfig('realm', config.realm);
|
|
12
|
+
return new WorkOSHumanAuthenticator({
|
|
13
|
+
clientId,
|
|
14
|
+
apiKey,
|
|
15
|
+
realm,
|
|
16
|
+
redirectUri: `${issuer.replace(/\/+$/, '')}/oauth/workos/callback`,
|
|
17
|
+
...(config.allowedAuthenticationMethods === undefined
|
|
18
|
+
? {}
|
|
19
|
+
: { allowedAuthenticationMethods: config.allowedAuthenticationMethods }),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/** WorkOS AuthKit adapter. It intentionally exposes identity claims only, never upstream credentials. */
|
|
23
|
+
export class WorkOSHumanAuthenticator {
|
|
24
|
+
provider = 'workos';
|
|
25
|
+
realm;
|
|
26
|
+
#clientId;
|
|
27
|
+
#redirectUri;
|
|
28
|
+
#realm;
|
|
29
|
+
#userManagement;
|
|
30
|
+
#allowedAuthenticationMethods;
|
|
31
|
+
constructor(config, userManagement = new WorkOS({
|
|
32
|
+
apiKey: config.apiKey,
|
|
33
|
+
clientId: config.clientId,
|
|
34
|
+
}).userManagement) {
|
|
35
|
+
this.#clientId = config.clientId;
|
|
36
|
+
this.#redirectUri = config.redirectUri;
|
|
37
|
+
this.#realm = requiredWorkOSConfig('realm', config.realm);
|
|
38
|
+
this.realm = this.#realm;
|
|
39
|
+
this.#userManagement = userManagement;
|
|
40
|
+
this.#allowedAuthenticationMethods = new Set(config.allowedAuthenticationMethods ?? ['GoogleOAuth', 'MagicAuth']);
|
|
41
|
+
}
|
|
42
|
+
authorizationUrl(state) {
|
|
43
|
+
return this.#userManagement.getAuthorizationUrl({
|
|
44
|
+
provider: 'authkit',
|
|
45
|
+
clientId: this.#clientId,
|
|
46
|
+
redirectUri: this.#redirectUri,
|
|
47
|
+
state,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
async exchange(code) {
|
|
51
|
+
const { user, authenticationMethod, impersonator } = await this.#userManagement.authenticateWithCode({
|
|
52
|
+
code,
|
|
53
|
+
clientId: this.#clientId,
|
|
54
|
+
});
|
|
55
|
+
if (authenticationMethod === undefined ||
|
|
56
|
+
!this.#allowedAuthenticationMethods.has(authenticationMethod) ||
|
|
57
|
+
impersonator !== undefined ||
|
|
58
|
+
user.emailVerified !== true) {
|
|
59
|
+
throw new Error('WorkOS authentication method is not permitted');
|
|
60
|
+
}
|
|
61
|
+
const subject = requiredWorkOSIdentityValue('user ID', user.id);
|
|
62
|
+
const email = requiredWorkOSIdentityValue('email', user.email);
|
|
63
|
+
return {
|
|
64
|
+
provider: 'workos',
|
|
65
|
+
realm: this.#realm,
|
|
66
|
+
subject,
|
|
67
|
+
email,
|
|
68
|
+
emailVerified: user.emailVerified,
|
|
69
|
+
...(user.locale !== null ? { locale: user.locale } : {}),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function requiredWorkOSConfig(name, value) {
|
|
74
|
+
const normalized = value?.trim();
|
|
75
|
+
if (normalized === undefined || normalized.length === 0)
|
|
76
|
+
throw new Error(`WorkOS client id, api key, and realm must be configured together (missing ${name})`);
|
|
77
|
+
return normalized;
|
|
78
|
+
}
|
|
79
|
+
function requiredWorkOSIdentityValue(name, value) {
|
|
80
|
+
const normalized = value.trim();
|
|
81
|
+
if (normalized.length === 0)
|
|
82
|
+
throw new Error(`WorkOS ${name} is invalid`);
|
|
83
|
+
return normalized;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=workos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workos.js","sourceRoot":"","sources":["../../src/oauth/workos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAoD1C;;;GAGG;AACH,MAAM,UAAU,wCAAwC,CACtD,MAAc,EACd,MAAuC;IAEvC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC3C,MAAM,QAAQ,GAAG,oBAAoB,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IACpE,MAAM,MAAM,GAAG,oBAAoB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9D,MAAM,KAAK,GAAG,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1D,OA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AAED,SAAS,2BAA2B,CAAC,IAAY,EAAE,KAAa;IAC9D,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAChC,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,aAAa,CAAC,CAAC;IAC1E,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -24,6 +24,8 @@ import type { FeedbackIssueClient } from './github/feedback-issues.js';
|
|
|
24
24
|
import type { PendingGithubInstallationStore } from './github/pending-installations.js';
|
|
25
25
|
import type { LoadedServiceModule } from './modules/host.js';
|
|
26
26
|
import type { DeveloperGrantStore } from './oauth/developer-grant.js';
|
|
27
|
+
import type { PlatformAuthOperator } from './platform-auth-operator.js';
|
|
28
|
+
import type { PlatformIdentityStore } from './platform-identity.js';
|
|
27
29
|
import type { PolicyAssignmentStore, PolicyCounterStore } from './policy.js';
|
|
28
30
|
import type { AlertRuleStore } from './store/alert-rules.js';
|
|
29
31
|
import type { AuditSink } from './store/audit.js';
|
|
@@ -62,6 +64,10 @@ export interface ServiceOptions {
|
|
|
62
64
|
* PostgreSQL persistence owns this store and rejects a separately injected control-plane backend.
|
|
63
65
|
*/
|
|
64
66
|
readonly controlPlaneStore?: ControlPlaneStore;
|
|
67
|
+
/** Optional canonical-human store. When absent, control-plane authentication remains direct Google. */
|
|
68
|
+
readonly platformIdentityStore?: PlatformIdentityStore;
|
|
69
|
+
/** Durable PostgreSQL-backed platform-human migration operator. No in-memory fallback is permitted. */
|
|
70
|
+
readonly platformAuthOperator?: PlatformAuthOperator;
|
|
65
71
|
/**
|
|
66
72
|
* Durable atomic store for the one-time existing-organization billing preparation. No in-memory
|
|
67
73
|
* default is provided because owner, app, policy, and billing revalidation must share one transaction.
|
|
@@ -213,7 +219,7 @@ export interface ServiceOptions {
|
|
|
213
219
|
/**
|
|
214
220
|
* The self-hosted authorization-server Express sub-app (OA-2). When set, the front-door delegates the AS
|
|
215
221
|
* paths ({@link isAuthServerPath}: `/authorize`, `/token`, `/register`, the AS metadata + JWKS, and the
|
|
216
|
-
*
|
|
222
|
+
* upstream-human callbacks + generic/developer grant consent routes) to it. Built by {@link serveService} from the
|
|
217
223
|
* `oauth` config.
|
|
218
224
|
*/
|
|
219
225
|
readonly authServerApp?: (req: IncomingMessage, res: ServerResponse) => void;
|
|
@@ -230,7 +236,7 @@ export interface ServiceOptions {
|
|
|
230
236
|
readonly controlPlaneSignupMode?: ControlPlaneSignupMode;
|
|
231
237
|
/** Public-signup denylist domains. Takes effect before domain/allowlist/public admission. */
|
|
232
238
|
readonly deniedSignupDomains?: readonly string[];
|
|
233
|
-
/** Public-signup denylist
|
|
239
|
+
/** Public-signup denylist external/canonical subjects. Applied before domain/allowlist/public admission. */
|
|
234
240
|
readonly deniedSignupSubjects?: readonly string[];
|
|
235
241
|
/** Boot-initialized service modules. Dynamic loading is owned by serveService, never request handlers. */
|
|
236
242
|
readonly loadedModules?: readonly LoadedServiceModule[];
|
|
@@ -287,6 +293,9 @@ export interface ServiceOptions {
|
|
|
287
293
|
* here before receiving run-scoped and GitHub installation credentials.
|
|
288
294
|
*/
|
|
289
295
|
readonly githubBuilder?: {
|
|
296
|
+
/** Immutable Google `sub` for the exact Cloud Run builder service account. */
|
|
297
|
+
readonly subject: string;
|
|
298
|
+
/** Informational service-account email used by deployment configuration, never authorization. */
|
|
290
299
|
readonly serviceAccountEmail: string;
|
|
291
300
|
readonly audience: string;
|
|
292
301
|
readonly verifier?: GithubBuilderIdentityVerifier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,EACV,aAAa,EACb,MAAM,EACN,kBAA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AC;IAClD,0GAA0G;IAC1G,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACxD;;;;OAIG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IACvD;;;OAGG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IACrD;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,mBAAmB,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,8BAA8B,CAAC,EAAE,8BAA8B,CAAC;IACzE;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAC/C,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,6EAA6E;IAC7E,QAAQ,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IAC/C,mGAAmG;IACnG,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,6FAA6F;IAC7F,QAAQ,CAAC,gCAAgC,CAAC,EAAE,MAAM,CAAC;IACnD;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE;QACvB,8EAA8E;QAC9E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,iGAAiG;QACjG,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;QACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,6BAA6B,CAAC;KACnD,CAAC;CACH"}
|
|
@@ -6,4 +6,6 @@ export interface PersonalWorkspace {
|
|
|
6
6
|
}
|
|
7
7
|
export declare function ensurePersonalWorkspace(controlPlane: ControlPlaneStore, identity: ControlPlaneIdentity): Promise<PersonalWorkspace>;
|
|
8
8
|
export declare function personalOrgSlug(identity: Pick<ControlPlaneIdentity, 'subject' | 'email'>): string;
|
|
9
|
+
/** Immutable suffix used to discover and bind legacy email-derived personal organization slugs. */
|
|
10
|
+
export declare function personalOrgSlugSuffix(subject: string): string;
|
|
9
11
|
//# sourceMappingURL=personal-workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personal-workspace.d.ts","sourceRoot":"","sources":["../src/personal-workspace.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG/D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,iBAAiB,EAC/B,QAAQ,EAAE,oBAAoB,GAC7B,OAAO,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"personal-workspace.d.ts","sourceRoot":"","sources":["../src/personal-workspace.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG/D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,iBAAiB,EAC/B,QAAQ,EAAE,oBAAoB,GAC7B,OAAO,CAAC,iBAAiB,CAAC,CAY5B;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,OAAO,CAAC,GAAG,MAAM,CAIjG;AAED,mGAAmG;AACnG,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE7D"}
|
|
@@ -5,6 +5,9 @@ export async function ensurePersonalWorkspace(controlPlane, identity) {
|
|
|
5
5
|
return controlPlane.provisionPersonalWorkspace({
|
|
6
6
|
slug,
|
|
7
7
|
displayName: identity.email,
|
|
8
|
+
...(identity.billingIdentity === undefined
|
|
9
|
+
? {}
|
|
10
|
+
: { identityIssuer: identity.billingIdentity.identityIssuer }),
|
|
8
11
|
subject: identity.subject,
|
|
9
12
|
email: identity.email,
|
|
10
13
|
...(identity.givenName !== undefined ? { firstName: identity.givenName } : {}),
|
|
@@ -13,8 +16,11 @@ export async function ensurePersonalWorkspace(controlPlane, identity) {
|
|
|
13
16
|
export function personalOrgSlug(identity) {
|
|
14
17
|
const localPart = identity.email.split('@')[0] ?? 'user';
|
|
15
18
|
const base = slugPart(localPart).slice(0, 52) || 'user';
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
return validateSlug('org', `u-${base}${personalOrgSlugSuffix(identity.subject)}`);
|
|
20
|
+
}
|
|
21
|
+
/** Immutable suffix used to discover and bind legacy email-derived personal organization slugs. */
|
|
22
|
+
export function personalOrgSlugSuffix(subject) {
|
|
23
|
+
return `-${createHash('sha256').update(subject).digest('hex').slice(0, 8)}`;
|
|
18
24
|
}
|
|
19
25
|
function slugPart(value) {
|
|
20
26
|
return value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personal-workspace.js","sourceRoot":"","sources":["../src/personal-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAO1C,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,YAA+B,EAC/B,QAA8B;IAE9B,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACvC,OAAO,YAAY,CAAC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