alepha 0.20.6 → 0.20.7
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/AGENTS.md +0 -1
- package/CLAUDE.md +0 -1
- package/assets/agents-template.md +0 -1
- package/dist/api/audits/index.browser.js +1 -0
- package/dist/api/audits/index.browser.js.map +1 -1
- package/dist/api/audits/index.d.ts +370 -355
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +1 -0
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.browser.js +1 -0
- package/dist/api/files/index.browser.js.map +1 -1
- package/dist/api/files/index.d.ts +179 -170
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +1 -0
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.browser.js +7 -0
- package/dist/api/jobs/index.browser.js.map +1 -1
- package/dist/api/jobs/index.d.ts +271 -262
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +21 -3
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/keys/index.d.ts +198 -192
- package/dist/api/keys/index.d.ts.map +1 -1
- package/dist/api/keys/index.js +1 -0
- package/dist/api/keys/index.js.map +1 -1
- package/dist/api/notifications/index.d.ts +246 -245
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/organizations/index.d.ts +100 -97
- package/dist/api/organizations/index.d.ts.map +1 -1
- package/dist/api/parameters/index.d.ts +323 -320
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/payments/index.d.ts +431 -376
- package/dist/api/payments/index.d.ts.map +1 -1
- package/dist/api/payments/index.js +202 -87
- package/dist/api/payments/index.js.map +1 -1
- package/dist/api/subscriptions/index.d.ts +1695 -0
- package/dist/api/subscriptions/index.d.ts.map +1 -0
- package/dist/api/subscriptions/index.js +1919 -0
- package/dist/api/subscriptions/index.js.map +1 -0
- package/dist/api/users/index.d.ts +863 -847
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/verifications/index.d.ts +126 -125
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/bucket/index.d.ts +3 -2
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/cache/core/index.d.ts +114 -4
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/core/index.js +181 -15
- package/dist/cache/core/index.js.map +1 -1
- package/dist/cache/core/index.workerd.js +181 -15
- package/dist/cache/core/index.workerd.js.map +1 -1
- package/dist/cache/database/index.d.ts +20 -19
- package/dist/cache/database/index.d.ts.map +1 -1
- package/dist/cache/redis/index.d.ts +3 -2
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cli/core/index.d.ts +113 -129
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +75 -7
- package/dist/cli/core/index.js.map +1 -1
- package/dist/cli/devtools/index.d.ts +3 -2
- package/dist/cli/devtools/index.d.ts.map +1 -1
- package/dist/cli/platform/index.d.ts +346 -290
- package/dist/cli/platform/index.d.ts.map +1 -1
- package/dist/cli/platform/index.js +105 -6
- package/dist/cli/platform/index.js.map +1 -1
- package/dist/cli/vendor/index.d.ts +12 -11
- package/dist/cli/vendor/index.d.ts.map +1 -1
- package/dist/command/index.d.ts +5 -4
- package/dist/command/index.d.ts.map +1 -1
- package/dist/core/index.browser.js +1 -1
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +119 -118
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +1 -1
- package/dist/core/index.native.js.map +1 -1
- package/dist/core/index.workerd.js +1 -1
- package/dist/core/index.workerd.js.map +1 -1
- package/dist/crypto/index.d.ts +3 -2
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/email/core/index.d.ts +3 -2
- package/dist/email/core/index.d.ts.map +1 -1
- package/dist/email/smtp/index.d.ts +7 -6
- package/dist/email/smtp/index.d.ts.map +1 -1
- package/dist/lock/core/index.d.ts +5 -4
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/logger/index.d.ts +10 -9
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/mcp/index.d.ts +9 -8
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/core/index.browser.js +9 -3
- package/dist/orm/core/index.browser.js.map +1 -1
- package/dist/orm/core/index.bun.js +31 -10
- package/dist/orm/core/index.bun.js.map +1 -1
- package/dist/orm/core/index.d.ts +33 -14
- package/dist/orm/core/index.d.ts.map +1 -1
- package/dist/orm/core/index.js +31 -10
- package/dist/orm/core/index.js.map +1 -1
- package/dist/orm/postgres/index.d.ts +6 -5
- package/dist/orm/postgres/index.d.ts.map +1 -1
- package/dist/queue/core/index.d.ts +5 -4
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/redis/index.d.ts +3 -2
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/react/form/index.d.ts +5 -0
- package/dist/react/form/index.d.ts.map +1 -1
- package/dist/react/form/index.js +6 -4
- package/dist/react/form/index.js.map +1 -1
- package/dist/react/i18n/index.d.ts +2 -1
- package/dist/react/i18n/index.d.ts.map +1 -1
- package/dist/react/router/index.d.ts +206 -205
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/ui/index.d.ts +11 -11
- package/dist/react/ui/index.d.ts.map +1 -1
- package/dist/scheduler/index.d.ts +3 -2
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/security/index.browser.js +29 -1
- package/dist/security/index.browser.js.map +1 -1
- package/dist/security/index.d.ts +82 -35
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +56 -3
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +163 -158
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +16 -4
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/core/index.d.ts +35 -34
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/cors/index.d.ts +7 -6
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/health/index.d.ts +16 -15
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/links/index.d.ts +51 -50
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.d.ts +6 -5
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/swagger/index.d.ts +2 -1
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/topic/redis/index.d.ts +3 -2
- package/dist/topic/redis/index.d.ts.map +1 -1
- package/package.json +16 -32
- package/src/api/audits/entities/audits.ts +1 -0
- package/src/api/files/entities/files.ts +1 -0
- package/src/api/jobs/__tests__/$job.spec.ts +92 -40
- package/src/api/jobs/entities/jobExecutionEntity.ts +1 -0
- package/src/api/jobs/providers/JobProvider.ts +20 -5
- package/src/api/jobs/schemas/jobConfigAtom.ts +5 -0
- package/src/api/keys/entities/apiKeyEntity.ts +1 -0
- package/src/api/payments/controllers/MockCheckoutController.ts +146 -0
- package/src/api/payments/index.ts +3 -0
- package/src/api/payments/providers/MemoryPaymentProvider.ts +9 -4
- package/src/api/payments/providers/PaymentProvider.ts +25 -9
- package/src/api/payments/services/PaymentService.ts +3 -0
- package/src/api/subscriptions/__tests__/BillingService.spec.ts +218 -0
- package/src/api/subscriptions/__tests__/SubscriptionService.spec.ts +278 -0
- package/src/api/subscriptions/controllers/AdminSubscriptionController.ts +212 -0
- package/src/api/subscriptions/controllers/SubscriptionController.ts +189 -0
- package/src/api/subscriptions/entities/subscriptionEvents.ts +54 -0
- package/src/api/subscriptions/entities/subscriptions.ts +68 -0
- package/src/api/subscriptions/index.ts +133 -0
- package/src/api/subscriptions/jobs/SubscriptionJobs.ts +382 -0
- package/src/api/subscriptions/middleware/$requireLimit.ts +50 -0
- package/src/api/subscriptions/middleware/$requirePlan.ts +49 -0
- package/src/api/subscriptions/notifications/SubscriptionNotifications.ts +110 -0
- package/src/api/subscriptions/schemas/cancelSubscriptionSchema.ts +8 -0
- package/src/api/subscriptions/schemas/changePlanSchema.ts +9 -0
- package/src/api/subscriptions/schemas/createSubscriptionSchema.ts +11 -0
- package/src/api/subscriptions/schemas/entitlementsSchema.ts +21 -0
- package/src/api/subscriptions/schemas/mrrSchema.ts +13 -0
- package/src/api/subscriptions/schemas/planDefinitionSchema.ts +71 -0
- package/src/api/subscriptions/schemas/planResourceSchema.ts +25 -0
- package/src/api/subscriptions/schemas/subscriptionEventResourceSchema.ts +8 -0
- package/src/api/subscriptions/schemas/subscriptionQuerySchema.ts +19 -0
- package/src/api/subscriptions/schemas/subscriptionResourceSchema.ts +6 -0
- package/src/api/subscriptions/schemas/subscriptionSettingsSchema.ts +32 -0
- package/src/api/subscriptions/schemas/subscriptionStatsSchema.ts +23 -0
- package/src/api/subscriptions/services/BillingService.ts +437 -0
- package/src/api/subscriptions/services/SubscriptionConfig.ts +56 -0
- package/src/api/subscriptions/services/SubscriptionService.ts +867 -0
- package/src/api/subscriptions/services/UsageService.ts +118 -0
- package/src/cache/core/__tests__/$cache.memory.spec.ts +450 -0
- package/src/cache/core/__tests__/$cache.swr.spec.ts +394 -0
- package/src/cache/core/index.ts +16 -0
- package/src/cache/core/primitives/$cache.ts +347 -21
- package/src/cli/core/tasks/BuildCloudflareTask.ts +16 -0
- package/src/cli/core/templates/agentMd.ts +39 -4
- package/src/cli/core/templates/biomeJson.ts +25 -1
- package/src/cli/core/templates/saasAdminLayoutTsx.ts +2 -2
- package/src/cli/platform/__tests__/CloudflareAdapter.spec.ts +117 -0
- package/src/cli/platform/adapters/CloudflareAdapter.ts +104 -7
- package/src/cli/platform/atoms/platformOptions.ts +13 -0
- package/src/cli/platform/schemas/platform.ts +1 -0
- package/src/cli/platform/services/CloudflareApi.ts +61 -0
- package/src/cli/platform/services/PlatformOrchestrator.ts +9 -4
- package/src/core/__tests__/$module.spec.ts +2 -2
- package/src/core/primitives/$module.ts +4 -4
- package/src/mcp/providers/McpServerProvider.ts +1 -1
- package/src/orm/core/providers/DatabaseTypeProvider.ts +9 -3
- package/src/orm/core/providers/drivers/DatabaseProvider.ts +1 -1
- package/src/orm/core/schemas/insertSchema.ts +10 -2
- package/src/orm/core/services/Repository.ts +27 -7
- package/src/react/form/hooks/useFormState.ts +8 -1
- package/src/react/form/index.ts +10 -1
- package/src/react/form/services/FormModel.ts +9 -3
- package/src/security/atoms/currentTenantAtom.ts +34 -0
- package/src/security/index.browser.ts +1 -0
- package/src/security/index.ts +12 -1
- package/src/security/primitives/$issuer.ts +17 -1
- package/src/security/providers/SecurityProvider.ts +37 -0
- package/src/server/auth/__tests__/validateRedirectUri.spec.ts +78 -0
- package/src/server/auth/providers/ServerAuthProvider.ts +21 -5
- package/tsconfig.base.json +2 -1
- package/dist/react/websocket/index.d.ts +0 -117
- package/dist/react/websocket/index.d.ts.map +0 -1
- package/dist/react/websocket/index.js +0 -108
- package/dist/react/websocket/index.js.map +0 -1
- package/dist/websocket/index.browser.js +0 -848
- package/dist/websocket/index.browser.js.map +0 -1
- package/dist/websocket/index.d.ts +0 -876
- package/dist/websocket/index.d.ts.map +0 -1
- package/dist/websocket/index.js +0 -1185
- package/dist/websocket/index.js.map +0 -1
- package/src/react/websocket/hooks/useRoom.tsx +0 -251
- package/src/react/websocket/index.ts +0 -7
- package/src/websocket/__tests__/$channel.spec.ts +0 -30
- package/src/websocket/__tests__/$websocket-new.spec.ts +0 -195
- package/src/websocket/__tests__/RoomManager.spec.ts +0 -146
- package/src/websocket/__tests__/websocket-integration.spec.ts +0 -951
- package/src/websocket/errors/WebSocketError.ts +0 -34
- package/src/websocket/index.browser.ts +0 -25
- package/src/websocket/index.shared.ts +0 -8
- package/src/websocket/index.ts +0 -85
- package/src/websocket/interfaces/WebSocketInterfaces.ts +0 -252
- package/src/websocket/primitives/$channel.ts +0 -131
- package/src/websocket/primitives/$websocket.ts +0 -107
- package/src/websocket/providers/NodeWebSocketServerProvider.ts +0 -617
- package/src/websocket/providers/WebSocketServerProvider.ts +0 -56
- package/src/websocket/services/RoomManager.ts +0 -160
- package/src/websocket/services/WebSocketClient.ts +0 -642
- package/src/websocket/services/WebSocketTopicService.ts +0 -108
|
@@ -8,80 +8,17 @@ import { DateTimeProvider } from "alepha/datetime";
|
|
|
8
8
|
import * as _$alepha_logger0 from "alepha/logger";
|
|
9
9
|
import { EmailProvider } from "alepha/email";
|
|
10
10
|
import { SmsProvider } from "alepha/sms";
|
|
11
|
+
import * as _$typebox from "typebox";
|
|
11
12
|
|
|
12
|
-
//#region ../../src/api/notifications/primitives/$notification.d.ts
|
|
13
|
-
/**
|
|
14
|
-
* Creates a notification primitive for managing email/SMS notification templates.
|
|
15
|
-
*
|
|
16
|
-
* Provides type-safe, reusable notification templates with multi-language support,
|
|
17
|
-
* variable substitution, and categorization for different notification channels.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts
|
|
21
|
-
* class NotificationTemplates {
|
|
22
|
-
* welcomeEmail = $notification({
|
|
23
|
-
* name: "welcome-email",
|
|
24
|
-
* category: "onboarding",
|
|
25
|
-
* schema: t.object({ username: t.text(), activationLink: t.text() }),
|
|
26
|
-
* email: {
|
|
27
|
-
* subject: "Welcome to our platform!",
|
|
28
|
-
* body: (vars) => `Hello ${vars.username}, click: ${vars.activationLink}`
|
|
29
|
-
* }
|
|
30
|
-
* });
|
|
31
|
-
*
|
|
32
|
-
* async sendWelcome(user: User) {
|
|
33
|
-
* await this.welcomeEmail.push({
|
|
34
|
-
* variables: { username: user.name, activationLink: generateLink() },
|
|
35
|
-
* contact: user.email
|
|
36
|
-
* });
|
|
37
|
-
* }
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
declare const $notification: {
|
|
42
|
-
<T extends TObject>(options: NotificationPrimitiveOptions<T>): NotificationPrimitive<T>;
|
|
43
|
-
[KIND]: typeof NotificationPrimitive;
|
|
44
|
-
};
|
|
45
|
-
interface NotificationPrimitiveOptions<T extends TObject> extends NotificationMessage<T> {
|
|
46
|
-
name?: string;
|
|
47
|
-
description?: string;
|
|
48
|
-
category?: string;
|
|
49
|
-
critical?: boolean;
|
|
50
|
-
sensitive?: boolean;
|
|
51
|
-
translations?: {
|
|
52
|
-
[lang: string]: NotificationMessage<T>;
|
|
53
|
-
};
|
|
54
|
-
schema: T;
|
|
55
|
-
}
|
|
56
|
-
declare class NotificationPrimitive<T extends TObject> extends Primitive<NotificationPrimitiveOptions<T>> {
|
|
57
|
-
protected readonly notificationJobs: NotificationJobs;
|
|
58
|
-
get name(): string;
|
|
59
|
-
push(options: NotificationPushOptions<T>): Promise<void>;
|
|
60
|
-
configure(options: Partial<NotificationPrimitiveOptions<T>>): void;
|
|
61
|
-
}
|
|
62
|
-
interface NotificationPushOptions<T extends TObject> {
|
|
63
|
-
variables: StaticEncode<T>;
|
|
64
|
-
contact: string;
|
|
65
|
-
}
|
|
66
|
-
interface NotificationMessage<T extends TObject> {
|
|
67
|
-
email?: {
|
|
68
|
-
subject: string;
|
|
69
|
-
body: string | ((variables: Static<T>) => string);
|
|
70
|
-
};
|
|
71
|
-
sms?: {
|
|
72
|
-
message: string | ((variables: Static<T>) => string);
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
//#endregion
|
|
76
13
|
//#region ../../src/api/notifications/schemas/notificationPayloadSchema.d.ts
|
|
77
|
-
declare const notificationPayloadSchema: _$
|
|
78
|
-
type: _$
|
|
79
|
-
template: _$
|
|
80
|
-
contact: _$
|
|
81
|
-
variables: _$
|
|
82
|
-
category: _$
|
|
83
|
-
critical: _$
|
|
84
|
-
sensitive: _$
|
|
14
|
+
declare const notificationPayloadSchema: _$typebox.TObject<{
|
|
15
|
+
type: _$typebox.TUnsafe<"email" | "sms">;
|
|
16
|
+
template: _$typebox.TString;
|
|
17
|
+
contact: _$typebox.TString;
|
|
18
|
+
variables: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
|
|
19
|
+
category: _$typebox.TOptional<_$typebox.TString>;
|
|
20
|
+
critical: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
21
|
+
sensitive: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
85
22
|
}>;
|
|
86
23
|
type NotificationPayload = Static<typeof notificationPayloadSchema>;
|
|
87
24
|
//#endregion
|
|
@@ -114,7 +51,7 @@ declare class NotificationSenderService {
|
|
|
114
51
|
body: string;
|
|
115
52
|
};
|
|
116
53
|
protected load(payload: NotificationPayload): {
|
|
117
|
-
template: NotificationPrimitive<_$
|
|
54
|
+
template: NotificationPrimitive<_$typebox.TObject<_$typebox.TProperties>>;
|
|
118
55
|
variables: Record<string, any>;
|
|
119
56
|
contact: string;
|
|
120
57
|
};
|
|
@@ -142,50 +79,50 @@ declare class NotificationJobs {
|
|
|
142
79
|
protected readonly log: _$alepha_logger0.Logger;
|
|
143
80
|
protected readonly dt: DateTimeProvider;
|
|
144
81
|
protected readonly notificationSenderService: NotificationSenderService;
|
|
145
|
-
protected readonly executions: _$alepha_orm0.Repository<_$
|
|
146
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
147
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
148
|
-
updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
149
|
-
jobName: _$
|
|
150
|
-
key: _$
|
|
151
|
-
status: _$alepha_orm0.PgAttr<_$
|
|
152
|
-
priority: _$alepha_orm0.PgAttr<_$
|
|
153
|
-
attempt: _$alepha_orm0.PgAttr<_$
|
|
154
|
-
maxAttempts: _$alepha_orm0.PgAttr<_$
|
|
155
|
-
payload: _$
|
|
156
|
-
scheduledAt: _$
|
|
157
|
-
startedAt: _$
|
|
158
|
-
completedAt: _$
|
|
159
|
-
error: _$
|
|
160
|
-
logs: _$
|
|
161
|
-
level: _$
|
|
162
|
-
message: _$
|
|
163
|
-
service: _$
|
|
164
|
-
module: _$
|
|
165
|
-
context: _$
|
|
166
|
-
app: _$
|
|
167
|
-
data: _$
|
|
168
|
-
timestamp: _$
|
|
82
|
+
protected readonly executions: _$alepha_orm0.Repository<_$typebox.TObject<{
|
|
83
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
84
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
85
|
+
updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
86
|
+
jobName: _$typebox.TString;
|
|
87
|
+
key: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TNull, _$typebox.TString]>>;
|
|
88
|
+
status: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
89
|
+
priority: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
90
|
+
attempt: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
91
|
+
maxAttempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
92
|
+
payload: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
|
|
93
|
+
scheduledAt: _$typebox.TOptional<_$typebox.TString>;
|
|
94
|
+
startedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
95
|
+
completedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
96
|
+
error: _$typebox.TOptional<_$typebox.TString>;
|
|
97
|
+
logs: _$typebox.TOptional<_$typebox.TArray<_$typebox.TObject<{
|
|
98
|
+
level: _$typebox.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
99
|
+
message: _$typebox.TString;
|
|
100
|
+
service: _$typebox.TString;
|
|
101
|
+
module: _$typebox.TString;
|
|
102
|
+
context: _$typebox.TOptional<_$typebox.TString>;
|
|
103
|
+
app: _$typebox.TOptional<_$typebox.TString>;
|
|
104
|
+
data: _$typebox.TOptional<_$typebox.TAny>;
|
|
105
|
+
timestamp: _$typebox.TNumber;
|
|
169
106
|
}>>>;
|
|
170
|
-
triggeredBy: _$
|
|
171
|
-
triggeredByName: _$
|
|
172
|
-
cancelledBy: _$
|
|
173
|
-
cancelledByName: _$
|
|
107
|
+
triggeredBy: _$typebox.TOptional<_$typebox.TString>;
|
|
108
|
+
triggeredByName: _$typebox.TOptional<_$typebox.TString>;
|
|
109
|
+
cancelledBy: _$typebox.TOptional<_$typebox.TString>;
|
|
110
|
+
cancelledByName: _$typebox.TOptional<_$typebox.TString>;
|
|
174
111
|
}>>;
|
|
175
112
|
/** Runtime-editable config. Admins can change retentionDays without deploy. */
|
|
176
|
-
readonly settings: _$alepha_api_parameters0.ParameterPrimitive<_$
|
|
177
|
-
retentionDays: _$
|
|
113
|
+
readonly settings: _$alepha_api_parameters0.ParameterPrimitive<_$typebox.TObject<{
|
|
114
|
+
retentionDays: _$typebox.TInteger;
|
|
178
115
|
}>>;
|
|
179
|
-
readonly sendNotification: _$alepha_api_jobs0.JobPrimitive<_$
|
|
180
|
-
type: _$
|
|
181
|
-
template: _$
|
|
182
|
-
contact: _$
|
|
183
|
-
variables: _$
|
|
184
|
-
category: _$
|
|
185
|
-
critical: _$
|
|
186
|
-
sensitive: _$
|
|
116
|
+
readonly sendNotification: _$alepha_api_jobs0.JobPrimitive<_$typebox.TObject<{
|
|
117
|
+
type: _$typebox.TUnsafe<"email" | "sms">;
|
|
118
|
+
template: _$typebox.TString;
|
|
119
|
+
contact: _$typebox.TString;
|
|
120
|
+
variables: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
|
|
121
|
+
category: _$typebox.TOptional<_$typebox.TString>;
|
|
122
|
+
critical: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
123
|
+
sensitive: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
187
124
|
}>>;
|
|
188
|
-
readonly purgeOldNotifications: _$alepha_api_jobs0.JobPrimitive<_$
|
|
125
|
+
readonly purgeOldNotifications: _$alepha_api_jobs0.JobPrimitive<_$typebox.TSchema>;
|
|
189
126
|
}
|
|
190
127
|
//#endregion
|
|
191
128
|
//#region ../../src/api/notifications/controllers/AdminNotificationController.d.ts
|
|
@@ -193,106 +130,106 @@ declare class AdminNotificationController {
|
|
|
193
130
|
protected readonly url: string;
|
|
194
131
|
protected readonly group: string;
|
|
195
132
|
protected readonly notificationJobs: NotificationJobs;
|
|
196
|
-
protected readonly executions: _$alepha_orm0.Repository<_$
|
|
197
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
198
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
199
|
-
updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
200
|
-
jobName: _$
|
|
201
|
-
key: _$
|
|
202
|
-
status: _$alepha_orm0.PgAttr<_$
|
|
203
|
-
priority: _$alepha_orm0.PgAttr<_$
|
|
204
|
-
attempt: _$alepha_orm0.PgAttr<_$
|
|
205
|
-
maxAttempts: _$alepha_orm0.PgAttr<_$
|
|
206
|
-
payload: _$
|
|
207
|
-
scheduledAt: _$
|
|
208
|
-
startedAt: _$
|
|
209
|
-
completedAt: _$
|
|
210
|
-
error: _$
|
|
211
|
-
logs: _$
|
|
212
|
-
level: _$
|
|
213
|
-
message: _$
|
|
214
|
-
service: _$
|
|
215
|
-
module: _$
|
|
216
|
-
context: _$
|
|
217
|
-
app: _$
|
|
218
|
-
data: _$
|
|
219
|
-
timestamp: _$
|
|
133
|
+
protected readonly executions: _$alepha_orm0.Repository<_$typebox.TObject<{
|
|
134
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
135
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
136
|
+
updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
137
|
+
jobName: _$typebox.TString;
|
|
138
|
+
key: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TNull, _$typebox.TString]>>;
|
|
139
|
+
status: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
140
|
+
priority: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
141
|
+
attempt: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
142
|
+
maxAttempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
143
|
+
payload: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
|
|
144
|
+
scheduledAt: _$typebox.TOptional<_$typebox.TString>;
|
|
145
|
+
startedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
146
|
+
completedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
147
|
+
error: _$typebox.TOptional<_$typebox.TString>;
|
|
148
|
+
logs: _$typebox.TOptional<_$typebox.TArray<_$typebox.TObject<{
|
|
149
|
+
level: _$typebox.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
150
|
+
message: _$typebox.TString;
|
|
151
|
+
service: _$typebox.TString;
|
|
152
|
+
module: _$typebox.TString;
|
|
153
|
+
context: _$typebox.TOptional<_$typebox.TString>;
|
|
154
|
+
app: _$typebox.TOptional<_$typebox.TString>;
|
|
155
|
+
data: _$typebox.TOptional<_$typebox.TAny>;
|
|
156
|
+
timestamp: _$typebox.TNumber;
|
|
220
157
|
}>>>;
|
|
221
|
-
triggeredBy: _$
|
|
222
|
-
triggeredByName: _$
|
|
223
|
-
cancelledBy: _$
|
|
224
|
-
cancelledByName: _$
|
|
158
|
+
triggeredBy: _$typebox.TOptional<_$typebox.TString>;
|
|
159
|
+
triggeredByName: _$typebox.TOptional<_$typebox.TString>;
|
|
160
|
+
cancelledBy: _$typebox.TOptional<_$typebox.TString>;
|
|
161
|
+
cancelledByName: _$typebox.TOptional<_$typebox.TString>;
|
|
225
162
|
}>>;
|
|
226
163
|
protected get jobName(): string;
|
|
227
164
|
readonly findNotifications: _$alepha_server0.ActionPrimitiveFn<{
|
|
228
|
-
query: _$
|
|
229
|
-
page: _$
|
|
230
|
-
size: _$
|
|
231
|
-
sort: _$
|
|
232
|
-
status: _$
|
|
165
|
+
query: _$typebox.TObject<{
|
|
166
|
+
page: _$typebox.TOptional<_$typebox.TInteger>;
|
|
167
|
+
size: _$typebox.TOptional<_$typebox.TInteger>;
|
|
168
|
+
sort: _$typebox.TOptional<_$typebox.TString>;
|
|
169
|
+
status: _$typebox.TOptional<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "cancelled" | "retrying" | "completed" | "dead">>;
|
|
233
170
|
}>;
|
|
234
|
-
response: _$alepha.TPage<_$
|
|
235
|
-
id: _$
|
|
236
|
-
createdAt: _$
|
|
237
|
-
status: _$
|
|
238
|
-
template: _$
|
|
239
|
-
type: _$
|
|
240
|
-
contact: _$
|
|
241
|
-
category: _$
|
|
242
|
-
critical: _$
|
|
243
|
-
sensitive: _$
|
|
244
|
-
startedAt: _$
|
|
245
|
-
completedAt: _$
|
|
246
|
-
error: _$
|
|
171
|
+
response: _$alepha.TPage<_$typebox.TObject<{
|
|
172
|
+
id: _$typebox.TString;
|
|
173
|
+
createdAt: _$typebox.TString;
|
|
174
|
+
status: _$typebox.TString;
|
|
175
|
+
template: _$typebox.TOptional<_$typebox.TString>;
|
|
176
|
+
type: _$typebox.TOptional<_$typebox.TString>;
|
|
177
|
+
contact: _$typebox.TOptional<_$typebox.TString>;
|
|
178
|
+
category: _$typebox.TOptional<_$typebox.TString>;
|
|
179
|
+
critical: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
180
|
+
sensitive: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
181
|
+
startedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
182
|
+
completedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
183
|
+
error: _$typebox.TOptional<_$typebox.TString>;
|
|
247
184
|
}>>;
|
|
248
185
|
}>;
|
|
249
186
|
readonly getNotification: _$alepha_server0.ActionPrimitiveFn<{
|
|
250
|
-
params: _$
|
|
251
|
-
id: _$
|
|
187
|
+
params: _$typebox.TObject<{
|
|
188
|
+
id: _$typebox.TString;
|
|
252
189
|
}>;
|
|
253
|
-
response: _$
|
|
254
|
-
id: _$
|
|
255
|
-
createdAt: _$
|
|
256
|
-
status: _$
|
|
257
|
-
template: _$
|
|
258
|
-
type: _$
|
|
259
|
-
contact: _$
|
|
260
|
-
category: _$
|
|
261
|
-
critical: _$
|
|
262
|
-
sensitive: _$
|
|
263
|
-
startedAt: _$
|
|
264
|
-
completedAt: _$
|
|
265
|
-
error: _$
|
|
266
|
-
variables: _$
|
|
267
|
-
rendered: _$
|
|
268
|
-
logs: _$
|
|
269
|
-
level: _$
|
|
270
|
-
message: _$
|
|
271
|
-
service: _$
|
|
272
|
-
module: _$
|
|
273
|
-
context: _$
|
|
274
|
-
app: _$
|
|
275
|
-
data: _$
|
|
276
|
-
timestamp: _$
|
|
190
|
+
response: _$typebox.TObject<{
|
|
191
|
+
id: _$typebox.TString;
|
|
192
|
+
createdAt: _$typebox.TString;
|
|
193
|
+
status: _$typebox.TString;
|
|
194
|
+
template: _$typebox.TOptional<_$typebox.TString>;
|
|
195
|
+
type: _$typebox.TOptional<_$typebox.TString>;
|
|
196
|
+
contact: _$typebox.TOptional<_$typebox.TString>;
|
|
197
|
+
category: _$typebox.TOptional<_$typebox.TString>;
|
|
198
|
+
critical: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
199
|
+
sensitive: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
200
|
+
startedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
201
|
+
completedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
202
|
+
error: _$typebox.TOptional<_$typebox.TString>;
|
|
203
|
+
variables: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
|
|
204
|
+
rendered: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
|
|
205
|
+
logs: _$typebox.TOptional<_$typebox.TArray<_$typebox.TObject<{
|
|
206
|
+
level: _$typebox.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
207
|
+
message: _$typebox.TString;
|
|
208
|
+
service: _$typebox.TString;
|
|
209
|
+
module: _$typebox.TString;
|
|
210
|
+
context: _$typebox.TOptional<_$typebox.TString>;
|
|
211
|
+
app: _$typebox.TOptional<_$typebox.TString>;
|
|
212
|
+
data: _$typebox.TOptional<_$typebox.TAny>;
|
|
213
|
+
timestamp: _$typebox.TNumber;
|
|
277
214
|
}>>>;
|
|
278
215
|
}>;
|
|
279
216
|
}>;
|
|
280
217
|
readonly deleteNotification: _$alepha_server0.ActionPrimitiveFn<{
|
|
281
|
-
params: _$
|
|
282
|
-
id: _$
|
|
218
|
+
params: _$typebox.TObject<{
|
|
219
|
+
id: _$typebox.TString;
|
|
283
220
|
}>;
|
|
284
|
-
response: _$
|
|
285
|
-
ok: _$
|
|
286
|
-
id: _$
|
|
287
|
-
count: _$
|
|
221
|
+
response: _$typebox.TObject<{
|
|
222
|
+
ok: _$typebox.TBoolean;
|
|
223
|
+
id: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TString, _$typebox.TInteger]>>;
|
|
224
|
+
count: _$typebox.TOptional<_$typebox.TNumber>;
|
|
288
225
|
}>;
|
|
289
226
|
}>;
|
|
290
227
|
readonly deleteNotifications: _$alepha_server0.ActionPrimitiveFn<{
|
|
291
|
-
body: _$
|
|
292
|
-
ids: _$
|
|
228
|
+
body: _$typebox.TObject<{
|
|
229
|
+
ids: _$typebox.TArray<_$typebox.TString>;
|
|
293
230
|
}>;
|
|
294
|
-
response: _$
|
|
295
|
-
deleted: _$
|
|
231
|
+
response: _$typebox.TObject<{
|
|
232
|
+
deleted: _$typebox.TArray<_$typebox.TString>;
|
|
296
233
|
}>;
|
|
297
234
|
}>;
|
|
298
235
|
protected toResource(exec: Record<string, unknown>): {
|
|
@@ -327,75 +264,139 @@ declare class AdminNotificationController {
|
|
|
327
264
|
};
|
|
328
265
|
}
|
|
329
266
|
//#endregion
|
|
267
|
+
//#region ../../src/api/notifications/primitives/$notification.d.ts
|
|
268
|
+
/**
|
|
269
|
+
* Creates a notification primitive for managing email/SMS notification templates.
|
|
270
|
+
*
|
|
271
|
+
* Provides type-safe, reusable notification templates with multi-language support,
|
|
272
|
+
* variable substitution, and categorization for different notification channels.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```ts
|
|
276
|
+
* class NotificationTemplates {
|
|
277
|
+
* welcomeEmail = $notification({
|
|
278
|
+
* name: "welcome-email",
|
|
279
|
+
* category: "onboarding",
|
|
280
|
+
* schema: t.object({ username: t.text(), activationLink: t.text() }),
|
|
281
|
+
* email: {
|
|
282
|
+
* subject: "Welcome to our platform!",
|
|
283
|
+
* body: (vars) => `Hello ${vars.username}, click: ${vars.activationLink}`
|
|
284
|
+
* }
|
|
285
|
+
* });
|
|
286
|
+
*
|
|
287
|
+
* async sendWelcome(user: User) {
|
|
288
|
+
* await this.welcomeEmail.push({
|
|
289
|
+
* variables: { username: user.name, activationLink: generateLink() },
|
|
290
|
+
* contact: user.email
|
|
291
|
+
* });
|
|
292
|
+
* }
|
|
293
|
+
* }
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
296
|
+
declare const $notification: {
|
|
297
|
+
<T extends TObject>(options: NotificationPrimitiveOptions<T>): NotificationPrimitive<T>;
|
|
298
|
+
[KIND]: typeof NotificationPrimitive;
|
|
299
|
+
};
|
|
300
|
+
interface NotificationPrimitiveOptions<T extends TObject> extends NotificationMessage<T> {
|
|
301
|
+
name?: string;
|
|
302
|
+
description?: string;
|
|
303
|
+
category?: string;
|
|
304
|
+
critical?: boolean;
|
|
305
|
+
sensitive?: boolean;
|
|
306
|
+
translations?: {
|
|
307
|
+
[lang: string]: NotificationMessage<T>;
|
|
308
|
+
};
|
|
309
|
+
schema: T;
|
|
310
|
+
}
|
|
311
|
+
declare class NotificationPrimitive<T extends TObject> extends Primitive<NotificationPrimitiveOptions<T>> {
|
|
312
|
+
protected readonly notificationJobs: NotificationJobs;
|
|
313
|
+
get name(): string;
|
|
314
|
+
push(options: NotificationPushOptions<T>): Promise<void>;
|
|
315
|
+
configure(options: Partial<NotificationPrimitiveOptions<T>>): void;
|
|
316
|
+
}
|
|
317
|
+
interface NotificationPushOptions<T extends TObject> {
|
|
318
|
+
variables: StaticEncode<T>;
|
|
319
|
+
contact: string;
|
|
320
|
+
}
|
|
321
|
+
interface NotificationMessage<T extends TObject> {
|
|
322
|
+
email?: {
|
|
323
|
+
subject: string;
|
|
324
|
+
body: string | ((variables: Static<T>) => string);
|
|
325
|
+
};
|
|
326
|
+
sms?: {
|
|
327
|
+
message: string | ((variables: Static<T>) => string);
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
//#endregion
|
|
330
331
|
//#region ../../src/api/notifications/schemas/notificationContactPreferencesSchema.d.ts
|
|
331
|
-
declare const notificationContactPreferencesSchema: _$
|
|
332
|
-
language: _$
|
|
333
|
-
exclude: _$
|
|
332
|
+
declare const notificationContactPreferencesSchema: _$typebox.TObject<{
|
|
333
|
+
language: _$typebox.TOptional<_$typebox.TString>;
|
|
334
|
+
exclude: _$typebox.TArray<_$typebox.TString>;
|
|
334
335
|
}>;
|
|
335
336
|
type NotificationContactPreferences = Static<typeof notificationContactPreferencesSchema>;
|
|
336
337
|
//#endregion
|
|
337
338
|
//#region ../../src/api/notifications/schemas/notificationContactSchema.d.ts
|
|
338
|
-
declare const notificationContactSchema: _$
|
|
339
|
-
email: _$
|
|
340
|
-
phoneNumber: _$
|
|
341
|
-
firstName: _$
|
|
342
|
-
lastName: _$
|
|
343
|
-
language: _$
|
|
339
|
+
declare const notificationContactSchema: _$typebox.TObject<{
|
|
340
|
+
email: _$typebox.TOptional<_$typebox.TString>;
|
|
341
|
+
phoneNumber: _$typebox.TOptional<_$typebox.TString>;
|
|
342
|
+
firstName: _$typebox.TOptional<_$typebox.TString>;
|
|
343
|
+
lastName: _$typebox.TOptional<_$typebox.TString>;
|
|
344
|
+
language: _$typebox.TOptional<_$typebox.TString>;
|
|
344
345
|
}>;
|
|
345
346
|
type NotificationContact = Static<typeof notificationContactSchema>;
|
|
346
347
|
//#endregion
|
|
347
348
|
//#region ../../src/api/notifications/schemas/notificationDetailResourceSchema.d.ts
|
|
348
|
-
declare const notificationDetailResourceSchema: _$
|
|
349
|
-
id: _$
|
|
350
|
-
createdAt: _$
|
|
351
|
-
status: _$
|
|
352
|
-
template: _$
|
|
353
|
-
type: _$
|
|
354
|
-
contact: _$
|
|
355
|
-
category: _$
|
|
356
|
-
critical: _$
|
|
357
|
-
sensitive: _$
|
|
358
|
-
startedAt: _$
|
|
359
|
-
completedAt: _$
|
|
360
|
-
error: _$
|
|
361
|
-
variables: _$
|
|
362
|
-
rendered: _$
|
|
363
|
-
logs: _$
|
|
364
|
-
level: _$
|
|
365
|
-
message: _$
|
|
366
|
-
service: _$
|
|
367
|
-
module: _$
|
|
368
|
-
context: _$
|
|
369
|
-
app: _$
|
|
370
|
-
data: _$
|
|
371
|
-
timestamp: _$
|
|
349
|
+
declare const notificationDetailResourceSchema: _$typebox.TObject<{
|
|
350
|
+
id: _$typebox.TString;
|
|
351
|
+
createdAt: _$typebox.TString;
|
|
352
|
+
status: _$typebox.TString;
|
|
353
|
+
template: _$typebox.TOptional<_$typebox.TString>;
|
|
354
|
+
type: _$typebox.TOptional<_$typebox.TString>;
|
|
355
|
+
contact: _$typebox.TOptional<_$typebox.TString>;
|
|
356
|
+
category: _$typebox.TOptional<_$typebox.TString>;
|
|
357
|
+
critical: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
358
|
+
sensitive: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
359
|
+
startedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
360
|
+
completedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
361
|
+
error: _$typebox.TOptional<_$typebox.TString>;
|
|
362
|
+
variables: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
|
|
363
|
+
rendered: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
|
|
364
|
+
logs: _$typebox.TOptional<_$typebox.TArray<_$typebox.TObject<{
|
|
365
|
+
level: _$typebox.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
366
|
+
message: _$typebox.TString;
|
|
367
|
+
service: _$typebox.TString;
|
|
368
|
+
module: _$typebox.TString;
|
|
369
|
+
context: _$typebox.TOptional<_$typebox.TString>;
|
|
370
|
+
app: _$typebox.TOptional<_$typebox.TString>;
|
|
371
|
+
data: _$typebox.TOptional<_$typebox.TAny>;
|
|
372
|
+
timestamp: _$typebox.TNumber;
|
|
372
373
|
}>>>;
|
|
373
374
|
}>;
|
|
374
375
|
type NotificationDetailResource = Static<typeof notificationDetailResourceSchema>;
|
|
375
376
|
//#endregion
|
|
376
377
|
//#region ../../src/api/notifications/schemas/notificationQuerySchema.d.ts
|
|
377
|
-
declare const notificationQuerySchema: _$
|
|
378
|
-
page: _$
|
|
379
|
-
size: _$
|
|
380
|
-
sort: _$
|
|
381
|
-
status: _$
|
|
378
|
+
declare const notificationQuerySchema: _$typebox.TObject<{
|
|
379
|
+
page: _$typebox.TOptional<_$typebox.TInteger>;
|
|
380
|
+
size: _$typebox.TOptional<_$typebox.TInteger>;
|
|
381
|
+
sort: _$typebox.TOptional<_$typebox.TString>;
|
|
382
|
+
status: _$typebox.TOptional<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "cancelled" | "retrying" | "completed" | "dead">>;
|
|
382
383
|
}>;
|
|
383
384
|
type NotificationQuery = Static<typeof notificationQuerySchema>;
|
|
384
385
|
//#endregion
|
|
385
386
|
//#region ../../src/api/notifications/schemas/notificationResourceSchema.d.ts
|
|
386
|
-
declare const notificationResourceSchema: _$
|
|
387
|
-
id: _$
|
|
388
|
-
createdAt: _$
|
|
389
|
-
status: _$
|
|
390
|
-
template: _$
|
|
391
|
-
type: _$
|
|
392
|
-
contact: _$
|
|
393
|
-
category: _$
|
|
394
|
-
critical: _$
|
|
395
|
-
sensitive: _$
|
|
396
|
-
startedAt: _$
|
|
397
|
-
completedAt: _$
|
|
398
|
-
error: _$
|
|
387
|
+
declare const notificationResourceSchema: _$typebox.TObject<{
|
|
388
|
+
id: _$typebox.TString;
|
|
389
|
+
createdAt: _$typebox.TString;
|
|
390
|
+
status: _$typebox.TString;
|
|
391
|
+
template: _$typebox.TOptional<_$typebox.TString>;
|
|
392
|
+
type: _$typebox.TOptional<_$typebox.TString>;
|
|
393
|
+
contact: _$typebox.TOptional<_$typebox.TString>;
|
|
394
|
+
category: _$typebox.TOptional<_$typebox.TString>;
|
|
395
|
+
critical: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
396
|
+
sensitive: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
397
|
+
startedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
398
|
+
completedAt: _$typebox.TOptional<_$typebox.TString>;
|
|
399
|
+
error: _$typebox.TOptional<_$typebox.TString>;
|
|
399
400
|
}>;
|
|
400
401
|
type NotificationResource = Static<typeof notificationResourceSchema>;
|
|
401
402
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/api/notifications/
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/api/notifications/schemas/notificationPayloadSchema.ts","../../../src/api/notifications/services/NotificationSenderService.ts","../../../src/api/notifications/jobs/NotificationJobs.ts","../../../src/api/notifications/controllers/AdminNotificationController.ts","../../../src/api/notifications/primitives/$notification.ts","../../../src/api/notifications/schemas/notificationContactPreferencesSchema.ts","../../../src/api/notifications/schemas/notificationContactSchema.ts","../../../src/api/notifications/schemas/notificationDetailResourceSchema.ts","../../../src/api/notifications/schemas/notificationQuerySchema.ts","../../../src/api/notifications/schemas/notificationResourceSchema.ts","../../../src/api/notifications/index.ts"],"mappings":";;;;;;;;;;;;;cAEa,yBAAA,YAAyB,OAAA;QAQpC,SAAA,CAAA,OAAA;;;;;;;;KAEU,mBAAA,GAAsB,MAAA,QAAc,yBAAA;;;cCLnC,yBAAA;EAAA,mBACQ,MAAA,EAAM,MAAA;EAAA,mBACN,GAAA,EADM,gBAAA,CACH,MAAA;EAAA,mBACH,aAAA,EAAa,aAAA;EAAA,mBACb,WAAA,EAAW,WAAA;EAEjB,IAAA,CAAK,OAAA,EAAS,mBAAA,GAAmB,OAAA;;;;;;;;;;;;;EAqCvC,SAAA,CAAU,OAAA,EAAS,mBAAA;;;;EAkBnB,WAAA,CAAY,OAAA,EAAS,mBAAA;;;;;YAmBlB,IAAA,CAAK,OAAA,EAAS,mBAAA;sDAAmB,SAAA,CAAA,WAAA;;;;;;;;;;;;;;;;;;ADrF7C;;;;;;cEwBa,gBAAA;EAAA,mBACQ,GAAA,EADQ,gBAAA,CACL,MAAA;EAAA,mBACH,EAAA,EAAE,gBAAA;EAAA,mBACF,yBAAA,EAAyB,yBAAA;EAAA,mBAGzB,UAAA,EAAU,aAAA,CAAA,UAAA,WAAA,OAAA;kDAHe,SAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EFjBlC;EAAA,SEuBM,QAAA,EAAQ,wBAAA,CAAA,kBAAA,WAAA,OAAA;mBAHK,SAAA,CAAA,QAAA;EAAA;EAAA,SAkBb,gBAAA,EAAgB,kBAAA,CAAA,YAAA,WAAA,OAAA;UAfR,SAAA,CAAA,OAAA;;;;;;;;WA+BR,qBAAA,EAAqB,kBAAA,CAAA,YAAA,CAhBL,SAAA,CAgBK,OAAA;AAAA;;;cCxD1B,2BAAA;EAAA,mBACQ,GAAA;EAAA,mBACA,KAAA;EAAA,mBACA,gBAAA,EAAgB,gBAAA;EAAA,mBAChB,UAAA,EAAU,aAAA,CAAA,UAAA,WAAA,OAAA;kDADM,SAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAGrB,OAAA,CAAA;EAAA,SAIE,iBAAA,mBAAiB,iBAAA;;gCANJ,SAAA,CAAA,QAAA;;;;;;;;;;;;;;;;;;;;WA8Bb,eAAA,mBAAe,iBAAA;;UAxBE,SAAA,CAAA,OAAA;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA2CjB,kBAAA,mBAAkB,iBAAA;;UAnBH,SAAA,CAAA,OAAA;IAAA;;;;;;;WAyCf,mBAAA,mBAAmB,iBAAA;;4BAtBD,SAAA,CAAA,OAAA;IAAA;;;;;YA+CxB,UAAA,CAAW,IAAA,EAAM,MAAA;;;;;;;;;;;;;;YAkBjB,gBAAA,CAAiB,IAAA,EAAM,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AH9HnC;;;;;;;;;;;;;;;;;cIqCa,aAAA;EAAA,WAA2B,OAAA,EAAO,OAAA,EACpC,4BAAA,CAA6B,CAAA,IAAE,qBAAA,CAAA,CAAA;EAAA;;UAKzB,4BAAA,WAAuC,OAAA,UAC9C,mBAAA,CAAoB,CAAA;EAC5B,IAAA;EACA,WAAA;EACA,QAAA;EACA,QAAA;EACA,SAAA;EACA,YAAA;IAAA,CAEG,IAAA,WAAe,mBAAA,CAAoB,CAAA;EAAA;EAEtC,MAAA,EAAQ,CAAA;AAAA;AAAA,cAKG,qBAAA,WAAgC,OAAA,UAAiB,SAAA,CAC5D,4BAAA,CAA6B,CAAA;EAAA,mBAEV,gBAAA,EAAgB,gBAAA;EAAA,IAExB,IAAA,CAAA;EAIE,IAAA,CAAK,OAAA,EAAS,uBAAA,CAAwB,CAAA,IAAE,OAAA;EAoC9C,SAAA,CAAU,OAAA,EAAS,OAAA,CAAQ,4BAAA,CAA6B,CAAA;AAAA;AAAA,UAShD,uBAAA,WAAkC,OAAA;EACjD,SAAA,EAAW,YAAA,CAAa,CAAA;EACxB,OAAA;AAAA;AAAA,UAGe,mBAAA,WAA8B,OAAA;EAC7C,KAAA;IACE,OAAA;IACA,IAAA,aAAiB,SAAA,EAAW,MAAA,CAAO,CAAA;EAAA;EAErC,GAAA;IACE,OAAA,aAAoB,SAAA,EAAW,MAAA,CAAO,CAAA;EAAA;AAAA;;;cC5H7B,oCAAA,YAAoC,OAAA;gCAG/C,SAAA,CAAA,OAAA;;;KAEU,8BAAA,GAAiC,MAAA,QACpC,oCAAA;;;cCNI,yBAAA,YAAyB,OAAA;6BAMpC,SAAA,CAAA,OAAA;;;;;;KAEU,mBAAA,GAAsB,MAAA,QAAc,yBAAA;;;cCNnC,gCAAA,YAAgC,OAAA;MAW5C,SAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAEW,0BAAA,GAA6B,MAAA,QAChC,gCAAA;;;cCfI,uBAAA,YAAuB,OAAA;4BAYlC,SAAA,CAAA,QAAA;;;;;KAEU,iBAAA,GAAoB,MAAA,QAAc,uBAAA;;;cCfjC,0BAAA,YAA0B,OAAA;MAarC,SAAA,CAAA,OAAA;;;;;;;;;;;;;KAEU,oBAAA,GAAuB,MAAA,QAAc,0BAAA;;;;;;ATfjD;;;;;;;;;;;;;;;;;;cU0Ca,sBAAA,EAAsB,QAAA,CAAA,OAAA,CASjC,QAAA,CATiC,MAAA"}
|