alepha 0.21.2 → 0.22.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 +289 -292
- 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 +211 -216
- 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 +1073 -1006
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +283 -61
- 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 +134 -140
- 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 +417 -214
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +325 -563
- 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 +8 -12
- package/dist/cli/i18n/index.d.ts.map +1 -1
- 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 +1446 -0
- package/dist/cli/platform-lib/index.d.ts.map +1 -0
- package/dist/cli/platform-lib/index.js +2597 -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 +21 -20
- 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 +16 -20
- package/dist/mcp/index.d.ts.map +1 -1
- 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 -4
- package/dist/react/form/index.d.ts.map +1 -1
- 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 +47 -11
- package/dist/react/i18n/index.d.ts.map +1 -1
- package/dist/react/i18n/index.js +33 -1
- 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 +65 -19
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +327 -222
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +65 -29
- package/dist/react/router/index.js.map +1 -1
- 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 +167 -172
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +4 -8
- 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 +5 -7
- package/dist/server/cookies/index.d.ts.map +1 -1
- 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 +88 -73
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +19 -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 +45 -22
- 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/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 +3 -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/commands/__tests__/BuildCommand.spec.ts +43 -0
- package/src/cli/core/commands/build.ts +108 -30
- 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 -0
- 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 +353 -47
- package/src/cli/core/tasks/BuildDockerTask.ts +33 -3
- 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/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 +402 -165
- 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/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/i18n/components/Translate.tsx +47 -0
- package/src/react/i18n/index.ts +2 -0
- package/src/react/intro/components/GettingStartedAdminSlide.tsx +2 -2
- package/src/react/router/__tests__/$page.spec.tsx +3 -2
- package/src/react/router/__tests__/page-can.spec.ts +18 -13
- package/src/react/router/hooks/useQueryParams.ts +114 -14
- package/src/react/router/primitives/$page.ts +85 -4
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +3 -7
- package/src/react/router/providers/ReactServerProvider.ts +4 -13
- package/src/react/ui/services/SchemaControl.ts +3 -4
- 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/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
|
|
@@ -2200,50 +2156,52 @@ interface Realm {
|
|
|
2200
2156
|
}
|
|
2201
2157
|
declare class RealmProvider {
|
|
2202
2158
|
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:
|
|
2159
|
+
protected readonly defaultIdentities: Repository<import("typebox").TObject<{
|
|
2160
|
+
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>;
|
|
2161
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2162
|
+
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>;
|
|
2163
|
+
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>;
|
|
2164
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
2165
|
+
password: import("typebox").TOptional<import("typebox").TString>;
|
|
2166
|
+
provider: import("typebox").TString;
|
|
2167
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
2168
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2213
2169
|
}>>;
|
|
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
|
-
|
|
2170
|
+
protected readonly defaultSessions: Repository<import("typebox").TObject<{
|
|
2171
|
+
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>;
|
|
2172
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2173
|
+
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>;
|
|
2174
|
+
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>;
|
|
2175
|
+
refreshToken: import("typebox").TString;
|
|
2176
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
2177
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
2178
|
+
expiresAt: import("typebox").TString;
|
|
2179
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2180
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
2181
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
2182
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
2183
|
+
os: import("typebox").TString;
|
|
2184
|
+
browser: import("typebox").TString;
|
|
2185
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2229
2186
|
}>>;
|
|
2230
2187
|
}>>;
|
|
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
|
-
|
|
2188
|
+
protected readonly defaultUsers: Repository<import("typebox").TObject<{
|
|
2189
|
+
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>;
|
|
2190
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2191
|
+
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>;
|
|
2192
|
+
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>;
|
|
2193
|
+
realm: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2194
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2195
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2196
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2197
|
+
roles: import("alepha/orm").PgAttr<import("typebox").TArray<import("typebox").TString>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2198
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2199
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2200
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2201
|
+
enabled: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2202
|
+
emailVerified: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2203
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2204
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
2247
2205
|
}>>;
|
|
2248
2206
|
protected realms: Map<string, Realm>;
|
|
2249
2207
|
register(realmName: string, realmOptions?: RealmOptions): Realm;
|
|
@@ -2257,31 +2215,31 @@ declare class RealmProvider {
|
|
|
2257
2215
|
}
|
|
2258
2216
|
//#endregion
|
|
2259
2217
|
//#region ../../src/api/users/schemas/identityQuerySchema.d.ts
|
|
2260
|
-
declare const identityQuerySchema:
|
|
2261
|
-
page:
|
|
2262
|
-
size:
|
|
2263
|
-
sort:
|
|
2264
|
-
userId:
|
|
2265
|
-
provider:
|
|
2218
|
+
declare const identityQuerySchema: import("typebox").TObject<{
|
|
2219
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2220
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2221
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2222
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
2223
|
+
provider: import("typebox").TOptional<import("typebox").TString>;
|
|
2266
2224
|
}>;
|
|
2267
2225
|
type IdentityQuery = Static<typeof identityQuerySchema>;
|
|
2268
2226
|
//#endregion
|
|
2269
2227
|
//#region ../../src/api/users/services/IdentityService.d.ts
|
|
2270
2228
|
declare class IdentityService {
|
|
2271
2229
|
protected readonly alepha: Alepha;
|
|
2272
|
-
protected readonly log:
|
|
2230
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
2273
2231
|
protected readonly realmProvider: RealmProvider;
|
|
2274
2232
|
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:
|
|
2233
|
+
identities(userRealmName?: string): import("alepha/orm").Repository<import("typebox").TObject<{
|
|
2234
|
+
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>;
|
|
2235
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2236
|
+
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>;
|
|
2237
|
+
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>;
|
|
2238
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
2239
|
+
password: import("typebox").TOptional<import("typebox").TString>;
|
|
2240
|
+
provider: import("typebox").TString;
|
|
2241
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
2242
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2285
2243
|
}>>;
|
|
2286
2244
|
/**
|
|
2287
2245
|
* Find identities with pagination and filtering.
|
|
@@ -2305,93 +2263,94 @@ declare class AdminIdentityController {
|
|
|
2305
2263
|
/**
|
|
2306
2264
|
* Find identities with pagination and filtering.
|
|
2307
2265
|
*/
|
|
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:
|
|
2266
|
+
readonly findIdentities: import("alepha/server").ActionPrimitiveFn<{
|
|
2267
|
+
query: import("typebox").TObject<{
|
|
2268
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2269
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2270
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2271
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
2272
|
+
provider: import("typebox").TOptional<import("typebox").TString>;
|
|
2273
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2274
|
+
}>;
|
|
2275
|
+
response: import("alepha").TPage<import("typebox").TObject<{
|
|
2276
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2277
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2278
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2279
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2280
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
2281
|
+
provider: import("typebox").TString;
|
|
2282
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
2283
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2326
2284
|
}>>;
|
|
2327
2285
|
}>;
|
|
2328
2286
|
/**
|
|
2329
2287
|
* Get an identity by ID.
|
|
2330
2288
|
*/
|
|
2331
|
-
readonly getIdentity:
|
|
2332
|
-
params:
|
|
2333
|
-
id:
|
|
2289
|
+
readonly getIdentity: import("alepha/server").ActionPrimitiveFn<{
|
|
2290
|
+
params: import("typebox").TObject<{
|
|
2291
|
+
id: import("typebox").TString;
|
|
2334
2292
|
}>;
|
|
2335
|
-
query:
|
|
2336
|
-
userRealmName:
|
|
2293
|
+
query: import("typebox").TObject<{
|
|
2294
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2337
2295
|
}>;
|
|
2338
|
-
response:
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
createdAt: PgAttr<PgAttr<
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
providerUserId:
|
|
2346
|
-
providerData:
|
|
2296
|
+
response: import("typebox").TObject<{
|
|
2297
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2298
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2299
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2300
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2301
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
2302
|
+
provider: import("typebox").TString;
|
|
2303
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
2304
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2347
2305
|
}>;
|
|
2348
2306
|
}>;
|
|
2349
2307
|
/**
|
|
2350
2308
|
* Delete an identity.
|
|
2351
2309
|
*/
|
|
2352
|
-
readonly deleteIdentity:
|
|
2353
|
-
params:
|
|
2354
|
-
id:
|
|
2310
|
+
readonly deleteIdentity: import("alepha/server").ActionPrimitiveFn<{
|
|
2311
|
+
params: import("typebox").TObject<{
|
|
2312
|
+
id: import("typebox").TString;
|
|
2355
2313
|
}>;
|
|
2356
|
-
query:
|
|
2357
|
-
userRealmName:
|
|
2314
|
+
query: import("typebox").TObject<{
|
|
2315
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2358
2316
|
}>;
|
|
2359
|
-
response:
|
|
2360
|
-
ok:
|
|
2361
|
-
id:
|
|
2362
|
-
count:
|
|
2317
|
+
response: import("typebox").TObject<{
|
|
2318
|
+
ok: import("typebox").TBoolean;
|
|
2319
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
2320
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
2363
2321
|
}>;
|
|
2364
2322
|
}>;
|
|
2365
2323
|
}
|
|
2366
2324
|
//#endregion
|
|
2367
2325
|
//#region ../../src/api/users/schemas/sessionQuerySchema.d.ts
|
|
2368
|
-
declare const sessionQuerySchema:
|
|
2369
|
-
page:
|
|
2370
|
-
size:
|
|
2371
|
-
sort:
|
|
2372
|
-
userId:
|
|
2326
|
+
declare const sessionQuerySchema: import("typebox").TObject<{
|
|
2327
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2328
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2329
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2330
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
2373
2331
|
}>;
|
|
2374
2332
|
type SessionQuery = Static<typeof sessionQuerySchema>;
|
|
2375
2333
|
//#endregion
|
|
2376
2334
|
//#region ../../src/api/users/services/SessionCrudService.d.ts
|
|
2377
2335
|
declare class SessionCrudService {
|
|
2378
|
-
protected readonly log:
|
|
2336
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
2379
2337
|
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
|
-
|
|
2338
|
+
sessions(userRealmName?: string): import("alepha/orm").Repository<import("typebox").TObject<{
|
|
2339
|
+
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>;
|
|
2340
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2341
|
+
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>;
|
|
2342
|
+
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>;
|
|
2343
|
+
refreshToken: import("typebox").TString;
|
|
2344
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
2345
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
2346
|
+
expiresAt: import("typebox").TString;
|
|
2347
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2348
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
2349
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
2350
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
2351
|
+
os: import("typebox").TString;
|
|
2352
|
+
browser: import("typebox").TString;
|
|
2353
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2395
2354
|
}>>;
|
|
2396
2355
|
}>>;
|
|
2397
2356
|
/**
|
|
@@ -2420,190 +2379,213 @@ declare class AdminSessionController {
|
|
|
2420
2379
|
/**
|
|
2421
2380
|
* Find sessions with pagination and filtering.
|
|
2422
2381
|
*/
|
|
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
|
-
|
|
2382
|
+
readonly findSessions: import("alepha/server").ActionPrimitiveFn<{
|
|
2383
|
+
query: import("typebox").TObject<{
|
|
2384
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2385
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2386
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2387
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
2388
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2389
|
+
}>;
|
|
2390
|
+
response: import("alepha").TPage<import("typebox").TObject<{
|
|
2391
|
+
id: import("typebox").TString;
|
|
2392
|
+
version: import("typebox").TNumber;
|
|
2393
|
+
createdAt: import("typebox").TString;
|
|
2394
|
+
updatedAt: import("typebox").TString;
|
|
2395
|
+
refreshToken: import("typebox").TString;
|
|
2396
|
+
userId: import("typebox").TString;
|
|
2397
|
+
expiresAt: import("typebox").TString;
|
|
2398
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
2399
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
2400
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
2401
|
+
os: import("typebox").TString;
|
|
2402
|
+
browser: import("typebox").TString;
|
|
2403
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2404
|
+
}>>;
|
|
2405
|
+
user: import("typebox").TOptional<import("typebox").TObject<{
|
|
2406
|
+
id: import("typebox").TString;
|
|
2407
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2408
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2409
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2410
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2444
2411
|
}>>;
|
|
2445
2412
|
}>>;
|
|
2446
2413
|
}>;
|
|
2447
2414
|
/**
|
|
2448
2415
|
* Get a session by ID.
|
|
2449
2416
|
*/
|
|
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
|
-
|
|
2417
|
+
readonly getSession: import("alepha/server").ActionPrimitiveFn<{
|
|
2418
|
+
params: import("typebox").TObject<{
|
|
2419
|
+
id: import("typebox").TString;
|
|
2420
|
+
}>;
|
|
2421
|
+
query: import("typebox").TObject<{
|
|
2422
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2423
|
+
}>;
|
|
2424
|
+
response: import("typebox").TObject<{
|
|
2425
|
+
id: import("typebox").TString;
|
|
2426
|
+
version: import("typebox").TNumber;
|
|
2427
|
+
createdAt: import("typebox").TString;
|
|
2428
|
+
updatedAt: import("typebox").TString;
|
|
2429
|
+
refreshToken: import("typebox").TString;
|
|
2430
|
+
userId: import("typebox").TString;
|
|
2431
|
+
expiresAt: import("typebox").TString;
|
|
2432
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
2433
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
2434
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
2435
|
+
os: import("typebox").TString;
|
|
2436
|
+
browser: import("typebox").TString;
|
|
2437
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2438
|
+
}>>;
|
|
2439
|
+
user: import("typebox").TOptional<import("typebox").TObject<{
|
|
2440
|
+
id: import("typebox").TString;
|
|
2441
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2442
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2443
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2444
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2470
2445
|
}>>;
|
|
2471
2446
|
}>;
|
|
2472
2447
|
}>;
|
|
2473
2448
|
/**
|
|
2474
2449
|
* Delete a session.
|
|
2475
2450
|
*/
|
|
2476
|
-
readonly deleteSession:
|
|
2477
|
-
params:
|
|
2478
|
-
id:
|
|
2451
|
+
readonly deleteSession: import("alepha/server").ActionPrimitiveFn<{
|
|
2452
|
+
params: import("typebox").TObject<{
|
|
2453
|
+
id: import("typebox").TString;
|
|
2479
2454
|
}>;
|
|
2480
|
-
query:
|
|
2481
|
-
userRealmName:
|
|
2455
|
+
query: import("typebox").TObject<{
|
|
2456
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2482
2457
|
}>;
|
|
2483
|
-
response:
|
|
2484
|
-
ok:
|
|
2485
|
-
id:
|
|
2486
|
-
count:
|
|
2458
|
+
response: import("typebox").TObject<{
|
|
2459
|
+
ok: import("typebox").TBoolean;
|
|
2460
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
2461
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
2487
2462
|
}>;
|
|
2488
2463
|
}>;
|
|
2489
2464
|
/**
|
|
2490
2465
|
* Delete many sessions in one repository call.
|
|
2491
2466
|
*/
|
|
2492
|
-
readonly deleteSessions:
|
|
2493
|
-
query:
|
|
2494
|
-
userRealmName:
|
|
2467
|
+
readonly deleteSessions: import("alepha/server").ActionPrimitiveFn<{
|
|
2468
|
+
query: import("typebox").TObject<{
|
|
2469
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2495
2470
|
}>;
|
|
2496
|
-
body:
|
|
2497
|
-
ids:
|
|
2471
|
+
body: import("typebox").TObject<{
|
|
2472
|
+
ids: import("typebox").TArray<import("typebox").TString>;
|
|
2498
2473
|
}>;
|
|
2499
|
-
response:
|
|
2500
|
-
deleted:
|
|
2474
|
+
response: import("typebox").TObject<{
|
|
2475
|
+
deleted: import("typebox").TArray<import("typebox").TString>;
|
|
2501
2476
|
}>;
|
|
2502
2477
|
}>;
|
|
2503
2478
|
}
|
|
2504
2479
|
//#endregion
|
|
2505
2480
|
//#region ../../src/api/users/notifications/UserNotifications.d.ts
|
|
2506
2481
|
declare class UserNotifications {
|
|
2507
|
-
readonly passwordReset:
|
|
2508
|
-
email:
|
|
2509
|
-
code:
|
|
2510
|
-
expiresInMinutes:
|
|
2482
|
+
readonly passwordReset: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2483
|
+
email: import("typebox").TString;
|
|
2484
|
+
code: import("typebox").TString;
|
|
2485
|
+
expiresInMinutes: import("typebox").TNumber;
|
|
2511
2486
|
}>>;
|
|
2512
|
-
readonly emailVerification:
|
|
2513
|
-
email:
|
|
2514
|
-
code:
|
|
2515
|
-
expiresInMinutes:
|
|
2487
|
+
readonly emailVerification: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2488
|
+
email: import("typebox").TString;
|
|
2489
|
+
code: import("typebox").TString;
|
|
2490
|
+
expiresInMinutes: import("typebox").TNumber;
|
|
2516
2491
|
}>>;
|
|
2517
|
-
readonly phoneVerification:
|
|
2518
|
-
phoneNumber:
|
|
2519
|
-
code:
|
|
2520
|
-
expiresInMinutes:
|
|
2492
|
+
readonly phoneVerification: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2493
|
+
phoneNumber: import("typebox").TString;
|
|
2494
|
+
code: import("typebox").TString;
|
|
2495
|
+
expiresInMinutes: import("typebox").TNumber;
|
|
2521
2496
|
}>>;
|
|
2522
|
-
readonly passwordResetLink:
|
|
2523
|
-
email:
|
|
2524
|
-
resetUrl:
|
|
2525
|
-
expiresInMinutes:
|
|
2497
|
+
readonly passwordResetLink: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2498
|
+
email: import("typebox").TString;
|
|
2499
|
+
resetUrl: import("typebox").TString;
|
|
2500
|
+
expiresInMinutes: import("typebox").TNumber;
|
|
2526
2501
|
}>>;
|
|
2527
|
-
readonly accountLockout:
|
|
2528
|
-
email:
|
|
2529
|
-
lockoutMinutes:
|
|
2502
|
+
readonly accountLockout: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2503
|
+
email: import("typebox").TString;
|
|
2504
|
+
lockoutMinutes: import("typebox").TNumber;
|
|
2530
2505
|
}>>;
|
|
2531
|
-
readonly emailVerificationLink:
|
|
2532
|
-
email:
|
|
2533
|
-
verifyUrl:
|
|
2534
|
-
expiresInMinutes:
|
|
2506
|
+
readonly emailVerificationLink: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
|
|
2507
|
+
email: import("typebox").TString;
|
|
2508
|
+
verifyUrl: import("typebox").TString;
|
|
2509
|
+
expiresInMinutes: import("typebox").TNumber;
|
|
2535
2510
|
}>>;
|
|
2536
2511
|
}
|
|
2537
2512
|
//#endregion
|
|
2538
2513
|
//#region ../../src/api/users/schemas/createUserSchema.d.ts
|
|
2539
|
-
declare const createUserSchema:
|
|
2540
|
-
email:
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
version:
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
roles:
|
|
2549
|
-
firstName:
|
|
2550
|
-
lastName:
|
|
2551
|
-
picture:
|
|
2552
|
-
|
|
2553
|
-
|
|
2514
|
+
declare const createUserSchema: import("typebox").TObject<{
|
|
2515
|
+
email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2516
|
+
username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2517
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2518
|
+
enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2519
|
+
id: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
|
|
2520
|
+
version: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
|
|
2521
|
+
createdAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
|
|
2522
|
+
updatedAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
|
|
2523
|
+
roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
|
|
2524
|
+
firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2525
|
+
lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2526
|
+
picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2527
|
+
emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2528
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2529
|
+
organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
|
|
2554
2530
|
}>;
|
|
2555
2531
|
type CreateUser = Static<typeof createUserSchema>;
|
|
2556
2532
|
//#endregion
|
|
2557
2533
|
//#region ../../src/api/users/schemas/updateUserSchema.d.ts
|
|
2558
|
-
declare const updateUserSchema:
|
|
2559
|
-
email:
|
|
2560
|
-
|
|
2561
|
-
phoneNumber:
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2534
|
+
declare const updateUserSchema: import("typebox").TObject<{
|
|
2535
|
+
email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2536
|
+
username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2537
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2538
|
+
enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2539
|
+
realm: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_DEFAULT>>;
|
|
2540
|
+
roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
|
|
2541
|
+
firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2542
|
+
lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2543
|
+
picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2544
|
+
emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2545
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2546
|
+
organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
|
|
2568
2547
|
}>;
|
|
2569
2548
|
type UpdateUser = Static<typeof updateUserSchema>;
|
|
2570
2549
|
//#endregion
|
|
2571
2550
|
//#region ../../src/api/users/schemas/userQuerySchema.d.ts
|
|
2572
|
-
declare const userQuerySchema:
|
|
2573
|
-
page:
|
|
2574
|
-
size:
|
|
2575
|
-
sort:
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2551
|
+
declare const userQuerySchema: import("typebox").TObject<{
|
|
2552
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2553
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2554
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2555
|
+
search: import("typebox").TOptional<import("typebox").TString>;
|
|
2556
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2557
|
+
enabled: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
2558
|
+
emailVerified: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
2559
|
+
roles: import("typebox").TOptional<import("typebox").TArray<import("typebox").TString>>;
|
|
2580
2560
|
}>;
|
|
2581
2561
|
type UserQuery = Static<typeof userQuerySchema>;
|
|
2582
2562
|
//#endregion
|
|
2583
2563
|
//#region ../../src/api/users/services/UserService.d.ts
|
|
2584
2564
|
declare class UserService {
|
|
2585
2565
|
protected readonly alepha: Alepha;
|
|
2586
|
-
protected readonly log:
|
|
2587
|
-
protected readonly verificationController:
|
|
2566
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
2567
|
+
protected readonly verificationController: import("alepha/server/links").HttpVirtualClient<VerificationController>;
|
|
2588
2568
|
protected readonly realmProvider: RealmProvider;
|
|
2569
|
+
protected readonly cryptoProvider: CryptoProvider;
|
|
2589
2570
|
protected userAudits(realmName?: string): UserAudits | undefined;
|
|
2590
2571
|
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
|
-
|
|
2572
|
+
users(userRealmName?: string): import("alepha/orm").Repository<import("typebox").TObject<{
|
|
2573
|
+
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>;
|
|
2574
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2575
|
+
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>;
|
|
2576
|
+
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>;
|
|
2577
|
+
realm: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2578
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2579
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2580
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2581
|
+
roles: import("alepha/orm").PgAttr<import("typebox").TArray<import("typebox").TString>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2582
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2583
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2584
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2585
|
+
enabled: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2586
|
+
emailVerified: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
2587
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2588
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
2607
2589
|
}>>;
|
|
2608
2590
|
/**
|
|
2609
2591
|
* Request email verification for a user.
|
|
@@ -2638,6 +2620,13 @@ declare class UserService {
|
|
|
2638
2620
|
* Update an existing user.
|
|
2639
2621
|
*/
|
|
2640
2622
|
updateUser(id: string, data: UpdateUser, userRealmName?: string): Promise<UserEntity>;
|
|
2623
|
+
/**
|
|
2624
|
+
* Set (or reset) a user's password. Upserts a "credentials" identity
|
|
2625
|
+
* with the new hash. Used by admin password-set flows; does NOT
|
|
2626
|
+
* verify any old password or token — the caller is responsible for
|
|
2627
|
+
* authorization.
|
|
2628
|
+
*/
|
|
2629
|
+
setPassword(id: string, newPassword: string, userRealmName?: string): Promise<void>;
|
|
2641
2630
|
/**
|
|
2642
2631
|
* Delete a user by ID.
|
|
2643
2632
|
*/
|
|
@@ -2649,160 +2638,205 @@ declare class AdminUserController {
|
|
|
2649
2638
|
protected readonly url = "/users";
|
|
2650
2639
|
protected readonly group = "admin:users";
|
|
2651
2640
|
protected readonly userService: UserService;
|
|
2641
|
+
protected readonly securityProvider: SecurityProvider;
|
|
2642
|
+
/**
|
|
2643
|
+
* List roles available in a realm. Used by the admin UI to render the
|
|
2644
|
+
* role picker and grey out defaults (which cannot be removed).
|
|
2645
|
+
*/
|
|
2646
|
+
readonly findRoles: import("alepha/server").ActionPrimitiveFn<{
|
|
2647
|
+
query: import("typebox").TObject<{
|
|
2648
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2649
|
+
}>;
|
|
2650
|
+
response: import("typebox").TArray<import("typebox").TObject<{
|
|
2651
|
+
name: import("typebox").TString;
|
|
2652
|
+
default: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
2653
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
2654
|
+
}>>;
|
|
2655
|
+
}>;
|
|
2652
2656
|
/**
|
|
2653
2657
|
* Find users with pagination and filtering.
|
|
2654
2658
|
*/
|
|
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
|
-
|
|
2659
|
+
readonly findUsers: import("alepha/server").ActionPrimitiveFn<{
|
|
2660
|
+
query: import("typebox").TObject<{
|
|
2661
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2662
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2663
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
2664
|
+
search: import("typebox").TOptional<import("typebox").TString>;
|
|
2665
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2666
|
+
enabled: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
2667
|
+
emailVerified: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
2668
|
+
roles: import("typebox").TOptional<import("typebox").TArray<import("typebox").TString>>;
|
|
2669
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2670
|
+
}>;
|
|
2671
|
+
response: import("alepha").TPage<import("typebox").TObject<{
|
|
2672
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2673
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2674
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2675
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2676
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
2677
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2678
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2679
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2680
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
2681
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2682
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2683
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2684
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2685
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2686
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2687
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
2682
2688
|
}>>;
|
|
2683
2689
|
}>;
|
|
2684
2690
|
/**
|
|
2685
2691
|
* Get a user by ID.
|
|
2686
2692
|
*/
|
|
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
|
-
|
|
2693
|
+
readonly getUser: import("alepha/server").ActionPrimitiveFn<{
|
|
2694
|
+
params: import("typebox").TObject<{
|
|
2695
|
+
id: import("typebox").TString;
|
|
2696
|
+
}>;
|
|
2697
|
+
query: import("typebox").TObject<{
|
|
2698
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2699
|
+
}>;
|
|
2700
|
+
response: import("typebox").TObject<{
|
|
2701
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2702
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2703
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2704
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2705
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
2706
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2707
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2708
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2709
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
2710
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2711
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2712
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2713
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2714
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2715
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2716
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
2710
2717
|
}>;
|
|
2711
2718
|
}>;
|
|
2712
2719
|
/**
|
|
2713
2720
|
* Create a new user.
|
|
2714
2721
|
*/
|
|
2715
|
-
readonly createUser:
|
|
2716
|
-
query:
|
|
2717
|
-
userRealmName:
|
|
2718
|
-
}>;
|
|
2719
|
-
body:
|
|
2720
|
-
email:
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
version:
|
|
2726
|
-
|
|
2727
|
-
|
|
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
|
-
|
|
2722
|
+
readonly createUser: import("alepha/server").ActionPrimitiveFn<{
|
|
2723
|
+
query: import("typebox").TObject<{
|
|
2724
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2725
|
+
}>;
|
|
2726
|
+
body: import("typebox").TObject<{
|
|
2727
|
+
email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2728
|
+
username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2729
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2730
|
+
enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2731
|
+
id: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
|
|
2732
|
+
version: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
|
|
2733
|
+
createdAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
|
|
2734
|
+
updatedAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
|
|
2735
|
+
roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
|
|
2736
|
+
firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2737
|
+
lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2738
|
+
picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2739
|
+
emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2740
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2741
|
+
organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
|
|
2742
|
+
}>;
|
|
2743
|
+
response: import("typebox").TObject<{
|
|
2744
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2745
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2746
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2747
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2748
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
2749
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2750
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2751
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2752
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
2753
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2754
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2755
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2756
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2757
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2758
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2759
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
2751
2760
|
}>;
|
|
2752
2761
|
}>;
|
|
2753
2762
|
/**
|
|
2754
2763
|
* Update a user.
|
|
2755
2764
|
*/
|
|
2756
|
-
readonly updateUser:
|
|
2757
|
-
params:
|
|
2758
|
-
id:
|
|
2759
|
-
}>;
|
|
2760
|
-
query:
|
|
2761
|
-
userRealmName:
|
|
2762
|
-
}>;
|
|
2763
|
-
body:
|
|
2764
|
-
email:
|
|
2765
|
-
|
|
2766
|
-
phoneNumber:
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2765
|
+
readonly updateUser: import("alepha/server").ActionPrimitiveFn<{
|
|
2766
|
+
params: import("typebox").TObject<{
|
|
2767
|
+
id: import("typebox").TString;
|
|
2768
|
+
}>;
|
|
2769
|
+
query: import("typebox").TObject<{
|
|
2770
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2771
|
+
}>;
|
|
2772
|
+
body: import("typebox").TObject<{
|
|
2773
|
+
email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2774
|
+
username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2775
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2776
|
+
enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2777
|
+
realm: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_DEFAULT>>;
|
|
2778
|
+
roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
|
|
2779
|
+
firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2780
|
+
lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2781
|
+
picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2782
|
+
emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
|
|
2783
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
|
|
2784
|
+
organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
|
|
2785
|
+
}>;
|
|
2786
|
+
response: import("typebox").TObject<{
|
|
2787
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2788
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2789
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2790
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2791
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
2792
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2793
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2794
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2795
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
2796
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2797
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2798
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2799
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2800
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
2801
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
2802
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
2803
|
+
}>;
|
|
2804
|
+
}>;
|
|
2805
|
+
/**
|
|
2806
|
+
* Set (or reset) a user's password. Admin-only flow — does NOT
|
|
2807
|
+
* require knowing the previous password. Hash is stored as a
|
|
2808
|
+
* "credentials" identity for the user (upsert).
|
|
2809
|
+
*/
|
|
2810
|
+
readonly setUserPassword: import("alepha/server").ActionPrimitiveFn<{
|
|
2811
|
+
params: import("typebox").TObject<{
|
|
2812
|
+
id: import("typebox").TString;
|
|
2813
|
+
}>;
|
|
2814
|
+
query: import("typebox").TObject<{
|
|
2815
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2816
|
+
}>;
|
|
2817
|
+
body: import("typebox").TObject<{
|
|
2818
|
+
password: import("typebox").TString;
|
|
2819
|
+
}>;
|
|
2820
|
+
response: import("typebox").TObject<{
|
|
2821
|
+
ok: import("typebox").TBoolean;
|
|
2822
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
2823
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
2790
2824
|
}>;
|
|
2791
2825
|
}>;
|
|
2792
2826
|
/**
|
|
2793
2827
|
* Delete a user.
|
|
2794
2828
|
*/
|
|
2795
|
-
readonly deleteUser:
|
|
2796
|
-
params:
|
|
2797
|
-
id:
|
|
2829
|
+
readonly deleteUser: import("alepha/server").ActionPrimitiveFn<{
|
|
2830
|
+
params: import("typebox").TObject<{
|
|
2831
|
+
id: import("typebox").TString;
|
|
2798
2832
|
}>;
|
|
2799
|
-
query:
|
|
2800
|
-
userRealmName:
|
|
2833
|
+
query: import("typebox").TObject<{
|
|
2834
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2801
2835
|
}>;
|
|
2802
|
-
response:
|
|
2803
|
-
ok:
|
|
2804
|
-
id:
|
|
2805
|
-
count:
|
|
2836
|
+
response: import("typebox").TObject<{
|
|
2837
|
+
ok: import("typebox").TBoolean;
|
|
2838
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
2839
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
2806
2840
|
}>;
|
|
2807
2841
|
}>;
|
|
2808
2842
|
/**
|
|
@@ -2810,15 +2844,15 @@ declare class AdminUserController {
|
|
|
2810
2844
|
* cascades and side-effects run as if called one-by-one. Errors on a single
|
|
2811
2845
|
* id surface with that id in the response.
|
|
2812
2846
|
*/
|
|
2813
|
-
readonly deleteUsers:
|
|
2814
|
-
query:
|
|
2815
|
-
userRealmName:
|
|
2847
|
+
readonly deleteUsers: import("alepha/server").ActionPrimitiveFn<{
|
|
2848
|
+
query: import("typebox").TObject<{
|
|
2849
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2816
2850
|
}>;
|
|
2817
|
-
body:
|
|
2818
|
-
ids:
|
|
2851
|
+
body: import("typebox").TObject<{
|
|
2852
|
+
ids: import("typebox").TArray<import("typebox").TString>;
|
|
2819
2853
|
}>;
|
|
2820
|
-
response:
|
|
2821
|
-
deleted:
|
|
2854
|
+
response: import("typebox").TObject<{
|
|
2855
|
+
deleted: import("typebox").TArray<import("typebox").TString>;
|
|
2822
2856
|
}>;
|
|
2823
2857
|
}>;
|
|
2824
2858
|
}
|
|
@@ -2838,64 +2872,64 @@ declare class RealmController {
|
|
|
2838
2872
|
* Get realm configuration settings.
|
|
2839
2873
|
* This endpoint is not exposed in the API documentation.
|
|
2840
2874
|
*/
|
|
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:
|
|
2875
|
+
readonly getRealmConfig: import("alepha/server").ActionPrimitiveFn<{
|
|
2876
|
+
query: import("typebox").TObject<{
|
|
2877
|
+
realmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2878
|
+
}>;
|
|
2879
|
+
response: import("typebox").TObject<{
|
|
2880
|
+
settings: import("typebox").TObject<{
|
|
2881
|
+
displayName: import("typebox").TOptional<import("typebox").TString>;
|
|
2882
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
2883
|
+
logoUrl: import("typebox").TOptional<import("typebox").TString>;
|
|
2884
|
+
registrationAllowed: import("typebox").TBoolean;
|
|
2885
|
+
email: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
2886
|
+
username: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">, import("typebox").TLiteral<"email">]>;
|
|
2887
|
+
usernameRegExp: import("typebox").TString;
|
|
2888
|
+
usernameBlocklist: import("typebox").TArray<import("typebox").TString>;
|
|
2889
|
+
phoneNumber: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
2890
|
+
verifyEmailRequired: import("typebox").TBoolean;
|
|
2891
|
+
verifyPhoneRequired: import("typebox").TBoolean;
|
|
2892
|
+
firstNameLastName: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
2893
|
+
resetPasswordAllowed: import("typebox").TBoolean;
|
|
2894
|
+
captchaRequired: import("typebox").TBoolean;
|
|
2895
|
+
adminEmails: import("typebox").TArray<import("typebox").TString>;
|
|
2896
|
+
adminUsernames: import("typebox").TArray<import("typebox").TString>;
|
|
2897
|
+
defaultRoles: import("typebox").TArray<import("typebox").TString>;
|
|
2898
|
+
verifyEmailUrl: import("typebox").TOptional<import("typebox").TString>;
|
|
2899
|
+
passwordPolicy: import("typebox").TObject<{
|
|
2900
|
+
minLength: import("typebox").TInteger;
|
|
2901
|
+
requireUppercase: import("typebox").TBoolean;
|
|
2902
|
+
requireLowercase: import("typebox").TBoolean;
|
|
2903
|
+
requireNumbers: import("typebox").TBoolean;
|
|
2904
|
+
requireSpecialCharacters: import("typebox").TBoolean;
|
|
2871
2905
|
}>;
|
|
2872
|
-
loginRateLimit:
|
|
2873
|
-
ipMaxAttempts:
|
|
2874
|
-
accountMaxAttempts:
|
|
2875
|
-
windowMs:
|
|
2906
|
+
loginRateLimit: import("typebox").TObject<{
|
|
2907
|
+
ipMaxAttempts: import("typebox").TInteger;
|
|
2908
|
+
accountMaxAttempts: import("typebox").TInteger;
|
|
2909
|
+
windowMs: import("typebox").TInteger;
|
|
2876
2910
|
}>;
|
|
2877
|
-
registrationIpMaxAttempts:
|
|
2878
|
-
refreshToken:
|
|
2879
|
-
expirationIdle:
|
|
2911
|
+
registrationIpMaxAttempts: import("typebox").TInteger;
|
|
2912
|
+
refreshToken: import("typebox").TObject<{
|
|
2913
|
+
expirationIdle: import("typebox").TOptional<import("typebox").TInteger>;
|
|
2880
2914
|
}>;
|
|
2881
2915
|
}>;
|
|
2882
|
-
realmName:
|
|
2883
|
-
authenticationMethods:
|
|
2884
|
-
name:
|
|
2885
|
-
type:
|
|
2916
|
+
realmName: import("typebox").TString;
|
|
2917
|
+
authenticationMethods: import("typebox").TArray<import("typebox").TObject<{
|
|
2918
|
+
name: import("typebox").TString;
|
|
2919
|
+
type: import("typebox").TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
|
|
2886
2920
|
}>>;
|
|
2887
|
-
captchaSiteKey:
|
|
2921
|
+
captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
|
|
2888
2922
|
}>;
|
|
2889
2923
|
}>;
|
|
2890
|
-
readonly checkUsernameAvailability:
|
|
2891
|
-
query:
|
|
2892
|
-
realmName:
|
|
2924
|
+
readonly checkUsernameAvailability: import("alepha/server").ActionPrimitiveFn<{
|
|
2925
|
+
query: import("typebox").TObject<{
|
|
2926
|
+
realmName: import("typebox").TOptional<import("typebox").TString>;
|
|
2893
2927
|
}>;
|
|
2894
|
-
body:
|
|
2895
|
-
username:
|
|
2928
|
+
body: import("typebox").TObject<{
|
|
2929
|
+
username: import("typebox").TString;
|
|
2896
2930
|
}>;
|
|
2897
|
-
response:
|
|
2898
|
-
available:
|
|
2931
|
+
response: import("typebox").TObject<{
|
|
2932
|
+
available: import("typebox").TBoolean;
|
|
2899
2933
|
}>;
|
|
2900
2934
|
}>;
|
|
2901
2935
|
}
|
|
@@ -2907,10 +2941,10 @@ declare class RealmController {
|
|
|
2907
2941
|
* Requires the intent ID from Phase 1, the verification code,
|
|
2908
2942
|
* and the new password.
|
|
2909
2943
|
*/
|
|
2910
|
-
declare const completePasswordResetRequestSchema:
|
|
2911
|
-
intentId:
|
|
2912
|
-
code:
|
|
2913
|
-
newPassword:
|
|
2944
|
+
declare const completePasswordResetRequestSchema: import("typebox").TObject<{
|
|
2945
|
+
intentId: import("typebox").TString;
|
|
2946
|
+
code: import("typebox").TString;
|
|
2947
|
+
newPassword: import("typebox").TString;
|
|
2914
2948
|
}>;
|
|
2915
2949
|
type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSchema>;
|
|
2916
2950
|
//#endregion
|
|
@@ -2921,9 +2955,9 @@ type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSc
|
|
|
2921
2955
|
* Contains the intent ID needed for Phase 2 completion,
|
|
2922
2956
|
* along with expiration time.
|
|
2923
2957
|
*/
|
|
2924
|
-
declare const passwordResetIntentResponseSchema:
|
|
2925
|
-
intentId:
|
|
2926
|
-
expiresAt:
|
|
2958
|
+
declare const passwordResetIntentResponseSchema: import("typebox").TObject<{
|
|
2959
|
+
intentId: import("typebox").TString;
|
|
2960
|
+
expiresAt: import("typebox").TString;
|
|
2927
2961
|
}>;
|
|
2928
2962
|
type PasswordResetIntentResponse = Static<typeof passwordResetIntentResponseSchema>;
|
|
2929
2963
|
//#endregion
|
|
@@ -2940,58 +2974,61 @@ interface PasswordResetIntent {
|
|
|
2940
2974
|
}
|
|
2941
2975
|
declare class CredentialService {
|
|
2942
2976
|
protected readonly alepha: Alepha;
|
|
2943
|
-
protected readonly log:
|
|
2977
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
2944
2978
|
protected readonly cryptoProvider: CryptoProvider;
|
|
2945
2979
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
2946
2980
|
protected readonly verificationService: VerificationService;
|
|
2947
2981
|
protected readonly realmProvider: RealmProvider;
|
|
2948
2982
|
protected userAudits(realmName?: string): UserAudits | undefined;
|
|
2983
|
+
protected sessionAudits(realmName?: string): SessionAudits | undefined;
|
|
2949
2984
|
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
|
-
|
|
2985
|
+
protected readonly intentCache: import("alepha/cache").CacheMiddlewareFn<PasswordResetIntent>;
|
|
2986
|
+
users(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
2987
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
2988
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
2989
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
2990
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
2991
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
2992
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
2993
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
2994
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
2995
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
2996
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
2997
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
2998
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
2999
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3000
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3001
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3002
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
2967
3003
|
}>>;
|
|
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
|
-
|
|
3004
|
+
sessions(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
3005
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3006
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3007
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3008
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3009
|
+
refreshToken: import("typebox").TString;
|
|
3010
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
3011
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
3012
|
+
expiresAt: import("typebox").TString;
|
|
3013
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3014
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
3015
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
3016
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
3017
|
+
os: import("typebox").TString;
|
|
3018
|
+
browser: import("typebox").TString;
|
|
3019
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
2983
3020
|
}>>;
|
|
2984
3021
|
}>>;
|
|
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:
|
|
3022
|
+
identities(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
3023
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3024
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3025
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3026
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3027
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
3028
|
+
password: import("typebox").TOptional<import("typebox").TString>;
|
|
3029
|
+
provider: import("typebox").TString;
|
|
3030
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
3031
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
2995
3032
|
}>>;
|
|
2996
3033
|
/**
|
|
2997
3034
|
* Validate a password against the realm's password policy.
|
|
@@ -3032,11 +3069,11 @@ declare class CredentialService {
|
|
|
3032
3069
|
}
|
|
3033
3070
|
//#endregion
|
|
3034
3071
|
//#region ../../src/api/users/schemas/completeRegistrationRequestSchema.d.ts
|
|
3035
|
-
declare const completeRegistrationRequestSchema:
|
|
3036
|
-
intentId:
|
|
3037
|
-
emailCode:
|
|
3038
|
-
phoneCode:
|
|
3039
|
-
captchaToken:
|
|
3072
|
+
declare const completeRegistrationRequestSchema: import("typebox").TObject<{
|
|
3073
|
+
intentId: import("typebox").TString;
|
|
3074
|
+
emailCode: import("typebox").TOptional<import("typebox").TString>;
|
|
3075
|
+
phoneCode: import("typebox").TOptional<import("typebox").TString>;
|
|
3076
|
+
captchaToken: import("typebox").TOptional<import("typebox").TString>;
|
|
3040
3077
|
}>;
|
|
3041
3078
|
type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSchema>;
|
|
3042
3079
|
//#endregion
|
|
@@ -3045,26 +3082,26 @@ type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSche
|
|
|
3045
3082
|
* Schema for user registration request body.
|
|
3046
3083
|
* Password is always required, other fields depend on realm settings.
|
|
3047
3084
|
*/
|
|
3048
|
-
declare const registerRequestSchema:
|
|
3049
|
-
password:
|
|
3050
|
-
username:
|
|
3051
|
-
email:
|
|
3052
|
-
phoneNumber:
|
|
3053
|
-
firstName:
|
|
3054
|
-
lastName:
|
|
3055
|
-
picture:
|
|
3056
|
-
captchaToken:
|
|
3085
|
+
declare const registerRequestSchema: import("typebox").TObject<{
|
|
3086
|
+
password: import("typebox").TString;
|
|
3087
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3088
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3089
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3090
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3091
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3092
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3093
|
+
captchaToken: import("typebox").TOptional<import("typebox").TString>;
|
|
3057
3094
|
}>;
|
|
3058
3095
|
type RegisterRequest = Static<typeof registerRequestSchema>;
|
|
3059
3096
|
//#endregion
|
|
3060
3097
|
//#region ../../src/api/users/schemas/registrationIntentResponseSchema.d.ts
|
|
3061
|
-
declare const registrationIntentResponseSchema:
|
|
3062
|
-
intentId:
|
|
3063
|
-
expectCaptcha:
|
|
3064
|
-
captchaSiteKey:
|
|
3065
|
-
expectEmailVerification:
|
|
3066
|
-
expectPhoneVerification:
|
|
3067
|
-
expiresAt:
|
|
3098
|
+
declare const registrationIntentResponseSchema: import("typebox").TObject<{
|
|
3099
|
+
intentId: import("typebox").TString;
|
|
3100
|
+
expectCaptcha: import("typebox").TBoolean;
|
|
3101
|
+
captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
|
|
3102
|
+
expectEmailVerification: import("typebox").TBoolean;
|
|
3103
|
+
expectPhoneVerification: import("typebox").TBoolean;
|
|
3104
|
+
expiresAt: import("typebox").TString;
|
|
3068
3105
|
}>;
|
|
3069
3106
|
type RegistrationIntentResponse = Static<typeof registrationIntentResponseSchema>;
|
|
3070
3107
|
//#endregion
|
|
@@ -3094,7 +3131,7 @@ type RegistrationIntentResponse = Static<typeof registrationIntentResponseSchema
|
|
|
3094
3131
|
*/
|
|
3095
3132
|
declare class UsernameSlugger {
|
|
3096
3133
|
protected readonly realmProvider: RealmProvider;
|
|
3097
|
-
protected readonly log:
|
|
3134
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
3098
3135
|
/**
|
|
3099
3136
|
* Floor for derived usernames. Shorter slugs are padded with random
|
|
3100
3137
|
* alphanumerics. Matches the lower bound of the default `usernameRegExp`.
|
|
@@ -3182,16 +3219,16 @@ interface RegistrationIntent {
|
|
|
3182
3219
|
}
|
|
3183
3220
|
declare class RegistrationService {
|
|
3184
3221
|
protected readonly alepha: Alepha;
|
|
3185
|
-
protected readonly log:
|
|
3222
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
3186
3223
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
3187
3224
|
protected readonly cryptoProvider: CryptoProvider;
|
|
3188
|
-
protected readonly verificationController:
|
|
3225
|
+
protected readonly verificationController: import("alepha/server/links").HttpVirtualClient<VerificationController>;
|
|
3189
3226
|
protected readonly realmProvider: RealmProvider;
|
|
3190
3227
|
protected readonly credentialService: CredentialService;
|
|
3191
3228
|
protected readonly captchaProvider: CaptchaProvider;
|
|
3192
3229
|
protected readonly usernameSlugger: UsernameSlugger;
|
|
3193
|
-
protected readonly intentCache:
|
|
3194
|
-
protected readonly rateLimitCache:
|
|
3230
|
+
protected readonly intentCache: import("alepha/cache").CacheMiddlewareFn<RegistrationIntent>;
|
|
3231
|
+
protected readonly rateLimitCache: import("alepha/cache").CacheMiddlewareFn<number>;
|
|
3195
3232
|
protected userAudits(realmName?: string): UserAudits | undefined;
|
|
3196
3233
|
protected userNotifications(realmName?: string): UserNotifications;
|
|
3197
3234
|
/**
|
|
@@ -3241,134 +3278,135 @@ declare class UserController {
|
|
|
3241
3278
|
* Phase 1: Create a registration intent.
|
|
3242
3279
|
* Validates data, creates verification sessions, and stores intent in cache.
|
|
3243
3280
|
*/
|
|
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:
|
|
3281
|
+
readonly createRegistrationIntent: import("alepha/server").ActionPrimitiveFn<{
|
|
3282
|
+
body: import("typebox").TObject<{
|
|
3283
|
+
password: import("typebox").TString;
|
|
3284
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3285
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3286
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3287
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3288
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3289
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3290
|
+
captchaToken: import("typebox").TOptional<import("typebox").TString>;
|
|
3291
|
+
}>;
|
|
3292
|
+
query: import("typebox").TObject<{
|
|
3293
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3294
|
+
}>;
|
|
3295
|
+
response: import("typebox").TObject<{
|
|
3296
|
+
intentId: import("typebox").TString;
|
|
3297
|
+
expectCaptcha: import("typebox").TBoolean;
|
|
3298
|
+
captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
|
|
3299
|
+
expectEmailVerification: import("typebox").TBoolean;
|
|
3300
|
+
expectPhoneVerification: import("typebox").TBoolean;
|
|
3301
|
+
expiresAt: import("typebox").TString;
|
|
3265
3302
|
}>;
|
|
3266
3303
|
}>;
|
|
3267
3304
|
/**
|
|
3268
3305
|
* Phase 2: Complete registration using an intent.
|
|
3269
3306
|
* Validates verification codes and creates the user.
|
|
3270
3307
|
*/
|
|
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
|
-
|
|
3308
|
+
readonly createUserFromIntent: import("alepha/server").ActionPrimitiveFn<{
|
|
3309
|
+
body: import("typebox").TObject<{
|
|
3310
|
+
intentId: import("typebox").TString;
|
|
3311
|
+
emailCode: import("typebox").TOptional<import("typebox").TString>;
|
|
3312
|
+
phoneCode: import("typebox").TOptional<import("typebox").TString>;
|
|
3313
|
+
captchaToken: import("typebox").TOptional<import("typebox").TString>;
|
|
3314
|
+
}>;
|
|
3315
|
+
response: import("typebox").TObject<{
|
|
3316
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3317
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3318
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3319
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3320
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
3321
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3322
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3323
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3324
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
3325
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3326
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3327
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3328
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3329
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3330
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3331
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
3294
3332
|
}>;
|
|
3295
3333
|
}>;
|
|
3296
3334
|
/**
|
|
3297
3335
|
* Phase 1: Create a password reset intent.
|
|
3298
3336
|
* Validates email, sends verification code, and stores intent in cache.
|
|
3299
3337
|
*/
|
|
3300
|
-
readonly createPasswordResetIntent:
|
|
3301
|
-
query:
|
|
3302
|
-
userRealmName:
|
|
3338
|
+
readonly createPasswordResetIntent: import("alepha/server").ActionPrimitiveFn<{
|
|
3339
|
+
query: import("typebox").TObject<{
|
|
3340
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3303
3341
|
}>;
|
|
3304
|
-
body:
|
|
3305
|
-
email:
|
|
3342
|
+
body: import("typebox").TObject<{
|
|
3343
|
+
email: import("typebox").TString;
|
|
3306
3344
|
}>;
|
|
3307
|
-
response:
|
|
3308
|
-
intentId:
|
|
3309
|
-
expiresAt:
|
|
3345
|
+
response: import("typebox").TObject<{
|
|
3346
|
+
intentId: import("typebox").TString;
|
|
3347
|
+
expiresAt: import("typebox").TString;
|
|
3310
3348
|
}>;
|
|
3311
3349
|
}>;
|
|
3312
3350
|
/**
|
|
3313
3351
|
* Phase 2: Complete password reset using an intent.
|
|
3314
3352
|
* Validates verification code, updates password, and invalidates sessions.
|
|
3315
3353
|
*/
|
|
3316
|
-
readonly completePasswordReset:
|
|
3317
|
-
body:
|
|
3318
|
-
intentId:
|
|
3319
|
-
code:
|
|
3320
|
-
newPassword:
|
|
3354
|
+
readonly completePasswordReset: import("alepha/server").ActionPrimitiveFn<{
|
|
3355
|
+
body: import("typebox").TObject<{
|
|
3356
|
+
intentId: import("typebox").TString;
|
|
3357
|
+
code: import("typebox").TString;
|
|
3358
|
+
newPassword: import("typebox").TString;
|
|
3321
3359
|
}>;
|
|
3322
|
-
response:
|
|
3323
|
-
ok:
|
|
3324
|
-
id:
|
|
3325
|
-
count:
|
|
3360
|
+
response: import("typebox").TObject<{
|
|
3361
|
+
ok: import("typebox").TBoolean;
|
|
3362
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
3363
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
3326
3364
|
}>;
|
|
3327
3365
|
}>;
|
|
3328
3366
|
/**
|
|
3329
3367
|
* @deprecated Use createPasswordResetIntent instead
|
|
3330
3368
|
*/
|
|
3331
|
-
requestPasswordReset:
|
|
3332
|
-
query:
|
|
3333
|
-
userRealmName:
|
|
3369
|
+
requestPasswordReset: import("alepha/server").ActionPrimitiveFn<{
|
|
3370
|
+
query: import("typebox").TObject<{
|
|
3371
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3334
3372
|
}>;
|
|
3335
|
-
body:
|
|
3336
|
-
email:
|
|
3373
|
+
body: import("typebox").TObject<{
|
|
3374
|
+
email: import("typebox").TString;
|
|
3337
3375
|
}>;
|
|
3338
|
-
response:
|
|
3339
|
-
success:
|
|
3340
|
-
message:
|
|
3376
|
+
response: import("typebox").TObject<{
|
|
3377
|
+
success: import("typebox").TBoolean;
|
|
3378
|
+
message: import("typebox").TString;
|
|
3341
3379
|
}>;
|
|
3342
3380
|
}>;
|
|
3343
3381
|
/**
|
|
3344
3382
|
* @deprecated Use completePasswordReset instead
|
|
3345
3383
|
*/
|
|
3346
|
-
validateResetToken:
|
|
3347
|
-
query:
|
|
3348
|
-
email:
|
|
3349
|
-
token:
|
|
3350
|
-
userRealmName:
|
|
3384
|
+
validateResetToken: import("alepha/server").ActionPrimitiveFn<{
|
|
3385
|
+
query: import("typebox").TObject<{
|
|
3386
|
+
email: import("typebox").TString;
|
|
3387
|
+
token: import("typebox").TString;
|
|
3388
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3351
3389
|
}>;
|
|
3352
|
-
response:
|
|
3353
|
-
valid:
|
|
3354
|
-
email:
|
|
3390
|
+
response: import("typebox").TObject<{
|
|
3391
|
+
valid: import("typebox").TBoolean;
|
|
3392
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3355
3393
|
}>;
|
|
3356
3394
|
}>;
|
|
3357
3395
|
/**
|
|
3358
3396
|
* @deprecated Use completePasswordReset instead
|
|
3359
3397
|
*/
|
|
3360
|
-
resetPassword:
|
|
3361
|
-
query:
|
|
3362
|
-
userRealmName:
|
|
3398
|
+
resetPassword: import("alepha/server").ActionPrimitiveFn<{
|
|
3399
|
+
query: import("typebox").TObject<{
|
|
3400
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3363
3401
|
}>;
|
|
3364
|
-
body:
|
|
3365
|
-
email:
|
|
3366
|
-
token:
|
|
3367
|
-
newPassword:
|
|
3402
|
+
body: import("typebox").TObject<{
|
|
3403
|
+
email: import("typebox").TString;
|
|
3404
|
+
token: import("typebox").TString;
|
|
3405
|
+
newPassword: import("typebox").TString;
|
|
3368
3406
|
}>;
|
|
3369
|
-
response:
|
|
3370
|
-
success:
|
|
3371
|
-
message:
|
|
3407
|
+
response: import("typebox").TObject<{
|
|
3408
|
+
success: import("typebox").TBoolean;
|
|
3409
|
+
message: import("typebox").TString;
|
|
3372
3410
|
}>;
|
|
3373
3411
|
}>;
|
|
3374
3412
|
/**
|
|
@@ -3377,46 +3415,46 @@ declare class UserController {
|
|
|
3377
3415
|
* @param method - The verification method: "code" (default) sends a 6-digit code, "link" sends a clickable verification link.
|
|
3378
3416
|
* @param verifyUrl - Required when method is "link". The base URL for the verification link. Token and email will be appended as query params.
|
|
3379
3417
|
*/
|
|
3380
|
-
requestEmailVerification:
|
|
3381
|
-
query:
|
|
3382
|
-
userRealmName:
|
|
3383
|
-
method:
|
|
3418
|
+
requestEmailVerification: import("alepha/server").ActionPrimitiveFn<{
|
|
3419
|
+
query: import("typebox").TObject<{
|
|
3420
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3421
|
+
method: import("typebox").TOptional<import("typebox").TUnsafe<"link" | "code">>;
|
|
3384
3422
|
}>;
|
|
3385
|
-
body:
|
|
3386
|
-
email:
|
|
3423
|
+
body: import("typebox").TObject<{
|
|
3424
|
+
email: import("typebox").TString;
|
|
3387
3425
|
}>;
|
|
3388
|
-
response:
|
|
3389
|
-
success:
|
|
3390
|
-
message:
|
|
3426
|
+
response: import("typebox").TObject<{
|
|
3427
|
+
success: import("typebox").TBoolean;
|
|
3428
|
+
message: import("typebox").TString;
|
|
3391
3429
|
}>;
|
|
3392
3430
|
}>;
|
|
3393
3431
|
/**
|
|
3394
3432
|
* Verify email with a valid token.
|
|
3395
3433
|
* Updates the user's emailVerified status.
|
|
3396
3434
|
*/
|
|
3397
|
-
verifyEmail:
|
|
3398
|
-
query:
|
|
3399
|
-
userRealmName:
|
|
3435
|
+
verifyEmail: import("alepha/server").ActionPrimitiveFn<{
|
|
3436
|
+
query: import("typebox").TObject<{
|
|
3437
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3400
3438
|
}>;
|
|
3401
|
-
body:
|
|
3402
|
-
email:
|
|
3403
|
-
token:
|
|
3439
|
+
body: import("typebox").TObject<{
|
|
3440
|
+
email: import("typebox").TString;
|
|
3441
|
+
token: import("typebox").TString;
|
|
3404
3442
|
}>;
|
|
3405
|
-
response:
|
|
3406
|
-
success:
|
|
3407
|
-
message:
|
|
3443
|
+
response: import("typebox").TObject<{
|
|
3444
|
+
success: import("typebox").TBoolean;
|
|
3445
|
+
message: import("typebox").TString;
|
|
3408
3446
|
}>;
|
|
3409
3447
|
}>;
|
|
3410
3448
|
/**
|
|
3411
3449
|
* Check if an email is verified.
|
|
3412
3450
|
*/
|
|
3413
|
-
checkEmailVerification:
|
|
3414
|
-
query:
|
|
3415
|
-
email:
|
|
3416
|
-
userRealmName:
|
|
3451
|
+
checkEmailVerification: import("alepha/server").ActionPrimitiveFn<{
|
|
3452
|
+
query: import("typebox").TObject<{
|
|
3453
|
+
email: import("typebox").TString;
|
|
3454
|
+
userRealmName: import("typebox").TOptional<import("typebox").TString>;
|
|
3417
3455
|
}>;
|
|
3418
|
-
response:
|
|
3419
|
-
verified:
|
|
3456
|
+
response: import("typebox").TObject<{
|
|
3457
|
+
verified: import("typebox").TBoolean;
|
|
3420
3458
|
}>;
|
|
3421
3459
|
}>;
|
|
3422
3460
|
}
|
|
@@ -3434,23 +3472,24 @@ declare class UserController {
|
|
|
3434
3472
|
* lazily the first time something calls `alepha.inject(UserJobs)`.
|
|
3435
3473
|
*/
|
|
3436
3474
|
declare class UserJobs {
|
|
3437
|
-
protected readonly log:
|
|
3475
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
3438
3476
|
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
|
-
|
|
3477
|
+
protected readonly sessionRepository: import("alepha/orm").Repository<import("typebox").TObject<{
|
|
3478
|
+
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>;
|
|
3479
|
+
version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
3480
|
+
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>;
|
|
3481
|
+
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>;
|
|
3482
|
+
refreshToken: import("typebox").TString;
|
|
3483
|
+
userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
|
|
3484
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
3485
|
+
expiresAt: import("typebox").TString;
|
|
3486
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3487
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
3488
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
3489
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
3490
|
+
os: import("typebox").TString;
|
|
3491
|
+
browser: import("typebox").TString;
|
|
3492
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
3454
3493
|
}>>;
|
|
3455
3494
|
}>>;
|
|
3456
3495
|
protected readonly realmProvider: RealmProvider;
|
|
@@ -3466,134 +3505,156 @@ declare class UserJobs {
|
|
|
3466
3505
|
* The idle sweep is best-effort cleanup — runtime enforcement happens in
|
|
3467
3506
|
* `SessionService.refreshSession()`.
|
|
3468
3507
|
*/
|
|
3469
|
-
readonly purgeExpiredSessions:
|
|
3508
|
+
readonly purgeExpiredSessions: import("alepha/api/jobs").JobPrimitive<import("typebox").TSchema>;
|
|
3470
3509
|
}
|
|
3471
3510
|
//#endregion
|
|
3472
3511
|
//#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:
|
|
3512
|
+
declare const identityResourceSchema: import("typebox").TObject<{
|
|
3513
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3514
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3515
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3516
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3517
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
3518
|
+
provider: import("typebox").TString;
|
|
3519
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
3520
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
3482
3521
|
}>;
|
|
3483
3522
|
type IdentityResource = Static<typeof identityResourceSchema>;
|
|
3484
3523
|
//#endregion
|
|
3485
3524
|
//#region ../../src/api/users/schemas/loginSchema.d.ts
|
|
3486
|
-
declare const loginSchema:
|
|
3487
|
-
username:
|
|
3488
|
-
password:
|
|
3525
|
+
declare const loginSchema: import("typebox").TObject<{
|
|
3526
|
+
username: import("typebox").TString;
|
|
3527
|
+
password: import("typebox").TString;
|
|
3489
3528
|
}>;
|
|
3490
3529
|
type LoginInput = Static<typeof loginSchema>;
|
|
3491
3530
|
//#endregion
|
|
3492
3531
|
//#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:
|
|
3532
|
+
declare const realmConfigSchema: import("typebox").TObject<{
|
|
3533
|
+
settings: import("typebox").TObject<{
|
|
3534
|
+
displayName: import("typebox").TOptional<import("typebox").TString>;
|
|
3535
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
3536
|
+
logoUrl: import("typebox").TOptional<import("typebox").TString>;
|
|
3537
|
+
registrationAllowed: import("typebox").TBoolean;
|
|
3538
|
+
email: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
3539
|
+
username: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">, import("typebox").TLiteral<"email">]>;
|
|
3540
|
+
usernameRegExp: import("typebox").TString;
|
|
3541
|
+
usernameBlocklist: import("typebox").TArray<import("typebox").TString>;
|
|
3542
|
+
phoneNumber: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
3543
|
+
verifyEmailRequired: import("typebox").TBoolean;
|
|
3544
|
+
verifyPhoneRequired: import("typebox").TBoolean;
|
|
3545
|
+
firstNameLastName: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
|
|
3546
|
+
resetPasswordAllowed: import("typebox").TBoolean;
|
|
3547
|
+
captchaRequired: import("typebox").TBoolean;
|
|
3548
|
+
adminEmails: import("typebox").TArray<import("typebox").TString>;
|
|
3549
|
+
adminUsernames: import("typebox").TArray<import("typebox").TString>;
|
|
3550
|
+
defaultRoles: import("typebox").TArray<import("typebox").TString>;
|
|
3551
|
+
verifyEmailUrl: import("typebox").TOptional<import("typebox").TString>;
|
|
3552
|
+
passwordPolicy: import("typebox").TObject<{
|
|
3553
|
+
minLength: import("typebox").TInteger;
|
|
3554
|
+
requireUppercase: import("typebox").TBoolean;
|
|
3555
|
+
requireLowercase: import("typebox").TBoolean;
|
|
3556
|
+
requireNumbers: import("typebox").TBoolean;
|
|
3557
|
+
requireSpecialCharacters: import("typebox").TBoolean;
|
|
3558
|
+
}>;
|
|
3559
|
+
loginRateLimit: import("typebox").TObject<{
|
|
3560
|
+
ipMaxAttempts: import("typebox").TInteger;
|
|
3561
|
+
accountMaxAttempts: import("typebox").TInteger;
|
|
3562
|
+
windowMs: import("typebox").TInteger;
|
|
3563
|
+
}>;
|
|
3564
|
+
registrationIpMaxAttempts: import("typebox").TInteger;
|
|
3565
|
+
refreshToken: import("typebox").TObject<{
|
|
3566
|
+
expirationIdle: import("typebox").TOptional<import("typebox").TInteger>;
|
|
3528
3567
|
}>;
|
|
3529
3568
|
}>;
|
|
3530
|
-
realmName:
|
|
3531
|
-
authenticationMethods:
|
|
3532
|
-
name:
|
|
3533
|
-
type:
|
|
3569
|
+
realmName: import("typebox").TString;
|
|
3570
|
+
authenticationMethods: import("typebox").TArray<import("typebox").TObject<{
|
|
3571
|
+
name: import("typebox").TString;
|
|
3572
|
+
type: import("typebox").TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
|
|
3534
3573
|
}>>;
|
|
3535
|
-
captchaSiteKey:
|
|
3574
|
+
captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
|
|
3536
3575
|
}>;
|
|
3537
3576
|
type RealmConfig = Static<typeof realmConfigSchema>;
|
|
3538
3577
|
//#endregion
|
|
3539
3578
|
//#region ../../src/api/users/schemas/registerSchema.d.ts
|
|
3540
|
-
declare const registerSchema:
|
|
3541
|
-
username:
|
|
3542
|
-
email:
|
|
3543
|
-
password:
|
|
3544
|
-
confirmPassword:
|
|
3545
|
-
firstName:
|
|
3546
|
-
lastName:
|
|
3579
|
+
declare const registerSchema: import("typebox").TObject<{
|
|
3580
|
+
username: import("typebox").TString;
|
|
3581
|
+
email: import("typebox").TString;
|
|
3582
|
+
password: import("typebox").TString;
|
|
3583
|
+
confirmPassword: import("typebox").TString;
|
|
3584
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3585
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3547
3586
|
}>;
|
|
3548
3587
|
type RegisterInput = Static<typeof registerSchema>;
|
|
3549
3588
|
//#endregion
|
|
3550
3589
|
//#region ../../src/api/users/schemas/resetPasswordSchema.d.ts
|
|
3551
|
-
declare const resetPasswordRequestSchema:
|
|
3552
|
-
email:
|
|
3590
|
+
declare const resetPasswordRequestSchema: import("typebox").TObject<{
|
|
3591
|
+
email: import("typebox").TString;
|
|
3553
3592
|
}>;
|
|
3554
|
-
declare const resetPasswordSchema:
|
|
3555
|
-
token:
|
|
3556
|
-
password:
|
|
3557
|
-
confirmPassword:
|
|
3593
|
+
declare const resetPasswordSchema: import("typebox").TObject<{
|
|
3594
|
+
token: import("typebox").TString;
|
|
3595
|
+
password: import("typebox").TString;
|
|
3596
|
+
confirmPassword: import("typebox").TString;
|
|
3558
3597
|
}>;
|
|
3559
3598
|
type ResetPasswordRequest = Static<typeof resetPasswordRequestSchema>;
|
|
3560
3599
|
type ResetPasswordInput = Static<typeof resetPasswordSchema>;
|
|
3561
3600
|
//#endregion
|
|
3562
3601
|
//#region ../../src/api/users/schemas/sessionResourceSchema.d.ts
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3602
|
+
/**
|
|
3603
|
+
* Slim view of the session's owner — embedded by the admin listing so the
|
|
3604
|
+
* UI can render a human-readable identifier instead of just a UUID. Comes
|
|
3605
|
+
* back via a left join, so it's optional (a session whose user was deleted
|
|
3606
|
+
* still returns; `user` is undefined).
|
|
3607
|
+
*/
|
|
3608
|
+
declare const sessionUserSummarySchema: import("typebox").TObject<{
|
|
3609
|
+
id: import("typebox").TString;
|
|
3610
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3611
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3612
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3613
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3614
|
+
}>;
|
|
3615
|
+
declare const sessionResourceSchema: import("typebox").TObject<{
|
|
3616
|
+
id: import("typebox").TString;
|
|
3617
|
+
version: import("typebox").TNumber;
|
|
3618
|
+
createdAt: import("typebox").TString;
|
|
3619
|
+
updatedAt: import("typebox").TString;
|
|
3620
|
+
refreshToken: import("typebox").TString;
|
|
3621
|
+
userId: import("typebox").TString;
|
|
3622
|
+
expiresAt: import("typebox").TString;
|
|
3623
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
3624
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
3625
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
3626
|
+
os: import("typebox").TString;
|
|
3627
|
+
browser: import("typebox").TString;
|
|
3628
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
3629
|
+
}>>;
|
|
3630
|
+
user: import("typebox").TOptional<import("typebox").TObject<{
|
|
3631
|
+
id: import("typebox").TString;
|
|
3632
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3633
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3634
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3635
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3576
3636
|
}>>;
|
|
3577
3637
|
}>;
|
|
3578
3638
|
type SessionResource = Static<typeof sessionResourceSchema>;
|
|
3579
3639
|
//#endregion
|
|
3580
3640
|
//#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
|
-
|
|
3641
|
+
declare const userResourceSchema: import("typebox").TObject<{
|
|
3642
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3643
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3644
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3645
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3646
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
3647
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3648
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3649
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3650
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
3651
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3652
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3653
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3654
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3655
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3656
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3657
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
3597
3658
|
}>;
|
|
3598
3659
|
type UserResource = Static<typeof userResourceSchema>;
|
|
3599
3660
|
//#endregion
|
|
@@ -3603,57 +3664,60 @@ declare class SessionService {
|
|
|
3603
3664
|
protected readonly fsp: FileSystemProvider;
|
|
3604
3665
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
3605
3666
|
protected readonly cryptoProvider: CryptoProvider;
|
|
3606
|
-
protected readonly log:
|
|
3667
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
3607
3668
|
protected readonly realmProvider: RealmProvider;
|
|
3608
|
-
protected readonly fileController:
|
|
3669
|
+
protected readonly fileController: import("alepha/server/links").HttpVirtualClient<FileController>;
|
|
3609
3670
|
protected readonly cacheProvider: CacheProvider;
|
|
3610
3671
|
protected readonly usernameSlugger: UsernameSlugger;
|
|
3611
3672
|
protected userAudits(realmName?: string): UserAudits | undefined;
|
|
3673
|
+
protected sessionAudits(realmName?: string): SessionAudits | undefined;
|
|
3612
3674
|
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
|
-
|
|
3675
|
+
users(userRealmName?: string): Repository$1<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>;
|
|
3629
3692
|
}>>;
|
|
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
|
-
|
|
3693
|
+
sessions(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
3694
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3695
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3696
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3697
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3698
|
+
refreshToken: import("typebox").TString;
|
|
3699
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
3700
|
+
clientId: import("typebox").TOptional<import("typebox").TString>;
|
|
3701
|
+
expiresAt: import("typebox").TString;
|
|
3702
|
+
lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3703
|
+
ip: import("typebox").TOptional<import("typebox").TString>;
|
|
3704
|
+
country: import("typebox").TOptional<import("typebox").TString>;
|
|
3705
|
+
userAgent: import("typebox").TOptional<import("typebox").TObject<{
|
|
3706
|
+
os: import("typebox").TString;
|
|
3707
|
+
browser: import("typebox").TString;
|
|
3708
|
+
device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
|
|
3645
3709
|
}>>;
|
|
3646
3710
|
}>>;
|
|
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:
|
|
3711
|
+
identities(userRealmName?: string): Repository$1<import("typebox").TObject<{
|
|
3712
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3713
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3714
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3715
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3716
|
+
userId: PgAttr<import("typebox").TString, typeof PG_REF>;
|
|
3717
|
+
password: import("typebox").TOptional<import("typebox").TString>;
|
|
3718
|
+
provider: import("typebox").TString;
|
|
3719
|
+
providerUserId: import("typebox").TOptional<import("typebox").TString>;
|
|
3720
|
+
providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
3657
3721
|
}>>;
|
|
3658
3722
|
/**
|
|
3659
3723
|
* Check if user should be auto-promoted to admin based on adminEmails/adminUsernames settings.
|
|
@@ -3702,38 +3766,40 @@ declare class SessionService {
|
|
|
3702
3766
|
sessionId: string;
|
|
3703
3767
|
}>;
|
|
3704
3768
|
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
|
-
|
|
3769
|
+
user: PgStatic<import("typebox").TObject<{
|
|
3770
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3771
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3772
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3773
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3774
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
3775
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3776
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3777
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3778
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
3779
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3780
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3781
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3782
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3783
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3784
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3785
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
3786
|
+
}>, PgRelationMap<import("typebox").TObject<{
|
|
3787
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
3788
|
+
version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
3789
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
3790
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
3791
|
+
realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
|
|
3792
|
+
username: import("typebox").TOptional<import("typebox").TString>;
|
|
3793
|
+
email: import("typebox").TOptional<import("typebox").TString>;
|
|
3794
|
+
phoneNumber: import("typebox").TOptional<import("typebox").TString>;
|
|
3795
|
+
roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
|
|
3796
|
+
firstName: import("typebox").TOptional<import("typebox").TString>;
|
|
3797
|
+
lastName: import("typebox").TOptional<import("typebox").TString>;
|
|
3798
|
+
picture: import("typebox").TOptional<import("typebox").TString>;
|
|
3799
|
+
enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3800
|
+
emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
3801
|
+
lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
|
|
3802
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
3737
3803
|
}>>>;
|
|
3738
3804
|
expiresIn: number;
|
|
3739
3805
|
sessionId: string;
|
|
@@ -3741,20 +3807,21 @@ declare class SessionService {
|
|
|
3741
3807
|
deleteSession(refreshToken: string, userRealmName?: string): Promise<void>;
|
|
3742
3808
|
link(provider: string, profile: OAuth2Profile, userRealmName?: string): Promise<{
|
|
3743
3809
|
email?: string | undefined;
|
|
3744
|
-
phoneNumber?: string | undefined;
|
|
3745
3810
|
username?: string | undefined;
|
|
3811
|
+
phoneNumber?: string | undefined;
|
|
3746
3812
|
firstName?: string | undefined;
|
|
3747
3813
|
lastName?: string | undefined;
|
|
3748
3814
|
picture?: string | undefined;
|
|
3815
|
+
lastLoginAt?: string | undefined;
|
|
3816
|
+
enabled: boolean;
|
|
3749
3817
|
id: string;
|
|
3750
|
-
createdAt: string;
|
|
3751
|
-
organizationId: string;
|
|
3752
3818
|
version: number;
|
|
3819
|
+
createdAt: string;
|
|
3753
3820
|
updatedAt: string;
|
|
3754
3821
|
realm: string;
|
|
3755
3822
|
roles: string[];
|
|
3756
|
-
enabled: boolean;
|
|
3757
3823
|
emailVerified: boolean;
|
|
3824
|
+
organizationId: string;
|
|
3758
3825
|
} | {
|
|
3759
3826
|
sub: string;
|
|
3760
3827
|
email?: string;
|
|
@@ -3803,7 +3870,7 @@ declare class SessionService {
|
|
|
3803
3870
|
*
|
|
3804
3871
|
* @module alepha.api.users
|
|
3805
3872
|
*/
|
|
3806
|
-
declare const AlephaApiUsers:
|
|
3873
|
+
declare const AlephaApiUsers: import("alepha").Service<import("alepha").Module>;
|
|
3807
3874
|
//#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 };
|
|
3875
|
+
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
3876
|
//# sourceMappingURL=index.d.ts.map
|