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.
Files changed (243) hide show
  1. package/AGENTS.md +0 -1
  2. package/CLAUDE.md +0 -1
  3. package/assets/agents-template.md +0 -1
  4. package/dist/api/audits/index.browser.js +1 -0
  5. package/dist/api/audits/index.browser.js.map +1 -1
  6. package/dist/api/audits/index.d.ts +370 -355
  7. package/dist/api/audits/index.d.ts.map +1 -1
  8. package/dist/api/audits/index.js +1 -0
  9. package/dist/api/audits/index.js.map +1 -1
  10. package/dist/api/files/index.browser.js +1 -0
  11. package/dist/api/files/index.browser.js.map +1 -1
  12. package/dist/api/files/index.d.ts +179 -170
  13. package/dist/api/files/index.d.ts.map +1 -1
  14. package/dist/api/files/index.js +1 -0
  15. package/dist/api/files/index.js.map +1 -1
  16. package/dist/api/jobs/index.browser.js +7 -0
  17. package/dist/api/jobs/index.browser.js.map +1 -1
  18. package/dist/api/jobs/index.d.ts +271 -262
  19. package/dist/api/jobs/index.d.ts.map +1 -1
  20. package/dist/api/jobs/index.js +21 -3
  21. package/dist/api/jobs/index.js.map +1 -1
  22. package/dist/api/keys/index.d.ts +198 -192
  23. package/dist/api/keys/index.d.ts.map +1 -1
  24. package/dist/api/keys/index.js +1 -0
  25. package/dist/api/keys/index.js.map +1 -1
  26. package/dist/api/notifications/index.d.ts +246 -245
  27. package/dist/api/notifications/index.d.ts.map +1 -1
  28. package/dist/api/organizations/index.d.ts +100 -97
  29. package/dist/api/organizations/index.d.ts.map +1 -1
  30. package/dist/api/parameters/index.d.ts +323 -320
  31. package/dist/api/parameters/index.d.ts.map +1 -1
  32. package/dist/api/payments/index.d.ts +431 -376
  33. package/dist/api/payments/index.d.ts.map +1 -1
  34. package/dist/api/payments/index.js +202 -87
  35. package/dist/api/payments/index.js.map +1 -1
  36. package/dist/api/subscriptions/index.d.ts +1695 -0
  37. package/dist/api/subscriptions/index.d.ts.map +1 -0
  38. package/dist/api/subscriptions/index.js +1919 -0
  39. package/dist/api/subscriptions/index.js.map +1 -0
  40. package/dist/api/users/index.d.ts +863 -847
  41. package/dist/api/users/index.d.ts.map +1 -1
  42. package/dist/api/verifications/index.d.ts +126 -125
  43. package/dist/api/verifications/index.d.ts.map +1 -1
  44. package/dist/bucket/index.d.ts +3 -2
  45. package/dist/bucket/index.d.ts.map +1 -1
  46. package/dist/cache/core/index.d.ts +114 -4
  47. package/dist/cache/core/index.d.ts.map +1 -1
  48. package/dist/cache/core/index.js +181 -15
  49. package/dist/cache/core/index.js.map +1 -1
  50. package/dist/cache/core/index.workerd.js +181 -15
  51. package/dist/cache/core/index.workerd.js.map +1 -1
  52. package/dist/cache/database/index.d.ts +20 -19
  53. package/dist/cache/database/index.d.ts.map +1 -1
  54. package/dist/cache/redis/index.d.ts +3 -2
  55. package/dist/cache/redis/index.d.ts.map +1 -1
  56. package/dist/cli/core/index.d.ts +113 -129
  57. package/dist/cli/core/index.d.ts.map +1 -1
  58. package/dist/cli/core/index.js +75 -7
  59. package/dist/cli/core/index.js.map +1 -1
  60. package/dist/cli/devtools/index.d.ts +3 -2
  61. package/dist/cli/devtools/index.d.ts.map +1 -1
  62. package/dist/cli/platform/index.d.ts +346 -290
  63. package/dist/cli/platform/index.d.ts.map +1 -1
  64. package/dist/cli/platform/index.js +105 -6
  65. package/dist/cli/platform/index.js.map +1 -1
  66. package/dist/cli/vendor/index.d.ts +12 -11
  67. package/dist/cli/vendor/index.d.ts.map +1 -1
  68. package/dist/command/index.d.ts +5 -4
  69. package/dist/command/index.d.ts.map +1 -1
  70. package/dist/core/index.browser.js +1 -1
  71. package/dist/core/index.browser.js.map +1 -1
  72. package/dist/core/index.d.ts +119 -118
  73. package/dist/core/index.d.ts.map +1 -1
  74. package/dist/core/index.js +1 -1
  75. package/dist/core/index.js.map +1 -1
  76. package/dist/core/index.native.js +1 -1
  77. package/dist/core/index.native.js.map +1 -1
  78. package/dist/core/index.workerd.js +1 -1
  79. package/dist/core/index.workerd.js.map +1 -1
  80. package/dist/crypto/index.d.ts +3 -2
  81. package/dist/crypto/index.d.ts.map +1 -1
  82. package/dist/email/core/index.d.ts +3 -2
  83. package/dist/email/core/index.d.ts.map +1 -1
  84. package/dist/email/smtp/index.d.ts +7 -6
  85. package/dist/email/smtp/index.d.ts.map +1 -1
  86. package/dist/lock/core/index.d.ts +5 -4
  87. package/dist/lock/core/index.d.ts.map +1 -1
  88. package/dist/logger/index.d.ts +10 -9
  89. package/dist/logger/index.d.ts.map +1 -1
  90. package/dist/mcp/index.d.ts +9 -8
  91. package/dist/mcp/index.d.ts.map +1 -1
  92. package/dist/mcp/index.js +1 -1
  93. package/dist/mcp/index.js.map +1 -1
  94. package/dist/orm/core/index.browser.js +9 -3
  95. package/dist/orm/core/index.browser.js.map +1 -1
  96. package/dist/orm/core/index.bun.js +31 -10
  97. package/dist/orm/core/index.bun.js.map +1 -1
  98. package/dist/orm/core/index.d.ts +33 -14
  99. package/dist/orm/core/index.d.ts.map +1 -1
  100. package/dist/orm/core/index.js +31 -10
  101. package/dist/orm/core/index.js.map +1 -1
  102. package/dist/orm/postgres/index.d.ts +6 -5
  103. package/dist/orm/postgres/index.d.ts.map +1 -1
  104. package/dist/queue/core/index.d.ts +5 -4
  105. package/dist/queue/core/index.d.ts.map +1 -1
  106. package/dist/queue/redis/index.d.ts +3 -2
  107. package/dist/queue/redis/index.d.ts.map +1 -1
  108. package/dist/react/form/index.d.ts +5 -0
  109. package/dist/react/form/index.d.ts.map +1 -1
  110. package/dist/react/form/index.js +6 -4
  111. package/dist/react/form/index.js.map +1 -1
  112. package/dist/react/i18n/index.d.ts +2 -1
  113. package/dist/react/i18n/index.d.ts.map +1 -1
  114. package/dist/react/router/index.d.ts +206 -205
  115. package/dist/react/router/index.d.ts.map +1 -1
  116. package/dist/react/ui/index.d.ts +11 -11
  117. package/dist/react/ui/index.d.ts.map +1 -1
  118. package/dist/scheduler/index.d.ts +3 -2
  119. package/dist/scheduler/index.d.ts.map +1 -1
  120. package/dist/security/index.browser.js +29 -1
  121. package/dist/security/index.browser.js.map +1 -1
  122. package/dist/security/index.d.ts +82 -35
  123. package/dist/security/index.d.ts.map +1 -1
  124. package/dist/security/index.js +56 -3
  125. package/dist/security/index.js.map +1 -1
  126. package/dist/server/auth/index.d.ts +163 -158
  127. package/dist/server/auth/index.d.ts.map +1 -1
  128. package/dist/server/auth/index.js +16 -4
  129. package/dist/server/auth/index.js.map +1 -1
  130. package/dist/server/core/index.d.ts +35 -34
  131. package/dist/server/core/index.d.ts.map +1 -1
  132. package/dist/server/cors/index.d.ts +7 -6
  133. package/dist/server/cors/index.d.ts.map +1 -1
  134. package/dist/server/health/index.d.ts +16 -15
  135. package/dist/server/health/index.d.ts.map +1 -1
  136. package/dist/server/links/index.d.ts +51 -50
  137. package/dist/server/links/index.d.ts.map +1 -1
  138. package/dist/server/rate-limit/index.d.ts +6 -5
  139. package/dist/server/rate-limit/index.d.ts.map +1 -1
  140. package/dist/server/swagger/index.d.ts +2 -1
  141. package/dist/server/swagger/index.d.ts.map +1 -1
  142. package/dist/topic/redis/index.d.ts +3 -2
  143. package/dist/topic/redis/index.d.ts.map +1 -1
  144. package/package.json +16 -32
  145. package/src/api/audits/entities/audits.ts +1 -0
  146. package/src/api/files/entities/files.ts +1 -0
  147. package/src/api/jobs/__tests__/$job.spec.ts +92 -40
  148. package/src/api/jobs/entities/jobExecutionEntity.ts +1 -0
  149. package/src/api/jobs/providers/JobProvider.ts +20 -5
  150. package/src/api/jobs/schemas/jobConfigAtom.ts +5 -0
  151. package/src/api/keys/entities/apiKeyEntity.ts +1 -0
  152. package/src/api/payments/controllers/MockCheckoutController.ts +146 -0
  153. package/src/api/payments/index.ts +3 -0
  154. package/src/api/payments/providers/MemoryPaymentProvider.ts +9 -4
  155. package/src/api/payments/providers/PaymentProvider.ts +25 -9
  156. package/src/api/payments/services/PaymentService.ts +3 -0
  157. package/src/api/subscriptions/__tests__/BillingService.spec.ts +218 -0
  158. package/src/api/subscriptions/__tests__/SubscriptionService.spec.ts +278 -0
  159. package/src/api/subscriptions/controllers/AdminSubscriptionController.ts +212 -0
  160. package/src/api/subscriptions/controllers/SubscriptionController.ts +189 -0
  161. package/src/api/subscriptions/entities/subscriptionEvents.ts +54 -0
  162. package/src/api/subscriptions/entities/subscriptions.ts +68 -0
  163. package/src/api/subscriptions/index.ts +133 -0
  164. package/src/api/subscriptions/jobs/SubscriptionJobs.ts +382 -0
  165. package/src/api/subscriptions/middleware/$requireLimit.ts +50 -0
  166. package/src/api/subscriptions/middleware/$requirePlan.ts +49 -0
  167. package/src/api/subscriptions/notifications/SubscriptionNotifications.ts +110 -0
  168. package/src/api/subscriptions/schemas/cancelSubscriptionSchema.ts +8 -0
  169. package/src/api/subscriptions/schemas/changePlanSchema.ts +9 -0
  170. package/src/api/subscriptions/schemas/createSubscriptionSchema.ts +11 -0
  171. package/src/api/subscriptions/schemas/entitlementsSchema.ts +21 -0
  172. package/src/api/subscriptions/schemas/mrrSchema.ts +13 -0
  173. package/src/api/subscriptions/schemas/planDefinitionSchema.ts +71 -0
  174. package/src/api/subscriptions/schemas/planResourceSchema.ts +25 -0
  175. package/src/api/subscriptions/schemas/subscriptionEventResourceSchema.ts +8 -0
  176. package/src/api/subscriptions/schemas/subscriptionQuerySchema.ts +19 -0
  177. package/src/api/subscriptions/schemas/subscriptionResourceSchema.ts +6 -0
  178. package/src/api/subscriptions/schemas/subscriptionSettingsSchema.ts +32 -0
  179. package/src/api/subscriptions/schemas/subscriptionStatsSchema.ts +23 -0
  180. package/src/api/subscriptions/services/BillingService.ts +437 -0
  181. package/src/api/subscriptions/services/SubscriptionConfig.ts +56 -0
  182. package/src/api/subscriptions/services/SubscriptionService.ts +867 -0
  183. package/src/api/subscriptions/services/UsageService.ts +118 -0
  184. package/src/cache/core/__tests__/$cache.memory.spec.ts +450 -0
  185. package/src/cache/core/__tests__/$cache.swr.spec.ts +394 -0
  186. package/src/cache/core/index.ts +16 -0
  187. package/src/cache/core/primitives/$cache.ts +347 -21
  188. package/src/cli/core/tasks/BuildCloudflareTask.ts +16 -0
  189. package/src/cli/core/templates/agentMd.ts +39 -4
  190. package/src/cli/core/templates/biomeJson.ts +25 -1
  191. package/src/cli/core/templates/saasAdminLayoutTsx.ts +2 -2
  192. package/src/cli/platform/__tests__/CloudflareAdapter.spec.ts +117 -0
  193. package/src/cli/platform/adapters/CloudflareAdapter.ts +104 -7
  194. package/src/cli/platform/atoms/platformOptions.ts +13 -0
  195. package/src/cli/platform/schemas/platform.ts +1 -0
  196. package/src/cli/platform/services/CloudflareApi.ts +61 -0
  197. package/src/cli/platform/services/PlatformOrchestrator.ts +9 -4
  198. package/src/core/__tests__/$module.spec.ts +2 -2
  199. package/src/core/primitives/$module.ts +4 -4
  200. package/src/mcp/providers/McpServerProvider.ts +1 -1
  201. package/src/orm/core/providers/DatabaseTypeProvider.ts +9 -3
  202. package/src/orm/core/providers/drivers/DatabaseProvider.ts +1 -1
  203. package/src/orm/core/schemas/insertSchema.ts +10 -2
  204. package/src/orm/core/services/Repository.ts +27 -7
  205. package/src/react/form/hooks/useFormState.ts +8 -1
  206. package/src/react/form/index.ts +10 -1
  207. package/src/react/form/services/FormModel.ts +9 -3
  208. package/src/security/atoms/currentTenantAtom.ts +34 -0
  209. package/src/security/index.browser.ts +1 -0
  210. package/src/security/index.ts +12 -1
  211. package/src/security/primitives/$issuer.ts +17 -1
  212. package/src/security/providers/SecurityProvider.ts +37 -0
  213. package/src/server/auth/__tests__/validateRedirectUri.spec.ts +78 -0
  214. package/src/server/auth/providers/ServerAuthProvider.ts +21 -5
  215. package/tsconfig.base.json +2 -1
  216. package/dist/react/websocket/index.d.ts +0 -117
  217. package/dist/react/websocket/index.d.ts.map +0 -1
  218. package/dist/react/websocket/index.js +0 -108
  219. package/dist/react/websocket/index.js.map +0 -1
  220. package/dist/websocket/index.browser.js +0 -848
  221. package/dist/websocket/index.browser.js.map +0 -1
  222. package/dist/websocket/index.d.ts +0 -876
  223. package/dist/websocket/index.d.ts.map +0 -1
  224. package/dist/websocket/index.js +0 -1185
  225. package/dist/websocket/index.js.map +0 -1
  226. package/src/react/websocket/hooks/useRoom.tsx +0 -251
  227. package/src/react/websocket/index.ts +0 -7
  228. package/src/websocket/__tests__/$channel.spec.ts +0 -30
  229. package/src/websocket/__tests__/$websocket-new.spec.ts +0 -195
  230. package/src/websocket/__tests__/RoomManager.spec.ts +0 -146
  231. package/src/websocket/__tests__/websocket-integration.spec.ts +0 -951
  232. package/src/websocket/errors/WebSocketError.ts +0 -34
  233. package/src/websocket/index.browser.ts +0 -25
  234. package/src/websocket/index.shared.ts +0 -8
  235. package/src/websocket/index.ts +0 -85
  236. package/src/websocket/interfaces/WebSocketInterfaces.ts +0 -252
  237. package/src/websocket/primitives/$channel.ts +0 -131
  238. package/src/websocket/primitives/$websocket.ts +0 -107
  239. package/src/websocket/providers/NodeWebSocketServerProvider.ts +0 -617
  240. package/src/websocket/providers/WebSocketServerProvider.ts +0 -56
  241. package/src/websocket/services/RoomManager.ts +0 -160
  242. package/src/websocket/services/WebSocketClient.ts +0 -642
  243. 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: _$alepha.TObject<{
78
- type: _$alepha.TUnsafe<"email" | "sms">;
79
- template: _$alepha.TString;
80
- contact: _$alepha.TString;
81
- variables: _$alepha.TOptional<_$alepha.TRecord<"^.*$", _$alepha.TAny>>;
82
- category: _$alepha.TOptional<_$alepha.TString>;
83
- critical: _$alepha.TOptional<_$alepha.TBoolean>;
84
- sensitive: _$alepha.TOptional<_$alepha.TBoolean>;
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<_$alepha.TObject<_$alepha.TProperties>>;
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<_$alepha.TObject<{
146
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
147
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
148
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
149
- jobName: _$alepha.TString;
150
- key: _$alepha.TOptional<_$alepha.TUnion<[_$alepha.TNull, _$alepha.TString]>>;
151
- status: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">, typeof _$alepha_orm0.PG_DEFAULT>;
152
- priority: _$alepha_orm0.PgAttr<_$alepha.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
153
- attempt: _$alepha_orm0.PgAttr<_$alepha.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
154
- maxAttempts: _$alepha_orm0.PgAttr<_$alepha.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
155
- payload: _$alepha.TOptional<_$alepha.TRecord<"^.*$", _$alepha.TAny>>;
156
- scheduledAt: _$alepha.TOptional<_$alepha.TString>;
157
- startedAt: _$alepha.TOptional<_$alepha.TString>;
158
- completedAt: _$alepha.TOptional<_$alepha.TString>;
159
- error: _$alepha.TOptional<_$alepha.TString>;
160
- logs: _$alepha.TOptional<_$alepha.TArray<_$alepha.TObject<{
161
- level: _$alepha.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
162
- message: _$alepha.TString;
163
- service: _$alepha.TString;
164
- module: _$alepha.TString;
165
- context: _$alepha.TOptional<_$alepha.TString>;
166
- app: _$alepha.TOptional<_$alepha.TString>;
167
- data: _$alepha.TOptional<_$alepha.TAny>;
168
- timestamp: _$alepha.TNumber;
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: _$alepha.TOptional<_$alepha.TString>;
171
- triggeredByName: _$alepha.TOptional<_$alepha.TString>;
172
- cancelledBy: _$alepha.TOptional<_$alepha.TString>;
173
- cancelledByName: _$alepha.TOptional<_$alepha.TString>;
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<_$alepha.TObject<{
177
- retentionDays: _$alepha.TInteger;
113
+ readonly settings: _$alepha_api_parameters0.ParameterPrimitive<_$typebox.TObject<{
114
+ retentionDays: _$typebox.TInteger;
178
115
  }>>;
179
- readonly sendNotification: _$alepha_api_jobs0.JobPrimitive<_$alepha.TObject<{
180
- type: _$alepha.TUnsafe<"email" | "sms">;
181
- template: _$alepha.TString;
182
- contact: _$alepha.TString;
183
- variables: _$alepha.TOptional<_$alepha.TRecord<"^.*$", _$alepha.TAny>>;
184
- category: _$alepha.TOptional<_$alepha.TString>;
185
- critical: _$alepha.TOptional<_$alepha.TBoolean>;
186
- sensitive: _$alepha.TOptional<_$alepha.TBoolean>;
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<_$alepha.TSchema>;
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<_$alepha.TObject<{
197
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
198
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
199
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
200
- jobName: _$alepha.TString;
201
- key: _$alepha.TOptional<_$alepha.TUnion<[_$alepha.TNull, _$alepha.TString]>>;
202
- status: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">, typeof _$alepha_orm0.PG_DEFAULT>;
203
- priority: _$alepha_orm0.PgAttr<_$alepha.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
204
- attempt: _$alepha_orm0.PgAttr<_$alepha.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
205
- maxAttempts: _$alepha_orm0.PgAttr<_$alepha.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
206
- payload: _$alepha.TOptional<_$alepha.TRecord<"^.*$", _$alepha.TAny>>;
207
- scheduledAt: _$alepha.TOptional<_$alepha.TString>;
208
- startedAt: _$alepha.TOptional<_$alepha.TString>;
209
- completedAt: _$alepha.TOptional<_$alepha.TString>;
210
- error: _$alepha.TOptional<_$alepha.TString>;
211
- logs: _$alepha.TOptional<_$alepha.TArray<_$alepha.TObject<{
212
- level: _$alepha.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
213
- message: _$alepha.TString;
214
- service: _$alepha.TString;
215
- module: _$alepha.TString;
216
- context: _$alepha.TOptional<_$alepha.TString>;
217
- app: _$alepha.TOptional<_$alepha.TString>;
218
- data: _$alepha.TOptional<_$alepha.TAny>;
219
- timestamp: _$alepha.TNumber;
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: _$alepha.TOptional<_$alepha.TString>;
222
- triggeredByName: _$alepha.TOptional<_$alepha.TString>;
223
- cancelledBy: _$alepha.TOptional<_$alepha.TString>;
224
- cancelledByName: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
229
- page: _$alepha.TOptional<_$alepha.TInteger>;
230
- size: _$alepha.TOptional<_$alepha.TInteger>;
231
- sort: _$alepha.TOptional<_$alepha.TString>;
232
- status: _$alepha.TOptional<_$alepha.TUnsafe<"pending" | "running" | "scheduled" | "cancelled" | "retrying" | "completed" | "dead">>;
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<_$alepha.TObject<{
235
- id: _$alepha.TString;
236
- createdAt: _$alepha.TString;
237
- status: _$alepha.TString;
238
- template: _$alepha.TOptional<_$alepha.TString>;
239
- type: _$alepha.TOptional<_$alepha.TString>;
240
- contact: _$alepha.TOptional<_$alepha.TString>;
241
- category: _$alepha.TOptional<_$alepha.TString>;
242
- critical: _$alepha.TOptional<_$alepha.TBoolean>;
243
- sensitive: _$alepha.TOptional<_$alepha.TBoolean>;
244
- startedAt: _$alepha.TOptional<_$alepha.TString>;
245
- completedAt: _$alepha.TOptional<_$alepha.TString>;
246
- error: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
251
- id: _$alepha.TString;
187
+ params: _$typebox.TObject<{
188
+ id: _$typebox.TString;
252
189
  }>;
253
- response: _$alepha.TObject<{
254
- id: _$alepha.TString;
255
- createdAt: _$alepha.TString;
256
- status: _$alepha.TString;
257
- template: _$alepha.TOptional<_$alepha.TString>;
258
- type: _$alepha.TOptional<_$alepha.TString>;
259
- contact: _$alepha.TOptional<_$alepha.TString>;
260
- category: _$alepha.TOptional<_$alepha.TString>;
261
- critical: _$alepha.TOptional<_$alepha.TBoolean>;
262
- sensitive: _$alepha.TOptional<_$alepha.TBoolean>;
263
- startedAt: _$alepha.TOptional<_$alepha.TString>;
264
- completedAt: _$alepha.TOptional<_$alepha.TString>;
265
- error: _$alepha.TOptional<_$alepha.TString>;
266
- variables: _$alepha.TOptional<_$alepha.TRecord<"^.*$", _$alepha.TAny>>;
267
- rendered: _$alepha.TOptional<_$alepha.TRecord<"^.*$", _$alepha.TAny>>;
268
- logs: _$alepha.TOptional<_$alepha.TArray<_$alepha.TObject<{
269
- level: _$alepha.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
270
- message: _$alepha.TString;
271
- service: _$alepha.TString;
272
- module: _$alepha.TString;
273
- context: _$alepha.TOptional<_$alepha.TString>;
274
- app: _$alepha.TOptional<_$alepha.TString>;
275
- data: _$alepha.TOptional<_$alepha.TAny>;
276
- timestamp: _$alepha.TNumber;
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: _$alepha.TObject<{
282
- id: _$alepha.TString;
218
+ params: _$typebox.TObject<{
219
+ id: _$typebox.TString;
283
220
  }>;
284
- response: _$alepha.TObject<{
285
- ok: _$alepha.TBoolean;
286
- id: _$alepha.TOptional<_$alepha.TUnion<[_$alepha.TString, _$alepha.TInteger]>>;
287
- count: _$alepha.TOptional<_$alepha.TNumber>;
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: _$alepha.TObject<{
292
- ids: _$alepha.TArray<_$alepha.TString>;
228
+ body: _$typebox.TObject<{
229
+ ids: _$typebox.TArray<_$typebox.TString>;
293
230
  }>;
294
- response: _$alepha.TObject<{
295
- deleted: _$alepha.TArray<_$alepha.TString>;
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: _$alepha.TObject<{
332
- language: _$alepha.TOptional<_$alepha.TString>;
333
- exclude: _$alepha.TArray<_$alepha.TString>;
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: _$alepha.TObject<{
339
- email: _$alepha.TOptional<_$alepha.TString>;
340
- phoneNumber: _$alepha.TOptional<_$alepha.TString>;
341
- firstName: _$alepha.TOptional<_$alepha.TString>;
342
- lastName: _$alepha.TOptional<_$alepha.TString>;
343
- language: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
349
- id: _$alepha.TString;
350
- createdAt: _$alepha.TString;
351
- status: _$alepha.TString;
352
- template: _$alepha.TOptional<_$alepha.TString>;
353
- type: _$alepha.TOptional<_$alepha.TString>;
354
- contact: _$alepha.TOptional<_$alepha.TString>;
355
- category: _$alepha.TOptional<_$alepha.TString>;
356
- critical: _$alepha.TOptional<_$alepha.TBoolean>;
357
- sensitive: _$alepha.TOptional<_$alepha.TBoolean>;
358
- startedAt: _$alepha.TOptional<_$alepha.TString>;
359
- completedAt: _$alepha.TOptional<_$alepha.TString>;
360
- error: _$alepha.TOptional<_$alepha.TString>;
361
- variables: _$alepha.TOptional<_$alepha.TRecord<"^.*$", _$alepha.TAny>>;
362
- rendered: _$alepha.TOptional<_$alepha.TRecord<"^.*$", _$alepha.TAny>>;
363
- logs: _$alepha.TOptional<_$alepha.TArray<_$alepha.TObject<{
364
- level: _$alepha.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
365
- message: _$alepha.TString;
366
- service: _$alepha.TString;
367
- module: _$alepha.TString;
368
- context: _$alepha.TOptional<_$alepha.TString>;
369
- app: _$alepha.TOptional<_$alepha.TString>;
370
- data: _$alepha.TOptional<_$alepha.TAny>;
371
- timestamp: _$alepha.TNumber;
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: _$alepha.TObject<{
378
- page: _$alepha.TOptional<_$alepha.TInteger>;
379
- size: _$alepha.TOptional<_$alepha.TInteger>;
380
- sort: _$alepha.TOptional<_$alepha.TString>;
381
- status: _$alepha.TOptional<_$alepha.TUnsafe<"pending" | "running" | "scheduled" | "cancelled" | "retrying" | "completed" | "dead">>;
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: _$alepha.TObject<{
387
- id: _$alepha.TString;
388
- createdAt: _$alepha.TString;
389
- status: _$alepha.TString;
390
- template: _$alepha.TOptional<_$alepha.TString>;
391
- type: _$alepha.TOptional<_$alepha.TString>;
392
- contact: _$alepha.TOptional<_$alepha.TString>;
393
- category: _$alepha.TOptional<_$alepha.TString>;
394
- critical: _$alepha.TOptional<_$alepha.TBoolean>;
395
- sensitive: _$alepha.TOptional<_$alepha.TBoolean>;
396
- startedAt: _$alepha.TOptional<_$alepha.TString>;
397
- completedAt: _$alepha.TOptional<_$alepha.TString>;
398
- error: _$alepha.TOptional<_$alepha.TString>;
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/primitives/$notification.ts","../../../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/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":";;;;;;;;;;;;;;;;;;;;;;AAuCA;;;;;;;;;;;;;;;;;;cAAa,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,yBAAA,WAAyB,OAAA;QAQpC,QAAA,CAAA,OAAA;;;;;;;;KAEU,mBAAA,GAAsB,MAAA,QAAc,yBAAA;;;cCLnC,yBAAA;EAAA,mBACQ,MAAA,EAAM,MAAA;EAAA,mBACN,GAA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;;;;;;;WA2CjB,kBAAA,mBAAkB,iBAAA;;UAnBH,QAAA,CAAA,OAAA;IAAA;;;;;;;WAyCf,mBAAA,mBAAmB,iBAAA;;2BAtBD,QAAA,CAAA,OAAA;IAAA;;;;;YA+CxB,UAAA,CAAW,IAAA,EAAM,MAAA;;;;;;;;;;;;;;YAkBjB,gBAAA,CAAiB,IAAA,EAAM,MAAA;;;;;;;;;;;;;;;;;;;cC9HtB,oCAAA,WAAoC,OAAA;+BAG/C,QAAA,CAAA,OAAA;;;KAEU,8BAAA,GAAiC,MAAA,QACpC,oCAAA;;;cCNI,yBAAA,WAAyB,OAAA;4BAMpC,QAAA,CAAA,OAAA;;;;;;KAEU,mBAAA,GAAsB,MAAA,QAAc,yBAAA;;;cCNnC,gCAAA,WAAgC,OAAA;MAW5C,QAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAEW,0BAAA,GAA6B,MAAA,QAChC,gCAAA;;;cCfI,uBAAA,WAAuB,OAAA;2BAYlC,QAAA,CAAA,QAAA;;;;;KAEU,iBAAA,GAAoB,MAAA,QAAc,uBAAA;;;cCfjC,0BAAA,WAA0B,OAAA;MAarC,QAAA,CAAA,OAAA;;;;;;;;;;;;;KAEU,oBAAA,GAAuB,MAAA,QAAc,0BAAA;;;;;ATsBjD;;;;;;;;;;;;;;;;;;;cUKa,sBAAA,EAAsB,QAAA,CAAA,OAAA,CASjC,QAAA,CATiC,MAAA"}
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","../../../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