alepha 0.14.4 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -4
- package/dist/api/audits/index.d.ts +619 -731
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/files/index.d.ts +185 -298
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +0 -1
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.d.ts +245 -356
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/notifications/index.d.ts +238 -350
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/parameters/index.d.ts +499 -611
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/users/index.browser.js +1 -2
- package/dist/api/users/index.browser.js.map +1 -1
- package/dist/api/users/index.d.ts +1697 -1804
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +178 -151
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.d.ts +132 -132
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/batch/index.d.ts +122 -122
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js +1 -2
- package/dist/batch/index.js.map +1 -1
- package/dist/bucket/index.d.ts +163 -163
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/cache/core/index.d.ts +46 -46
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cli/index.d.ts +302 -299
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +966 -564
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +303 -299
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +11 -7
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +419 -99
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +718 -625
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +420 -99
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +419 -99
- package/dist/core/index.native.js.map +1 -1
- package/dist/datetime/index.d.ts +44 -44
- package/dist/datetime/index.d.ts.map +1 -1
- package/dist/datetime/index.js +4 -4
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/index.d.ts +97 -50
- package/dist/email/index.d.ts.map +1 -1
- package/dist/email/index.js +129 -33
- package/dist/email/index.js.map +1 -1
- package/dist/fake/index.d.ts +7981 -14
- package/dist/fake/index.d.ts.map +1 -1
- package/dist/file/index.d.ts +523 -390
- package/dist/file/index.d.ts.map +1 -1
- package/dist/file/index.js +253 -1
- package/dist/file/index.js.map +1 -1
- package/dist/lock/core/index.d.ts +208 -208
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/redis/index.d.ts.map +1 -1
- package/dist/logger/index.d.ts +25 -26
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/mcp/index.d.ts +197 -197
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/orm/chunk-DtkW-qnP.js +38 -0
- package/dist/orm/index.browser.js.map +1 -1
- package/dist/orm/index.bun.js +2814 -0
- package/dist/orm/index.bun.js.map +1 -0
- package/dist/orm/index.d.ts +1205 -1057
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +2056 -1753
- package/dist/orm/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +248 -248
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/redis/index.bun.js +285 -0
- package/dist/redis/index.bun.js.map +1 -0
- package/dist/redis/index.d.ts +118 -136
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js +18 -38
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.d.ts +69 -69
- package/dist/retry/index.d.ts.map +1 -1
- package/dist/router/index.d.ts +6 -6
- package/dist/router/index.d.ts.map +1 -1
- package/dist/scheduler/index.d.ts +25 -25
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/security/index.browser.js +5 -1
- package/dist/security/index.browser.js.map +1 -1
- package/dist/security/index.d.ts +417 -254
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +386 -86
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +277 -277
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +20 -20
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cache/index.d.ts +60 -57
- package/dist/server/cache/index.d.ts.map +1 -1
- package/dist/server/cache/index.js +1 -1
- package/dist/server/cache/index.js.map +1 -1
- package/dist/server/compress/index.d.ts +3 -3
- package/dist/server/compress/index.d.ts.map +1 -1
- package/dist/server/cookies/index.d.ts +6 -6
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +3 -3
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.d.ts +242 -150
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +288 -122
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/cors/index.d.ts +11 -12
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/health/index.d.ts +0 -1
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/helmet/index.d.ts +2 -2
- package/dist/server/helmet/index.d.ts.map +1 -1
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +84 -85
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +1 -2
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/metrics/index.d.ts.map +1 -1
- package/dist/server/multipart/index.d.ts +6 -6
- package/dist/server/multipart/index.d.ts.map +1 -1
- package/dist/server/proxy/index.d.ts +102 -103
- package/dist/server/proxy/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.d.ts +16 -16
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/static/index.d.ts +44 -44
- package/dist/server/static/index.d.ts.map +1 -1
- package/dist/server/swagger/index.d.ts +48 -49
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js +1 -2
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +13 -11
- package/dist/sms/index.d.ts.map +1 -1
- package/dist/sms/index.js +7 -7
- package/dist/sms/index.js.map +1 -1
- package/dist/thread/index.d.ts +71 -72
- package/dist/thread/index.d.ts.map +1 -1
- package/dist/topic/core/index.d.ts +318 -318
- package/dist/topic/core/index.d.ts.map +1 -1
- package/dist/topic/redis/index.d.ts +6 -6
- package/dist/topic/redis/index.d.ts.map +1 -1
- package/dist/vite/index.d.ts +5720 -159
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +41 -18
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.browser.js +6 -6
- package/dist/websocket/index.browser.js.map +1 -1
- package/dist/websocket/index.d.ts +247 -247
- package/dist/websocket/index.d.ts.map +1 -1
- package/dist/websocket/index.js +6 -6
- package/dist/websocket/index.js.map +1 -1
- package/package.json +9 -14
- package/src/api/files/controllers/AdminFileStatsController.ts +0 -1
- package/src/api/users/atoms/realmAuthSettingsAtom.ts +5 -0
- package/src/api/users/controllers/{UserRealmController.ts → RealmController.ts} +11 -11
- package/src/api/users/entities/users.ts +1 -1
- package/src/api/users/index.ts +8 -8
- package/src/api/users/primitives/{$userRealm.ts → $realm.ts} +17 -19
- package/src/api/users/providers/{UserRealmProvider.ts → RealmProvider.ts} +26 -30
- package/src/api/users/schemas/{userRealmConfigSchema.ts → realmConfigSchema.ts} +2 -2
- package/src/api/users/services/CredentialService.ts +7 -7
- package/src/api/users/services/IdentityService.ts +4 -4
- package/src/api/users/services/RegistrationService.spec.ts +25 -27
- package/src/api/users/services/RegistrationService.ts +38 -27
- package/src/api/users/services/SessionCrudService.ts +3 -3
- package/src/api/users/services/SessionService.spec.ts +3 -3
- package/src/api/users/services/SessionService.ts +28 -9
- package/src/api/users/services/UserService.ts +7 -7
- package/src/batch/providers/BatchProvider.ts +1 -2
- package/src/cli/apps/AlephaPackageBuilderCli.ts +38 -19
- package/src/cli/assets/apiHelloControllerTs.ts +18 -0
- package/src/cli/assets/apiIndexTs.ts +16 -0
- package/src/cli/assets/claudeMd.ts +303 -0
- package/src/cli/assets/mainBrowserTs.ts +2 -2
- package/src/cli/assets/mainServerTs.ts +24 -0
- package/src/cli/assets/webAppRouterTs.ts +15 -0
- package/src/cli/assets/webHelloComponentTsx.ts +16 -0
- package/src/cli/assets/webIndexTs.ts +16 -0
- package/src/cli/commands/build.ts +41 -21
- package/src/cli/commands/db.ts +21 -18
- package/src/cli/commands/deploy.ts +17 -5
- package/src/cli/commands/dev.ts +13 -17
- package/src/cli/commands/format.ts +8 -2
- package/src/cli/commands/init.ts +74 -29
- package/src/cli/commands/lint.ts +8 -2
- package/src/cli/commands/test.ts +8 -2
- package/src/cli/commands/typecheck.ts +5 -1
- package/src/cli/commands/verify.ts +4 -2
- package/src/cli/services/AlephaCliUtils.ts +39 -600
- package/src/cli/services/PackageManagerUtils.ts +301 -0
- package/src/cli/services/ProjectScaffolder.ts +306 -0
- package/src/command/helpers/Runner.ts +15 -3
- package/src/core/__tests__/Alepha-graph.spec.ts +4 -0
- package/src/core/index.shared.ts +1 -0
- package/src/core/index.ts +2 -0
- package/src/core/primitives/$hook.ts +6 -2
- package/src/core/primitives/$module.spec.ts +4 -0
- package/src/core/providers/AlsProvider.ts +1 -1
- package/src/core/providers/CodecManager.spec.ts +12 -6
- package/src/core/providers/CodecManager.ts +26 -6
- package/src/core/providers/EventManager.ts +169 -13
- package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +621 -0
- package/src/core/providers/KeylessJsonSchemaCodec.ts +407 -0
- package/src/core/providers/StateManager.spec.ts +27 -16
- package/src/email/providers/LocalEmailProvider.spec.ts +111 -87
- package/src/email/providers/LocalEmailProvider.ts +52 -15
- package/src/email/providers/NodemailerEmailProvider.ts +167 -56
- package/src/file/errors/FileError.ts +7 -0
- package/src/file/index.ts +9 -1
- package/src/file/providers/MemoryFileSystemProvider.ts +393 -0
- package/src/orm/index.browser.ts +1 -19
- package/src/orm/index.bun.ts +77 -0
- package/src/orm/index.shared-server.ts +22 -0
- package/src/orm/index.shared.ts +15 -0
- package/src/orm/index.ts +19 -39
- package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -5
- package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
- package/src/orm/providers/drivers/CloudflareD1Provider.ts +4 -0
- package/src/orm/providers/drivers/DatabaseProvider.ts +4 -0
- package/src/orm/providers/drivers/PglitePostgresProvider.ts +4 -0
- package/src/orm/services/Repository.ts +8 -0
- package/src/redis/index.bun.ts +35 -0
- package/src/redis/providers/BunRedisProvider.ts +12 -43
- package/src/redis/providers/BunRedisSubscriberProvider.ts +2 -3
- package/src/redis/providers/NodeRedisProvider.ts +16 -34
- package/src/{server/security → security}/__tests__/BasicAuth.spec.ts +11 -11
- package/src/{server/security → security}/__tests__/ServerSecurityProvider-realm.spec.ts +21 -16
- package/src/{server/security/providers → security/__tests__}/ServerSecurityProvider.spec.ts +5 -5
- package/src/security/index.browser.ts +5 -0
- package/src/security/index.ts +90 -7
- package/src/security/primitives/{$realm.spec.ts → $issuer.spec.ts} +11 -11
- package/src/security/primitives/{$realm.ts → $issuer.ts} +20 -17
- package/src/security/primitives/$role.ts +5 -5
- package/src/security/primitives/$serviceAccount.spec.ts +5 -5
- package/src/security/primitives/$serviceAccount.ts +3 -3
- package/src/{server/security → security}/providers/ServerSecurityProvider.ts +5 -7
- package/src/server/auth/primitives/$auth.ts +10 -10
- package/src/server/auth/primitives/$authCredentials.ts +3 -3
- package/src/server/auth/primitives/$authGithub.ts +3 -3
- package/src/server/auth/primitives/$authGoogle.ts +3 -3
- package/src/server/auth/providers/ServerAuthProvider.ts +13 -13
- package/src/server/cache/providers/ServerCacheProvider.ts +1 -1
- package/src/server/cookies/providers/ServerCookiesProvider.ts +3 -3
- package/src/server/core/providers/NodeHttpServerProvider.ts +25 -6
- package/src/server/core/providers/ServerBodyParserProvider.ts +19 -23
- package/src/server/core/providers/ServerLoggerProvider.ts +23 -19
- package/src/server/core/providers/ServerProvider.ts +144 -21
- package/src/server/core/providers/ServerRouterProvider.ts +259 -115
- package/src/server/core/providers/ServerTimingProvider.ts +2 -2
- package/src/server/links/index.ts +1 -1
- package/src/server/links/providers/LinkProvider.ts +1 -1
- package/src/server/swagger/index.ts +1 -1
- package/src/sms/providers/LocalSmsProvider.spec.ts +153 -111
- package/src/sms/providers/LocalSmsProvider.ts +8 -7
- package/src/vite/helpers/boot.ts +28 -17
- package/src/vite/tasks/buildServer.ts +12 -1
- package/src/vite/tasks/devServer.ts +3 -1
- package/src/vite/tasks/generateCloudflare.ts +7 -0
- package/dist/server/security/index.browser.js +0 -13
- package/dist/server/security/index.browser.js.map +0 -1
- package/dist/server/security/index.d.ts +0 -173
- package/dist/server/security/index.d.ts.map +0 -1
- package/dist/server/security/index.js +0 -311
- package/dist/server/security/index.js.map +0 -1
- package/src/cli/assets/appRouterTs.ts +0 -9
- package/src/cli/assets/mainTs.ts +0 -13
- package/src/server/security/index.browser.ts +0 -10
- package/src/server/security/index.ts +0 -94
- /package/src/{server/security → security}/primitives/$basicAuth.ts +0 -0
- /package/src/{server/security → security}/providers/ServerBasicAuthProvider.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alepha133 from "alepha";
|
|
2
2
|
import { Alepha, AlephaError, KIND, Primitive, Static, StaticEncode, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
|
|
3
3
|
import * as alepha_server0 from "alepha/server";
|
|
4
4
|
import * as alepha_orm50 from "alepha/orm";
|
|
@@ -15,9 +15,6 @@ import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, Update
|
|
|
15
15
|
import "alepha/retry";
|
|
16
16
|
import * as typebox0 from "typebox";
|
|
17
17
|
import "drizzle-orm/sqlite-core";
|
|
18
|
-
import "alepha/lock";
|
|
19
|
-
import "drizzle-orm/postgres-js";
|
|
20
|
-
import "postgres";
|
|
21
18
|
|
|
22
19
|
//#region ../../src/orm/schemas/insertSchema.d.ts
|
|
23
20
|
/**
|
|
@@ -49,114 +46,114 @@ type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
|
|
|
49
46
|
//#region ../../src/orm/primitives/$entity.d.ts
|
|
50
47
|
interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
|
|
51
48
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
* The database table name that will be created for this entity.
|
|
50
|
+
* If not provided, name will be inferred from the $repository variable name.
|
|
51
|
+
*/
|
|
55
52
|
name: string;
|
|
56
53
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
* TypeBox schema defining the table structure and column types.
|
|
55
|
+
*/
|
|
59
56
|
schema: T;
|
|
60
57
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
* Database indexes to create for query optimization.
|
|
59
|
+
*/
|
|
63
60
|
indexes?: (Keys | {
|
|
64
61
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
* Single column to index.
|
|
63
|
+
*/
|
|
67
64
|
column: Keys;
|
|
68
65
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
* Whether this should be a unique index (enforces uniqueness constraint).
|
|
67
|
+
*/
|
|
71
68
|
unique?: boolean;
|
|
72
69
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
* Custom name for the index. If not provided, generates name automatically.
|
|
71
|
+
*/
|
|
75
72
|
name?: string;
|
|
76
73
|
} | {
|
|
77
74
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
* Multiple columns for composite index (order matters for query optimization).
|
|
76
|
+
*/
|
|
80
77
|
columns: Keys[];
|
|
81
78
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
* Whether this should be a unique index (enforces uniqueness constraint).
|
|
80
|
+
*/
|
|
84
81
|
unique?: boolean;
|
|
85
82
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
* Custom name for the index. If not provided, generates name automatically.
|
|
84
|
+
*/
|
|
88
85
|
name?: string;
|
|
89
86
|
})[];
|
|
90
87
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
* Foreign key constraints to maintain referential integrity.
|
|
89
|
+
*/
|
|
93
90
|
foreignKeys?: Array<{
|
|
94
91
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
* Optional name for the foreign key constraint.
|
|
93
|
+
*/
|
|
97
94
|
name?: string;
|
|
98
95
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
* Local columns that reference the foreign table.
|
|
97
|
+
*/
|
|
101
98
|
columns: Array<keyof Static<T>>;
|
|
102
99
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
* Referenced columns in the foreign table.
|
|
101
|
+
* Must be EntityColumn references from other entities.
|
|
102
|
+
*/
|
|
106
103
|
foreignColumns: Array<() => EntityColumn<any>>;
|
|
107
104
|
}>;
|
|
108
105
|
/**
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
106
|
+
* Additional table constraints for data validation.
|
|
107
|
+
*
|
|
108
|
+
* Constraints enforce business rules at the database level, providing
|
|
109
|
+
* an additional layer of data integrity beyond application validation.
|
|
110
|
+
*
|
|
111
|
+
* **Constraint Types**:
|
|
112
|
+
* - **Unique constraints**: Prevent duplicate values across columns
|
|
113
|
+
* - **Check constraints**: Enforce custom validation rules with SQL expressions
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* constraints: [
|
|
118
|
+
* {
|
|
119
|
+
* name: "unique_user_email",
|
|
120
|
+
* columns: ["email"],
|
|
121
|
+
* unique: true
|
|
122
|
+
* },
|
|
123
|
+
* {
|
|
124
|
+
* name: "valid_age_range",
|
|
125
|
+
* columns: ["age"],
|
|
126
|
+
* check: sql`age >= 0 AND age <= 150`
|
|
127
|
+
* },
|
|
128
|
+
* {
|
|
129
|
+
* name: "unique_user_username_per_tenant",
|
|
130
|
+
* columns: ["tenantId", "username"],
|
|
131
|
+
* unique: true
|
|
132
|
+
* }
|
|
133
|
+
* ]
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
139
136
|
constraints?: Array<{
|
|
140
137
|
/**
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
* Columns involved in this constraint.
|
|
139
|
+
*/
|
|
143
140
|
columns: Array<keyof Static<T>>;
|
|
144
141
|
/**
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
* Optional name for the constraint.
|
|
143
|
+
*/
|
|
147
144
|
name?: string;
|
|
148
145
|
/**
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
* Whether this is a unique constraint.
|
|
147
|
+
*/
|
|
151
148
|
unique?: boolean | {};
|
|
152
149
|
/**
|
|
153
|
-
|
|
154
|
-
|
|
150
|
+
* SQL expression for check constraint validation.
|
|
151
|
+
*/
|
|
155
152
|
check?: SQL;
|
|
156
153
|
}>;
|
|
157
154
|
/**
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
* Advanced Drizzle ORM configuration for complex table setups.
|
|
156
|
+
*/
|
|
160
157
|
config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
|
|
161
158
|
}
|
|
162
159
|
declare class EntityPrimitive<T extends TObject = TObject> {
|
|
@@ -204,8 +201,8 @@ type PgSymbols = {
|
|
|
204
201
|
[PG_REF]: PgRefOptions;
|
|
205
202
|
[PG_ENUM]: PgEnumOptions;
|
|
206
203
|
/**
|
|
207
|
-
|
|
208
|
-
|
|
204
|
+
* @deprecated Use `PG_IDENTITY` instead.
|
|
205
|
+
*/
|
|
209
206
|
[PG_SERIAL]: {};
|
|
210
207
|
};
|
|
211
208
|
type PgSymbolKeys = keyof PgSymbols;
|
|
@@ -235,157 +232,48 @@ interface PgRefOptions {
|
|
|
235
232
|
*/
|
|
236
233
|
type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
|
|
237
234
|
//#endregion
|
|
238
|
-
//#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
|
|
239
|
-
declare module "alepha" {
|
|
240
|
-
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
241
|
-
}
|
|
242
|
-
declare const envSchema: alepha253.TObject<{
|
|
243
|
-
/**
|
|
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
|
|
249
|
-
*/
|
|
250
|
-
DATABASE_URL: alepha253.TOptional<alepha253.TString>;
|
|
251
|
-
/**
|
|
252
|
-
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
253
|
-
*
|
|
254
|
-
* It will monkey patch drizzle tables.
|
|
255
|
-
*/
|
|
256
|
-
POSTGRES_SCHEMA: alepha253.TOptional<alepha253.TString>;
|
|
257
|
-
}>;
|
|
258
|
-
//#endregion
|
|
259
|
-
//#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
|
|
260
|
-
/**
|
|
261
|
-
* Configuration options for the Node.js SQLite database provider.
|
|
262
|
-
*/
|
|
263
|
-
declare const nodeSqliteOptions: alepha253.Atom<alepha253.TObject<{
|
|
264
|
-
path: alepha253.TOptional<alepha253.TString>;
|
|
265
|
-
}>, "alepha.postgres.node-sqlite.options">;
|
|
266
|
-
type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
|
|
267
|
-
declare module "alepha" {
|
|
268
|
-
interface State {
|
|
269
|
-
[nodeSqliteOptions.key]: NodeSqliteProviderOptions;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Add a fake support for SQLite in Node.js based on Postgres interfaces.
|
|
274
|
-
*
|
|
275
|
-
* This is NOT a real SQLite provider, it's a workaround to use SQLite with Drizzle ORM.
|
|
276
|
-
* This is NOT recommended for production use.
|
|
277
|
-
*/
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region ../../src/orm/index.d.ts
|
|
280
|
-
declare module "alepha" {
|
|
281
|
-
interface Hooks {
|
|
282
|
-
/**
|
|
283
|
-
* Fires before creating an entity in the repository.
|
|
284
|
-
*/
|
|
285
|
-
"repository:create:before": {
|
|
286
|
-
tableName: string;
|
|
287
|
-
data: any;
|
|
288
|
-
};
|
|
289
|
-
/**
|
|
290
|
-
* Fires after creating an entity in the repository.
|
|
291
|
-
*/
|
|
292
|
-
"repository:create:after": {
|
|
293
|
-
tableName: string;
|
|
294
|
-
data: any;
|
|
295
|
-
entity: any;
|
|
296
|
-
};
|
|
297
|
-
/**
|
|
298
|
-
* Fires before updating entities in the repository.
|
|
299
|
-
*/
|
|
300
|
-
"repository:update:before": {
|
|
301
|
-
tableName: string;
|
|
302
|
-
where: any;
|
|
303
|
-
data: any;
|
|
304
|
-
};
|
|
305
|
-
/**
|
|
306
|
-
* Fires after updating entities in the repository.
|
|
307
|
-
*/
|
|
308
|
-
"repository:update:after": {
|
|
309
|
-
tableName: string;
|
|
310
|
-
where: any;
|
|
311
|
-
data: any;
|
|
312
|
-
entities: any[];
|
|
313
|
-
};
|
|
314
|
-
/**
|
|
315
|
-
* Fires before deleting entities from the repository.
|
|
316
|
-
*/
|
|
317
|
-
"repository:delete:before": {
|
|
318
|
-
tableName: string;
|
|
319
|
-
where: any;
|
|
320
|
-
};
|
|
321
|
-
/**
|
|
322
|
-
* Fires after deleting entities from the repository.
|
|
323
|
-
*/
|
|
324
|
-
"repository:delete:after": {
|
|
325
|
-
tableName: string;
|
|
326
|
-
where: any;
|
|
327
|
-
ids: Array<string | number>;
|
|
328
|
-
};
|
|
329
|
-
/**
|
|
330
|
-
* Fires before reading entities from the repository.
|
|
331
|
-
*/
|
|
332
|
-
"repository:read:before": {
|
|
333
|
-
tableName: string;
|
|
334
|
-
query: any;
|
|
335
|
-
};
|
|
336
|
-
/**
|
|
337
|
-
* Fires after reading entities from the repository.
|
|
338
|
-
*/
|
|
339
|
-
"repository:read:after": {
|
|
340
|
-
tableName: string;
|
|
341
|
-
query: any;
|
|
342
|
-
entities: any[];
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
//#endregion
|
|
347
235
|
//#region ../../src/api/notifications/entities/notifications.d.ts
|
|
348
|
-
declare const notifications: alepha_orm50.EntityPrimitive<
|
|
349
|
-
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
350
|
-
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
351
|
-
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
352
|
-
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
353
|
-
type:
|
|
354
|
-
template:
|
|
355
|
-
category:
|
|
356
|
-
critical:
|
|
357
|
-
sensitive:
|
|
358
|
-
contact:
|
|
359
|
-
variables:
|
|
360
|
-
scheduledAt:
|
|
361
|
-
sentAt:
|
|
362
|
-
error:
|
|
363
|
-
at:
|
|
364
|
-
name:
|
|
365
|
-
message:
|
|
236
|
+
declare const notifications: alepha_orm50.EntityPrimitive<alepha133.TObject<{
|
|
237
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
238
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
239
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
240
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
241
|
+
type: alepha133.TUnsafe<"email" | "sms">;
|
|
242
|
+
template: alepha133.TString;
|
|
243
|
+
category: alepha133.TOptional<alepha133.TString>;
|
|
244
|
+
critical: alepha133.TOptional<alepha133.TBoolean>;
|
|
245
|
+
sensitive: alepha133.TOptional<alepha133.TBoolean>;
|
|
246
|
+
contact: alepha133.TString;
|
|
247
|
+
variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
|
|
248
|
+
scheduledAt: alepha133.TOptional<alepha133.TString>;
|
|
249
|
+
sentAt: alepha133.TOptional<alepha133.TString>;
|
|
250
|
+
error: alepha133.TOptional<alepha133.TObject<{
|
|
251
|
+
at: alepha133.TString;
|
|
252
|
+
name: alepha133.TString;
|
|
253
|
+
message: alepha133.TString;
|
|
366
254
|
}>>;
|
|
367
255
|
}>>;
|
|
368
256
|
type NotificationEntity = Static<typeof notifications.schema>;
|
|
369
257
|
//#endregion
|
|
370
258
|
//#region ../../src/api/notifications/schemas/notificationCreateSchema.d.ts
|
|
371
|
-
declare const notificationCreateSchema:
|
|
372
|
-
type:
|
|
373
|
-
template:
|
|
374
|
-
contact:
|
|
375
|
-
variables:
|
|
259
|
+
declare const notificationCreateSchema: alepha133.TObject<{
|
|
260
|
+
type: alepha133.TUnsafe<"email" | "sms">;
|
|
261
|
+
template: alepha133.TString;
|
|
262
|
+
contact: alepha133.TString;
|
|
263
|
+
variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
|
|
376
264
|
}>;
|
|
377
265
|
type NotificationCreate = Static<typeof notificationCreateSchema>;
|
|
378
266
|
//#endregion
|
|
379
267
|
//#region ../../src/api/notifications/schemas/notificationQuerySchema.d.ts
|
|
380
|
-
declare const notificationQuerySchema:
|
|
381
|
-
page:
|
|
382
|
-
size:
|
|
383
|
-
sort:
|
|
384
|
-
type:
|
|
385
|
-
template:
|
|
386
|
-
contact:
|
|
387
|
-
category:
|
|
388
|
-
status:
|
|
268
|
+
declare const notificationQuerySchema: alepha133.TObject<{
|
|
269
|
+
page: alepha133.TOptional<alepha133.TInteger>;
|
|
270
|
+
size: alepha133.TOptional<alepha133.TInteger>;
|
|
271
|
+
sort: alepha133.TOptional<alepha133.TString>;
|
|
272
|
+
type: alepha133.TOptional<alepha133.TUnsafe<"email" | "sms">>;
|
|
273
|
+
template: alepha133.TOptional<alepha133.TString>;
|
|
274
|
+
contact: alepha133.TOptional<alepha133.TString>;
|
|
275
|
+
category: alepha133.TOptional<alepha133.TString>;
|
|
276
|
+
status: alepha133.TOptional<alepha133.TUnsafe<"pending" | "sent" | "failed">>;
|
|
389
277
|
}>;
|
|
390
278
|
type NotificationQuery = Static<typeof notificationQuerySchema>;
|
|
391
279
|
//#endregion
|
|
@@ -457,24 +345,24 @@ interface NotificationMessage<T extends TObject> {
|
|
|
457
345
|
declare class NotificationSenderService {
|
|
458
346
|
protected readonly alepha: Alepha;
|
|
459
347
|
protected readonly log: alepha_logger0.Logger;
|
|
460
|
-
protected readonly notificationRepository: alepha_orm50.Repository<
|
|
461
|
-
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
462
|
-
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
463
|
-
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
464
|
-
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
465
|
-
type:
|
|
466
|
-
template:
|
|
467
|
-
category:
|
|
468
|
-
critical:
|
|
469
|
-
sensitive:
|
|
470
|
-
contact:
|
|
471
|
-
variables:
|
|
472
|
-
scheduledAt:
|
|
473
|
-
sentAt:
|
|
474
|
-
error:
|
|
475
|
-
at:
|
|
476
|
-
name:
|
|
477
|
-
message:
|
|
348
|
+
protected readonly notificationRepository: alepha_orm50.Repository<alepha133.TObject<{
|
|
349
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
350
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
351
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
352
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
353
|
+
type: alepha133.TUnsafe<"email" | "sms">;
|
|
354
|
+
template: alepha133.TString;
|
|
355
|
+
category: alepha133.TOptional<alepha133.TString>;
|
|
356
|
+
critical: alepha133.TOptional<alepha133.TBoolean>;
|
|
357
|
+
sensitive: alepha133.TOptional<alepha133.TBoolean>;
|
|
358
|
+
contact: alepha133.TString;
|
|
359
|
+
variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
|
|
360
|
+
scheduledAt: alepha133.TOptional<alepha133.TString>;
|
|
361
|
+
sentAt: alepha133.TOptional<alepha133.TString>;
|
|
362
|
+
error: alepha133.TOptional<alepha133.TObject<{
|
|
363
|
+
at: alepha133.TString;
|
|
364
|
+
name: alepha133.TString;
|
|
365
|
+
message: alepha133.TString;
|
|
478
366
|
}>>;
|
|
479
367
|
}>>;
|
|
480
368
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
@@ -491,34 +379,34 @@ declare class NotificationSenderService {
|
|
|
491
379
|
body: string;
|
|
492
380
|
};
|
|
493
381
|
protected load(notification: NotificationEntity): {
|
|
494
|
-
template: NotificationPrimitive<
|
|
382
|
+
template: NotificationPrimitive<alepha133.TObject<alepha133.TProperties>>;
|
|
495
383
|
variables: typebox0.StaticRecord<[], "Decode", {}, {
|
|
496
|
-
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
497
|
-
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
498
|
-
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
499
|
-
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
500
|
-
type:
|
|
501
|
-
template:
|
|
502
|
-
category:
|
|
503
|
-
critical:
|
|
504
|
-
sensitive:
|
|
505
|
-
contact:
|
|
506
|
-
variables:
|
|
507
|
-
scheduledAt:
|
|
508
|
-
sentAt:
|
|
509
|
-
error:
|
|
510
|
-
at:
|
|
511
|
-
name:
|
|
512
|
-
message:
|
|
384
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
385
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
386
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
387
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
388
|
+
type: alepha133.TUnsafe<"email" | "sms">;
|
|
389
|
+
template: alepha133.TString;
|
|
390
|
+
category: alepha133.TOptional<alepha133.TString>;
|
|
391
|
+
critical: alepha133.TOptional<alepha133.TBoolean>;
|
|
392
|
+
sensitive: alepha133.TOptional<alepha133.TBoolean>;
|
|
393
|
+
contact: alepha133.TString;
|
|
394
|
+
variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
|
|
395
|
+
scheduledAt: alepha133.TOptional<alepha133.TString>;
|
|
396
|
+
sentAt: alepha133.TOptional<alepha133.TString>;
|
|
397
|
+
error: alepha133.TOptional<alepha133.TObject<{
|
|
398
|
+
at: alepha133.TString;
|
|
399
|
+
name: alepha133.TString;
|
|
400
|
+
message: alepha133.TString;
|
|
513
401
|
}>>;
|
|
514
|
-
}, "^.*$",
|
|
402
|
+
}, "^.*$", alepha133.TAny>;
|
|
515
403
|
contact: string;
|
|
516
404
|
};
|
|
517
405
|
}
|
|
518
406
|
//#endregion
|
|
519
407
|
//#region ../../src/api/notifications/services/NotificationService.d.ts
|
|
520
|
-
declare const notificationServiceEnvSchema:
|
|
521
|
-
NOTIFICATION_QUEUE:
|
|
408
|
+
declare const notificationServiceEnvSchema: alepha133.TObject<{
|
|
409
|
+
NOTIFICATION_QUEUE: alepha133.TOptional<alepha133.TBoolean>;
|
|
522
410
|
}>;
|
|
523
411
|
declare module "alepha" {
|
|
524
412
|
interface Env extends Partial<Static<typeof notificationServiceEnvSchema>> {}
|
|
@@ -529,77 +417,77 @@ declare class NotificationService {
|
|
|
529
417
|
protected readonly env: {
|
|
530
418
|
NOTIFICATION_QUEUE?: boolean | undefined;
|
|
531
419
|
};
|
|
532
|
-
protected readonly notificationRepository: alepha_orm50.Repository<
|
|
533
|
-
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
534
|
-
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
535
|
-
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
536
|
-
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
537
|
-
type:
|
|
538
|
-
template:
|
|
539
|
-
category:
|
|
540
|
-
critical:
|
|
541
|
-
sensitive:
|
|
542
|
-
contact:
|
|
543
|
-
variables:
|
|
544
|
-
scheduledAt:
|
|
545
|
-
sentAt:
|
|
546
|
-
error:
|
|
547
|
-
at:
|
|
548
|
-
name:
|
|
549
|
-
message:
|
|
420
|
+
protected readonly notificationRepository: alepha_orm50.Repository<alepha133.TObject<{
|
|
421
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
422
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
423
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
424
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
425
|
+
type: alepha133.TUnsafe<"email" | "sms">;
|
|
426
|
+
template: alepha133.TString;
|
|
427
|
+
category: alepha133.TOptional<alepha133.TString>;
|
|
428
|
+
critical: alepha133.TOptional<alepha133.TBoolean>;
|
|
429
|
+
sensitive: alepha133.TOptional<alepha133.TBoolean>;
|
|
430
|
+
contact: alepha133.TString;
|
|
431
|
+
variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
|
|
432
|
+
scheduledAt: alepha133.TOptional<alepha133.TString>;
|
|
433
|
+
sentAt: alepha133.TOptional<alepha133.TString>;
|
|
434
|
+
error: alepha133.TOptional<alepha133.TObject<{
|
|
435
|
+
at: alepha133.TString;
|
|
436
|
+
name: alepha133.TString;
|
|
437
|
+
message: alepha133.TString;
|
|
550
438
|
}>>;
|
|
551
439
|
}>>;
|
|
552
440
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
553
441
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
554
|
-
readonly notificationBatch: alepha_batch0.BatchPrimitive<
|
|
555
|
-
type:
|
|
556
|
-
template:
|
|
557
|
-
contact:
|
|
558
|
-
variables:
|
|
442
|
+
readonly notificationBatch: alepha_batch0.BatchPrimitive<alepha133.TObject<{
|
|
443
|
+
type: alepha133.TUnsafe<"email" | "sms">;
|
|
444
|
+
template: alepha133.TString;
|
|
445
|
+
contact: alepha133.TString;
|
|
446
|
+
variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
|
|
559
447
|
}>, Promise<void>>;
|
|
560
|
-
findNotificationById(id: string): Promise<alepha_orm50.PgStatic<
|
|
561
|
-
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
562
|
-
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
563
|
-
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
564
|
-
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
565
|
-
type:
|
|
566
|
-
template:
|
|
567
|
-
category:
|
|
568
|
-
critical:
|
|
569
|
-
sensitive:
|
|
570
|
-
contact:
|
|
571
|
-
variables:
|
|
572
|
-
scheduledAt:
|
|
573
|
-
sentAt:
|
|
574
|
-
error:
|
|
575
|
-
at:
|
|
576
|
-
name:
|
|
577
|
-
message:
|
|
448
|
+
findNotificationById(id: string): Promise<alepha_orm50.PgStatic<alepha133.TObject<{
|
|
449
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
450
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
451
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
452
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
453
|
+
type: alepha133.TUnsafe<"email" | "sms">;
|
|
454
|
+
template: alepha133.TString;
|
|
455
|
+
category: alepha133.TOptional<alepha133.TString>;
|
|
456
|
+
critical: alepha133.TOptional<alepha133.TBoolean>;
|
|
457
|
+
sensitive: alepha133.TOptional<alepha133.TBoolean>;
|
|
458
|
+
contact: alepha133.TString;
|
|
459
|
+
variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
|
|
460
|
+
scheduledAt: alepha133.TOptional<alepha133.TString>;
|
|
461
|
+
sentAt: alepha133.TOptional<alepha133.TString>;
|
|
462
|
+
error: alepha133.TOptional<alepha133.TObject<{
|
|
463
|
+
at: alepha133.TString;
|
|
464
|
+
name: alepha133.TString;
|
|
465
|
+
message: alepha133.TString;
|
|
578
466
|
}>>;
|
|
579
|
-
}>, alepha_orm50.PgRelationMap<
|
|
580
|
-
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
581
|
-
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
582
|
-
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
583
|
-
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<
|
|
584
|
-
type:
|
|
585
|
-
template:
|
|
586
|
-
category:
|
|
587
|
-
critical:
|
|
588
|
-
sensitive:
|
|
589
|
-
contact:
|
|
590
|
-
variables:
|
|
591
|
-
scheduledAt:
|
|
592
|
-
sentAt:
|
|
593
|
-
error:
|
|
594
|
-
at:
|
|
595
|
-
name:
|
|
596
|
-
message:
|
|
467
|
+
}>, alepha_orm50.PgRelationMap<alepha133.TObject<{
|
|
468
|
+
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
469
|
+
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
470
|
+
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
471
|
+
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
472
|
+
type: alepha133.TUnsafe<"email" | "sms">;
|
|
473
|
+
template: alepha133.TString;
|
|
474
|
+
category: alepha133.TOptional<alepha133.TString>;
|
|
475
|
+
critical: alepha133.TOptional<alepha133.TBoolean>;
|
|
476
|
+
sensitive: alepha133.TOptional<alepha133.TBoolean>;
|
|
477
|
+
contact: alepha133.TString;
|
|
478
|
+
variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
|
|
479
|
+
scheduledAt: alepha133.TOptional<alepha133.TString>;
|
|
480
|
+
sentAt: alepha133.TOptional<alepha133.TString>;
|
|
481
|
+
error: alepha133.TOptional<alepha133.TObject<{
|
|
482
|
+
at: alepha133.TString;
|
|
483
|
+
name: alepha133.TString;
|
|
484
|
+
message: alepha133.TString;
|
|
597
485
|
}>>;
|
|
598
486
|
}>>>>;
|
|
599
487
|
findNotifications(q?: NotificationQuery): Promise<Page<NotificationEntity>>;
|
|
600
488
|
/**
|
|
601
|
-
|
|
602
|
-
|
|
489
|
+
* Create a new notification.
|
|
490
|
+
*/
|
|
603
491
|
createNotification(entry: NotificationCreate): Promise<void>;
|
|
604
492
|
}
|
|
605
493
|
//#endregion
|
|
@@ -609,37 +497,37 @@ declare class AdminNotificationController {
|
|
|
609
497
|
protected readonly group = "admin:notifications";
|
|
610
498
|
protected readonly notificationService: NotificationService;
|
|
611
499
|
/**
|
|
612
|
-
|
|
613
|
-
|
|
500
|
+
* Find notifications with pagination and filtering.
|
|
501
|
+
*/
|
|
614
502
|
readonly findNotifications: alepha_server0.ActionPrimitiveFn<{
|
|
615
|
-
query:
|
|
616
|
-
page:
|
|
617
|
-
size:
|
|
618
|
-
sort:
|
|
619
|
-
type:
|
|
620
|
-
template:
|
|
621
|
-
contact:
|
|
622
|
-
category:
|
|
623
|
-
status:
|
|
503
|
+
query: alepha133.TObject<{
|
|
504
|
+
page: alepha133.TOptional<alepha133.TInteger>;
|
|
505
|
+
size: alepha133.TOptional<alepha133.TInteger>;
|
|
506
|
+
sort: alepha133.TOptional<alepha133.TString>;
|
|
507
|
+
type: alepha133.TOptional<alepha133.TUnsafe<"email" | "sms">>;
|
|
508
|
+
template: alepha133.TOptional<alepha133.TString>;
|
|
509
|
+
contact: alepha133.TOptional<alepha133.TString>;
|
|
510
|
+
category: alepha133.TOptional<alepha133.TString>;
|
|
511
|
+
status: alepha133.TOptional<alepha133.TUnsafe<"pending" | "sent" | "failed">>;
|
|
624
512
|
}>;
|
|
625
|
-
response:
|
|
626
|
-
id: PgAttr<PgAttr<
|
|
627
|
-
version: PgAttr<PgAttr<
|
|
628
|
-
createdAt: PgAttr<PgAttr<
|
|
629
|
-
updatedAt: PgAttr<PgAttr<
|
|
630
|
-
type:
|
|
631
|
-
template:
|
|
632
|
-
category:
|
|
633
|
-
critical:
|
|
634
|
-
sensitive:
|
|
635
|
-
contact:
|
|
636
|
-
variables:
|
|
637
|
-
scheduledAt:
|
|
638
|
-
sentAt:
|
|
639
|
-
error:
|
|
640
|
-
at:
|
|
641
|
-
name:
|
|
642
|
-
message:
|
|
513
|
+
response: alepha133.TPage<alepha133.TObject<{
|
|
514
|
+
id: PgAttr<PgAttr<alepha133.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
515
|
+
version: PgAttr<PgAttr<alepha133.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
516
|
+
createdAt: PgAttr<PgAttr<alepha133.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
517
|
+
updatedAt: PgAttr<PgAttr<alepha133.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
518
|
+
type: alepha133.TUnsafe<"email" | "sms">;
|
|
519
|
+
template: alepha133.TString;
|
|
520
|
+
category: alepha133.TOptional<alepha133.TString>;
|
|
521
|
+
critical: alepha133.TOptional<alepha133.TBoolean>;
|
|
522
|
+
sensitive: alepha133.TOptional<alepha133.TBoolean>;
|
|
523
|
+
contact: alepha133.TString;
|
|
524
|
+
variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
|
|
525
|
+
scheduledAt: alepha133.TOptional<alepha133.TString>;
|
|
526
|
+
sentAt: alepha133.TOptional<alepha133.TString>;
|
|
527
|
+
error: alepha133.TOptional<alepha133.TObject<{
|
|
528
|
+
at: alepha133.TString;
|
|
529
|
+
name: alepha133.TString;
|
|
530
|
+
message: alepha133.TString;
|
|
643
531
|
}>>;
|
|
644
532
|
}>>;
|
|
645
533
|
}>;
|
|
@@ -651,15 +539,15 @@ declare class NotificationJobs {}
|
|
|
651
539
|
//#region ../../src/api/notifications/queues/NotificationQueues.d.ts
|
|
652
540
|
declare class NotificationQueues {
|
|
653
541
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
654
|
-
readonly processNotification: alepha_queue0.QueuePrimitive<
|
|
655
|
-
notificationId:
|
|
542
|
+
readonly processNotification: alepha_queue0.QueuePrimitive<alepha133.TObject<{
|
|
543
|
+
notificationId: alepha133.TString;
|
|
656
544
|
}>>;
|
|
657
545
|
}
|
|
658
546
|
//#endregion
|
|
659
547
|
//#region ../../src/api/notifications/schemas/notificationContactPreferencesSchema.d.ts
|
|
660
|
-
declare const notificationContactPreferencesSchema:
|
|
661
|
-
language:
|
|
662
|
-
exclude:
|
|
548
|
+
declare const notificationContactPreferencesSchema: alepha133.TObject<{
|
|
549
|
+
language: alepha133.TOptional<alepha133.TString>;
|
|
550
|
+
exclude: alepha133.TArray<alepha133.TString>;
|
|
663
551
|
}>;
|
|
664
552
|
type NotificationContactPreferences = Static<typeof notificationContactPreferencesSchema>;
|
|
665
553
|
//#endregion
|
|
@@ -674,7 +562,7 @@ type NotificationContactPreferences = Static<typeof notificationContactPreferenc
|
|
|
674
562
|
*
|
|
675
563
|
* @module alepha.api.notifications
|
|
676
564
|
*/
|
|
677
|
-
declare const AlephaApiNotifications:
|
|
565
|
+
declare const AlephaApiNotifications: alepha133.Service<alepha133.Module>;
|
|
678
566
|
//#endregion
|
|
679
567
|
export { $notification, AdminNotificationController, AlephaApiNotifications, NotificationContactPreferences, NotificationCreate, NotificationEntity, NotificationJobs, NotificationMessage, NotificationPrimitive, NotificationPrimitiveOptions, NotificationPushOptions, NotificationQuery, NotificationQueues, NotificationSenderService, NotificationService, notificationContactPreferencesSchema, notificationCreateSchema, notificationQuerySchema, notificationServiceEnvSchema, notifications };
|
|
680
568
|
//# sourceMappingURL=index.d.ts.map
|