alepha 0.21.2 → 0.23.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/README.md +0 -1
- package/dist/api/audits/index.browser.js.map +1 -1
- package/dist/api/audits/index.d.ts +393 -403
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +25 -56
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.browser.js +31 -1
- package/dist/api/files/index.browser.js.map +1 -1
- package/dist/api/files/index.d.ts +313 -208
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +152 -42
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.browser.js +2 -2
- package/dist/api/jobs/index.browser.js.map +1 -1
- package/dist/api/jobs/index.d.ts +282 -285
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +39 -33
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/keys/index.d.ts +217 -222
- package/dist/api/keys/index.d.ts.map +1 -1
- package/dist/api/keys/index.js.map +1 -1
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +188 -195
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/oauth/index.d.ts +71 -76
- package/dist/api/oauth/index.d.ts.map +1 -1
- package/dist/api/oauth/index.js.map +1 -1
- package/dist/api/organizations/index.browser.js.map +1 -1
- package/dist/api/organizations/index.d.ts +104 -109
- package/dist/api/organizations/index.d.ts.map +1 -1
- package/dist/api/organizations/index.js.map +1 -1
- package/dist/api/parameters/index.browser.js +43 -16
- package/dist/api/parameters/index.browser.js.map +1 -1
- package/dist/api/parameters/index.d.ts +488 -344
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/parameters/index.js +175 -35
- package/dist/api/parameters/index.js.map +1 -1
- package/dist/api/payments/index.d.ts +396 -402
- package/dist/api/payments/index.d.ts.map +1 -1
- package/dist/api/payments/index.js.map +1 -1
- package/dist/api/subscriptions/index.d.ts +644 -652
- package/dist/api/subscriptions/index.d.ts.map +1 -1
- package/dist/api/subscriptions/index.js +1 -1
- package/dist/api/subscriptions/index.js.map +1 -1
- package/dist/api/users/index.browser.js +7 -0
- package/dist/api/users/index.browser.js.map +1 -1
- package/dist/api/users/index.d.ts +1106 -1005
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +307 -64
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.browser.js.map +1 -1
- package/dist/api/verifications/index.d.ts +137 -143
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/api/verifications/index.js.map +1 -1
- package/dist/background/index.d.ts +95 -0
- package/dist/background/index.d.ts.map +1 -0
- package/dist/background/index.js +121 -0
- package/dist/background/index.js.map +1 -0
- package/dist/background/index.workerd.js +110 -0
- package/dist/background/index.workerd.js.map +1 -0
- package/dist/batch/index.d.ts +5 -7
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js.map +1 -1
- package/dist/bin/index.js.map +1 -1
- package/dist/bucket/index.d.ts +76 -54
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/bucket/index.js +58 -11
- package/dist/bucket/index.js.map +1 -1
- package/dist/bucket/index.workerd.js +200 -5
- package/dist/bucket/index.workerd.js.map +1 -1
- package/dist/cache/core/index.d.ts +7 -10
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/core/index.js.map +1 -1
- package/dist/cache/core/index.workerd.js.map +1 -1
- package/dist/cache/database/index.d.ts +22 -26
- package/dist/cache/database/index.d.ts.map +1 -1
- package/dist/cache/database/index.js.map +1 -1
- package/dist/cache/redis/index.d.ts +4 -7
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cache/redis/index.js.map +1 -1
- package/dist/captcha/index.d.ts +3 -6
- package/dist/captcha/index.d.ts.map +1 -1
- package/dist/captcha/index.js.map +1 -1
- package/dist/cli/config/index.d.ts.map +1 -1
- package/dist/cli/config/index.js.map +1 -1
- package/dist/cli/core/index.d.ts +458 -249
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +372 -660
- package/dist/cli/core/index.js.map +1 -1
- package/dist/cli/devtools/index.d.ts +3 -5
- package/dist/cli/devtools/index.d.ts.map +1 -1
- package/dist/cli/devtools/index.js.map +1 -1
- package/dist/cli/i18n/index.d.ts +20 -17
- package/dist/cli/i18n/index.d.ts.map +1 -1
- package/dist/cli/i18n/index.js +45 -11
- package/dist/cli/i18n/index.js.map +1 -1
- package/dist/cli/platform/index.d.ts +126 -1342
- package/dist/cli/platform/index.d.ts.map +1 -1
- package/dist/cli/platform/index.js +136 -2374
- package/dist/cli/platform/index.js.map +1 -1
- package/dist/cli/platform-lib/index.d.ts +1472 -0
- package/dist/cli/platform-lib/index.d.ts.map +1 -0
- package/dist/cli/platform-lib/index.js +2660 -0
- package/dist/cli/platform-lib/index.js.map +1 -0
- package/dist/cli/vendor/index.d.ts +17 -21
- package/dist/cli/vendor/index.d.ts.map +1 -1
- package/dist/cli/vendor/index.js.map +1 -1
- package/dist/command/index.d.ts +20 -19
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +39 -10
- package/dist/command/index.js.map +1 -1
- package/dist/{containers → container}/core/index.d.ts +13 -15
- package/dist/container/core/index.d.ts.map +1 -0
- package/dist/{containers → container}/core/index.js +23 -14
- package/dist/container/core/index.js.map +1 -0
- package/dist/{containers → container}/core/index.workerd.js +37 -22
- package/dist/container/core/index.workerd.js.map +1 -0
- package/dist/core/index.browser.js +27 -1
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +48 -24
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +27 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +27 -1
- package/dist/core/index.native.js.map +1 -1
- package/dist/core/index.workerd.js +27 -1
- package/dist/core/index.workerd.js.map +1 -1
- package/dist/crypto/index.browser.js.map +1 -1
- package/dist/crypto/index.d.ts +5 -8
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/crypto/index.js.map +1 -1
- package/dist/datetime/index.d.ts +3 -4
- package/dist/datetime/index.d.ts.map +1 -1
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/brevo/index.d.ts +2 -4
- package/dist/email/brevo/index.d.ts.map +1 -1
- package/dist/email/brevo/index.js.map +1 -1
- package/dist/email/cloudflare/index.d.ts +20 -7
- package/dist/email/cloudflare/index.d.ts.map +1 -1
- package/dist/email/cloudflare/index.js +46 -9
- package/dist/email/cloudflare/index.js.map +1 -1
- package/dist/email/core/index.d.ts +6 -9
- package/dist/email/core/index.d.ts.map +1 -1
- package/dist/email/core/index.js.map +1 -1
- package/dist/email/core/index.workerd.js.map +1 -1
- package/dist/email/smtp/index.d.ts +10 -13
- package/dist/email/smtp/index.d.ts.map +1 -1
- package/dist/email/smtp/index.js +107 -32
- package/dist/email/smtp/index.js.map +1 -1
- package/dist/fake/index.d.ts +1 -2
- package/dist/fake/index.d.ts.map +1 -1
- package/dist/fake/index.js.map +1 -1
- package/dist/lock/core/index.d.ts +9 -14
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/core/index.js.map +1 -1
- package/dist/lock/redis/index.d.ts +2 -4
- package/dist/lock/redis/index.d.ts.map +1 -1
- package/dist/lock/redis/index.js.map +1 -1
- package/dist/logger/index.d.ts +105 -76
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +196 -174
- package/dist/logger/index.js.map +1 -1
- package/dist/mcp/index.d.ts +25 -20
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +23 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/core/index.browser.js.map +1 -1
- package/dist/orm/core/index.bun.js +19 -1
- package/dist/orm/core/index.bun.js.map +1 -1
- package/dist/orm/core/index.d.ts +76 -62
- package/dist/orm/core/index.d.ts.map +1 -1
- package/dist/orm/core/index.js +20 -2
- package/dist/orm/core/index.js.map +1 -1
- package/dist/orm/postgres/index.bun.js.map +1 -1
- package/dist/orm/postgres/index.d.ts +28 -20
- package/dist/orm/postgres/index.d.ts.map +1 -1
- package/dist/orm/postgres/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +12 -15
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/core/index.js.map +1 -1
- package/dist/queue/core/index.workerd.js.map +1 -1
- package/dist/queue/redis/index.d.ts +3 -5
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/queue/redis/index.js.map +1 -1
- package/dist/react/auth/index.browser.js +9 -2
- package/dist/react/auth/index.browser.js.map +1 -1
- package/dist/react/auth/index.d.ts +14 -9
- package/dist/react/auth/index.d.ts.map +1 -1
- package/dist/react/auth/index.js +9 -2
- package/dist/react/auth/index.js.map +1 -1
- package/dist/react/core/index.d.ts +7 -8
- package/dist/react/core/index.d.ts.map +1 -1
- package/dist/react/core/index.js +6 -3
- package/dist/react/core/index.js.map +1 -1
- package/dist/react/form/index.d.ts +2 -5
- package/dist/react/form/index.d.ts.map +1 -1
- package/dist/react/form/index.js +16 -15
- package/dist/react/form/index.js.map +1 -1
- package/dist/react/head/index.browser.js.map +1 -1
- package/dist/react/head/index.d.ts +2 -4
- package/dist/react/head/index.d.ts.map +1 -1
- package/dist/react/head/index.js.map +1 -1
- package/dist/react/i18n/index.d.ts +90 -11
- package/dist/react/i18n/index.d.ts.map +1 -1
- package/dist/react/i18n/index.js +147 -11
- package/dist/react/i18n/index.js.map +1 -1
- package/dist/react/intro/index.d.ts +1 -2
- package/dist/react/intro/index.d.ts.map +1 -1
- package/dist/react/intro/index.js +2 -2
- package/dist/react/intro/index.js.map +1 -1
- package/dist/react/router/index.browser.js +193 -24
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +434 -222
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +249 -35
- package/dist/react/router/index.js.map +1 -1
- package/dist/react/sitemap/index.browser.js +35 -0
- package/dist/react/sitemap/index.browser.js.map +1 -0
- package/dist/react/sitemap/index.d.ts +92 -0
- package/dist/react/sitemap/index.d.ts.map +1 -0
- package/dist/react/sitemap/index.js +131 -0
- package/dist/react/sitemap/index.js.map +1 -0
- package/dist/react/testing/index.d.ts +1 -2
- package/dist/react/testing/index.d.ts.map +1 -1
- package/dist/react/testing/index.js +16 -17
- package/dist/react/testing/index.js.map +1 -1
- package/dist/react/ui/index.d.ts +20 -25
- package/dist/react/ui/index.d.ts.map +1 -1
- package/dist/react/ui/index.js.map +1 -1
- package/dist/redis/index.bun.js.map +1 -1
- package/dist/redis/index.d.ts +17 -19
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.d.ts +2 -4
- package/dist/retry/index.d.ts.map +1 -1
- package/dist/retry/index.js.map +1 -1
- package/dist/router/index.d.ts.map +1 -1
- package/dist/router/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +10 -13
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/index.workerd.js.map +1 -1
- package/dist/security/index.browser.js.map +1 -1
- package/dist/security/index.d.ts +45 -48
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.browser.js.map +1 -1
- package/dist/server/auth/index.d.ts +272 -173
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +1608 -15
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cookies/index.browser.js.map +1 -1
- package/dist/server/cookies/index.d.ts +20 -7
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +22 -3
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.browser.js.map +1 -1
- package/dist/server/core/index.d.ts +106 -73
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +44 -0
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/cors/index.d.ts +11 -14
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/cors/index.js.map +1 -1
- package/dist/server/etag/index.d.ts +6 -9
- package/dist/server/etag/index.d.ts.map +1 -1
- package/dist/server/etag/index.js.map +1 -1
- package/dist/server/health/index.d.ts +18 -21
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/health/index.js.map +1 -1
- package/dist/server/links/index.browser.js +2 -0
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +63 -67
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +2 -0
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/metrics/index.d.ts +5 -7
- package/dist/server/metrics/index.d.ts.map +1 -1
- package/dist/server/metrics/index.js.map +1 -1
- package/dist/server/proxy/index.d.ts +3 -5
- package/dist/server/proxy/index.d.ts.map +1 -1
- package/dist/server/proxy/index.js.map +1 -1
- package/dist/server/rate-limit/index.d.ts +10 -13
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.js.map +1 -1
- package/dist/server/static/index.d.ts +3 -5
- package/dist/server/static/index.d.ts.map +1 -1
- package/dist/server/static/index.js.map +1 -1
- package/dist/server/swagger/index.d.ts +5 -8
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +3 -5
- package/dist/sms/index.d.ts.map +1 -1
- package/dist/sms/index.js.map +1 -1
- package/dist/system/index.browser.js.map +1 -1
- package/dist/system/index.d.ts +2 -4
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js.map +1 -1
- package/dist/system/index.workerd.js.map +1 -1
- package/dist/topic/core/index.d.ts +4 -6
- package/dist/topic/core/index.d.ts.map +1 -1
- package/dist/topic/core/index.js.map +1 -1
- package/dist/topic/redis/index.d.ts +5 -8
- package/dist/topic/redis/index.d.ts.map +1 -1
- package/dist/topic/redis/index.js.map +1 -1
- package/package.json +59 -23
- package/src/api/audits/__tests__/AuditService.spec.ts +18 -110
- package/src/api/audits/controllers/AdminAuditController.ts +14 -0
- package/src/api/audits/services/AuditService.ts +21 -88
- package/src/api/files/__tests__/FileService.spec.ts +207 -2
- package/src/api/files/index.ts +3 -0
- package/src/api/files/schemas/fileCreatorSummarySchema.ts +22 -0
- package/src/api/files/schemas/fileResourceSchema.ts +10 -1
- package/src/api/files/services/FileService.ts +170 -72
- package/src/api/jobs/__tests__/$job.spec.ts +24 -1
- package/src/api/jobs/index.ts +4 -3
- package/src/api/jobs/primitives/$job.ts +7 -3
- package/src/api/jobs/providers/DirectJobDispatcher.ts +17 -36
- package/src/api/jobs/providers/JobProvider.ts +53 -24
- package/src/api/jobs/schemas/jobConfigAtom.ts +1 -1
- package/src/api/jobs/schemas/jobExecutionResourceSchema.ts +4 -1
- package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +3 -1
- package/src/api/parameters/__tests__/$parameter.spec.ts +19 -2
- package/src/api/parameters/audits/ParameterAudits.ts +17 -0
- package/src/api/parameters/controllers/AdminParameterController.ts +95 -19
- package/src/api/parameters/index.ts +3 -0
- package/src/api/parameters/schemas/activateParameterBodySchema.ts +3 -3
- package/src/api/parameters/schemas/createParameterVersionBodySchema.ts +3 -2
- package/src/api/parameters/schemas/parameterCreatorSummarySchema.ts +25 -0
- package/src/api/parameters/schemas/parameterResponseSchema.ts +5 -0
- package/src/api/parameters/schemas/rollbackParameterBodySchema.ts +4 -2
- package/src/api/parameters/services/ParameterProvider.ts +69 -6
- package/src/api/subscriptions/jobs/SubscriptionJobs.ts +1 -1
- package/src/api/users/__tests__/AdminSessionController.spec.ts +37 -0
- package/src/api/users/audits/SessionAudits.ts +33 -0
- package/src/api/users/audits/UserAudits.ts +19 -43
- package/src/api/users/controllers/AdminUserController.ts +66 -1
- package/src/api/users/controllers/RealmController.ts +1 -0
- package/src/api/users/entities/sessions.ts +6 -0
- package/src/api/users/entities/users.ts +2 -0
- package/src/api/users/index.ts +9 -1
- package/src/api/users/primitives/$realm.ts +29 -0
- package/src/api/users/providers/RealmProvider.ts +15 -0
- package/src/api/users/schemas/realmConfigSchema.ts +14 -0
- package/src/api/users/schemas/sessionResourceSchema.ts +16 -0
- package/src/api/users/schemas/updateUserSchema.ts +1 -8
- package/src/api/users/schemas/userQuerySchema.ts +7 -0
- package/src/api/users/services/CredentialService.ts +15 -6
- package/src/api/users/services/IdentityService.ts +2 -1
- package/src/api/users/services/RegistrationService.ts +2 -1
- package/src/api/users/services/SessionCrudService.ts +19 -2
- package/src/api/users/services/SessionService.ts +39 -19
- package/src/api/users/services/UserService.ts +106 -8
- package/src/background/__tests__/BackgroundTaskProvider.spec.ts +96 -0
- package/src/background/index.ts +37 -0
- package/src/background/index.workerd.ts +28 -0
- package/src/background/providers/BackgroundTaskProvider.ts +70 -0
- package/src/background/providers/WorkerdBackgroundTaskProvider.ts +43 -0
- package/src/bucket/__tests__/$bucket.spec.ts +18 -0
- package/src/bucket/__tests__/LocalFileStorageProvider.spec.ts +5 -0
- package/src/bucket/__tests__/MemoryFileStorageProvider.spec.ts +5 -0
- package/src/bucket/__tests__/NodeS3BucketProvider.spec.ts +23 -4
- package/src/bucket/__tests__/shared.ts +30 -0
- package/src/bucket/index.ts +5 -5
- package/src/bucket/index.workerd.ts +11 -4
- package/src/bucket/primitives/$bucket.ts +27 -0
- package/src/bucket/providers/FileStorageProvider.ts +13 -0
- package/src/bucket/providers/LocalFileStorageProvider.ts +17 -1
- package/src/bucket/providers/MemoryFileStorageProvider.ts +7 -0
- package/src/bucket/providers/{CloudflareR2Provider.ts → R2FileStorageProvider.ts} +10 -1
- package/src/bucket/providers/{NodeS3BucketProvider.ts → S3FileStorageProvider.ts} +27 -5
- package/src/cli/core/__tests__/BuildDockerTask.spec.ts +25 -1
- package/src/cli/core/__tests__/init.spec.ts +0 -219
- package/src/cli/core/atoms/buildOptions.ts +0 -12
- package/src/cli/core/commands/__tests__/BuildCommand.spec.ts +43 -0
- package/src/cli/core/commands/build.ts +105 -37
- package/src/cli/core/commands/init.ts +0 -12
- package/src/cli/core/commands/pack.ts +133 -0
- package/src/cli/core/index.ts +3 -3
- package/src/cli/core/providers/ViteDevServerProvider.ts +40 -16
- package/src/cli/core/services/PackageManagerUtils.ts +0 -16
- package/src/cli/core/services/ProjectScaffolder.ts +29 -291
- package/src/cli/core/tasks/BuildCloudflareTask.ts +382 -56
- package/src/cli/core/tasks/BuildDockerTask.ts +33 -3
- package/src/cli/core/tasks/BuildPrerenderTask.ts +44 -7
- package/src/cli/core/tasks/BuildTask.ts +34 -0
- package/src/cli/core/templates/apiIndexTs.ts +1 -22
- package/src/cli/core/templates/mainCss.ts +0 -1
- package/src/cli/core/templates/webAppRouterTs.ts +0 -99
- package/src/cli/core/templates/webIndexTs.ts +1 -22
- package/src/cli/i18n/__tests__/I18nCheckService.spec.ts +48 -0
- package/src/cli/i18n/services/I18nCheckService.ts +65 -11
- package/src/cli/platform/__tests__/SecretsCommand.spec.ts +5 -3
- package/src/cli/platform/commands/SecretsCommand.ts +8 -6
- package/src/cli/platform/commands/platform.ts +192 -46
- package/src/cli/platform/index.ts +12 -52
- package/src/cli/{platform → platform-lib}/__tests__/CloudflareAdapter.spec.ts +426 -169
- package/src/cli/{platform → platform-lib}/__tests__/NamingService.spec.ts +91 -4
- package/src/cli/{platform → platform-lib}/__tests__/VercelAdapter.spec.ts +56 -85
- package/src/cli/{platform → platform-lib}/adapters/CloudflareAdapter.ts +519 -190
- package/src/cli/{platform → platform-lib}/adapters/PlatformAdapter.ts +62 -35
- package/src/cli/{platform → platform-lib}/adapters/VercelAdapter.ts +6 -10
- package/src/cli/{platform → platform-lib}/atoms/platformOptions.ts +34 -1
- package/src/cli/platform-lib/index.ts +67 -0
- package/src/cli/platform-lib/services/NamingService.ts +136 -0
- package/src/cli/{platform → platform-lib}/services/PlatformInspector.ts +60 -13
- package/src/cli/{platform → platform-lib}/services/PlatformOrchestrator.ts +54 -43
- package/src/cli/{platform → platform-lib}/services/WranglerApi.ts +4 -2
- package/src/command/__tests__/Runner.spec.ts +20 -0
- package/src/command/helpers/EnvUtils.ts +19 -3
- package/src/command/helpers/Runner.ts +12 -2
- package/src/command/providers/CliProvider.ts +34 -1
- package/src/{containers → container}/core/__tests__/$container.spec.ts +5 -5
- package/src/{containers → container}/core/index.ts +4 -4
- package/src/{containers → container}/core/index.workerd.ts +19 -3
- package/src/{containers → container}/core/primitives/$container.ts +1 -1
- package/src/{containers → container}/core/providers/CloudflareContainerProvider.ts +17 -19
- package/src/{containers → container}/core/providers/ContainerProvider.ts +16 -2
- package/src/{containers → container}/core/providers/MockContainerProvider.ts +1 -1
- package/src/core/Alepha.ts +49 -1
- package/src/core/__tests__/$env.spec.ts +42 -0
- package/src/core/__tests__/dump.spec.ts +47 -0
- package/src/email/cloudflare/__tests__/CloudflareEmailProvider.spec.ts +42 -10
- package/src/email/cloudflare/index.ts +14 -5
- package/src/email/cloudflare/providers/CloudflareEmailProvider.ts +54 -9
- package/src/logger/__tests__/Logger.spec.ts +55 -0
- package/src/logger/index.ts +13 -0
- package/src/logger/services/Logger.ts +31 -1
- package/src/mcp/__tests__/McpServerProvider.spec.ts +71 -0
- package/src/mcp/providers/McpServerProvider.ts +55 -0
- package/src/orm/__tests__/orm-showcase-tests.ts +27 -0
- package/src/orm/__tests__/orm-showcase.spec.ts +12 -0
- package/src/orm/core/interfaces/PgQuery.ts +4 -1
- package/src/orm/core/services/Repository.ts +27 -11
- package/src/react/auth/hooks/useAuth.ts +10 -5
- package/src/react/core/__tests__/useQuery.browser.spec.tsx +25 -0
- package/src/react/core/hooks/useAction.ts +14 -3
- package/src/react/core/hooks/useQuery.ts +24 -4
- package/src/react/form/__tests__/FormModel-submit-loading.spec.ts +71 -0
- package/src/react/form/__tests__/form-submitting-reactive.browser.spec.tsx +96 -0
- package/src/react/form/services/FormModel.ts +57 -39
- package/src/react/i18n/__tests__/I18nProvider.spec.ts +89 -0
- package/src/react/i18n/__tests__/locale-routing.spec.ts +107 -0
- package/src/react/i18n/components/Translate.tsx +47 -0
- package/src/react/i18n/index.ts +2 -0
- package/src/react/i18n/providers/I18nProvider.ts +171 -12
- package/src/react/intro/components/GettingStartedAdminSlide.tsx +2 -2
- package/src/react/router/__tests__/$page.spec.tsx +3 -2
- package/src/react/router/__tests__/RouterLocaleProvider.spec.ts +127 -0
- package/src/react/router/__tests__/page-can.spec.ts +18 -13
- package/src/react/router/hooks/useQueryParams.ts +114 -14
- package/src/react/router/index.browser.ts +4 -0
- package/src/react/router/index.shared.ts +1 -0
- package/src/react/router/index.ts +9 -0
- package/src/react/router/primitives/$page.ts +85 -4
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +18 -8
- package/src/react/router/providers/ReactPageProvider.ts +12 -1
- package/src/react/router/providers/ReactServerProvider.ts +96 -14
- package/src/react/router/providers/RootComponentsProvider.ts +13 -0
- package/src/react/router/providers/RouterLocaleProvider.ts +125 -0
- package/src/react/router/providers/__tests__/RootComponentsProvider.spec.ts +15 -0
- package/src/react/router/providers/__tests__/rootComponents.ssr.browser.spec.tsx +67 -0
- package/src/react/sitemap/__tests__/$sitemap.spec.ts +131 -0
- package/src/react/sitemap/index.browser.ts +21 -0
- package/src/react/sitemap/index.ts +25 -0
- package/src/react/sitemap/primitives/$sitemap.browser.ts +26 -0
- package/src/react/sitemap/primitives/$sitemap.ts +196 -0
- package/src/react/ui/services/SchemaControl.ts +3 -4
- package/src/server/auth/__tests__/appleClientSecret.spec.ts +34 -0
- package/src/server/auth/__tests__/authFederationClient.spec.ts +40 -0
- package/src/server/auth/__tests__/federationAssertion.spec.ts +146 -0
- package/src/server/auth/__tests__/federationRedirectReplay.spec.ts +44 -0
- package/src/server/auth/helpers/appleClientSecret.ts +24 -0
- package/src/server/auth/helpers/federationAssertion.ts +74 -0
- package/src/server/auth/helpers/jtiReplayGuard.ts +41 -0
- package/src/server/auth/helpers/safeRedirectPath.ts +19 -0
- package/src/server/auth/index.ts +4 -0
- package/src/server/auth/primitives/$authFederationBroker.ts +273 -0
- package/src/server/auth/primitives/$authFederationClient.ts +89 -0
- package/src/server/auth/providers/ServerAuthProvider.ts +18 -4
- package/src/server/cookies/__tests__/ServerCookiesProvider.spec.ts +70 -0
- package/src/server/cookies/providers/ServerCookiesProvider.ts +23 -3
- package/src/server/core/interfaces/ServerRequest.ts +8 -0
- package/src/server/core/primitives/$route.ts +27 -0
- package/src/server/core/providers/ServerMultipartProvider.ts +19 -0
- package/src/server/links/providers/LinkProvider.ts +10 -0
- package/dist/containers/core/index.d.ts.map +0 -1
- package/dist/containers/core/index.js.map +0 -1
- package/dist/containers/core/index.workerd.js.map +0 -1
- package/src/cli/core/tasks/BuildSitemapTask.ts +0 -130
- package/src/cli/core/templates/componentsJsonTs.ts +0 -39
- package/src/cli/core/templates/saasAdminLayoutTsx.ts +0 -77
- package/src/cli/core/templates/saasAdminPagesTsx.ts +0 -26
- package/src/cli/core/templates/saasAuthLayoutTsx.ts +0 -22
- package/src/cli/core/templates/saasAuthPagesTsx.ts +0 -62
- package/src/cli/core/templates/saasRealmProviderTs.ts +0 -52
- package/src/cli/platform/services/NamingService.ts +0 -54
- /package/dist/orm/core/{chunk-o8xxKEmq.js → chunk-B4FMCO8f.js} +0 -0
- /package/dist/react/testing/{chunk-6Ep1yQYe.js → chunk-BpyX8vjI.js} +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/GitHubSecretStore.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/PlatformCacheProvider.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/PlatformInspector.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/PlatformOrchestrator.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/SecretFilterService.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/detectResources.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/GitHubSecretStore.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/MemorySecretStore.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/PlatformCacheProvider.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/SecretStoreProvider.ts +0 -0
- /package/src/cli/{platform → platform-lib}/schemas/cloudflare.ts +0 -0
- /package/src/cli/{platform → platform-lib}/schemas/platform.ts +0 -0
- /package/src/cli/{platform → platform-lib}/schemas/vercel.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/CloudflareApi.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/SecretFilterService.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/VercelApi.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/VercelCli.ts +0 -0
- /package/src/{containers → container}/core/interfaces/ContainerOptions.ts +0 -0
- /package/src/{containers → container}/core/providers/NodeContainerProvider.ts +0 -0
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
import * as _$alepha from "alepha";
|
|
2
1
|
import { Alepha, AlephaError, Page, PageQuery, Primitive, SchemaValidator, Static, StaticEncode, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
|
|
3
|
-
import {
|
|
4
|
-
import * as _$alepha_bucket0 from "alepha/bucket";
|
|
5
|
-
import { CryptoProvider, IssuerPrimitive, IssuerPrimitiveOptions, UserAccount } from "alepha/security";
|
|
6
|
-
import * as _$alepha_server0 from "alepha/server";
|
|
7
|
-
import * as _$alepha_orm0 from "alepha/orm";
|
|
2
|
+
import { CryptoProvider, IssuerPrimitive, IssuerPrimitiveOptions, SecurityProvider, UserAccount } from "alepha/security";
|
|
8
3
|
import { Page as Page$1, Repository } from "alepha/orm";
|
|
9
|
-
import * as _$alepha_logger0 from "alepha/logger";
|
|
10
|
-
import * as _$alepha_server_links0 from "alepha/server/links";
|
|
11
|
-
import * as _$alepha_api_notifications0 from "alepha/api/notifications";
|
|
12
4
|
import { CaptchaProvider } from "alepha/captcha";
|
|
13
5
|
import { OAuth2Profile, ServerAuthProvider, WithLinkFn, WithLoginFn } from "alepha/server/auth";
|
|
14
6
|
import { VerificationController, VerificationService } from "alepha/api/verifications";
|
|
15
|
-
import * as _$alepha_cache0 from "alepha/cache";
|
|
16
7
|
import { CacheProvider } from "alepha/cache";
|
|
17
8
|
import { DateTime, DateTimeProvider } from "alepha/datetime";
|
|
18
|
-
import * as _$alepha_api_jobs0 from "alepha/api/jobs";
|
|
19
9
|
import { FileSystemProvider } from "alepha/system";
|
|
20
10
|
import { ParameterPrimitive } from "alepha/api/parameters";
|
|
21
|
-
import * as _$typebox from "typebox";
|
|
22
|
-
import * as _$drizzle_orm0 from "drizzle-orm";
|
|
23
11
|
import { BuildExtraConfigColumns, SQL, SQLWrapper } from "drizzle-orm";
|
|
24
|
-
import * as _$drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
25
12
|
import { LockConfig, LockStrength, PgColumn, PgColumnBuilderBase, PgDatabase, PgInsertValue, PgSelectBase, PgSequenceOptions, PgTableExtraConfigValue, PgTableWithColumns, PgTransaction, UpdateDeleteAction } from "drizzle-orm/pg-core";
|
|
26
13
|
import { PgTransactionConfig } from "drizzle-orm/pg-core/session";
|
|
27
14
|
import { CryptoProvider as CryptoProvider$1 } from "alepha/crypto";
|
|
@@ -48,128 +35,72 @@ type FieldRequirement = "none" | "optional" | "required";
|
|
|
48
35
|
* collision behavior.
|
|
49
36
|
*/
|
|
50
37
|
type UsernameFieldRequirement = FieldRequirement | "email";
|
|
51
|
-
declare const realmAuthSettingsAtom:
|
|
52
|
-
displayName:
|
|
53
|
-
description:
|
|
54
|
-
logoUrl:
|
|
55
|
-
registrationAllowed:
|
|
56
|
-
email:
|
|
57
|
-
username:
|
|
58
|
-
usernameRegExp:
|
|
59
|
-
usernameBlocklist:
|
|
60
|
-
phoneNumber:
|
|
61
|
-
verifyEmailRequired:
|
|
62
|
-
verifyPhoneRequired:
|
|
63
|
-
firstNameLastName:
|
|
64
|
-
resetPasswordAllowed:
|
|
65
|
-
captchaRequired:
|
|
66
|
-
adminEmails:
|
|
67
|
-
adminUsernames:
|
|
68
|
-
defaultRoles:
|
|
69
|
-
verifyEmailUrl:
|
|
70
|
-
passwordPolicy:
|
|
71
|
-
minLength:
|
|
72
|
-
requireUppercase:
|
|
73
|
-
requireLowercase:
|
|
74
|
-
requireNumbers:
|
|
75
|
-
requireSpecialCharacters:
|
|
38
|
+
declare const realmAuthSettingsAtom: import("alepha").Atom<import("typebox").TObject<{
|
|
39
|
+
displayName: import("typebox").TOptional<import("typebox").TString>;
|
|
40
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
41
|
+
logoUrl: import("typebox").TOptional<import("typebox").TString>;
|
|
42
|
+
registrationAllowed: import("typebox").TBoolean;
|
|
43
|
+
email: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
44
|
+
username: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">, import("typebox").TLiteral<"email">]>;
|
|
45
|
+
usernameRegExp: import("typebox").TString;
|
|
46
|
+
usernameBlocklist: import("typebox").TArray<import("typebox").TString>;
|
|
47
|
+
phoneNumber: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
48
|
+
verifyEmailRequired: import("typebox").TBoolean;
|
|
49
|
+
verifyPhoneRequired: import("typebox").TBoolean;
|
|
50
|
+
firstNameLastName: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
51
|
+
resetPasswordAllowed: import("typebox").TBoolean;
|
|
52
|
+
captchaRequired: import("typebox").TBoolean;
|
|
53
|
+
adminEmails: import("typebox").TArray<import("typebox").TString>;
|
|
54
|
+
adminUsernames: import("typebox").TArray<import("typebox").TString>;
|
|
55
|
+
defaultRoles: import("typebox").TArray<import("typebox").TString>;
|
|
56
|
+
verifyEmailUrl: import("typebox").TOptional<import("typebox").TString>;
|
|
57
|
+
passwordPolicy: import("typebox").TObject<{
|
|
58
|
+
minLength: import("typebox").TInteger;
|
|
59
|
+
requireUppercase: import("typebox").TBoolean;
|
|
60
|
+
requireLowercase: import("typebox").TBoolean;
|
|
61
|
+
requireNumbers: import("typebox").TBoolean;
|
|
62
|
+
requireSpecialCharacters: import("typebox").TBoolean;
|
|
76
63
|
}>;
|
|
77
|
-
loginRateLimit:
|
|
78
|
-
ipMaxAttempts:
|
|
79
|
-
accountMaxAttempts:
|
|
80
|
-
windowMs:
|
|
64
|
+
loginRateLimit: import("typebox").TObject<{
|
|
65
|
+
ipMaxAttempts: import("typebox").TInteger;
|
|
66
|
+
accountMaxAttempts: import("typebox").TInteger;
|
|
67
|
+
windowMs: import("typebox").TInteger;
|
|
81
68
|
}>;
|
|
82
|
-
registrationIpMaxAttempts:
|
|
83
|
-
refreshToken:
|
|
84
|
-
expirationIdle:
|
|
69
|
+
registrationIpMaxAttempts: import("typebox").TInteger;
|
|
70
|
+
refreshToken: import("typebox").TObject<{
|
|
71
|
+
expirationIdle: import("typebox").TOptional<import("typebox").TInteger>;
|
|
85
72
|
}>;
|
|
86
73
|
}>, "alepha.api.users.realmAuthSettings">;
|
|
87
74
|
type RealmAuthSettings = Static<typeof realmAuthSettingsAtom.schema>;
|
|
88
75
|
//#endregion
|
|
89
|
-
//#region ../../src/api/users/audits/
|
|
90
|
-
type AuditContext = Omit<CreateAudit, "type" | "action">;
|
|
76
|
+
//#region ../../src/api/users/audits/SessionAudits.d.ts
|
|
91
77
|
/**
|
|
92
|
-
*
|
|
78
|
+
* Authentication & session-security audit events.
|
|
93
79
|
*
|
|
94
|
-
*
|
|
80
|
+
* Holds two audit types:
|
|
81
|
+
* - `auth` — login / logout / token refresh / MFA.
|
|
82
|
+
* - `security` — rate limiting, session invalidation, and related guards.
|
|
95
83
|
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
84
|
+
* Failed events are logged with `success: false`; severity (`warning`) is
|
|
85
|
+
* derived centrally in `AuditService.create`. Register as a module variant
|
|
86
|
+
* and log via the exposed primitives:
|
|
87
|
+
* `sessionAudits(realm)?.auth.log("login", { success: false, … })`.
|
|
88
|
+
*/
|
|
89
|
+
declare class SessionAudits {
|
|
90
|
+
readonly auth: import("alepha/api/audits").AuditPrimitive;
|
|
91
|
+
readonly security: import("alepha/api/audits").AuditPrimitive;
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region ../../src/api/users/audits/UserAudits.d.ts
|
|
95
|
+
/**
|
|
96
|
+
* User-management audit events.
|
|
97
|
+
*
|
|
98
|
+
* Holds the `user` audit type. Mirrors the `$notification`/`$job` holder
|
|
99
|
+
* pattern (see {@link UserNotifications}) — register as a module variant and
|
|
100
|
+
* log via the exposed primitive: `userAudits(realm)?.user.log("create", …)`.
|
|
98
101
|
*/
|
|
99
102
|
declare class UserAudits {
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Record a user-related audit event.
|
|
103
|
-
*/
|
|
104
|
-
recordUser(action: "create" | "update" | "delete" | "role_change" | "enable" | "disable", context: AuditContext): Promise<{
|
|
105
|
-
description?: string | undefined;
|
|
106
|
-
userId?: string | undefined;
|
|
107
|
-
userRealm?: string | undefined;
|
|
108
|
-
userEmail?: string | undefined;
|
|
109
|
-
resourceType?: string | undefined;
|
|
110
|
-
resourceId?: string | undefined;
|
|
111
|
-
metadata?: Record<string, any> | undefined;
|
|
112
|
-
ipAddress?: string | undefined;
|
|
113
|
-
userAgent?: string | undefined;
|
|
114
|
-
sessionId?: string | undefined;
|
|
115
|
-
requestId?: string | undefined;
|
|
116
|
-
errorMessage?: string | undefined;
|
|
117
|
-
type: string;
|
|
118
|
-
action: string;
|
|
119
|
-
severity: "info" | "warning" | "critical";
|
|
120
|
-
success: boolean;
|
|
121
|
-
id: string;
|
|
122
|
-
createdAt: string;
|
|
123
|
-
organizationId: string;
|
|
124
|
-
}>;
|
|
125
|
-
/**
|
|
126
|
-
* Record an authentication-related audit event.
|
|
127
|
-
*/
|
|
128
|
-
recordAuth(action: "login" | "logout" | "login_failed" | "token_refresh", context: AuditContext): Promise<{
|
|
129
|
-
description?: string | undefined;
|
|
130
|
-
userId?: string | undefined;
|
|
131
|
-
userRealm?: string | undefined;
|
|
132
|
-
userEmail?: string | undefined;
|
|
133
|
-
resourceType?: string | undefined;
|
|
134
|
-
resourceId?: string | undefined;
|
|
135
|
-
metadata?: Record<string, any> | undefined;
|
|
136
|
-
ipAddress?: string | undefined;
|
|
137
|
-
userAgent?: string | undefined;
|
|
138
|
-
sessionId?: string | undefined;
|
|
139
|
-
requestId?: string | undefined;
|
|
140
|
-
errorMessage?: string | undefined;
|
|
141
|
-
type: string;
|
|
142
|
-
action: string;
|
|
143
|
-
severity: "info" | "warning" | "critical";
|
|
144
|
-
success: boolean;
|
|
145
|
-
id: string;
|
|
146
|
-
createdAt: string;
|
|
147
|
-
organizationId: string;
|
|
148
|
-
}>;
|
|
149
|
-
/**
|
|
150
|
-
* Record a generic audit event.
|
|
151
|
-
*/
|
|
152
|
-
record(category: string, action: string, context: AuditContext): Promise<{
|
|
153
|
-
description?: string | undefined;
|
|
154
|
-
userId?: string | undefined;
|
|
155
|
-
userRealm?: string | undefined;
|
|
156
|
-
userEmail?: string | undefined;
|
|
157
|
-
resourceType?: string | undefined;
|
|
158
|
-
resourceId?: string | undefined;
|
|
159
|
-
metadata?: Record<string, any> | undefined;
|
|
160
|
-
ipAddress?: string | undefined;
|
|
161
|
-
userAgent?: string | undefined;
|
|
162
|
-
sessionId?: string | undefined;
|
|
163
|
-
requestId?: string | undefined;
|
|
164
|
-
errorMessage?: string | undefined;
|
|
165
|
-
type: string;
|
|
166
|
-
action: string;
|
|
167
|
-
severity: "info" | "warning" | "critical";
|
|
168
|
-
success: boolean;
|
|
169
|
-
id: string;
|
|
170
|
-
createdAt: string;
|
|
171
|
-
organizationId: string;
|
|
172
|
-
}>;
|
|
103
|
+
readonly user: import("alepha/api/audits").AuditPrimitive;
|
|
173
104
|
}
|
|
174
105
|
//#endregion
|
|
175
106
|
//#region ../../src/api/users/buckets/UserBuckets.d.ts
|
|
@@ -186,7 +117,7 @@ declare class UserBuckets {
|
|
|
186
117
|
/**
|
|
187
118
|
* Bucket for user avatar storage.
|
|
188
119
|
*/
|
|
189
|
-
readonly avatars:
|
|
120
|
+
readonly avatars: import("alepha/bucket").BucketPrimitive;
|
|
190
121
|
}
|
|
191
122
|
//#endregion
|
|
192
123
|
//#region ../../src/orm/core/schemas/insertSchema.d.ts
|
|
@@ -944,7 +875,7 @@ type PgRelation<Base extends TObject> = {
|
|
|
944
875
|
schema: TObject;
|
|
945
876
|
name: string;
|
|
946
877
|
};
|
|
947
|
-
on: SQLWrapper | [keyof Static<Base>, {
|
|
878
|
+
on: SQLWrapper | readonly [keyof Static<Base>, {
|
|
948
879
|
name: string;
|
|
949
880
|
}];
|
|
950
881
|
with?: PgRelationMap<TObject>;
|
|
@@ -1154,13 +1085,13 @@ declare class DbCacheProvider {
|
|
|
1154
1085
|
* the engine behind that call.
|
|
1155
1086
|
*/
|
|
1156
1087
|
declare class SequenceProvider {
|
|
1157
|
-
protected readonly repository: Repository$1<
|
|
1158
|
-
id: PgAttr<PgAttr<
|
|
1159
|
-
createdAt: PgAttr<PgAttr<
|
|
1160
|
-
updatedAt: PgAttr<PgAttr<
|
|
1161
|
-
name:
|
|
1162
|
-
scope:
|
|
1163
|
-
value:
|
|
1088
|
+
protected readonly repository: Repository$1<import("typebox").TObject<{
|
|
1089
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1090
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1091
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
1092
|
+
name: import("typebox").TString;
|
|
1093
|
+
scope: import("typebox").TString;
|
|
1094
|
+
value: import("typebox").TInteger;
|
|
1164
1095
|
}>>;
|
|
1165
1096
|
protected readonly crypto: CryptoProvider$1;
|
|
1166
1097
|
/**
|
|
@@ -1298,7 +1229,7 @@ declare abstract class ModelBuilder {
|
|
|
1298
1229
|
//#endregion
|
|
1299
1230
|
//#region ../../src/orm/core/providers/DrizzleKitProvider.d.ts
|
|
1300
1231
|
declare class DrizzleKitProvider {
|
|
1301
|
-
protected readonly log:
|
|
1232
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
1302
1233
|
protected readonly dateTime: DateTimeProvider;
|
|
1303
1234
|
protected readonly alepha: Alepha;
|
|
1304
1235
|
/**
|
|
@@ -1390,7 +1321,7 @@ type SQLLike = SQLWrapper | string;
|
|
|
1390
1321
|
declare abstract class DatabaseProvider {
|
|
1391
1322
|
protected readonly alepha: Alepha;
|
|
1392
1323
|
protected readonly dateTime: DateTimeProvider;
|
|
1393
|
-
protected readonly log:
|
|
1324
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
1394
1325
|
protected abstract readonly builder: ModelBuilder;
|
|
1395
1326
|
protected readonly kit: DrizzleKitProvider;
|
|
1396
1327
|
abstract readonly db: PgDatabase<any>;
|
|
@@ -1547,7 +1478,7 @@ declare class QueryManager {
|
|
|
1547
1478
|
createPagination<T>(entities: T[], limit?: number, offset?: number, sort?: Array<{
|
|
1548
1479
|
column: string;
|
|
1549
1480
|
direction: "asc" | "desc";
|
|
1550
|
-
}>):
|
|
1481
|
+
}>): import("alepha").Page<T>;
|
|
1551
1482
|
}
|
|
1552
1483
|
interface PgJoin {
|
|
1553
1484
|
table: string;
|
|
@@ -1582,7 +1513,7 @@ declare class PgRelationManager {
|
|
|
1582
1513
|
declare abstract class Repository$1<T extends TObject> {
|
|
1583
1514
|
readonly entity: EntityPrimitive<T>;
|
|
1584
1515
|
readonly provider: DatabaseProvider;
|
|
1585
|
-
protected readonly log:
|
|
1516
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
1586
1517
|
protected readonly relationManager: PgRelationManager;
|
|
1587
1518
|
protected readonly queryManager: QueryManager;
|
|
1588
1519
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
@@ -1656,15 +1587,15 @@ declare abstract class Repository$1<T extends TObject> {
|
|
|
1656
1587
|
/**
|
|
1657
1588
|
* Start a SELECT query on the table.
|
|
1658
1589
|
*/
|
|
1659
|
-
protected rawSelect(opts?: StatementOptions):
|
|
1590
|
+
protected rawSelect(opts?: StatementOptions): import("drizzle-orm/pg-core").PgSelectBase<string, Record<string, PgColumn<import("drizzle-orm").ColumnBaseConfig<import("drizzle-orm").ColumnDataType, string>, {}, {}>>, "single", Record<string, "not-null">, false, never, {
|
|
1660
1591
|
[x: string]: unknown;
|
|
1661
1592
|
}[], {
|
|
1662
|
-
[x: string]: PgColumn<
|
|
1593
|
+
[x: string]: PgColumn<import("drizzle-orm").ColumnBaseConfig<import("drizzle-orm").ColumnDataType, string>, {}, {}>;
|
|
1663
1594
|
}>;
|
|
1664
1595
|
/**
|
|
1665
1596
|
* Start a SELECT DISTINCT query on the table.
|
|
1666
1597
|
*/
|
|
1667
|
-
protected rawSelectDistinct(opts?: StatementOptions, columns?: (keyof Static<T>)[]):
|
|
1598
|
+
protected rawSelectDistinct(opts?: StatementOptions, columns?: (keyof Static<T>)[]): import("drizzle-orm/pg-core").PgSelectBase<string, Record<string, any>, "partial", Record<string, "not-null">, false, never, {
|
|
1668
1599
|
[x: string]: any;
|
|
1669
1600
|
}[], {
|
|
1670
1601
|
[x: string]: any;
|
|
@@ -1672,15 +1603,15 @@ declare abstract class Repository$1<T extends TObject> {
|
|
|
1672
1603
|
/**
|
|
1673
1604
|
* Start an INSERT query on the table.
|
|
1674
1605
|
*/
|
|
1675
|
-
protected rawInsert(opts?: StatementOptions):
|
|
1606
|
+
protected rawInsert(opts?: StatementOptions): import("drizzle-orm/pg-core").PgInsertBuilder<PgTableWithColumns<SchemaToTableConfig<T>>, any, false>;
|
|
1676
1607
|
/**
|
|
1677
1608
|
* Start an UPDATE query on the table.
|
|
1678
1609
|
*/
|
|
1679
|
-
protected rawUpdate(opts?: StatementOptions):
|
|
1610
|
+
protected rawUpdate(opts?: StatementOptions): import("drizzle-orm/pg-core").PgUpdateBuilder<PgTableWithColumns<SchemaToTableConfig<T>>, any>;
|
|
1680
1611
|
/**
|
|
1681
1612
|
* Start a DELETE query on the table.
|
|
1682
1613
|
*/
|
|
1683
|
-
protected rawDelete(opts?: StatementOptions):
|
|
1614
|
+
protected rawDelete(opts?: StatementOptions): import("drizzle-orm/pg-core").PgDeleteBase<PgTableWithColumns<SchemaToTableConfig<T>>, any, undefined, undefined, false, never>;
|
|
1684
1615
|
/**
|
|
1685
1616
|
* Create a Drizzle `select` query based on a JSON query object.
|
|
1686
1617
|
*
|
|
@@ -1709,12 +1640,30 @@ declare abstract class Repository$1<T extends TObject> {
|
|
|
1709
1640
|
}): Promise<Page<PgStatic<T, R>>>;
|
|
1710
1641
|
/**
|
|
1711
1642
|
* Find an entity by ID. Returns `undefined` if not found.
|
|
1643
|
+
*
|
|
1644
|
+
* Pass `with` to eager-load relations on the result — same `with` map
|
|
1645
|
+
* shape as `findOne` / `paginate`. Without `with`, returns the plain
|
|
1646
|
+
* row.
|
|
1647
|
+
*
|
|
1648
|
+
* @example
|
|
1649
|
+
* ```ts
|
|
1650
|
+
* const session = await sessions.findById(id, {
|
|
1651
|
+
* with: { user: { join: users, on: ["userId", users.cols.id] as const } },
|
|
1652
|
+
* });
|
|
1653
|
+
* session?.user?.email;
|
|
1654
|
+
* ```
|
|
1712
1655
|
*/
|
|
1713
|
-
findById(id: string | number, opts?: StatementOptions
|
|
1656
|
+
findById<R extends PgRelationMap<T>>(id: string | number, opts?: StatementOptions & {
|
|
1657
|
+
with?: R;
|
|
1658
|
+
}): Promise<PgStatic<T, R> | undefined>;
|
|
1714
1659
|
/**
|
|
1715
1660
|
* Find an entity by ID. Throws `DbEntityNotFoundError` if not found.
|
|
1661
|
+
*
|
|
1662
|
+
* Pass `with` to eager-load relations — see {@link findById}.
|
|
1716
1663
|
*/
|
|
1717
|
-
getById(id: string | number, opts?: StatementOptions
|
|
1664
|
+
getById<R extends PgRelationMap<T>>(id: string | number, opts?: StatementOptions & {
|
|
1665
|
+
with?: R;
|
|
1666
|
+
}): Promise<PgStatic<T, R>>;
|
|
1718
1667
|
/**
|
|
1719
1668
|
* Helper to create a type-safe query object.
|
|
1720
1669
|
*/
|
|
@@ -1915,7 +1864,7 @@ declare abstract class Repository$1<T extends TObject> {
|
|
|
1915
1864
|
*/
|
|
1916
1865
|
protected getPrimaryKey(schema: TObject): {
|
|
1917
1866
|
key: string;
|
|
1918
|
-
col: PgColumn<
|
|
1867
|
+
col: PgColumn<import("drizzle-orm").ColumnBaseConfig<import("drizzle-orm").ColumnDataType, string>, {}, {}>;
|
|
1919
1868
|
type: TSchema;
|
|
1920
1869
|
};
|
|
1921
1870
|
}
|
|
@@ -1984,8 +1933,8 @@ type WithSQL<T> = { [P in keyof T]?: T[P] | SQL };
|
|
|
1984
1933
|
* - `d1://BINDING_NAME` — Cloudflare D1
|
|
1985
1934
|
* - `hyperdrive://BINDING_NAME` — Cloudflare Hyperdrive
|
|
1986
1935
|
*/
|
|
1987
|
-
declare const databaseEnvSchema:
|
|
1988
|
-
DATABASE_URL:
|
|
1936
|
+
declare const databaseEnvSchema: import("typebox").TObject<{
|
|
1937
|
+
DATABASE_URL: import("typebox").TOptional<import("typebox").TString>;
|
|
1989
1938
|
/**
|
|
1990
1939
|
* Enable or disable push-based schema synchronization (drizzle-kit push).
|
|
1991
1940
|
*
|
|
@@ -1993,34 +1942,34 @@ declare const databaseEnvSchema: _$typebox.TObject<{
|
|
|
1993
1942
|
* Set to `false` in development to skip automatic schema sync
|
|
1994
1943
|
* (e.g. when managing migrations manually).
|
|
1995
1944
|
*/
|
|
1996
|
-
DATABASE_SYNC:
|
|
1945
|
+
DATABASE_SYNC: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
1997
1946
|
}>;
|
|
1998
1947
|
declare module "alepha" {
|
|
1999
1948
|
interface Env extends Partial<Static<typeof databaseEnvSchema>> {}
|
|
2000
1949
|
} //# sourceMappingURL=databaseEnvSchema.d.ts.map
|
|
2001
1950
|
//#endregion
|
|
2002
1951
|
//#region ../../src/api/users/entities/identities.d.ts
|
|
2003
|
-
declare const identities:
|
|
2004
|
-
id:
|
|
2005
|
-
version:
|
|
2006
|
-
createdAt:
|
|
2007
|
-
updatedAt:
|
|
2008
|
-
userId:
|
|
2009
|
-
password:
|
|
2010
|
-
provider:
|
|
2011
|
-
providerUserId:
|
|
2012
|
-
providerData:
|
|
1952
|
+
declare const identities: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
|
|
1953
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
1954
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
1955
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
1956
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
1957
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
1958
|
+
password: import("typebox").TOptional<import("typebox").TString>;
|
|
1959
|
+
provider: import("typebox").TString;
|
|
1960
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
1961
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2013
1962
|
}>>;
|
|
2014
1963
|
type IdentityEntity = Static<typeof identities.schema>;
|
|
2015
1964
|
//#endregion
|
|
2016
1965
|
//#region ../../src/api/users/entities/sessions.d.ts
|
|
2017
|
-
declare const sessions:
|
|
2018
|
-
id:
|
|
2019
|
-
version:
|
|
2020
|
-
createdAt:
|
|
2021
|
-
updatedAt:
|
|
2022
|
-
refreshToken:
|
|
2023
|
-
userId:
|
|
1966
|
+
declare const sessions: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
|
|
1967
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
1968
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
1969
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
1970
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
1971
|
+
refreshToken: import("typebox").TString;
|
|
1972
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
2024
1973
|
/**
|
|
2025
1974
|
* OAuth client this session was minted for, when it was created via the
|
|
2026
1975
|
* OAuth 2.1 authorization flow — the `client_id` of an `oauth_clients`
|
|
@@ -2028,41 +1977,48 @@ declare const sessions: _$alepha_orm0.EntityPrimitive<_$typebox.TObject<{
|
|
|
2028
1977
|
* key: `sessions` is a core entity and must not depend on the optional
|
|
2029
1978
|
* OAuth module's table; the join to `oauth_clients` is done at query time.
|
|
2030
1979
|
*/
|
|
2031
|
-
clientId:
|
|
2032
|
-
expiresAt:
|
|
1980
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
1981
|
+
expiresAt: import("typebox").TString;
|
|
2033
1982
|
/**
|
|
2034
1983
|
* Last time the session was used to refresh an access token.
|
|
2035
1984
|
* Used by realm `refreshToken.expirationIdle` to invalidate idle sessions.
|
|
2036
1985
|
* `null` on existing rows pre-migration — falls back to `createdAt`.
|
|
2037
1986
|
*/
|
|
2038
|
-
lastUsedAt:
|
|
2039
|
-
ip:
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
1987
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
1988
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
1989
|
+
/**
|
|
1990
|
+
* ISO 3166-1 alpha-2 country code derived from the request geo headers
|
|
1991
|
+
* (`cf-ipcountry` on Cloudflare, CDN equivalents elsewhere) at login time.
|
|
1992
|
+
* `null` on pre-migration rows and where geo isn't available.
|
|
1993
|
+
*/
|
|
1994
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
1995
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
1996
|
+
os: import("typebox").TString;
|
|
1997
|
+
browser: import("typebox").TString;
|
|
1998
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2044
1999
|
}>>;
|
|
2045
2000
|
}>>;
|
|
2046
2001
|
type SessionEntity = Static<typeof sessions.schema>;
|
|
2047
2002
|
//#endregion
|
|
2048
2003
|
//#region ../../src/api/users/entities/users.d.ts
|
|
2049
2004
|
declare const DEFAULT_USER_REALM_NAME = "default";
|
|
2050
|
-
declare const users:
|
|
2051
|
-
id:
|
|
2052
|
-
version:
|
|
2053
|
-
createdAt:
|
|
2054
|
-
updatedAt:
|
|
2055
|
-
realm:
|
|
2056
|
-
username:
|
|
2057
|
-
email:
|
|
2058
|
-
phoneNumber:
|
|
2059
|
-
roles:
|
|
2060
|
-
firstName:
|
|
2061
|
-
lastName:
|
|
2062
|
-
picture:
|
|
2063
|
-
enabled:
|
|
2064
|
-
emailVerified:
|
|
2065
|
-
|
|
2005
|
+
declare const users: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
|
|
2006
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2007
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2008
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2009
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2010
|
+
realm: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2011
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2012
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2013
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2014
|
+
roles: import("alepha/orm").PgAttr<import("typebox").TArray<import("typebox").TString>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2015
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2016
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2017
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2018
|
+
enabled: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2019
|
+
emailVerified: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2020
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2021
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
2066
2022
|
}>>;
|
|
2067
2023
|
type UserEntity = Static<typeof users.schema>;
|
|
2068
2024
|
//#endregion
|
|
@@ -2175,6 +2131,19 @@ interface RealmOptions {
|
|
|
2175
2131
|
facebook?: true;
|
|
2176
2132
|
microsoft?: true;
|
|
2177
2133
|
franceconnect?: true;
|
|
2134
|
+
/**
|
|
2135
|
+
* Federated social login via a central broker (the platform).
|
|
2136
|
+
*
|
|
2137
|
+
* The broker performs the real OIDC dance with Google/Apple on a single
|
|
2138
|
+
* shared OAuth client and hands this realm a short-lived, asymmetric-signed
|
|
2139
|
+
* assertion. This realm verifies it (broker `publicKey`), links a local
|
|
2140
|
+
* user, and establishes a session — no per-tenant OAuth client required.
|
|
2141
|
+
*/
|
|
2142
|
+
federated?: {
|
|
2143
|
+
/** Broker origin (assertion `iss`), e.g. https://alepha.club. */brokerUrl: string; /** Broker EdDSA public key (SPKI PEM) used to verify assertions. */
|
|
2144
|
+
publicKey: string; /** Providers to surface as broker login buttons. */
|
|
2145
|
+
providers: Array<"google" | "apple">;
|
|
2146
|
+
};
|
|
2178
2147
|
};
|
|
2179
2148
|
/**
|
|
2180
2149
|
* Enable or disable realm features.
|
|
@@ -2195,55 +2164,66 @@ interface Realm {
|
|
|
2195
2164
|
repositories: RealmRepositories;
|
|
2196
2165
|
settings: RealmAuthSettings;
|
|
2197
2166
|
features: RealmFeatures;
|
|
2167
|
+
/**
|
|
2168
|
+
* Federated (broker) login config surfaced to the login UI, when the realm
|
|
2169
|
+
* declares `identities.federated`. The broker public key is intentionally
|
|
2170
|
+
* omitted — only the broker URL + provider list are client-facing.
|
|
2171
|
+
*/
|
|
2172
|
+
federated?: {
|
|
2173
|
+
brokerUrl: string;
|
|
2174
|
+
providers: Array<"google" | "apple">;
|
|
2175
|
+
};
|
|
2198
2176
|
settingsParameter?: ParameterPrimitive<typeof realmAuthSettingsAtom.schema>;
|
|
2199
2177
|
getSettings(): Promise<RealmAuthSettings>;
|
|
2200
2178
|
}
|
|
2201
2179
|
declare class RealmProvider {
|
|
2202
2180
|
protected readonly alepha: Alepha;
|
|
2203
|
-
protected readonly defaultIdentities: Repository<
|
|
2204
|
-
id:
|
|
2205
|
-
version:
|
|
2206
|
-
createdAt:
|
|
2207
|
-
updatedAt:
|
|
2208
|
-
userId:
|
|
2209
|
-
password:
|
|
2210
|
-
provider:
|
|
2211
|
-
providerUserId:
|
|
2212
|
-
providerData:
|
|
2181
|
+
protected readonly defaultIdentities: Repository<import("typebox").TObject<{
|
|
2182
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2183
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2184
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2185
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2186
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
2187
|
+
password: import("typebox").TOptional<import("typebox").TString>;
|
|
2188
|
+
provider: import("typebox").TString;
|
|
2189
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
2190
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2213
2191
|
}>>;
|
|
2214
|
-
protected readonly defaultSessions: Repository<
|
|
2215
|
-
id:
|
|
2216
|
-
version:
|
|
2217
|
-
createdAt:
|
|
2218
|
-
updatedAt:
|
|
2219
|
-
refreshToken:
|
|
2220
|
-
userId:
|
|
2221
|
-
clientId:
|
|
2222
|
-
expiresAt:
|
|
2223
|
-
lastUsedAt:
|
|
2224
|
-
ip:
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2192
|
+
protected readonly defaultSessions: Repository<import("typebox").TObject<{
|
|
2193
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2194
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2195
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2196
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2197
|
+
refreshToken: import("typebox").TString;
|
|
2198
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
2199
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
2200
|
+
expiresAt: import("typebox").TString;
|
|
2201
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2202
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
2203
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
2204
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
2205
|
+
os: import("typebox").TString;
|
|
2206
|
+
browser: import("typebox").TString;
|
|
2207
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2229
2208
|
}>>;
|
|
2230
2209
|
}>>;
|
|
2231
|
-
protected readonly defaultUsers: Repository<
|
|
2232
|
-
id:
|
|
2233
|
-
version:
|
|
2234
|
-
createdAt:
|
|
2235
|
-
updatedAt:
|
|
2236
|
-
realm:
|
|
2237
|
-
username:
|
|
2238
|
-
email:
|
|
2239
|
-
phoneNumber:
|
|
2240
|
-
roles:
|
|
2241
|
-
firstName:
|
|
2242
|
-
lastName:
|
|
2243
|
-
picture:
|
|
2244
|
-
enabled:
|
|
2245
|
-
emailVerified:
|
|
2246
|
-
|
|
2210
|
+
protected readonly defaultUsers: Repository<import("typebox").TObject<{
|
|
2211
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2212
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2213
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2214
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2215
|
+
realm: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2216
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2217
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2218
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2219
|
+
roles: import("alepha/orm").PgAttr<import("typebox").TArray<import("typebox").TString>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2220
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2221
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2222
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2223
|
+
enabled: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2224
|
+
emailVerified: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2225
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2226
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
2247
2227
|
}>>;
|
|
2248
2228
|
protected realms: Map<string, Realm>;
|
|
2249
2229
|
register(realmName: string, realmOptions?: RealmOptions): Realm;
|
|
@@ -2257,31 +2237,31 @@ declare class RealmProvider {
|
|
|
2257
2237
|
}
|
|
2258
2238
|
//#endregion
|
|
2259
2239
|
//#region ../../src/api/users/schemas/identityQuerySchema.d.ts
|
|
2260
|
-
declare const identityQuerySchema:
|
|
2261
|
-
page:
|
|
2262
|
-
size:
|
|
2263
|
-
sort:
|
|
2264
|
-
userId:
|
|
2265
|
-
provider:
|
|
2240
|
+
declare const identityQuerySchema: import("typebox").TObject<{
|
|
2241
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2242
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2243
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2244
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
2245
|
+
provider: import("typebox").TOptional<import("typebox").TString>;
|
|
2266
2246
|
}>;
|
|
2267
2247
|
type IdentityQuery = Static<typeof identityQuerySchema>;
|
|
2268
2248
|
//#endregion
|
|
2269
2249
|
//#region ../../src/api/users/services/IdentityService.d.ts
|
|
2270
2250
|
declare class IdentityService {
|
|
2271
2251
|
protected readonly alepha: Alepha;
|
|
2272
|
-
protected readonly log:
|
|
2252
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
2273
2253
|
protected readonly realmProvider: RealmProvider;
|
|
2274
2254
|
protected userAudits(realmName?: string): UserAudits | undefined;
|
|
2275
|
-
identities(userRealmName?: string):
|
|
2276
|
-
id:
|
|
2277
|
-
version:
|
|
2278
|
-
createdAt:
|
|
2279
|
-
updatedAt:
|
|
2280
|
-
userId:
|
|
2281
|
-
password:
|
|
2282
|
-
provider:
|
|
2283
|
-
providerUserId:
|
|
2284
|
-
providerData:
|
|
2255
|
+
identities(userRealmName?: string): import("alepha/orm").Repository<import("typebox").TObject<{
|
|
2256
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2257
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2258
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2259
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2260
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
2261
|
+
password: import("typebox").TOptional<import("typebox").TString>;
|
|
2262
|
+
provider: import("typebox").TString;
|
|
2263
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
2264
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2285
2265
|
}>>;
|
|
2286
2266
|
/**
|
|
2287
2267
|
* Find identities with pagination and filtering.
|
|
@@ -2305,93 +2285,94 @@ declare class AdminIdentityController {
|
|
|
2305
2285
|
/**
|
|
2306
2286
|
* Find identities with pagination and filtering.
|
|
2307
2287
|
*/
|
|
2308
|
-
readonly findIdentities:
|
|
2309
|
-
query:
|
|
2310
|
-
page:
|
|
2311
|
-
size:
|
|
2312
|
-
sort:
|
|
2313
|
-
userId:
|
|
2314
|
-
provider:
|
|
2315
|
-
userRealmName:
|
|
2316
|
-
}>;
|
|
2317
|
-
response:
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
createdAt: PgAttr<PgAttr<
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
providerUserId:
|
|
2325
|
-
providerData:
|
|
2288
|
+
readonly findIdentities: import("alepha/server").ActionPrimitiveFn<{
|
|
2289
|
+
query: import("typebox").TObject<{
|
|
2290
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2291
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2292
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2293
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
2294
|
+
provider: import("typebox").TOptional<import("typebox").TString>;
|
|
2295
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2296
|
+
}>;
|
|
2297
|
+
response: import("alepha").TPage<import("typebox").TObject<{
|
|
2298
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2299
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2300
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2301
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2302
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
2303
|
+
provider: import("typebox").TString;
|
|
2304
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
2305
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2326
2306
|
}>>;
|
|
2327
2307
|
}>;
|
|
2328
2308
|
/**
|
|
2329
2309
|
* Get an identity by ID.
|
|
2330
2310
|
*/
|
|
2331
|
-
readonly getIdentity:
|
|
2332
|
-
params:
|
|
2333
|
-
id:
|
|
2311
|
+
readonly getIdentity: import("alepha/server").ActionPrimitiveFn<{
|
|
2312
|
+
params: import("typebox").TObject<{
|
|
2313
|
+
id: import("typebox").TString;
|
|
2334
2314
|
}>;
|
|
2335
|
-
query:
|
|
2336
|
-
userRealmName:
|
|
2315
|
+
query: import("typebox").TObject<{
|
|
2316
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2337
2317
|
}>;
|
|
2338
|
-
response:
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
createdAt: PgAttr<PgAttr<
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
providerUserId:
|
|
2346
|
-
providerData:
|
|
2318
|
+
response: import("typebox").TObject<{
|
|
2319
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2320
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2321
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2322
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2323
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
2324
|
+
provider: import("typebox").TString;
|
|
2325
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
2326
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2347
2327
|
}>;
|
|
2348
2328
|
}>;
|
|
2349
2329
|
/**
|
|
2350
2330
|
* Delete an identity.
|
|
2351
2331
|
*/
|
|
2352
|
-
readonly deleteIdentity:
|
|
2353
|
-
params:
|
|
2354
|
-
id:
|
|
2332
|
+
readonly deleteIdentity: import("alepha/server").ActionPrimitiveFn<{
|
|
2333
|
+
params: import("typebox").TObject<{
|
|
2334
|
+
id: import("typebox").TString;
|
|
2355
2335
|
}>;
|
|
2356
|
-
query:
|
|
2357
|
-
userRealmName:
|
|
2336
|
+
query: import("typebox").TObject<{
|
|
2337
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2358
2338
|
}>;
|
|
2359
|
-
response:
|
|
2360
|
-
ok:
|
|
2361
|
-
id:
|
|
2362
|
-
count:
|
|
2339
|
+
response: import("typebox").TObject<{
|
|
2340
|
+
ok: import("typebox").TBoolean;
|
|
2341
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
2342
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
2363
2343
|
}>;
|
|
2364
2344
|
}>;
|
|
2365
2345
|
}
|
|
2366
2346
|
//#endregion
|
|
2367
2347
|
//#region ../../src/api/users/schemas/sessionQuerySchema.d.ts
|
|
2368
|
-
declare const sessionQuerySchema:
|
|
2369
|
-
page:
|
|
2370
|
-
size:
|
|
2371
|
-
sort:
|
|
2372
|
-
userId:
|
|
2348
|
+
declare const sessionQuerySchema: import("typebox").TObject<{
|
|
2349
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2350
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2351
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2352
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
2373
2353
|
}>;
|
|
2374
2354
|
type SessionQuery = Static<typeof sessionQuerySchema>;
|
|
2375
2355
|
//#endregion
|
|
2376
2356
|
//#region ../../src/api/users/services/SessionCrudService.d.ts
|
|
2377
2357
|
declare class SessionCrudService {
|
|
2378
|
-
protected readonly log:
|
|
2358
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
2379
2359
|
protected readonly realmProvider: RealmProvider;
|
|
2380
|
-
sessions(userRealmName?: string):
|
|
2381
|
-
id:
|
|
2382
|
-
version:
|
|
2383
|
-
createdAt:
|
|
2384
|
-
updatedAt:
|
|
2385
|
-
refreshToken:
|
|
2386
|
-
userId:
|
|
2387
|
-
clientId:
|
|
2388
|
-
expiresAt:
|
|
2389
|
-
lastUsedAt:
|
|
2390
|
-
ip:
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2360
|
+
sessions(userRealmName?: string): import("alepha/orm").Repository<import("typebox").TObject<{
|
|
2361
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2362
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2363
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2364
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2365
|
+
refreshToken: import("typebox").TString;
|
|
2366
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
2367
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
2368
|
+
expiresAt: import("typebox").TString;
|
|
2369
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2370
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
2371
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
2372
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
2373
|
+
os: import("typebox").TString;
|
|
2374
|
+
browser: import("typebox").TString;
|
|
2375
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2395
2376
|
}>>;
|
|
2396
2377
|
}>>;
|
|
2397
2378
|
/**
|
|
@@ -2420,190 +2401,213 @@ declare class AdminSessionController {
|
|
|
2420
2401
|
/**
|
|
2421
2402
|
* Find sessions with pagination and filtering.
|
|
2422
2403
|
*/
|
|
2423
|
-
readonly findSessions:
|
|
2424
|
-
query:
|
|
2425
|
-
page:
|
|
2426
|
-
size:
|
|
2427
|
-
sort:
|
|
2428
|
-
userId:
|
|
2429
|
-
userRealmName:
|
|
2430
|
-
}>;
|
|
2431
|
-
response:
|
|
2432
|
-
id:
|
|
2433
|
-
version:
|
|
2434
|
-
createdAt:
|
|
2435
|
-
updatedAt:
|
|
2436
|
-
refreshToken:
|
|
2437
|
-
userId:
|
|
2438
|
-
expiresAt:
|
|
2439
|
-
ip:
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2404
|
+
readonly findSessions: import("alepha/server").ActionPrimitiveFn<{
|
|
2405
|
+
query: import("typebox").TObject<{
|
|
2406
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2407
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2408
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2409
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
2410
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2411
|
+
}>;
|
|
2412
|
+
response: import("alepha").TPage<import("typebox").TObject<{
|
|
2413
|
+
id: import("typebox").TString;
|
|
2414
|
+
version: import("typebox").TNumber;
|
|
2415
|
+
createdAt: import("typebox").TString;
|
|
2416
|
+
updatedAt: import("typebox").TString;
|
|
2417
|
+
refreshToken: import("typebox").TString;
|
|
2418
|
+
userId: import("typebox").TString;
|
|
2419
|
+
expiresAt: import("typebox").TString;
|
|
2420
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
2421
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
2422
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
2423
|
+
os: import("typebox").TString;
|
|
2424
|
+
browser: import("typebox").TString;
|
|
2425
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2426
|
+
}>>;
|
|
2427
|
+
user: import("typebox").TOptional<import("typebox").TObject<{
|
|
2428
|
+
id: import("typebox").TString;
|
|
2429
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2430
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2431
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2432
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2444
2433
|
}>>;
|
|
2445
2434
|
}>>;
|
|
2446
2435
|
}>;
|
|
2447
2436
|
/**
|
|
2448
2437
|
* Get a session by ID.
|
|
2449
2438
|
*/
|
|
2450
|
-
readonly getSession:
|
|
2451
|
-
params:
|
|
2452
|
-
id:
|
|
2453
|
-
}>;
|
|
2454
|
-
query:
|
|
2455
|
-
userRealmName:
|
|
2456
|
-
}>;
|
|
2457
|
-
response:
|
|
2458
|
-
id:
|
|
2459
|
-
version:
|
|
2460
|
-
createdAt:
|
|
2461
|
-
updatedAt:
|
|
2462
|
-
refreshToken:
|
|
2463
|
-
userId:
|
|
2464
|
-
expiresAt:
|
|
2465
|
-
ip:
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2439
|
+
readonly getSession: import("alepha/server").ActionPrimitiveFn<{
|
|
2440
|
+
params: import("typebox").TObject<{
|
|
2441
|
+
id: import("typebox").TString;
|
|
2442
|
+
}>;
|
|
2443
|
+
query: import("typebox").TObject<{
|
|
2444
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2445
|
+
}>;
|
|
2446
|
+
response: import("typebox").TObject<{
|
|
2447
|
+
id: import("typebox").TString;
|
|
2448
|
+
version: import("typebox").TNumber;
|
|
2449
|
+
createdAt: import("typebox").TString;
|
|
2450
|
+
updatedAt: import("typebox").TString;
|
|
2451
|
+
refreshToken: import("typebox").TString;
|
|
2452
|
+
userId: import("typebox").TString;
|
|
2453
|
+
expiresAt: import("typebox").TString;
|
|
2454
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
2455
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
2456
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
2457
|
+
os: import("typebox").TString;
|
|
2458
|
+
browser: import("typebox").TString;
|
|
2459
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2460
|
+
}>>;
|
|
2461
|
+
user: import("typebox").TOptional<import("typebox").TObject<{
|
|
2462
|
+
id: import("typebox").TString;
|
|
2463
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2464
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2465
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2466
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2470
2467
|
}>>;
|
|
2471
2468
|
}>;
|
|
2472
2469
|
}>;
|
|
2473
2470
|
/**
|
|
2474
2471
|
* Delete a session.
|
|
2475
2472
|
*/
|
|
2476
|
-
readonly deleteSession:
|
|
2477
|
-
params:
|
|
2478
|
-
id:
|
|
2473
|
+
readonly deleteSession: import("alepha/server").ActionPrimitiveFn<{
|
|
2474
|
+
params: import("typebox").TObject<{
|
|
2475
|
+
id: import("typebox").TString;
|
|
2479
2476
|
}>;
|
|
2480
|
-
query:
|
|
2481
|
-
userRealmName:
|
|
2477
|
+
query: import("typebox").TObject<{
|
|
2478
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2482
2479
|
}>;
|
|
2483
|
-
response:
|
|
2484
|
-
ok:
|
|
2485
|
-
id:
|
|
2486
|
-
count:
|
|
2480
|
+
response: import("typebox").TObject<{
|
|
2481
|
+
ok: import("typebox").TBoolean;
|
|
2482
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
2483
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
2487
2484
|
}>;
|
|
2488
2485
|
}>;
|
|
2489
2486
|
/**
|
|
2490
2487
|
* Delete many sessions in one repository call.
|
|
2491
2488
|
*/
|
|
2492
|
-
readonly deleteSessions:
|
|
2493
|
-
query:
|
|
2494
|
-
userRealmName:
|
|
2489
|
+
readonly deleteSessions: import("alepha/server").ActionPrimitiveFn<{
|
|
2490
|
+
query: import("typebox").TObject<{
|
|
2491
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2495
2492
|
}>;
|
|
2496
|
-
body:
|
|
2497
|
-
ids:
|
|
2493
|
+
body: import("typebox").TObject<{
|
|
2494
|
+
ids: import("typebox").TArray<import("typebox").TString>;
|
|
2498
2495
|
}>;
|
|
2499
|
-
response:
|
|
2500
|
-
deleted:
|
|
2496
|
+
response: import("typebox").TObject<{
|
|
2497
|
+
deleted: import("typebox").TArray<import("typebox").TString>;
|
|
2501
2498
|
}>;
|
|
2502
2499
|
}>;
|
|
2503
2500
|
}
|
|
2504
2501
|
//#endregion
|
|
2505
2502
|
//#region ../../src/api/users/notifications/UserNotifications.d.ts
|
|
2506
2503
|
declare class UserNotifications {
|
|
2507
|
-
readonly passwordReset:
|
|
2508
|
-
email:
|
|
2509
|
-
code:
|
|
2510
|
-
expiresInMinutes:
|
|
2504
|
+
readonly passwordReset: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2505
|
+
email: import("typebox").TString;
|
|
2506
|
+
code: import("typebox").TString;
|
|
2507
|
+
expiresInMinutes: import("typebox").TNumber;
|
|
2511
2508
|
}>>;
|
|
2512
|
-
readonly emailVerification:
|
|
2513
|
-
email:
|
|
2514
|
-
code:
|
|
2515
|
-
expiresInMinutes:
|
|
2509
|
+
readonly emailVerification: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2510
|
+
email: import("typebox").TString;
|
|
2511
|
+
code: import("typebox").TString;
|
|
2512
|
+
expiresInMinutes: import("typebox").TNumber;
|
|
2516
2513
|
}>>;
|
|
2517
|
-
readonly phoneVerification:
|
|
2518
|
-
phoneNumber:
|
|
2519
|
-
code:
|
|
2520
|
-
expiresInMinutes:
|
|
2514
|
+
readonly phoneVerification: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2515
|
+
phoneNumber: import("typebox").TString;
|
|
2516
|
+
code: import("typebox").TString;
|
|
2517
|
+
expiresInMinutes: import("typebox").TNumber;
|
|
2521
2518
|
}>>;
|
|
2522
|
-
readonly passwordResetLink:
|
|
2523
|
-
email:
|
|
2524
|
-
resetUrl:
|
|
2525
|
-
expiresInMinutes:
|
|
2519
|
+
readonly passwordResetLink: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2520
|
+
email: import("typebox").TString;
|
|
2521
|
+
resetUrl: import("typebox").TString;
|
|
2522
|
+
expiresInMinutes: import("typebox").TNumber;
|
|
2526
2523
|
}>>;
|
|
2527
|
-
readonly accountLockout:
|
|
2528
|
-
email:
|
|
2529
|
-
lockoutMinutes:
|
|
2524
|
+
readonly accountLockout: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2525
|
+
email: import("typebox").TString;
|
|
2526
|
+
lockoutMinutes: import("typebox").TNumber;
|
|
2530
2527
|
}>>;
|
|
2531
|
-
readonly emailVerificationLink:
|
|
2532
|
-
email:
|
|
2533
|
-
verifyUrl:
|
|
2534
|
-
expiresInMinutes:
|
|
2528
|
+
readonly emailVerificationLink: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2529
|
+
email: import("typebox").TString;
|
|
2530
|
+
verifyUrl: import("typebox").TString;
|
|
2531
|
+
expiresInMinutes: import("typebox").TNumber;
|
|
2535
2532
|
}>>;
|
|
2536
2533
|
}
|
|
2537
2534
|
//#endregion
|
|
2538
2535
|
//#region ../../src/api/users/schemas/createUserSchema.d.ts
|
|
2539
|
-
declare const createUserSchema:
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
updatedAt:
|
|
2547
|
-
username:
|
|
2548
|
-
roles:
|
|
2549
|
-
firstName:
|
|
2550
|
-
lastName:
|
|
2551
|
-
picture:
|
|
2552
|
-
|
|
2553
|
-
|
|
2536
|
+
declare const createUserSchema: import("typebox").TObject<{
|
|
2537
|
+
enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2538
|
+
email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2539
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2540
|
+
id: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
|
|
2541
|
+
version: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
|
|
2542
|
+
createdAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
|
|
2543
|
+
updatedAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
|
|
2544
|
+
username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2545
|
+
roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
|
|
2546
|
+
firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2547
|
+
lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2548
|
+
picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2549
|
+
emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2550
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2551
|
+
organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
|
|
2554
2552
|
}>;
|
|
2555
2553
|
type CreateUser = Static<typeof createUserSchema>;
|
|
2556
2554
|
//#endregion
|
|
2557
2555
|
//#region ../../src/api/users/schemas/updateUserSchema.d.ts
|
|
2558
|
-
declare const updateUserSchema:
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
phoneNumber:
|
|
2562
|
-
realm:
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2556
|
+
declare const updateUserSchema: import("typebox").TObject<{
|
|
2557
|
+
enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2558
|
+
email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2559
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2560
|
+
realm: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_DEFAULT>>;
|
|
2561
|
+
username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2562
|
+
roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
|
|
2563
|
+
firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2564
|
+
lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2565
|
+
picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2566
|
+
emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2567
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2568
|
+
organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
|
|
2568
2569
|
}>;
|
|
2569
2570
|
type UpdateUser = Static<typeof updateUserSchema>;
|
|
2570
2571
|
//#endregion
|
|
2571
2572
|
//#region ../../src/api/users/schemas/userQuerySchema.d.ts
|
|
2572
|
-
declare const userQuerySchema:
|
|
2573
|
-
page:
|
|
2574
|
-
size:
|
|
2575
|
-
sort:
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2573
|
+
declare const userQuerySchema: import("typebox").TObject<{
|
|
2574
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2575
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2576
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2577
|
+
search: import("typebox").TOptional<import("typebox").TString>;
|
|
2578
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2579
|
+
enabled: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
2580
|
+
emailVerified: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
2581
|
+
roles: import("typebox").TOptional<import("typebox").TArray<import("typebox").TString>>;
|
|
2580
2582
|
}>;
|
|
2581
2583
|
type UserQuery = Static<typeof userQuerySchema>;
|
|
2582
2584
|
//#endregion
|
|
2583
2585
|
//#region ../../src/api/users/services/UserService.d.ts
|
|
2584
2586
|
declare class UserService {
|
|
2585
2587
|
protected readonly alepha: Alepha;
|
|
2586
|
-
protected readonly log:
|
|
2587
|
-
protected readonly verificationController:
|
|
2588
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
2589
|
+
protected readonly verificationController: import("alepha/server/links").HttpVirtualClient<VerificationController>;
|
|
2588
2590
|
protected readonly realmProvider: RealmProvider;
|
|
2591
|
+
protected readonly cryptoProvider: CryptoProvider;
|
|
2589
2592
|
protected userAudits(realmName?: string): UserAudits | undefined;
|
|
2590
2593
|
protected userNotifications(realmName?: string): UserNotifications | undefined;
|
|
2591
|
-
users(userRealmName?: string):
|
|
2592
|
-
id:
|
|
2593
|
-
version:
|
|
2594
|
-
createdAt:
|
|
2595
|
-
updatedAt:
|
|
2596
|
-
realm:
|
|
2597
|
-
username:
|
|
2598
|
-
email:
|
|
2599
|
-
phoneNumber:
|
|
2600
|
-
roles:
|
|
2601
|
-
firstName:
|
|
2602
|
-
lastName:
|
|
2603
|
-
picture:
|
|
2604
|
-
enabled:
|
|
2605
|
-
emailVerified:
|
|
2606
|
-
|
|
2594
|
+
users(userRealmName?: string): import("alepha/orm").Repository<import("typebox").TObject<{
|
|
2595
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2596
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2597
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2598
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2599
|
+
realm: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2600
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2601
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2602
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2603
|
+
roles: import("alepha/orm").PgAttr<import("typebox").TArray<import("typebox").TString>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2604
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2605
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2606
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2607
|
+
enabled: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2608
|
+
emailVerified: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2609
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2610
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
2607
2611
|
}>>;
|
|
2608
2612
|
/**
|
|
2609
2613
|
* Request email verification for a user.
|
|
@@ -2638,6 +2642,13 @@ declare class UserService {
|
|
|
2638
2642
|
* Update an existing user.
|
|
2639
2643
|
*/
|
|
2640
2644
|
updateUser(id: string, data: UpdateUser, userRealmName?: string): Promise<UserEntity>;
|
|
2645
|
+
/**
|
|
2646
|
+
* Set (or reset) a user's password. Upserts a "credentials" identity
|
|
2647
|
+
* with the new hash. Used by admin password-set flows; does NOT
|
|
2648
|
+
* verify any old password or token — the caller is responsible for
|
|
2649
|
+
* authorization.
|
|
2650
|
+
*/
|
|
2651
|
+
setPassword(id: string, newPassword: string, userRealmName?: string): Promise<void>;
|
|
2641
2652
|
/**
|
|
2642
2653
|
* Delete a user by ID.
|
|
2643
2654
|
*/
|
|
@@ -2649,160 +2660,205 @@ declare class AdminUserController {
|
|
|
2649
2660
|
protected readonly url = "/users";
|
|
2650
2661
|
protected readonly group = "admin:users";
|
|
2651
2662
|
protected readonly userService: UserService;
|
|
2663
|
+
protected readonly securityProvider: SecurityProvider;
|
|
2664
|
+
/**
|
|
2665
|
+
* List roles available in a realm. Used by the admin UI to render the
|
|
2666
|
+
* role picker and grey out defaults (which cannot be removed).
|
|
2667
|
+
*/
|
|
2668
|
+
readonly findRoles: import("alepha/server").ActionPrimitiveFn<{
|
|
2669
|
+
query: import("typebox").TObject<{
|
|
2670
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2671
|
+
}>;
|
|
2672
|
+
response: import("typebox").TArray<import("typebox").TObject<{
|
|
2673
|
+
name: import("typebox").TString;
|
|
2674
|
+
default: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
2675
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
2676
|
+
}>>;
|
|
2677
|
+
}>;
|
|
2652
2678
|
/**
|
|
2653
2679
|
* Find users with pagination and filtering.
|
|
2654
2680
|
*/
|
|
2655
|
-
readonly findUsers:
|
|
2656
|
-
query:
|
|
2657
|
-
page:
|
|
2658
|
-
size:
|
|
2659
|
-
sort:
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2681
|
+
readonly findUsers: import("alepha/server").ActionPrimitiveFn<{
|
|
2682
|
+
query: import("typebox").TObject<{
|
|
2683
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2684
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2685
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2686
|
+
search: import("typebox").TOptional<import("typebox").TString>;
|
|
2687
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2688
|
+
enabled: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
2689
|
+
emailVerified: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
2690
|
+
roles: import("typebox").TOptional<import("typebox").TArray<import("typebox").TString>>;
|
|
2691
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2692
|
+
}>;
|
|
2693
|
+
response: import("alepha").TPage<import("typebox").TObject<{
|
|
2694
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2695
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2696
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2697
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2698
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
2699
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2700
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2701
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2702
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
2703
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2704
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2705
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2706
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2707
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2708
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2709
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
2682
2710
|
}>>;
|
|
2683
2711
|
}>;
|
|
2684
2712
|
/**
|
|
2685
2713
|
* Get a user by ID.
|
|
2686
2714
|
*/
|
|
2687
|
-
readonly getUser:
|
|
2688
|
-
params:
|
|
2689
|
-
id:
|
|
2690
|
-
}>;
|
|
2691
|
-
query:
|
|
2692
|
-
userRealmName:
|
|
2693
|
-
}>;
|
|
2694
|
-
response:
|
|
2695
|
-
id: PgAttr<PgAttr<
|
|
2696
|
-
version: PgAttr<PgAttr<
|
|
2697
|
-
createdAt: PgAttr<PgAttr<
|
|
2698
|
-
updatedAt: PgAttr<PgAttr<
|
|
2699
|
-
realm: PgAttr<
|
|
2700
|
-
username:
|
|
2701
|
-
email:
|
|
2702
|
-
phoneNumber:
|
|
2703
|
-
roles: PgAttr<
|
|
2704
|
-
firstName:
|
|
2705
|
-
lastName:
|
|
2706
|
-
picture:
|
|
2707
|
-
enabled: PgAttr<
|
|
2708
|
-
emailVerified: PgAttr<
|
|
2709
|
-
|
|
2715
|
+
readonly getUser: import("alepha/server").ActionPrimitiveFn<{
|
|
2716
|
+
params: import("typebox").TObject<{
|
|
2717
|
+
id: import("typebox").TString;
|
|
2718
|
+
}>;
|
|
2719
|
+
query: import("typebox").TObject<{
|
|
2720
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2721
|
+
}>;
|
|
2722
|
+
response: import("typebox").TObject<{
|
|
2723
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2724
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2725
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2726
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2727
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
2728
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2729
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2730
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2731
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
2732
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2733
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2734
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2735
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2736
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2737
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2738
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
2710
2739
|
}>;
|
|
2711
2740
|
}>;
|
|
2712
2741
|
/**
|
|
2713
2742
|
* Create a new user.
|
|
2714
2743
|
*/
|
|
2715
|
-
readonly createUser:
|
|
2716
|
-
query:
|
|
2717
|
-
userRealmName:
|
|
2718
|
-
}>;
|
|
2719
|
-
body:
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
updatedAt:
|
|
2727
|
-
username:
|
|
2728
|
-
roles:
|
|
2729
|
-
firstName:
|
|
2730
|
-
lastName:
|
|
2731
|
-
picture:
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2744
|
+
readonly createUser: import("alepha/server").ActionPrimitiveFn<{
|
|
2745
|
+
query: import("typebox").TObject<{
|
|
2746
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2747
|
+
}>;
|
|
2748
|
+
body: import("typebox").TObject<{
|
|
2749
|
+
enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2750
|
+
email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2751
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2752
|
+
id: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
|
|
2753
|
+
version: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
|
|
2754
|
+
createdAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
|
|
2755
|
+
updatedAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
|
|
2756
|
+
username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2757
|
+
roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
|
|
2758
|
+
firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2759
|
+
lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2760
|
+
picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2761
|
+
emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2762
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2763
|
+
organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
|
|
2764
|
+
}>;
|
|
2765
|
+
response: import("typebox").TObject<{
|
|
2766
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2767
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2768
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2769
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2770
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
2771
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2772
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2773
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2774
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
2775
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2776
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2777
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2778
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2779
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2780
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2781
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
2751
2782
|
}>;
|
|
2752
2783
|
}>;
|
|
2753
2784
|
/**
|
|
2754
2785
|
* Update a user.
|
|
2755
2786
|
*/
|
|
2756
|
-
readonly updateUser:
|
|
2757
|
-
params:
|
|
2758
|
-
id:
|
|
2759
|
-
}>;
|
|
2760
|
-
query:
|
|
2761
|
-
userRealmName:
|
|
2762
|
-
}>;
|
|
2763
|
-
body:
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
phoneNumber:
|
|
2767
|
-
realm:
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2787
|
+
readonly updateUser: import("alepha/server").ActionPrimitiveFn<{
|
|
2788
|
+
params: import("typebox").TObject<{
|
|
2789
|
+
id: import("typebox").TString;
|
|
2790
|
+
}>;
|
|
2791
|
+
query: import("typebox").TObject<{
|
|
2792
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2793
|
+
}>;
|
|
2794
|
+
body: import("typebox").TObject<{
|
|
2795
|
+
enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2796
|
+
email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2797
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2798
|
+
realm: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_DEFAULT>>;
|
|
2799
|
+
username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2800
|
+
roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
|
|
2801
|
+
firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2802
|
+
lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2803
|
+
picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2804
|
+
emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2805
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2806
|
+
organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
|
|
2807
|
+
}>;
|
|
2808
|
+
response: import("typebox").TObject<{
|
|
2809
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2810
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2811
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2812
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2813
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
2814
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2815
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2816
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2817
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
2818
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2819
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2820
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2821
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2822
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2823
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2824
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
2825
|
+
}>;
|
|
2826
|
+
}>;
|
|
2827
|
+
/**
|
|
2828
|
+
* Set (or reset) a user's password. Admin-only flow — does NOT
|
|
2829
|
+
* require knowing the previous password. Hash is stored as a
|
|
2830
|
+
* "credentials" identity for the user (upsert).
|
|
2831
|
+
*/
|
|
2832
|
+
readonly setUserPassword: import("alepha/server").ActionPrimitiveFn<{
|
|
2833
|
+
params: import("typebox").TObject<{
|
|
2834
|
+
id: import("typebox").TString;
|
|
2835
|
+
}>;
|
|
2836
|
+
query: import("typebox").TObject<{
|
|
2837
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2838
|
+
}>;
|
|
2839
|
+
body: import("typebox").TObject<{
|
|
2840
|
+
password: import("typebox").TString;
|
|
2841
|
+
}>;
|
|
2842
|
+
response: import("typebox").TObject<{
|
|
2843
|
+
ok: import("typebox").TBoolean;
|
|
2844
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
2845
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
2790
2846
|
}>;
|
|
2791
2847
|
}>;
|
|
2792
2848
|
/**
|
|
2793
2849
|
* Delete a user.
|
|
2794
2850
|
*/
|
|
2795
|
-
readonly deleteUser:
|
|
2796
|
-
params:
|
|
2797
|
-
id:
|
|
2851
|
+
readonly deleteUser: import("alepha/server").ActionPrimitiveFn<{
|
|
2852
|
+
params: import("typebox").TObject<{
|
|
2853
|
+
id: import("typebox").TString;
|
|
2798
2854
|
}>;
|
|
2799
|
-
query:
|
|
2800
|
-
userRealmName:
|
|
2855
|
+
query: import("typebox").TObject<{
|
|
2856
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2801
2857
|
}>;
|
|
2802
|
-
response:
|
|
2803
|
-
ok:
|
|
2804
|
-
id:
|
|
2805
|
-
count:
|
|
2858
|
+
response: import("typebox").TObject<{
|
|
2859
|
+
ok: import("typebox").TBoolean;
|
|
2860
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
2861
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
2806
2862
|
}>;
|
|
2807
2863
|
}>;
|
|
2808
2864
|
/**
|
|
@@ -2810,15 +2866,15 @@ declare class AdminUserController {
|
|
|
2810
2866
|
* cascades and side-effects run as if called one-by-one. Errors on a single
|
|
2811
2867
|
* id surface with that id in the response.
|
|
2812
2868
|
*/
|
|
2813
|
-
readonly deleteUsers:
|
|
2814
|
-
query:
|
|
2815
|
-
userRealmName:
|
|
2869
|
+
readonly deleteUsers: import("alepha/server").ActionPrimitiveFn<{
|
|
2870
|
+
query: import("typebox").TObject<{
|
|
2871
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2816
2872
|
}>;
|
|
2817
|
-
body:
|
|
2818
|
-
ids:
|
|
2873
|
+
body: import("typebox").TObject<{
|
|
2874
|
+
ids: import("typebox").TArray<import("typebox").TString>;
|
|
2819
2875
|
}>;
|
|
2820
|
-
response:
|
|
2821
|
-
deleted:
|
|
2876
|
+
response: import("typebox").TObject<{
|
|
2877
|
+
deleted: import("typebox").TArray<import("typebox").TString>;
|
|
2822
2878
|
}>;
|
|
2823
2879
|
}>;
|
|
2824
2880
|
}
|
|
@@ -2838,64 +2894,68 @@ declare class RealmController {
|
|
|
2838
2894
|
* Get realm configuration settings.
|
|
2839
2895
|
* This endpoint is not exposed in the API documentation.
|
|
2840
2896
|
*/
|
|
2841
|
-
readonly getRealmConfig:
|
|
2842
|
-
query:
|
|
2843
|
-
realmName:
|
|
2844
|
-
}>;
|
|
2845
|
-
response:
|
|
2846
|
-
settings:
|
|
2847
|
-
displayName:
|
|
2848
|
-
description:
|
|
2849
|
-
logoUrl:
|
|
2850
|
-
registrationAllowed:
|
|
2851
|
-
email:
|
|
2852
|
-
username:
|
|
2853
|
-
usernameRegExp:
|
|
2854
|
-
usernameBlocklist:
|
|
2855
|
-
phoneNumber:
|
|
2856
|
-
verifyEmailRequired:
|
|
2857
|
-
verifyPhoneRequired:
|
|
2858
|
-
firstNameLastName:
|
|
2859
|
-
resetPasswordAllowed:
|
|
2860
|
-
captchaRequired:
|
|
2861
|
-
adminEmails:
|
|
2862
|
-
adminUsernames:
|
|
2863
|
-
defaultRoles:
|
|
2864
|
-
verifyEmailUrl:
|
|
2865
|
-
passwordPolicy:
|
|
2866
|
-
minLength:
|
|
2867
|
-
requireUppercase:
|
|
2868
|
-
requireLowercase:
|
|
2869
|
-
requireNumbers:
|
|
2870
|
-
requireSpecialCharacters:
|
|
2897
|
+
readonly getRealmConfig: import("alepha/server").ActionPrimitiveFn<{
|
|
2898
|
+
query: import("typebox").TObject<{
|
|
2899
|
+
realmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2900
|
+
}>;
|
|
2901
|
+
response: import("typebox").TObject<{
|
|
2902
|
+
settings: import("typebox").TObject<{
|
|
2903
|
+
displayName: import("typebox").TOptional<import("typebox").TString>;
|
|
2904
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
2905
|
+
logoUrl: import("typebox").TOptional<import("typebox").TString>;
|
|
2906
|
+
registrationAllowed: import("typebox").TBoolean;
|
|
2907
|
+
email: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
2908
|
+
username: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">, import("typebox").TLiteral<"email">]>;
|
|
2909
|
+
usernameRegExp: import("typebox").TString;
|
|
2910
|
+
usernameBlocklist: import("typebox").TArray<import("typebox").TString>;
|
|
2911
|
+
phoneNumber: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
2912
|
+
verifyEmailRequired: import("typebox").TBoolean;
|
|
2913
|
+
verifyPhoneRequired: import("typebox").TBoolean;
|
|
2914
|
+
firstNameLastName: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
2915
|
+
resetPasswordAllowed: import("typebox").TBoolean;
|
|
2916
|
+
captchaRequired: import("typebox").TBoolean;
|
|
2917
|
+
adminEmails: import("typebox").TArray<import("typebox").TString>;
|
|
2918
|
+
adminUsernames: import("typebox").TArray<import("typebox").TString>;
|
|
2919
|
+
defaultRoles: import("typebox").TArray<import("typebox").TString>;
|
|
2920
|
+
verifyEmailUrl: import("typebox").TOptional<import("typebox").TString>;
|
|
2921
|
+
passwordPolicy: import("typebox").TObject<{
|
|
2922
|
+
minLength: import("typebox").TInteger;
|
|
2923
|
+
requireUppercase: import("typebox").TBoolean;
|
|
2924
|
+
requireLowercase: import("typebox").TBoolean;
|
|
2925
|
+
requireNumbers: import("typebox").TBoolean;
|
|
2926
|
+
requireSpecialCharacters: import("typebox").TBoolean;
|
|
2871
2927
|
}>;
|
|
2872
|
-
loginRateLimit:
|
|
2873
|
-
ipMaxAttempts:
|
|
2874
|
-
accountMaxAttempts:
|
|
2875
|
-
windowMs:
|
|
2928
|
+
loginRateLimit: import("typebox").TObject<{
|
|
2929
|
+
ipMaxAttempts: import("typebox").TInteger;
|
|
2930
|
+
accountMaxAttempts: import("typebox").TInteger;
|
|
2931
|
+
windowMs: import("typebox").TInteger;
|
|
2876
2932
|
}>;
|
|
2877
|
-
registrationIpMaxAttempts:
|
|
2878
|
-
refreshToken:
|
|
2879
|
-
expirationIdle:
|
|
2933
|
+
registrationIpMaxAttempts: import("typebox").TInteger;
|
|
2934
|
+
refreshToken: import("typebox").TObject<{
|
|
2935
|
+
expirationIdle: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2880
2936
|
}>;
|
|
2881
2937
|
}>;
|
|
2882
|
-
realmName:
|
|
2883
|
-
authenticationMethods:
|
|
2884
|
-
name:
|
|
2885
|
-
type:
|
|
2938
|
+
realmName: import("typebox").TString;
|
|
2939
|
+
authenticationMethods: import("typebox").TArray<import("typebox").TObject<{
|
|
2940
|
+
name: import("typebox").TString;
|
|
2941
|
+
type: import("typebox").TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
|
|
2942
|
+
}>>;
|
|
2943
|
+
captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
|
|
2944
|
+
federated: import("typebox").TOptional<import("typebox").TObject<{
|
|
2945
|
+
brokerUrl: import("typebox").TString;
|
|
2946
|
+
providers: import("typebox").TArray<import("typebox").TUnion<[import("typebox").TLiteral<"google">, import("typebox").TLiteral<"apple">]>>;
|
|
2886
2947
|
}>>;
|
|
2887
|
-
captchaSiteKey: _$typebox.TOptional<_$typebox.TString>;
|
|
2888
2948
|
}>;
|
|
2889
2949
|
}>;
|
|
2890
|
-
readonly checkUsernameAvailability:
|
|
2891
|
-
query:
|
|
2892
|
-
realmName:
|
|
2950
|
+
readonly checkUsernameAvailability: import("alepha/server").ActionPrimitiveFn<{
|
|
2951
|
+
query: import("typebox").TObject<{
|
|
2952
|
+
realmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2893
2953
|
}>;
|
|
2894
|
-
body:
|
|
2895
|
-
username:
|
|
2954
|
+
body: import("typebox").TObject<{
|
|
2955
|
+
username: import("typebox").TString;
|
|
2896
2956
|
}>;
|
|
2897
|
-
response:
|
|
2898
|
-
available:
|
|
2957
|
+
response: import("typebox").TObject<{
|
|
2958
|
+
available: import("typebox").TBoolean;
|
|
2899
2959
|
}>;
|
|
2900
2960
|
}>;
|
|
2901
2961
|
}
|
|
@@ -2907,10 +2967,10 @@ declare class RealmController {
|
|
|
2907
2967
|
* Requires the intent ID from Phase 1, the verification code,
|
|
2908
2968
|
* and the new password.
|
|
2909
2969
|
*/
|
|
2910
|
-
declare const completePasswordResetRequestSchema:
|
|
2911
|
-
intentId:
|
|
2912
|
-
code:
|
|
2913
|
-
newPassword:
|
|
2970
|
+
declare const completePasswordResetRequestSchema: import("typebox").TObject<{
|
|
2971
|
+
intentId: import("typebox").TString;
|
|
2972
|
+
code: import("typebox").TString;
|
|
2973
|
+
newPassword: import("typebox").TString;
|
|
2914
2974
|
}>;
|
|
2915
2975
|
type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSchema>;
|
|
2916
2976
|
//#endregion
|
|
@@ -2921,9 +2981,9 @@ type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSc
|
|
|
2921
2981
|
* Contains the intent ID needed for Phase 2 completion,
|
|
2922
2982
|
* along with expiration time.
|
|
2923
2983
|
*/
|
|
2924
|
-
declare const passwordResetIntentResponseSchema:
|
|
2925
|
-
intentId:
|
|
2926
|
-
expiresAt:
|
|
2984
|
+
declare const passwordResetIntentResponseSchema: import("typebox").TObject<{
|
|
2985
|
+
intentId: import("typebox").TString;
|
|
2986
|
+
expiresAt: import("typebox").TString;
|
|
2927
2987
|
}>;
|
|
2928
2988
|
type PasswordResetIntentResponse = Static<typeof passwordResetIntentResponseSchema>;
|
|
2929
2989
|
//#endregion
|
|
@@ -2940,58 +3000,61 @@ interface PasswordResetIntent {
|
|
|
2940
3000
|
}
|
|
2941
3001
|
declare class CredentialService {
|
|
2942
3002
|
protected readonly alepha: Alepha;
|
|
2943
|
-
protected readonly log:
|
|
3003
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
2944
3004
|
protected readonly cryptoProvider: CryptoProvider;
|
|
2945
3005
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
2946
3006
|
protected readonly verificationService: VerificationService;
|
|
2947
3007
|
protected readonly realmProvider: RealmProvider;
|
|
2948
3008
|
protected userAudits(realmName?: string): UserAudits | undefined;
|
|
3009
|
+
protected sessionAudits(realmName?: string): SessionAudits | undefined;
|
|
2949
3010
|
protected userNotifications(realmName?: string): UserNotifications | undefined;
|
|
2950
|
-
protected readonly intentCache:
|
|
2951
|
-
users(userRealmName?: string): Repository$1<
|
|
2952
|
-
id: PgAttr<PgAttr<
|
|
2953
|
-
version: PgAttr<PgAttr<
|
|
2954
|
-
createdAt: PgAttr<PgAttr<
|
|
2955
|
-
updatedAt: PgAttr<PgAttr<
|
|
2956
|
-
realm: PgAttr<
|
|
2957
|
-
username:
|
|
2958
|
-
email:
|
|
2959
|
-
phoneNumber:
|
|
2960
|
-
roles: PgAttr<
|
|
2961
|
-
firstName:
|
|
2962
|
-
lastName:
|
|
2963
|
-
picture:
|
|
2964
|
-
enabled: PgAttr<
|
|
2965
|
-
emailVerified: PgAttr<
|
|
2966
|
-
|
|
3011
|
+
protected readonly intentCache: import("alepha/cache").CacheMiddlewareFn<PasswordResetIntent>;
|
|
3012
|
+
users(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
3013
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3014
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3015
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3016
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3017
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
3018
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3019
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3020
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3021
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
3022
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3023
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3024
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3025
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3026
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3027
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3028
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
2967
3029
|
}>>;
|
|
2968
|
-
sessions(userRealmName?: string): Repository$1<
|
|
2969
|
-
id: PgAttr<PgAttr<
|
|
2970
|
-
version: PgAttr<PgAttr<
|
|
2971
|
-
createdAt: PgAttr<PgAttr<
|
|
2972
|
-
updatedAt: PgAttr<PgAttr<
|
|
2973
|
-
refreshToken:
|
|
2974
|
-
userId: PgAttr<
|
|
2975
|
-
clientId:
|
|
2976
|
-
expiresAt:
|
|
2977
|
-
lastUsedAt:
|
|
2978
|
-
ip:
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
3030
|
+
sessions(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
3031
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3032
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3033
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3034
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3035
|
+
refreshToken: import("typebox").TString;
|
|
3036
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
3037
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
3038
|
+
expiresAt: import("typebox").TString;
|
|
3039
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3040
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
3041
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
3042
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
3043
|
+
os: import("typebox").TString;
|
|
3044
|
+
browser: import("typebox").TString;
|
|
3045
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2983
3046
|
}>>;
|
|
2984
3047
|
}>>;
|
|
2985
|
-
identities(userRealmName?: string): Repository$1<
|
|
2986
|
-
id: PgAttr<PgAttr<
|
|
2987
|
-
version: PgAttr<PgAttr<
|
|
2988
|
-
createdAt: PgAttr<PgAttr<
|
|
2989
|
-
updatedAt: PgAttr<PgAttr<
|
|
2990
|
-
userId: PgAttr<
|
|
2991
|
-
password:
|
|
2992
|
-
provider:
|
|
2993
|
-
providerUserId:
|
|
2994
|
-
providerData:
|
|
3048
|
+
identities(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
3049
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3050
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3051
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3052
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3053
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
3054
|
+
password: import("typebox").TOptional<import("typebox").TString>;
|
|
3055
|
+
provider: import("typebox").TString;
|
|
3056
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
3057
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2995
3058
|
}>>;
|
|
2996
3059
|
/**
|
|
2997
3060
|
* Validate a password against the realm's password policy.
|
|
@@ -3032,11 +3095,11 @@ declare class CredentialService {
|
|
|
3032
3095
|
}
|
|
3033
3096
|
//#endregion
|
|
3034
3097
|
//#region ../../src/api/users/schemas/completeRegistrationRequestSchema.d.ts
|
|
3035
|
-
declare const completeRegistrationRequestSchema:
|
|
3036
|
-
intentId:
|
|
3037
|
-
emailCode:
|
|
3038
|
-
phoneCode:
|
|
3039
|
-
captchaToken:
|
|
3098
|
+
declare const completeRegistrationRequestSchema: import("typebox").TObject<{
|
|
3099
|
+
intentId: import("typebox").TString;
|
|
3100
|
+
emailCode: import("typebox").TOptional<import("typebox").TString>;
|
|
3101
|
+
phoneCode: import("typebox").TOptional<import("typebox").TString>;
|
|
3102
|
+
captchaToken: import("typebox").TOptional<import("typebox").TString>;
|
|
3040
3103
|
}>;
|
|
3041
3104
|
type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSchema>;
|
|
3042
3105
|
//#endregion
|
|
@@ -3045,26 +3108,26 @@ type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSche
|
|
|
3045
3108
|
* Schema for user registration request body.
|
|
3046
3109
|
* Password is always required, other fields depend on realm settings.
|
|
3047
3110
|
*/
|
|
3048
|
-
declare const registerRequestSchema:
|
|
3049
|
-
password:
|
|
3050
|
-
username:
|
|
3051
|
-
email:
|
|
3052
|
-
phoneNumber:
|
|
3053
|
-
firstName:
|
|
3054
|
-
lastName:
|
|
3055
|
-
picture:
|
|
3056
|
-
captchaToken:
|
|
3111
|
+
declare const registerRequestSchema: import("typebox").TObject<{
|
|
3112
|
+
password: import("typebox").TString;
|
|
3113
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3114
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3115
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3116
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3117
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3118
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3119
|
+
captchaToken: import("typebox").TOptional<import("typebox").TString>;
|
|
3057
3120
|
}>;
|
|
3058
3121
|
type RegisterRequest = Static<typeof registerRequestSchema>;
|
|
3059
3122
|
//#endregion
|
|
3060
3123
|
//#region ../../src/api/users/schemas/registrationIntentResponseSchema.d.ts
|
|
3061
|
-
declare const registrationIntentResponseSchema:
|
|
3062
|
-
intentId:
|
|
3063
|
-
expectCaptcha:
|
|
3064
|
-
captchaSiteKey:
|
|
3065
|
-
expectEmailVerification:
|
|
3066
|
-
expectPhoneVerification:
|
|
3067
|
-
expiresAt:
|
|
3124
|
+
declare const registrationIntentResponseSchema: import("typebox").TObject<{
|
|
3125
|
+
intentId: import("typebox").TString;
|
|
3126
|
+
expectCaptcha: import("typebox").TBoolean;
|
|
3127
|
+
captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
|
|
3128
|
+
expectEmailVerification: import("typebox").TBoolean;
|
|
3129
|
+
expectPhoneVerification: import("typebox").TBoolean;
|
|
3130
|
+
expiresAt: import("typebox").TString;
|
|
3068
3131
|
}>;
|
|
3069
3132
|
type RegistrationIntentResponse = Static<typeof registrationIntentResponseSchema>;
|
|
3070
3133
|
//#endregion
|
|
@@ -3094,7 +3157,7 @@ type RegistrationIntentResponse = Static<typeof registrationIntentResponseSchema
|
|
|
3094
3157
|
*/
|
|
3095
3158
|
declare class UsernameSlugger {
|
|
3096
3159
|
protected readonly realmProvider: RealmProvider;
|
|
3097
|
-
protected readonly log:
|
|
3160
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
3098
3161
|
/**
|
|
3099
3162
|
* Floor for derived usernames. Shorter slugs are padded with random
|
|
3100
3163
|
* alphanumerics. Matches the lower bound of the default `usernameRegExp`.
|
|
@@ -3182,16 +3245,16 @@ interface RegistrationIntent {
|
|
|
3182
3245
|
}
|
|
3183
3246
|
declare class RegistrationService {
|
|
3184
3247
|
protected readonly alepha: Alepha;
|
|
3185
|
-
protected readonly log:
|
|
3248
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
3186
3249
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
3187
3250
|
protected readonly cryptoProvider: CryptoProvider;
|
|
3188
|
-
protected readonly verificationController:
|
|
3251
|
+
protected readonly verificationController: import("alepha/server/links").HttpVirtualClient<VerificationController>;
|
|
3189
3252
|
protected readonly realmProvider: RealmProvider;
|
|
3190
3253
|
protected readonly credentialService: CredentialService;
|
|
3191
3254
|
protected readonly captchaProvider: CaptchaProvider;
|
|
3192
3255
|
protected readonly usernameSlugger: UsernameSlugger;
|
|
3193
|
-
protected readonly intentCache:
|
|
3194
|
-
protected readonly rateLimitCache:
|
|
3256
|
+
protected readonly intentCache: import("alepha/cache").CacheMiddlewareFn<RegistrationIntent>;
|
|
3257
|
+
protected readonly rateLimitCache: import("alepha/cache").CacheMiddlewareFn<number>;
|
|
3195
3258
|
protected userAudits(realmName?: string): UserAudits | undefined;
|
|
3196
3259
|
protected userNotifications(realmName?: string): UserNotifications;
|
|
3197
3260
|
/**
|
|
@@ -3241,134 +3304,135 @@ declare class UserController {
|
|
|
3241
3304
|
* Phase 1: Create a registration intent.
|
|
3242
3305
|
* Validates data, creates verification sessions, and stores intent in cache.
|
|
3243
3306
|
*/
|
|
3244
|
-
readonly createRegistrationIntent:
|
|
3245
|
-
body:
|
|
3246
|
-
password:
|
|
3247
|
-
username:
|
|
3248
|
-
email:
|
|
3249
|
-
phoneNumber:
|
|
3250
|
-
firstName:
|
|
3251
|
-
lastName:
|
|
3252
|
-
picture:
|
|
3253
|
-
captchaToken:
|
|
3254
|
-
}>;
|
|
3255
|
-
query:
|
|
3256
|
-
userRealmName:
|
|
3257
|
-
}>;
|
|
3258
|
-
response:
|
|
3259
|
-
intentId:
|
|
3260
|
-
expectCaptcha:
|
|
3261
|
-
captchaSiteKey:
|
|
3262
|
-
expectEmailVerification:
|
|
3263
|
-
expectPhoneVerification:
|
|
3264
|
-
expiresAt:
|
|
3307
|
+
readonly createRegistrationIntent: import("alepha/server").ActionPrimitiveFn<{
|
|
3308
|
+
body: import("typebox").TObject<{
|
|
3309
|
+
password: import("typebox").TString;
|
|
3310
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3311
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3312
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3313
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3314
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3315
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3316
|
+
captchaToken: import("typebox").TOptional<import("typebox").TString>;
|
|
3317
|
+
}>;
|
|
3318
|
+
query: import("typebox").TObject<{
|
|
3319
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3320
|
+
}>;
|
|
3321
|
+
response: import("typebox").TObject<{
|
|
3322
|
+
intentId: import("typebox").TString;
|
|
3323
|
+
expectCaptcha: import("typebox").TBoolean;
|
|
3324
|
+
captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
|
|
3325
|
+
expectEmailVerification: import("typebox").TBoolean;
|
|
3326
|
+
expectPhoneVerification: import("typebox").TBoolean;
|
|
3327
|
+
expiresAt: import("typebox").TString;
|
|
3265
3328
|
}>;
|
|
3266
3329
|
}>;
|
|
3267
3330
|
/**
|
|
3268
3331
|
* Phase 2: Complete registration using an intent.
|
|
3269
3332
|
* Validates verification codes and creates the user.
|
|
3270
3333
|
*/
|
|
3271
|
-
readonly createUserFromIntent:
|
|
3272
|
-
body:
|
|
3273
|
-
intentId:
|
|
3274
|
-
emailCode:
|
|
3275
|
-
phoneCode:
|
|
3276
|
-
captchaToken:
|
|
3277
|
-
}>;
|
|
3278
|
-
response:
|
|
3279
|
-
id: PgAttr<PgAttr<
|
|
3280
|
-
version: PgAttr<PgAttr<
|
|
3281
|
-
createdAt: PgAttr<PgAttr<
|
|
3282
|
-
updatedAt: PgAttr<PgAttr<
|
|
3283
|
-
realm: PgAttr<
|
|
3284
|
-
username:
|
|
3285
|
-
email:
|
|
3286
|
-
phoneNumber:
|
|
3287
|
-
roles: PgAttr<
|
|
3288
|
-
firstName:
|
|
3289
|
-
lastName:
|
|
3290
|
-
picture:
|
|
3291
|
-
enabled: PgAttr<
|
|
3292
|
-
emailVerified: PgAttr<
|
|
3293
|
-
|
|
3334
|
+
readonly createUserFromIntent: import("alepha/server").ActionPrimitiveFn<{
|
|
3335
|
+
body: import("typebox").TObject<{
|
|
3336
|
+
intentId: import("typebox").TString;
|
|
3337
|
+
emailCode: import("typebox").TOptional<import("typebox").TString>;
|
|
3338
|
+
phoneCode: import("typebox").TOptional<import("typebox").TString>;
|
|
3339
|
+
captchaToken: import("typebox").TOptional<import("typebox").TString>;
|
|
3340
|
+
}>;
|
|
3341
|
+
response: import("typebox").TObject<{
|
|
3342
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3343
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3344
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3345
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3346
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
3347
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3348
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3349
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3350
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
3351
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3352
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3353
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3354
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3355
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3356
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3357
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
3294
3358
|
}>;
|
|
3295
3359
|
}>;
|
|
3296
3360
|
/**
|
|
3297
3361
|
* Phase 1: Create a password reset intent.
|
|
3298
3362
|
* Validates email, sends verification code, and stores intent in cache.
|
|
3299
3363
|
*/
|
|
3300
|
-
readonly createPasswordResetIntent:
|
|
3301
|
-
query:
|
|
3302
|
-
userRealmName:
|
|
3364
|
+
readonly createPasswordResetIntent: import("alepha/server").ActionPrimitiveFn<{
|
|
3365
|
+
query: import("typebox").TObject<{
|
|
3366
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3303
3367
|
}>;
|
|
3304
|
-
body:
|
|
3305
|
-
email:
|
|
3368
|
+
body: import("typebox").TObject<{
|
|
3369
|
+
email: import("typebox").TString;
|
|
3306
3370
|
}>;
|
|
3307
|
-
response:
|
|
3308
|
-
intentId:
|
|
3309
|
-
expiresAt:
|
|
3371
|
+
response: import("typebox").TObject<{
|
|
3372
|
+
intentId: import("typebox").TString;
|
|
3373
|
+
expiresAt: import("typebox").TString;
|
|
3310
3374
|
}>;
|
|
3311
3375
|
}>;
|
|
3312
3376
|
/**
|
|
3313
3377
|
* Phase 2: Complete password reset using an intent.
|
|
3314
3378
|
* Validates verification code, updates password, and invalidates sessions.
|
|
3315
3379
|
*/
|
|
3316
|
-
readonly completePasswordReset:
|
|
3317
|
-
body:
|
|
3318
|
-
intentId:
|
|
3319
|
-
code:
|
|
3320
|
-
newPassword:
|
|
3380
|
+
readonly completePasswordReset: import("alepha/server").ActionPrimitiveFn<{
|
|
3381
|
+
body: import("typebox").TObject<{
|
|
3382
|
+
intentId: import("typebox").TString;
|
|
3383
|
+
code: import("typebox").TString;
|
|
3384
|
+
newPassword: import("typebox").TString;
|
|
3321
3385
|
}>;
|
|
3322
|
-
response:
|
|
3323
|
-
ok:
|
|
3324
|
-
id:
|
|
3325
|
-
count:
|
|
3386
|
+
response: import("typebox").TObject<{
|
|
3387
|
+
ok: import("typebox").TBoolean;
|
|
3388
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
3389
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
3326
3390
|
}>;
|
|
3327
3391
|
}>;
|
|
3328
3392
|
/**
|
|
3329
3393
|
* @deprecated Use createPasswordResetIntent instead
|
|
3330
3394
|
*/
|
|
3331
|
-
requestPasswordReset:
|
|
3332
|
-
query:
|
|
3333
|
-
userRealmName:
|
|
3395
|
+
requestPasswordReset: import("alepha/server").ActionPrimitiveFn<{
|
|
3396
|
+
query: import("typebox").TObject<{
|
|
3397
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3334
3398
|
}>;
|
|
3335
|
-
body:
|
|
3336
|
-
email:
|
|
3399
|
+
body: import("typebox").TObject<{
|
|
3400
|
+
email: import("typebox").TString;
|
|
3337
3401
|
}>;
|
|
3338
|
-
response:
|
|
3339
|
-
success:
|
|
3340
|
-
message:
|
|
3402
|
+
response: import("typebox").TObject<{
|
|
3403
|
+
success: import("typebox").TBoolean;
|
|
3404
|
+
message: import("typebox").TString;
|
|
3341
3405
|
}>;
|
|
3342
3406
|
}>;
|
|
3343
3407
|
/**
|
|
3344
3408
|
* @deprecated Use completePasswordReset instead
|
|
3345
3409
|
*/
|
|
3346
|
-
validateResetToken:
|
|
3347
|
-
query:
|
|
3348
|
-
email:
|
|
3349
|
-
token:
|
|
3350
|
-
userRealmName:
|
|
3410
|
+
validateResetToken: import("alepha/server").ActionPrimitiveFn<{
|
|
3411
|
+
query: import("typebox").TObject<{
|
|
3412
|
+
email: import("typebox").TString;
|
|
3413
|
+
token: import("typebox").TString;
|
|
3414
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3351
3415
|
}>;
|
|
3352
|
-
response:
|
|
3353
|
-
valid:
|
|
3354
|
-
email:
|
|
3416
|
+
response: import("typebox").TObject<{
|
|
3417
|
+
valid: import("typebox").TBoolean;
|
|
3418
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3355
3419
|
}>;
|
|
3356
3420
|
}>;
|
|
3357
3421
|
/**
|
|
3358
3422
|
* @deprecated Use completePasswordReset instead
|
|
3359
3423
|
*/
|
|
3360
|
-
resetPassword:
|
|
3361
|
-
query:
|
|
3362
|
-
userRealmName:
|
|
3424
|
+
resetPassword: import("alepha/server").ActionPrimitiveFn<{
|
|
3425
|
+
query: import("typebox").TObject<{
|
|
3426
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3363
3427
|
}>;
|
|
3364
|
-
body:
|
|
3365
|
-
email:
|
|
3366
|
-
token:
|
|
3367
|
-
newPassword:
|
|
3428
|
+
body: import("typebox").TObject<{
|
|
3429
|
+
email: import("typebox").TString;
|
|
3430
|
+
token: import("typebox").TString;
|
|
3431
|
+
newPassword: import("typebox").TString;
|
|
3368
3432
|
}>;
|
|
3369
|
-
response:
|
|
3370
|
-
success:
|
|
3371
|
-
message:
|
|
3433
|
+
response: import("typebox").TObject<{
|
|
3434
|
+
success: import("typebox").TBoolean;
|
|
3435
|
+
message: import("typebox").TString;
|
|
3372
3436
|
}>;
|
|
3373
3437
|
}>;
|
|
3374
3438
|
/**
|
|
@@ -3377,46 +3441,46 @@ declare class UserController {
|
|
|
3377
3441
|
* @param method - The verification method: "code" (default) sends a 6-digit code, "link" sends a clickable verification link.
|
|
3378
3442
|
* @param verifyUrl - Required when method is "link". The base URL for the verification link. Token and email will be appended as query params.
|
|
3379
3443
|
*/
|
|
3380
|
-
requestEmailVerification:
|
|
3381
|
-
query:
|
|
3382
|
-
userRealmName:
|
|
3383
|
-
method:
|
|
3444
|
+
requestEmailVerification: import("alepha/server").ActionPrimitiveFn<{
|
|
3445
|
+
query: import("typebox").TObject<{
|
|
3446
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3447
|
+
method: import("typebox").TOptional<import("typebox").TUnsafe<"link" | "code">>;
|
|
3384
3448
|
}>;
|
|
3385
|
-
body:
|
|
3386
|
-
email:
|
|
3449
|
+
body: import("typebox").TObject<{
|
|
3450
|
+
email: import("typebox").TString;
|
|
3387
3451
|
}>;
|
|
3388
|
-
response:
|
|
3389
|
-
success:
|
|
3390
|
-
message:
|
|
3452
|
+
response: import("typebox").TObject<{
|
|
3453
|
+
success: import("typebox").TBoolean;
|
|
3454
|
+
message: import("typebox").TString;
|
|
3391
3455
|
}>;
|
|
3392
3456
|
}>;
|
|
3393
3457
|
/**
|
|
3394
3458
|
* Verify email with a valid token.
|
|
3395
3459
|
* Updates the user's emailVerified status.
|
|
3396
3460
|
*/
|
|
3397
|
-
verifyEmail:
|
|
3398
|
-
query:
|
|
3399
|
-
userRealmName:
|
|
3461
|
+
verifyEmail: import("alepha/server").ActionPrimitiveFn<{
|
|
3462
|
+
query: import("typebox").TObject<{
|
|
3463
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3400
3464
|
}>;
|
|
3401
|
-
body:
|
|
3402
|
-
email:
|
|
3403
|
-
token:
|
|
3465
|
+
body: import("typebox").TObject<{
|
|
3466
|
+
email: import("typebox").TString;
|
|
3467
|
+
token: import("typebox").TString;
|
|
3404
3468
|
}>;
|
|
3405
|
-
response:
|
|
3406
|
-
success:
|
|
3407
|
-
message:
|
|
3469
|
+
response: import("typebox").TObject<{
|
|
3470
|
+
success: import("typebox").TBoolean;
|
|
3471
|
+
message: import("typebox").TString;
|
|
3408
3472
|
}>;
|
|
3409
3473
|
}>;
|
|
3410
3474
|
/**
|
|
3411
3475
|
* Check if an email is verified.
|
|
3412
3476
|
*/
|
|
3413
|
-
checkEmailVerification:
|
|
3414
|
-
query:
|
|
3415
|
-
email:
|
|
3416
|
-
userRealmName:
|
|
3477
|
+
checkEmailVerification: import("alepha/server").ActionPrimitiveFn<{
|
|
3478
|
+
query: import("typebox").TObject<{
|
|
3479
|
+
email: import("typebox").TString;
|
|
3480
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3417
3481
|
}>;
|
|
3418
|
-
response:
|
|
3419
|
-
verified:
|
|
3482
|
+
response: import("typebox").TObject<{
|
|
3483
|
+
verified: import("typebox").TBoolean;
|
|
3420
3484
|
}>;
|
|
3421
3485
|
}>;
|
|
3422
3486
|
}
|
|
@@ -3434,23 +3498,24 @@ declare class UserController {
|
|
|
3434
3498
|
* lazily the first time something calls `alepha.inject(UserJobs)`.
|
|
3435
3499
|
*/
|
|
3436
3500
|
declare class UserJobs {
|
|
3437
|
-
protected readonly log:
|
|
3501
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
3438
3502
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
3439
|
-
protected readonly sessionRepository:
|
|
3440
|
-
id:
|
|
3441
|
-
version:
|
|
3442
|
-
createdAt:
|
|
3443
|
-
updatedAt:
|
|
3444
|
-
refreshToken:
|
|
3445
|
-
userId:
|
|
3446
|
-
clientId:
|
|
3447
|
-
expiresAt:
|
|
3448
|
-
lastUsedAt:
|
|
3449
|
-
ip:
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3503
|
+
protected readonly sessionRepository: import("alepha/orm").Repository<import("typebox").TObject<{
|
|
3504
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
3505
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
3506
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
3507
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
3508
|
+
refreshToken: import("typebox").TString;
|
|
3509
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
3510
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
3511
|
+
expiresAt: import("typebox").TString;
|
|
3512
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3513
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
3514
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
3515
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
3516
|
+
os: import("typebox").TString;
|
|
3517
|
+
browser: import("typebox").TString;
|
|
3518
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
3454
3519
|
}>>;
|
|
3455
3520
|
}>>;
|
|
3456
3521
|
protected readonly realmProvider: RealmProvider;
|
|
@@ -3466,134 +3531,164 @@ declare class UserJobs {
|
|
|
3466
3531
|
* The idle sweep is best-effort cleanup — runtime enforcement happens in
|
|
3467
3532
|
* `SessionService.refreshSession()`.
|
|
3468
3533
|
*/
|
|
3469
|
-
readonly purgeExpiredSessions:
|
|
3534
|
+
readonly purgeExpiredSessions: import("alepha/api/jobs").JobPrimitive<import("typebox").TSchema>;
|
|
3470
3535
|
}
|
|
3471
3536
|
//#endregion
|
|
3472
3537
|
//#region ../../src/api/users/schemas/identityResourceSchema.d.ts
|
|
3473
|
-
declare const identityResourceSchema:
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
createdAt: PgAttr<PgAttr<
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
providerUserId:
|
|
3481
|
-
providerData:
|
|
3538
|
+
declare const identityResourceSchema: import("typebox").TObject<{
|
|
3539
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3540
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3541
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3542
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3543
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
3544
|
+
provider: import("typebox").TString;
|
|
3545
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
3546
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
3482
3547
|
}>;
|
|
3483
3548
|
type IdentityResource = Static<typeof identityResourceSchema>;
|
|
3484
3549
|
//#endregion
|
|
3485
3550
|
//#region ../../src/api/users/schemas/loginSchema.d.ts
|
|
3486
|
-
declare const loginSchema:
|
|
3487
|
-
username:
|
|
3488
|
-
password:
|
|
3551
|
+
declare const loginSchema: import("typebox").TObject<{
|
|
3552
|
+
username: import("typebox").TString;
|
|
3553
|
+
password: import("typebox").TString;
|
|
3489
3554
|
}>;
|
|
3490
3555
|
type LoginInput = Static<typeof loginSchema>;
|
|
3491
3556
|
//#endregion
|
|
3492
3557
|
//#region ../../src/api/users/schemas/realmConfigSchema.d.ts
|
|
3493
|
-
declare const realmConfigSchema:
|
|
3494
|
-
settings:
|
|
3495
|
-
displayName:
|
|
3496
|
-
description:
|
|
3497
|
-
logoUrl:
|
|
3498
|
-
registrationAllowed:
|
|
3499
|
-
email:
|
|
3500
|
-
username:
|
|
3501
|
-
usernameRegExp:
|
|
3502
|
-
usernameBlocklist:
|
|
3503
|
-
phoneNumber:
|
|
3504
|
-
verifyEmailRequired:
|
|
3505
|
-
verifyPhoneRequired:
|
|
3506
|
-
firstNameLastName:
|
|
3507
|
-
resetPasswordAllowed:
|
|
3508
|
-
captchaRequired:
|
|
3509
|
-
adminEmails:
|
|
3510
|
-
adminUsernames:
|
|
3511
|
-
defaultRoles:
|
|
3512
|
-
verifyEmailUrl:
|
|
3513
|
-
passwordPolicy:
|
|
3514
|
-
minLength:
|
|
3515
|
-
requireUppercase:
|
|
3516
|
-
requireLowercase:
|
|
3517
|
-
requireNumbers:
|
|
3518
|
-
requireSpecialCharacters:
|
|
3519
|
-
}>;
|
|
3520
|
-
loginRateLimit:
|
|
3521
|
-
ipMaxAttempts:
|
|
3522
|
-
accountMaxAttempts:
|
|
3523
|
-
windowMs:
|
|
3524
|
-
}>;
|
|
3525
|
-
registrationIpMaxAttempts:
|
|
3526
|
-
refreshToken:
|
|
3527
|
-
expirationIdle:
|
|
3558
|
+
declare const realmConfigSchema: import("typebox").TObject<{
|
|
3559
|
+
settings: import("typebox").TObject<{
|
|
3560
|
+
displayName: import("typebox").TOptional<import("typebox").TString>;
|
|
3561
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
3562
|
+
logoUrl: import("typebox").TOptional<import("typebox").TString>;
|
|
3563
|
+
registrationAllowed: import("typebox").TBoolean;
|
|
3564
|
+
email: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
3565
|
+
username: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">, import("typebox").TLiteral<"email">]>;
|
|
3566
|
+
usernameRegExp: import("typebox").TString;
|
|
3567
|
+
usernameBlocklist: import("typebox").TArray<import("typebox").TString>;
|
|
3568
|
+
phoneNumber: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
3569
|
+
verifyEmailRequired: import("typebox").TBoolean;
|
|
3570
|
+
verifyPhoneRequired: import("typebox").TBoolean;
|
|
3571
|
+
firstNameLastName: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
3572
|
+
resetPasswordAllowed: import("typebox").TBoolean;
|
|
3573
|
+
captchaRequired: import("typebox").TBoolean;
|
|
3574
|
+
adminEmails: import("typebox").TArray<import("typebox").TString>;
|
|
3575
|
+
adminUsernames: import("typebox").TArray<import("typebox").TString>;
|
|
3576
|
+
defaultRoles: import("typebox").TArray<import("typebox").TString>;
|
|
3577
|
+
verifyEmailUrl: import("typebox").TOptional<import("typebox").TString>;
|
|
3578
|
+
passwordPolicy: import("typebox").TObject<{
|
|
3579
|
+
minLength: import("typebox").TInteger;
|
|
3580
|
+
requireUppercase: import("typebox").TBoolean;
|
|
3581
|
+
requireLowercase: import("typebox").TBoolean;
|
|
3582
|
+
requireNumbers: import("typebox").TBoolean;
|
|
3583
|
+
requireSpecialCharacters: import("typebox").TBoolean;
|
|
3584
|
+
}>;
|
|
3585
|
+
loginRateLimit: import("typebox").TObject<{
|
|
3586
|
+
ipMaxAttempts: import("typebox").TInteger;
|
|
3587
|
+
accountMaxAttempts: import("typebox").TInteger;
|
|
3588
|
+
windowMs: import("typebox").TInteger;
|
|
3589
|
+
}>;
|
|
3590
|
+
registrationIpMaxAttempts: import("typebox").TInteger;
|
|
3591
|
+
refreshToken: import("typebox").TObject<{
|
|
3592
|
+
expirationIdle: import("typebox").TOptional<import("typebox").TInteger>;
|
|
3528
3593
|
}>;
|
|
3529
3594
|
}>;
|
|
3530
|
-
realmName:
|
|
3531
|
-
authenticationMethods:
|
|
3532
|
-
name:
|
|
3533
|
-
type:
|
|
3595
|
+
realmName: import("typebox").TString;
|
|
3596
|
+
authenticationMethods: import("typebox").TArray<import("typebox").TObject<{
|
|
3597
|
+
name: import("typebox").TString;
|
|
3598
|
+
type: import("typebox").TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
|
|
3599
|
+
}>>;
|
|
3600
|
+
captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
|
|
3601
|
+
/**
|
|
3602
|
+
* Federated (broker) social login. When present, the login UI renders one
|
|
3603
|
+
* button per provider linking to `{brokerUrl}/auth/federated/start`.
|
|
3604
|
+
*/
|
|
3605
|
+
federated: import("typebox").TOptional<import("typebox").TObject<{
|
|
3606
|
+
brokerUrl: import("typebox").TString;
|
|
3607
|
+
providers: import("typebox").TArray<import("typebox").TUnion<[import("typebox").TLiteral<"google">, import("typebox").TLiteral<"apple">]>>;
|
|
3534
3608
|
}>>;
|
|
3535
|
-
captchaSiteKey: _$typebox.TOptional<_$typebox.TString>;
|
|
3536
3609
|
}>;
|
|
3537
3610
|
type RealmConfig = Static<typeof realmConfigSchema>;
|
|
3538
3611
|
//#endregion
|
|
3539
3612
|
//#region ../../src/api/users/schemas/registerSchema.d.ts
|
|
3540
|
-
declare const registerSchema:
|
|
3541
|
-
username:
|
|
3542
|
-
email:
|
|
3543
|
-
password:
|
|
3544
|
-
confirmPassword:
|
|
3545
|
-
firstName:
|
|
3546
|
-
lastName:
|
|
3613
|
+
declare const registerSchema: import("typebox").TObject<{
|
|
3614
|
+
username: import("typebox").TString;
|
|
3615
|
+
email: import("typebox").TString;
|
|
3616
|
+
password: import("typebox").TString;
|
|
3617
|
+
confirmPassword: import("typebox").TString;
|
|
3618
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3619
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3547
3620
|
}>;
|
|
3548
3621
|
type RegisterInput = Static<typeof registerSchema>;
|
|
3549
3622
|
//#endregion
|
|
3550
3623
|
//#region ../../src/api/users/schemas/resetPasswordSchema.d.ts
|
|
3551
|
-
declare const resetPasswordRequestSchema:
|
|
3552
|
-
email:
|
|
3624
|
+
declare const resetPasswordRequestSchema: import("typebox").TObject<{
|
|
3625
|
+
email: import("typebox").TString;
|
|
3553
3626
|
}>;
|
|
3554
|
-
declare const resetPasswordSchema:
|
|
3555
|
-
token:
|
|
3556
|
-
password:
|
|
3557
|
-
confirmPassword:
|
|
3627
|
+
declare const resetPasswordSchema: import("typebox").TObject<{
|
|
3628
|
+
token: import("typebox").TString;
|
|
3629
|
+
password: import("typebox").TString;
|
|
3630
|
+
confirmPassword: import("typebox").TString;
|
|
3558
3631
|
}>;
|
|
3559
3632
|
type ResetPasswordRequest = Static<typeof resetPasswordRequestSchema>;
|
|
3560
3633
|
type ResetPasswordInput = Static<typeof resetPasswordSchema>;
|
|
3561
3634
|
//#endregion
|
|
3562
3635
|
//#region ../../src/api/users/schemas/sessionResourceSchema.d.ts
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3636
|
+
/**
|
|
3637
|
+
* Slim view of the session's owner — embedded by the admin listing so the
|
|
3638
|
+
* UI can render a human-readable identifier instead of just a UUID. Comes
|
|
3639
|
+
* back via a left join, so it's optional (a session whose user was deleted
|
|
3640
|
+
* still returns; `user` is undefined).
|
|
3641
|
+
*/
|
|
3642
|
+
declare const sessionUserSummarySchema: import("typebox").TObject<{
|
|
3643
|
+
id: import("typebox").TString;
|
|
3644
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3645
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3646
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3647
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3648
|
+
}>;
|
|
3649
|
+
declare const sessionResourceSchema: import("typebox").TObject<{
|
|
3650
|
+
id: import("typebox").TString;
|
|
3651
|
+
version: import("typebox").TNumber;
|
|
3652
|
+
createdAt: import("typebox").TString;
|
|
3653
|
+
updatedAt: import("typebox").TString;
|
|
3654
|
+
refreshToken: import("typebox").TString;
|
|
3655
|
+
userId: import("typebox").TString;
|
|
3656
|
+
expiresAt: import("typebox").TString;
|
|
3657
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
3658
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
3659
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
3660
|
+
os: import("typebox").TString;
|
|
3661
|
+
browser: import("typebox").TString;
|
|
3662
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
3663
|
+
}>>;
|
|
3664
|
+
user: import("typebox").TOptional<import("typebox").TObject<{
|
|
3665
|
+
id: import("typebox").TString;
|
|
3666
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3667
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3668
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3669
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3576
3670
|
}>>;
|
|
3577
3671
|
}>;
|
|
3578
3672
|
type SessionResource = Static<typeof sessionResourceSchema>;
|
|
3579
3673
|
//#endregion
|
|
3580
3674
|
//#region ../../src/api/users/schemas/userResourceSchema.d.ts
|
|
3581
|
-
declare const userResourceSchema:
|
|
3582
|
-
id: PgAttr<PgAttr<
|
|
3583
|
-
version: PgAttr<PgAttr<
|
|
3584
|
-
createdAt: PgAttr<PgAttr<
|
|
3585
|
-
updatedAt: PgAttr<PgAttr<
|
|
3586
|
-
realm: PgAttr<
|
|
3587
|
-
username:
|
|
3588
|
-
email:
|
|
3589
|
-
phoneNumber:
|
|
3590
|
-
roles: PgAttr<
|
|
3591
|
-
firstName:
|
|
3592
|
-
lastName:
|
|
3593
|
-
picture:
|
|
3594
|
-
enabled: PgAttr<
|
|
3595
|
-
emailVerified: PgAttr<
|
|
3596
|
-
|
|
3675
|
+
declare const userResourceSchema: import("typebox").TObject<{
|
|
3676
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3677
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3678
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3679
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3680
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
3681
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3682
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3683
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3684
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
3685
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3686
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3687
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3688
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3689
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3690
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3691
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
3597
3692
|
}>;
|
|
3598
3693
|
type UserResource = Static<typeof userResourceSchema>;
|
|
3599
3694
|
//#endregion
|
|
@@ -3603,57 +3698,60 @@ declare class SessionService {
|
|
|
3603
3698
|
protected readonly fsp: FileSystemProvider;
|
|
3604
3699
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
3605
3700
|
protected readonly cryptoProvider: CryptoProvider;
|
|
3606
|
-
protected readonly log:
|
|
3701
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
3607
3702
|
protected readonly realmProvider: RealmProvider;
|
|
3608
|
-
protected readonly fileController:
|
|
3703
|
+
protected readonly fileController: import("alepha/server/links").HttpVirtualClient<FileController>;
|
|
3609
3704
|
protected readonly cacheProvider: CacheProvider;
|
|
3610
3705
|
protected readonly usernameSlugger: UsernameSlugger;
|
|
3611
3706
|
protected userAudits(realmName?: string): UserAudits | undefined;
|
|
3707
|
+
protected sessionAudits(realmName?: string): SessionAudits | undefined;
|
|
3612
3708
|
protected userNotifications(realmName?: string): UserNotifications | undefined;
|
|
3613
|
-
users(userRealmName?: string): Repository$1<
|
|
3614
|
-
id: PgAttr<PgAttr<
|
|
3615
|
-
version: PgAttr<PgAttr<
|
|
3616
|
-
createdAt: PgAttr<PgAttr<
|
|
3617
|
-
updatedAt: PgAttr<PgAttr<
|
|
3618
|
-
realm: PgAttr<
|
|
3619
|
-
username:
|
|
3620
|
-
email:
|
|
3621
|
-
phoneNumber:
|
|
3622
|
-
roles: PgAttr<
|
|
3623
|
-
firstName:
|
|
3624
|
-
lastName:
|
|
3625
|
-
picture:
|
|
3626
|
-
enabled: PgAttr<
|
|
3627
|
-
emailVerified: PgAttr<
|
|
3628
|
-
|
|
3709
|
+
users(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
3710
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3711
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3712
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3713
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3714
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
3715
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3716
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3717
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3718
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
3719
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3720
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3721
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3722
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3723
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3724
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3725
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
3629
3726
|
}>>;
|
|
3630
|
-
sessions(userRealmName?: string): Repository$1<
|
|
3631
|
-
id: PgAttr<PgAttr<
|
|
3632
|
-
version: PgAttr<PgAttr<
|
|
3633
|
-
createdAt: PgAttr<PgAttr<
|
|
3634
|
-
updatedAt: PgAttr<PgAttr<
|
|
3635
|
-
refreshToken:
|
|
3636
|
-
userId: PgAttr<
|
|
3637
|
-
clientId:
|
|
3638
|
-
expiresAt:
|
|
3639
|
-
lastUsedAt:
|
|
3640
|
-
ip:
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3727
|
+
sessions(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
3728
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3729
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3730
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3731
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3732
|
+
refreshToken: import("typebox").TString;
|
|
3733
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
3734
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
3735
|
+
expiresAt: import("typebox").TString;
|
|
3736
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3737
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
3738
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
3739
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
3740
|
+
os: import("typebox").TString;
|
|
3741
|
+
browser: import("typebox").TString;
|
|
3742
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
3645
3743
|
}>>;
|
|
3646
3744
|
}>>;
|
|
3647
|
-
identities(userRealmName?: string): Repository$1<
|
|
3648
|
-
id: PgAttr<PgAttr<
|
|
3649
|
-
version: PgAttr<PgAttr<
|
|
3650
|
-
createdAt: PgAttr<PgAttr<
|
|
3651
|
-
updatedAt: PgAttr<PgAttr<
|
|
3652
|
-
userId: PgAttr<
|
|
3653
|
-
password:
|
|
3654
|
-
provider:
|
|
3655
|
-
providerUserId:
|
|
3656
|
-
providerData:
|
|
3745
|
+
identities(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
3746
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3747
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3748
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3749
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3750
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
3751
|
+
password: import("typebox").TOptional<import("typebox").TString>;
|
|
3752
|
+
provider: import("typebox").TString;
|
|
3753
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
3754
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
3657
3755
|
}>>;
|
|
3658
3756
|
/**
|
|
3659
3757
|
* Check if user should be auto-promoted to admin based on adminEmails/adminUsernames settings.
|
|
@@ -3702,38 +3800,40 @@ declare class SessionService {
|
|
|
3702
3800
|
sessionId: string;
|
|
3703
3801
|
}>;
|
|
3704
3802
|
refreshSession(refreshToken: string, userRealmName?: string): Promise<{
|
|
3705
|
-
user: PgStatic<
|
|
3706
|
-
id: PgAttr<PgAttr<
|
|
3707
|
-
version: PgAttr<PgAttr<
|
|
3708
|
-
createdAt: PgAttr<PgAttr<
|
|
3709
|
-
updatedAt: PgAttr<PgAttr<
|
|
3710
|
-
realm: PgAttr<
|
|
3711
|
-
username:
|
|
3712
|
-
email:
|
|
3713
|
-
phoneNumber:
|
|
3714
|
-
roles: PgAttr<
|
|
3715
|
-
firstName:
|
|
3716
|
-
lastName:
|
|
3717
|
-
picture:
|
|
3718
|
-
enabled: PgAttr<
|
|
3719
|
-
emailVerified: PgAttr<
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3803
|
+
user: PgStatic<import("typebox").TObject<{
|
|
3804
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3805
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3806
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3807
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3808
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
3809
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3810
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3811
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3812
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
3813
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3814
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3815
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3816
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3817
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3818
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3819
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
3820
|
+
}>, PgRelationMap<import("typebox").TObject<{
|
|
3821
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3822
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3823
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3824
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3825
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
3826
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3827
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3828
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3829
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
3830
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3831
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3832
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3833
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3834
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3835
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3836
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
3737
3837
|
}>>>;
|
|
3738
3838
|
expiresIn: number;
|
|
3739
3839
|
sessionId: string;
|
|
@@ -3746,15 +3846,16 @@ declare class SessionService {
|
|
|
3746
3846
|
firstName?: string | undefined;
|
|
3747
3847
|
lastName?: string | undefined;
|
|
3748
3848
|
picture?: string | undefined;
|
|
3849
|
+
lastLoginAt?: string | undefined;
|
|
3850
|
+
enabled: boolean;
|
|
3749
3851
|
id: string;
|
|
3750
|
-
createdAt: string;
|
|
3751
|
-
organizationId: string;
|
|
3752
3852
|
version: number;
|
|
3853
|
+
createdAt: string;
|
|
3753
3854
|
updatedAt: string;
|
|
3754
3855
|
realm: string;
|
|
3755
3856
|
roles: string[];
|
|
3756
|
-
enabled: boolean;
|
|
3757
3857
|
emailVerified: boolean;
|
|
3858
|
+
organizationId: string;
|
|
3758
3859
|
} | {
|
|
3759
3860
|
sub: string;
|
|
3760
3861
|
email?: string;
|
|
@@ -3803,7 +3904,7 @@ declare class SessionService {
|
|
|
3803
3904
|
*
|
|
3804
3905
|
* @module alepha.api.users
|
|
3805
3906
|
*/
|
|
3806
|
-
declare const AlephaApiUsers:
|
|
3907
|
+
declare const AlephaApiUsers: import("alepha").Service<import("alepha").Module>;
|
|
3807
3908
|
//#endregion
|
|
3808
|
-
export { $realm, AdminIdentityController, AdminSessionController, AdminUserController, AlephaApiUsers, CompletePasswordResetRequest, CompleteRegistrationRequest, CreateUser, CredentialService, DEFAULT_USER_REALM_NAME, FieldRequirement, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, LoginInput, PasswordResetIntentResponse, Realm, RealmAuthSettings, RealmConfig, RealmController, RealmFeatures, RealmOptions, RealmPrimitive, RealmProvider, RealmRepositories, RegisterInput, RegistrationIntentResponse, RegistrationService, ResetPasswordInput, ResetPasswordRequest, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserAudits, UserBuckets, UserController, UserEntity, UserJobs, UserNotifications, UserQuery, UserResource, UserService, UsernameFieldRequirement, UsernameSlugger, completePasswordResetRequestSchema, completeRegistrationRequestSchema, createUserSchema, identities, identityQuerySchema, identityResourceSchema, loginSchema, passwordResetIntentResponseSchema, realmAuthSettingsAtom, realmConfigSchema, registerSchema, registrationIntentResponseSchema, resetPasswordRequestSchema, resetPasswordSchema, sessionQuerySchema, sessionResourceSchema, sessions, updateUserSchema, userQuerySchema, userResourceSchema, users };
|
|
3909
|
+
export { $realm, AdminIdentityController, AdminSessionController, AdminUserController, AlephaApiUsers, CompletePasswordResetRequest, CompleteRegistrationRequest, CreateUser, CredentialService, DEFAULT_USER_REALM_NAME, FieldRequirement, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, LoginInput, PasswordResetIntentResponse, Realm, RealmAuthSettings, RealmConfig, RealmController, RealmFeatures, RealmOptions, RealmPrimitive, RealmProvider, RealmRepositories, RegisterInput, RegistrationIntentResponse, RegistrationService, ResetPasswordInput, ResetPasswordRequest, SessionAudits, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserAudits, UserBuckets, UserController, UserEntity, UserJobs, UserNotifications, UserQuery, UserResource, UserService, UsernameFieldRequirement, UsernameSlugger, completePasswordResetRequestSchema, completeRegistrationRequestSchema, createUserSchema, identities, identityQuerySchema, identityResourceSchema, loginSchema, passwordResetIntentResponseSchema, realmAuthSettingsAtom, realmConfigSchema, registerSchema, registrationIntentResponseSchema, resetPasswordRequestSchema, resetPasswordSchema, sessionQuerySchema, sessionResourceSchema, sessionUserSummarySchema, sessions, updateUserSchema, userQuerySchema, userResourceSchema, users };
|
|
3809
3910
|
//# sourceMappingURL=index.d.ts.map
|