alepha 0.22.0 → 0.24.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/assets/swagger-ui/swagger-ui-bundle.js +1 -1
- package/assets/swagger-ui/swagger-ui-standalone-preset.js +1 -1
- package/dist/api/audits/index.browser.js +49 -52
- package/dist/api/audits/index.browser.js.map +1 -1
- package/dist/api/audits/index.d.ts +629 -565
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +206 -98
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.browser.js +44 -44
- package/dist/api/files/index.browser.js.map +1 -1
- package/dist/api/files/index.d.ts +292 -293
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +61 -64
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.browser.js +61 -59
- package/dist/api/jobs/index.browser.js.map +1 -1
- package/dist/api/jobs/index.d.ts +546 -347
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +165 -86
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/keys/index.d.ts +242 -230
- package/dist/api/keys/index.d.ts.map +1 -1
- package/dist/api/keys/index.js +63 -66
- package/dist/api/keys/index.js.map +1 -1
- package/dist/api/notifications/index.browser.js +40 -38
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +339 -209
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js +108 -60
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/oauth/index.d.ts +190 -78
- package/dist/api/oauth/index.d.ts.map +1 -1
- package/dist/api/oauth/index.js +290 -68
- package/dist/api/oauth/index.js.map +1 -1
- package/dist/api/organizations/index.browser.js +14 -14
- package/dist/api/organizations/index.browser.js.map +1 -1
- package/dist/api/organizations/index.d.ts +158 -134
- package/dist/api/organizations/index.d.ts.map +1 -1
- package/dist/api/organizations/index.js +18 -18
- package/dist/api/organizations/index.js.map +1 -1
- package/dist/api/parameters/index.browser.js +74 -53
- package/dist/api/parameters/index.browser.js.map +1 -1
- package/dist/api/parameters/index.d.ts +607 -513
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/parameters/index.js +205 -127
- package/dist/api/parameters/index.js.map +1 -1
- package/dist/api/payments/index.d.ts +652 -449
- package/dist/api/payments/index.d.ts.map +1 -1
- package/dist/api/payments/index.js +159 -93
- package/dist/api/payments/index.js.map +1 -1
- package/dist/api/subscriptions/index.d.ts +1032 -762
- package/dist/api/subscriptions/index.d.ts.map +1 -1
- package/dist/api/subscriptions/index.js +166 -185
- package/dist/api/subscriptions/index.js.map +1 -1
- package/dist/api/users/index.browser.js +48 -71
- package/dist/api/users/index.browser.js.map +1 -1
- package/dist/api/users/index.d.ts +1297 -1109
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +454 -369
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.browser.js +17 -17
- package/dist/api/verifications/index.browser.js.map +1 -1
- package/dist/api/verifications/index.d.ts +169 -157
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/api/verifications/index.js +47 -95
- package/dist/api/verifications/index.js.map +1 -1
- package/dist/background/index.d.ts +0 -1
- package/dist/background/index.d.ts.map +1 -1
- package/dist/background/index.js.map +1 -1
- package/dist/background/index.workerd.js.map +1 -1
- package/dist/batch/index.d.ts +0 -1
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js.map +1 -1
- package/dist/bin/index.js +1 -1
- package/dist/bin/index.js.map +1 -1
- package/dist/bucket/index.d.ts +27 -32
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/bucket/index.js +56 -26
- package/dist/bucket/index.js.map +1 -1
- package/dist/bucket/index.workerd.js +52 -24
- package/dist/bucket/index.workerd.js.map +1 -1
- package/dist/cache/core/index.d.ts +4 -6
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/core/index.js +4 -10
- package/dist/cache/core/index.js.map +1 -1
- package/dist/cache/core/index.workerd.js +4 -10
- package/dist/cache/core/index.workerd.js.map +1 -1
- package/dist/cache/database/index.d.ts +22 -23
- package/dist/cache/database/index.d.ts.map +1 -1
- package/dist/cache/database/index.js +11 -20
- package/dist/cache/database/index.js.map +1 -1
- package/dist/cache/redis/index.d.ts +3 -4
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cache/redis/index.js +2 -2
- package/dist/cache/redis/index.js.map +1 -1
- package/dist/captcha/index.d.ts.map +1 -1
- package/dist/captcha/index.js +4 -4
- package/dist/captcha/index.js.map +1 -1
- package/dist/cli/config/index.d.ts +0 -1
- package/dist/cli/config/index.d.ts.map +1 -1
- package/dist/cli/core/index.d.ts +244 -475
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +308 -383
- package/dist/cli/core/index.js.map +1 -1
- package/dist/cli/devtools/index.d.ts +3 -9
- package/dist/cli/devtools/index.d.ts.map +1 -1
- package/dist/cli/devtools/index.js +3 -3
- package/dist/cli/devtools/index.js.map +1 -1
- package/dist/cli/i18n/index.d.ts +20 -39
- package/dist/cli/i18n/index.d.ts.map +1 -1
- package/dist/cli/i18n/index.js +51 -17
- package/dist/cli/i18n/index.js.map +1 -1
- package/dist/cli/platform/index.d.ts +89 -82
- package/dist/cli/platform/index.d.ts.map +1 -1
- package/dist/cli/platform/index.js +27 -33
- package/dist/cli/platform/index.js.map +1 -1
- package/dist/cli/platform-lib/index.d.ts +383 -410
- package/dist/cli/platform-lib/index.d.ts.map +1 -1
- package/dist/cli/platform-lib/index.js +300 -258
- package/dist/cli/platform-lib/index.js.map +1 -1
- package/dist/cli/vendor/index.d.ts +17 -41
- package/dist/cli/vendor/index.d.ts.map +1 -1
- package/dist/cli/vendor/index.js +10 -13
- package/dist/cli/vendor/index.js.map +1 -1
- package/dist/command/index.d.ts +82 -194
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +160 -563
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +845 -859
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +787 -527
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +845 -859
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +845 -859
- package/dist/core/index.native.js.map +1 -1
- package/dist/core/index.workerd.js +845 -859
- package/dist/core/index.workerd.js.map +1 -1
- package/dist/crypto/index.browser.js +1 -1
- package/dist/crypto/index.browser.js.map +1 -1
- package/dist/crypto/index.d.ts +3 -4
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/crypto/index.js +6 -3
- package/dist/crypto/index.js.map +1 -1
- package/dist/datetime/index.d.ts +12 -2
- package/dist/datetime/index.d.ts.map +1 -1
- package/dist/datetime/index.js +6 -1
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/brevo/index.d.ts +0 -1
- package/dist/email/brevo/index.d.ts.map +1 -1
- package/dist/email/brevo/index.js +4 -4
- package/dist/email/brevo/index.js.map +1 -1
- package/dist/email/cloudflare/index.d.ts +0 -1
- package/dist/email/cloudflare/index.d.ts.map +1 -1
- package/dist/email/cloudflare/index.js +2 -2
- package/dist/email/cloudflare/index.js.map +1 -1
- package/dist/email/core/index.d.ts +15 -7
- package/dist/email/core/index.d.ts.map +1 -1
- package/dist/email/core/index.js +14 -5
- package/dist/email/core/index.js.map +1 -1
- package/dist/email/core/index.workerd.js +5 -1
- package/dist/email/core/index.workerd.js.map +1 -1
- package/dist/email/smtp/index.d.ts +8 -9
- package/dist/email/smtp/index.d.ts.map +1 -1
- package/dist/email/smtp/index.js +702 -479
- package/dist/email/smtp/index.js.map +1 -1
- package/dist/fake/index.d.ts +1580 -1238
- package/dist/fake/index.d.ts.map +1 -1
- package/dist/fake/index.js +11728 -32131
- package/dist/fake/index.js.map +1 -1
- package/dist/lock/core/index.d.ts +13 -9
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/core/index.js +5 -5
- package/dist/lock/core/index.js.map +1 -1
- package/dist/lock/redis/index.d.ts +0 -1
- 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 +81 -69
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +123 -56
- package/dist/logger/index.js.map +1 -1
- package/dist/mcp/index.d.ts +36 -90
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +65 -70
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/core/index.browser.js +54 -40
- package/dist/orm/core/index.browser.js.map +1 -1
- package/dist/orm/core/index.bun.js +140 -106
- package/dist/orm/core/index.bun.js.map +1 -1
- package/dist/orm/core/index.d.ts +145 -150
- package/dist/orm/core/index.d.ts.map +1 -1
- package/dist/orm/core/index.js +144 -109
- package/dist/orm/core/index.js.map +1 -1
- package/dist/orm/postgres/index.bun.js +64 -54
- package/dist/orm/postgres/index.bun.js.map +1 -1
- package/dist/orm/postgres/index.d.ts +36 -76
- package/dist/orm/postgres/index.d.ts.map +1 -1
- package/dist/orm/postgres/index.js +67 -57
- package/dist/orm/postgres/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +62 -75
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/core/index.js +48 -71
- package/dist/queue/core/index.js.map +1 -1
- package/dist/queue/core/index.workerd.js +48 -71
- package/dist/queue/core/index.workerd.js.map +1 -1
- package/dist/queue/redis/index.d.ts +3 -4
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/queue/redis/index.js +2 -2
- package/dist/queue/redis/index.js.map +1 -1
- package/dist/react/auth/index.browser.js.map +1 -1
- package/dist/react/auth/index.d.ts +7 -4
- package/dist/react/auth/index.d.ts.map +1 -1
- package/dist/react/auth/index.js.map +1 -1
- package/dist/react/core/index.d.ts +87 -5
- package/dist/react/core/index.d.ts.map +1 -1
- package/dist/react/core/index.js +170 -23
- package/dist/react/core/index.js.map +1 -1
- package/dist/react/form/index.d.ts +4 -6
- package/dist/react/form/index.d.ts.map +1 -1
- package/dist/react/form/index.js +107 -71
- 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 +0 -1
- 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 -5
- package/dist/react/i18n/index.d.ts.map +1 -1
- package/dist/react/i18n/index.js +116 -12
- package/dist/react/i18n/index.js.map +1 -1
- package/dist/react/intro/index.d.ts +1 -4
- package/dist/react/intro/index.d.ts.map +1 -1
- package/dist/react/intro/index.js.map +1 -1
- package/dist/react/router/index.browser.js +188 -29
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +480 -372
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +261 -47
- 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 +91 -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 +4 -5
- package/dist/react/testing/index.d.ts.map +1 -1
- package/dist/react/testing/index.js +41 -15
- package/dist/react/testing/index.js.map +1 -1
- package/dist/react/testing/{chunk-BpyX8vjI.js → rolldown-runtime-Bl3dcgcQ.js} +1 -1
- package/dist/react/ui/index.d.ts +35 -34
- package/dist/react/ui/index.d.ts.map +1 -1
- package/dist/react/ui/index.js +12 -17
- package/dist/react/ui/index.js.map +1 -1
- package/dist/redis/index.bun.js +5 -5
- package/dist/redis/index.bun.js.map +1 -1
- package/dist/redis/index.d.ts +6 -7
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js +6 -6
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.d.ts +0 -1
- 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 +4 -12
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +9 -4
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/index.workerd.js +9 -4
- package/dist/scheduler/index.workerd.js.map +1 -1
- package/dist/security/index.browser.js +30 -28
- package/dist/security/index.browser.js.map +1 -1
- package/dist/security/index.d.ts +113 -44
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +452 -37
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.browser.js +19 -19
- package/dist/server/auth/index.browser.js.map +1 -1
- package/dist/server/auth/index.d.ts +215 -187
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +1145 -86
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cookies/index.browser.js +103 -5
- package/dist/server/cookies/index.browser.js.map +1 -1
- package/dist/server/cookies/index.d.ts +86 -4
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +121 -8
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.browser.js +22 -27
- package/dist/server/core/index.browser.js.map +1 -1
- package/dist/server/core/index.d.ts +134 -85
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +130 -118
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/cors/index.d.ts +9 -10
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/cors/index.js +14 -26
- package/dist/server/cors/index.js.map +1 -1
- package/dist/server/etag/index.d.ts +2 -3
- 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 -19
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/health/index.js +6 -6
- package/dist/server/health/index.js.map +1 -1
- package/dist/server/links/index.browser.js +15 -18
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +66 -67
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +29 -32
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/metrics/index.d.ts +0 -1
- package/dist/server/metrics/index.d.ts.map +1 -1
- package/dist/server/metrics/index.js +10 -3
- package/dist/server/metrics/index.js.map +1 -1
- package/dist/server/proxy/index.d.ts +0 -1
- 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 +8 -9
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.js +6 -12
- package/dist/server/rate-limit/index.js.map +1 -1
- package/dist/server/static/index.d.ts +0 -1
- 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 +4 -4
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js +37 -25
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +0 -1
- 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 +0 -1
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +2 -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 +19 -20
- package/dist/topic/core/index.d.ts.map +1 -1
- package/dist/topic/core/index.js +8 -8
- package/dist/topic/core/index.js.map +1 -1
- package/dist/topic/redis/index.d.ts +3 -4
- package/dist/topic/redis/index.d.ts.map +1 -1
- package/dist/topic/redis/index.js +2 -2
- package/dist/topic/redis/index.js.map +1 -1
- package/package.json +36 -36
- package/src/api/audits/__tests__/AuditJobs.spec.ts +83 -0
- package/src/api/audits/__tests__/AuditService.spec.ts +139 -1
- package/src/api/audits/controllers/AdminAuditController.ts +41 -41
- package/src/api/audits/entities/audits.ts +22 -22
- package/src/api/audits/index.ts +6 -1
- package/src/api/audits/jobs/AuditJobs.ts +29 -0
- package/src/api/audits/parameters/AuditParameters.ts +51 -0
- package/src/api/audits/primitives/$audit.ts +24 -0
- package/src/api/audits/schemas/auditQuerySchema.ts +13 -13
- package/src/api/audits/schemas/createAuditSchema.ts +18 -18
- package/src/api/audits/services/AuditService.ts +79 -7
- package/src/api/files/__tests__/FileController.spec.ts +5 -5
- package/src/api/files/__tests__/FileJobs.spec.ts +6 -0
- package/src/api/files/controllers/FileController.ts +25 -25
- package/src/api/files/entities/files.ts +15 -15
- package/src/api/files/schemas/fileCreatorSummarySchema.ts +7 -7
- package/src/api/files/schemas/fileQuerySchema.ts +9 -9
- package/src/api/files/schemas/fileResourceSchema.ts +7 -9
- package/src/api/files/schemas/storageStatsSchema.ts +13 -13
- package/src/api/jobs/__tests__/$job-hardening.spec.ts +289 -0
- package/src/api/jobs/__tests__/$job.spec.ts +18 -18
- package/src/api/jobs/controllers/AdminJobController.ts +8 -8
- package/src/api/jobs/entities/jobExecutionEntity.ts +29 -19
- package/src/api/jobs/providers/JobProvider.ts +128 -12
- package/src/api/jobs/providers/JobQueueProvider.ts +2 -2
- package/src/api/jobs/schemas/jobConfigAtom.ts +22 -22
- package/src/api/jobs/schemas/jobExecutionQuerySchema.ts +6 -6
- package/src/api/jobs/schemas/jobExecutionResourceSchema.ts +11 -15
- package/src/api/jobs/schemas/jobRegistrationSchema.ts +20 -19
- package/src/api/jobs/schemas/triggerJobSchema.ts +3 -3
- package/src/api/jobs/services/JobService.ts +6 -6
- package/src/api/keys/__tests__/ApiKeyService.spec.ts +2 -2
- package/src/api/keys/controllers/AdminApiKeyController.ts +10 -10
- package/src/api/keys/entities/apiKeyEntity.ts +15 -15
- package/src/api/keys/schemas/adminApiKeyQuerySchema.ts +4 -4
- package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +15 -15
- package/src/api/keys/schemas/createApiKeyBodySchema.ts +5 -5
- package/src/api/keys/schemas/createApiKeyResponseSchema.ts +9 -9
- package/src/api/keys/schemas/listApiKeyResponseSchema.ts +13 -13
- package/src/api/keys/schemas/revokeApiKeyParamsSchema.ts +3 -3
- package/src/api/keys/schemas/revokeApiKeyResponseSchema.ts +3 -3
- package/src/api/notifications/__tests__/AlephaApiNotifications.spec.ts +2 -2
- package/src/api/notifications/controllers/AdminNotificationController.ts +38 -14
- package/src/api/notifications/jobs/NotificationJobs.ts +7 -6
- package/src/api/notifications/primitives/$notification.ts +43 -4
- package/src/api/notifications/schemas/notificationContactPreferencesSchema.ts +4 -4
- package/src/api/notifications/schemas/notificationContactSchema.ts +7 -7
- package/src/api/notifications/schemas/notificationDetailResourceSchema.ts +9 -11
- package/src/api/notifications/schemas/notificationPayloadSchema.ts +11 -9
- package/src/api/notifications/schemas/notificationQuerySchema.ts +6 -6
- package/src/api/notifications/schemas/notificationResourceSchema.ts +14 -14
- package/src/api/notifications/services/NotificationSenderService.ts +38 -2
- package/src/api/oauth/__tests__/OAuthClientService.spec.ts +42 -0
- package/src/api/oauth/__tests__/OAuthController.spec.ts +128 -0
- package/src/api/oauth/controllers/OAuthController.ts +132 -12
- package/src/api/oauth/entities/oauthClientEntity.ts +29 -12
- package/src/api/oauth/helpers/oauthMetadata.ts +1 -0
- package/src/api/oauth/helpers/oidcMetadata.ts +19 -0
- package/src/api/oauth/index.ts +1 -0
- package/src/api/oauth/schemas/authorizeDecisionBodySchema.ts +12 -11
- package/src/api/oauth/schemas/authorizeQuerySchema.ts +12 -10
- package/src/api/oauth/schemas/registerClientBodySchema.ts +10 -11
- package/src/api/oauth/schemas/tokenRequestBodySchema.ts +9 -8
- package/src/api/oauth/services/OAuthClientService.ts +228 -15
- package/src/api/organizations/controllers/AdminOrganizationController.ts +8 -8
- package/src/api/organizations/entities/organizations.ts +6 -6
- package/src/api/organizations/schemas/createOrganizationSchema.ts +5 -5
- package/src/api/organizations/schemas/organizationQuerySchema.ts +4 -4
- package/src/api/organizations/schemas/updateOrganizationSchema.ts +1 -2
- package/src/api/parameters/__tests__/$parameter.spec.ts +229 -50
- package/src/api/parameters/controllers/AdminParameterController.ts +9 -12
- package/src/api/parameters/entities/parameters.ts +29 -16
- package/src/api/parameters/primitives/$parameter.ts +3 -3
- package/src/api/parameters/schemas/activateParameterBodySchema.ts +4 -4
- package/src/api/parameters/schemas/createParameterVersionBodySchema.ts +15 -15
- package/src/api/parameters/schemas/parameterCreatorSummarySchema.ts +7 -7
- package/src/api/parameters/schemas/parameterCurrentResponseSchema.ts +7 -7
- package/src/api/parameters/schemas/parameterHistoryResponseSchema.ts +3 -3
- package/src/api/parameters/schemas/parameterNameParamSchema.ts +2 -3
- package/src/api/parameters/schemas/parameterNamesResponseSchema.ts +3 -3
- package/src/api/parameters/schemas/parameterResponseSchema.ts +3 -3
- package/src/api/parameters/schemas/parameterStatusSchema.ts +2 -2
- package/src/api/parameters/schemas/parameterTreeNodeSchema.ts +6 -6
- package/src/api/parameters/schemas/parameterVersionParamSchema.ts +5 -6
- package/src/api/parameters/schemas/parameterVersionResponseSchema.ts +3 -3
- package/src/api/parameters/schemas/rollbackParameterBodySchema.ts +6 -9
- package/src/api/parameters/services/ParameterProvider.ts +152 -65
- package/src/api/payments/controllers/AdminPaymentController.ts +7 -7
- package/src/api/payments/controllers/MockCheckoutController.ts +79 -28
- package/src/api/payments/controllers/PaymentController.ts +4 -4
- package/src/api/payments/entities/paymentIntents.ts +11 -11
- package/src/api/payments/entities/paymentMethods.ts +11 -11
- package/src/api/payments/entities/refunds.ts +9 -9
- package/src/api/payments/providers/PaymentProvider.ts +18 -0
- package/src/api/payments/schemas/intentSchemas.ts +25 -25
- package/src/api/payments/schemas/paymentMethodSchemas.ts +3 -3
- package/src/api/payments/services/PaymentService.ts +60 -3
- package/src/api/subscriptions/__tests__/SubscriptionService.spec.ts +14 -0
- package/src/api/subscriptions/controllers/AdminSubscriptionController.ts +11 -11
- package/src/api/subscriptions/controllers/SubscriptionController.ts +5 -4
- package/src/api/subscriptions/entities/subscriptionEvents.ts +15 -15
- package/src/api/subscriptions/entities/subscriptions.ts +22 -22
- package/src/api/subscriptions/notifications/SubscriptionNotifications.ts +22 -22
- package/src/api/subscriptions/schemas/cancelSubscriptionSchema.ts +4 -4
- package/src/api/subscriptions/schemas/changePlanSchema.ts +5 -5
- package/src/api/subscriptions/schemas/createSubscriptionSchema.ts +14 -7
- package/src/api/subscriptions/schemas/entitlementsSchema.ts +10 -10
- package/src/api/subscriptions/schemas/mrrSchema.ts +9 -9
- package/src/api/subscriptions/schemas/planDefinitionSchema.ts +21 -21
- package/src/api/subscriptions/schemas/planResourceSchema.ts +19 -19
- package/src/api/subscriptions/schemas/subscriptionQuerySchema.ts +8 -8
- package/src/api/subscriptions/schemas/subscriptionSettingsSchema.ts +7 -7
- package/src/api/subscriptions/schemas/subscriptionStatsSchema.ts +17 -17
- package/src/api/subscriptions/services/SubscriptionConfig.ts +2 -2
- package/src/api/users/__tests__/ApiKeys-integration.spec.ts +11 -11
- package/src/api/users/atoms/realmAuthSettingsAtom.ts +111 -119
- package/src/api/users/controllers/AdminIdentityController.ts +29 -19
- package/src/api/users/controllers/AdminSessionController.ts +37 -27
- package/src/api/users/controllers/AdminUserController.ts +75 -53
- package/src/api/users/controllers/MySessionController.ts +125 -0
- package/src/api/users/controllers/RealmController.ts +9 -9
- package/src/api/users/controllers/UserController.ts +55 -55
- package/src/api/users/entities/identities.ts +8 -8
- package/src/api/users/entities/sessions.ts +17 -17
- package/src/api/users/entities/users.ts +17 -17
- package/src/api/users/index.ts +3 -0
- package/src/api/users/notifications/UserNotifications.ts +76 -24
- package/src/api/users/primitives/$realm.ts +12 -0
- package/src/api/users/schemas/completePasswordResetRequestSchema.ts +8 -12
- package/src/api/users/schemas/completeRegistrationRequestSchema.ts +17 -20
- package/src/api/users/schemas/createUserSchema.ts +2 -2
- package/src/api/users/schemas/identityQuerySchema.ts +4 -4
- package/src/api/users/schemas/identityResourceSchema.ts +3 -2
- package/src/api/users/schemas/loginSchema.ts +4 -4
- package/src/api/users/schemas/passwordResetIntentResponseSchema.ts +6 -8
- package/src/api/users/schemas/realmConfigSchema.ts +10 -10
- package/src/api/users/schemas/registerQuerySchema.ts +6 -6
- package/src/api/users/schemas/registerRequestSchema.ts +21 -43
- package/src/api/users/schemas/registerResponseSchema.ts +2 -2
- package/src/api/users/schemas/registerSchema.ts +13 -31
- package/src/api/users/schemas/registrationIntentResponseSchema.ts +19 -23
- package/src/api/users/schemas/resetPasswordSchema.ts +10 -17
- package/src/api/users/schemas/sessionQuerySchema.ts +3 -3
- package/src/api/users/schemas/sessionResourceSchema.ts +25 -25
- package/src/api/users/schemas/updateUserSchema.ts +3 -4
- package/src/api/users/schemas/userQuerySchema.ts +7 -7
- package/src/api/users/services/RegistrationService.ts +25 -11
- package/src/api/users/services/UserService.ts +12 -6
- package/src/api/verifications/__tests__/CodeVerification.spec.ts +63 -101
- package/src/api/verifications/__tests__/LinkVerification.spec.ts +23 -92
- package/src/api/verifications/controllers/VerificationController.ts +13 -27
- package/src/api/verifications/entities/verifications.ts +13 -14
- package/src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts +17 -14
- package/src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts +9 -10
- package/src/api/verifications/schemas/verificationSettingsSchema.ts +65 -66
- package/src/api/verifications/schemas/verificationTypeEnumSchema.ts +2 -2
- package/src/api/verifications/services/VerificationService.ts +12 -0
- package/src/background/__tests__/BackgroundTaskProvider.spec.ts +36 -0
- package/src/batch/__tests__/$batch.spec.ts +22 -22
- package/src/batch/__tests__/startup-buffering.spec.ts +9 -9
- package/src/bin/index.ts +1 -1
- package/src/bucket/__tests__/TenantScopedBucket.spec.ts +60 -0
- package/src/bucket/providers/LocalFileStorageProvider.ts +14 -6
- package/src/bucket/providers/MemoryFileStorageProvider.ts +18 -7
- package/src/bucket/providers/R2FileStorageProvider.ts +14 -6
- package/src/bucket/providers/S3FileStorageProvider.ts +31 -15
- package/src/cache/core/primitives/$cache.ts +7 -10
- package/src/cache/database/entities/cacheEntries.ts +16 -27
- package/src/cache/database/providers/DatabaseCacheProvider.ts +15 -13
- package/src/cache/redis/providers/RedisCacheProvider.ts +6 -6
- package/src/captcha/providers/TurnstileCaptchaProvider.ts +4 -4
- package/src/cli/core/__tests__/BuildCloudflareTask.spec.ts +178 -0
- package/src/cli/core/__tests__/BuildDockerTask.spec.ts +0 -2
- package/src/cli/core/__tests__/DbCommand.spec.ts +108 -0
- package/src/cli/core/atoms/appEntryOptions.ts +5 -5
- package/src/cli/core/atoms/buildOptions.ts +76 -88
- package/src/cli/core/atoms/changelogOptions.ts +3 -3
- package/src/cli/core/atoms/devOptions.ts +3 -3
- package/src/cli/core/commands/build.ts +36 -49
- package/src/cli/core/commands/db.ts +171 -83
- package/src/cli/core/commands/dev.ts +8 -8
- package/src/cli/core/commands/gen/changelog.ts +12 -14
- package/src/cli/core/commands/gen/env.ts +6 -6
- package/src/cli/core/commands/gen/openapi.ts +6 -6
- package/src/cli/core/commands/init.ts +28 -33
- package/src/cli/core/commands/pack.ts +10 -10
- package/src/cli/core/commands/root.ts +7 -8
- package/src/cli/core/commands/test.ts +17 -20
- package/src/cli/core/index.ts +0 -3
- package/src/cli/core/tasks/BuildCloudflareTask.ts +138 -245
- package/src/cli/core/tasks/BuildPrerenderTask.ts +44 -7
- package/src/cli/core/templates/apiHelloResponseSchemaTs.ts +4 -4
- package/src/cli/devtools/atoms/devtoolsOptions.ts +6 -6
- package/src/cli/i18n/__tests__/I18nCheckService.spec.ts +48 -0
- package/src/cli/i18n/atoms/i18nOptions.ts +8 -8
- package/src/cli/i18n/services/I18nCheckService.ts +65 -11
- package/src/cli/platform/commands/SecretsCommand.ts +24 -25
- package/src/cli/platform/commands/platform.ts +40 -46
- package/src/cli/platform/index.ts +1 -1
- package/src/cli/platform-lib/__tests__/CloudflareAdapter.spec.ts +0 -4
- package/src/cli/platform-lib/__tests__/PlatformInspector.spec.ts +10 -3
- package/src/cli/platform-lib/__tests__/VercelAdapter.spec.ts +0 -2
- package/src/cli/platform-lib/adapters/CloudflareAdapter.ts +141 -50
- package/src/cli/platform-lib/adapters/VercelAdapter.ts +6 -11
- package/src/cli/platform-lib/atoms/platformOptions.ts +46 -25
- package/src/cli/platform-lib/schemas/cloudflare.ts +87 -87
- package/src/cli/platform-lib/schemas/platform.ts +51 -51
- package/src/cli/platform-lib/schemas/vercel.ts +28 -28
- package/src/cli/platform-lib/services/CloudflareApi.ts +5 -5
- package/src/cli/platform-lib/services/VercelApi.ts +4 -4
- package/src/cli/platform-lib/services/VercelCli.ts +6 -15
- package/src/cli/platform-lib/services/WranglerApi.ts +6 -15
- package/src/cli/vendor/atoms/vendorOptions.ts +9 -9
- package/src/cli/vendor/commands/VendorCommand.ts +11 -12
- package/src/command/__tests__/$command.spec.ts +82 -83
- package/src/command/__tests__/Asker.spec.ts +6 -13
- package/src/command/__tests__/CliProvider.spec.ts +136 -149
- package/src/command/__tests__/Runner.spec.ts +86 -110
- package/src/command/helpers/Asker.ts +23 -58
- package/src/command/helpers/Runner.ts +34 -110
- package/src/command/index.ts +4 -9
- package/src/command/primitives/$command.ts +10 -10
- package/src/command/providers/CliProvider.ts +183 -161
- package/src/core/Alepha.ts +62 -13
- package/src/core/__tests__/$atom.spec.ts +52 -3
- package/src/core/__tests__/$computed.spec.ts +129 -0
- package/src/core/__tests__/$env.spec.ts +13 -13
- package/src/core/__tests__/$inject.spec.ts +4 -4
- package/src/core/__tests__/$module.spec.ts +1 -1
- package/src/core/__tests__/Alepha-graph.spec.ts +1 -1
- package/src/core/__tests__/Alepha-parseEnv.spec.ts +32 -32
- package/src/core/__tests__/Alepha-start.spec.ts +3 -3
- package/src/core/__tests__/CodecManager.spec.ts +113 -94
- package/src/core/__tests__/KeylessJsonSchemaCodec.spec.ts +138 -138
- package/src/core/__tests__/SchemaValidator.spec.ts +43 -44
- package/src/core/__tests__/StateManager.persist.browser.spec.ts +87 -0
- package/src/core/__tests__/StateManager.spec.ts +423 -0
- package/src/core/__tests__/TypeBox-usecases.spec.ts +8 -8
- package/src/core/__tests__/TypeProvider.spec.ts +314 -309
- package/src/core/__tests__/dump.spec.ts +6 -6
- package/src/core/__tests__/pagination.spec.ts +4 -4
- package/src/core/__tests__/scoped-after-start.spec.ts +43 -0
- package/src/core/errors/TypeBoxError.ts +10 -4
- package/src/core/helpers/FileLike.ts +5 -5
- package/src/core/helpers/coerceStrings.ts +70 -0
- package/src/core/helpers/jsonSchemaToZod.ts +112 -0
- package/src/core/index.shared.ts +4 -1
- package/src/core/primitives/$atom.ts +95 -27
- package/src/core/primitives/$computed.ts +148 -0
- package/src/core/primitives/$env.ts +5 -5
- package/src/core/primitives/$state.ts +1 -1
- package/src/core/providers/AlsProvider.ts +26 -0
- package/src/core/providers/CodecManager.ts +1 -2
- package/src/core/providers/JsonSchemaCodec.ts +1 -2
- package/src/core/providers/KeylessJsonSchemaCodec.ts +82 -57
- package/src/core/providers/SchemaValidator.ts +48 -158
- package/src/core/providers/StateManager.ts +383 -9
- package/src/core/providers/TypeProvider.ts +80 -734
- package/src/core/providers/ZodProvider.ts +380 -0
- package/src/core/providers/zodAugment.ts +69 -0
- package/src/core/schemas/pageQuerySchema.ts +19 -21
- package/src/core/schemas/pageSchema.ts +47 -57
- package/src/crypto/__tests__/SecretProvider.spec.ts +31 -0
- package/src/crypto/providers/SecretProvider.ts +16 -10
- package/src/datetime/primitives/$throttle.ts +6 -1
- package/src/email/brevo/providers/BrevoEmailProvider.ts +4 -4
- package/src/email/cloudflare/providers/CloudflareEmailProvider.ts +6 -6
- package/src/email/core/index.ts +7 -2
- package/src/email/core/primitives/$email.ts +5 -1
- package/src/email/core/providers/LocalEmailProvider.ts +5 -5
- package/src/email/smtp/providers/NodemailerEmailProvider.ts +41 -52
- package/src/fake/__tests__/FakeProvider.spec.ts +110 -110
- package/src/fake/__tests__/keyName.example.ts +21 -21
- package/src/fake/__tests__/keyName.spec.ts +41 -41
- package/src/fake/__tests__/module.example.ts +8 -8
- package/src/fake/providers/FakeProvider.ts +122 -121
- package/src/lock/core/__tests__/lock-mutual-exclusion.spec.ts +44 -0
- package/src/lock/core/index.ts +1 -0
- package/src/lock/core/primitives/$lock.ts +13 -6
- package/src/logger/__tests__/CliFormatterProvider.spec.ts +76 -0
- package/src/logger/__tests__/Logger.spec.ts +49 -0
- package/src/logger/index.ts +25 -18
- package/src/logger/providers/CliFormatterProvider.ts +75 -0
- package/src/logger/schemas/logEntrySchema.ts +10 -10
- package/src/logger/services/Logger.ts +18 -0
- package/src/mcp/__tests__/$prompt.spec.ts +21 -23
- package/src/mcp/__tests__/$tool.spec.ts +22 -22
- package/src/mcp/__tests__/McpServerProvider.spec.ts +82 -11
- package/src/mcp/__tests__/StreamableHttpMcpTransport.spec.ts +2 -2
- package/src/mcp/__tests__/integration.spec.ts +33 -33
- package/src/mcp/primitives/$prompt.ts +11 -9
- package/src/mcp/primitives/$tool.ts +27 -86
- package/src/mcp/providers/McpServerProvider.ts +55 -0
- package/src/mcp/transports/StreamableHttpMcpTransport.ts +7 -7
- package/src/orm/__tests__/$repository-tests.ts +133 -27
- package/src/orm/__tests__/$repository.spec.ts +23 -0
- package/src/orm/__tests__/$transactional-tests.ts +4 -4
- package/src/orm/__tests__/ModelBuilder-tests.ts +28 -28
- package/src/orm/__tests__/ModelBuilder.spec.ts +124 -106
- package/src/orm/__tests__/QueryManager.spec.ts +5 -5
- package/src/orm/__tests__/delete-returning-tests.ts +11 -11
- package/src/orm/__tests__/deletedAt-tests.ts +3 -3
- package/src/orm/__tests__/enums.spec.ts +29 -25
- package/src/orm/__tests__/execute-tests.ts +8 -8
- package/src/orm/__tests__/fixtures/bigEntitySchema.ts +48 -48
- package/src/orm/__tests__/fixtures/userEntitySchema.ts +6 -6
- package/src/orm/__tests__/joins-tests.ts +30 -30
- package/src/orm/__tests__/organization-tests.ts +105 -3
- package/src/orm/__tests__/organization.spec.ts +46 -0
- package/src/orm/__tests__/orm-errors.spec.ts +10 -10
- package/src/orm/__tests__/orm-next-tests.ts +29 -29
- package/src/orm/__tests__/orm-showcase-tests.ts +9 -9
- package/src/orm/__tests__/primaryKey.spec.ts +4 -4
- package/src/orm/__tests__/query-date-encoding-tests.ts +17 -17
- package/src/orm/__tests__/ref-auto-onDelete.spec.ts +14 -14
- package/src/orm/__tests__/references.spec.ts +7 -7
- package/src/orm/__tests__/security.spec.ts +17 -17
- package/src/orm/__tests__/string-operators-tests.ts +5 -5
- package/src/orm/__tests__/timestamps-tests.ts +14 -14
- package/src/orm/__tests__/validation-tests.ts +5 -5
- package/src/orm/core/__tests__/BunSqliteProvider.bun.spec.ts +8 -8
- package/src/orm/core/constants/PG_SYMBOLS.ts +13 -1
- package/src/orm/core/entities/alephaSequences.ts +8 -8
- package/src/orm/core/helpers/pgAttr.ts +4 -4
- package/src/orm/core/primitives/$entity.ts +10 -6
- package/src/orm/core/providers/DatabaseTypeProvider.ts +46 -53
- package/src/orm/core/providers/drivers/BunSqliteProvider.ts +8 -8
- package/src/orm/core/providers/drivers/CloudflareD1Provider.ts +3 -5
- package/src/orm/core/providers/drivers/NodeSqliteProvider.ts +8 -8
- package/src/orm/core/schemas/databaseEnvSchema.ts +4 -4
- package/src/orm/core/schemas/insertSchema.ts +14 -18
- package/src/orm/core/schemas/legacyIdSchema.ts +2 -2
- package/src/orm/core/schemas/updateSchema.ts +10 -16
- package/src/orm/core/services/PgRelationManager.ts +2 -2
- package/src/orm/core/services/QueryManager.ts +13 -2
- package/src/orm/core/services/Repository.ts +88 -33
- package/src/orm/core/services/SqliteModelBuilder.ts +38 -45
- package/src/orm/postgres/__tests__/BunPostgresProvider.bun.spec.ts +4 -4
- package/src/orm/postgres/providers/CloudflareHyperdriveProvider.ts +4 -6
- package/src/orm/postgres/schemas/postgresEnvSchema.ts +6 -6
- package/src/orm/postgres/services/PostgresModelBuilder.ts +127 -114
- package/src/queue/core/__tests__/$consumer.spec.ts +4 -4
- package/src/queue/core/__tests__/WorkerProvider.spec.ts +4 -4
- package/src/queue/core/__tests__/shared.ts +6 -6
- package/src/queue/core/primitives/$consumer.ts +5 -5
- package/src/queue/core/primitives/$queue.ts +44 -61
- package/src/queue/core/providers/CloudflareQueueProvider.ts +6 -0
- package/src/queue/core/providers/WorkerProvider.ts +17 -14
- package/src/queue/redis/providers/RedisQueueProvider.ts +3 -3
- package/src/react/core/__tests__/ErrorBoundary.browser.spec.tsx +92 -0
- package/src/react/core/__tests__/Router.spec.tsx +4 -4
- package/src/react/core/__tests__/useComputed.browser.spec.tsx +192 -0
- package/src/react/core/__tests__/useQuery.browser.spec.tsx +48 -0
- package/src/react/core/__tests__/useSelector.browser.spec.tsx +105 -0
- package/src/react/core/__tests__/useStore.browser.spec.tsx +113 -0
- package/src/react/core/components/ErrorBoundary.tsx +42 -0
- package/src/react/core/hooks/useAction.ts +56 -19
- package/src/react/core/hooks/useComputed.ts +91 -0
- package/src/react/core/hooks/useSelector.ts +67 -0
- package/src/react/core/hooks/useStore.ts +36 -17
- package/src/react/core/index.ts +3 -0
- package/src/react/core/utils/shallowEqual.ts +36 -0
- 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/__tests__/useForm.browser.spec.tsx +54 -54
- package/src/react/form/errors/FormValidationError.ts +0 -2
- package/src/react/form/hooks/useForm.ts +19 -4
- package/src/react/form/hooks/useFormQuerySync.ts +0 -0
- package/src/react/form/services/FormModel.ts +124 -86
- package/src/react/form/services/parseField.ts +66 -27
- package/src/react/i18n/__tests__/I18nProvider.spec.ts +89 -0
- package/src/react/i18n/__tests__/Localize.spec.tsx +1 -1
- package/src/react/i18n/__tests__/locale-routing.spec.ts +107 -0
- package/src/react/i18n/providers/I18nProvider.ts +173 -14
- package/src/react/router/__tests__/$page.browser.spec.tsx +19 -19
- package/src/react/router/__tests__/$page.spec.tsx +21 -21
- package/src/react/router/__tests__/ReactBrowserProvider.browser.spec.ts +87 -1
- package/src/react/router/__tests__/RouterLocaleProvider.spec.ts +127 -0
- package/src/react/router/atoms/ssrManifestAtom.ts +16 -16
- package/src/react/router/components/NestedView.tsx +11 -3
- package/src/react/router/hooks/useQueryParams.ts +1 -1
- 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 +2 -2
- package/src/react/router/providers/ReactBrowserProvider.ts +64 -13
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +15 -1
- package/src/react/router/providers/ReactPageProvider.ts +38 -13
- package/src/react/router/providers/ReactServerProvider.ts +105 -16
- 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/atoms/uiAtom.ts +6 -6
- package/src/react/ui/atoms/uiThemeListAtom.ts +7 -7
- package/src/react/ui/hooks/useColorMode.ts +11 -4
- package/src/react/ui/services/SchemaControl.ts +4 -4
- package/src/redis/providers/BunRedisProvider.ts +19 -11
- package/src/redis/providers/NodeRedisProvider.ts +3 -3
- package/src/scheduler/primitives/$scheduler.ts +21 -8
- package/src/security/__tests__/assertRealmScope.spec.ts +29 -0
- package/src/security/atoms/currentTenantAtom.ts +6 -6
- package/src/security/atoms/currentUserAtom.ts +2 -2
- package/src/security/primitives/$issuer.ts +24 -2
- package/src/security/providers/JwtProvider.ts +100 -0
- package/src/security/providers/SecurityProvider.ts +43 -2
- package/src/security/schemas/permissionSchema.ts +19 -19
- package/src/security/schemas/roleSchema.ts +22 -28
- package/src/security/schemas/userAccountInfoSchema.ts +47 -37
- package/src/server/auth/__tests__/appleClientSecret.spec.ts +34 -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/jtiReplayGuard.ts +41 -0
- package/src/server/auth/helpers/safeRedirectPath.ts +19 -0
- package/src/server/auth/index.ts +1 -0
- package/src/server/auth/primitives/$auth.ts +6 -6
- package/src/server/auth/primitives/$authApple.ts +10 -10
- package/src/server/auth/primitives/$authFacebook.ts +10 -10
- package/src/server/auth/primitives/$authFranceConnect.ts +10 -10
- package/src/server/auth/primitives/$authGithub.ts +10 -10
- package/src/server/auth/primitives/$authGoogle.ts +10 -10
- package/src/server/auth/primitives/$authMicrosoft.ts +14 -14
- package/src/server/auth/providers/ServerAuthProvider.ts +67 -52
- package/src/server/auth/schemas/authenticationProviderSchema.ts +9 -12
- package/src/server/auth/schemas/tokenResponseSchema.ts +2 -2
- package/src/server/auth/schemas/tokensSchema.ts +16 -16
- package/src/server/auth/schemas/userinfoResponseSchema.ts +3 -3
- package/src/server/cookies/__tests__/AtomCookieBinding.spec.ts +80 -0
- package/src/server/cookies/__tests__/AtomCookiePersistence.browser.spec.ts +169 -0
- package/src/server/cookies/__tests__/AtomCookiePersistence.spec.ts +294 -0
- package/src/server/cookies/__tests__/ServerCookiesProvider.spec.ts +82 -12
- package/src/server/cookies/index.browser.ts +4 -1
- package/src/server/cookies/index.ts +8 -1
- package/src/server/cookies/primitives/$cookie.browser.ts +1 -1
- package/src/server/cookies/primitives/$cookie.ts +16 -0
- package/src/server/cookies/providers/AtomCookiePersistence.browser.ts +133 -0
- package/src/server/cookies/providers/AtomCookiePersistence.ts +148 -0
- package/src/server/cookies/providers/ServerCookiesProvider.ts +32 -4
- package/src/server/cookies/services/CookieParser.ts +6 -1
- package/src/server/core/__tests__/$action.spec.ts +13 -13
- package/src/server/core/__tests__/$middleware.spec.ts +10 -10
- package/src/server/core/__tests__/$route.spec.ts +9 -9
- package/src/server/core/__tests__/$sse.spec.ts +26 -26
- package/src/server/core/__tests__/BunHttpServerProvider.bun.spec.ts +6 -6
- package/src/server/core/__tests__/HttpClient.spec.ts +2 -2
- package/src/server/core/__tests__/NodeHttpServerProvider.spec.ts +15 -3
- package/src/server/core/__tests__/ServerBodyParserProvider.spec.ts +14 -14
- package/src/server/core/__tests__/ServerMultipartProvider.spec.ts +33 -33
- package/src/server/core/__tests__/ServerRouterProvider-errorHandler.spec.ts +5 -1
- package/src/server/core/__tests__/ServerRouterProvider-getRoutes.spec.ts +25 -25
- package/src/server/core/__tests__/ServerRouterProvider-serializationError.spec.ts +9 -5
- package/src/server/core/__tests__/ServerRouterProvider-validationError.spec.ts +56 -24
- package/src/server/core/errors/ValidationError.ts +6 -3
- package/src/server/core/helpers/isMultipart.ts +2 -1
- package/src/server/core/index.ts +5 -2
- package/src/server/core/interfaces/ServerRequest.ts +14 -14
- package/src/server/core/primitives/$action.ts +26 -36
- package/src/server/core/primitives/$route.ts +27 -0
- package/src/server/core/primitives/$sse.ts +3 -3
- package/src/server/core/providers/BunHttpServerProvider.ts +8 -9
- package/src/server/core/providers/NodeHttpServerProvider.ts +8 -9
- package/src/server/core/providers/ServerBodyParserProvider.ts +20 -12
- package/src/server/core/providers/ServerCompressProvider.ts +9 -10
- package/src/server/core/providers/ServerHelmetProvider.ts +26 -27
- package/src/server/core/providers/ServerMultipartProvider.ts +19 -19
- package/src/server/core/providers/ServerRouterProvider.ts +44 -15
- package/src/server/core/schemas/errorSchema.ts +20 -25
- package/src/server/core/schemas/okSchema.ts +9 -14
- package/src/server/core/services/HttpClient.ts +13 -1
- package/src/server/core/services/ServerRequestParser.ts +6 -6
- package/src/server/cors/providers/ServerCorsProvider.ts +26 -28
- package/src/server/health/schemas/healthSchema.ts +6 -6
- package/src/server/links/__tests__/$remote.spec.ts +3 -3
- package/src/server/links/__tests__/BatchEndpoint.spec.ts +9 -9
- package/src/server/links/__tests__/LinkProvider.spec.ts +9 -9
- package/src/server/links/__tests__/ServerLinksProvider.spec.ts +23 -23
- package/src/server/links/__tests__/fixtures/CrudApp.ts +21 -21
- package/src/server/links/atoms/apiLinksAtom.ts +2 -2
- package/src/server/links/atoms/linkOptionsAtom.ts +6 -6
- package/src/server/links/primitives/$remote.ts +3 -3
- package/src/server/links/providers/LinkProvider.ts +3 -3
- package/src/server/links/providers/ServerLinksProvider.ts +20 -20
- package/src/server/links/schemas/apiLinksResponseSchema.ts +23 -23
- package/src/server/proxy/__tests__/$proxy.spec.ts +9 -9
- package/src/server/proxy/providers/ServerProxyProvider.ts +5 -0
- package/src/server/rate-limit/providers/ServerRateLimitProvider.ts +18 -20
- package/src/server/swagger/__tests__/$swagger.spec.ts +91 -94
- package/src/server/swagger/__tests__/ui.spec.ts +3 -3
- package/src/server/swagger/providers/ServerSwaggerProvider.ts +66 -43
- package/src/system/__tests__/NodeShellProvider.spec.ts +46 -0
- package/src/system/providers/NodeShellProvider.ts +4 -1
- package/src/topic/core/__tests__/$subscriber.spec.ts +4 -4
- package/src/topic/core/__tests__/shared.ts +8 -8
- package/src/topic/core/primitives/$subscriber.ts +5 -5
- package/src/topic/core/primitives/$topic.ts +14 -14
- package/src/topic/redis/providers/RedisTopicProvider.ts +3 -3
- package/dist/container/core/index.d.ts +0 -236
- package/dist/container/core/index.d.ts.map +0 -1
- package/dist/container/core/index.js +0 -231
- package/dist/container/core/index.js.map +0 -1
- package/dist/container/core/index.workerd.js +0 -192
- package/dist/container/core/index.workerd.js.map +0 -1
- package/src/cli/core/tasks/BuildSitemapTask.ts +0 -130
- package/src/command/helpers/PrettyAsker.ts +0 -256
- package/src/command/helpers/PrettyPrint.ts +0 -332
- package/src/container/core/__tests__/$container.spec.ts +0 -83
- package/src/container/core/index.ts +0 -50
- package/src/container/core/index.workerd.ts +0 -53
- package/src/container/core/interfaces/ContainerOptions.ts +0 -69
- package/src/container/core/primitives/$container.ts +0 -100
- package/src/container/core/providers/CloudflareContainerProvider.ts +0 -70
- package/src/container/core/providers/ContainerProvider.ts +0 -92
- package/src/container/core/providers/MockContainerProvider.ts +0 -62
- package/src/container/core/providers/NodeContainerProvider.ts +0 -53
- package/src/core/__tests__/jsonSchemaToTypeBox.spec.ts +0 -771
- package/src/core/helpers/jsonSchemaToTypeBox.ts +0 -359
- /package/dist/orm/core/{chunk-B4FMCO8f.js → rolldown-runtime-B4FMCO8f.js} +0 -0
|
@@ -3,11 +3,22 @@ import { Page } from "alepha/orm";
|
|
|
3
3
|
import { ServerRequest } from "alepha/server";
|
|
4
4
|
import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
|
|
5
5
|
import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
|
|
6
|
+
import "drizzle-orm/pg-core/foreign-keys";
|
|
7
|
+
import "alepha/datetime";
|
|
8
|
+
import "drizzle-orm/pg-core/session";
|
|
9
|
+
import "alepha/crypto";
|
|
10
|
+
import "drizzle-kit/api";
|
|
11
|
+
import "drizzle-orm/d1";
|
|
12
|
+
import "drizzle-orm/sqlite-core";
|
|
6
13
|
//#region ../../src/api/audits/entities/audits.d.ts
|
|
7
14
|
/**
|
|
8
15
|
* Audit severity levels for categorizing events.
|
|
9
16
|
*/
|
|
10
|
-
declare const auditSeveritySchema: import("
|
|
17
|
+
declare const auditSeveritySchema: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
18
|
+
critical: "critical";
|
|
19
|
+
info: "info";
|
|
20
|
+
warning: "warning";
|
|
21
|
+
}>>;
|
|
11
22
|
type AuditSeverity = Static<typeof auditSeveritySchema>;
|
|
12
23
|
/**
|
|
13
24
|
* Audit log entity for tracking important system events.
|
|
@@ -18,262 +29,135 @@ type AuditSeverity = Static<typeof auditSeveritySchema>;
|
|
|
18
29
|
* - When it happened (createdAt)
|
|
19
30
|
* - Context and details (metadata, ipAddress, userAgent)
|
|
20
31
|
*/
|
|
21
|
-
declare const audits: import("alepha/orm").EntityPrimitive<import("
|
|
22
|
-
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("
|
|
23
|
-
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("
|
|
24
|
-
organizationId: import("alepha/orm").PgAttr<import("
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
97
|
-
* Used for categorizing and filtering audit events.
|
|
98
|
-
*/
|
|
99
|
-
type: import("typebox").TString;
|
|
100
|
-
/**
|
|
101
|
-
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
102
|
-
*/
|
|
103
|
-
action: import("typebox").TString;
|
|
104
|
-
/**
|
|
105
|
-
* Severity level of the event.
|
|
106
|
-
*/
|
|
107
|
-
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
108
|
-
/**
|
|
109
|
-
* User ID who performed the action (null for system events).
|
|
110
|
-
*/
|
|
111
|
-
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
112
|
-
/**
|
|
113
|
-
* User realm for multi-tenant support.
|
|
114
|
-
*/
|
|
115
|
-
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
116
|
-
/**
|
|
117
|
-
* User email at the time of the event (denormalized for history).
|
|
118
|
-
*/
|
|
119
|
-
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
120
|
-
/**
|
|
121
|
-
* Resource type affected (e.g., "user", "order", "file").
|
|
122
|
-
*/
|
|
123
|
-
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
124
|
-
/**
|
|
125
|
-
* Resource ID affected.
|
|
126
|
-
*/
|
|
127
|
-
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
128
|
-
/**
|
|
129
|
-
* Human-readable description of the event.
|
|
130
|
-
*/
|
|
131
|
-
description: import("typebox").TOptional<import("typebox").TString>;
|
|
132
|
-
/**
|
|
133
|
-
* Additional metadata/context as JSON.
|
|
134
|
-
*/
|
|
135
|
-
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
136
|
-
/**
|
|
137
|
-
* Client IP address.
|
|
138
|
-
*/
|
|
139
|
-
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
140
|
-
/**
|
|
141
|
-
* Client user agent.
|
|
142
|
-
*/
|
|
143
|
-
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
144
|
-
/**
|
|
145
|
-
* Session ID if applicable.
|
|
146
|
-
*/
|
|
147
|
-
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
148
|
-
/**
|
|
149
|
-
* Request ID for correlation.
|
|
150
|
-
*/
|
|
151
|
-
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
152
|
-
/**
|
|
153
|
-
* Whether the action was successful.
|
|
154
|
-
*/
|
|
155
|
-
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
156
|
-
/**
|
|
157
|
-
* Error message if the action failed.
|
|
158
|
-
*/
|
|
159
|
-
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
160
|
-
}>;
|
|
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>;
|
|
165
|
-
/**
|
|
166
|
-
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
167
|
-
* Used for categorizing and filtering audit events.
|
|
168
|
-
*/
|
|
169
|
-
type: import("typebox").TString;
|
|
170
|
-
/**
|
|
171
|
-
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
172
|
-
*/
|
|
173
|
-
action: import("typebox").TString;
|
|
174
|
-
/**
|
|
175
|
-
* Severity level of the event.
|
|
176
|
-
*/
|
|
177
|
-
severity: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"info" | "warning" | "critical">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
178
|
-
/**
|
|
179
|
-
* User ID who performed the action (null for system events).
|
|
180
|
-
*/
|
|
181
|
-
userId: import("typebox").TOptional<import("typebox").TString>;
|
|
182
|
-
/**
|
|
183
|
-
* User realm for multi-tenant support.
|
|
184
|
-
*/
|
|
185
|
-
userRealm: import("typebox").TOptional<import("typebox").TString>;
|
|
186
|
-
/**
|
|
187
|
-
* User email at the time of the event (denormalized for history).
|
|
188
|
-
*/
|
|
189
|
-
userEmail: import("typebox").TOptional<import("typebox").TString>;
|
|
190
|
-
/**
|
|
191
|
-
* Resource type affected (e.g., "user", "order", "file").
|
|
192
|
-
*/
|
|
193
|
-
resourceType: import("typebox").TOptional<import("typebox").TString>;
|
|
194
|
-
/**
|
|
195
|
-
* Resource ID affected.
|
|
196
|
-
*/
|
|
197
|
-
resourceId: import("typebox").TOptional<import("typebox").TString>;
|
|
198
|
-
/**
|
|
199
|
-
* Human-readable description of the event.
|
|
200
|
-
*/
|
|
201
|
-
description: import("typebox").TOptional<import("typebox").TString>;
|
|
202
|
-
/**
|
|
203
|
-
* Additional metadata/context as JSON.
|
|
204
|
-
*/
|
|
205
|
-
metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
|
|
206
|
-
/**
|
|
207
|
-
* Client IP address.
|
|
208
|
-
*/
|
|
209
|
-
ipAddress: import("typebox").TOptional<import("typebox").TString>;
|
|
210
|
-
/**
|
|
211
|
-
* Client user agent.
|
|
212
|
-
*/
|
|
213
|
-
userAgent: import("typebox").TOptional<import("typebox").TString>;
|
|
214
|
-
/**
|
|
215
|
-
* Session ID if applicable.
|
|
216
|
-
*/
|
|
217
|
-
sessionId: import("typebox").TOptional<import("typebox").TString>;
|
|
218
|
-
/**
|
|
219
|
-
* Request ID for correlation.
|
|
220
|
-
*/
|
|
221
|
-
requestId: import("typebox").TOptional<import("typebox").TString>;
|
|
222
|
-
/**
|
|
223
|
-
* Whether the action was successful.
|
|
224
|
-
*/
|
|
225
|
-
success: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
226
|
-
/**
|
|
227
|
-
* Error message if the action failed.
|
|
228
|
-
*/
|
|
229
|
-
errorMessage: import("typebox").TOptional<import("typebox").TString>;
|
|
230
|
-
}>>;
|
|
32
|
+
declare const audits: import("alepha/orm").EntityPrimitive<import("zod").ZodObject<{
|
|
33
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
34
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
35
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
36
|
+
type: import("zod").ZodString;
|
|
37
|
+
action: import("zod").ZodString;
|
|
38
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
39
|
+
critical: "critical";
|
|
40
|
+
info: "info";
|
|
41
|
+
warning: "warning";
|
|
42
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
43
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
44
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
45
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
46
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
47
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
48
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
50
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
53
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
54
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
55
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
56
|
+
}, import("zod/v4/core").$strip>>;
|
|
57
|
+
declare const auditEntitySchema: import("zod").ZodObject<{
|
|
58
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
59
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
60
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
61
|
+
type: import("zod").ZodString;
|
|
62
|
+
action: import("zod").ZodString;
|
|
63
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
64
|
+
critical: "critical";
|
|
65
|
+
info: "info";
|
|
66
|
+
warning: "warning";
|
|
67
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
68
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
69
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
70
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
72
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
73
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
74
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
75
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
76
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
77
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
78
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
79
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
80
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
81
|
+
}, import("zod/v4/core").$strip>;
|
|
82
|
+
declare const auditEntityInsertSchema: import("alepha/orm").TObjectInsert<import("zod").ZodObject<{
|
|
83
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
84
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
85
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
86
|
+
type: import("zod").ZodString;
|
|
87
|
+
action: import("zod").ZodString;
|
|
88
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
89
|
+
critical: "critical";
|
|
90
|
+
info: "info";
|
|
91
|
+
warning: "warning";
|
|
92
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
93
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
94
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
95
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
96
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
97
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
98
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
99
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
100
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
101
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
102
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
103
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
104
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
105
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
106
|
+
}, import("zod/v4/core").$strip>>;
|
|
231
107
|
type AuditEntity = Static<typeof audits.schema>;
|
|
232
108
|
//#endregion
|
|
233
109
|
//#region ../../src/api/audits/schemas/auditQuerySchema.d.ts
|
|
234
110
|
/**
|
|
235
111
|
* Query schema for searching and filtering audit logs.
|
|
236
112
|
*/
|
|
237
|
-
declare const auditQuerySchema: import("
|
|
238
|
-
page: import("
|
|
239
|
-
size: import("
|
|
240
|
-
sort: import("
|
|
241
|
-
type: import("
|
|
242
|
-
action: import("
|
|
243
|
-
severity: import("
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
113
|
+
declare const auditQuerySchema: import("zod").ZodObject<{
|
|
114
|
+
page: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
|
|
115
|
+
size: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
|
|
116
|
+
sort: import("zod").ZodOptional<import("zod").ZodString>;
|
|
117
|
+
type: import("zod").ZodOptional<import("zod").ZodString>;
|
|
118
|
+
action: import("zod").ZodOptional<import("zod").ZodString>;
|
|
119
|
+
severity: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
120
|
+
critical: "critical";
|
|
121
|
+
info: "info";
|
|
122
|
+
warning: "warning";
|
|
123
|
+
}>>>;
|
|
124
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
125
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
126
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
127
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
128
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
129
|
+
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
130
|
+
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
131
|
+
search: import("zod").ZodOptional<import("zod").ZodString>;
|
|
132
|
+
}, import("zod/v4/core").$strip>;
|
|
253
133
|
type AuditQuery = Static<typeof auditQuerySchema>;
|
|
254
134
|
//#endregion
|
|
255
135
|
//#region ../../src/api/audits/schemas/createAuditSchema.d.ts
|
|
256
136
|
/**
|
|
257
137
|
* Schema for creating a new audit log entry.
|
|
258
138
|
*/
|
|
259
|
-
declare const createAuditSchema: import("
|
|
260
|
-
type: import("
|
|
261
|
-
action: import("
|
|
262
|
-
severity: import("
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
139
|
+
declare const createAuditSchema: import("zod").ZodObject<{
|
|
140
|
+
type: import("zod").ZodString;
|
|
141
|
+
action: import("zod").ZodString;
|
|
142
|
+
severity: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
143
|
+
critical: "critical";
|
|
144
|
+
info: "info";
|
|
145
|
+
warning: "warning";
|
|
146
|
+
}>>>;
|
|
147
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
148
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
149
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
150
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
151
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
152
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
153
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
154
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
155
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
156
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
157
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
158
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
159
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
160
|
+
}, import("zod/v4/core").$strip>;
|
|
277
161
|
type CreateAudit = Static<typeof createAuditSchema>;
|
|
278
162
|
//#endregion
|
|
279
163
|
//#region ../../src/api/audits/services/AuditService.d.ts
|
|
@@ -284,6 +168,13 @@ interface AuditTypeDefinition {
|
|
|
284
168
|
type: string;
|
|
285
169
|
description?: string;
|
|
286
170
|
actions: string[];
|
|
171
|
+
/**
|
|
172
|
+
* Dedicated retention (in days) for this audit type.
|
|
173
|
+
*
|
|
174
|
+
* Overrides the global default applied by the cleanup job. `0` keeps entries
|
|
175
|
+
* forever. When `undefined`, the global default retention applies.
|
|
176
|
+
*/
|
|
177
|
+
retentionDays?: number;
|
|
287
178
|
}
|
|
288
179
|
/**
|
|
289
180
|
* Service for managing audit logs.
|
|
@@ -297,27 +188,31 @@ interface AuditTypeDefinition {
|
|
|
297
188
|
declare class AuditService {
|
|
298
189
|
protected readonly alepha: Alepha;
|
|
299
190
|
protected readonly log: import("alepha/logger").Logger;
|
|
300
|
-
protected readonly repo: import("alepha/orm").Repository<import("
|
|
301
|
-
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("
|
|
302
|
-
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("
|
|
303
|
-
organizationId: import("alepha/orm").PgAttr<import("
|
|
304
|
-
type: import("
|
|
305
|
-
action: import("
|
|
306
|
-
severity: import("alepha/orm").PgAttr<import("
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
191
|
+
protected readonly repo: import("alepha/orm").Repository<import("zod").ZodObject<{
|
|
192
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
193
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
194
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
195
|
+
type: import("zod").ZodString;
|
|
196
|
+
action: import("zod").ZodString;
|
|
197
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
198
|
+
critical: "critical";
|
|
199
|
+
info: "info";
|
|
200
|
+
warning: "warning";
|
|
201
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
202
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
203
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
204
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
205
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
206
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
207
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
208
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
209
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
210
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
211
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
212
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
213
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
214
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
215
|
+
}, import("zod/v4/core").$strip>>;
|
|
321
216
|
/**
|
|
322
217
|
* Registry of audit types and their allowed actions.
|
|
323
218
|
*/
|
|
@@ -377,9 +272,27 @@ declare class AuditService {
|
|
|
377
272
|
userRealm?: string;
|
|
378
273
|
}): Promise<AuditStats>;
|
|
379
274
|
/**
|
|
380
|
-
* Delete
|
|
275
|
+
* Delete audit entries created before the given date (retention policy).
|
|
276
|
+
*
|
|
277
|
+
* @returns number of deleted entries.
|
|
381
278
|
*/
|
|
382
279
|
deleteOlderThan(date: Date): Promise<number>;
|
|
280
|
+
/**
|
|
281
|
+
* Delete audit entries that have outlived their retention window.
|
|
282
|
+
*
|
|
283
|
+
* Each registered audit type that declares a dedicated `retentionDays` is
|
|
284
|
+
* pruned using its own window; every other type — including unregistered or
|
|
285
|
+
* legacy types — falls back to `defaultRetentionDays`. A retention of `0`
|
|
286
|
+
* (per-type or default) keeps that scope forever.
|
|
287
|
+
*
|
|
288
|
+
* `now` is injected rather than read from the clock so the policy is
|
|
289
|
+
* deterministic and testable.
|
|
290
|
+
*
|
|
291
|
+
* @param now - reference "now" used to compute cutoff dates.
|
|
292
|
+
* @param defaultRetentionDays - global default for types without an override.
|
|
293
|
+
* @returns total number of deleted entries.
|
|
294
|
+
*/
|
|
295
|
+
deleteExpired(now: Date, defaultRetentionDays: number): Promise<number>;
|
|
383
296
|
}
|
|
384
297
|
/**
|
|
385
298
|
* Audit statistics summary.
|
|
@@ -406,311 +319,434 @@ declare class AdminAuditController {
|
|
|
406
319
|
protected readonly url = "/audits";
|
|
407
320
|
protected readonly group = "admin:audits";
|
|
408
321
|
protected readonly auditService: AuditService;
|
|
409
|
-
protected readonly repo: import("alepha/orm").Repository<import("
|
|
410
|
-
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("
|
|
411
|
-
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("
|
|
412
|
-
organizationId: import("alepha/orm").PgAttr<import("
|
|
413
|
-
type: import("
|
|
414
|
-
action: import("
|
|
415
|
-
severity: import("alepha/orm").PgAttr<import("
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
322
|
+
protected readonly repo: import("alepha/orm").Repository<import("zod").ZodObject<{
|
|
323
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
324
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
325
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
326
|
+
type: import("zod").ZodString;
|
|
327
|
+
action: import("zod").ZodString;
|
|
328
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
329
|
+
critical: "critical";
|
|
330
|
+
info: "info";
|
|
331
|
+
warning: "warning";
|
|
332
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
333
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
334
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
335
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
336
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
337
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
338
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
339
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
340
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
341
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
342
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
343
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
344
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
345
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
346
|
+
}, import("zod/v4/core").$strip>>;
|
|
430
347
|
/**
|
|
431
348
|
* Find audit entries with filtering and pagination.
|
|
432
349
|
*/
|
|
433
350
|
readonly findAudits: import("alepha/server").ActionPrimitiveFn<{
|
|
434
|
-
query: import("
|
|
435
|
-
page: import("
|
|
436
|
-
size: import("
|
|
437
|
-
sort: import("
|
|
438
|
-
type: import("
|
|
439
|
-
action: import("
|
|
440
|
-
severity: import("
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
351
|
+
query: import("zod").ZodObject<{
|
|
352
|
+
page: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
|
|
353
|
+
size: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
|
|
354
|
+
sort: import("zod").ZodOptional<import("zod").ZodString>;
|
|
355
|
+
type: import("zod").ZodOptional<import("zod").ZodString>;
|
|
356
|
+
action: import("zod").ZodOptional<import("zod").ZodString>;
|
|
357
|
+
severity: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
358
|
+
critical: "critical";
|
|
359
|
+
info: "info";
|
|
360
|
+
warning: "warning";
|
|
361
|
+
}>>>;
|
|
362
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
363
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
364
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
365
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
366
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
367
|
+
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
368
|
+
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
369
|
+
search: import("zod").ZodOptional<import("zod").ZodString>;
|
|
370
|
+
}, import("zod/v4/core").$strip>;
|
|
371
|
+
response: import("zod").ZodObject<{
|
|
372
|
+
content: import("zod").ZodArray<import("zod").ZodObject<{
|
|
373
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
374
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
375
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
376
|
+
type: import("zod").ZodString;
|
|
377
|
+
action: import("zod").ZodString;
|
|
378
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
379
|
+
critical: "critical";
|
|
380
|
+
info: "info";
|
|
381
|
+
warning: "warning";
|
|
382
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
383
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
384
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
385
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
386
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
387
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
388
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
389
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
390
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
391
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
392
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
393
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
394
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
395
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
396
|
+
}, import("zod/v4/core").$strip>>;
|
|
397
|
+
page: import("zod").ZodObject<{
|
|
398
|
+
number: import("zod").ZodInt;
|
|
399
|
+
size: import("zod").ZodInt;
|
|
400
|
+
offset: import("zod").ZodInt;
|
|
401
|
+
numberOfElements: import("zod").ZodInt;
|
|
402
|
+
totalElements: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
403
|
+
totalPages: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
404
|
+
isEmpty: import("zod").ZodBoolean;
|
|
405
|
+
isFirst: import("zod").ZodBoolean;
|
|
406
|
+
isLast: import("zod").ZodBoolean;
|
|
407
|
+
}, import("zod/v4/core").$strip>;
|
|
408
|
+
}, import("zod/v4/core").$strip>;
|
|
471
409
|
}>;
|
|
472
410
|
/**
|
|
473
411
|
* Get a single audit entry by ID.
|
|
474
412
|
*/
|
|
475
413
|
readonly getAudit: import("alepha/server").ActionPrimitiveFn<{
|
|
476
|
-
params: import("
|
|
477
|
-
id: import("
|
|
478
|
-
}>;
|
|
479
|
-
response: import("
|
|
480
|
-
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("
|
|
481
|
-
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("
|
|
482
|
-
organizationId: import("alepha/orm").PgAttr<import("
|
|
483
|
-
type: import("
|
|
484
|
-
action: import("
|
|
485
|
-
severity: import("alepha/orm").PgAttr<import("
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
414
|
+
params: import("zod").ZodObject<{
|
|
415
|
+
id: import("zod").ZodString;
|
|
416
|
+
}, import("zod/v4/core").$strip>;
|
|
417
|
+
response: import("zod").ZodObject<{
|
|
418
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
419
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
420
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
421
|
+
type: import("zod").ZodString;
|
|
422
|
+
action: import("zod").ZodString;
|
|
423
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
424
|
+
critical: "critical";
|
|
425
|
+
info: "info";
|
|
426
|
+
warning: "warning";
|
|
427
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
428
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
429
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
430
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
431
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
432
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
433
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
434
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
435
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
436
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
437
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
438
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
439
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
440
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
441
|
+
}, import("zod/v4/core").$strip>;
|
|
500
442
|
}>;
|
|
501
443
|
/**
|
|
502
444
|
* Delete many audit entries by id in one repository call. Use with care —
|
|
503
445
|
* audit logs are usually retained for compliance reasons.
|
|
504
446
|
*/
|
|
505
447
|
readonly deleteAudits: import("alepha/server").ActionPrimitiveFn<{
|
|
506
|
-
body: import("
|
|
507
|
-
ids: import("
|
|
508
|
-
}>;
|
|
509
|
-
response: import("
|
|
510
|
-
deleted: import("
|
|
511
|
-
}>;
|
|
448
|
+
body: import("zod").ZodObject<{
|
|
449
|
+
ids: import("zod").ZodArray<import("zod").ZodString>;
|
|
450
|
+
}, import("zod/v4/core").$strip>;
|
|
451
|
+
response: import("zod").ZodObject<{
|
|
452
|
+
deleted: import("zod").ZodArray<import("zod").ZodString>;
|
|
453
|
+
}, import("zod/v4/core").$strip>;
|
|
512
454
|
}>;
|
|
513
455
|
/**
|
|
514
456
|
* Create a new audit entry.
|
|
515
457
|
* System-only — this permission should never be assigned to human roles.
|
|
516
458
|
*/
|
|
517
459
|
readonly createAudit: import("alepha/server").ActionPrimitiveFn<{
|
|
518
|
-
body: import("
|
|
519
|
-
type: import("
|
|
520
|
-
action: import("
|
|
521
|
-
severity: import("
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
460
|
+
body: import("zod").ZodObject<{
|
|
461
|
+
type: import("zod").ZodString;
|
|
462
|
+
action: import("zod").ZodString;
|
|
463
|
+
severity: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
464
|
+
critical: "critical";
|
|
465
|
+
info: "info";
|
|
466
|
+
warning: "warning";
|
|
467
|
+
}>>>;
|
|
468
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
469
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
470
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
471
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
472
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
473
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
474
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
475
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
476
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
477
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
478
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
479
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
480
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
481
|
+
}, import("zod/v4/core").$strip>;
|
|
482
|
+
response: import("zod").ZodObject<{
|
|
483
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
484
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
485
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
486
|
+
type: import("zod").ZodString;
|
|
487
|
+
action: import("zod").ZodString;
|
|
488
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
489
|
+
critical: "critical";
|
|
490
|
+
info: "info";
|
|
491
|
+
warning: "warning";
|
|
492
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
493
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
494
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
495
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
496
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
497
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
498
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
499
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
500
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
501
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
502
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
503
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
504
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
505
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
506
|
+
}, import("zod/v4/core").$strip>;
|
|
557
507
|
}>;
|
|
558
508
|
/**
|
|
559
509
|
* Get audit entries for a specific user.
|
|
560
510
|
*/
|
|
561
511
|
readonly findByUser: import("alepha/server").ActionPrimitiveFn<{
|
|
562
|
-
params: import("
|
|
563
|
-
userId: import("
|
|
564
|
-
}>;
|
|
565
|
-
query: import("
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
512
|
+
params: import("zod").ZodObject<{
|
|
513
|
+
userId: import("zod").ZodString;
|
|
514
|
+
}, import("zod/v4/core").$strip>;
|
|
515
|
+
query: import("zod").ZodObject<{
|
|
516
|
+
page: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
|
|
517
|
+
size: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
|
|
518
|
+
sort: import("zod").ZodOptional<import("zod").ZodString>;
|
|
519
|
+
type: import("zod").ZodOptional<import("zod").ZodString>;
|
|
520
|
+
action: import("zod").ZodOptional<import("zod").ZodString>;
|
|
521
|
+
severity: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
522
|
+
critical: "critical";
|
|
523
|
+
info: "info";
|
|
524
|
+
warning: "warning";
|
|
525
|
+
}>>>;
|
|
526
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
527
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
528
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
529
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
530
|
+
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
531
|
+
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
532
|
+
search: import("zod").ZodOptional<import("zod").ZodString>;
|
|
533
|
+
}, import("zod/v4/core").$strip>;
|
|
534
|
+
response: import("zod").ZodObject<{
|
|
535
|
+
content: import("zod").ZodArray<import("zod").ZodObject<{
|
|
536
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
537
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
538
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
539
|
+
type: import("zod").ZodString;
|
|
540
|
+
action: import("zod").ZodString;
|
|
541
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
542
|
+
critical: "critical";
|
|
543
|
+
info: "info";
|
|
544
|
+
warning: "warning";
|
|
545
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
546
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
547
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
548
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
549
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
550
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
551
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
552
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
553
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
554
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
555
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
556
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
557
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
558
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
559
|
+
}, import("zod/v4/core").$strip>>;
|
|
560
|
+
page: import("zod").ZodObject<{
|
|
561
|
+
number: import("zod").ZodInt;
|
|
562
|
+
size: import("zod").ZodInt;
|
|
563
|
+
offset: import("zod").ZodInt;
|
|
564
|
+
numberOfElements: import("zod").ZodInt;
|
|
565
|
+
totalElements: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
566
|
+
totalPages: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
567
|
+
isEmpty: import("zod").ZodBoolean;
|
|
568
|
+
isFirst: import("zod").ZodBoolean;
|
|
569
|
+
isLast: import("zod").ZodBoolean;
|
|
570
|
+
}, import("zod/v4/core").$strip>;
|
|
571
|
+
}, import("zod/v4/core").$strip>;
|
|
601
572
|
}>;
|
|
602
573
|
/**
|
|
603
574
|
* Get audit entries for a specific resource.
|
|
604
575
|
*/
|
|
605
576
|
readonly findByResource: import("alepha/server").ActionPrimitiveFn<{
|
|
606
|
-
params: import("
|
|
607
|
-
resourceType: import("
|
|
608
|
-
resourceId: import("
|
|
609
|
-
}>;
|
|
610
|
-
query: import("
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
577
|
+
params: import("zod").ZodObject<{
|
|
578
|
+
resourceType: import("zod").ZodString;
|
|
579
|
+
resourceId: import("zod").ZodString;
|
|
580
|
+
}, import("zod/v4/core").$strip>;
|
|
581
|
+
query: import("zod").ZodObject<{
|
|
582
|
+
page: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
|
|
583
|
+
size: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
|
|
584
|
+
sort: import("zod").ZodOptional<import("zod").ZodString>;
|
|
585
|
+
type: import("zod").ZodOptional<import("zod").ZodString>;
|
|
586
|
+
action: import("zod").ZodOptional<import("zod").ZodString>;
|
|
587
|
+
severity: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
588
|
+
critical: "critical";
|
|
589
|
+
info: "info";
|
|
590
|
+
warning: "warning";
|
|
591
|
+
}>>>;
|
|
592
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
593
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
594
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
595
|
+
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
596
|
+
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
597
|
+
search: import("zod").ZodOptional<import("zod").ZodString>;
|
|
598
|
+
}, import("zod/v4/core").$strip>;
|
|
599
|
+
response: import("zod").ZodObject<{
|
|
600
|
+
content: import("zod").ZodArray<import("zod").ZodObject<{
|
|
601
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
602
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
603
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
604
|
+
type: import("zod").ZodString;
|
|
605
|
+
action: import("zod").ZodString;
|
|
606
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
607
|
+
critical: "critical";
|
|
608
|
+
info: "info";
|
|
609
|
+
warning: "warning";
|
|
610
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
611
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
612
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
613
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
614
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
615
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
616
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
617
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
618
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
619
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
620
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
621
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
622
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
623
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
624
|
+
}, import("zod/v4/core").$strip>>;
|
|
625
|
+
page: import("zod").ZodObject<{
|
|
626
|
+
number: import("zod").ZodInt;
|
|
627
|
+
size: import("zod").ZodInt;
|
|
628
|
+
offset: import("zod").ZodInt;
|
|
629
|
+
numberOfElements: import("zod").ZodInt;
|
|
630
|
+
totalElements: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
631
|
+
totalPages: import("zod").ZodOptional<import("zod").ZodInt>;
|
|
632
|
+
isEmpty: import("zod").ZodBoolean;
|
|
633
|
+
isFirst: import("zod").ZodBoolean;
|
|
634
|
+
isLast: import("zod").ZodBoolean;
|
|
635
|
+
}, import("zod/v4/core").$strip>;
|
|
636
|
+
}, import("zod/v4/core").$strip>;
|
|
645
637
|
}>;
|
|
646
638
|
/**
|
|
647
639
|
* Get audit statistics.
|
|
648
640
|
*/
|
|
649
641
|
readonly getAuditStats: import("alepha/server").ActionPrimitiveFn<{
|
|
650
|
-
query: import("
|
|
651
|
-
from: import("
|
|
652
|
-
to: import("
|
|
653
|
-
userRealm: import("
|
|
654
|
-
}>;
|
|
655
|
-
response: import("
|
|
656
|
-
total: import("
|
|
657
|
-
byType: import("
|
|
658
|
-
bySeverity: import("
|
|
659
|
-
info: import("
|
|
660
|
-
warning: import("
|
|
661
|
-
critical: import("
|
|
662
|
-
}>;
|
|
663
|
-
successRate: import("
|
|
664
|
-
recentFailures: import("
|
|
665
|
-
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("
|
|
666
|
-
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("
|
|
667
|
-
organizationId: import("alepha/orm").PgAttr<import("
|
|
668
|
-
type: import("
|
|
669
|
-
action: import("
|
|
670
|
-
severity: import("alepha/orm").PgAttr<import("
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
642
|
+
query: import("zod").ZodObject<{
|
|
643
|
+
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
644
|
+
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
645
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
646
|
+
}, import("zod/v4/core").$strip>;
|
|
647
|
+
response: import("zod").ZodObject<{
|
|
648
|
+
total: import("zod").ZodInt;
|
|
649
|
+
byType: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodInt>;
|
|
650
|
+
bySeverity: import("zod").ZodObject<{
|
|
651
|
+
info: import("zod").ZodInt;
|
|
652
|
+
warning: import("zod").ZodInt;
|
|
653
|
+
critical: import("zod").ZodInt;
|
|
654
|
+
}, import("zod/v4/core").$strip>;
|
|
655
|
+
successRate: import("zod").ZodNumber;
|
|
656
|
+
recentFailures: import("zod").ZodArray<import("zod").ZodObject<{
|
|
657
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
658
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
659
|
+
organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
|
|
660
|
+
type: import("zod").ZodString;
|
|
661
|
+
action: import("zod").ZodString;
|
|
662
|
+
severity: import("alepha/orm").PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
663
|
+
critical: "critical";
|
|
664
|
+
info: "info";
|
|
665
|
+
warning: "warning";
|
|
666
|
+
}>>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
667
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
668
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
669
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
670
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
671
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
672
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
673
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
674
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
675
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
676
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
677
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
678
|
+
success: import("alepha/orm").PgAttr<import("zod").ZodBoolean, typeof import("alepha/orm").PG_DEFAULT>;
|
|
679
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
680
|
+
}, import("zod/v4/core").$strip>>;
|
|
681
|
+
}, import("zod/v4/core").$strip>;
|
|
686
682
|
}>;
|
|
687
683
|
/**
|
|
688
684
|
* List distinct action names present in the audit log (for filters).
|
|
689
685
|
*/
|
|
690
686
|
readonly getAuditActions: import("alepha/server").ActionPrimitiveFn<{
|
|
691
|
-
response: import("
|
|
687
|
+
response: import("zod").ZodArray<import("zod").ZodString>;
|
|
692
688
|
}>;
|
|
693
689
|
/**
|
|
694
690
|
* Get registered audit types.
|
|
695
691
|
*/
|
|
696
692
|
readonly getTypes: import("alepha/server").ActionPrimitiveFn<{
|
|
697
|
-
response: import("
|
|
698
|
-
type: import("
|
|
699
|
-
description: import("
|
|
700
|
-
actions: import("
|
|
701
|
-
}>>;
|
|
693
|
+
response: import("zod").ZodArray<import("zod").ZodObject<{
|
|
694
|
+
type: import("zod").ZodString;
|
|
695
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
696
|
+
actions: import("zod").ZodArray<import("zod").ZodString>;
|
|
697
|
+
}, import("zod/v4/core").$strip>>;
|
|
702
698
|
}>;
|
|
703
699
|
/**
|
|
704
700
|
* Get distinct values for filters.
|
|
705
701
|
*/
|
|
706
702
|
readonly getFilterOptions: import("alepha/server").ActionPrimitiveFn<{
|
|
707
|
-
response: import("
|
|
708
|
-
types: import("
|
|
709
|
-
actions: import("
|
|
710
|
-
resourceTypes: import("
|
|
711
|
-
userRealms: import("
|
|
712
|
-
}>;
|
|
703
|
+
response: import("zod").ZodObject<{
|
|
704
|
+
types: import("zod").ZodArray<import("zod").ZodString>;
|
|
705
|
+
actions: import("zod").ZodArray<import("zod").ZodString>;
|
|
706
|
+
resourceTypes: import("zod").ZodArray<import("zod").ZodString>;
|
|
707
|
+
userRealms: import("zod").ZodArray<import("zod").ZodString>;
|
|
708
|
+
}, import("zod/v4/core").$strip>;
|
|
709
|
+
}>;
|
|
710
|
+
}
|
|
711
|
+
//#endregion
|
|
712
|
+
//#region ../../src/api/audits/parameters/AuditParameters.d.ts
|
|
713
|
+
/**
|
|
714
|
+
* Audit module configuration atom.
|
|
715
|
+
*/
|
|
716
|
+
declare const auditOptions: import("alepha").Atom<import("zod").ZodObject<{
|
|
717
|
+
retentionDays: import("zod").ZodDefault<import("zod").ZodInt>;
|
|
718
|
+
}, import("zod/v4/core").$strip>, "alepha.api.audits.options">;
|
|
719
|
+
type AuditOptions = Static<typeof auditOptions.schema>;
|
|
720
|
+
declare module "alepha" {
|
|
721
|
+
interface State {
|
|
722
|
+
[auditOptions.key]: AuditOptions;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Typed accessor for audit module configuration ({@link auditOptions}).
|
|
727
|
+
*/
|
|
728
|
+
declare class AuditParameters {
|
|
729
|
+
protected readonly options: Readonly<{
|
|
730
|
+
retentionDays: number;
|
|
713
731
|
}>;
|
|
732
|
+
get<K extends keyof AuditOptions>(key: K): AuditOptions[K];
|
|
733
|
+
}
|
|
734
|
+
//#endregion
|
|
735
|
+
//#region ../../src/api/audits/jobs/AuditJobs.d.ts
|
|
736
|
+
/**
|
|
737
|
+
* Scheduled enforcement of the audit retention policy.
|
|
738
|
+
*/
|
|
739
|
+
declare class AuditJobs {
|
|
740
|
+
protected readonly auditService: AuditService;
|
|
741
|
+
protected readonly auditParameters: AuditParameters;
|
|
742
|
+
/**
|
|
743
|
+
* Delete audit entries that have outlived their retention window.
|
|
744
|
+
*
|
|
745
|
+
* Runs daily and applies each audit type's dedicated `retentionDays` plus the
|
|
746
|
+
* global default (`auditOptions.retentionDays`). A default of `0` disables
|
|
747
|
+
* cleanup for types without a dedicated retention.
|
|
748
|
+
*/
|
|
749
|
+
readonly cleanExpired: import("alepha/scheduler").SchedulerPrimitive;
|
|
714
750
|
}
|
|
715
751
|
//#endregion
|
|
716
752
|
//#region ../../src/api/audits/primitives/$audit.d.ts
|
|
@@ -730,6 +766,21 @@ interface AuditPrimitiveOptions {
|
|
|
730
766
|
* List of allowed actions for this audit type.
|
|
731
767
|
*/
|
|
732
768
|
actions: string[];
|
|
769
|
+
/**
|
|
770
|
+
* Number of days entries of this audit type are retained before the periodic
|
|
771
|
+
* cleanup job deletes them.
|
|
772
|
+
*
|
|
773
|
+
* Overrides the global default retention (see `auditOptions.retentionDays` in
|
|
774
|
+
* `AuditParameters`). Set to `0` to keep this type's entries forever,
|
|
775
|
+
* regardless of the global default. When omitted, the global default applies.
|
|
776
|
+
*
|
|
777
|
+
* @example
|
|
778
|
+
* ```ts
|
|
779
|
+
* // Keep security audits for two years, ignoring the global default.
|
|
780
|
+
* $audit({ type: "security", actions: ["login"], retentionDays: 730 });
|
|
781
|
+
* ```
|
|
782
|
+
*/
|
|
783
|
+
retentionDays?: number;
|
|
733
784
|
}
|
|
734
785
|
/**
|
|
735
786
|
* Audit type primitive for registering domain-specific audit events.
|
|
@@ -771,6 +822,10 @@ declare class AuditPrimitive extends Primitive<AuditPrimitiveOptions> {
|
|
|
771
822
|
* The allowed actions for this audit type.
|
|
772
823
|
*/
|
|
773
824
|
get actions(): string[];
|
|
825
|
+
/**
|
|
826
|
+
* The dedicated retention (in days) for this audit type, if set.
|
|
827
|
+
*/
|
|
828
|
+
get retentionDays(): number | undefined;
|
|
774
829
|
/**
|
|
775
830
|
* Log an audit event for this type.
|
|
776
831
|
*/
|
|
@@ -836,15 +891,13 @@ declare const $audit: {
|
|
|
836
891
|
* Before: { name: string; age: number(default=0); fullName: generated }
|
|
837
892
|
* After: { name: string; age?: number; }
|
|
838
893
|
*/
|
|
839
|
-
type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["
|
|
894
|
+
type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["shape"] as T["shape"][K] extends {
|
|
840
895
|
[PG_GENERATED]: any;
|
|
841
|
-
} ? never : K]: T["
|
|
896
|
+
} ? never : K]: T["shape"][K] extends {
|
|
842
897
|
[PG_DEFAULT]: any;
|
|
843
898
|
} | {
|
|
844
899
|
[PG_ORGANIZATION]: any;
|
|
845
|
-
}
|
|
846
|
-
"~optional": true;
|
|
847
|
-
} ? TOptional<T["properties"][K]> : T["properties"][K] }>;
|
|
900
|
+
} ? TOptional<Extract<T["shape"][K], TSchema>> : T["shape"][K]; }>;
|
|
848
901
|
//#endregion
|
|
849
902
|
//#region ../../src/orm/core/schemas/updateSchema.d.ts
|
|
850
903
|
/**
|
|
@@ -856,9 +909,9 @@ type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"] as
|
|
|
856
909
|
* Before: { name?: string; age: number; fullName: generated }
|
|
857
910
|
* After: { name?: string | null; age: number; }
|
|
858
911
|
*/
|
|
859
|
-
type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["
|
|
912
|
+
type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["shape"] as T["shape"][K] extends {
|
|
860
913
|
[PG_GENERATED]: any;
|
|
861
|
-
} ? never : K]: T["
|
|
914
|
+
} ? never : K]: T["shape"][K] extends TOptional<infer U extends TSchema> ? TOptional<TUnion<[U, TNull]>> : T["shape"][K]; }>;
|
|
862
915
|
//#endregion
|
|
863
916
|
//#region ../../src/orm/core/primitives/$entity.d.ts
|
|
864
917
|
interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
|
|
@@ -1018,18 +1071,20 @@ declare class EntityPrimitive<T extends TObject = TObject> {
|
|
|
1018
1071
|
get cols(): EntityColumns<T>;
|
|
1019
1072
|
get name(): string;
|
|
1020
1073
|
get schema(): T;
|
|
1074
|
+
protected _insertSchema?: TObjectInsert<T>;
|
|
1021
1075
|
get insertSchema(): TObjectInsert<T>;
|
|
1076
|
+
protected _updateSchema?: TObjectUpdate<T>;
|
|
1022
1077
|
get updateSchema(): TObjectUpdate<T>;
|
|
1023
1078
|
}
|
|
1024
1079
|
/**
|
|
1025
1080
|
* Convert a schema to columns.
|
|
1026
1081
|
*/
|
|
1027
|
-
type FromSchema<T extends TObject> = { [key in keyof T["properties"]]: PgColumnBuilderBase };
|
|
1082
|
+
type FromSchema<T extends TObject> = { [key in keyof T["properties"]]: PgColumnBuilderBase; };
|
|
1028
1083
|
type EntityColumn<T extends TObject> = {
|
|
1029
1084
|
name: string;
|
|
1030
1085
|
entity: EntityPrimitive<T>;
|
|
1031
1086
|
};
|
|
1032
|
-
type EntityColumns<T extends TObject> = { [key in keyof T["properties"]]: EntityColumn<T
|
|
1087
|
+
type EntityColumns<T extends TObject> = { [key in keyof T["properties"]]: EntityColumn<T>; };
|
|
1033
1088
|
//#endregion
|
|
1034
1089
|
//#region ../../src/orm/core/constants/PG_SYMBOLS.d.ts
|
|
1035
1090
|
declare const PG_DEFAULT: unique symbol;
|
|
@@ -1058,13 +1113,24 @@ type PgSymbols = {
|
|
|
1058
1113
|
[PG_REF]: PgRefOptions;
|
|
1059
1114
|
[PG_ENUM]: PgEnumOptions;
|
|
1060
1115
|
[PG_GENERATED]: PgGeneratedOptions;
|
|
1061
|
-
[PG_ORGANIZATION]:
|
|
1116
|
+
[PG_ORGANIZATION]: PgOrganizationOptions;
|
|
1062
1117
|
/**
|
|
1063
1118
|
* @deprecated Use `PG_IDENTITY` instead.
|
|
1064
1119
|
*/
|
|
1065
1120
|
[PG_SERIAL]: {};
|
|
1066
1121
|
};
|
|
1067
1122
|
type PgSymbolKeys = keyof PgSymbols;
|
|
1123
|
+
interface PgOrganizationOptions {
|
|
1124
|
+
/**
|
|
1125
|
+
* Fail-closed tenant scoping. When `true`, the repository (a) refuses any
|
|
1126
|
+
* read/write with no resolved tenant instead of falling through to an
|
|
1127
|
+
* unfiltered "see/write everything" query, and (b) drops the
|
|
1128
|
+
* `OR organizationId IS NULL` "global row" escape — a scoped tenant never
|
|
1129
|
+
* sees NULL/global rows. Use for security-sensitive tables. Defaults to
|
|
1130
|
+
* `false` (the historic fail-open semantics).
|
|
1131
|
+
*/
|
|
1132
|
+
strict?: boolean;
|
|
1133
|
+
}
|
|
1068
1134
|
type PgIdentityOptions = {
|
|
1069
1135
|
mode: "always" | "byDefault";
|
|
1070
1136
|
} & PgSequenceOptions & {
|
|
@@ -1101,7 +1167,7 @@ interface PgRefOptions {
|
|
|
1101
1167
|
/**
|
|
1102
1168
|
* Type representation.
|
|
1103
1169
|
*/
|
|
1104
|
-
type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
|
|
1170
|
+
type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K]; };
|
|
1105
1171
|
//#endregion
|
|
1106
1172
|
//#region ../../src/orm/core/schemas/databaseEnvSchema.d.ts
|
|
1107
1173
|
/**
|
|
@@ -1117,46 +1183,43 @@ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]:
|
|
|
1117
1183
|
* - `d1://BINDING_NAME` — Cloudflare D1
|
|
1118
1184
|
* - `hyperdrive://BINDING_NAME` — Cloudflare Hyperdrive
|
|
1119
1185
|
*/
|
|
1120
|
-
declare const databaseEnvSchema: import("
|
|
1121
|
-
DATABASE_URL: import("
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
*
|
|
1125
|
-
* Defaults to `true` in development and test, `false` in production.
|
|
1126
|
-
* Set to `false` in development to skip automatic schema sync
|
|
1127
|
-
* (e.g. when managing migrations manually).
|
|
1128
|
-
*/
|
|
1129
|
-
DATABASE_SYNC: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
1130
|
-
}>;
|
|
1186
|
+
declare const databaseEnvSchema: import("zod").ZodObject<{
|
|
1187
|
+
DATABASE_URL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1188
|
+
DATABASE_SYNC: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1189
|
+
}, import("zod/v4/core").$strip>;
|
|
1131
1190
|
declare module "alepha" {
|
|
1132
1191
|
interface Env extends Partial<Static<typeof databaseEnvSchema>> {}
|
|
1133
|
-
}
|
|
1192
|
+
}
|
|
1134
1193
|
//#endregion
|
|
1135
1194
|
//#region ../../src/api/audits/schemas/auditResourceSchema.d.ts
|
|
1136
1195
|
/**
|
|
1137
1196
|
* Resource schema for audit log responses.
|
|
1138
1197
|
*/
|
|
1139
|
-
declare const auditResourceSchema: import("
|
|
1140
|
-
id: PgAttr<PgAttr<import("
|
|
1141
|
-
createdAt: PgAttr<PgAttr<import("
|
|
1142
|
-
organizationId: PgAttr<import("
|
|
1143
|
-
type: import("
|
|
1144
|
-
action: import("
|
|
1145
|
-
severity: PgAttr<import("
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1198
|
+
declare const auditResourceSchema: import("zod").ZodObject<{
|
|
1199
|
+
id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1200
|
+
createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1201
|
+
organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
|
|
1202
|
+
type: import("zod").ZodString;
|
|
1203
|
+
action: import("zod").ZodString;
|
|
1204
|
+
severity: PgAttr<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1205
|
+
critical: "critical";
|
|
1206
|
+
info: "info";
|
|
1207
|
+
warning: "warning";
|
|
1208
|
+
}>>, typeof PG_DEFAULT>;
|
|
1209
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1210
|
+
userRealm: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1211
|
+
userEmail: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1212
|
+
resourceType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1213
|
+
resourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1214
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1215
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
1216
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1217
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1218
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1219
|
+
requestId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1220
|
+
success: PgAttr<import("zod").ZodBoolean, typeof PG_DEFAULT>;
|
|
1221
|
+
errorMessage: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1222
|
+
}, import("zod/v4/core").$strip>;
|
|
1160
1223
|
type AuditResource = Static<typeof auditResourceSchema>;
|
|
1161
1224
|
//#endregion
|
|
1162
1225
|
//#region ../../src/api/audits/index.d.ts
|
|
@@ -1168,10 +1231,11 @@ type AuditResource = Static<typeof auditResourceSchema>;
|
|
|
1168
1231
|
* - Audit event logging
|
|
1169
1232
|
* - Filtering and searching
|
|
1170
1233
|
* - User action tracking
|
|
1234
|
+
* - Retention policy with a default + per-type TTL ({@link AuditParameters}, {@link AuditJobs})
|
|
1171
1235
|
*
|
|
1172
1236
|
* @module alepha.api.audits
|
|
1173
1237
|
*/
|
|
1174
1238
|
declare const AlephaApiAudits: import("alepha").Service<import("alepha").Module>;
|
|
1175
1239
|
//#endregion
|
|
1176
|
-
export { $audit, AdminAuditController, AlephaApiAudits, AuditEntity, AuditLogOptions, AuditPrimitive, AuditPrimitiveOptions, AuditQuery, AuditResource, AuditService, AuditSeverity, AuditStats, AuditTypeDefinition, CreateAudit, auditEntityInsertSchema, auditEntitySchema, auditQuerySchema, auditResourceSchema, auditSeveritySchema, audits, createAuditSchema };
|
|
1240
|
+
export { $audit, AdminAuditController, AlephaApiAudits, AuditEntity, AuditJobs, AuditLogOptions, AuditOptions, AuditParameters, AuditPrimitive, AuditPrimitiveOptions, AuditQuery, AuditResource, AuditService, AuditSeverity, AuditStats, AuditTypeDefinition, CreateAudit, auditEntityInsertSchema, auditEntitySchema, auditOptions, auditQuerySchema, auditResourceSchema, auditSeveritySchema, audits, createAuditSchema };
|
|
1177
1241
|
//# sourceMappingURL=index.d.ts.map
|