alepha 0.14.2 → 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/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 +1137 -1123
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +827 -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 +13 -13
- 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/bin/index.d.ts +1 -2
- package/dist/bin/index.js +0 -1
- package/dist/bin/index.js.map +1 -1
- package/dist/cli/index.d.ts +137 -112
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +371 -259
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +45 -5
- 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 +14 -18
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +14 -18
- package/dist/core/index.native.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/mcp/index.d.ts.map +1 -1
- package/dist/orm/index.d.ts +32 -32
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +12 -12
- package/dist/orm/index.js.map +1 -1
- package/dist/security/index.d.ts +1 -1
- 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/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/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/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/security/index.d.ts +9 -9
- 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/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.d.ts +7 -7
- 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 +9 -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 +25 -4
- package/src/cli/commands/dev.ts +19 -7
- package/src/cli/commands/gen/changelog.spec.ts +315 -0
- package/src/cli/commands/{changelog.ts → gen/changelog.ts} +9 -9
- package/src/cli/commands/gen/openapi.ts +71 -0
- package/src/cli/commands/gen.ts +18 -0
- package/src/cli/commands/init.ts +2 -0
- package/src/cli/commands/root.ts +12 -3
- package/src/cli/commands/typecheck.ts +5 -0
- package/src/cli/index.ts +2 -1
- 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 +45 -0
- 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/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/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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alepha579 from "alepha";
|
|
2
2
|
import { Alepha, KIND, Primitive, Static, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
|
|
3
|
-
import * as alepha_orm71 from "alepha/orm";
|
|
4
|
-
import { Page } from "alepha/orm";
|
|
5
3
|
import * as alepha_server0 from "alepha/server";
|
|
6
4
|
import { ServerRequest } from "alepha/server";
|
|
5
|
+
import * as alepha_orm0 from "alepha/orm";
|
|
6
|
+
import { Page } from "alepha/orm";
|
|
7
7
|
import * as alepha_logger0 from "alepha/logger";
|
|
8
8
|
import "bun";
|
|
9
9
|
import "bun:sqlite";
|
|
@@ -19,227 +19,627 @@ import "drizzle-orm/sqlite-core";
|
|
|
19
19
|
import "drizzle-orm/postgres-js";
|
|
20
20
|
import "postgres";
|
|
21
21
|
|
|
22
|
-
//#region ../../src/
|
|
22
|
+
//#region ../../src/orm/schemas/insertSchema.d.ts
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Transforms a TObject schema for insert operations.
|
|
25
|
+
* All default properties at the root level are made optional.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* Before: { name: string; age: number(default=0); }
|
|
29
|
+
* After: { name: string; age?: number; }
|
|
25
30
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]]: T["properties"][K] extends {
|
|
32
|
+
[PG_DEFAULT]: any;
|
|
33
|
+
} | {
|
|
34
|
+
"~optional": true;
|
|
35
|
+
} ? TOptional<T["properties"][K]> : T["properties"][K] }>;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region ../../src/orm/schemas/updateSchema.d.ts
|
|
28
38
|
/**
|
|
29
|
-
*
|
|
39
|
+
* Transforms a TObject schema for update operations.
|
|
40
|
+
* All optional properties at the root level are made nullable (i.e., `T | null`).
|
|
41
|
+
* This allows an API endpoint to explicitly accept `null` to clear an optional field in the database.
|
|
30
42
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* - When it happened (createdAt)
|
|
35
|
-
* - Context and details (metadata, ipAddress, userAgent)
|
|
43
|
+
* @example
|
|
44
|
+
* Before: { name?: string; age: number; }
|
|
45
|
+
* After: { name?: string | null; age: number; }
|
|
36
46
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
42
|
-
* Used for categorizing and filtering audit events.
|
|
43
|
-
*/
|
|
44
|
-
type: alepha349.TString;
|
|
45
|
-
/**
|
|
46
|
-
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
47
|
-
*/
|
|
48
|
-
action: alepha349.TString;
|
|
49
|
-
/**
|
|
50
|
-
* Severity level of the event.
|
|
51
|
-
*/
|
|
52
|
-
severity: alepha_orm71.PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm71.PG_DEFAULT>;
|
|
53
|
-
/**
|
|
54
|
-
* User ID who performed the action (null for system events).
|
|
55
|
-
*/
|
|
56
|
-
userId: alepha349.TOptional<alepha349.TString>;
|
|
57
|
-
/**
|
|
58
|
-
* User realm for multi-tenant support.
|
|
59
|
-
*/
|
|
60
|
-
userRealm: alepha349.TOptional<alepha349.TString>;
|
|
61
|
-
/**
|
|
62
|
-
* User email at the time of the event (denormalized for history).
|
|
63
|
-
*/
|
|
64
|
-
userEmail: alepha349.TOptional<alepha349.TString>;
|
|
65
|
-
/**
|
|
66
|
-
* Resource type affected (e.g., "user", "order", "file").
|
|
67
|
-
*/
|
|
68
|
-
resourceType: alepha349.TOptional<alepha349.TString>;
|
|
69
|
-
/**
|
|
70
|
-
* Resource ID affected.
|
|
71
|
-
*/
|
|
72
|
-
resourceId: alepha349.TOptional<alepha349.TString>;
|
|
47
|
+
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] }>;
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region ../../src/orm/primitives/$entity.d.ts
|
|
50
|
+
interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
|
|
73
51
|
/**
|
|
74
|
-
*
|
|
52
|
+
* The database table name that will be created for this entity.
|
|
53
|
+
* If not provided, name will be inferred from the $repository variable name.
|
|
75
54
|
*/
|
|
76
|
-
|
|
55
|
+
name: string;
|
|
77
56
|
/**
|
|
78
|
-
*
|
|
57
|
+
* TypeBox schema defining the table structure and column types.
|
|
79
58
|
*/
|
|
80
|
-
|
|
59
|
+
schema: T;
|
|
81
60
|
/**
|
|
82
|
-
*
|
|
61
|
+
* Database indexes to create for query optimization.
|
|
83
62
|
*/
|
|
84
|
-
|
|
63
|
+
indexes?: (Keys | {
|
|
64
|
+
/**
|
|
65
|
+
* Single column to index.
|
|
66
|
+
*/
|
|
67
|
+
column: Keys;
|
|
68
|
+
/**
|
|
69
|
+
* Whether this should be a unique index (enforces uniqueness constraint).
|
|
70
|
+
*/
|
|
71
|
+
unique?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Custom name for the index. If not provided, generates name automatically.
|
|
74
|
+
*/
|
|
75
|
+
name?: string;
|
|
76
|
+
} | {
|
|
77
|
+
/**
|
|
78
|
+
* Multiple columns for composite index (order matters for query optimization).
|
|
79
|
+
*/
|
|
80
|
+
columns: Keys[];
|
|
81
|
+
/**
|
|
82
|
+
* Whether this should be a unique index (enforces uniqueness constraint).
|
|
83
|
+
*/
|
|
84
|
+
unique?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Custom name for the index. If not provided, generates name automatically.
|
|
87
|
+
*/
|
|
88
|
+
name?: string;
|
|
89
|
+
})[];
|
|
85
90
|
/**
|
|
86
|
-
*
|
|
91
|
+
* Foreign key constraints to maintain referential integrity.
|
|
87
92
|
*/
|
|
88
|
-
|
|
93
|
+
foreignKeys?: Array<{
|
|
94
|
+
/**
|
|
95
|
+
* Optional name for the foreign key constraint.
|
|
96
|
+
*/
|
|
97
|
+
name?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Local columns that reference the foreign table.
|
|
100
|
+
*/
|
|
101
|
+
columns: Array<keyof Static<T>>;
|
|
102
|
+
/**
|
|
103
|
+
* Referenced columns in the foreign table.
|
|
104
|
+
* Must be EntityColumn references from other entities.
|
|
105
|
+
*/
|
|
106
|
+
foreignColumns: Array<() => EntityColumn<any>>;
|
|
107
|
+
}>;
|
|
89
108
|
/**
|
|
90
|
-
*
|
|
109
|
+
* Additional table constraints for data validation.
|
|
110
|
+
*
|
|
111
|
+
* Constraints enforce business rules at the database level, providing
|
|
112
|
+
* an additional layer of data integrity beyond application validation.
|
|
113
|
+
*
|
|
114
|
+
* **Constraint Types**:
|
|
115
|
+
* - **Unique constraints**: Prevent duplicate values across columns
|
|
116
|
+
* - **Check constraints**: Enforce custom validation rules with SQL expressions
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* constraints: [
|
|
121
|
+
* {
|
|
122
|
+
* name: "unique_user_email",
|
|
123
|
+
* columns: ["email"],
|
|
124
|
+
* unique: true
|
|
125
|
+
* },
|
|
126
|
+
* {
|
|
127
|
+
* name: "valid_age_range",
|
|
128
|
+
* columns: ["age"],
|
|
129
|
+
* check: sql`age >= 0 AND age <= 150`
|
|
130
|
+
* },
|
|
131
|
+
* {
|
|
132
|
+
* name: "unique_user_username_per_tenant",
|
|
133
|
+
* columns: ["tenantId", "username"],
|
|
134
|
+
* unique: true
|
|
135
|
+
* }
|
|
136
|
+
* ]
|
|
137
|
+
* ```
|
|
91
138
|
*/
|
|
92
|
-
|
|
139
|
+
constraints?: Array<{
|
|
140
|
+
/**
|
|
141
|
+
* Columns involved in this constraint.
|
|
142
|
+
*/
|
|
143
|
+
columns: Array<keyof Static<T>>;
|
|
144
|
+
/**
|
|
145
|
+
* Optional name for the constraint.
|
|
146
|
+
*/
|
|
147
|
+
name?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Whether this is a unique constraint.
|
|
150
|
+
*/
|
|
151
|
+
unique?: boolean | {};
|
|
152
|
+
/**
|
|
153
|
+
* SQL expression for check constraint validation.
|
|
154
|
+
*/
|
|
155
|
+
check?: SQL;
|
|
156
|
+
}>;
|
|
93
157
|
/**
|
|
94
|
-
*
|
|
158
|
+
* Advanced Drizzle ORM configuration for complex table setups.
|
|
95
159
|
*/
|
|
96
|
-
|
|
160
|
+
config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
|
|
161
|
+
}
|
|
162
|
+
declare class EntityPrimitive<T extends TObject = TObject> {
|
|
163
|
+
readonly options: EntityPrimitiveOptions<T>;
|
|
164
|
+
constructor(options: EntityPrimitiveOptions<T>);
|
|
165
|
+
alias(alias: string): this;
|
|
166
|
+
get cols(): EntityColumns<T>;
|
|
167
|
+
get name(): string;
|
|
168
|
+
get schema(): T;
|
|
169
|
+
get insertSchema(): TObjectInsert<T>;
|
|
170
|
+
get updateSchema(): TObjectUpdate<T>;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Convert a schema to columns.
|
|
174
|
+
*/
|
|
175
|
+
type FromSchema<T extends TObject> = { [key in keyof T["properties"]]: PgColumnBuilderBase };
|
|
176
|
+
type EntityColumn<T extends TObject> = {
|
|
177
|
+
name: string;
|
|
178
|
+
entity: EntityPrimitive<T>;
|
|
179
|
+
};
|
|
180
|
+
type EntityColumns<T extends TObject> = { [key in keyof T["properties"]]: EntityColumn<T> };
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region ../../src/orm/constants/PG_SYMBOLS.d.ts
|
|
183
|
+
declare const PG_DEFAULT: unique symbol;
|
|
184
|
+
declare const PG_PRIMARY_KEY: unique symbol;
|
|
185
|
+
declare const PG_CREATED_AT: unique symbol;
|
|
186
|
+
declare const PG_UPDATED_AT: unique symbol;
|
|
187
|
+
declare const PG_DELETED_AT: unique symbol;
|
|
188
|
+
declare const PG_VERSION: unique symbol;
|
|
189
|
+
declare const PG_IDENTITY: unique symbol;
|
|
190
|
+
declare const PG_ENUM: unique symbol;
|
|
191
|
+
declare const PG_REF: unique symbol;
|
|
192
|
+
/**
|
|
193
|
+
* @deprecated Use `PG_IDENTITY` instead.
|
|
194
|
+
*/
|
|
195
|
+
declare const PG_SERIAL: unique symbol;
|
|
196
|
+
type PgSymbols = {
|
|
197
|
+
[PG_DEFAULT]: {};
|
|
198
|
+
[PG_PRIMARY_KEY]: {};
|
|
199
|
+
[PG_CREATED_AT]: {};
|
|
200
|
+
[PG_UPDATED_AT]: {};
|
|
201
|
+
[PG_DELETED_AT]: {};
|
|
202
|
+
[PG_VERSION]: {};
|
|
203
|
+
[PG_IDENTITY]: PgIdentityOptions;
|
|
204
|
+
[PG_REF]: PgRefOptions;
|
|
205
|
+
[PG_ENUM]: PgEnumOptions;
|
|
97
206
|
/**
|
|
98
|
-
*
|
|
207
|
+
* @deprecated Use `PG_IDENTITY` instead.
|
|
99
208
|
*/
|
|
100
|
-
|
|
209
|
+
[PG_SERIAL]: {};
|
|
210
|
+
};
|
|
211
|
+
type PgSymbolKeys = keyof PgSymbols;
|
|
212
|
+
type PgIdentityOptions = {
|
|
213
|
+
mode: "always" | "byDefault";
|
|
214
|
+
} & PgSequenceOptions & {
|
|
215
|
+
name?: string;
|
|
216
|
+
};
|
|
217
|
+
interface PgEnumOptions {
|
|
218
|
+
name?: string;
|
|
219
|
+
description?: string;
|
|
220
|
+
}
|
|
221
|
+
interface PgRefOptions {
|
|
222
|
+
ref: () => {
|
|
223
|
+
name: string;
|
|
224
|
+
entity: EntityPrimitive;
|
|
225
|
+
};
|
|
226
|
+
actions?: {
|
|
227
|
+
onUpdate?: UpdateDeleteAction;
|
|
228
|
+
onDelete?: UpdateDeleteAction;
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
//#endregion
|
|
232
|
+
//#region ../../src/orm/helpers/pgAttr.d.ts
|
|
233
|
+
/**
|
|
234
|
+
* Type representation.
|
|
235
|
+
*/
|
|
236
|
+
type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region ../../src/orm/providers/drivers/BunPostgresProvider.d.ts
|
|
239
|
+
declare module "alepha" {
|
|
240
|
+
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
241
|
+
}
|
|
242
|
+
declare const envSchema$1: alepha579.TObject<{
|
|
101
243
|
/**
|
|
102
|
-
*
|
|
244
|
+
* Main configuration for database connection.
|
|
245
|
+
* Accept a string in the format of a Postgres connection URL.
|
|
246
|
+
* Example: postgres://user:password@localhost:5432/database
|
|
247
|
+
* or
|
|
248
|
+
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
103
249
|
*/
|
|
104
|
-
|
|
105
|
-
}>>;
|
|
106
|
-
declare const auditEntitySchema: alepha349.TObject<{
|
|
107
|
-
id: alepha_orm71.PgAttr<alepha_orm71.PgAttr<alepha349.TString, typeof alepha_orm71.PG_PRIMARY_KEY>, typeof alepha_orm71.PG_DEFAULT>;
|
|
108
|
-
createdAt: alepha_orm71.PgAttr<alepha_orm71.PgAttr<alepha349.TString, typeof alepha_orm71.PG_CREATED_AT>, typeof alepha_orm71.PG_DEFAULT>;
|
|
250
|
+
DATABASE_URL: alepha579.TOptional<alepha579.TString>;
|
|
109
251
|
/**
|
|
110
|
-
*
|
|
111
|
-
* Used for categorizing and filtering audit events.
|
|
252
|
+
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
112
253
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
254
|
+
POSTGRES_SCHEMA: alepha579.TOptional<alepha579.TString>;
|
|
255
|
+
}>;
|
|
256
|
+
/**
|
|
257
|
+
* Bun PostgreSQL provider using Drizzle ORM with Bun's native SQL client.
|
|
258
|
+
*
|
|
259
|
+
* This provider uses Bun's built-in SQL class for PostgreSQL connections,
|
|
260
|
+
* which provides excellent performance on the Bun runtime.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* ```ts
|
|
264
|
+
* // Set DATABASE_URL environment variable
|
|
265
|
+
* // DATABASE_URL=postgres://user:password@localhost:5432/database
|
|
266
|
+
*
|
|
267
|
+
* // Or configure programmatically
|
|
268
|
+
* alepha.with({
|
|
269
|
+
* provide: DatabaseProvider,
|
|
270
|
+
* use: BunPostgresProvider,
|
|
271
|
+
* });
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
//#endregion
|
|
275
|
+
//#region ../../src/orm/providers/drivers/BunSqliteProvider.d.ts
|
|
276
|
+
/**
|
|
277
|
+
* Configuration options for the Bun SQLite database provider.
|
|
278
|
+
*/
|
|
279
|
+
declare const bunSqliteOptions: alepha579.Atom<alepha579.TObject<{
|
|
280
|
+
path: alepha579.TOptional<alepha579.TString>;
|
|
281
|
+
}>, "alepha.postgres.bun-sqlite.options">;
|
|
282
|
+
type BunSqliteProviderOptions = Static<typeof bunSqliteOptions.schema>;
|
|
283
|
+
declare module "alepha" {
|
|
284
|
+
interface State {
|
|
285
|
+
[bunSqliteOptions.key]: BunSqliteProviderOptions;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Bun SQLite provider using Drizzle ORM with Bun's native SQLite client.
|
|
290
|
+
*
|
|
291
|
+
* This provider uses Bun's built-in `bun:sqlite` for SQLite connections,
|
|
292
|
+
* which provides excellent performance on the Bun runtime.
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* ```ts
|
|
296
|
+
* // Set DATABASE_URL environment variable
|
|
297
|
+
* // DATABASE_URL=sqlite://./my-database.db
|
|
298
|
+
*
|
|
299
|
+
* // Or configure programmatically
|
|
300
|
+
* alepha.with({
|
|
301
|
+
* provide: DatabaseProvider,
|
|
302
|
+
* use: BunSqliteProvider,
|
|
303
|
+
* });
|
|
304
|
+
*
|
|
305
|
+
* // Or use options atom
|
|
306
|
+
* alepha.store.mut(bunSqliteOptions, (old) => ({
|
|
307
|
+
* ...old,
|
|
308
|
+
* path: ":memory:",
|
|
309
|
+
* }));
|
|
310
|
+
* ```
|
|
311
|
+
*/
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
|
|
314
|
+
declare module "alepha" {
|
|
315
|
+
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
316
|
+
}
|
|
317
|
+
declare const envSchema: alepha579.TObject<{
|
|
318
|
+
/**
|
|
319
|
+
* Main configuration for database connection.
|
|
320
|
+
* Accept a string in the format of a Postgres connection URL.
|
|
321
|
+
* Example: postgres://user:password@localhost:5432/database
|
|
322
|
+
* or
|
|
323
|
+
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
324
|
+
*/
|
|
325
|
+
DATABASE_URL: alepha579.TOptional<alepha579.TString>;
|
|
326
|
+
/**
|
|
327
|
+
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
328
|
+
*
|
|
329
|
+
* It will monkey patch drizzle tables.
|
|
330
|
+
*/
|
|
331
|
+
POSTGRES_SCHEMA: alepha579.TOptional<alepha579.TString>;
|
|
332
|
+
}>;
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
|
|
335
|
+
/**
|
|
336
|
+
* Configuration options for the Node.js SQLite database provider.
|
|
337
|
+
*/
|
|
338
|
+
declare const nodeSqliteOptions: alepha579.Atom<alepha579.TObject<{
|
|
339
|
+
path: alepha579.TOptional<alepha579.TString>;
|
|
340
|
+
}>, "alepha.postgres.node-sqlite.options">;
|
|
341
|
+
type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
|
|
342
|
+
declare module "alepha" {
|
|
343
|
+
interface State {
|
|
344
|
+
[nodeSqliteOptions.key]: NodeSqliteProviderOptions;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Add a fake support for SQLite in Node.js based on Postgres interfaces.
|
|
349
|
+
*
|
|
350
|
+
* This is NOT a real SQLite provider, it's a workaround to use SQLite with Drizzle ORM.
|
|
351
|
+
* This is NOT recommended for production use.
|
|
352
|
+
*/
|
|
353
|
+
//#endregion
|
|
354
|
+
//#region ../../src/orm/index.d.ts
|
|
355
|
+
declare module "alepha" {
|
|
356
|
+
interface Hooks {
|
|
357
|
+
/**
|
|
358
|
+
* Fires before creating an entity in the repository.
|
|
359
|
+
*/
|
|
360
|
+
"repository:create:before": {
|
|
361
|
+
tableName: string;
|
|
362
|
+
data: any;
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* Fires after creating an entity in the repository.
|
|
366
|
+
*/
|
|
367
|
+
"repository:create:after": {
|
|
368
|
+
tableName: string;
|
|
369
|
+
data: any;
|
|
370
|
+
entity: any;
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* Fires before updating entities in the repository.
|
|
374
|
+
*/
|
|
375
|
+
"repository:update:before": {
|
|
376
|
+
tableName: string;
|
|
377
|
+
where: any;
|
|
378
|
+
data: any;
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* Fires after updating entities in the repository.
|
|
382
|
+
*/
|
|
383
|
+
"repository:update:after": {
|
|
384
|
+
tableName: string;
|
|
385
|
+
where: any;
|
|
386
|
+
data: any;
|
|
387
|
+
entities: any[];
|
|
388
|
+
};
|
|
389
|
+
/**
|
|
390
|
+
* Fires before deleting entities from the repository.
|
|
391
|
+
*/
|
|
392
|
+
"repository:delete:before": {
|
|
393
|
+
tableName: string;
|
|
394
|
+
where: any;
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* Fires after deleting entities from the repository.
|
|
398
|
+
*/
|
|
399
|
+
"repository:delete:after": {
|
|
400
|
+
tableName: string;
|
|
401
|
+
where: any;
|
|
402
|
+
ids: Array<string | number>;
|
|
403
|
+
};
|
|
404
|
+
/**
|
|
405
|
+
* Fires before reading entities from the repository.
|
|
406
|
+
*/
|
|
407
|
+
"repository:read:before": {
|
|
408
|
+
tableName: string;
|
|
409
|
+
query: any;
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* Fires after reading entities from the repository.
|
|
413
|
+
*/
|
|
414
|
+
"repository:read:after": {
|
|
415
|
+
tableName: string;
|
|
416
|
+
query: any;
|
|
417
|
+
entities: any[];
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
//#endregion
|
|
422
|
+
//#region ../../src/api/audits/entities/audits.d.ts
|
|
423
|
+
/**
|
|
424
|
+
* Audit severity levels for categorizing events.
|
|
425
|
+
*/
|
|
426
|
+
declare const auditSeveritySchema: alepha579.TUnsafe<"info" | "warning" | "critical">;
|
|
427
|
+
type AuditSeverity = Static<typeof auditSeveritySchema>;
|
|
428
|
+
/**
|
|
429
|
+
* Audit log entity for tracking important system events.
|
|
430
|
+
*
|
|
431
|
+
* Stores comprehensive audit information including:
|
|
432
|
+
* - Who performed the action (userId, userRealm)
|
|
433
|
+
* - What happened (type, action, resource)
|
|
434
|
+
* - When it happened (createdAt)
|
|
435
|
+
* - Context and details (metadata, ipAddress, userAgent)
|
|
436
|
+
*/
|
|
437
|
+
declare const audits: alepha_orm0.EntityPrimitive<alepha579.TObject<{
|
|
438
|
+
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
439
|
+
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
440
|
+
/**
|
|
441
|
+
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
442
|
+
* Used for categorizing and filtering audit events.
|
|
443
|
+
*/
|
|
444
|
+
type: alepha579.TString;
|
|
445
|
+
/**
|
|
446
|
+
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
447
|
+
*/
|
|
448
|
+
action: alepha579.TString;
|
|
449
|
+
/**
|
|
450
|
+
* Severity level of the event.
|
|
451
|
+
*/
|
|
452
|
+
severity: alepha_orm0.PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
|
|
453
|
+
/**
|
|
454
|
+
* User ID who performed the action (null for system events).
|
|
455
|
+
*/
|
|
456
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
457
|
+
/**
|
|
458
|
+
* User realm for multi-tenant support.
|
|
459
|
+
*/
|
|
460
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
461
|
+
/**
|
|
462
|
+
* User email at the time of the event (denormalized for history).
|
|
116
463
|
*/
|
|
117
|
-
|
|
464
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
465
|
+
/**
|
|
466
|
+
* Resource type affected (e.g., "user", "order", "file").
|
|
467
|
+
*/
|
|
468
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
469
|
+
/**
|
|
470
|
+
* Resource ID affected.
|
|
471
|
+
*/
|
|
472
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
473
|
+
/**
|
|
474
|
+
* Human-readable description of the event.
|
|
475
|
+
*/
|
|
476
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
477
|
+
/**
|
|
478
|
+
* Additional metadata/context as JSON.
|
|
479
|
+
*/
|
|
480
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
481
|
+
/**
|
|
482
|
+
* Client IP address.
|
|
483
|
+
*/
|
|
484
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
485
|
+
/**
|
|
486
|
+
* Client user agent.
|
|
487
|
+
*/
|
|
488
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
489
|
+
/**
|
|
490
|
+
* Session ID if applicable.
|
|
491
|
+
*/
|
|
492
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
493
|
+
/**
|
|
494
|
+
* Request ID for correlation.
|
|
495
|
+
*/
|
|
496
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
497
|
+
/**
|
|
498
|
+
* Whether the action was successful.
|
|
499
|
+
*/
|
|
500
|
+
success: alepha_orm0.PgAttr<alepha579.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
|
|
501
|
+
/**
|
|
502
|
+
* Error message if the action failed.
|
|
503
|
+
*/
|
|
504
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
505
|
+
}>>;
|
|
506
|
+
declare const auditEntitySchema: alepha579.TObject<{
|
|
507
|
+
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
508
|
+
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
509
|
+
/**
|
|
510
|
+
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
511
|
+
* Used for categorizing and filtering audit events.
|
|
512
|
+
*/
|
|
513
|
+
type: alepha579.TString;
|
|
514
|
+
/**
|
|
515
|
+
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
516
|
+
*/
|
|
517
|
+
action: alepha579.TString;
|
|
118
518
|
/**
|
|
119
519
|
* Severity level of the event.
|
|
120
520
|
*/
|
|
121
|
-
severity:
|
|
521
|
+
severity: alepha_orm0.PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
|
|
122
522
|
/**
|
|
123
523
|
* User ID who performed the action (null for system events).
|
|
124
524
|
*/
|
|
125
|
-
userId:
|
|
525
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
126
526
|
/**
|
|
127
527
|
* User realm for multi-tenant support.
|
|
128
528
|
*/
|
|
129
|
-
userRealm:
|
|
529
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
130
530
|
/**
|
|
131
531
|
* User email at the time of the event (denormalized for history).
|
|
132
532
|
*/
|
|
133
|
-
userEmail:
|
|
533
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
134
534
|
/**
|
|
135
535
|
* Resource type affected (e.g., "user", "order", "file").
|
|
136
536
|
*/
|
|
137
|
-
resourceType:
|
|
537
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
138
538
|
/**
|
|
139
539
|
* Resource ID affected.
|
|
140
540
|
*/
|
|
141
|
-
resourceId:
|
|
541
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
142
542
|
/**
|
|
143
543
|
* Human-readable description of the event.
|
|
144
544
|
*/
|
|
145
|
-
description:
|
|
545
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
146
546
|
/**
|
|
147
547
|
* Additional metadata/context as JSON.
|
|
148
548
|
*/
|
|
149
|
-
metadata:
|
|
549
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
150
550
|
/**
|
|
151
551
|
* Client IP address.
|
|
152
552
|
*/
|
|
153
|
-
ipAddress:
|
|
553
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
154
554
|
/**
|
|
155
555
|
* Client user agent.
|
|
156
556
|
*/
|
|
157
|
-
userAgent:
|
|
557
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
158
558
|
/**
|
|
159
559
|
* Session ID if applicable.
|
|
160
560
|
*/
|
|
161
|
-
sessionId:
|
|
561
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
162
562
|
/**
|
|
163
563
|
* Request ID for correlation.
|
|
164
564
|
*/
|
|
165
|
-
requestId:
|
|
565
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
166
566
|
/**
|
|
167
567
|
* Whether the action was successful.
|
|
168
568
|
*/
|
|
169
|
-
success:
|
|
569
|
+
success: alepha_orm0.PgAttr<alepha579.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
|
|
170
570
|
/**
|
|
171
571
|
* Error message if the action failed.
|
|
172
572
|
*/
|
|
173
|
-
errorMessage:
|
|
573
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
174
574
|
}>;
|
|
175
|
-
declare const auditEntityInsertSchema:
|
|
176
|
-
id:
|
|
177
|
-
createdAt:
|
|
575
|
+
declare const auditEntityInsertSchema: alepha_orm0.TObjectInsert<alepha579.TObject<{
|
|
576
|
+
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
577
|
+
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
178
578
|
/**
|
|
179
579
|
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
180
580
|
* Used for categorizing and filtering audit events.
|
|
181
581
|
*/
|
|
182
|
-
type:
|
|
582
|
+
type: alepha579.TString;
|
|
183
583
|
/**
|
|
184
584
|
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
185
585
|
*/
|
|
186
|
-
action:
|
|
586
|
+
action: alepha579.TString;
|
|
187
587
|
/**
|
|
188
588
|
* Severity level of the event.
|
|
189
589
|
*/
|
|
190
|
-
severity:
|
|
590
|
+
severity: alepha_orm0.PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
|
|
191
591
|
/**
|
|
192
592
|
* User ID who performed the action (null for system events).
|
|
193
593
|
*/
|
|
194
|
-
userId:
|
|
594
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
195
595
|
/**
|
|
196
596
|
* User realm for multi-tenant support.
|
|
197
597
|
*/
|
|
198
|
-
userRealm:
|
|
598
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
199
599
|
/**
|
|
200
600
|
* User email at the time of the event (denormalized for history).
|
|
201
601
|
*/
|
|
202
|
-
userEmail:
|
|
602
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
203
603
|
/**
|
|
204
604
|
* Resource type affected (e.g., "user", "order", "file").
|
|
205
605
|
*/
|
|
206
|
-
resourceType:
|
|
606
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
207
607
|
/**
|
|
208
608
|
* Resource ID affected.
|
|
209
609
|
*/
|
|
210
|
-
resourceId:
|
|
610
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
211
611
|
/**
|
|
212
612
|
* Human-readable description of the event.
|
|
213
613
|
*/
|
|
214
|
-
description:
|
|
614
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
215
615
|
/**
|
|
216
616
|
* Additional metadata/context as JSON.
|
|
217
617
|
*/
|
|
218
|
-
metadata:
|
|
618
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
219
619
|
/**
|
|
220
620
|
* Client IP address.
|
|
221
621
|
*/
|
|
222
|
-
ipAddress:
|
|
622
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
223
623
|
/**
|
|
224
624
|
* Client user agent.
|
|
225
625
|
*/
|
|
226
|
-
userAgent:
|
|
626
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
227
627
|
/**
|
|
228
628
|
* Session ID if applicable.
|
|
229
629
|
*/
|
|
230
|
-
sessionId:
|
|
630
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
231
631
|
/**
|
|
232
632
|
* Request ID for correlation.
|
|
233
633
|
*/
|
|
234
|
-
requestId:
|
|
634
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
235
635
|
/**
|
|
236
636
|
* Whether the action was successful.
|
|
237
637
|
*/
|
|
238
|
-
success:
|
|
638
|
+
success: alepha_orm0.PgAttr<alepha579.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
|
|
239
639
|
/**
|
|
240
640
|
* Error message if the action failed.
|
|
241
641
|
*/
|
|
242
|
-
errorMessage:
|
|
642
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
243
643
|
}>>;
|
|
244
644
|
type AuditEntity = Static<typeof audits.schema>;
|
|
245
645
|
//#endregion
|
|
@@ -247,21 +647,21 @@ type AuditEntity = Static<typeof audits.schema>;
|
|
|
247
647
|
/**
|
|
248
648
|
* Query schema for searching and filtering audit logs.
|
|
249
649
|
*/
|
|
250
|
-
declare const auditQuerySchema:
|
|
251
|
-
page:
|
|
252
|
-
size:
|
|
253
|
-
sort:
|
|
254
|
-
type:
|
|
255
|
-
action:
|
|
256
|
-
severity:
|
|
257
|
-
userId:
|
|
258
|
-
userRealm:
|
|
259
|
-
resourceType:
|
|
260
|
-
resourceId:
|
|
261
|
-
success:
|
|
262
|
-
from:
|
|
263
|
-
to:
|
|
264
|
-
search:
|
|
650
|
+
declare const auditQuerySchema: alepha579.TObject<{
|
|
651
|
+
page: alepha579.TOptional<alepha579.TInteger>;
|
|
652
|
+
size: alepha579.TOptional<alepha579.TInteger>;
|
|
653
|
+
sort: alepha579.TOptional<alepha579.TString>;
|
|
654
|
+
type: alepha579.TOptional<alepha579.TString>;
|
|
655
|
+
action: alepha579.TOptional<alepha579.TString>;
|
|
656
|
+
severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
|
|
657
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
658
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
659
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
660
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
661
|
+
success: alepha579.TOptional<alepha579.TBoolean>;
|
|
662
|
+
from: alepha579.TOptional<alepha579.TString>;
|
|
663
|
+
to: alepha579.TOptional<alepha579.TString>;
|
|
664
|
+
search: alepha579.TOptional<alepha579.TString>;
|
|
265
665
|
}>;
|
|
266
666
|
type AuditQuery = Static<typeof auditQuerySchema>;
|
|
267
667
|
//#endregion
|
|
@@ -269,23 +669,23 @@ type AuditQuery = Static<typeof auditQuerySchema>;
|
|
|
269
669
|
/**
|
|
270
670
|
* Schema for creating a new audit log entry.
|
|
271
671
|
*/
|
|
272
|
-
declare const createAuditSchema:
|
|
273
|
-
type:
|
|
274
|
-
action:
|
|
275
|
-
severity:
|
|
276
|
-
userId:
|
|
277
|
-
userRealm:
|
|
278
|
-
userEmail:
|
|
279
|
-
resourceType:
|
|
280
|
-
resourceId:
|
|
281
|
-
description:
|
|
282
|
-
metadata:
|
|
283
|
-
ipAddress:
|
|
284
|
-
userAgent:
|
|
285
|
-
sessionId:
|
|
286
|
-
requestId:
|
|
287
|
-
success:
|
|
288
|
-
errorMessage:
|
|
672
|
+
declare const createAuditSchema: alepha579.TObject<{
|
|
673
|
+
type: alepha579.TString;
|
|
674
|
+
action: alepha579.TString;
|
|
675
|
+
severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
|
|
676
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
677
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
678
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
679
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
680
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
681
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
682
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
683
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
684
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
685
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
686
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
687
|
+
success: alepha579.TOptional<alepha579.TBoolean>;
|
|
688
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
289
689
|
}>;
|
|
290
690
|
type CreateAudit = Static<typeof createAuditSchema>;
|
|
291
691
|
//#endregion
|
|
@@ -310,25 +710,25 @@ interface AuditTypeDefinition {
|
|
|
310
710
|
declare class AuditService {
|
|
311
711
|
protected readonly alepha: Alepha;
|
|
312
712
|
protected readonly log: alepha_logger0.Logger;
|
|
313
|
-
protected readonly repo:
|
|
314
|
-
id:
|
|
315
|
-
createdAt:
|
|
316
|
-
type:
|
|
317
|
-
action:
|
|
318
|
-
severity:
|
|
319
|
-
userId:
|
|
320
|
-
userRealm:
|
|
321
|
-
userEmail:
|
|
322
|
-
resourceType:
|
|
323
|
-
resourceId:
|
|
324
|
-
description:
|
|
325
|
-
metadata:
|
|
326
|
-
ipAddress:
|
|
327
|
-
userAgent:
|
|
328
|
-
sessionId:
|
|
329
|
-
requestId:
|
|
330
|
-
success:
|
|
331
|
-
errorMessage:
|
|
713
|
+
protected readonly repo: alepha_orm0.Repository<alepha579.TObject<{
|
|
714
|
+
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
715
|
+
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
716
|
+
type: alepha579.TString;
|
|
717
|
+
action: alepha579.TString;
|
|
718
|
+
severity: alepha_orm0.PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
|
|
719
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
720
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
721
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
722
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
723
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
724
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
725
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
726
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
727
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
728
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
729
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
730
|
+
success: alepha_orm0.PgAttr<alepha579.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
|
|
731
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
332
732
|
}>>;
|
|
333
733
|
/**
|
|
334
734
|
* Registry of audit types and their allowed actions.
|
|
@@ -415,7 +815,7 @@ interface AuditStats {
|
|
|
415
815
|
recentFailures: AuditEntity[];
|
|
416
816
|
}
|
|
417
817
|
//#endregion
|
|
418
|
-
//#region ../../src/api/audits/controllers/
|
|
818
|
+
//#region ../../src/api/audits/controllers/AdminAuditController.d.ts
|
|
419
819
|
/**
|
|
420
820
|
* REST API controller for audit log management.
|
|
421
821
|
*
|
|
@@ -425,245 +825,245 @@ interface AuditStats {
|
|
|
425
825
|
* - Getting audit statistics
|
|
426
826
|
* - Viewing registered audit types
|
|
427
827
|
*/
|
|
428
|
-
declare class
|
|
828
|
+
declare class AdminAuditController {
|
|
429
829
|
protected readonly url = "/audits";
|
|
430
|
-
protected readonly group = "audits";
|
|
830
|
+
protected readonly group = "admin:audits";
|
|
431
831
|
protected readonly auditService: AuditService;
|
|
432
832
|
/**
|
|
433
833
|
* Find audit entries with filtering and pagination.
|
|
434
834
|
*/
|
|
435
835
|
readonly findAudits: alepha_server0.ActionPrimitiveFn<{
|
|
436
|
-
query:
|
|
437
|
-
page:
|
|
438
|
-
size:
|
|
439
|
-
sort:
|
|
440
|
-
type:
|
|
441
|
-
action:
|
|
442
|
-
severity:
|
|
443
|
-
userId:
|
|
444
|
-
userRealm:
|
|
445
|
-
resourceType:
|
|
446
|
-
resourceId:
|
|
447
|
-
success:
|
|
448
|
-
from:
|
|
449
|
-
to:
|
|
450
|
-
search:
|
|
836
|
+
query: alepha579.TObject<{
|
|
837
|
+
page: alepha579.TOptional<alepha579.TInteger>;
|
|
838
|
+
size: alepha579.TOptional<alepha579.TInteger>;
|
|
839
|
+
sort: alepha579.TOptional<alepha579.TString>;
|
|
840
|
+
type: alepha579.TOptional<alepha579.TString>;
|
|
841
|
+
action: alepha579.TOptional<alepha579.TString>;
|
|
842
|
+
severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
|
|
843
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
844
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
845
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
846
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
847
|
+
success: alepha579.TOptional<alepha579.TBoolean>;
|
|
848
|
+
from: alepha579.TOptional<alepha579.TString>;
|
|
849
|
+
to: alepha579.TOptional<alepha579.TString>;
|
|
850
|
+
search: alepha579.TOptional<alepha579.TString>;
|
|
451
851
|
}>;
|
|
452
|
-
response:
|
|
453
|
-
id:
|
|
454
|
-
createdAt:
|
|
455
|
-
type:
|
|
456
|
-
action:
|
|
457
|
-
severity:
|
|
458
|
-
userId:
|
|
459
|
-
userRealm:
|
|
460
|
-
userEmail:
|
|
461
|
-
resourceType:
|
|
462
|
-
resourceId:
|
|
463
|
-
description:
|
|
464
|
-
metadata:
|
|
465
|
-
ipAddress:
|
|
466
|
-
userAgent:
|
|
467
|
-
sessionId:
|
|
468
|
-
requestId:
|
|
469
|
-
success:
|
|
470
|
-
errorMessage:
|
|
852
|
+
response: alepha579.TPage<alepha579.TObject<{
|
|
853
|
+
id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
854
|
+
createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
855
|
+
type: alepha579.TString;
|
|
856
|
+
action: alepha579.TString;
|
|
857
|
+
severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
858
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
859
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
860
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
861
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
862
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
863
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
864
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
865
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
866
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
867
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
868
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
869
|
+
success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
|
|
870
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
471
871
|
}>>;
|
|
472
872
|
}>;
|
|
473
873
|
/**
|
|
474
874
|
* Get a single audit entry by ID.
|
|
475
875
|
*/
|
|
476
876
|
readonly getAudit: alepha_server0.ActionPrimitiveFn<{
|
|
477
|
-
params:
|
|
478
|
-
id:
|
|
877
|
+
params: alepha579.TObject<{
|
|
878
|
+
id: alepha579.TString;
|
|
479
879
|
}>;
|
|
480
|
-
response:
|
|
481
|
-
id:
|
|
482
|
-
createdAt:
|
|
483
|
-
type:
|
|
484
|
-
action:
|
|
485
|
-
severity:
|
|
486
|
-
userId:
|
|
487
|
-
userRealm:
|
|
488
|
-
userEmail:
|
|
489
|
-
resourceType:
|
|
490
|
-
resourceId:
|
|
491
|
-
description:
|
|
492
|
-
metadata:
|
|
493
|
-
ipAddress:
|
|
494
|
-
userAgent:
|
|
495
|
-
sessionId:
|
|
496
|
-
requestId:
|
|
497
|
-
success:
|
|
498
|
-
errorMessage:
|
|
880
|
+
response: alepha579.TObject<{
|
|
881
|
+
id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
882
|
+
createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
883
|
+
type: alepha579.TString;
|
|
884
|
+
action: alepha579.TString;
|
|
885
|
+
severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
886
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
887
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
888
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
889
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
890
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
891
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
892
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
893
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
894
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
895
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
896
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
897
|
+
success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
|
|
898
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
499
899
|
}>;
|
|
500
900
|
}>;
|
|
501
901
|
/**
|
|
502
902
|
* Create a new audit entry.
|
|
503
903
|
*/
|
|
504
904
|
readonly createAudit: alepha_server0.ActionPrimitiveFn<{
|
|
505
|
-
body:
|
|
506
|
-
type:
|
|
507
|
-
action:
|
|
508
|
-
severity:
|
|
509
|
-
userId:
|
|
510
|
-
userRealm:
|
|
511
|
-
userEmail:
|
|
512
|
-
resourceType:
|
|
513
|
-
resourceId:
|
|
514
|
-
description:
|
|
515
|
-
metadata:
|
|
516
|
-
ipAddress:
|
|
517
|
-
userAgent:
|
|
518
|
-
sessionId:
|
|
519
|
-
requestId:
|
|
520
|
-
success:
|
|
521
|
-
errorMessage:
|
|
905
|
+
body: alepha579.TObject<{
|
|
906
|
+
type: alepha579.TString;
|
|
907
|
+
action: alepha579.TString;
|
|
908
|
+
severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
|
|
909
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
910
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
911
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
912
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
913
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
914
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
915
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
916
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
917
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
918
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
919
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
920
|
+
success: alepha579.TOptional<alepha579.TBoolean>;
|
|
921
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
522
922
|
}>;
|
|
523
|
-
response:
|
|
524
|
-
id:
|
|
525
|
-
createdAt:
|
|
526
|
-
type:
|
|
527
|
-
action:
|
|
528
|
-
severity:
|
|
529
|
-
userId:
|
|
530
|
-
userRealm:
|
|
531
|
-
userEmail:
|
|
532
|
-
resourceType:
|
|
533
|
-
resourceId:
|
|
534
|
-
description:
|
|
535
|
-
metadata:
|
|
536
|
-
ipAddress:
|
|
537
|
-
userAgent:
|
|
538
|
-
sessionId:
|
|
539
|
-
requestId:
|
|
540
|
-
success:
|
|
541
|
-
errorMessage:
|
|
923
|
+
response: alepha579.TObject<{
|
|
924
|
+
id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
925
|
+
createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
926
|
+
type: alepha579.TString;
|
|
927
|
+
action: alepha579.TString;
|
|
928
|
+
severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
929
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
930
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
931
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
932
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
933
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
934
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
935
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
936
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
937
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
938
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
939
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
940
|
+
success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
|
|
941
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
542
942
|
}>;
|
|
543
943
|
}>;
|
|
544
944
|
/**
|
|
545
945
|
* Get audit entries for a specific user.
|
|
546
946
|
*/
|
|
547
947
|
readonly findByUser: alepha_server0.ActionPrimitiveFn<{
|
|
548
|
-
params:
|
|
549
|
-
userId:
|
|
948
|
+
params: alepha579.TObject<{
|
|
949
|
+
userId: alepha579.TString;
|
|
550
950
|
}>;
|
|
551
|
-
query:
|
|
552
|
-
page:
|
|
553
|
-
type:
|
|
554
|
-
size:
|
|
555
|
-
sort:
|
|
556
|
-
action:
|
|
557
|
-
severity:
|
|
558
|
-
userRealm:
|
|
559
|
-
resourceType:
|
|
560
|
-
resourceId:
|
|
561
|
-
success:
|
|
562
|
-
from:
|
|
563
|
-
to:
|
|
564
|
-
search:
|
|
951
|
+
query: alepha579.TObject<{
|
|
952
|
+
page: alepha579.TOptional<alepha579.TInteger>;
|
|
953
|
+
type: alepha579.TOptional<alepha579.TString>;
|
|
954
|
+
size: alepha579.TOptional<alepha579.TInteger>;
|
|
955
|
+
sort: alepha579.TOptional<alepha579.TString>;
|
|
956
|
+
action: alepha579.TOptional<alepha579.TString>;
|
|
957
|
+
severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
|
|
958
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
959
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
960
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
961
|
+
success: alepha579.TOptional<alepha579.TBoolean>;
|
|
962
|
+
from: alepha579.TOptional<alepha579.TString>;
|
|
963
|
+
to: alepha579.TOptional<alepha579.TString>;
|
|
964
|
+
search: alepha579.TOptional<alepha579.TString>;
|
|
565
965
|
}>;
|
|
566
|
-
response:
|
|
567
|
-
id:
|
|
568
|
-
createdAt:
|
|
569
|
-
type:
|
|
570
|
-
action:
|
|
571
|
-
severity:
|
|
572
|
-
userId:
|
|
573
|
-
userRealm:
|
|
574
|
-
userEmail:
|
|
575
|
-
resourceType:
|
|
576
|
-
resourceId:
|
|
577
|
-
description:
|
|
578
|
-
metadata:
|
|
579
|
-
ipAddress:
|
|
580
|
-
userAgent:
|
|
581
|
-
sessionId:
|
|
582
|
-
requestId:
|
|
583
|
-
success:
|
|
584
|
-
errorMessage:
|
|
966
|
+
response: alepha579.TPage<alepha579.TObject<{
|
|
967
|
+
id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
968
|
+
createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
969
|
+
type: alepha579.TString;
|
|
970
|
+
action: alepha579.TString;
|
|
971
|
+
severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
972
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
973
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
974
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
975
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
976
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
977
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
978
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
979
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
980
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
981
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
982
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
983
|
+
success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
|
|
984
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
585
985
|
}>>;
|
|
586
986
|
}>;
|
|
587
987
|
/**
|
|
588
988
|
* Get audit entries for a specific resource.
|
|
589
989
|
*/
|
|
590
990
|
readonly findByResource: alepha_server0.ActionPrimitiveFn<{
|
|
591
|
-
params:
|
|
592
|
-
resourceType:
|
|
593
|
-
resourceId:
|
|
991
|
+
params: alepha579.TObject<{
|
|
992
|
+
resourceType: alepha579.TString;
|
|
993
|
+
resourceId: alepha579.TString;
|
|
594
994
|
}>;
|
|
595
|
-
query:
|
|
596
|
-
page:
|
|
597
|
-
type:
|
|
598
|
-
size:
|
|
599
|
-
sort:
|
|
600
|
-
action:
|
|
601
|
-
severity:
|
|
602
|
-
userId:
|
|
603
|
-
userRealm:
|
|
604
|
-
success:
|
|
605
|
-
from:
|
|
606
|
-
to:
|
|
607
|
-
search:
|
|
995
|
+
query: alepha579.TObject<{
|
|
996
|
+
page: alepha579.TOptional<alepha579.TInteger>;
|
|
997
|
+
type: alepha579.TOptional<alepha579.TString>;
|
|
998
|
+
size: alepha579.TOptional<alepha579.TInteger>;
|
|
999
|
+
sort: alepha579.TOptional<alepha579.TString>;
|
|
1000
|
+
action: alepha579.TOptional<alepha579.TString>;
|
|
1001
|
+
severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
|
|
1002
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
1003
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
1004
|
+
success: alepha579.TOptional<alepha579.TBoolean>;
|
|
1005
|
+
from: alepha579.TOptional<alepha579.TString>;
|
|
1006
|
+
to: alepha579.TOptional<alepha579.TString>;
|
|
1007
|
+
search: alepha579.TOptional<alepha579.TString>;
|
|
608
1008
|
}>;
|
|
609
|
-
response:
|
|
610
|
-
id:
|
|
611
|
-
createdAt:
|
|
612
|
-
type:
|
|
613
|
-
action:
|
|
614
|
-
severity:
|
|
615
|
-
userId:
|
|
616
|
-
userRealm:
|
|
617
|
-
userEmail:
|
|
618
|
-
resourceType:
|
|
619
|
-
resourceId:
|
|
620
|
-
description:
|
|
621
|
-
metadata:
|
|
622
|
-
ipAddress:
|
|
623
|
-
userAgent:
|
|
624
|
-
sessionId:
|
|
625
|
-
requestId:
|
|
626
|
-
success:
|
|
627
|
-
errorMessage:
|
|
1009
|
+
response: alepha579.TPage<alepha579.TObject<{
|
|
1010
|
+
id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1011
|
+
createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1012
|
+
type: alepha579.TString;
|
|
1013
|
+
action: alepha579.TString;
|
|
1014
|
+
severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
1015
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
1016
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
1017
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
1018
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
1019
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
1020
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
1021
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
1022
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
1023
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
1024
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
1025
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
1026
|
+
success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
|
|
1027
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
628
1028
|
}>>;
|
|
629
1029
|
}>;
|
|
630
1030
|
/**
|
|
631
1031
|
* Get audit statistics.
|
|
632
1032
|
*/
|
|
633
1033
|
readonly getStats: alepha_server0.ActionPrimitiveFn<{
|
|
634
|
-
query:
|
|
635
|
-
from:
|
|
636
|
-
to:
|
|
637
|
-
userRealm:
|
|
1034
|
+
query: alepha579.TObject<{
|
|
1035
|
+
from: alepha579.TOptional<alepha579.TString>;
|
|
1036
|
+
to: alepha579.TOptional<alepha579.TString>;
|
|
1037
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
638
1038
|
}>;
|
|
639
|
-
response:
|
|
640
|
-
total:
|
|
641
|
-
byType:
|
|
642
|
-
bySeverity:
|
|
643
|
-
info:
|
|
644
|
-
warning:
|
|
645
|
-
critical:
|
|
1039
|
+
response: alepha579.TObject<{
|
|
1040
|
+
total: alepha579.TInteger;
|
|
1041
|
+
byType: alepha579.TRecord<"^.*$", alepha579.TInteger>;
|
|
1042
|
+
bySeverity: alepha579.TObject<{
|
|
1043
|
+
info: alepha579.TInteger;
|
|
1044
|
+
warning: alepha579.TInteger;
|
|
1045
|
+
critical: alepha579.TInteger;
|
|
646
1046
|
}>;
|
|
647
|
-
successRate:
|
|
648
|
-
recentFailures:
|
|
649
|
-
id:
|
|
650
|
-
createdAt:
|
|
651
|
-
type:
|
|
652
|
-
action:
|
|
653
|
-
severity:
|
|
654
|
-
userId:
|
|
655
|
-
userRealm:
|
|
656
|
-
userEmail:
|
|
657
|
-
resourceType:
|
|
658
|
-
resourceId:
|
|
659
|
-
description:
|
|
660
|
-
metadata:
|
|
661
|
-
ipAddress:
|
|
662
|
-
userAgent:
|
|
663
|
-
sessionId:
|
|
664
|
-
requestId:
|
|
665
|
-
success:
|
|
666
|
-
errorMessage:
|
|
1047
|
+
successRate: alepha579.TNumber;
|
|
1048
|
+
recentFailures: alepha579.TArray<alepha579.TObject<{
|
|
1049
|
+
id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1050
|
+
createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1051
|
+
type: alepha579.TString;
|
|
1052
|
+
action: alepha579.TString;
|
|
1053
|
+
severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
1054
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
1055
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
1056
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
1057
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
1058
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
1059
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
1060
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
1061
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
1062
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
1063
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
1064
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
1065
|
+
success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
|
|
1066
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
667
1067
|
}>>;
|
|
668
1068
|
}>;
|
|
669
1069
|
}>;
|
|
@@ -671,21 +1071,21 @@ declare class AuditController {
|
|
|
671
1071
|
* Get registered audit types.
|
|
672
1072
|
*/
|
|
673
1073
|
readonly getTypes: alepha_server0.ActionPrimitiveFn<{
|
|
674
|
-
response:
|
|
675
|
-
type:
|
|
676
|
-
description:
|
|
677
|
-
actions:
|
|
1074
|
+
response: alepha579.TArray<alepha579.TObject<{
|
|
1075
|
+
type: alepha579.TString;
|
|
1076
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
1077
|
+
actions: alepha579.TArray<alepha579.TString>;
|
|
678
1078
|
}>>;
|
|
679
1079
|
}>;
|
|
680
1080
|
/**
|
|
681
1081
|
* Get distinct values for filters.
|
|
682
1082
|
*/
|
|
683
1083
|
readonly getFilterOptions: alepha_server0.ActionPrimitiveFn<{
|
|
684
|
-
response:
|
|
685
|
-
types:
|
|
686
|
-
actions:
|
|
687
|
-
resourceTypes:
|
|
688
|
-
userRealms:
|
|
1084
|
+
response: alepha579.TObject<{
|
|
1085
|
+
types: alepha579.TArray<alepha579.TString>;
|
|
1086
|
+
actions: alepha579.TArray<alepha579.TString>;
|
|
1087
|
+
resourceTypes: alepha579.TArray<alepha579.TString>;
|
|
1088
|
+
userRealms: alepha579.TArray<alepha579.TString>;
|
|
689
1089
|
}>;
|
|
690
1090
|
}>;
|
|
691
1091
|
}
|
|
@@ -803,429 +1203,29 @@ declare const $audit: {
|
|
|
803
1203
|
[KIND]: typeof AuditPrimitive;
|
|
804
1204
|
};
|
|
805
1205
|
//#endregion
|
|
806
|
-
//#region ../../src/orm/schemas/insertSchema.d.ts
|
|
807
|
-
/**
|
|
808
|
-
* Transforms a TObject schema for insert operations.
|
|
809
|
-
* All default properties at the root level are made optional.
|
|
810
|
-
*
|
|
811
|
-
* @example
|
|
812
|
-
* Before: { name: string; age: number(default=0); }
|
|
813
|
-
* After: { name: string; age?: number; }
|
|
814
|
-
*/
|
|
815
|
-
type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]]: T["properties"][K] extends {
|
|
816
|
-
[PG_DEFAULT]: any;
|
|
817
|
-
} | {
|
|
818
|
-
"~optional": true;
|
|
819
|
-
} ? TOptional<T["properties"][K]> : T["properties"][K] }>;
|
|
820
|
-
//#endregion
|
|
821
|
-
//#region ../../src/orm/schemas/updateSchema.d.ts
|
|
822
|
-
/**
|
|
823
|
-
* Transforms a TObject schema for update operations.
|
|
824
|
-
* All optional properties at the root level are made nullable (i.e., `T | null`).
|
|
825
|
-
* This allows an API endpoint to explicitly accept `null` to clear an optional field in the database.
|
|
826
|
-
*
|
|
827
|
-
* @example
|
|
828
|
-
* Before: { name?: string; age: number; }
|
|
829
|
-
* After: { name?: string | null; age: number; }
|
|
830
|
-
*/
|
|
831
|
-
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] }>;
|
|
832
|
-
//#endregion
|
|
833
|
-
//#region ../../src/orm/primitives/$entity.d.ts
|
|
834
|
-
interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
|
|
835
|
-
/**
|
|
836
|
-
* The database table name that will be created for this entity.
|
|
837
|
-
* If not provided, name will be inferred from the $repository variable name.
|
|
838
|
-
*/
|
|
839
|
-
name: string;
|
|
840
|
-
/**
|
|
841
|
-
* TypeBox schema defining the table structure and column types.
|
|
842
|
-
*/
|
|
843
|
-
schema: T;
|
|
844
|
-
/**
|
|
845
|
-
* Database indexes to create for query optimization.
|
|
846
|
-
*/
|
|
847
|
-
indexes?: (Keys | {
|
|
848
|
-
/**
|
|
849
|
-
* Single column to index.
|
|
850
|
-
*/
|
|
851
|
-
column: Keys;
|
|
852
|
-
/**
|
|
853
|
-
* Whether this should be a unique index (enforces uniqueness constraint).
|
|
854
|
-
*/
|
|
855
|
-
unique?: boolean;
|
|
856
|
-
/**
|
|
857
|
-
* Custom name for the index. If not provided, generates name automatically.
|
|
858
|
-
*/
|
|
859
|
-
name?: string;
|
|
860
|
-
} | {
|
|
861
|
-
/**
|
|
862
|
-
* Multiple columns for composite index (order matters for query optimization).
|
|
863
|
-
*/
|
|
864
|
-
columns: Keys[];
|
|
865
|
-
/**
|
|
866
|
-
* Whether this should be a unique index (enforces uniqueness constraint).
|
|
867
|
-
*/
|
|
868
|
-
unique?: boolean;
|
|
869
|
-
/**
|
|
870
|
-
* Custom name for the index. If not provided, generates name automatically.
|
|
871
|
-
*/
|
|
872
|
-
name?: string;
|
|
873
|
-
})[];
|
|
874
|
-
/**
|
|
875
|
-
* Foreign key constraints to maintain referential integrity.
|
|
876
|
-
*/
|
|
877
|
-
foreignKeys?: Array<{
|
|
878
|
-
/**
|
|
879
|
-
* Optional name for the foreign key constraint.
|
|
880
|
-
*/
|
|
881
|
-
name?: string;
|
|
882
|
-
/**
|
|
883
|
-
* Local columns that reference the foreign table.
|
|
884
|
-
*/
|
|
885
|
-
columns: Array<keyof Static<T>>;
|
|
886
|
-
/**
|
|
887
|
-
* Referenced columns in the foreign table.
|
|
888
|
-
* Must be EntityColumn references from other entities.
|
|
889
|
-
*/
|
|
890
|
-
foreignColumns: Array<() => EntityColumn<any>>;
|
|
891
|
-
}>;
|
|
892
|
-
/**
|
|
893
|
-
* Additional table constraints for data validation.
|
|
894
|
-
*
|
|
895
|
-
* Constraints enforce business rules at the database level, providing
|
|
896
|
-
* an additional layer of data integrity beyond application validation.
|
|
897
|
-
*
|
|
898
|
-
* **Constraint Types**:
|
|
899
|
-
* - **Unique constraints**: Prevent duplicate values across columns
|
|
900
|
-
* - **Check constraints**: Enforce custom validation rules with SQL expressions
|
|
901
|
-
*
|
|
902
|
-
* @example
|
|
903
|
-
* ```ts
|
|
904
|
-
* constraints: [
|
|
905
|
-
* {
|
|
906
|
-
* name: "unique_user_email",
|
|
907
|
-
* columns: ["email"],
|
|
908
|
-
* unique: true
|
|
909
|
-
* },
|
|
910
|
-
* {
|
|
911
|
-
* name: "valid_age_range",
|
|
912
|
-
* columns: ["age"],
|
|
913
|
-
* check: sql`age >= 0 AND age <= 150`
|
|
914
|
-
* },
|
|
915
|
-
* {
|
|
916
|
-
* name: "unique_user_username_per_tenant",
|
|
917
|
-
* columns: ["tenantId", "username"],
|
|
918
|
-
* unique: true
|
|
919
|
-
* }
|
|
920
|
-
* ]
|
|
921
|
-
* ```
|
|
922
|
-
*/
|
|
923
|
-
constraints?: Array<{
|
|
924
|
-
/**
|
|
925
|
-
* Columns involved in this constraint.
|
|
926
|
-
*/
|
|
927
|
-
columns: Array<keyof Static<T>>;
|
|
928
|
-
/**
|
|
929
|
-
* Optional name for the constraint.
|
|
930
|
-
*/
|
|
931
|
-
name?: string;
|
|
932
|
-
/**
|
|
933
|
-
* Whether this is a unique constraint.
|
|
934
|
-
*/
|
|
935
|
-
unique?: boolean | {};
|
|
936
|
-
/**
|
|
937
|
-
* SQL expression for check constraint validation.
|
|
938
|
-
*/
|
|
939
|
-
check?: SQL;
|
|
940
|
-
}>;
|
|
941
|
-
/**
|
|
942
|
-
* Advanced Drizzle ORM configuration for complex table setups.
|
|
943
|
-
*/
|
|
944
|
-
config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
|
|
945
|
-
}
|
|
946
|
-
declare class EntityPrimitive<T extends TObject = TObject> {
|
|
947
|
-
readonly options: EntityPrimitiveOptions<T>;
|
|
948
|
-
constructor(options: EntityPrimitiveOptions<T>);
|
|
949
|
-
alias(alias: string): this;
|
|
950
|
-
get cols(): EntityColumns<T>;
|
|
951
|
-
get name(): string;
|
|
952
|
-
get schema(): T;
|
|
953
|
-
get insertSchema(): TObjectInsert<T>;
|
|
954
|
-
get updateSchema(): TObjectUpdate<T>;
|
|
955
|
-
}
|
|
956
|
-
/**
|
|
957
|
-
* Convert a schema to columns.
|
|
958
|
-
*/
|
|
959
|
-
type FromSchema<T extends TObject> = { [key in keyof T["properties"]]: PgColumnBuilderBase };
|
|
960
|
-
type EntityColumn<T extends TObject> = {
|
|
961
|
-
name: string;
|
|
962
|
-
entity: EntityPrimitive<T>;
|
|
963
|
-
};
|
|
964
|
-
type EntityColumns<T extends TObject> = { [key in keyof T["properties"]]: EntityColumn<T> };
|
|
965
|
-
//#endregion
|
|
966
|
-
//#region ../../src/orm/constants/PG_SYMBOLS.d.ts
|
|
967
|
-
declare const PG_DEFAULT: unique symbol;
|
|
968
|
-
declare const PG_PRIMARY_KEY: unique symbol;
|
|
969
|
-
declare const PG_CREATED_AT: unique symbol;
|
|
970
|
-
declare const PG_UPDATED_AT: unique symbol;
|
|
971
|
-
declare const PG_DELETED_AT: unique symbol;
|
|
972
|
-
declare const PG_VERSION: unique symbol;
|
|
973
|
-
declare const PG_IDENTITY: unique symbol;
|
|
974
|
-
declare const PG_ENUM: unique symbol;
|
|
975
|
-
declare const PG_REF: unique symbol;
|
|
976
|
-
/**
|
|
977
|
-
* @deprecated Use `PG_IDENTITY` instead.
|
|
978
|
-
*/
|
|
979
|
-
declare const PG_SERIAL: unique symbol;
|
|
980
|
-
type PgSymbols = {
|
|
981
|
-
[PG_DEFAULT]: {};
|
|
982
|
-
[PG_PRIMARY_KEY]: {};
|
|
983
|
-
[PG_CREATED_AT]: {};
|
|
984
|
-
[PG_UPDATED_AT]: {};
|
|
985
|
-
[PG_DELETED_AT]: {};
|
|
986
|
-
[PG_VERSION]: {};
|
|
987
|
-
[PG_IDENTITY]: PgIdentityOptions;
|
|
988
|
-
[PG_REF]: PgRefOptions;
|
|
989
|
-
[PG_ENUM]: PgEnumOptions;
|
|
990
|
-
/**
|
|
991
|
-
* @deprecated Use `PG_IDENTITY` instead.
|
|
992
|
-
*/
|
|
993
|
-
[PG_SERIAL]: {};
|
|
994
|
-
};
|
|
995
|
-
type PgSymbolKeys = keyof PgSymbols;
|
|
996
|
-
type PgIdentityOptions = {
|
|
997
|
-
mode: "always" | "byDefault";
|
|
998
|
-
} & PgSequenceOptions & {
|
|
999
|
-
name?: string;
|
|
1000
|
-
};
|
|
1001
|
-
interface PgEnumOptions {
|
|
1002
|
-
name?: string;
|
|
1003
|
-
description?: string;
|
|
1004
|
-
}
|
|
1005
|
-
interface PgRefOptions {
|
|
1006
|
-
ref: () => {
|
|
1007
|
-
name: string;
|
|
1008
|
-
entity: EntityPrimitive;
|
|
1009
|
-
};
|
|
1010
|
-
actions?: {
|
|
1011
|
-
onUpdate?: UpdateDeleteAction;
|
|
1012
|
-
onDelete?: UpdateDeleteAction;
|
|
1013
|
-
};
|
|
1014
|
-
}
|
|
1015
|
-
//#endregion
|
|
1016
|
-
//#region ../../src/orm/helpers/pgAttr.d.ts
|
|
1017
|
-
/**
|
|
1018
|
-
* Type representation.
|
|
1019
|
-
*/
|
|
1020
|
-
type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
|
|
1021
|
-
//#endregion
|
|
1022
|
-
//#region ../../src/orm/providers/drivers/BunPostgresProvider.d.ts
|
|
1023
|
-
declare module "alepha" {
|
|
1024
|
-
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
1025
|
-
}
|
|
1026
|
-
declare const envSchema$1: alepha349.TObject<{
|
|
1027
|
-
/**
|
|
1028
|
-
* Main configuration for database connection.
|
|
1029
|
-
* Accept a string in the format of a Postgres connection URL.
|
|
1030
|
-
* Example: postgres://user:password@localhost:5432/database
|
|
1031
|
-
* or
|
|
1032
|
-
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
1033
|
-
*/
|
|
1034
|
-
DATABASE_URL: alepha349.TOptional<alepha349.TString>;
|
|
1035
|
-
/**
|
|
1036
|
-
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
1037
|
-
*/
|
|
1038
|
-
POSTGRES_SCHEMA: alepha349.TOptional<alepha349.TString>;
|
|
1039
|
-
}>;
|
|
1040
|
-
/**
|
|
1041
|
-
* Bun PostgreSQL provider using Drizzle ORM with Bun's native SQL client.
|
|
1042
|
-
*
|
|
1043
|
-
* This provider uses Bun's built-in SQL class for PostgreSQL connections,
|
|
1044
|
-
* which provides excellent performance on the Bun runtime.
|
|
1045
|
-
*
|
|
1046
|
-
* @example
|
|
1047
|
-
* ```ts
|
|
1048
|
-
* // Set DATABASE_URL environment variable
|
|
1049
|
-
* // DATABASE_URL=postgres://user:password@localhost:5432/database
|
|
1050
|
-
*
|
|
1051
|
-
* // Or configure programmatically
|
|
1052
|
-
* alepha.with({
|
|
1053
|
-
* provide: DatabaseProvider,
|
|
1054
|
-
* use: BunPostgresProvider,
|
|
1055
|
-
* });
|
|
1056
|
-
* ```
|
|
1057
|
-
*/
|
|
1058
|
-
//#endregion
|
|
1059
|
-
//#region ../../src/orm/providers/drivers/BunSqliteProvider.d.ts
|
|
1060
|
-
/**
|
|
1061
|
-
* Configuration options for the Bun SQLite database provider.
|
|
1062
|
-
*/
|
|
1063
|
-
declare const bunSqliteOptions: alepha349.Atom<alepha349.TObject<{
|
|
1064
|
-
path: alepha349.TOptional<alepha349.TString>;
|
|
1065
|
-
}>, "alepha.postgres.bun-sqlite.options">;
|
|
1066
|
-
type BunSqliteProviderOptions = Static<typeof bunSqliteOptions.schema>;
|
|
1067
|
-
declare module "alepha" {
|
|
1068
|
-
interface State {
|
|
1069
|
-
[bunSqliteOptions.key]: BunSqliteProviderOptions;
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
/**
|
|
1073
|
-
* Bun SQLite provider using Drizzle ORM with Bun's native SQLite client.
|
|
1074
|
-
*
|
|
1075
|
-
* This provider uses Bun's built-in `bun:sqlite` for SQLite connections,
|
|
1076
|
-
* which provides excellent performance on the Bun runtime.
|
|
1077
|
-
*
|
|
1078
|
-
* @example
|
|
1079
|
-
* ```ts
|
|
1080
|
-
* // Set DATABASE_URL environment variable
|
|
1081
|
-
* // DATABASE_URL=sqlite://./my-database.db
|
|
1082
|
-
*
|
|
1083
|
-
* // Or configure programmatically
|
|
1084
|
-
* alepha.with({
|
|
1085
|
-
* provide: DatabaseProvider,
|
|
1086
|
-
* use: BunSqliteProvider,
|
|
1087
|
-
* });
|
|
1088
|
-
*
|
|
1089
|
-
* // Or use options atom
|
|
1090
|
-
* alepha.store.mut(bunSqliteOptions, (old) => ({
|
|
1091
|
-
* ...old,
|
|
1092
|
-
* path: ":memory:",
|
|
1093
|
-
* }));
|
|
1094
|
-
* ```
|
|
1095
|
-
*/
|
|
1096
|
-
//#endregion
|
|
1097
|
-
//#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
|
|
1098
|
-
declare module "alepha" {
|
|
1099
|
-
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
1100
|
-
}
|
|
1101
|
-
declare const envSchema: alepha349.TObject<{
|
|
1102
|
-
/**
|
|
1103
|
-
* Main configuration for database connection.
|
|
1104
|
-
* Accept a string in the format of a Postgres connection URL.
|
|
1105
|
-
* Example: postgres://user:password@localhost:5432/database
|
|
1106
|
-
* or
|
|
1107
|
-
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
1108
|
-
*/
|
|
1109
|
-
DATABASE_URL: alepha349.TOptional<alepha349.TString>;
|
|
1110
|
-
/**
|
|
1111
|
-
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
1112
|
-
*
|
|
1113
|
-
* It will monkey patch drizzle tables.
|
|
1114
|
-
*/
|
|
1115
|
-
POSTGRES_SCHEMA: alepha349.TOptional<alepha349.TString>;
|
|
1116
|
-
}>;
|
|
1117
|
-
//#endregion
|
|
1118
|
-
//#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
|
|
1119
|
-
/**
|
|
1120
|
-
* Configuration options for the Node.js SQLite database provider.
|
|
1121
|
-
*/
|
|
1122
|
-
declare const nodeSqliteOptions: alepha349.Atom<alepha349.TObject<{
|
|
1123
|
-
path: alepha349.TOptional<alepha349.TString>;
|
|
1124
|
-
}>, "alepha.postgres.node-sqlite.options">;
|
|
1125
|
-
type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
|
|
1126
|
-
declare module "alepha" {
|
|
1127
|
-
interface State {
|
|
1128
|
-
[nodeSqliteOptions.key]: NodeSqliteProviderOptions;
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
/**
|
|
1132
|
-
* Add a fake support for SQLite in Node.js based on Postgres interfaces.
|
|
1133
|
-
*
|
|
1134
|
-
* This is NOT a real SQLite provider, it's a workaround to use SQLite with Drizzle ORM.
|
|
1135
|
-
* This is NOT recommended for production use.
|
|
1136
|
-
*/
|
|
1137
|
-
//#endregion
|
|
1138
|
-
//#region ../../src/orm/index.d.ts
|
|
1139
|
-
declare module "alepha" {
|
|
1140
|
-
interface Hooks {
|
|
1141
|
-
/**
|
|
1142
|
-
* Fires before creating an entity in the repository.
|
|
1143
|
-
*/
|
|
1144
|
-
"repository:create:before": {
|
|
1145
|
-
tableName: string;
|
|
1146
|
-
data: any;
|
|
1147
|
-
};
|
|
1148
|
-
/**
|
|
1149
|
-
* Fires after creating an entity in the repository.
|
|
1150
|
-
*/
|
|
1151
|
-
"repository:create:after": {
|
|
1152
|
-
tableName: string;
|
|
1153
|
-
data: any;
|
|
1154
|
-
entity: any;
|
|
1155
|
-
};
|
|
1156
|
-
/**
|
|
1157
|
-
* Fires before updating entities in the repository.
|
|
1158
|
-
*/
|
|
1159
|
-
"repository:update:before": {
|
|
1160
|
-
tableName: string;
|
|
1161
|
-
where: any;
|
|
1162
|
-
data: any;
|
|
1163
|
-
};
|
|
1164
|
-
/**
|
|
1165
|
-
* Fires after updating entities in the repository.
|
|
1166
|
-
*/
|
|
1167
|
-
"repository:update:after": {
|
|
1168
|
-
tableName: string;
|
|
1169
|
-
where: any;
|
|
1170
|
-
data: any;
|
|
1171
|
-
entities: any[];
|
|
1172
|
-
};
|
|
1173
|
-
/**
|
|
1174
|
-
* Fires before deleting entities from the repository.
|
|
1175
|
-
*/
|
|
1176
|
-
"repository:delete:before": {
|
|
1177
|
-
tableName: string;
|
|
1178
|
-
where: any;
|
|
1179
|
-
};
|
|
1180
|
-
/**
|
|
1181
|
-
* Fires after deleting entities from the repository.
|
|
1182
|
-
*/
|
|
1183
|
-
"repository:delete:after": {
|
|
1184
|
-
tableName: string;
|
|
1185
|
-
where: any;
|
|
1186
|
-
ids: Array<string | number>;
|
|
1187
|
-
};
|
|
1188
|
-
/**
|
|
1189
|
-
* Fires before reading entities from the repository.
|
|
1190
|
-
*/
|
|
1191
|
-
"repository:read:before": {
|
|
1192
|
-
tableName: string;
|
|
1193
|
-
query: any;
|
|
1194
|
-
};
|
|
1195
|
-
/**
|
|
1196
|
-
* Fires after reading entities from the repository.
|
|
1197
|
-
*/
|
|
1198
|
-
"repository:read:after": {
|
|
1199
|
-
tableName: string;
|
|
1200
|
-
query: any;
|
|
1201
|
-
entities: any[];
|
|
1202
|
-
};
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
//#endregion
|
|
1206
1206
|
//#region ../../src/api/audits/schemas/auditResourceSchema.d.ts
|
|
1207
1207
|
/**
|
|
1208
1208
|
* Resource schema for audit log responses.
|
|
1209
1209
|
*/
|
|
1210
|
-
declare const auditResourceSchema:
|
|
1211
|
-
id: PgAttr<PgAttr<
|
|
1212
|
-
createdAt: PgAttr<PgAttr<
|
|
1213
|
-
type:
|
|
1214
|
-
action:
|
|
1215
|
-
severity: PgAttr<
|
|
1216
|
-
userId:
|
|
1217
|
-
userRealm:
|
|
1218
|
-
userEmail:
|
|
1219
|
-
resourceType:
|
|
1220
|
-
resourceId:
|
|
1221
|
-
description:
|
|
1222
|
-
metadata:
|
|
1223
|
-
ipAddress:
|
|
1224
|
-
userAgent:
|
|
1225
|
-
sessionId:
|
|
1226
|
-
requestId:
|
|
1227
|
-
success: PgAttr<
|
|
1228
|
-
errorMessage:
|
|
1210
|
+
declare const auditResourceSchema: alepha579.TObject<{
|
|
1211
|
+
id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1212
|
+
createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1213
|
+
type: alepha579.TString;
|
|
1214
|
+
action: alepha579.TString;
|
|
1215
|
+
severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
1216
|
+
userId: alepha579.TOptional<alepha579.TString>;
|
|
1217
|
+
userRealm: alepha579.TOptional<alepha579.TString>;
|
|
1218
|
+
userEmail: alepha579.TOptional<alepha579.TString>;
|
|
1219
|
+
resourceType: alepha579.TOptional<alepha579.TString>;
|
|
1220
|
+
resourceId: alepha579.TOptional<alepha579.TString>;
|
|
1221
|
+
description: alepha579.TOptional<alepha579.TString>;
|
|
1222
|
+
metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
|
|
1223
|
+
ipAddress: alepha579.TOptional<alepha579.TString>;
|
|
1224
|
+
userAgent: alepha579.TOptional<alepha579.TString>;
|
|
1225
|
+
sessionId: alepha579.TOptional<alepha579.TString>;
|
|
1226
|
+
requestId: alepha579.TOptional<alepha579.TString>;
|
|
1227
|
+
success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
|
|
1228
|
+
errorMessage: alepha579.TOptional<alepha579.TString>;
|
|
1229
1229
|
}>;
|
|
1230
1230
|
type AuditResource = Static<typeof auditResourceSchema>;
|
|
1231
1231
|
//#endregion
|
|
@@ -1268,7 +1268,7 @@ type AuditResource = Static<typeof auditResourceSchema>;
|
|
|
1268
1268
|
* }
|
|
1269
1269
|
* ```
|
|
1270
1270
|
*/
|
|
1271
|
-
declare const AlephaApiAudits:
|
|
1271
|
+
declare const AlephaApiAudits: alepha579.Service<alepha579.Module>;
|
|
1272
1272
|
//#endregion
|
|
1273
|
-
export { $audit,
|
|
1273
|
+
export { $audit, AdminAuditController, AlephaApiAudits, AuditEntity, AuditLogOptions, AuditPrimitive, AuditPrimitiveOptions, AuditQuery, AuditResource, AuditService, AuditSeverity, AuditStats, AuditTypeDefinition, CreateAudit, auditEntityInsertSchema, auditEntitySchema, auditQuerySchema, auditResourceSchema, auditSeveritySchema, audits, createAuditSchema };
|
|
1274
1274
|
//# sourceMappingURL=index.d.ts.map
|