alepha 0.21.2 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/api/audits/index.browser.js.map +1 -1
- package/dist/api/audits/index.d.ts +393 -403
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +25 -56
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.browser.js +31 -1
- package/dist/api/files/index.browser.js.map +1 -1
- package/dist/api/files/index.d.ts +313 -208
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +152 -42
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.browser.js +2 -2
- package/dist/api/jobs/index.browser.js.map +1 -1
- package/dist/api/jobs/index.d.ts +282 -285
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +39 -33
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/keys/index.d.ts +217 -222
- package/dist/api/keys/index.d.ts.map +1 -1
- package/dist/api/keys/index.js.map +1 -1
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +188 -195
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/oauth/index.d.ts +71 -76
- package/dist/api/oauth/index.d.ts.map +1 -1
- package/dist/api/oauth/index.js.map +1 -1
- package/dist/api/organizations/index.browser.js.map +1 -1
- package/dist/api/organizations/index.d.ts +104 -109
- package/dist/api/organizations/index.d.ts.map +1 -1
- package/dist/api/organizations/index.js.map +1 -1
- package/dist/api/parameters/index.browser.js +43 -16
- package/dist/api/parameters/index.browser.js.map +1 -1
- package/dist/api/parameters/index.d.ts +488 -344
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/parameters/index.js +175 -35
- package/dist/api/parameters/index.js.map +1 -1
- package/dist/api/payments/index.d.ts +396 -402
- package/dist/api/payments/index.d.ts.map +1 -1
- package/dist/api/payments/index.js.map +1 -1
- package/dist/api/subscriptions/index.d.ts +644 -652
- package/dist/api/subscriptions/index.d.ts.map +1 -1
- package/dist/api/subscriptions/index.js +1 -1
- package/dist/api/subscriptions/index.js.map +1 -1
- package/dist/api/users/index.browser.js +7 -0
- package/dist/api/users/index.browser.js.map +1 -1
- package/dist/api/users/index.d.ts +1106 -1005
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +307 -64
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.browser.js.map +1 -1
- package/dist/api/verifications/index.d.ts +137 -143
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/api/verifications/index.js.map +1 -1
- package/dist/background/index.d.ts +95 -0
- package/dist/background/index.d.ts.map +1 -0
- package/dist/background/index.js +121 -0
- package/dist/background/index.js.map +1 -0
- package/dist/background/index.workerd.js +110 -0
- package/dist/background/index.workerd.js.map +1 -0
- package/dist/batch/index.d.ts +5 -7
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js.map +1 -1
- package/dist/bin/index.js.map +1 -1
- package/dist/bucket/index.d.ts +76 -54
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/bucket/index.js +58 -11
- package/dist/bucket/index.js.map +1 -1
- package/dist/bucket/index.workerd.js +200 -5
- package/dist/bucket/index.workerd.js.map +1 -1
- package/dist/cache/core/index.d.ts +7 -10
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/core/index.js.map +1 -1
- package/dist/cache/core/index.workerd.js.map +1 -1
- package/dist/cache/database/index.d.ts +22 -26
- package/dist/cache/database/index.d.ts.map +1 -1
- package/dist/cache/database/index.js.map +1 -1
- package/dist/cache/redis/index.d.ts +4 -7
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cache/redis/index.js.map +1 -1
- package/dist/captcha/index.d.ts +3 -6
- package/dist/captcha/index.d.ts.map +1 -1
- package/dist/captcha/index.js.map +1 -1
- package/dist/cli/config/index.d.ts.map +1 -1
- package/dist/cli/config/index.js.map +1 -1
- package/dist/cli/core/index.d.ts +458 -249
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +372 -660
- package/dist/cli/core/index.js.map +1 -1
- package/dist/cli/devtools/index.d.ts +3 -5
- package/dist/cli/devtools/index.d.ts.map +1 -1
- package/dist/cli/devtools/index.js.map +1 -1
- package/dist/cli/i18n/index.d.ts +20 -17
- package/dist/cli/i18n/index.d.ts.map +1 -1
- package/dist/cli/i18n/index.js +45 -11
- package/dist/cli/i18n/index.js.map +1 -1
- package/dist/cli/platform/index.d.ts +126 -1342
- package/dist/cli/platform/index.d.ts.map +1 -1
- package/dist/cli/platform/index.js +136 -2374
- package/dist/cli/platform/index.js.map +1 -1
- package/dist/cli/platform-lib/index.d.ts +1472 -0
- package/dist/cli/platform-lib/index.d.ts.map +1 -0
- package/dist/cli/platform-lib/index.js +2660 -0
- package/dist/cli/platform-lib/index.js.map +1 -0
- package/dist/cli/vendor/index.d.ts +17 -21
- package/dist/cli/vendor/index.d.ts.map +1 -1
- package/dist/cli/vendor/index.js.map +1 -1
- package/dist/command/index.d.ts +20 -19
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +39 -10
- package/dist/command/index.js.map +1 -1
- package/dist/{containers → container}/core/index.d.ts +13 -15
- package/dist/container/core/index.d.ts.map +1 -0
- package/dist/{containers → container}/core/index.js +23 -14
- package/dist/container/core/index.js.map +1 -0
- package/dist/{containers → container}/core/index.workerd.js +37 -22
- package/dist/container/core/index.workerd.js.map +1 -0
- package/dist/core/index.browser.js +27 -1
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +48 -24
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +27 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +27 -1
- package/dist/core/index.native.js.map +1 -1
- package/dist/core/index.workerd.js +27 -1
- package/dist/core/index.workerd.js.map +1 -1
- package/dist/crypto/index.browser.js.map +1 -1
- package/dist/crypto/index.d.ts +5 -8
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/crypto/index.js.map +1 -1
- package/dist/datetime/index.d.ts +3 -4
- package/dist/datetime/index.d.ts.map +1 -1
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/brevo/index.d.ts +2 -4
- package/dist/email/brevo/index.d.ts.map +1 -1
- package/dist/email/brevo/index.js.map +1 -1
- package/dist/email/cloudflare/index.d.ts +20 -7
- package/dist/email/cloudflare/index.d.ts.map +1 -1
- package/dist/email/cloudflare/index.js +46 -9
- package/dist/email/cloudflare/index.js.map +1 -1
- package/dist/email/core/index.d.ts +6 -9
- package/dist/email/core/index.d.ts.map +1 -1
- package/dist/email/core/index.js.map +1 -1
- package/dist/email/core/index.workerd.js.map +1 -1
- package/dist/email/smtp/index.d.ts +10 -13
- package/dist/email/smtp/index.d.ts.map +1 -1
- package/dist/email/smtp/index.js +107 -32
- package/dist/email/smtp/index.js.map +1 -1
- package/dist/fake/index.d.ts +1 -2
- package/dist/fake/index.d.ts.map +1 -1
- package/dist/fake/index.js.map +1 -1
- package/dist/lock/core/index.d.ts +9 -14
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/core/index.js.map +1 -1
- package/dist/lock/redis/index.d.ts +2 -4
- package/dist/lock/redis/index.d.ts.map +1 -1
- package/dist/lock/redis/index.js.map +1 -1
- package/dist/logger/index.d.ts +105 -76
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +196 -174
- package/dist/logger/index.js.map +1 -1
- package/dist/mcp/index.d.ts +25 -20
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +23 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/core/index.browser.js.map +1 -1
- package/dist/orm/core/index.bun.js +19 -1
- package/dist/orm/core/index.bun.js.map +1 -1
- package/dist/orm/core/index.d.ts +76 -62
- package/dist/orm/core/index.d.ts.map +1 -1
- package/dist/orm/core/index.js +20 -2
- package/dist/orm/core/index.js.map +1 -1
- package/dist/orm/postgres/index.bun.js.map +1 -1
- package/dist/orm/postgres/index.d.ts +28 -20
- package/dist/orm/postgres/index.d.ts.map +1 -1
- package/dist/orm/postgres/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +12 -15
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/core/index.js.map +1 -1
- package/dist/queue/core/index.workerd.js.map +1 -1
- package/dist/queue/redis/index.d.ts +3 -5
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/queue/redis/index.js.map +1 -1
- package/dist/react/auth/index.browser.js +9 -2
- package/dist/react/auth/index.browser.js.map +1 -1
- package/dist/react/auth/index.d.ts +14 -9
- package/dist/react/auth/index.d.ts.map +1 -1
- package/dist/react/auth/index.js +9 -2
- package/dist/react/auth/index.js.map +1 -1
- package/dist/react/core/index.d.ts +7 -8
- package/dist/react/core/index.d.ts.map +1 -1
- package/dist/react/core/index.js +6 -3
- package/dist/react/core/index.js.map +1 -1
- package/dist/react/form/index.d.ts +2 -5
- package/dist/react/form/index.d.ts.map +1 -1
- package/dist/react/form/index.js +16 -15
- package/dist/react/form/index.js.map +1 -1
- package/dist/react/head/index.browser.js.map +1 -1
- package/dist/react/head/index.d.ts +2 -4
- package/dist/react/head/index.d.ts.map +1 -1
- package/dist/react/head/index.js.map +1 -1
- package/dist/react/i18n/index.d.ts +90 -11
- package/dist/react/i18n/index.d.ts.map +1 -1
- package/dist/react/i18n/index.js +147 -11
- package/dist/react/i18n/index.js.map +1 -1
- package/dist/react/intro/index.d.ts +1 -2
- package/dist/react/intro/index.d.ts.map +1 -1
- package/dist/react/intro/index.js +2 -2
- package/dist/react/intro/index.js.map +1 -1
- package/dist/react/router/index.browser.js +193 -24
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +434 -222
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +249 -35
- package/dist/react/router/index.js.map +1 -1
- package/dist/react/sitemap/index.browser.js +35 -0
- package/dist/react/sitemap/index.browser.js.map +1 -0
- package/dist/react/sitemap/index.d.ts +92 -0
- package/dist/react/sitemap/index.d.ts.map +1 -0
- package/dist/react/sitemap/index.js +131 -0
- package/dist/react/sitemap/index.js.map +1 -0
- package/dist/react/testing/index.d.ts +1 -2
- package/dist/react/testing/index.d.ts.map +1 -1
- package/dist/react/testing/index.js +16 -17
- package/dist/react/testing/index.js.map +1 -1
- package/dist/react/ui/index.d.ts +20 -25
- package/dist/react/ui/index.d.ts.map +1 -1
- package/dist/react/ui/index.js.map +1 -1
- package/dist/redis/index.bun.js.map +1 -1
- package/dist/redis/index.d.ts +17 -19
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.d.ts +2 -4
- package/dist/retry/index.d.ts.map +1 -1
- package/dist/retry/index.js.map +1 -1
- package/dist/router/index.d.ts.map +1 -1
- package/dist/router/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +10 -13
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/index.workerd.js.map +1 -1
- package/dist/security/index.browser.js.map +1 -1
- package/dist/security/index.d.ts +45 -48
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.browser.js.map +1 -1
- package/dist/server/auth/index.d.ts +272 -173
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +1608 -15
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cookies/index.browser.js.map +1 -1
- package/dist/server/cookies/index.d.ts +20 -7
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +22 -3
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.browser.js.map +1 -1
- package/dist/server/core/index.d.ts +106 -73
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +44 -0
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/cors/index.d.ts +11 -14
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/cors/index.js.map +1 -1
- package/dist/server/etag/index.d.ts +6 -9
- package/dist/server/etag/index.d.ts.map +1 -1
- package/dist/server/etag/index.js.map +1 -1
- package/dist/server/health/index.d.ts +18 -21
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/health/index.js.map +1 -1
- package/dist/server/links/index.browser.js +2 -0
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +63 -67
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +2 -0
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/metrics/index.d.ts +5 -7
- package/dist/server/metrics/index.d.ts.map +1 -1
- package/dist/server/metrics/index.js.map +1 -1
- package/dist/server/proxy/index.d.ts +3 -5
- package/dist/server/proxy/index.d.ts.map +1 -1
- package/dist/server/proxy/index.js.map +1 -1
- package/dist/server/rate-limit/index.d.ts +10 -13
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.js.map +1 -1
- package/dist/server/static/index.d.ts +3 -5
- package/dist/server/static/index.d.ts.map +1 -1
- package/dist/server/static/index.js.map +1 -1
- package/dist/server/swagger/index.d.ts +5 -8
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +3 -5
- package/dist/sms/index.d.ts.map +1 -1
- package/dist/sms/index.js.map +1 -1
- package/dist/system/index.browser.js.map +1 -1
- package/dist/system/index.d.ts +2 -4
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js.map +1 -1
- package/dist/system/index.workerd.js.map +1 -1
- package/dist/topic/core/index.d.ts +4 -6
- package/dist/topic/core/index.d.ts.map +1 -1
- package/dist/topic/core/index.js.map +1 -1
- package/dist/topic/redis/index.d.ts +5 -8
- package/dist/topic/redis/index.d.ts.map +1 -1
- package/dist/topic/redis/index.js.map +1 -1
- package/package.json +59 -23
- package/src/api/audits/__tests__/AuditService.spec.ts +18 -110
- package/src/api/audits/controllers/AdminAuditController.ts +14 -0
- package/src/api/audits/services/AuditService.ts +21 -88
- package/src/api/files/__tests__/FileService.spec.ts +207 -2
- package/src/api/files/index.ts +3 -0
- package/src/api/files/schemas/fileCreatorSummarySchema.ts +22 -0
- package/src/api/files/schemas/fileResourceSchema.ts +10 -1
- package/src/api/files/services/FileService.ts +170 -72
- package/src/api/jobs/__tests__/$job.spec.ts +24 -1
- package/src/api/jobs/index.ts +4 -3
- package/src/api/jobs/primitives/$job.ts +7 -3
- package/src/api/jobs/providers/DirectJobDispatcher.ts +17 -36
- package/src/api/jobs/providers/JobProvider.ts +53 -24
- package/src/api/jobs/schemas/jobConfigAtom.ts +1 -1
- package/src/api/jobs/schemas/jobExecutionResourceSchema.ts +4 -1
- package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +3 -1
- package/src/api/parameters/__tests__/$parameter.spec.ts +19 -2
- package/src/api/parameters/audits/ParameterAudits.ts +17 -0
- package/src/api/parameters/controllers/AdminParameterController.ts +95 -19
- package/src/api/parameters/index.ts +3 -0
- package/src/api/parameters/schemas/activateParameterBodySchema.ts +3 -3
- package/src/api/parameters/schemas/createParameterVersionBodySchema.ts +3 -2
- package/src/api/parameters/schemas/parameterCreatorSummarySchema.ts +25 -0
- package/src/api/parameters/schemas/parameterResponseSchema.ts +5 -0
- package/src/api/parameters/schemas/rollbackParameterBodySchema.ts +4 -2
- package/src/api/parameters/services/ParameterProvider.ts +69 -6
- package/src/api/subscriptions/jobs/SubscriptionJobs.ts +1 -1
- package/src/api/users/__tests__/AdminSessionController.spec.ts +37 -0
- package/src/api/users/audits/SessionAudits.ts +33 -0
- package/src/api/users/audits/UserAudits.ts +19 -43
- package/src/api/users/controllers/AdminUserController.ts +66 -1
- package/src/api/users/controllers/RealmController.ts +1 -0
- package/src/api/users/entities/sessions.ts +6 -0
- package/src/api/users/entities/users.ts +2 -0
- package/src/api/users/index.ts +9 -1
- package/src/api/users/primitives/$realm.ts +29 -0
- package/src/api/users/providers/RealmProvider.ts +15 -0
- package/src/api/users/schemas/realmConfigSchema.ts +14 -0
- package/src/api/users/schemas/sessionResourceSchema.ts +16 -0
- package/src/api/users/schemas/updateUserSchema.ts +1 -8
- package/src/api/users/schemas/userQuerySchema.ts +7 -0
- package/src/api/users/services/CredentialService.ts +15 -6
- package/src/api/users/services/IdentityService.ts +2 -1
- package/src/api/users/services/RegistrationService.ts +2 -1
- package/src/api/users/services/SessionCrudService.ts +19 -2
- package/src/api/users/services/SessionService.ts +39 -19
- package/src/api/users/services/UserService.ts +106 -8
- package/src/background/__tests__/BackgroundTaskProvider.spec.ts +96 -0
- package/src/background/index.ts +37 -0
- package/src/background/index.workerd.ts +28 -0
- package/src/background/providers/BackgroundTaskProvider.ts +70 -0
- package/src/background/providers/WorkerdBackgroundTaskProvider.ts +43 -0
- package/src/bucket/__tests__/$bucket.spec.ts +18 -0
- package/src/bucket/__tests__/LocalFileStorageProvider.spec.ts +5 -0
- package/src/bucket/__tests__/MemoryFileStorageProvider.spec.ts +5 -0
- package/src/bucket/__tests__/NodeS3BucketProvider.spec.ts +23 -4
- package/src/bucket/__tests__/shared.ts +30 -0
- package/src/bucket/index.ts +5 -5
- package/src/bucket/index.workerd.ts +11 -4
- package/src/bucket/primitives/$bucket.ts +27 -0
- package/src/bucket/providers/FileStorageProvider.ts +13 -0
- package/src/bucket/providers/LocalFileStorageProvider.ts +17 -1
- package/src/bucket/providers/MemoryFileStorageProvider.ts +7 -0
- package/src/bucket/providers/{CloudflareR2Provider.ts → R2FileStorageProvider.ts} +10 -1
- package/src/bucket/providers/{NodeS3BucketProvider.ts → S3FileStorageProvider.ts} +27 -5
- package/src/cli/core/__tests__/BuildDockerTask.spec.ts +25 -1
- package/src/cli/core/__tests__/init.spec.ts +0 -219
- package/src/cli/core/atoms/buildOptions.ts +0 -12
- package/src/cli/core/commands/__tests__/BuildCommand.spec.ts +43 -0
- package/src/cli/core/commands/build.ts +105 -37
- package/src/cli/core/commands/init.ts +0 -12
- package/src/cli/core/commands/pack.ts +133 -0
- package/src/cli/core/index.ts +3 -3
- package/src/cli/core/providers/ViteDevServerProvider.ts +40 -16
- package/src/cli/core/services/PackageManagerUtils.ts +0 -16
- package/src/cli/core/services/ProjectScaffolder.ts +29 -291
- package/src/cli/core/tasks/BuildCloudflareTask.ts +382 -56
- package/src/cli/core/tasks/BuildDockerTask.ts +33 -3
- package/src/cli/core/tasks/BuildPrerenderTask.ts +44 -7
- package/src/cli/core/tasks/BuildTask.ts +34 -0
- package/src/cli/core/templates/apiIndexTs.ts +1 -22
- package/src/cli/core/templates/mainCss.ts +0 -1
- package/src/cli/core/templates/webAppRouterTs.ts +0 -99
- package/src/cli/core/templates/webIndexTs.ts +1 -22
- package/src/cli/i18n/__tests__/I18nCheckService.spec.ts +48 -0
- package/src/cli/i18n/services/I18nCheckService.ts +65 -11
- package/src/cli/platform/__tests__/SecretsCommand.spec.ts +5 -3
- package/src/cli/platform/commands/SecretsCommand.ts +8 -6
- package/src/cli/platform/commands/platform.ts +192 -46
- package/src/cli/platform/index.ts +12 -52
- package/src/cli/{platform → platform-lib}/__tests__/CloudflareAdapter.spec.ts +426 -169
- package/src/cli/{platform → platform-lib}/__tests__/NamingService.spec.ts +91 -4
- package/src/cli/{platform → platform-lib}/__tests__/VercelAdapter.spec.ts +56 -85
- package/src/cli/{platform → platform-lib}/adapters/CloudflareAdapter.ts +519 -190
- package/src/cli/{platform → platform-lib}/adapters/PlatformAdapter.ts +62 -35
- package/src/cli/{platform → platform-lib}/adapters/VercelAdapter.ts +6 -10
- package/src/cli/{platform → platform-lib}/atoms/platformOptions.ts +34 -1
- package/src/cli/platform-lib/index.ts +67 -0
- package/src/cli/platform-lib/services/NamingService.ts +136 -0
- package/src/cli/{platform → platform-lib}/services/PlatformInspector.ts +60 -13
- package/src/cli/{platform → platform-lib}/services/PlatformOrchestrator.ts +54 -43
- package/src/cli/{platform → platform-lib}/services/WranglerApi.ts +4 -2
- package/src/command/__tests__/Runner.spec.ts +20 -0
- package/src/command/helpers/EnvUtils.ts +19 -3
- package/src/command/helpers/Runner.ts +12 -2
- package/src/command/providers/CliProvider.ts +34 -1
- package/src/{containers → container}/core/__tests__/$container.spec.ts +5 -5
- package/src/{containers → container}/core/index.ts +4 -4
- package/src/{containers → container}/core/index.workerd.ts +19 -3
- package/src/{containers → container}/core/primitives/$container.ts +1 -1
- package/src/{containers → container}/core/providers/CloudflareContainerProvider.ts +17 -19
- package/src/{containers → container}/core/providers/ContainerProvider.ts +16 -2
- package/src/{containers → container}/core/providers/MockContainerProvider.ts +1 -1
- package/src/core/Alepha.ts +49 -1
- package/src/core/__tests__/$env.spec.ts +42 -0
- package/src/core/__tests__/dump.spec.ts +47 -0
- package/src/email/cloudflare/__tests__/CloudflareEmailProvider.spec.ts +42 -10
- package/src/email/cloudflare/index.ts +14 -5
- package/src/email/cloudflare/providers/CloudflareEmailProvider.ts +54 -9
- package/src/logger/__tests__/Logger.spec.ts +55 -0
- package/src/logger/index.ts +13 -0
- package/src/logger/services/Logger.ts +31 -1
- package/src/mcp/__tests__/McpServerProvider.spec.ts +71 -0
- package/src/mcp/providers/McpServerProvider.ts +55 -0
- package/src/orm/__tests__/orm-showcase-tests.ts +27 -0
- package/src/orm/__tests__/orm-showcase.spec.ts +12 -0
- package/src/orm/core/interfaces/PgQuery.ts +4 -1
- package/src/orm/core/services/Repository.ts +27 -11
- package/src/react/auth/hooks/useAuth.ts +10 -5
- package/src/react/core/__tests__/useQuery.browser.spec.tsx +25 -0
- package/src/react/core/hooks/useAction.ts +14 -3
- package/src/react/core/hooks/useQuery.ts +24 -4
- package/src/react/form/__tests__/FormModel-submit-loading.spec.ts +71 -0
- package/src/react/form/__tests__/form-submitting-reactive.browser.spec.tsx +96 -0
- package/src/react/form/services/FormModel.ts +57 -39
- package/src/react/i18n/__tests__/I18nProvider.spec.ts +89 -0
- package/src/react/i18n/__tests__/locale-routing.spec.ts +107 -0
- package/src/react/i18n/components/Translate.tsx +47 -0
- package/src/react/i18n/index.ts +2 -0
- package/src/react/i18n/providers/I18nProvider.ts +171 -12
- package/src/react/intro/components/GettingStartedAdminSlide.tsx +2 -2
- package/src/react/router/__tests__/$page.spec.tsx +3 -2
- package/src/react/router/__tests__/RouterLocaleProvider.spec.ts +127 -0
- package/src/react/router/__tests__/page-can.spec.ts +18 -13
- package/src/react/router/hooks/useQueryParams.ts +114 -14
- package/src/react/router/index.browser.ts +4 -0
- package/src/react/router/index.shared.ts +1 -0
- package/src/react/router/index.ts +9 -0
- package/src/react/router/primitives/$page.ts +85 -4
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +18 -8
- package/src/react/router/providers/ReactPageProvider.ts +12 -1
- package/src/react/router/providers/ReactServerProvider.ts +96 -14
- package/src/react/router/providers/RootComponentsProvider.ts +13 -0
- package/src/react/router/providers/RouterLocaleProvider.ts +125 -0
- package/src/react/router/providers/__tests__/RootComponentsProvider.spec.ts +15 -0
- package/src/react/router/providers/__tests__/rootComponents.ssr.browser.spec.tsx +67 -0
- package/src/react/sitemap/__tests__/$sitemap.spec.ts +131 -0
- package/src/react/sitemap/index.browser.ts +21 -0
- package/src/react/sitemap/index.ts +25 -0
- package/src/react/sitemap/primitives/$sitemap.browser.ts +26 -0
- package/src/react/sitemap/primitives/$sitemap.ts +196 -0
- package/src/react/ui/services/SchemaControl.ts +3 -4
- package/src/server/auth/__tests__/appleClientSecret.spec.ts +34 -0
- package/src/server/auth/__tests__/authFederationClient.spec.ts +40 -0
- package/src/server/auth/__tests__/federationAssertion.spec.ts +146 -0
- package/src/server/auth/__tests__/federationRedirectReplay.spec.ts +44 -0
- package/src/server/auth/helpers/appleClientSecret.ts +24 -0
- package/src/server/auth/helpers/federationAssertion.ts +74 -0
- package/src/server/auth/helpers/jtiReplayGuard.ts +41 -0
- package/src/server/auth/helpers/safeRedirectPath.ts +19 -0
- package/src/server/auth/index.ts +4 -0
- package/src/server/auth/primitives/$authFederationBroker.ts +273 -0
- package/src/server/auth/primitives/$authFederationClient.ts +89 -0
- package/src/server/auth/providers/ServerAuthProvider.ts +18 -4
- package/src/server/cookies/__tests__/ServerCookiesProvider.spec.ts +70 -0
- package/src/server/cookies/providers/ServerCookiesProvider.ts +23 -3
- package/src/server/core/interfaces/ServerRequest.ts +8 -0
- package/src/server/core/primitives/$route.ts +27 -0
- package/src/server/core/providers/ServerMultipartProvider.ts +19 -0
- package/src/server/links/providers/LinkProvider.ts +10 -0
- package/dist/containers/core/index.d.ts.map +0 -1
- package/dist/containers/core/index.js.map +0 -1
- package/dist/containers/core/index.workerd.js.map +0 -1
- package/src/cli/core/tasks/BuildSitemapTask.ts +0 -130
- package/src/cli/core/templates/componentsJsonTs.ts +0 -39
- package/src/cli/core/templates/saasAdminLayoutTsx.ts +0 -77
- package/src/cli/core/templates/saasAdminPagesTsx.ts +0 -26
- package/src/cli/core/templates/saasAuthLayoutTsx.ts +0 -22
- package/src/cli/core/templates/saasAuthPagesTsx.ts +0 -62
- package/src/cli/core/templates/saasRealmProviderTs.ts +0 -52
- package/src/cli/platform/services/NamingService.ts +0 -54
- /package/dist/orm/core/{chunk-o8xxKEmq.js → chunk-B4FMCO8f.js} +0 -0
- /package/dist/react/testing/{chunk-6Ep1yQYe.js → chunk-BpyX8vjI.js} +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/GitHubSecretStore.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/PlatformCacheProvider.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/PlatformInspector.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/PlatformOrchestrator.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/SecretFilterService.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/detectResources.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/GitHubSecretStore.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/MemorySecretStore.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/PlatformCacheProvider.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/SecretStoreProvider.ts +0 -0
- /package/src/cli/{platform → platform-lib}/schemas/cloudflare.ts +0 -0
- /package/src/cli/{platform → platform-lib}/schemas/platform.ts +0 -0
- /package/src/cli/{platform → platform-lib}/schemas/vercel.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/CloudflareApi.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/SecretFilterService.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/VercelApi.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/VercelCli.ts +0 -0
- /package/src/{containers → container}/core/interfaces/ContainerOptions.ts +0 -0
- /package/src/{containers → container}/core/providers/NodeContainerProvider.ts +0 -0
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import * as _$alepha from "alepha";
|
|
2
1
|
import { Alepha, KIND, Primitive, Static, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
|
|
3
|
-
import * as _$alepha_orm0 from "alepha/orm";
|
|
4
2
|
import { Page } from "alepha/orm";
|
|
5
|
-
import * as _$alepha_server0 from "alepha/server";
|
|
6
3
|
import { ServerRequest } from "alepha/server";
|
|
7
|
-
import * as _$alepha_logger0 from "alepha/logger";
|
|
8
|
-
import * as _$typebox from "typebox";
|
|
9
4
|
import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
|
|
10
5
|
import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
|
|
11
6
|
//#region ../../src/api/audits/entities/audits.d.ts
|
|
12
7
|
/**
|
|
13
8
|
* Audit severity levels for categorizing events.
|
|
14
9
|
*/
|
|
15
|
-
declare const auditSeveritySchema:
|
|
10
|
+
declare const auditSeveritySchema: import("typebox").TUnsafe<"info" | "warning" | "critical">;
|
|
16
11
|
type AuditSeverity = Static<typeof auditSeveritySchema>;
|
|
17
12
|
/**
|
|
18
13
|
* Audit log entity for tracking important system events.
|
|
@@ -23,215 +18,215 @@ type AuditSeverity = Static<typeof auditSeveritySchema>;
|
|
|
23
18
|
* - When it happened (createdAt)
|
|
24
19
|
* - Context and details (metadata, ipAddress, userAgent)
|
|
25
20
|
*/
|
|
26
|
-
declare const audits:
|
|
27
|
-
id:
|
|
28
|
-
createdAt:
|
|
29
|
-
organizationId:
|
|
21
|
+
declare const audits: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
|
|
22
|
+
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>;
|
|
23
|
+
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>;
|
|
24
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
30
25
|
/**
|
|
31
26
|
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
32
27
|
* Used for categorizing and filtering audit events.
|
|
33
28
|
*/
|
|
34
|
-
type:
|
|
29
|
+
type: import("typebox").TString;
|
|
35
30
|
/**
|
|
36
31
|
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
37
32
|
*/
|
|
38
|
-
action:
|
|
33
|
+
action: import("typebox").TString;
|
|
39
34
|
/**
|
|
40
35
|
* Severity level of the event.
|
|
41
36
|
*/
|
|
42
|
-
severity:
|
|
37
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
43
38
|
/**
|
|
44
39
|
* User ID who performed the action (null for system events).
|
|
45
40
|
*/
|
|
46
|
-
userId:
|
|
41
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
47
42
|
/**
|
|
48
43
|
* User realm for multi-tenant support.
|
|
49
44
|
*/
|
|
50
|
-
userRealm:
|
|
45
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
51
46
|
/**
|
|
52
47
|
* User email at the time of the event (denormalized for history).
|
|
53
48
|
*/
|
|
54
|
-
userEmail:
|
|
49
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
55
50
|
/**
|
|
56
51
|
* Resource type affected (e.g., "user", "order", "file").
|
|
57
52
|
*/
|
|
58
|
-
resourceType:
|
|
53
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
59
54
|
/**
|
|
60
55
|
* Resource ID affected.
|
|
61
56
|
*/
|
|
62
|
-
resourceId:
|
|
57
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
63
58
|
/**
|
|
64
59
|
* Human-readable description of the event.
|
|
65
60
|
*/
|
|
66
|
-
description:
|
|
61
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
67
62
|
/**
|
|
68
63
|
* Additional metadata/context as JSON.
|
|
69
64
|
*/
|
|
70
|
-
metadata:
|
|
65
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
71
66
|
/**
|
|
72
67
|
* Client IP address.
|
|
73
68
|
*/
|
|
74
|
-
ipAddress:
|
|
69
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
75
70
|
/**
|
|
76
71
|
* Client user agent.
|
|
77
72
|
*/
|
|
78
|
-
userAgent:
|
|
73
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
79
74
|
/**
|
|
80
75
|
* Session ID if applicable.
|
|
81
76
|
*/
|
|
82
|
-
sessionId:
|
|
77
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
83
78
|
/**
|
|
84
79
|
* Request ID for correlation.
|
|
85
80
|
*/
|
|
86
|
-
requestId:
|
|
81
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
87
82
|
/**
|
|
88
83
|
* Whether the action was successful.
|
|
89
84
|
*/
|
|
90
|
-
success:
|
|
85
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
91
86
|
/**
|
|
92
87
|
* Error message if the action failed.
|
|
93
88
|
*/
|
|
94
|
-
errorMessage:
|
|
89
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
95
90
|
}>>;
|
|
96
|
-
declare const auditEntitySchema:
|
|
97
|
-
id:
|
|
98
|
-
createdAt:
|
|
99
|
-
organizationId:
|
|
91
|
+
declare const auditEntitySchema: import("typebox").TObject<{
|
|
92
|
+
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>;
|
|
93
|
+
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>;
|
|
94
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
100
95
|
/**
|
|
101
96
|
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
102
97
|
* Used for categorizing and filtering audit events.
|
|
103
98
|
*/
|
|
104
|
-
type:
|
|
99
|
+
type: import("typebox").TString;
|
|
105
100
|
/**
|
|
106
101
|
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
107
102
|
*/
|
|
108
|
-
action:
|
|
103
|
+
action: import("typebox").TString;
|
|
109
104
|
/**
|
|
110
105
|
* Severity level of the event.
|
|
111
106
|
*/
|
|
112
|
-
severity:
|
|
107
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
113
108
|
/**
|
|
114
109
|
* User ID who performed the action (null for system events).
|
|
115
110
|
*/
|
|
116
|
-
userId:
|
|
111
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
117
112
|
/**
|
|
118
113
|
* User realm for multi-tenant support.
|
|
119
114
|
*/
|
|
120
|
-
userRealm:
|
|
115
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
121
116
|
/**
|
|
122
117
|
* User email at the time of the event (denormalized for history).
|
|
123
118
|
*/
|
|
124
|
-
userEmail:
|
|
119
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
125
120
|
/**
|
|
126
121
|
* Resource type affected (e.g., "user", "order", "file").
|
|
127
122
|
*/
|
|
128
|
-
resourceType:
|
|
123
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
129
124
|
/**
|
|
130
125
|
* Resource ID affected.
|
|
131
126
|
*/
|
|
132
|
-
resourceId:
|
|
127
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
133
128
|
/**
|
|
134
129
|
* Human-readable description of the event.
|
|
135
130
|
*/
|
|
136
|
-
description:
|
|
131
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
137
132
|
/**
|
|
138
133
|
* Additional metadata/context as JSON.
|
|
139
134
|
*/
|
|
140
|
-
metadata:
|
|
135
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
141
136
|
/**
|
|
142
137
|
* Client IP address.
|
|
143
138
|
*/
|
|
144
|
-
ipAddress:
|
|
139
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
145
140
|
/**
|
|
146
141
|
* Client user agent.
|
|
147
142
|
*/
|
|
148
|
-
userAgent:
|
|
143
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
149
144
|
/**
|
|
150
145
|
* Session ID if applicable.
|
|
151
146
|
*/
|
|
152
|
-
sessionId:
|
|
147
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
153
148
|
/**
|
|
154
149
|
* Request ID for correlation.
|
|
155
150
|
*/
|
|
156
|
-
requestId:
|
|
151
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
157
152
|
/**
|
|
158
153
|
* Whether the action was successful.
|
|
159
154
|
*/
|
|
160
|
-
success:
|
|
155
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
161
156
|
/**
|
|
162
157
|
* Error message if the action failed.
|
|
163
158
|
*/
|
|
164
|
-
errorMessage:
|
|
159
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
165
160
|
}>;
|
|
166
|
-
declare const auditEntityInsertSchema:
|
|
167
|
-
id:
|
|
168
|
-
createdAt:
|
|
169
|
-
organizationId:
|
|
161
|
+
declare const auditEntityInsertSchema: import("alepha/orm").TObjectInsert<import("typebox").TObject<{
|
|
162
|
+
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>;
|
|
163
|
+
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>;
|
|
164
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
170
165
|
/**
|
|
171
166
|
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
172
167
|
* Used for categorizing and filtering audit events.
|
|
173
168
|
*/
|
|
174
|
-
type:
|
|
169
|
+
type: import("typebox").TString;
|
|
175
170
|
/**
|
|
176
171
|
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
177
172
|
*/
|
|
178
|
-
action:
|
|
173
|
+
action: import("typebox").TString;
|
|
179
174
|
/**
|
|
180
175
|
* Severity level of the event.
|
|
181
176
|
*/
|
|
182
|
-
severity:
|
|
177
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
183
178
|
/**
|
|
184
179
|
* User ID who performed the action (null for system events).
|
|
185
180
|
*/
|
|
186
|
-
userId:
|
|
181
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
187
182
|
/**
|
|
188
183
|
* User realm for multi-tenant support.
|
|
189
184
|
*/
|
|
190
|
-
userRealm:
|
|
185
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
191
186
|
/**
|
|
192
187
|
* User email at the time of the event (denormalized for history).
|
|
193
188
|
*/
|
|
194
|
-
userEmail:
|
|
189
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
195
190
|
/**
|
|
196
191
|
* Resource type affected (e.g., "user", "order", "file").
|
|
197
192
|
*/
|
|
198
|
-
resourceType:
|
|
193
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
199
194
|
/**
|
|
200
195
|
* Resource ID affected.
|
|
201
196
|
*/
|
|
202
|
-
resourceId:
|
|
197
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
203
198
|
/**
|
|
204
199
|
* Human-readable description of the event.
|
|
205
200
|
*/
|
|
206
|
-
description:
|
|
201
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
207
202
|
/**
|
|
208
203
|
* Additional metadata/context as JSON.
|
|
209
204
|
*/
|
|
210
|
-
metadata:
|
|
205
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
211
206
|
/**
|
|
212
207
|
* Client IP address.
|
|
213
208
|
*/
|
|
214
|
-
ipAddress:
|
|
209
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
215
210
|
/**
|
|
216
211
|
* Client user agent.
|
|
217
212
|
*/
|
|
218
|
-
userAgent:
|
|
213
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
219
214
|
/**
|
|
220
215
|
* Session ID if applicable.
|
|
221
216
|
*/
|
|
222
|
-
sessionId:
|
|
217
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
223
218
|
/**
|
|
224
219
|
* Request ID for correlation.
|
|
225
220
|
*/
|
|
226
|
-
requestId:
|
|
221
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
227
222
|
/**
|
|
228
223
|
* Whether the action was successful.
|
|
229
224
|
*/
|
|
230
|
-
success:
|
|
225
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
231
226
|
/**
|
|
232
227
|
* Error message if the action failed.
|
|
233
228
|
*/
|
|
234
|
-
errorMessage:
|
|
229
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
235
230
|
}>>;
|
|
236
231
|
type AuditEntity = Static<typeof audits.schema>;
|
|
237
232
|
//#endregion
|
|
@@ -239,21 +234,21 @@ type AuditEntity = Static<typeof audits.schema>;
|
|
|
239
234
|
/**
|
|
240
235
|
* Query schema for searching and filtering audit logs.
|
|
241
236
|
*/
|
|
242
|
-
declare const auditQuerySchema:
|
|
243
|
-
page:
|
|
244
|
-
size:
|
|
245
|
-
sort:
|
|
246
|
-
type:
|
|
247
|
-
action:
|
|
248
|
-
severity:
|
|
249
|
-
userId:
|
|
250
|
-
userRealm:
|
|
251
|
-
resourceType:
|
|
252
|
-
resourceId:
|
|
253
|
-
success:
|
|
254
|
-
from:
|
|
255
|
-
to:
|
|
256
|
-
search:
|
|
237
|
+
declare const auditQuerySchema: import("typebox").TObject<{
|
|
238
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
239
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
240
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
241
|
+
type: import("typebox").TOptional<import("typebox").TString>;
|
|
242
|
+
action: import("typebox").TOptional<import("typebox").TString>;
|
|
243
|
+
severity: import("typebox").TOptional<import("typebox").TUnsafe<"info" | "warning" | "critical">>;
|
|
244
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
245
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
246
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
247
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
248
|
+
success: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
249
|
+
from: import("typebox").TOptional<import("typebox").TString>;
|
|
250
|
+
to: import("typebox").TOptional<import("typebox").TString>;
|
|
251
|
+
search: import("typebox").TOptional<import("typebox").TString>;
|
|
257
252
|
}>;
|
|
258
253
|
type AuditQuery = Static<typeof auditQuerySchema>;
|
|
259
254
|
//#endregion
|
|
@@ -261,23 +256,23 @@ type AuditQuery = Static<typeof auditQuerySchema>;
|
|
|
261
256
|
/**
|
|
262
257
|
* Schema for creating a new audit log entry.
|
|
263
258
|
*/
|
|
264
|
-
declare const createAuditSchema:
|
|
265
|
-
type:
|
|
266
|
-
action:
|
|
267
|
-
severity:
|
|
268
|
-
userId:
|
|
269
|
-
userRealm:
|
|
270
|
-
userEmail:
|
|
271
|
-
resourceType:
|
|
272
|
-
resourceId:
|
|
273
|
-
description:
|
|
274
|
-
metadata:
|
|
275
|
-
ipAddress:
|
|
276
|
-
userAgent:
|
|
277
|
-
sessionId:
|
|
278
|
-
requestId:
|
|
279
|
-
success:
|
|
280
|
-
errorMessage:
|
|
259
|
+
declare const createAuditSchema: import("typebox").TObject<{
|
|
260
|
+
type: import("typebox").TString;
|
|
261
|
+
action: import("typebox").TString;
|
|
262
|
+
severity: import("typebox").TOptional<import("typebox").TUnsafe<"info" | "warning" | "critical">>;
|
|
263
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
264
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
265
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
266
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
267
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
268
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
269
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
270
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
271
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
272
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
273
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
274
|
+
success: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
275
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
281
276
|
}>;
|
|
282
277
|
type CreateAudit = Static<typeof createAuditSchema>;
|
|
283
278
|
//#endregion
|
|
@@ -301,27 +296,27 @@ interface AuditTypeDefinition {
|
|
|
301
296
|
*/
|
|
302
297
|
declare class AuditService {
|
|
303
298
|
protected readonly alepha: Alepha;
|
|
304
|
-
protected readonly log:
|
|
305
|
-
protected readonly repo:
|
|
306
|
-
id:
|
|
307
|
-
createdAt:
|
|
308
|
-
organizationId:
|
|
309
|
-
type:
|
|
310
|
-
action:
|
|
311
|
-
severity:
|
|
312
|
-
userId:
|
|
313
|
-
userRealm:
|
|
314
|
-
userEmail:
|
|
315
|
-
resourceType:
|
|
316
|
-
resourceId:
|
|
317
|
-
description:
|
|
318
|
-
metadata:
|
|
319
|
-
ipAddress:
|
|
320
|
-
userAgent:
|
|
321
|
-
sessionId:
|
|
322
|
-
requestId:
|
|
323
|
-
success:
|
|
324
|
-
errorMessage:
|
|
299
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
300
|
+
protected readonly repo: import("alepha/orm").Repository<import("typebox").TObject<{
|
|
301
|
+
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>;
|
|
302
|
+
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>;
|
|
303
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
304
|
+
type: import("typebox").TString;
|
|
305
|
+
action: import("typebox").TString;
|
|
306
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
307
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
308
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
309
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
310
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
311
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
312
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
313
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
314
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
315
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
316
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
317
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
318
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
319
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
325
320
|
}>>;
|
|
326
321
|
/**
|
|
327
322
|
* Registry of audit types and their allowed actions.
|
|
@@ -335,6 +330,15 @@ declare class AuditService {
|
|
|
335
330
|
* Get all registered audit types.
|
|
336
331
|
*/
|
|
337
332
|
getRegisteredTypes(): AuditTypeDefinition[];
|
|
333
|
+
/**
|
|
334
|
+
* Distinct action names across all registered audit types, sorted.
|
|
335
|
+
*
|
|
336
|
+
* Sourced from the `$audit` type registry. Audit types register lazily —
|
|
337
|
+
* when their holder (e.g. `SessionAudits`, `ParameterAudits`) is first
|
|
338
|
+
* injected — so the admin filter only lists actions for audit domains that
|
|
339
|
+
* are actually in use, which is the intended behaviour.
|
|
340
|
+
*/
|
|
341
|
+
getDistinctActions(): string[];
|
|
338
342
|
/**
|
|
339
343
|
* Get current request context if available.
|
|
340
344
|
*/
|
|
@@ -348,26 +352,6 @@ declare class AuditService {
|
|
|
348
352
|
* Record an audit event (convenience method).
|
|
349
353
|
*/
|
|
350
354
|
record(type: string, action: string, options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
351
|
-
/**
|
|
352
|
-
* Record an authentication event.
|
|
353
|
-
*/
|
|
354
|
-
recordAuth(action: "login" | "logout" | "login_failed" | "token_refresh" | "mfa_setup" | "mfa_verify", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
355
|
-
/**
|
|
356
|
-
* Record a user management event.
|
|
357
|
-
*/
|
|
358
|
-
recordUser(action: "create" | "update" | "delete" | "enable" | "disable" | "role_change", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
359
|
-
/**
|
|
360
|
-
* Record a data access event.
|
|
361
|
-
*/
|
|
362
|
-
recordAccess(action: "view" | "export" | "download", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
363
|
-
/**
|
|
364
|
-
* Record a security event.
|
|
365
|
-
*/
|
|
366
|
-
recordSecurity(action: "permission_denied" | "suspicious_activity" | "rate_limited" | "blocked", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
367
|
-
/**
|
|
368
|
-
* Record a system event.
|
|
369
|
-
*/
|
|
370
|
-
recordSystem(action: "startup" | "shutdown" | "config_change" | "maintenance" | "error", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
|
|
371
355
|
/**
|
|
372
356
|
* Find audit entries with filtering and pagination.
|
|
373
357
|
*/
|
|
@@ -422,303 +406,309 @@ declare class AdminAuditController {
|
|
|
422
406
|
protected readonly url = "/audits";
|
|
423
407
|
protected readonly group = "admin:audits";
|
|
424
408
|
protected readonly auditService: AuditService;
|
|
425
|
-
protected readonly repo:
|
|
426
|
-
id:
|
|
427
|
-
createdAt:
|
|
428
|
-
organizationId:
|
|
429
|
-
type:
|
|
430
|
-
action:
|
|
431
|
-
severity:
|
|
432
|
-
userId:
|
|
433
|
-
userRealm:
|
|
434
|
-
userEmail:
|
|
435
|
-
resourceType:
|
|
436
|
-
resourceId:
|
|
437
|
-
description:
|
|
438
|
-
metadata:
|
|
439
|
-
ipAddress:
|
|
440
|
-
userAgent:
|
|
441
|
-
sessionId:
|
|
442
|
-
requestId:
|
|
443
|
-
success:
|
|
444
|
-
errorMessage:
|
|
409
|
+
protected readonly repo: import("alepha/orm").Repository<import("typebox").TObject<{
|
|
410
|
+
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>;
|
|
411
|
+
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>;
|
|
412
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
413
|
+
type: import("typebox").TString;
|
|
414
|
+
action: import("typebox").TString;
|
|
415
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
416
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
417
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
418
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
419
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
420
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
421
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
422
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
423
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
424
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
425
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
426
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
427
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
428
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
445
429
|
}>>;
|
|
446
430
|
/**
|
|
447
431
|
* Find audit entries with filtering and pagination.
|
|
448
432
|
*/
|
|
449
|
-
readonly findAudits:
|
|
450
|
-
query:
|
|
451
|
-
page:
|
|
452
|
-
size:
|
|
453
|
-
sort:
|
|
454
|
-
type:
|
|
455
|
-
action:
|
|
456
|
-
severity:
|
|
457
|
-
userId:
|
|
458
|
-
userRealm:
|
|
459
|
-
resourceType:
|
|
460
|
-
resourceId:
|
|
461
|
-
success:
|
|
462
|
-
from:
|
|
463
|
-
to:
|
|
464
|
-
search:
|
|
433
|
+
readonly findAudits: import("alepha/server").ActionPrimitiveFn<{
|
|
434
|
+
query: import("typebox").TObject<{
|
|
435
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
436
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
437
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
438
|
+
type: import("typebox").TOptional<import("typebox").TString>;
|
|
439
|
+
action: import("typebox").TOptional<import("typebox").TString>;
|
|
440
|
+
severity: import("typebox").TOptional<import("typebox").TUnsafe<"info" | "warning" | "critical">>;
|
|
441
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
442
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
443
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
444
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
445
|
+
success: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
446
|
+
from: import("typebox").TOptional<import("typebox").TString>;
|
|
447
|
+
to: import("typebox").TOptional<import("typebox").TString>;
|
|
448
|
+
search: import("typebox").TOptional<import("typebox").TString>;
|
|
465
449
|
}>;
|
|
466
|
-
response:
|
|
467
|
-
id:
|
|
468
|
-
createdAt:
|
|
469
|
-
organizationId:
|
|
470
|
-
type:
|
|
471
|
-
action:
|
|
472
|
-
severity:
|
|
473
|
-
userId:
|
|
474
|
-
userRealm:
|
|
475
|
-
userEmail:
|
|
476
|
-
resourceType:
|
|
477
|
-
resourceId:
|
|
478
|
-
description:
|
|
479
|
-
metadata:
|
|
480
|
-
ipAddress:
|
|
481
|
-
userAgent:
|
|
482
|
-
sessionId:
|
|
483
|
-
requestId:
|
|
484
|
-
success:
|
|
485
|
-
errorMessage:
|
|
450
|
+
response: import("alepha").TPage<import("typebox").TObject<{
|
|
451
|
+
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>;
|
|
452
|
+
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>;
|
|
453
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
454
|
+
type: import("typebox").TString;
|
|
455
|
+
action: import("typebox").TString;
|
|
456
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
457
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
458
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
459
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
460
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
461
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
462
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
463
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
464
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
465
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
466
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
467
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
468
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
469
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
486
470
|
}>>;
|
|
487
471
|
}>;
|
|
488
472
|
/**
|
|
489
473
|
* Get a single audit entry by ID.
|
|
490
474
|
*/
|
|
491
|
-
readonly getAudit:
|
|
492
|
-
params:
|
|
493
|
-
id:
|
|
475
|
+
readonly getAudit: import("alepha/server").ActionPrimitiveFn<{
|
|
476
|
+
params: import("typebox").TObject<{
|
|
477
|
+
id: import("typebox").TString;
|
|
494
478
|
}>;
|
|
495
|
-
response:
|
|
496
|
-
id:
|
|
497
|
-
createdAt:
|
|
498
|
-
organizationId:
|
|
499
|
-
type:
|
|
500
|
-
action:
|
|
501
|
-
severity:
|
|
502
|
-
userId:
|
|
503
|
-
userRealm:
|
|
504
|
-
userEmail:
|
|
505
|
-
resourceType:
|
|
506
|
-
resourceId:
|
|
507
|
-
description:
|
|
508
|
-
metadata:
|
|
509
|
-
ipAddress:
|
|
510
|
-
userAgent:
|
|
511
|
-
sessionId:
|
|
512
|
-
requestId:
|
|
513
|
-
success:
|
|
514
|
-
errorMessage:
|
|
479
|
+
response: import("typebox").TObject<{
|
|
480
|
+
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>;
|
|
481
|
+
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>;
|
|
482
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
483
|
+
type: import("typebox").TString;
|
|
484
|
+
action: import("typebox").TString;
|
|
485
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
486
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
487
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
488
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
489
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
490
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
491
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
492
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
493
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
494
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
495
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
496
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
497
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
498
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
515
499
|
}>;
|
|
516
500
|
}>;
|
|
517
501
|
/**
|
|
518
502
|
* Delete many audit entries by id in one repository call. Use with care —
|
|
519
503
|
* audit logs are usually retained for compliance reasons.
|
|
520
504
|
*/
|
|
521
|
-
readonly deleteAudits:
|
|
522
|
-
body:
|
|
523
|
-
ids:
|
|
505
|
+
readonly deleteAudits: import("alepha/server").ActionPrimitiveFn<{
|
|
506
|
+
body: import("typebox").TObject<{
|
|
507
|
+
ids: import("typebox").TArray<import("typebox").TString>;
|
|
524
508
|
}>;
|
|
525
|
-
response:
|
|
526
|
-
deleted:
|
|
509
|
+
response: import("typebox").TObject<{
|
|
510
|
+
deleted: import("typebox").TArray<import("typebox").TString>;
|
|
527
511
|
}>;
|
|
528
512
|
}>;
|
|
529
513
|
/**
|
|
530
514
|
* Create a new audit entry.
|
|
531
515
|
* System-only — this permission should never be assigned to human roles.
|
|
532
516
|
*/
|
|
533
|
-
readonly createAudit:
|
|
534
|
-
body:
|
|
535
|
-
type:
|
|
536
|
-
action:
|
|
537
|
-
severity:
|
|
538
|
-
userId:
|
|
539
|
-
userRealm:
|
|
540
|
-
userEmail:
|
|
541
|
-
resourceType:
|
|
542
|
-
resourceId:
|
|
543
|
-
description:
|
|
544
|
-
metadata:
|
|
545
|
-
ipAddress:
|
|
546
|
-
userAgent:
|
|
547
|
-
sessionId:
|
|
548
|
-
requestId:
|
|
549
|
-
success:
|
|
550
|
-
errorMessage:
|
|
517
|
+
readonly createAudit: import("alepha/server").ActionPrimitiveFn<{
|
|
518
|
+
body: import("typebox").TObject<{
|
|
519
|
+
type: import("typebox").TString;
|
|
520
|
+
action: import("typebox").TString;
|
|
521
|
+
severity: import("typebox").TOptional<import("typebox").TUnsafe<"info" | "warning" | "critical">>;
|
|
522
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
523
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
524
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
525
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
526
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
527
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
528
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
529
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
530
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
531
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
532
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
533
|
+
success: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
534
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
551
535
|
}>;
|
|
552
|
-
response:
|
|
553
|
-
id:
|
|
554
|
-
createdAt:
|
|
555
|
-
organizationId:
|
|
556
|
-
type:
|
|
557
|
-
action:
|
|
558
|
-
severity:
|
|
559
|
-
userId:
|
|
560
|
-
userRealm:
|
|
561
|
-
userEmail:
|
|
562
|
-
resourceType:
|
|
563
|
-
resourceId:
|
|
564
|
-
description:
|
|
565
|
-
metadata:
|
|
566
|
-
ipAddress:
|
|
567
|
-
userAgent:
|
|
568
|
-
sessionId:
|
|
569
|
-
requestId:
|
|
570
|
-
success:
|
|
571
|
-
errorMessage:
|
|
536
|
+
response: import("typebox").TObject<{
|
|
537
|
+
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>;
|
|
538
|
+
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>;
|
|
539
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
540
|
+
type: import("typebox").TString;
|
|
541
|
+
action: import("typebox").TString;
|
|
542
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
543
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
544
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
545
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
546
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
547
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
548
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
549
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
550
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
551
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
552
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
553
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
554
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
555
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
572
556
|
}>;
|
|
573
557
|
}>;
|
|
574
558
|
/**
|
|
575
559
|
* Get audit entries for a specific user.
|
|
576
560
|
*/
|
|
577
|
-
readonly findByUser:
|
|
578
|
-
params:
|
|
579
|
-
userId:
|
|
561
|
+
readonly findByUser: import("alepha/server").ActionPrimitiveFn<{
|
|
562
|
+
params: import("typebox").TObject<{
|
|
563
|
+
userId: import("typebox").TString;
|
|
580
564
|
}>;
|
|
581
|
-
query:
|
|
582
|
-
type:
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
sort:
|
|
587
|
-
userRealm:
|
|
588
|
-
resourceType:
|
|
589
|
-
resourceId:
|
|
590
|
-
success:
|
|
591
|
-
page:
|
|
592
|
-
size:
|
|
593
|
-
from:
|
|
594
|
-
to:
|
|
565
|
+
query: import("typebox").TObject<{
|
|
566
|
+
type: import("typebox").TOptional<import("typebox").TString>;
|
|
567
|
+
search: import("typebox").TOptional<import("typebox").TString>;
|
|
568
|
+
action: import("typebox").TOptional<import("typebox").TString>;
|
|
569
|
+
severity: import("typebox").TOptional<import("typebox").TUnsafe<"info" | "warning" | "critical">>;
|
|
570
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
571
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
572
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
573
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
574
|
+
success: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
575
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
576
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
577
|
+
from: import("typebox").TOptional<import("typebox").TString>;
|
|
578
|
+
to: import("typebox").TOptional<import("typebox").TString>;
|
|
595
579
|
}>;
|
|
596
|
-
response:
|
|
597
|
-
id:
|
|
598
|
-
createdAt:
|
|
599
|
-
organizationId:
|
|
600
|
-
type:
|
|
601
|
-
action:
|
|
602
|
-
severity:
|
|
603
|
-
userId:
|
|
604
|
-
userRealm:
|
|
605
|
-
userEmail:
|
|
606
|
-
resourceType:
|
|
607
|
-
resourceId:
|
|
608
|
-
description:
|
|
609
|
-
metadata:
|
|
610
|
-
ipAddress:
|
|
611
|
-
userAgent:
|
|
612
|
-
sessionId:
|
|
613
|
-
requestId:
|
|
614
|
-
success:
|
|
615
|
-
errorMessage:
|
|
580
|
+
response: import("alepha").TPage<import("typebox").TObject<{
|
|
581
|
+
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>;
|
|
582
|
+
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>;
|
|
583
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
584
|
+
type: import("typebox").TString;
|
|
585
|
+
action: import("typebox").TString;
|
|
586
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
587
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
588
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
589
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
590
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
591
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
592
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
593
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
594
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
595
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
596
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
597
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
598
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
599
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
616
600
|
}>>;
|
|
617
601
|
}>;
|
|
618
602
|
/**
|
|
619
603
|
* Get audit entries for a specific resource.
|
|
620
604
|
*/
|
|
621
|
-
readonly findByResource:
|
|
622
|
-
params:
|
|
623
|
-
resourceType:
|
|
624
|
-
resourceId:
|
|
605
|
+
readonly findByResource: import("alepha/server").ActionPrimitiveFn<{
|
|
606
|
+
params: import("typebox").TObject<{
|
|
607
|
+
resourceType: import("typebox").TString;
|
|
608
|
+
resourceId: import("typebox").TString;
|
|
625
609
|
}>;
|
|
626
|
-
query:
|
|
627
|
-
type:
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
sort:
|
|
632
|
-
userId:
|
|
633
|
-
userRealm:
|
|
634
|
-
success:
|
|
635
|
-
page:
|
|
636
|
-
size:
|
|
637
|
-
from:
|
|
638
|
-
to:
|
|
610
|
+
query: import("typebox").TObject<{
|
|
611
|
+
type: import("typebox").TOptional<import("typebox").TString>;
|
|
612
|
+
search: import("typebox").TOptional<import("typebox").TString>;
|
|
613
|
+
action: import("typebox").TOptional<import("typebox").TString>;
|
|
614
|
+
severity: import("typebox").TOptional<import("typebox").TUnsafe<"info" | "warning" | "critical">>;
|
|
615
|
+
sort: import("typebox").TOptional<import("typebox").TString>;
|
|
616
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
617
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
618
|
+
success: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
619
|
+
page: import("typebox").TOptional<import("typebox").TInteger>;
|
|
620
|
+
size: import("typebox").TOptional<import("typebox").TInteger>;
|
|
621
|
+
from: import("typebox").TOptional<import("typebox").TString>;
|
|
622
|
+
to: import("typebox").TOptional<import("typebox").TString>;
|
|
639
623
|
}>;
|
|
640
|
-
response:
|
|
641
|
-
id:
|
|
642
|
-
createdAt:
|
|
643
|
-
organizationId:
|
|
644
|
-
type:
|
|
645
|
-
action:
|
|
646
|
-
severity:
|
|
647
|
-
userId:
|
|
648
|
-
userRealm:
|
|
649
|
-
userEmail:
|
|
650
|
-
resourceType:
|
|
651
|
-
resourceId:
|
|
652
|
-
description:
|
|
653
|
-
metadata:
|
|
654
|
-
ipAddress:
|
|
655
|
-
userAgent:
|
|
656
|
-
sessionId:
|
|
657
|
-
requestId:
|
|
658
|
-
success:
|
|
659
|
-
errorMessage:
|
|
624
|
+
response: import("alepha").TPage<import("typebox").TObject<{
|
|
625
|
+
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>;
|
|
626
|
+
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>;
|
|
627
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
628
|
+
type: import("typebox").TString;
|
|
629
|
+
action: import("typebox").TString;
|
|
630
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
631
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
632
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
633
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
634
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
635
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
636
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
637
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
638
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
639
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
640
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
641
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
642
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
643
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
660
644
|
}>>;
|
|
661
645
|
}>;
|
|
662
646
|
/**
|
|
663
647
|
* Get audit statistics.
|
|
664
648
|
*/
|
|
665
|
-
readonly getAuditStats:
|
|
666
|
-
query:
|
|
667
|
-
from:
|
|
668
|
-
to:
|
|
669
|
-
userRealm:
|
|
649
|
+
readonly getAuditStats: import("alepha/server").ActionPrimitiveFn<{
|
|
650
|
+
query: import("typebox").TObject<{
|
|
651
|
+
from: import("typebox").TOptional<import("typebox").TString>;
|
|
652
|
+
to: import("typebox").TOptional<import("typebox").TString>;
|
|
653
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
670
654
|
}>;
|
|
671
|
-
response:
|
|
672
|
-
total:
|
|
673
|
-
byType:
|
|
674
|
-
bySeverity:
|
|
675
|
-
info:
|
|
676
|
-
warning:
|
|
677
|
-
critical:
|
|
655
|
+
response: import("typebox").TObject<{
|
|
656
|
+
total: import("typebox").TInteger;
|
|
657
|
+
byType: import("typebox").TRecord<"^.*$", import("typebox").TInteger>;
|
|
658
|
+
bySeverity: import("typebox").TObject<{
|
|
659
|
+
info: import("typebox").TInteger;
|
|
660
|
+
warning: import("typebox").TInteger;
|
|
661
|
+
critical: import("typebox").TInteger;
|
|
678
662
|
}>;
|
|
679
|
-
successRate:
|
|
680
|
-
recentFailures:
|
|
681
|
-
id:
|
|
682
|
-
createdAt:
|
|
683
|
-
organizationId:
|
|
684
|
-
type:
|
|
685
|
-
action:
|
|
686
|
-
severity:
|
|
687
|
-
userId:
|
|
688
|
-
userRealm:
|
|
689
|
-
userEmail:
|
|
690
|
-
resourceType:
|
|
691
|
-
resourceId:
|
|
692
|
-
description:
|
|
693
|
-
metadata:
|
|
694
|
-
ipAddress:
|
|
695
|
-
userAgent:
|
|
696
|
-
sessionId:
|
|
697
|
-
requestId:
|
|
698
|
-
success:
|
|
699
|
-
errorMessage:
|
|
663
|
+
successRate: import("typebox").TNumber;
|
|
664
|
+
recentFailures: import("typebox").TArray<import("typebox").TObject<{
|
|
665
|
+
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>;
|
|
666
|
+
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>;
|
|
667
|
+
organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
668
|
+
type: import("typebox").TString;
|
|
669
|
+
action: import("typebox").TString;
|
|
670
|
+
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
671
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
672
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
673
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
674
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
675
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
676
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
677
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
678
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
679
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
680
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
681
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
682
|
+
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
683
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
700
684
|
}>>;
|
|
701
685
|
}>;
|
|
702
686
|
}>;
|
|
687
|
+
/**
|
|
688
|
+
* List distinct action names present in the audit log (for filters).
|
|
689
|
+
*/
|
|
690
|
+
readonly getAuditActions: import("alepha/server").ActionPrimitiveFn<{
|
|
691
|
+
response: import("typebox").TArray<import("typebox").TString>;
|
|
692
|
+
}>;
|
|
703
693
|
/**
|
|
704
694
|
* Get registered audit types.
|
|
705
695
|
*/
|
|
706
|
-
readonly getTypes:
|
|
707
|
-
response:
|
|
708
|
-
type:
|
|
709
|
-
description:
|
|
710
|
-
actions:
|
|
696
|
+
readonly getTypes: import("alepha/server").ActionPrimitiveFn<{
|
|
697
|
+
response: import("typebox").TArray<import("typebox").TObject<{
|
|
698
|
+
type: import("typebox").TString;
|
|
699
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
700
|
+
actions: import("typebox").TArray<import("typebox").TString>;
|
|
711
701
|
}>>;
|
|
712
702
|
}>;
|
|
713
703
|
/**
|
|
714
704
|
* Get distinct values for filters.
|
|
715
705
|
*/
|
|
716
|
-
readonly getFilterOptions:
|
|
717
|
-
response:
|
|
718
|
-
types:
|
|
719
|
-
actions:
|
|
720
|
-
resourceTypes:
|
|
721
|
-
userRealms:
|
|
706
|
+
readonly getFilterOptions: import("alepha/server").ActionPrimitiveFn<{
|
|
707
|
+
response: import("typebox").TObject<{
|
|
708
|
+
types: import("typebox").TArray<import("typebox").TString>;
|
|
709
|
+
actions: import("typebox").TArray<import("typebox").TString>;
|
|
710
|
+
resourceTypes: import("typebox").TArray<import("typebox").TString>;
|
|
711
|
+
userRealms: import("typebox").TArray<import("typebox").TString>;
|
|
722
712
|
}>;
|
|
723
713
|
}>;
|
|
724
714
|
}
|
|
@@ -1127,8 +1117,8 @@ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]:
|
|
|
1127
1117
|
* - `d1://BINDING_NAME` — Cloudflare D1
|
|
1128
1118
|
* - `hyperdrive://BINDING_NAME` — Cloudflare Hyperdrive
|
|
1129
1119
|
*/
|
|
1130
|
-
declare const databaseEnvSchema:
|
|
1131
|
-
DATABASE_URL:
|
|
1120
|
+
declare const databaseEnvSchema: import("typebox").TObject<{
|
|
1121
|
+
DATABASE_URL: import("typebox").TOptional<import("typebox").TString>;
|
|
1132
1122
|
/**
|
|
1133
1123
|
* Enable or disable push-based schema synchronization (drizzle-kit push).
|
|
1134
1124
|
*
|
|
@@ -1136,7 +1126,7 @@ declare const databaseEnvSchema: _$typebox.TObject<{
|
|
|
1136
1126
|
* Set to `false` in development to skip automatic schema sync
|
|
1137
1127
|
* (e.g. when managing migrations manually).
|
|
1138
1128
|
*/
|
|
1139
|
-
DATABASE_SYNC:
|
|
1129
|
+
DATABASE_SYNC: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
1140
1130
|
}>;
|
|
1141
1131
|
declare module "alepha" {
|
|
1142
1132
|
interface Env extends Partial<Static<typeof databaseEnvSchema>> {}
|
|
@@ -1146,26 +1136,26 @@ declare module "alepha" {
|
|
|
1146
1136
|
/**
|
|
1147
1137
|
* Resource schema for audit log responses.
|
|
1148
1138
|
*/
|
|
1149
|
-
declare const auditResourceSchema:
|
|
1150
|
-
id: PgAttr<PgAttr<
|
|
1151
|
-
createdAt: PgAttr<PgAttr<
|
|
1152
|
-
organizationId: PgAttr<
|
|
1153
|
-
type:
|
|
1154
|
-
action:
|
|
1155
|
-
severity: PgAttr<
|
|
1156
|
-
userId:
|
|
1157
|
-
userRealm:
|
|
1158
|
-
userEmail:
|
|
1159
|
-
resourceType:
|
|
1160
|
-
resourceId:
|
|
1161
|
-
description:
|
|
1162
|
-
metadata:
|
|
1163
|
-
ipAddress:
|
|
1164
|
-
userAgent:
|
|
1165
|
-
sessionId:
|
|
1166
|
-
requestId:
|
|
1167
|
-
success: PgAttr<
|
|
1168
|
-
errorMessage:
|
|
1139
|
+
declare const auditResourceSchema: import("typebox").TObject<{
|
|
1140
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1141
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1142
|
+
organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
|
|
1143
|
+
type: import("typebox").TString;
|
|
1144
|
+
action: import("typebox").TString;
|
|
1145
|
+
severity: PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
1146
|
+
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
1147
|
+
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
1148
|
+
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
1149
|
+
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
1150
|
+
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
1151
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
1152
|
+
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
1153
|
+
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
1154
|
+
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
1155
|
+
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
1156
|
+
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
1157
|
+
success: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
|
|
1158
|
+
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
1169
1159
|
}>;
|
|
1170
1160
|
type AuditResource = Static<typeof auditResourceSchema>;
|
|
1171
1161
|
//#endregion
|
|
@@ -1181,7 +1171,7 @@ type AuditResource = Static<typeof auditResourceSchema>;
|
|
|
1181
1171
|
*
|
|
1182
1172
|
* @module alepha.api.audits
|
|
1183
1173
|
*/
|
|
1184
|
-
declare const AlephaApiAudits:
|
|
1174
|
+
declare const AlephaApiAudits: import("alepha").Service<import("alepha").Module>;
|
|
1185
1175
|
//#endregion
|
|
1186
1176
|
export { $audit, AdminAuditController, AlephaApiAudits, AuditEntity, AuditLogOptions, AuditPrimitive, AuditPrimitiveOptions, AuditQuery, AuditResource, AuditService, AuditSeverity, AuditStats, AuditTypeDefinition, CreateAudit, auditEntityInsertSchema, auditEntitySchema, auditQuerySchema, auditResourceSchema, auditSeveritySchema, audits, createAuditSchema };
|
|
1187
1177
|
//# sourceMappingURL=index.d.ts.map
|