alepha 0.14.1 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/api/audits/index.browser.js +5 -5
- package/dist/api/audits/index.browser.js.map +1 -1
- package/dist/api/audits/index.d.ts +784 -784
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +13 -13
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.browser.js +5 -5
- package/dist/api/files/index.browser.js.map +1 -1
- package/dist/api/files/index.d.ts +57 -57
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +71 -71
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.browser.js +5 -5
- package/dist/api/jobs/index.browser.js.map +1 -1
- package/dist/api/jobs/index.d.ts +165 -165
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +10 -10
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/notifications/index.browser.js +10 -10
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +583 -171
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js +12 -12
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/parameters/index.browser.js +163 -10
- package/dist/api/parameters/index.browser.js.map +1 -1
- package/dist/api/parameters/index.d.ts +281 -276
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/parameters/index.js +196 -91
- package/dist/api/parameters/index.js.map +1 -1
- package/dist/api/users/index.browser.js +19 -19
- package/dist/api/users/index.browser.js.map +1 -1
- package/dist/api/users/index.d.ts +778 -764
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +831 -596
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.browser.js +6 -6
- package/dist/api/verifications/index.browser.js.map +1 -1
- package/dist/api/verifications/index.d.ts +125 -125
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/api/verifications/index.js +6 -6
- package/dist/api/verifications/index.js.map +1 -1
- package/dist/batch/index.js.map +1 -1
- package/dist/bin/index.d.ts +1 -2
- package/dist/bin/index.js +0 -1
- package/dist/bin/index.js.map +1 -1
- package/dist/cache/core/index.js.map +1 -1
- package/dist/cli/index.d.ts +249 -218
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +951 -821
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +40 -0
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +97 -17
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +14 -18
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +29 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +21 -24
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +21 -24
- package/dist/core/index.native.js.map +1 -1
- package/dist/datetime/index.js.map +1 -1
- package/dist/fake/index.js +195 -168
- package/dist/fake/index.js.map +1 -1
- package/dist/file/index.d.ts +8 -0
- package/dist/file/index.d.ts.map +1 -1
- package/dist/file/index.js +3 -0
- package/dist/file/index.js.map +1 -1
- package/dist/lock/redis/index.js.map +1 -1
- package/dist/logger/index.js.map +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/index.browser.js +26 -5
- package/dist/orm/index.browser.js.map +1 -1
- package/dist/orm/index.d.ts +146 -121
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +49 -24
- package/dist/orm/index.js.map +1 -1
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.js.map +1 -1
- package/dist/router/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +6 -6
- package/dist/scheduler/index.js.map +1 -1
- package/dist/security/index.d.ts +29 -29
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +1 -1
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +171 -155
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +0 -1
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cache/index.js.map +1 -1
- package/dist/server/compress/index.d.ts.map +1 -1
- package/dist/server/compress/index.js +2 -0
- package/dist/server/compress/index.js.map +1 -1
- package/dist/server/cookies/index.browser.js.map +1 -1
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.browser.js.map +1 -1
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +1 -1
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/health/index.d.ts +17 -17
- package/dist/server/helmet/index.js.map +1 -1
- package/dist/server/links/index.browser.js +22 -6
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +46 -44
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +24 -41
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/multipart/index.js.map +1 -1
- package/dist/server/rate-limit/index.js.map +1 -1
- package/dist/server/security/index.js.map +1 -1
- package/dist/server/swagger/index.d.ts +2 -1
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js +8 -3
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/thread/index.js.map +1 -1
- package/dist/topic/core/index.js.map +1 -1
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +12 -4
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.browser.js.map +1 -1
- package/dist/websocket/index.js.map +1 -1
- package/package.json +7 -7
- package/src/api/audits/controllers/{AuditController.ts → AdminAuditController.ts} +5 -6
- package/src/api/audits/entities/audits.ts +5 -5
- package/src/api/audits/index.browser.ts +1 -1
- package/src/api/audits/index.ts +3 -3
- package/src/api/audits/primitives/$audit.spec.ts +276 -0
- package/src/api/audits/services/AuditService.spec.ts +495 -0
- package/src/api/files/__tests__/$bucket.spec.ts +91 -0
- package/src/api/files/controllers/AdminFileStatsController.spec.ts +166 -0
- package/src/api/files/controllers/{StorageStatsController.ts → AdminFileStatsController.ts} +2 -2
- package/src/api/files/controllers/FileController.spec.ts +558 -0
- package/src/api/files/controllers/FileController.ts +4 -5
- package/src/api/files/entities/files.ts +5 -5
- package/src/api/files/index.browser.ts +1 -1
- package/src/api/files/index.ts +4 -4
- package/src/api/files/jobs/FileJobs.spec.ts +52 -0
- package/src/api/files/services/FileService.spec.ts +109 -0
- package/src/api/jobs/__tests__/JobController.spec.ts +343 -0
- package/src/api/jobs/controllers/{JobController.ts → AdminJobController.ts} +2 -2
- package/src/api/jobs/entities/jobExecutions.ts +5 -5
- package/src/api/jobs/index.ts +3 -3
- package/src/api/jobs/primitives/$job.spec.ts +476 -0
- package/src/api/notifications/controllers/{NotificationController.ts → AdminNotificationController.ts} +4 -5
- package/src/api/notifications/entities/notifications.ts +5 -5
- package/src/api/notifications/index.browser.ts +1 -1
- package/src/api/notifications/index.ts +4 -4
- package/src/api/parameters/controllers/{ConfigController.ts → AdminConfigController.ts} +46 -107
- package/src/api/parameters/entities/parameters.ts +7 -17
- package/src/api/parameters/index.ts +3 -3
- package/src/api/parameters/primitives/$config.spec.ts +356 -0
- package/src/api/parameters/schemas/activateConfigBodySchema.ts +12 -0
- package/src/api/parameters/schemas/checkScheduledResponseSchema.ts +8 -0
- package/src/api/parameters/schemas/configCurrentResponseSchema.ts +13 -0
- package/src/api/parameters/schemas/configHistoryResponseSchema.ts +9 -0
- package/src/api/parameters/schemas/configNameParamSchema.ts +10 -0
- package/src/api/parameters/schemas/configNamesResponseSchema.ts +8 -0
- package/src/api/parameters/schemas/configTreeNodeSchema.ts +13 -0
- package/src/api/parameters/schemas/configVersionParamSchema.ts +9 -0
- package/src/api/parameters/schemas/configVersionResponseSchema.ts +9 -0
- package/src/api/parameters/schemas/configsByStatusResponseSchema.ts +9 -0
- package/src/api/parameters/schemas/createConfigVersionBodySchema.ts +24 -0
- package/src/api/parameters/schemas/index.ts +15 -0
- package/src/api/parameters/schemas/parameterResponseSchema.ts +26 -0
- package/src/api/parameters/schemas/parameterStatusSchema.ts +13 -0
- package/src/api/parameters/schemas/rollbackConfigBodySchema.ts +15 -0
- package/src/api/parameters/schemas/statusParamSchema.ts +9 -0
- package/src/api/users/__tests__/EmailVerification.spec.ts +369 -0
- package/src/api/users/__tests__/PasswordReset.spec.ts +550 -0
- package/src/api/users/controllers/AdminIdentityController.spec.ts +365 -0
- package/src/api/users/controllers/{IdentityController.ts → AdminIdentityController.ts} +3 -4
- package/src/api/users/controllers/AdminSessionController.spec.ts +274 -0
- package/src/api/users/controllers/{SessionController.ts → AdminSessionController.ts} +3 -4
- package/src/api/users/controllers/AdminUserController.spec.ts +372 -0
- package/src/api/users/controllers/AdminUserController.ts +116 -0
- package/src/api/users/controllers/UserController.ts +4 -107
- package/src/api/users/controllers/UserRealmController.ts +3 -0
- package/src/api/users/entities/identities.ts +6 -6
- package/src/api/users/entities/sessions.ts +6 -6
- package/src/api/users/entities/users.ts +9 -9
- package/src/api/users/index.ts +13 -6
- package/src/api/users/primitives/$userRealm.ts +13 -8
- package/src/api/users/services/CredentialService.spec.ts +509 -0
- package/src/api/users/services/CredentialService.ts +46 -0
- package/src/api/users/services/IdentityService.ts +15 -0
- package/src/api/users/services/RegistrationService.spec.ts +630 -0
- package/src/api/users/services/RegistrationService.ts +18 -0
- package/src/api/users/services/SessionService.spec.ts +301 -0
- package/src/api/users/services/SessionService.ts +110 -1
- package/src/api/users/services/UserService.ts +67 -2
- package/src/api/verifications/__tests__/CodeVerification.spec.ts +318 -0
- package/src/api/verifications/__tests__/LinkVerification.spec.ts +279 -0
- package/src/api/verifications/entities/verifications.ts +6 -6
- package/src/api/verifications/jobs/VerificationJobs.spec.ts +50 -0
- package/src/batch/__tests__/startup-buffering.spec.ts +458 -0
- package/src/batch/primitives/$batch.spec.ts +766 -0
- package/src/batch/providers/BatchProvider.spec.ts +786 -0
- package/src/bin/index.ts +0 -1
- package/src/bucket/__tests__/shared.ts +194 -0
- package/src/bucket/primitives/$bucket.spec.ts +104 -0
- package/src/bucket/providers/FileStorageProvider.spec.ts +13 -0
- package/src/bucket/providers/LocalFileStorageProvider.spec.ts +77 -0
- package/src/bucket/providers/MemoryFileStorageProvider.spec.ts +82 -0
- package/src/cache/core/__tests__/shared.ts +377 -0
- package/src/cache/core/primitives/$cache.spec.ts +111 -0
- package/src/cache/redis/__tests__/cache-redis.spec.ts +70 -0
- package/src/cli/apps/AlephaCli.ts +54 -16
- package/src/cli/apps/AlephaPackageBuilderCli.ts +2 -1
- package/src/cli/assets/appRouterTs.ts +1 -1
- package/src/cli/commands/{ViteCommands.ts → build.ts} +2 -105
- package/src/cli/commands/clean.ts +14 -0
- package/src/cli/commands/{DrizzleCommands.ts → db.ts} +10 -117
- package/src/cli/commands/{DeployCommands.ts → deploy.ts} +1 -1
- package/src/cli/commands/dev.ts +69 -0
- package/src/cli/commands/format.ts +17 -0
- package/src/cli/commands/gen/changelog.spec.ts +315 -0
- package/src/cli/commands/{ChangelogCommands.ts → gen/changelog.ts} +16 -31
- package/src/cli/commands/gen/openapi.ts +71 -0
- package/src/cli/commands/gen.ts +18 -0
- package/src/cli/commands/{CoreCommands.ts → init.ts} +4 -40
- package/src/cli/commands/lint.ts +17 -0
- package/src/cli/commands/root.ts +41 -0
- package/src/cli/commands/run.ts +24 -0
- package/src/cli/commands/test.ts +42 -0
- package/src/cli/commands/typecheck.ts +24 -0
- package/src/cli/commands/{VerifyCommands.ts → verify.ts} +1 -13
- package/src/cli/defineConfig.ts +10 -1
- package/src/cli/index.ts +17 -7
- package/src/cli/services/AlephaCliUtils.ts +71 -32
- package/src/cli/services/GitMessageParser.ts +1 -1
- package/src/command/helpers/Asker.spec.ts +127 -0
- package/src/command/helpers/Runner.spec.ts +126 -0
- package/src/command/primitives/$command.spec.ts +1588 -0
- package/src/command/providers/CliProvider.ts +74 -24
- package/src/core/Alepha.ts +52 -4
- package/src/core/__tests__/Alepha-emit.spec.ts +22 -0
- package/src/core/__tests__/Alepha-graph.spec.ts +93 -0
- package/src/core/__tests__/Alepha-has.spec.ts +41 -0
- package/src/core/__tests__/Alepha-inject.spec.ts +93 -0
- package/src/core/__tests__/Alepha-register.spec.ts +81 -0
- package/src/core/__tests__/Alepha-start.spec.ts +176 -0
- package/src/core/__tests__/Alepha-with.spec.ts +14 -0
- package/src/core/__tests__/TypeBox-usecases.spec.ts +35 -0
- package/src/core/__tests__/TypeBoxLocale.spec.ts +15 -0
- package/src/core/__tests__/descriptor.spec.ts +34 -0
- package/src/core/__tests__/fixtures/A.ts +5 -0
- package/src/core/__tests__/pagination.spec.ts +77 -0
- package/src/core/helpers/jsonSchemaToTypeBox.ts +2 -2
- package/src/core/primitives/$atom.spec.ts +43 -0
- package/src/core/primitives/$hook.spec.ts +130 -0
- package/src/core/primitives/$inject.spec.ts +175 -0
- package/src/core/primitives/$module.spec.ts +115 -0
- package/src/core/providers/CodecManager.spec.ts +740 -0
- package/src/core/providers/EventManager.spec.ts +762 -0
- package/src/core/providers/EventManager.ts +4 -0
- package/src/core/providers/StateManager.spec.ts +365 -0
- package/src/core/providers/TypeProvider.spec.ts +1607 -0
- package/src/core/providers/TypeProvider.ts +20 -26
- package/src/datetime/primitives/$interval.spec.ts +103 -0
- package/src/datetime/providers/DateTimeProvider.spec.ts +86 -0
- package/src/email/primitives/$email.spec.ts +175 -0
- package/src/email/providers/LocalEmailProvider.spec.ts +341 -0
- package/src/fake/__tests__/keyName.example.ts +40 -0
- package/src/fake/__tests__/keyName.spec.ts +152 -0
- package/src/fake/__tests__/module.example.ts +32 -0
- package/src/fake/providers/FakeProvider.spec.ts +438 -0
- package/src/file/providers/FileSystemProvider.ts +8 -0
- package/src/file/providers/NodeFileSystemProvider.spec.ts +418 -0
- package/src/file/providers/NodeFileSystemProvider.ts +5 -0
- package/src/file/services/FileDetector.spec.ts +591 -0
- package/src/lock/core/__tests__/shared.ts +190 -0
- package/src/lock/core/providers/MemoryLockProvider.spec.ts +25 -0
- package/src/lock/redis/providers/RedisLockProvider.spec.ts +25 -0
- package/src/logger/__tests__/SimpleFormatterProvider.spec.ts +109 -0
- package/src/logger/primitives/$logger.spec.ts +108 -0
- package/src/logger/services/Logger.spec.ts +295 -0
- package/src/mcp/__tests__/errors.spec.ts +175 -0
- package/src/mcp/__tests__/integration.spec.ts +450 -0
- package/src/mcp/helpers/jsonrpc.spec.ts +380 -0
- package/src/mcp/primitives/$prompt.spec.ts +468 -0
- package/src/mcp/primitives/$resource.spec.ts +390 -0
- package/src/mcp/primitives/$tool.spec.ts +406 -0
- package/src/mcp/providers/McpServerProvider.spec.ts +797 -0
- package/src/orm/__tests__/$repository-crud.spec.ts +276 -0
- package/src/orm/__tests__/$repository-hooks.spec.ts +325 -0
- package/src/orm/__tests__/$repository-orderBy.spec.ts +128 -0
- package/src/orm/__tests__/$repository-pagination-sort.spec.ts +149 -0
- package/src/orm/__tests__/$repository-save.spec.ts +37 -0
- package/src/orm/__tests__/ModelBuilder-integration.spec.ts +490 -0
- package/src/orm/__tests__/ModelBuilder-types.spec.ts +186 -0
- package/src/orm/__tests__/PostgresProvider.spec.ts +46 -0
- package/src/orm/__tests__/delete-returning.spec.ts +256 -0
- package/src/orm/__tests__/deletedAt.spec.ts +80 -0
- package/src/orm/__tests__/enums.spec.ts +315 -0
- package/src/orm/__tests__/execute.spec.ts +72 -0
- package/src/orm/__tests__/fixtures/bigEntitySchema.ts +65 -0
- package/src/orm/__tests__/fixtures/userEntitySchema.ts +27 -0
- package/src/orm/__tests__/joins.spec.ts +1114 -0
- package/src/orm/__tests__/page.spec.ts +287 -0
- package/src/orm/__tests__/primaryKey.spec.ts +87 -0
- package/src/orm/__tests__/query-date-encoding.spec.ts +402 -0
- package/src/orm/__tests__/ref-auto-onDelete.spec.ts +156 -0
- package/src/orm/__tests__/references.spec.ts +102 -0
- package/src/orm/__tests__/security.spec.ts +710 -0
- package/src/orm/__tests__/sqlite.spec.ts +111 -0
- package/src/orm/__tests__/string-operators.spec.ts +429 -0
- package/src/orm/__tests__/timestamps.spec.ts +388 -0
- package/src/orm/__tests__/validation.spec.ts +183 -0
- package/src/orm/__tests__/version.spec.ts +64 -0
- package/src/orm/helpers/parseQueryString.spec.ts +196 -0
- package/src/orm/index.browser.ts +1 -1
- package/src/orm/index.ts +10 -6
- package/src/orm/primitives/$repository.spec.ts +137 -0
- package/src/orm/primitives/$sequence.spec.ts +29 -0
- package/src/orm/primitives/$transaction.spec.ts +82 -0
- package/src/orm/providers/{PostgresTypeProvider.ts → DatabaseTypeProvider.ts} +25 -3
- package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -3
- package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
- package/src/orm/providers/drivers/CloudflareD1Provider.ts +1 -1
- package/src/orm/providers/drivers/DatabaseProvider.ts +1 -1
- package/src/orm/providers/drivers/NodePostgresProvider.ts +3 -3
- package/src/orm/providers/drivers/NodeSqliteProvider.ts +1 -1
- package/src/orm/providers/drivers/PglitePostgresProvider.ts +2 -2
- package/src/orm/services/ModelBuilder.spec.ts +575 -0
- package/src/orm/services/Repository.spec.ts +137 -0
- package/src/queue/core/__tests__/shared.ts +143 -0
- package/src/queue/core/providers/MemoryQueueProvider.spec.ts +23 -0
- package/src/queue/core/providers/WorkerProvider.spec.ts +378 -0
- package/src/queue/redis/providers/RedisQueueProvider.spec.ts +23 -0
- package/src/redis/__tests__/redis.spec.ts +58 -0
- package/src/retry/primitives/$retry.spec.ts +234 -0
- package/src/retry/providers/RetryProvider.spec.ts +438 -0
- package/src/router/__tests__/match.spec.ts +252 -0
- package/src/router/providers/RouterProvider.spec.ts +197 -0
- package/src/scheduler/__tests__/$scheduler-cron.spec.ts +25 -0
- package/src/scheduler/__tests__/$scheduler-interval.spec.ts +25 -0
- package/src/scheduler/__tests__/shared.ts +77 -0
- package/src/security/__tests__/bug-1-wildcard-after-start.spec.ts +229 -0
- package/src/security/__tests__/bug-2-password-validation.spec.ts +245 -0
- package/src/security/__tests__/bug-3-regex-vulnerability.spec.ts +407 -0
- package/src/security/__tests__/bug-4-oauth2-validation.spec.ts +439 -0
- package/src/security/__tests__/multi-layer-permissions.spec.ts +522 -0
- package/src/security/primitives/$permission.spec.ts +30 -0
- package/src/security/primitives/$permission.ts +2 -2
- package/src/security/primitives/$realm.spec.ts +101 -0
- package/src/security/primitives/$role.spec.ts +52 -0
- package/src/security/primitives/$serviceAccount.spec.ts +61 -0
- package/src/security/providers/SecurityProvider.spec.ts +350 -0
- package/src/server/auth/providers/ServerAuthProvider.ts +0 -2
- package/src/server/cache/providers/ServerCacheProvider.spec.ts +942 -0
- package/src/server/compress/providers/ServerCompressProvider.spec.ts +31 -0
- package/src/server/compress/providers/ServerCompressProvider.ts +2 -0
- package/src/server/cookies/providers/ServerCookiesProvider.spec.ts +253 -0
- package/src/server/core/__tests__/ServerRouterProvider-getRoutes.spec.ts +334 -0
- package/src/server/core/__tests__/ServerRouterProvider-requestId.spec.ts +129 -0
- package/src/server/core/primitives/$action.spec.ts +191 -0
- package/src/server/core/primitives/$route.spec.ts +65 -0
- package/src/server/core/providers/ServerBodyParserProvider.spec.ts +93 -0
- package/src/server/core/providers/ServerLoggerProvider.spec.ts +100 -0
- package/src/server/core/providers/ServerProvider.ts +3 -1
- package/src/server/core/services/HttpClient.spec.ts +123 -0
- package/src/server/core/services/UserAgentParser.spec.ts +111 -0
- package/src/server/cors/providers/ServerCorsProvider.spec.ts +481 -0
- package/src/server/health/providers/ServerHealthProvider.spec.ts +22 -0
- package/src/server/helmet/providers/ServerHelmetProvider.spec.ts +105 -0
- package/src/server/links/__tests__/$action.spec.ts +238 -0
- package/src/server/links/__tests__/fixtures/CrudApp.ts +122 -0
- package/src/server/links/__tests__/requestId.spec.ts +120 -0
- package/src/server/links/primitives/$remote.spec.ts +228 -0
- package/src/server/links/providers/LinkProvider.spec.ts +54 -0
- package/src/server/links/providers/LinkProvider.ts +49 -3
- package/src/server/links/providers/ServerLinksProvider.ts +1 -53
- package/src/server/links/schemas/apiLinksResponseSchema.ts +7 -0
- package/src/server/metrics/providers/ServerMetricsProvider.spec.ts +25 -0
- package/src/server/multipart/providers/ServerMultipartProvider.spec.ts +528 -0
- package/src/server/proxy/primitives/$proxy.spec.ts +87 -0
- package/src/server/rate-limit/__tests__/ActionRateLimit.spec.ts +211 -0
- package/src/server/rate-limit/providers/ServerRateLimitProvider.spec.ts +344 -0
- package/src/server/security/__tests__/BasicAuth.spec.ts +684 -0
- package/src/server/security/__tests__/ServerSecurityProvider-realm.spec.ts +388 -0
- package/src/server/security/providers/ServerSecurityProvider.spec.ts +123 -0
- package/src/server/static/primitives/$serve.spec.ts +193 -0
- package/src/server/swagger/__tests__/ui.spec.ts +52 -0
- package/src/server/swagger/primitives/$swagger.spec.ts +193 -0
- package/src/server/swagger/providers/ServerSwaggerProvider.ts +18 -8
- package/src/sms/primitives/$sms.spec.ts +165 -0
- package/src/sms/providers/LocalSmsProvider.spec.ts +224 -0
- package/src/sms/providers/MemorySmsProvider.spec.ts +193 -0
- package/src/thread/primitives/$thread.spec.ts +186 -0
- package/src/topic/core/__tests__/shared.ts +144 -0
- package/src/topic/core/providers/MemoryTopicProvider.spec.ts +23 -0
- package/src/topic/redis/providers/RedisTopicProvider.spec.ts +23 -0
- package/src/vite/plugins/viteAlephaDev.ts +16 -4
- package/src/vite/tasks/runAlepha.ts +7 -1
- package/src/websocket/__tests__/$websocket-new.spec.ts +195 -0
- package/src/websocket/primitives/$channel.spec.ts +30 -0
- package/src/cli/commands/BiomeCommands.ts +0 -29
|
@@ -1,58 +1,470 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Alepha, KIND, Primitive, Static, StaticEncode, TObject } from "alepha";
|
|
3
|
-
import * as alepha_orm66 from "alepha/orm";
|
|
4
|
-
import { Page } from "alepha/orm";
|
|
1
|
+
import * as alepha252 from "alepha";
|
|
2
|
+
import { Alepha, AlephaError, KIND, Primitive, Static, StaticEncode, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
|
|
5
3
|
import * as alepha_server0 from "alepha/server";
|
|
4
|
+
import * as alepha_orm50 from "alepha/orm";
|
|
5
|
+
import { Page } from "alepha/orm";
|
|
6
6
|
import * as alepha_batch0 from "alepha/batch";
|
|
7
7
|
import { DateTimeProvider } from "alepha/datetime";
|
|
8
8
|
import * as alepha_logger0 from "alepha/logger";
|
|
9
9
|
import * as alepha_queue0 from "alepha/queue";
|
|
10
10
|
import { EmailProvider } from "alepha/email";
|
|
11
11
|
import { SmsProvider } from "alepha/sms";
|
|
12
|
+
import "bun";
|
|
13
|
+
import "bun:sqlite";
|
|
14
|
+
import "drizzle-orm/bun-sql";
|
|
15
|
+
import "drizzle-orm/bun-sqlite";
|
|
16
|
+
import "drizzle-orm/d1";
|
|
17
|
+
import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
|
|
18
|
+
import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
|
|
19
|
+
import "alepha/retry";
|
|
20
|
+
import "alepha/lock";
|
|
12
21
|
import * as typebox0 from "typebox";
|
|
22
|
+
import "drizzle-orm/sqlite-core";
|
|
23
|
+
import "drizzle-orm/postgres-js";
|
|
24
|
+
import "postgres";
|
|
13
25
|
|
|
26
|
+
//#region ../../src/orm/schemas/insertSchema.d.ts
|
|
27
|
+
/**
|
|
28
|
+
* Transforms a TObject schema for insert operations.
|
|
29
|
+
* All default properties at the root level are made optional.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* Before: { name: string; age: number(default=0); }
|
|
33
|
+
* After: { name: string; age?: number; }
|
|
34
|
+
*/
|
|
35
|
+
type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]]: T["properties"][K] extends {
|
|
36
|
+
[PG_DEFAULT]: any;
|
|
37
|
+
} | {
|
|
38
|
+
"~optional": true;
|
|
39
|
+
} ? TOptional<T["properties"][K]> : T["properties"][K] }>;
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region ../../src/orm/schemas/updateSchema.d.ts
|
|
42
|
+
/**
|
|
43
|
+
* Transforms a TObject schema for update operations.
|
|
44
|
+
* All optional properties at the root level are made nullable (i.e., `T | null`).
|
|
45
|
+
* This allows an API endpoint to explicitly accept `null` to clear an optional field in the database.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* Before: { name?: string; age: number; }
|
|
49
|
+
* After: { name?: string | null; age: number; }
|
|
50
|
+
*/
|
|
51
|
+
type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]: T["properties"][K] extends TOptional<infer U> ? TOptional<TUnion<[U, TNull]>> : T["properties"][K] }>;
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region ../../src/orm/primitives/$entity.d.ts
|
|
54
|
+
interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
|
|
55
|
+
/**
|
|
56
|
+
* The database table name that will be created for this entity.
|
|
57
|
+
* If not provided, name will be inferred from the $repository variable name.
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
/**
|
|
61
|
+
* TypeBox schema defining the table structure and column types.
|
|
62
|
+
*/
|
|
63
|
+
schema: T;
|
|
64
|
+
/**
|
|
65
|
+
* Database indexes to create for query optimization.
|
|
66
|
+
*/
|
|
67
|
+
indexes?: (Keys | {
|
|
68
|
+
/**
|
|
69
|
+
* Single column to index.
|
|
70
|
+
*/
|
|
71
|
+
column: Keys;
|
|
72
|
+
/**
|
|
73
|
+
* Whether this should be a unique index (enforces uniqueness constraint).
|
|
74
|
+
*/
|
|
75
|
+
unique?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Custom name for the index. If not provided, generates name automatically.
|
|
78
|
+
*/
|
|
79
|
+
name?: string;
|
|
80
|
+
} | {
|
|
81
|
+
/**
|
|
82
|
+
* Multiple columns for composite index (order matters for query optimization).
|
|
83
|
+
*/
|
|
84
|
+
columns: Keys[];
|
|
85
|
+
/**
|
|
86
|
+
* Whether this should be a unique index (enforces uniqueness constraint).
|
|
87
|
+
*/
|
|
88
|
+
unique?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Custom name for the index. If not provided, generates name automatically.
|
|
91
|
+
*/
|
|
92
|
+
name?: string;
|
|
93
|
+
})[];
|
|
94
|
+
/**
|
|
95
|
+
* Foreign key constraints to maintain referential integrity.
|
|
96
|
+
*/
|
|
97
|
+
foreignKeys?: Array<{
|
|
98
|
+
/**
|
|
99
|
+
* Optional name for the foreign key constraint.
|
|
100
|
+
*/
|
|
101
|
+
name?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Local columns that reference the foreign table.
|
|
104
|
+
*/
|
|
105
|
+
columns: Array<keyof Static<T>>;
|
|
106
|
+
/**
|
|
107
|
+
* Referenced columns in the foreign table.
|
|
108
|
+
* Must be EntityColumn references from other entities.
|
|
109
|
+
*/
|
|
110
|
+
foreignColumns: Array<() => EntityColumn<any>>;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* Additional table constraints for data validation.
|
|
114
|
+
*
|
|
115
|
+
* Constraints enforce business rules at the database level, providing
|
|
116
|
+
* an additional layer of data integrity beyond application validation.
|
|
117
|
+
*
|
|
118
|
+
* **Constraint Types**:
|
|
119
|
+
* - **Unique constraints**: Prevent duplicate values across columns
|
|
120
|
+
* - **Check constraints**: Enforce custom validation rules with SQL expressions
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```ts
|
|
124
|
+
* constraints: [
|
|
125
|
+
* {
|
|
126
|
+
* name: "unique_user_email",
|
|
127
|
+
* columns: ["email"],
|
|
128
|
+
* unique: true
|
|
129
|
+
* },
|
|
130
|
+
* {
|
|
131
|
+
* name: "valid_age_range",
|
|
132
|
+
* columns: ["age"],
|
|
133
|
+
* check: sql`age >= 0 AND age <= 150`
|
|
134
|
+
* },
|
|
135
|
+
* {
|
|
136
|
+
* name: "unique_user_username_per_tenant",
|
|
137
|
+
* columns: ["tenantId", "username"],
|
|
138
|
+
* unique: true
|
|
139
|
+
* }
|
|
140
|
+
* ]
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
constraints?: Array<{
|
|
144
|
+
/**
|
|
145
|
+
* Columns involved in this constraint.
|
|
146
|
+
*/
|
|
147
|
+
columns: Array<keyof Static<T>>;
|
|
148
|
+
/**
|
|
149
|
+
* Optional name for the constraint.
|
|
150
|
+
*/
|
|
151
|
+
name?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Whether this is a unique constraint.
|
|
154
|
+
*/
|
|
155
|
+
unique?: boolean | {};
|
|
156
|
+
/**
|
|
157
|
+
* SQL expression for check constraint validation.
|
|
158
|
+
*/
|
|
159
|
+
check?: SQL;
|
|
160
|
+
}>;
|
|
161
|
+
/**
|
|
162
|
+
* Advanced Drizzle ORM configuration for complex table setups.
|
|
163
|
+
*/
|
|
164
|
+
config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
|
|
165
|
+
}
|
|
166
|
+
declare class EntityPrimitive<T extends TObject = TObject> {
|
|
167
|
+
readonly options: EntityPrimitiveOptions<T>;
|
|
168
|
+
constructor(options: EntityPrimitiveOptions<T>);
|
|
169
|
+
alias(alias: string): this;
|
|
170
|
+
get cols(): EntityColumns<T>;
|
|
171
|
+
get name(): string;
|
|
172
|
+
get schema(): T;
|
|
173
|
+
get insertSchema(): TObjectInsert<T>;
|
|
174
|
+
get updateSchema(): TObjectUpdate<T>;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Convert a schema to columns.
|
|
178
|
+
*/
|
|
179
|
+
type FromSchema<T extends TObject> = { [key in keyof T["properties"]]: PgColumnBuilderBase };
|
|
180
|
+
type EntityColumn<T extends TObject> = {
|
|
181
|
+
name: string;
|
|
182
|
+
entity: EntityPrimitive<T>;
|
|
183
|
+
};
|
|
184
|
+
type EntityColumns<T extends TObject> = { [key in keyof T["properties"]]: EntityColumn<T> };
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region ../../src/orm/constants/PG_SYMBOLS.d.ts
|
|
187
|
+
declare const PG_DEFAULT: unique symbol;
|
|
188
|
+
declare const PG_PRIMARY_KEY: unique symbol;
|
|
189
|
+
declare const PG_CREATED_AT: unique symbol;
|
|
190
|
+
declare const PG_UPDATED_AT: unique symbol;
|
|
191
|
+
declare const PG_DELETED_AT: unique symbol;
|
|
192
|
+
declare const PG_VERSION: unique symbol;
|
|
193
|
+
declare const PG_IDENTITY: unique symbol;
|
|
194
|
+
declare const PG_ENUM: unique symbol;
|
|
195
|
+
declare const PG_REF: unique symbol;
|
|
196
|
+
/**
|
|
197
|
+
* @deprecated Use `PG_IDENTITY` instead.
|
|
198
|
+
*/
|
|
199
|
+
declare const PG_SERIAL: unique symbol;
|
|
200
|
+
type PgSymbols = {
|
|
201
|
+
[PG_DEFAULT]: {};
|
|
202
|
+
[PG_PRIMARY_KEY]: {};
|
|
203
|
+
[PG_CREATED_AT]: {};
|
|
204
|
+
[PG_UPDATED_AT]: {};
|
|
205
|
+
[PG_DELETED_AT]: {};
|
|
206
|
+
[PG_VERSION]: {};
|
|
207
|
+
[PG_IDENTITY]: PgIdentityOptions;
|
|
208
|
+
[PG_REF]: PgRefOptions;
|
|
209
|
+
[PG_ENUM]: PgEnumOptions;
|
|
210
|
+
/**
|
|
211
|
+
* @deprecated Use `PG_IDENTITY` instead.
|
|
212
|
+
*/
|
|
213
|
+
[PG_SERIAL]: {};
|
|
214
|
+
};
|
|
215
|
+
type PgSymbolKeys = keyof PgSymbols;
|
|
216
|
+
type PgIdentityOptions = {
|
|
217
|
+
mode: "always" | "byDefault";
|
|
218
|
+
} & PgSequenceOptions & {
|
|
219
|
+
name?: string;
|
|
220
|
+
};
|
|
221
|
+
interface PgEnumOptions {
|
|
222
|
+
name?: string;
|
|
223
|
+
description?: string;
|
|
224
|
+
}
|
|
225
|
+
interface PgRefOptions {
|
|
226
|
+
ref: () => {
|
|
227
|
+
name: string;
|
|
228
|
+
entity: EntityPrimitive;
|
|
229
|
+
};
|
|
230
|
+
actions?: {
|
|
231
|
+
onUpdate?: UpdateDeleteAction;
|
|
232
|
+
onDelete?: UpdateDeleteAction;
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region ../../src/orm/helpers/pgAttr.d.ts
|
|
237
|
+
/**
|
|
238
|
+
* Type representation.
|
|
239
|
+
*/
|
|
240
|
+
type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region ../../src/orm/providers/drivers/BunPostgresProvider.d.ts
|
|
243
|
+
declare module "alepha" {
|
|
244
|
+
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
245
|
+
}
|
|
246
|
+
declare const envSchema$1: alepha252.TObject<{
|
|
247
|
+
/**
|
|
248
|
+
* Main configuration for database connection.
|
|
249
|
+
* Accept a string in the format of a Postgres connection URL.
|
|
250
|
+
* Example: postgres://user:password@localhost:5432/database
|
|
251
|
+
* or
|
|
252
|
+
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
253
|
+
*/
|
|
254
|
+
DATABASE_URL: alepha252.TOptional<alepha252.TString>;
|
|
255
|
+
/**
|
|
256
|
+
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
257
|
+
*/
|
|
258
|
+
POSTGRES_SCHEMA: alepha252.TOptional<alepha252.TString>;
|
|
259
|
+
}>;
|
|
260
|
+
/**
|
|
261
|
+
* Bun PostgreSQL provider using Drizzle ORM with Bun's native SQL client.
|
|
262
|
+
*
|
|
263
|
+
* This provider uses Bun's built-in SQL class for PostgreSQL connections,
|
|
264
|
+
* which provides excellent performance on the Bun runtime.
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* ```ts
|
|
268
|
+
* // Set DATABASE_URL environment variable
|
|
269
|
+
* // DATABASE_URL=postgres://user:password@localhost:5432/database
|
|
270
|
+
*
|
|
271
|
+
* // Or configure programmatically
|
|
272
|
+
* alepha.with({
|
|
273
|
+
* provide: DatabaseProvider,
|
|
274
|
+
* use: BunPostgresProvider,
|
|
275
|
+
* });
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region ../../src/orm/providers/drivers/BunSqliteProvider.d.ts
|
|
280
|
+
/**
|
|
281
|
+
* Configuration options for the Bun SQLite database provider.
|
|
282
|
+
*/
|
|
283
|
+
declare const bunSqliteOptions: alepha252.Atom<alepha252.TObject<{
|
|
284
|
+
path: alepha252.TOptional<alepha252.TString>;
|
|
285
|
+
}>, "alepha.postgres.bun-sqlite.options">;
|
|
286
|
+
type BunSqliteProviderOptions = Static<typeof bunSqliteOptions.schema>;
|
|
287
|
+
declare module "alepha" {
|
|
288
|
+
interface State {
|
|
289
|
+
[bunSqliteOptions.key]: BunSqliteProviderOptions;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Bun SQLite provider using Drizzle ORM with Bun's native SQLite client.
|
|
294
|
+
*
|
|
295
|
+
* This provider uses Bun's built-in `bun:sqlite` for SQLite connections,
|
|
296
|
+
* which provides excellent performance on the Bun runtime.
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* ```ts
|
|
300
|
+
* // Set DATABASE_URL environment variable
|
|
301
|
+
* // DATABASE_URL=sqlite://./my-database.db
|
|
302
|
+
*
|
|
303
|
+
* // Or configure programmatically
|
|
304
|
+
* alepha.with({
|
|
305
|
+
* provide: DatabaseProvider,
|
|
306
|
+
* use: BunSqliteProvider,
|
|
307
|
+
* });
|
|
308
|
+
*
|
|
309
|
+
* // Or use options atom
|
|
310
|
+
* alepha.store.mut(bunSqliteOptions, (old) => ({
|
|
311
|
+
* ...old,
|
|
312
|
+
* path: ":memory:",
|
|
313
|
+
* }));
|
|
314
|
+
* ```
|
|
315
|
+
*/
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
|
|
318
|
+
declare module "alepha" {
|
|
319
|
+
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
320
|
+
}
|
|
321
|
+
declare const envSchema: alepha252.TObject<{
|
|
322
|
+
/**
|
|
323
|
+
* Main configuration for database connection.
|
|
324
|
+
* Accept a string in the format of a Postgres connection URL.
|
|
325
|
+
* Example: postgres://user:password@localhost:5432/database
|
|
326
|
+
* or
|
|
327
|
+
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
328
|
+
*/
|
|
329
|
+
DATABASE_URL: alepha252.TOptional<alepha252.TString>;
|
|
330
|
+
/**
|
|
331
|
+
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
332
|
+
*
|
|
333
|
+
* It will monkey patch drizzle tables.
|
|
334
|
+
*/
|
|
335
|
+
POSTGRES_SCHEMA: alepha252.TOptional<alepha252.TString>;
|
|
336
|
+
}>;
|
|
337
|
+
//#endregion
|
|
338
|
+
//#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
|
|
339
|
+
/**
|
|
340
|
+
* Configuration options for the Node.js SQLite database provider.
|
|
341
|
+
*/
|
|
342
|
+
declare const nodeSqliteOptions: alepha252.Atom<alepha252.TObject<{
|
|
343
|
+
path: alepha252.TOptional<alepha252.TString>;
|
|
344
|
+
}>, "alepha.postgres.node-sqlite.options">;
|
|
345
|
+
type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
|
|
346
|
+
declare module "alepha" {
|
|
347
|
+
interface State {
|
|
348
|
+
[nodeSqliteOptions.key]: NodeSqliteProviderOptions;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Add a fake support for SQLite in Node.js based on Postgres interfaces.
|
|
353
|
+
*
|
|
354
|
+
* This is NOT a real SQLite provider, it's a workaround to use SQLite with Drizzle ORM.
|
|
355
|
+
* This is NOT recommended for production use.
|
|
356
|
+
*/
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region ../../src/orm/index.d.ts
|
|
359
|
+
declare module "alepha" {
|
|
360
|
+
interface Hooks {
|
|
361
|
+
/**
|
|
362
|
+
* Fires before creating an entity in the repository.
|
|
363
|
+
*/
|
|
364
|
+
"repository:create:before": {
|
|
365
|
+
tableName: string;
|
|
366
|
+
data: any;
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* Fires after creating an entity in the repository.
|
|
370
|
+
*/
|
|
371
|
+
"repository:create:after": {
|
|
372
|
+
tableName: string;
|
|
373
|
+
data: any;
|
|
374
|
+
entity: any;
|
|
375
|
+
};
|
|
376
|
+
/**
|
|
377
|
+
* Fires before updating entities in the repository.
|
|
378
|
+
*/
|
|
379
|
+
"repository:update:before": {
|
|
380
|
+
tableName: string;
|
|
381
|
+
where: any;
|
|
382
|
+
data: any;
|
|
383
|
+
};
|
|
384
|
+
/**
|
|
385
|
+
* Fires after updating entities in the repository.
|
|
386
|
+
*/
|
|
387
|
+
"repository:update:after": {
|
|
388
|
+
tableName: string;
|
|
389
|
+
where: any;
|
|
390
|
+
data: any;
|
|
391
|
+
entities: any[];
|
|
392
|
+
};
|
|
393
|
+
/**
|
|
394
|
+
* Fires before deleting entities from the repository.
|
|
395
|
+
*/
|
|
396
|
+
"repository:delete:before": {
|
|
397
|
+
tableName: string;
|
|
398
|
+
where: any;
|
|
399
|
+
};
|
|
400
|
+
/**
|
|
401
|
+
* Fires after deleting entities from the repository.
|
|
402
|
+
*/
|
|
403
|
+
"repository:delete:after": {
|
|
404
|
+
tableName: string;
|
|
405
|
+
where: any;
|
|
406
|
+
ids: Array<string | number>;
|
|
407
|
+
};
|
|
408
|
+
/**
|
|
409
|
+
* Fires before reading entities from the repository.
|
|
410
|
+
*/
|
|
411
|
+
"repository:read:before": {
|
|
412
|
+
tableName: string;
|
|
413
|
+
query: any;
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* Fires after reading entities from the repository.
|
|
417
|
+
*/
|
|
418
|
+
"repository:read:after": {
|
|
419
|
+
tableName: string;
|
|
420
|
+
query: any;
|
|
421
|
+
entities: any[];
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
//#endregion
|
|
14
426
|
//#region ../../src/api/notifications/entities/notifications.d.ts
|
|
15
|
-
declare const notifications:
|
|
16
|
-
id:
|
|
17
|
-
version:
|
|
18
|
-
createdAt:
|
|
19
|
-
updatedAt:
|
|
20
|
-
type:
|
|
21
|
-
template:
|
|
22
|
-
category:
|
|
23
|
-
critical:
|
|
24
|
-
sensitive:
|
|
25
|
-
contact:
|
|
26
|
-
variables:
|
|
27
|
-
scheduledAt:
|
|
28
|
-
sentAt:
|
|
29
|
-
error:
|
|
30
|
-
at:
|
|
31
|
-
name:
|
|
32
|
-
message:
|
|
427
|
+
declare const notifications: alepha_orm50.EntityPrimitive<alepha252.TObject<{
|
|
428
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
429
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
430
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
431
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
432
|
+
type: alepha252.TUnsafe<"email" | "sms">;
|
|
433
|
+
template: alepha252.TString;
|
|
434
|
+
category: alepha252.TOptional<alepha252.TString>;
|
|
435
|
+
critical: alepha252.TOptional<alepha252.TBoolean>;
|
|
436
|
+
sensitive: alepha252.TOptional<alepha252.TBoolean>;
|
|
437
|
+
contact: alepha252.TString;
|
|
438
|
+
variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
|
|
439
|
+
scheduledAt: alepha252.TOptional<alepha252.TString>;
|
|
440
|
+
sentAt: alepha252.TOptional<alepha252.TString>;
|
|
441
|
+
error: alepha252.TOptional<alepha252.TObject<{
|
|
442
|
+
at: alepha252.TString;
|
|
443
|
+
name: alepha252.TString;
|
|
444
|
+
message: alepha252.TString;
|
|
33
445
|
}>>;
|
|
34
446
|
}>>;
|
|
35
447
|
type NotificationEntity = Static<typeof notifications.schema>;
|
|
36
448
|
//#endregion
|
|
37
449
|
//#region ../../src/api/notifications/schemas/notificationCreateSchema.d.ts
|
|
38
|
-
declare const notificationCreateSchema:
|
|
39
|
-
type:
|
|
40
|
-
template:
|
|
41
|
-
contact:
|
|
42
|
-
variables:
|
|
450
|
+
declare const notificationCreateSchema: alepha252.TObject<{
|
|
451
|
+
type: alepha252.TUnsafe<"email" | "sms">;
|
|
452
|
+
template: alepha252.TString;
|
|
453
|
+
contact: alepha252.TString;
|
|
454
|
+
variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
|
|
43
455
|
}>;
|
|
44
456
|
type NotificationCreate = Static<typeof notificationCreateSchema>;
|
|
45
457
|
//#endregion
|
|
46
458
|
//#region ../../src/api/notifications/schemas/notificationQuerySchema.d.ts
|
|
47
|
-
declare const notificationQuerySchema:
|
|
48
|
-
page:
|
|
49
|
-
size:
|
|
50
|
-
sort:
|
|
51
|
-
type:
|
|
52
|
-
template:
|
|
53
|
-
contact:
|
|
54
|
-
category:
|
|
55
|
-
status:
|
|
459
|
+
declare const notificationQuerySchema: alepha252.TObject<{
|
|
460
|
+
page: alepha252.TOptional<alepha252.TInteger>;
|
|
461
|
+
size: alepha252.TOptional<alepha252.TInteger>;
|
|
462
|
+
sort: alepha252.TOptional<alepha252.TString>;
|
|
463
|
+
type: alepha252.TOptional<alepha252.TUnsafe<"email" | "sms">>;
|
|
464
|
+
template: alepha252.TOptional<alepha252.TString>;
|
|
465
|
+
contact: alepha252.TOptional<alepha252.TString>;
|
|
466
|
+
category: alepha252.TOptional<alepha252.TString>;
|
|
467
|
+
status: alepha252.TOptional<alepha252.TUnsafe<"pending" | "sent" | "failed">>;
|
|
56
468
|
}>;
|
|
57
469
|
type NotificationQuery = Static<typeof notificationQuerySchema>;
|
|
58
470
|
//#endregion
|
|
@@ -124,24 +536,24 @@ interface NotificationMessage<T extends TObject> {
|
|
|
124
536
|
declare class NotificationSenderService {
|
|
125
537
|
protected readonly alepha: Alepha;
|
|
126
538
|
protected readonly log: alepha_logger0.Logger;
|
|
127
|
-
protected readonly notificationRepository:
|
|
128
|
-
id:
|
|
129
|
-
version:
|
|
130
|
-
createdAt:
|
|
131
|
-
updatedAt:
|
|
132
|
-
type:
|
|
133
|
-
template:
|
|
134
|
-
category:
|
|
135
|
-
critical:
|
|
136
|
-
sensitive:
|
|
137
|
-
contact:
|
|
138
|
-
variables:
|
|
139
|
-
scheduledAt:
|
|
140
|
-
sentAt:
|
|
141
|
-
error:
|
|
142
|
-
at:
|
|
143
|
-
name:
|
|
144
|
-
message:
|
|
539
|
+
protected readonly notificationRepository: alepha_orm50.Repository<alepha252.TObject<{
|
|
540
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
541
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
542
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
543
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
544
|
+
type: alepha252.TUnsafe<"email" | "sms">;
|
|
545
|
+
template: alepha252.TString;
|
|
546
|
+
category: alepha252.TOptional<alepha252.TString>;
|
|
547
|
+
critical: alepha252.TOptional<alepha252.TBoolean>;
|
|
548
|
+
sensitive: alepha252.TOptional<alepha252.TBoolean>;
|
|
549
|
+
contact: alepha252.TString;
|
|
550
|
+
variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
|
|
551
|
+
scheduledAt: alepha252.TOptional<alepha252.TString>;
|
|
552
|
+
sentAt: alepha252.TOptional<alepha252.TString>;
|
|
553
|
+
error: alepha252.TOptional<alepha252.TObject<{
|
|
554
|
+
at: alepha252.TString;
|
|
555
|
+
name: alepha252.TString;
|
|
556
|
+
message: alepha252.TString;
|
|
145
557
|
}>>;
|
|
146
558
|
}>>;
|
|
147
559
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
@@ -158,34 +570,34 @@ declare class NotificationSenderService {
|
|
|
158
570
|
body: string;
|
|
159
571
|
};
|
|
160
572
|
protected load(notification: NotificationEntity): {
|
|
161
|
-
template: NotificationPrimitive<
|
|
573
|
+
template: NotificationPrimitive<alepha252.TObject<alepha252.TProperties>>;
|
|
162
574
|
variables: typebox0.StaticRecord<[], "Decode", {}, {
|
|
163
|
-
id:
|
|
164
|
-
version:
|
|
165
|
-
createdAt:
|
|
166
|
-
updatedAt:
|
|
167
|
-
type:
|
|
168
|
-
template:
|
|
169
|
-
category:
|
|
170
|
-
critical:
|
|
171
|
-
sensitive:
|
|
172
|
-
contact:
|
|
173
|
-
variables:
|
|
174
|
-
scheduledAt:
|
|
175
|
-
sentAt:
|
|
176
|
-
error:
|
|
177
|
-
at:
|
|
178
|
-
name:
|
|
179
|
-
message:
|
|
575
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
576
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
577
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
578
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
579
|
+
type: alepha252.TUnsafe<"email" | "sms">;
|
|
580
|
+
template: alepha252.TString;
|
|
581
|
+
category: alepha252.TOptional<alepha252.TString>;
|
|
582
|
+
critical: alepha252.TOptional<alepha252.TBoolean>;
|
|
583
|
+
sensitive: alepha252.TOptional<alepha252.TBoolean>;
|
|
584
|
+
contact: alepha252.TString;
|
|
585
|
+
variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
|
|
586
|
+
scheduledAt: alepha252.TOptional<alepha252.TString>;
|
|
587
|
+
sentAt: alepha252.TOptional<alepha252.TString>;
|
|
588
|
+
error: alepha252.TOptional<alepha252.TObject<{
|
|
589
|
+
at: alepha252.TString;
|
|
590
|
+
name: alepha252.TString;
|
|
591
|
+
message: alepha252.TString;
|
|
180
592
|
}>>;
|
|
181
|
-
}, "^.*$",
|
|
593
|
+
}, "^.*$", alepha252.TAny>;
|
|
182
594
|
contact: string;
|
|
183
595
|
};
|
|
184
596
|
}
|
|
185
597
|
//#endregion
|
|
186
598
|
//#region ../../src/api/notifications/services/NotificationService.d.ts
|
|
187
|
-
declare const notificationServiceEnvSchema:
|
|
188
|
-
NOTIFICATION_QUEUE:
|
|
599
|
+
declare const notificationServiceEnvSchema: alepha252.TObject<{
|
|
600
|
+
NOTIFICATION_QUEUE: alepha252.TOptional<alepha252.TBoolean>;
|
|
189
601
|
}>;
|
|
190
602
|
declare module "alepha" {
|
|
191
603
|
interface Env extends Partial<Static<typeof notificationServiceEnvSchema>> {}
|
|
@@ -196,71 +608,71 @@ declare class NotificationService {
|
|
|
196
608
|
protected readonly env: {
|
|
197
609
|
NOTIFICATION_QUEUE?: boolean | undefined;
|
|
198
610
|
};
|
|
199
|
-
protected readonly notificationRepository:
|
|
200
|
-
id:
|
|
201
|
-
version:
|
|
202
|
-
createdAt:
|
|
203
|
-
updatedAt:
|
|
204
|
-
type:
|
|
205
|
-
template:
|
|
206
|
-
category:
|
|
207
|
-
critical:
|
|
208
|
-
sensitive:
|
|
209
|
-
contact:
|
|
210
|
-
variables:
|
|
211
|
-
scheduledAt:
|
|
212
|
-
sentAt:
|
|
213
|
-
error:
|
|
214
|
-
at:
|
|
215
|
-
name:
|
|
216
|
-
message:
|
|
611
|
+
protected readonly notificationRepository: alepha_orm50.Repository<alepha252.TObject<{
|
|
612
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
613
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
614
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
615
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
616
|
+
type: alepha252.TUnsafe<"email" | "sms">;
|
|
617
|
+
template: alepha252.TString;
|
|
618
|
+
category: alepha252.TOptional<alepha252.TString>;
|
|
619
|
+
critical: alepha252.TOptional<alepha252.TBoolean>;
|
|
620
|
+
sensitive: alepha252.TOptional<alepha252.TBoolean>;
|
|
621
|
+
contact: alepha252.TString;
|
|
622
|
+
variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
|
|
623
|
+
scheduledAt: alepha252.TOptional<alepha252.TString>;
|
|
624
|
+
sentAt: alepha252.TOptional<alepha252.TString>;
|
|
625
|
+
error: alepha252.TOptional<alepha252.TObject<{
|
|
626
|
+
at: alepha252.TString;
|
|
627
|
+
name: alepha252.TString;
|
|
628
|
+
message: alepha252.TString;
|
|
217
629
|
}>>;
|
|
218
630
|
}>>;
|
|
219
631
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
220
632
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
221
|
-
readonly notificationBatch: alepha_batch0.BatchPrimitive<
|
|
222
|
-
type:
|
|
223
|
-
template:
|
|
224
|
-
contact:
|
|
225
|
-
variables:
|
|
633
|
+
readonly notificationBatch: alepha_batch0.BatchPrimitive<alepha252.TObject<{
|
|
634
|
+
type: alepha252.TUnsafe<"email" | "sms">;
|
|
635
|
+
template: alepha252.TString;
|
|
636
|
+
contact: alepha252.TString;
|
|
637
|
+
variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
|
|
226
638
|
}>, Promise<void>>;
|
|
227
|
-
findNotificationById(id: string): Promise<
|
|
228
|
-
id:
|
|
229
|
-
version:
|
|
230
|
-
createdAt:
|
|
231
|
-
updatedAt:
|
|
232
|
-
type:
|
|
233
|
-
template:
|
|
234
|
-
category:
|
|
235
|
-
critical:
|
|
236
|
-
sensitive:
|
|
237
|
-
contact:
|
|
238
|
-
variables:
|
|
239
|
-
scheduledAt:
|
|
240
|
-
sentAt:
|
|
241
|
-
error:
|
|
242
|
-
at:
|
|
243
|
-
name:
|
|
244
|
-
message:
|
|
639
|
+
findNotificationById(id: string): Promise<alepha_orm50.PgStatic<alepha252.TObject<{
|
|
640
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
641
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
642
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
643
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
644
|
+
type: alepha252.TUnsafe<"email" | "sms">;
|
|
645
|
+
template: alepha252.TString;
|
|
646
|
+
category: alepha252.TOptional<alepha252.TString>;
|
|
647
|
+
critical: alepha252.TOptional<alepha252.TBoolean>;
|
|
648
|
+
sensitive: alepha252.TOptional<alepha252.TBoolean>;
|
|
649
|
+
contact: alepha252.TString;
|
|
650
|
+
variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
|
|
651
|
+
scheduledAt: alepha252.TOptional<alepha252.TString>;
|
|
652
|
+
sentAt: alepha252.TOptional<alepha252.TString>;
|
|
653
|
+
error: alepha252.TOptional<alepha252.TObject<{
|
|
654
|
+
at: alepha252.TString;
|
|
655
|
+
name: alepha252.TString;
|
|
656
|
+
message: alepha252.TString;
|
|
245
657
|
}>>;
|
|
246
|
-
}>,
|
|
247
|
-
id:
|
|
248
|
-
version:
|
|
249
|
-
createdAt:
|
|
250
|
-
updatedAt:
|
|
251
|
-
type:
|
|
252
|
-
template:
|
|
253
|
-
category:
|
|
254
|
-
critical:
|
|
255
|
-
sensitive:
|
|
256
|
-
contact:
|
|
257
|
-
variables:
|
|
258
|
-
scheduledAt:
|
|
259
|
-
sentAt:
|
|
260
|
-
error:
|
|
261
|
-
at:
|
|
262
|
-
name:
|
|
263
|
-
message:
|
|
658
|
+
}>, alepha_orm50.PgRelationMap<alepha252.TObject<{
|
|
659
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
660
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
661
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
662
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
663
|
+
type: alepha252.TUnsafe<"email" | "sms">;
|
|
664
|
+
template: alepha252.TString;
|
|
665
|
+
category: alepha252.TOptional<alepha252.TString>;
|
|
666
|
+
critical: alepha252.TOptional<alepha252.TBoolean>;
|
|
667
|
+
sensitive: alepha252.TOptional<alepha252.TBoolean>;
|
|
668
|
+
contact: alepha252.TString;
|
|
669
|
+
variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
|
|
670
|
+
scheduledAt: alepha252.TOptional<alepha252.TString>;
|
|
671
|
+
sentAt: alepha252.TOptional<alepha252.TString>;
|
|
672
|
+
error: alepha252.TOptional<alepha252.TObject<{
|
|
673
|
+
at: alepha252.TString;
|
|
674
|
+
name: alepha252.TString;
|
|
675
|
+
message: alepha252.TString;
|
|
264
676
|
}>>;
|
|
265
677
|
}>>>>;
|
|
266
678
|
findNotifications(q?: NotificationQuery): Promise<Page<NotificationEntity>>;
|
|
@@ -270,43 +682,43 @@ declare class NotificationService {
|
|
|
270
682
|
createNotification(entry: NotificationCreate): Promise<void>;
|
|
271
683
|
}
|
|
272
684
|
//#endregion
|
|
273
|
-
//#region ../../src/api/notifications/controllers/
|
|
274
|
-
declare class
|
|
685
|
+
//#region ../../src/api/notifications/controllers/AdminNotificationController.d.ts
|
|
686
|
+
declare class AdminNotificationController {
|
|
275
687
|
protected readonly url = "/notifications";
|
|
276
|
-
protected readonly group = "notifications";
|
|
688
|
+
protected readonly group = "admin:notifications";
|
|
277
689
|
protected readonly notificationService: NotificationService;
|
|
278
690
|
/**
|
|
279
691
|
* Find notifications with pagination and filtering.
|
|
280
692
|
*/
|
|
281
693
|
readonly findNotifications: alepha_server0.ActionPrimitiveFn<{
|
|
282
|
-
query:
|
|
283
|
-
page:
|
|
284
|
-
size:
|
|
285
|
-
sort:
|
|
286
|
-
type:
|
|
287
|
-
template:
|
|
288
|
-
contact:
|
|
289
|
-
category:
|
|
290
|
-
status:
|
|
694
|
+
query: alepha252.TObject<{
|
|
695
|
+
page: alepha252.TOptional<alepha252.TInteger>;
|
|
696
|
+
size: alepha252.TOptional<alepha252.TInteger>;
|
|
697
|
+
sort: alepha252.TOptional<alepha252.TString>;
|
|
698
|
+
type: alepha252.TOptional<alepha252.TUnsafe<"email" | "sms">>;
|
|
699
|
+
template: alepha252.TOptional<alepha252.TString>;
|
|
700
|
+
contact: alepha252.TOptional<alepha252.TString>;
|
|
701
|
+
category: alepha252.TOptional<alepha252.TString>;
|
|
702
|
+
status: alepha252.TOptional<alepha252.TUnsafe<"pending" | "sent" | "failed">>;
|
|
291
703
|
}>;
|
|
292
|
-
response:
|
|
293
|
-
id:
|
|
294
|
-
version:
|
|
295
|
-
createdAt:
|
|
296
|
-
updatedAt:
|
|
297
|
-
type:
|
|
298
|
-
template:
|
|
299
|
-
category:
|
|
300
|
-
critical:
|
|
301
|
-
sensitive:
|
|
302
|
-
contact:
|
|
303
|
-
variables:
|
|
304
|
-
scheduledAt:
|
|
305
|
-
sentAt:
|
|
306
|
-
error:
|
|
307
|
-
at:
|
|
308
|
-
name:
|
|
309
|
-
message:
|
|
704
|
+
response: alepha252.TPage<alepha252.TObject<{
|
|
705
|
+
id: PgAttr<PgAttr<alepha252.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
706
|
+
version: PgAttr<PgAttr<alepha252.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
707
|
+
createdAt: PgAttr<PgAttr<alepha252.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
708
|
+
updatedAt: PgAttr<PgAttr<alepha252.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
709
|
+
type: alepha252.TUnsafe<"email" | "sms">;
|
|
710
|
+
template: alepha252.TString;
|
|
711
|
+
category: alepha252.TOptional<alepha252.TString>;
|
|
712
|
+
critical: alepha252.TOptional<alepha252.TBoolean>;
|
|
713
|
+
sensitive: alepha252.TOptional<alepha252.TBoolean>;
|
|
714
|
+
contact: alepha252.TString;
|
|
715
|
+
variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
|
|
716
|
+
scheduledAt: alepha252.TOptional<alepha252.TString>;
|
|
717
|
+
sentAt: alepha252.TOptional<alepha252.TString>;
|
|
718
|
+
error: alepha252.TOptional<alepha252.TObject<{
|
|
719
|
+
at: alepha252.TString;
|
|
720
|
+
name: alepha252.TString;
|
|
721
|
+
message: alepha252.TString;
|
|
310
722
|
}>>;
|
|
311
723
|
}>>;
|
|
312
724
|
}>;
|
|
@@ -318,15 +730,15 @@ declare class NotificationJobs {}
|
|
|
318
730
|
//#region ../../src/api/notifications/queues/NotificationQueues.d.ts
|
|
319
731
|
declare class NotificationQueues {
|
|
320
732
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
321
|
-
readonly processNotification: alepha_queue0.QueuePrimitive<
|
|
322
|
-
notificationId:
|
|
733
|
+
readonly processNotification: alepha_queue0.QueuePrimitive<alepha252.TObject<{
|
|
734
|
+
notificationId: alepha252.TString;
|
|
323
735
|
}>>;
|
|
324
736
|
}
|
|
325
737
|
//#endregion
|
|
326
738
|
//#region ../../src/api/notifications/schemas/notificationContactPreferencesSchema.d.ts
|
|
327
|
-
declare const notificationContactPreferencesSchema:
|
|
328
|
-
language:
|
|
329
|
-
exclude:
|
|
739
|
+
declare const notificationContactPreferencesSchema: alepha252.TObject<{
|
|
740
|
+
language: alepha252.TOptional<alepha252.TString>;
|
|
741
|
+
exclude: alepha252.TArray<alepha252.TString>;
|
|
330
742
|
}>;
|
|
331
743
|
type NotificationContactPreferences = Static<typeof notificationContactPreferencesSchema>;
|
|
332
744
|
//#endregion
|
|
@@ -341,7 +753,7 @@ type NotificationContactPreferences = Static<typeof notificationContactPreferenc
|
|
|
341
753
|
*
|
|
342
754
|
* @module alepha.api.notifications
|
|
343
755
|
*/
|
|
344
|
-
declare const AlephaApiNotifications:
|
|
756
|
+
declare const AlephaApiNotifications: alepha252.Service<alepha252.Module>;
|
|
345
757
|
//#endregion
|
|
346
|
-
export { $notification, AlephaApiNotifications, NotificationContactPreferences,
|
|
758
|
+
export { $notification, AdminNotificationController, AlephaApiNotifications, NotificationContactPreferences, NotificationCreate, NotificationEntity, NotificationJobs, NotificationMessage, NotificationPrimitive, NotificationPrimitiveOptions, NotificationPushOptions, NotificationQuery, NotificationQueues, NotificationSenderService, NotificationService, notificationContactPreferencesSchema, notificationCreateSchema, notificationQuerySchema, notificationServiceEnvSchema, notifications };
|
|
347
759
|
//# sourceMappingURL=index.d.ts.map
|