alepha 0.13.1 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api-files/index.browser.js +80 -0
- package/dist/api-files/index.browser.js.map +1 -0
- package/dist/api-files/index.d.ts +28 -91
- package/dist/api-files/index.js +10 -755
- package/dist/api-files/index.js.map +1 -1
- package/dist/api-jobs/index.browser.js +56 -0
- package/dist/api-jobs/index.browser.js.map +1 -0
- package/dist/api-jobs/index.d.ts +46 -46
- package/dist/api-jobs/index.js +13 -13
- package/dist/api-jobs/index.js.map +1 -1
- package/dist/api-notifications/index.browser.js +382 -0
- package/dist/api-notifications/index.browser.js.map +1 -0
- package/dist/api-notifications/index.d.ts +231 -193
- package/dist/api-notifications/index.js +108 -78
- package/dist/api-notifications/index.js.map +1 -1
- package/dist/api-parameters/index.browser.js +29 -0
- package/dist/api-parameters/index.browser.js.map +1 -0
- package/dist/api-parameters/index.d.ts +21 -22
- package/dist/api-parameters/index.js +22 -22
- package/dist/api-parameters/index.js.map +1 -1
- package/dist/api-users/index.d.ts +237 -2001
- package/dist/api-users/index.js +969 -4795
- package/dist/api-users/index.js.map +1 -1
- package/dist/api-verifications/index.browser.js +52 -0
- package/dist/api-verifications/index.browser.js.map +1 -0
- package/dist/api-verifications/index.d.ts +119 -97
- package/dist/api-verifications/index.js +1 -1
- package/dist/api-verifications/index.js.map +1 -1
- package/dist/batch/index.d.ts +13 -13
- package/dist/batch/index.js +8 -13
- package/dist/batch/index.js.map +1 -1
- package/dist/bucket/index.d.ts +14 -14
- package/dist/bucket/index.js +19 -17
- package/dist/bucket/index.js.map +1 -1
- package/dist/cache/index.d.ts +11 -11
- package/dist/cache/index.js +9 -9
- package/dist/cache/index.js.map +1 -1
- package/dist/cli/{dist-Dl9Vl7Ur.js → dist-lGnqsKpu.js} +11 -15
- package/dist/cli/dist-lGnqsKpu.js.map +1 -0
- package/dist/cli/index.d.ts +32 -49
- package/dist/cli/index.js +90 -71
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +20 -19
- package/dist/command/index.js +34 -25
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +218 -218
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +232 -232
- package/dist/core/index.js +218 -218
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +2113 -0
- package/dist/core/index.native.js.map +1 -0
- package/dist/datetime/index.d.ts +9 -9
- package/dist/datetime/index.js +7 -7
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/index.d.ts +16 -16
- package/dist/email/index.js +14 -9
- package/dist/email/index.js.map +1 -1
- package/dist/file/index.js +1 -1
- package/dist/file/index.js.map +1 -1
- package/dist/lock/index.d.ts +9 -9
- package/dist/lock/index.js +8 -8
- package/dist/lock/index.js.map +1 -1
- package/dist/lock-redis/index.js +3 -66
- package/dist/lock-redis/index.js.map +1 -1
- package/dist/logger/index.d.ts +5 -5
- package/dist/logger/index.js +8 -8
- package/dist/logger/index.js.map +1 -1
- package/dist/orm/index.browser.js +114 -114
- package/dist/orm/index.browser.js.map +1 -1
- package/dist/orm/index.d.ts +218 -218
- package/dist/orm/index.js +49 -49
- package/dist/orm/index.js.map +1 -1
- package/dist/queue/index.d.ts +29 -29
- package/dist/queue/index.js +20 -20
- package/dist/queue/index.js.map +1 -1
- package/dist/queue-redis/index.d.ts +2 -2
- package/dist/redis/index.d.ts +4 -4
- package/dist/retry/index.d.ts +19 -19
- package/dist/retry/index.js +7 -7
- package/dist/retry/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +16 -16
- package/dist/scheduler/index.js +9 -9
- package/dist/scheduler/index.js.map +1 -1
- package/dist/security/index.d.ts +53 -53
- package/dist/security/index.js +35 -35
- package/dist/security/index.js.map +1 -1
- package/dist/server/index.browser.js +1 -1
- package/dist/server/index.browser.js.map +1 -1
- package/dist/server/index.d.ts +92 -92
- package/dist/server/index.js +16 -16
- package/dist/server/index.js.map +1 -1
- package/dist/server-auth/index.browser.js +4 -982
- package/dist/server-auth/index.browser.js.map +1 -1
- package/dist/server-auth/index.d.ts +204 -785
- package/dist/server-auth/index.js +47 -1239
- package/dist/server-auth/index.js.map +1 -1
- package/dist/server-cache/index.d.ts +10 -10
- package/dist/server-cache/index.js +2 -2
- package/dist/server-cache/index.js.map +1 -1
- package/dist/server-compress/index.d.ts +4 -4
- package/dist/server-compress/index.js +1 -1
- package/dist/server-compress/index.js.map +1 -1
- package/dist/server-cookies/index.browser.js +8 -8
- package/dist/server-cookies/index.browser.js.map +1 -1
- package/dist/server-cookies/index.d.ts +17 -17
- package/dist/server-cookies/index.js +11 -11
- package/dist/server-cookies/index.js.map +1 -1
- package/dist/server-cors/index.d.ts +17 -17
- package/dist/server-cors/index.js +9 -9
- package/dist/server-cors/index.js.map +1 -1
- package/dist/server-health/index.d.ts +19 -19
- package/dist/server-helmet/index.d.ts +1 -1
- package/dist/server-links/index.browser.js +12 -12
- package/dist/server-links/index.browser.js.map +1 -1
- package/dist/server-links/index.d.ts +59 -251
- package/dist/server-links/index.js +23 -502
- package/dist/server-links/index.js.map +1 -1
- package/dist/server-metrics/index.d.ts +4 -4
- package/dist/server-multipart/index.d.ts +2 -2
- package/dist/server-proxy/index.d.ts +12 -12
- package/dist/server-proxy/index.js +10 -10
- package/dist/server-proxy/index.js.map +1 -1
- package/dist/server-rate-limit/index.d.ts +22 -22
- package/dist/server-rate-limit/index.js +12 -12
- package/dist/server-rate-limit/index.js.map +1 -1
- package/dist/server-security/index.d.ts +22 -22
- package/dist/server-security/index.js +15 -15
- package/dist/server-security/index.js.map +1 -1
- package/dist/server-static/index.d.ts +14 -14
- package/dist/server-static/index.js +26 -10
- package/dist/server-static/index.js.map +1 -1
- package/dist/server-swagger/index.d.ts +25 -184
- package/dist/server-swagger/index.js +21 -724
- package/dist/server-swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +14 -14
- package/dist/sms/index.js +9 -9
- package/dist/sms/index.js.map +1 -1
- package/dist/thread/index.d.ts +11 -11
- package/dist/thread/index.js +17 -17
- package/dist/thread/index.js.map +1 -1
- package/dist/topic/index.d.ts +26 -26
- package/dist/topic/index.js +16 -16
- package/dist/topic/index.js.map +1 -1
- package/dist/topic-redis/index.d.ts +1 -1
- package/dist/vite/index.d.ts +3 -3
- package/dist/vite/index.js +8 -8
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.browser.js +11 -11
- package/dist/websocket/index.browser.js.map +1 -1
- package/dist/websocket/index.d.ts +58 -58
- package/dist/websocket/index.js +13 -13
- package/dist/websocket/index.js.map +1 -1
- package/package.json +128 -57
- package/src/api-files/index.browser.ts +17 -0
- package/src/api-files/services/FileService.ts +5 -7
- package/src/api-jobs/index.browser.ts +15 -0
- package/src/api-jobs/index.ts +1 -1
- package/src/api-jobs/{descriptors → primitives}/$job.ts +8 -8
- package/src/api-jobs/providers/JobProvider.ts +9 -9
- package/src/api-jobs/services/JobService.ts +5 -5
- package/src/api-notifications/controllers/NotificationController.ts +26 -1
- package/src/api-notifications/index.browser.ts +17 -0
- package/src/api-notifications/index.ts +6 -15
- package/src/api-notifications/{descriptors → primitives}/$notification.ts +10 -10
- package/src/api-notifications/schemas/notificationQuerySchema.ts +13 -0
- package/src/api-notifications/services/NotificationSenderService.ts +3 -3
- package/src/api-notifications/services/NotificationService.ts +45 -2
- package/src/api-parameters/index.browser.ts +12 -0
- package/src/api-parameters/index.ts +1 -1
- package/src/api-parameters/{descriptors → primitives}/$config.ts +7 -12
- package/src/api-users/atoms/realmAuthSettingsAtom.ts +3 -1
- package/src/api-users/controllers/UserController.ts +21 -1
- package/src/api-users/index.ts +1 -1
- package/src/api-users/{descriptors → primitives}/$userRealm.ts +40 -17
- package/src/api-users/providers/UserRealmProvider.ts +2 -1
- package/src/api-users/services/SessionService.ts +2 -0
- package/src/api-users/services/UserService.ts +56 -16
- package/src/api-verifications/index.browser.ts +15 -0
- package/src/api-verifications/index.ts +1 -0
- package/src/batch/index.ts +3 -3
- package/src/batch/{descriptors → primitives}/$batch.ts +13 -16
- package/src/batch/providers/BatchProvider.ts +0 -7
- package/src/bucket/index.ts +15 -13
- package/src/bucket/{descriptors → primitives}/$bucket.ts +8 -8
- package/src/bucket/providers/LocalFileStorageProvider.ts +3 -3
- package/src/cache/index.ts +4 -4
- package/src/cache/{descriptors → primitives}/$cache.ts +15 -15
- package/src/cli/apps/AlephaCli.ts +27 -1
- package/src/cli/apps/AlephaPackageBuilderCli.ts +27 -2
- package/src/cli/commands/CoreCommands.ts +6 -2
- package/src/cli/commands/DrizzleCommands.ts +6 -6
- package/src/cli/commands/VerifyCommands.ts +1 -1
- package/src/cli/commands/ViteCommands.ts +8 -2
- package/src/cli/services/ProjectUtils.ts +74 -78
- package/src/command/helpers/Asker.ts +10 -0
- package/src/command/index.ts +5 -5
- package/src/command/{descriptors → primitives}/$command.ts +9 -12
- package/src/command/providers/CliProvider.ts +10 -10
- package/src/core/Alepha.ts +30 -33
- package/src/core/constants/KIND.ts +1 -1
- package/src/core/constants/OPTIONS.ts +1 -1
- package/src/core/helpers/{descriptor.ts → primitive.ts} +18 -18
- package/src/core/helpers/ref.ts +1 -1
- package/src/core/index.shared.ts +8 -8
- package/src/core/{descriptors → primitives}/$context.ts +5 -5
- package/src/core/{descriptors → primitives}/$hook.ts +4 -4
- package/src/core/{descriptors → primitives}/$inject.ts +2 -2
- package/src/core/{descriptors → primitives}/$module.ts +9 -9
- package/src/core/{descriptors → primitives}/$use.ts +2 -2
- package/src/core/providers/CodecManager.ts +1 -1
- package/src/core/providers/JsonSchemaCodec.ts +1 -1
- package/src/core/providers/StateManager.ts +2 -2
- package/src/datetime/index.ts +3 -3
- package/src/datetime/{descriptors → primitives}/$interval.ts +6 -6
- package/src/email/index.ts +17 -9
- package/src/email/{descriptors → primitives}/$email.ts +8 -8
- package/src/file/index.ts +1 -1
- package/src/lock/index.ts +3 -3
- package/src/lock/{descriptors → primitives}/$lock.ts +10 -10
- package/src/logger/index.ts +8 -8
- package/src/logger/{descriptors → primitives}/$logger.ts +2 -2
- package/src/logger/services/Logger.ts +1 -1
- package/src/orm/constants/PG_SYMBOLS.ts +2 -2
- package/src/orm/index.browser.ts +2 -2
- package/src/orm/index.ts +8 -8
- package/src/orm/{descriptors → primitives}/$entity.ts +11 -11
- package/src/orm/{descriptors → primitives}/$repository.ts +2 -2
- package/src/orm/{descriptors → primitives}/$sequence.ts +8 -8
- package/src/orm/{descriptors → primitives}/$transaction.ts +4 -4
- package/src/orm/providers/PostgresTypeProvider.ts +3 -3
- package/src/orm/providers/RepositoryProvider.ts +4 -4
- package/src/orm/providers/drivers/DatabaseProvider.ts +7 -7
- package/src/orm/providers/drivers/NodeSqliteProvider.ts +3 -3
- package/src/orm/services/ModelBuilder.ts +9 -9
- package/src/orm/services/PgRelationManager.ts +2 -2
- package/src/orm/services/PostgresModelBuilder.ts +5 -5
- package/src/orm/services/Repository.ts +7 -7
- package/src/orm/services/SqliteModelBuilder.ts +5 -5
- package/src/queue/index.ts +7 -7
- package/src/queue/{descriptors → primitives}/$consumer.ts +15 -15
- package/src/queue/{descriptors → primitives}/$queue.ts +12 -12
- package/src/queue/providers/WorkerProvider.ts +7 -7
- package/src/retry/index.ts +3 -3
- package/src/retry/{descriptors → primitives}/$retry.ts +14 -14
- package/src/scheduler/index.ts +3 -3
- package/src/scheduler/{descriptors → primitives}/$scheduler.ts +9 -9
- package/src/scheduler/providers/CronProvider.ts +1 -1
- package/src/security/index.ts +9 -9
- package/src/security/{descriptors → primitives}/$permission.ts +7 -7
- package/src/security/{descriptors → primitives}/$realm.ts +6 -12
- package/src/security/{descriptors → primitives}/$role.ts +12 -12
- package/src/security/{descriptors → primitives}/$serviceAccount.ts +8 -8
- package/src/server/index.browser.ts +1 -1
- package/src/server/index.ts +14 -14
- package/src/server/{descriptors → primitives}/$action.ts +13 -13
- package/src/server/{descriptors → primitives}/$route.ts +9 -9
- package/src/server/providers/NodeHttpServerProvider.ts +1 -1
- package/src/server/services/HttpClient.ts +1 -1
- package/src/server-auth/index.browser.ts +1 -1
- package/src/server-auth/index.ts +6 -6
- package/src/server-auth/{descriptors → primitives}/$auth.ts +10 -10
- package/src/server-auth/{descriptors → primitives}/$authCredentials.ts +4 -4
- package/src/server-auth/{descriptors → primitives}/$authGithub.ts +4 -4
- package/src/server-auth/{descriptors → primitives}/$authGoogle.ts +4 -4
- package/src/server-auth/providers/ServerAuthProvider.ts +4 -4
- package/src/server-cache/providers/ServerCacheProvider.ts +7 -7
- package/src/server-compress/providers/ServerCompressProvider.ts +3 -3
- package/src/server-cookies/index.browser.ts +2 -2
- package/src/server-cookies/index.ts +5 -5
- package/src/server-cookies/{descriptors → primitives}/$cookie.browser.ts +12 -12
- package/src/server-cookies/{descriptors → primitives}/$cookie.ts +13 -13
- package/src/server-cookies/providers/ServerCookiesProvider.ts +6 -5
- package/src/server-cookies/services/CookieParser.ts +1 -1
- package/src/server-cors/index.ts +3 -3
- package/src/server-cors/{descriptors → primitives}/$cors.ts +11 -13
- package/src/server-cors/providers/ServerCorsProvider.ts +5 -5
- package/src/server-links/index.browser.ts +5 -5
- package/src/server-links/index.ts +9 -9
- package/src/server-links/{descriptors → primitives}/$remote.ts +11 -11
- package/src/server-links/providers/LinkProvider.ts +7 -7
- package/src/server-links/providers/{RemoteDescriptorProvider.ts → RemotePrimitiveProvider.ts} +6 -6
- package/src/server-links/providers/ServerLinksProvider.ts +3 -3
- package/src/server-proxy/index.ts +3 -3
- package/src/server-proxy/{descriptors → primitives}/$proxy.ts +8 -8
- package/src/server-proxy/providers/ServerProxyProvider.ts +4 -4
- package/src/server-rate-limit/index.ts +6 -6
- package/src/server-rate-limit/{descriptors → primitives}/$rateLimit.ts +13 -13
- package/src/server-rate-limit/providers/ServerRateLimitProvider.ts +5 -5
- package/src/server-security/index.ts +3 -3
- package/src/server-security/{descriptors → primitives}/$basicAuth.ts +13 -13
- package/src/server-security/providers/ServerBasicAuthProvider.ts +5 -5
- package/src/server-security/providers/ServerSecurityProvider.ts +4 -4
- package/src/server-static/index.ts +3 -3
- package/src/server-static/{descriptors → primitives}/$serve.ts +8 -10
- package/src/server-static/providers/ServerStaticProvider.ts +24 -9
- package/src/server-swagger/index.ts +5 -5
- package/src/server-swagger/{descriptors → primitives}/$swagger.ts +9 -9
- package/src/server-swagger/providers/ServerSwaggerProvider.ts +11 -10
- package/src/sms/index.ts +4 -4
- package/src/sms/{descriptors → primitives}/$sms.ts +8 -8
- package/src/thread/index.ts +3 -3
- package/src/thread/{descriptors → primitives}/$thread.ts +13 -13
- package/src/thread/providers/ThreadProvider.ts +7 -9
- package/src/topic/index.ts +5 -5
- package/src/topic/{descriptors → primitives}/$subscriber.ts +14 -14
- package/src/topic/{descriptors → primitives}/$topic.ts +10 -10
- package/src/topic/providers/TopicProvider.ts +4 -4
- package/src/vite/tasks/copyAssets.ts +1 -1
- package/src/vite/tasks/generateSitemap.ts +3 -3
- package/src/vite/tasks/prerenderPages.ts +2 -2
- package/src/vite/tasks/runAlepha.ts +2 -2
- package/src/websocket/index.browser.ts +3 -3
- package/src/websocket/index.shared.ts +2 -2
- package/src/websocket/index.ts +4 -4
- package/src/websocket/interfaces/WebSocketInterfaces.ts +3 -3
- package/src/websocket/{descriptors → primitives}/$channel.ts +10 -10
- package/src/websocket/{descriptors → primitives}/$websocket.ts +8 -8
- package/src/websocket/providers/NodeWebSocketServerProvider.ts +7 -7
- package/src/websocket/providers/WebSocketServerProvider.ts +3 -3
- package/src/websocket/services/WebSocketClient.ts +5 -5
- package/dist/cli/dist-Dl9Vl7Ur.js.map +0 -1
- package/src/api-notifications/providers/MemorySmsProvider.ts +0 -20
- package/src/api-notifications/providers/SmsProvider.ts +0 -8
- /package/src/core/{descriptors → primitives}/$atom.ts +0 -0
- /package/src/core/{descriptors → primitives}/$env.ts +0 -0
- /package/src/server-auth/{descriptors → primitives}/$authApple.ts +0 -0
- /package/src/server-links/{descriptors → primitives}/$client.ts +0 -0
|
@@ -1,189 +1,63 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Alepha,
|
|
1
|
+
import * as alepha1 from "alepha";
|
|
2
|
+
import { Alepha, KIND, Primitive, Static, StaticEncode, TObject } from "alepha";
|
|
3
|
+
import * as alepha_orm0 from "alepha/orm";
|
|
4
|
+
import { Page } from "alepha/orm";
|
|
5
|
+
import * as alepha_server0 from "alepha/server";
|
|
3
6
|
import * as alepha_batch0 from "alepha/batch";
|
|
4
7
|
import { DateTimeProvider } from "alepha/datetime";
|
|
5
8
|
import * as alepha_logger0 from "alepha/logger";
|
|
6
|
-
import * as alepha_orm50 from "alepha/orm";
|
|
7
9
|
import * as alepha_queue0 from "alepha/queue";
|
|
8
10
|
import { EmailProvider } from "alepha/email";
|
|
11
|
+
import { SmsProvider } from "alepha/sms";
|
|
9
12
|
|
|
10
|
-
//#region src/api-notifications/controllers/NotificationController.d.ts
|
|
11
|
-
declare class NotificationController {}
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/api-notifications/schemas/notificationCreateSchema.d.ts
|
|
14
|
-
declare const notificationCreateSchema: alepha122.TObject<{
|
|
15
|
-
type: alepha122.TUnsafe<"email" | "sms">;
|
|
16
|
-
template: alepha122.TString;
|
|
17
|
-
contact: alepha122.TString;
|
|
18
|
-
variables: alepha122.TOptional<alepha122.TRecord<"^.*$", alepha122.TAny>>;
|
|
19
|
-
}>;
|
|
20
|
-
type NotificationCreate = Static<typeof notificationCreateSchema>;
|
|
21
|
-
//#endregion
|
|
22
13
|
//#region src/api-notifications/entities/notifications.d.ts
|
|
23
|
-
declare const notifications:
|
|
24
|
-
id:
|
|
25
|
-
version:
|
|
26
|
-
createdAt:
|
|
27
|
-
updatedAt:
|
|
28
|
-
type:
|
|
29
|
-
template:
|
|
30
|
-
category:
|
|
31
|
-
critical:
|
|
32
|
-
sensitive:
|
|
33
|
-
contact:
|
|
34
|
-
variables:
|
|
35
|
-
scheduledAt:
|
|
36
|
-
sentAt:
|
|
37
|
-
error:
|
|
38
|
-
at:
|
|
39
|
-
name:
|
|
40
|
-
message:
|
|
14
|
+
declare const notifications: alepha_orm0.EntityPrimitive<alepha1.TObject<{
|
|
15
|
+
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
16
|
+
version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
|
|
17
|
+
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
18
|
+
updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
19
|
+
type: alepha1.TUnsafe<"email" | "sms">;
|
|
20
|
+
template: alepha1.TString;
|
|
21
|
+
category: alepha1.TOptional<alepha1.TString>;
|
|
22
|
+
critical: alepha1.TOptional<alepha1.TBoolean>;
|
|
23
|
+
sensitive: alepha1.TOptional<alepha1.TBoolean>;
|
|
24
|
+
contact: alepha1.TString;
|
|
25
|
+
variables: alepha1.TOptional<alepha1.TRecord<"^.*$", alepha1.TAny>>;
|
|
26
|
+
scheduledAt: alepha1.TOptional<alepha1.TString>;
|
|
27
|
+
sentAt: alepha1.TOptional<alepha1.TString>;
|
|
28
|
+
error: alepha1.TOptional<alepha1.TObject<{
|
|
29
|
+
at: alepha1.TString;
|
|
30
|
+
name: alepha1.TString;
|
|
31
|
+
message: alepha1.TString;
|
|
41
32
|
}>>;
|
|
42
33
|
}>>;
|
|
43
34
|
type NotificationEntity = Static<typeof notifications.schema>;
|
|
44
35
|
//#endregion
|
|
45
|
-
//#region src/api-notifications/
|
|
46
|
-
declare
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/api-notifications/services/NotificationSenderService.d.ts
|
|
55
|
-
declare class NotificationSenderService {
|
|
56
|
-
protected readonly alepha: Alepha;
|
|
57
|
-
protected readonly log: alepha_logger0.Logger;
|
|
58
|
-
protected readonly notificationRepository: alepha_orm50.Repository<alepha122.TObject<{
|
|
59
|
-
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
60
|
-
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
61
|
-
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
62
|
-
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
63
|
-
type: alepha122.TUnsafe<"email" | "sms">;
|
|
64
|
-
template: alepha122.TString;
|
|
65
|
-
category: alepha122.TOptional<alepha122.TString>;
|
|
66
|
-
critical: alepha122.TOptional<alepha122.TBoolean>;
|
|
67
|
-
sensitive: alepha122.TOptional<alepha122.TBoolean>;
|
|
68
|
-
contact: alepha122.TString;
|
|
69
|
-
variables: alepha122.TOptional<alepha122.TRecord<"^.*$", alepha122.TAny>>;
|
|
70
|
-
scheduledAt: alepha122.TOptional<alepha122.TString>;
|
|
71
|
-
sentAt: alepha122.TOptional<alepha122.TString>;
|
|
72
|
-
error: alepha122.TOptional<alepha122.TObject<{
|
|
73
|
-
at: alepha122.TString;
|
|
74
|
-
name: alepha122.TString;
|
|
75
|
-
message: alepha122.TString;
|
|
76
|
-
}>>;
|
|
77
|
-
}>>;
|
|
78
|
-
protected readonly dateTimeProvider: DateTimeProvider;
|
|
79
|
-
protected readonly emailProvider: EmailProvider;
|
|
80
|
-
protected readonly smsProvider: SmsProvider;
|
|
81
|
-
send(notificationId: string | NotificationEntity): Promise<void>;
|
|
82
|
-
renderSms(notification: NotificationEntity): {
|
|
83
|
-
to: string;
|
|
84
|
-
message: string;
|
|
85
|
-
};
|
|
86
|
-
renderEmail(notification: NotificationEntity): {
|
|
87
|
-
to: string;
|
|
88
|
-
subject: string;
|
|
89
|
-
body: string;
|
|
90
|
-
};
|
|
91
|
-
protected load(notification: NotificationEntity): {
|
|
92
|
-
template: NotificationDescriptor<alepha122.TObject<alepha122.TProperties>>;
|
|
93
|
-
variables: Record<string, any>;
|
|
94
|
-
contact: string;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
36
|
+
//#region src/api-notifications/schemas/notificationCreateSchema.d.ts
|
|
37
|
+
declare const notificationCreateSchema: alepha1.TObject<{
|
|
38
|
+
type: alepha1.TUnsafe<"email" | "sms">;
|
|
39
|
+
template: alepha1.TString;
|
|
40
|
+
contact: alepha1.TString;
|
|
41
|
+
variables: alepha1.TOptional<alepha1.TRecord<"^.*$", alepha1.TAny>>;
|
|
42
|
+
}>;
|
|
43
|
+
type NotificationCreate = Static<typeof notificationCreateSchema>;
|
|
97
44
|
//#endregion
|
|
98
|
-
//#region src/api-notifications/
|
|
99
|
-
declare const
|
|
100
|
-
|
|
45
|
+
//#region src/api-notifications/schemas/notificationQuerySchema.d.ts
|
|
46
|
+
declare const notificationQuerySchema: alepha1.TObject<{
|
|
47
|
+
page: alepha1.TOptional<alepha1.TInteger>;
|
|
48
|
+
size: alepha1.TOptional<alepha1.TInteger>;
|
|
49
|
+
sort: alepha1.TOptional<alepha1.TString>;
|
|
50
|
+
type: alepha1.TOptional<alepha1.TUnsafe<"email" | "sms">>;
|
|
51
|
+
template: alepha1.TOptional<alepha1.TString>;
|
|
52
|
+
contact: alepha1.TOptional<alepha1.TString>;
|
|
53
|
+
category: alepha1.TOptional<alepha1.TString>;
|
|
54
|
+
status: alepha1.TOptional<alepha1.TUnsafe<"pending" | "sent" | "failed">>;
|
|
101
55
|
}>;
|
|
102
|
-
|
|
103
|
-
interface Env extends Partial<Static<typeof notificationServiceEnvSchema>> {}
|
|
104
|
-
}
|
|
105
|
-
declare class NotificationService {
|
|
106
|
-
protected readonly alepha: Alepha;
|
|
107
|
-
protected readonly log: alepha_logger0.Logger;
|
|
108
|
-
protected readonly env: {
|
|
109
|
-
NOTIFICATION_QUEUE?: boolean | undefined;
|
|
110
|
-
};
|
|
111
|
-
protected readonly notificationRepository: alepha_orm50.Repository<alepha122.TObject<{
|
|
112
|
-
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
113
|
-
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
114
|
-
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
115
|
-
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
116
|
-
type: alepha122.TUnsafe<"email" | "sms">;
|
|
117
|
-
template: alepha122.TString;
|
|
118
|
-
category: alepha122.TOptional<alepha122.TString>;
|
|
119
|
-
critical: alepha122.TOptional<alepha122.TBoolean>;
|
|
120
|
-
sensitive: alepha122.TOptional<alepha122.TBoolean>;
|
|
121
|
-
contact: alepha122.TString;
|
|
122
|
-
variables: alepha122.TOptional<alepha122.TRecord<"^.*$", alepha122.TAny>>;
|
|
123
|
-
scheduledAt: alepha122.TOptional<alepha122.TString>;
|
|
124
|
-
sentAt: alepha122.TOptional<alepha122.TString>;
|
|
125
|
-
error: alepha122.TOptional<alepha122.TObject<{
|
|
126
|
-
at: alepha122.TString;
|
|
127
|
-
name: alepha122.TString;
|
|
128
|
-
message: alepha122.TString;
|
|
129
|
-
}>>;
|
|
130
|
-
}>>;
|
|
131
|
-
protected readonly dateTimeProvider: DateTimeProvider;
|
|
132
|
-
protected readonly notificationSenderService: NotificationSenderService;
|
|
133
|
-
readonly notificationBatch: alepha_batch0.BatchDescriptor<alepha122.TObject<{
|
|
134
|
-
type: alepha122.TUnsafe<"email" | "sms">;
|
|
135
|
-
template: alepha122.TString;
|
|
136
|
-
contact: alepha122.TString;
|
|
137
|
-
variables: alepha122.TOptional<alepha122.TRecord<"^.*$", alepha122.TAny>>;
|
|
138
|
-
}>, Promise<void>>;
|
|
139
|
-
findNotificationById(id: string): Promise<alepha_orm50.PgStatic<alepha122.TObject<{
|
|
140
|
-
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
141
|
-
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
142
|
-
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
143
|
-
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
144
|
-
type: alepha122.TUnsafe<"email" | "sms">;
|
|
145
|
-
template: alepha122.TString;
|
|
146
|
-
category: alepha122.TOptional<alepha122.TString>;
|
|
147
|
-
critical: alepha122.TOptional<alepha122.TBoolean>;
|
|
148
|
-
sensitive: alepha122.TOptional<alepha122.TBoolean>;
|
|
149
|
-
contact: alepha122.TString;
|
|
150
|
-
variables: alepha122.TOptional<alepha122.TRecord<"^.*$", alepha122.TAny>>;
|
|
151
|
-
scheduledAt: alepha122.TOptional<alepha122.TString>;
|
|
152
|
-
sentAt: alepha122.TOptional<alepha122.TString>;
|
|
153
|
-
error: alepha122.TOptional<alepha122.TObject<{
|
|
154
|
-
at: alepha122.TString;
|
|
155
|
-
name: alepha122.TString;
|
|
156
|
-
message: alepha122.TString;
|
|
157
|
-
}>>;
|
|
158
|
-
}>, alepha_orm50.PgRelationMap<alepha122.TObject<{
|
|
159
|
-
id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
|
|
160
|
-
version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
|
|
161
|
-
createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
162
|
-
updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha122.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
|
|
163
|
-
type: alepha122.TUnsafe<"email" | "sms">;
|
|
164
|
-
template: alepha122.TString;
|
|
165
|
-
category: alepha122.TOptional<alepha122.TString>;
|
|
166
|
-
critical: alepha122.TOptional<alepha122.TBoolean>;
|
|
167
|
-
sensitive: alepha122.TOptional<alepha122.TBoolean>;
|
|
168
|
-
contact: alepha122.TString;
|
|
169
|
-
variables: alepha122.TOptional<alepha122.TRecord<"^.*$", alepha122.TAny>>;
|
|
170
|
-
scheduledAt: alepha122.TOptional<alepha122.TString>;
|
|
171
|
-
sentAt: alepha122.TOptional<alepha122.TString>;
|
|
172
|
-
error: alepha122.TOptional<alepha122.TObject<{
|
|
173
|
-
at: alepha122.TString;
|
|
174
|
-
name: alepha122.TString;
|
|
175
|
-
message: alepha122.TString;
|
|
176
|
-
}>>;
|
|
177
|
-
}>>>>;
|
|
178
|
-
/**
|
|
179
|
-
* Create a new notification.
|
|
180
|
-
*/
|
|
181
|
-
createNotification(entry: NotificationCreate): Promise<void>;
|
|
182
|
-
}
|
|
56
|
+
type NotificationQuery = Static<typeof notificationQuerySchema>;
|
|
183
57
|
//#endregion
|
|
184
|
-
//#region src/api-notifications/
|
|
58
|
+
//#region src/api-notifications/primitives/$notification.d.ts
|
|
185
59
|
/**
|
|
186
|
-
* Creates a notification
|
|
60
|
+
* Creates a notification primitive for managing email/SMS notification templates.
|
|
187
61
|
*
|
|
188
62
|
* Provides type-safe, reusable notification templates with multi-language support,
|
|
189
63
|
* variable substitution, and categorization for different notification channels.
|
|
@@ -211,10 +85,10 @@ declare class NotificationService {
|
|
|
211
85
|
* ```
|
|
212
86
|
*/
|
|
213
87
|
declare const $notification: {
|
|
214
|
-
<T extends TObject>(options:
|
|
215
|
-
[KIND]: typeof
|
|
88
|
+
<T extends TObject>(options: NotificationPrimitiveOptions<T>): NotificationPrimitive<T>;
|
|
89
|
+
[KIND]: typeof NotificationPrimitive;
|
|
216
90
|
};
|
|
217
|
-
interface
|
|
91
|
+
interface NotificationPrimitiveOptions<T extends TObject> extends NotificationMessage<T> {
|
|
218
92
|
name?: string;
|
|
219
93
|
description?: string;
|
|
220
94
|
category?: string;
|
|
@@ -225,11 +99,11 @@ interface NotificationDescriptorOptions<T extends TObject> extends NotificationM
|
|
|
225
99
|
};
|
|
226
100
|
schema: T;
|
|
227
101
|
}
|
|
228
|
-
declare class
|
|
102
|
+
declare class NotificationPrimitive<T extends TObject> extends Primitive<NotificationPrimitiveOptions<T>> {
|
|
229
103
|
protected readonly notificationService: NotificationService;
|
|
230
104
|
get name(): string;
|
|
231
105
|
push(options: NotificationPushOptions<T>): Promise<void>;
|
|
232
|
-
configure(options: Partial<
|
|
106
|
+
configure(options: Partial<NotificationPrimitiveOptions<T>>): void;
|
|
233
107
|
}
|
|
234
108
|
interface NotificationPushOptions<T extends TObject> {
|
|
235
109
|
variables: StaticEncode<T>;
|
|
@@ -245,32 +119,194 @@ interface NotificationMessage<T extends TObject> {
|
|
|
245
119
|
};
|
|
246
120
|
}
|
|
247
121
|
//#endregion
|
|
248
|
-
//#region src/api-notifications/
|
|
249
|
-
declare class
|
|
122
|
+
//#region src/api-notifications/services/NotificationSenderService.d.ts
|
|
123
|
+
declare class NotificationSenderService {
|
|
124
|
+
protected readonly alepha: Alepha;
|
|
125
|
+
protected readonly log: alepha_logger0.Logger;
|
|
126
|
+
protected readonly notificationRepository: alepha_orm0.Repository<alepha1.TObject<{
|
|
127
|
+
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
128
|
+
version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
|
|
129
|
+
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
130
|
+
updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
131
|
+
type: alepha1.TUnsafe<"email" | "sms">;
|
|
132
|
+
template: alepha1.TString;
|
|
133
|
+
category: alepha1.TOptional<alepha1.TString>;
|
|
134
|
+
critical: alepha1.TOptional<alepha1.TBoolean>;
|
|
135
|
+
sensitive: alepha1.TOptional<alepha1.TBoolean>;
|
|
136
|
+
contact: alepha1.TString;
|
|
137
|
+
variables: alepha1.TOptional<alepha1.TRecord<"^.*$", alepha1.TAny>>;
|
|
138
|
+
scheduledAt: alepha1.TOptional<alepha1.TString>;
|
|
139
|
+
sentAt: alepha1.TOptional<alepha1.TString>;
|
|
140
|
+
error: alepha1.TOptional<alepha1.TObject<{
|
|
141
|
+
at: alepha1.TString;
|
|
142
|
+
name: alepha1.TString;
|
|
143
|
+
message: alepha1.TString;
|
|
144
|
+
}>>;
|
|
145
|
+
}>>;
|
|
146
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
147
|
+
protected readonly emailProvider: EmailProvider;
|
|
148
|
+
protected readonly smsProvider: SmsProvider;
|
|
149
|
+
send(notificationId: string | NotificationEntity): Promise<void>;
|
|
150
|
+
renderSms(notification: NotificationEntity): {
|
|
151
|
+
to: string;
|
|
152
|
+
message: string;
|
|
153
|
+
};
|
|
154
|
+
renderEmail(notification: NotificationEntity): {
|
|
155
|
+
to: string;
|
|
156
|
+
subject: string;
|
|
157
|
+
body: string;
|
|
158
|
+
};
|
|
159
|
+
protected load(notification: NotificationEntity): {
|
|
160
|
+
template: NotificationPrimitive<alepha1.TObject<alepha1.TProperties>>;
|
|
161
|
+
variables: Record<string, any>;
|
|
162
|
+
contact: string;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
250
165
|
//#endregion
|
|
251
|
-
//#region src/api-notifications/
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
166
|
+
//#region src/api-notifications/services/NotificationService.d.ts
|
|
167
|
+
declare const notificationServiceEnvSchema: alepha1.TObject<{
|
|
168
|
+
NOTIFICATION_QUEUE: alepha1.TOptional<alepha1.TBoolean>;
|
|
169
|
+
}>;
|
|
170
|
+
declare module "alepha" {
|
|
171
|
+
interface Env extends Partial<Static<typeof notificationServiceEnvSchema>> {}
|
|
256
172
|
}
|
|
257
|
-
declare class
|
|
258
|
-
protected
|
|
259
|
-
|
|
173
|
+
declare class NotificationService {
|
|
174
|
+
protected readonly alepha: Alepha;
|
|
175
|
+
protected readonly log: alepha_logger0.Logger;
|
|
176
|
+
protected readonly env: {
|
|
177
|
+
NOTIFICATION_QUEUE?: boolean | undefined;
|
|
178
|
+
};
|
|
179
|
+
protected readonly notificationRepository: alepha_orm0.Repository<alepha1.TObject<{
|
|
180
|
+
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
181
|
+
version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
|
|
182
|
+
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
183
|
+
updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
184
|
+
type: alepha1.TUnsafe<"email" | "sms">;
|
|
185
|
+
template: alepha1.TString;
|
|
186
|
+
category: alepha1.TOptional<alepha1.TString>;
|
|
187
|
+
critical: alepha1.TOptional<alepha1.TBoolean>;
|
|
188
|
+
sensitive: alepha1.TOptional<alepha1.TBoolean>;
|
|
189
|
+
contact: alepha1.TString;
|
|
190
|
+
variables: alepha1.TOptional<alepha1.TRecord<"^.*$", alepha1.TAny>>;
|
|
191
|
+
scheduledAt: alepha1.TOptional<alepha1.TString>;
|
|
192
|
+
sentAt: alepha1.TOptional<alepha1.TString>;
|
|
193
|
+
error: alepha1.TOptional<alepha1.TObject<{
|
|
194
|
+
at: alepha1.TString;
|
|
195
|
+
name: alepha1.TString;
|
|
196
|
+
message: alepha1.TString;
|
|
197
|
+
}>>;
|
|
198
|
+
}>>;
|
|
199
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
200
|
+
protected readonly notificationSenderService: NotificationSenderService;
|
|
201
|
+
readonly notificationBatch: alepha_batch0.BatchPrimitive<alepha1.TObject<{
|
|
202
|
+
type: alepha1.TUnsafe<"email" | "sms">;
|
|
203
|
+
template: alepha1.TString;
|
|
204
|
+
contact: alepha1.TString;
|
|
205
|
+
variables: alepha1.TOptional<alepha1.TRecord<"^.*$", alepha1.TAny>>;
|
|
206
|
+
}>, Promise<void>>;
|
|
207
|
+
findNotificationById(id: string): Promise<alepha_orm0.PgStatic<alepha1.TObject<{
|
|
208
|
+
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
209
|
+
version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
|
|
210
|
+
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
211
|
+
updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
212
|
+
type: alepha1.TUnsafe<"email" | "sms">;
|
|
213
|
+
template: alepha1.TString;
|
|
214
|
+
category: alepha1.TOptional<alepha1.TString>;
|
|
215
|
+
critical: alepha1.TOptional<alepha1.TBoolean>;
|
|
216
|
+
sensitive: alepha1.TOptional<alepha1.TBoolean>;
|
|
217
|
+
contact: alepha1.TString;
|
|
218
|
+
variables: alepha1.TOptional<alepha1.TRecord<"^.*$", alepha1.TAny>>;
|
|
219
|
+
scheduledAt: alepha1.TOptional<alepha1.TString>;
|
|
220
|
+
sentAt: alepha1.TOptional<alepha1.TString>;
|
|
221
|
+
error: alepha1.TOptional<alepha1.TObject<{
|
|
222
|
+
at: alepha1.TString;
|
|
223
|
+
name: alepha1.TString;
|
|
224
|
+
message: alepha1.TString;
|
|
225
|
+
}>>;
|
|
226
|
+
}>, alepha_orm0.PgRelationMap<alepha1.TObject<{
|
|
227
|
+
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
228
|
+
version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
|
|
229
|
+
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
230
|
+
updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
231
|
+
type: alepha1.TUnsafe<"email" | "sms">;
|
|
232
|
+
template: alepha1.TString;
|
|
233
|
+
category: alepha1.TOptional<alepha1.TString>;
|
|
234
|
+
critical: alepha1.TOptional<alepha1.TBoolean>;
|
|
235
|
+
sensitive: alepha1.TOptional<alepha1.TBoolean>;
|
|
236
|
+
contact: alepha1.TString;
|
|
237
|
+
variables: alepha1.TOptional<alepha1.TRecord<"^.*$", alepha1.TAny>>;
|
|
238
|
+
scheduledAt: alepha1.TOptional<alepha1.TString>;
|
|
239
|
+
sentAt: alepha1.TOptional<alepha1.TString>;
|
|
240
|
+
error: alepha1.TOptional<alepha1.TObject<{
|
|
241
|
+
at: alepha1.TString;
|
|
242
|
+
name: alepha1.TString;
|
|
243
|
+
message: alepha1.TString;
|
|
244
|
+
}>>;
|
|
245
|
+
}>>>>;
|
|
246
|
+
findNotifications(q?: NotificationQuery): Promise<Page<NotificationEntity>>;
|
|
247
|
+
/**
|
|
248
|
+
* Create a new notification.
|
|
249
|
+
*/
|
|
250
|
+
createNotification(entry: NotificationCreate): Promise<void>;
|
|
251
|
+
}
|
|
252
|
+
//#endregion
|
|
253
|
+
//#region src/api-notifications/controllers/NotificationController.d.ts
|
|
254
|
+
declare class NotificationController {
|
|
255
|
+
protected readonly url = "/notifications";
|
|
256
|
+
protected readonly group = "notifications";
|
|
257
|
+
protected readonly notificationService: NotificationService;
|
|
258
|
+
/**
|
|
259
|
+
* Find notifications with pagination and filtering.
|
|
260
|
+
*/
|
|
261
|
+
readonly findNotifications: alepha_server0.ActionPrimitiveFn<{
|
|
262
|
+
query: alepha1.TObject<{
|
|
263
|
+
page: alepha1.TOptional<alepha1.TInteger>;
|
|
264
|
+
size: alepha1.TOptional<alepha1.TInteger>;
|
|
265
|
+
sort: alepha1.TOptional<alepha1.TString>;
|
|
266
|
+
type: alepha1.TOptional<alepha1.TUnsafe<"email" | "sms">>;
|
|
267
|
+
template: alepha1.TOptional<alepha1.TString>;
|
|
268
|
+
contact: alepha1.TOptional<alepha1.TString>;
|
|
269
|
+
category: alepha1.TOptional<alepha1.TString>;
|
|
270
|
+
status: alepha1.TOptional<alepha1.TUnsafe<"pending" | "sent" | "failed">>;
|
|
271
|
+
}>;
|
|
272
|
+
response: alepha1.TPage<alepha1.TObject<{
|
|
273
|
+
id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
|
|
274
|
+
version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
|
|
275
|
+
createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
276
|
+
updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
|
|
277
|
+
type: alepha1.TUnsafe<"email" | "sms">;
|
|
278
|
+
template: alepha1.TString;
|
|
279
|
+
category: alepha1.TOptional<alepha1.TString>;
|
|
280
|
+
critical: alepha1.TOptional<alepha1.TBoolean>;
|
|
281
|
+
sensitive: alepha1.TOptional<alepha1.TBoolean>;
|
|
282
|
+
contact: alepha1.TString;
|
|
283
|
+
variables: alepha1.TOptional<alepha1.TRecord<"^.*$", alepha1.TAny>>;
|
|
284
|
+
scheduledAt: alepha1.TOptional<alepha1.TString>;
|
|
285
|
+
sentAt: alepha1.TOptional<alepha1.TString>;
|
|
286
|
+
error: alepha1.TOptional<alepha1.TObject<{
|
|
287
|
+
at: alepha1.TString;
|
|
288
|
+
name: alepha1.TString;
|
|
289
|
+
message: alepha1.TString;
|
|
290
|
+
}>>;
|
|
291
|
+
}>>;
|
|
292
|
+
}>;
|
|
260
293
|
}
|
|
261
294
|
//#endregion
|
|
295
|
+
//#region src/api-notifications/jobs/NotificationJobs.d.ts
|
|
296
|
+
declare class NotificationJobs {}
|
|
297
|
+
//#endregion
|
|
262
298
|
//#region src/api-notifications/queues/NotificationQueues.d.ts
|
|
263
299
|
declare class NotificationQueues {
|
|
264
300
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
265
|
-
readonly processNotification: alepha_queue0.
|
|
266
|
-
notificationId:
|
|
301
|
+
readonly processNotification: alepha_queue0.QueuePrimitive<alepha1.TObject<{
|
|
302
|
+
notificationId: alepha1.TString;
|
|
267
303
|
}>>;
|
|
268
304
|
}
|
|
269
305
|
//#endregion
|
|
270
306
|
//#region src/api-notifications/schemas/notificationContactPreferencesSchema.d.ts
|
|
271
|
-
declare const notificationContactPreferencesSchema:
|
|
272
|
-
language:
|
|
273
|
-
exclude:
|
|
307
|
+
declare const notificationContactPreferencesSchema: alepha1.TObject<{
|
|
308
|
+
language: alepha1.TOptional<alepha1.TString>;
|
|
309
|
+
exclude: alepha1.TArray<alepha1.TString>;
|
|
274
310
|
}>;
|
|
275
311
|
type NotificationContactPreferences = Static<typeof notificationContactPreferencesSchema>;
|
|
276
312
|
//#endregion
|
|
@@ -281,9 +317,11 @@ type NotificationContactPreferences = Static<typeof notificationContactPreferenc
|
|
|
281
317
|
* This module includes notification sending, retrieval, status tracking,
|
|
282
318
|
* and user notification preferences management.
|
|
283
319
|
*
|
|
320
|
+
* Requires `AlephaSms` module to be loaded for SMS notifications.
|
|
321
|
+
*
|
|
284
322
|
* @module alepha.api.notifications
|
|
285
323
|
*/
|
|
286
|
-
declare const AlephaApiNotifications:
|
|
324
|
+
declare const AlephaApiNotifications: alepha1.Service<alepha1.Module>;
|
|
287
325
|
//#endregion
|
|
288
|
-
export { $notification, AlephaApiNotifications,
|
|
326
|
+
export { $notification, AlephaApiNotifications, NotificationContactPreferences, NotificationController, NotificationCreate, NotificationEntity, NotificationJobs, NotificationMessage, NotificationPrimitive, NotificationPrimitiveOptions, NotificationPushOptions, NotificationQuery, NotificationQueues, NotificationSenderService, NotificationService, notificationContactPreferencesSchema, notificationCreateSchema, notificationQuerySchema, notificationServiceEnvSchema, notifications };
|
|
289
327
|
//# sourceMappingURL=index.d.ts.map
|