vintasend-prisma 0.11.1 → 0.11.2-alpha2

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 (28) hide show
  1. package/dist/prisma-notification-backend.d.ts +11 -8
  2. package/dist/prisma-notification-backend.d.ts.map +1 -1
  3. package/dist/prisma-notification-backend.js +5 -1
  4. package/package.json +2 -2
  5. package/dist/implementations/vintasend-prisma/src/index.d.ts +0 -2
  6. package/dist/implementations/vintasend-prisma/src/index.js +0 -7
  7. package/dist/implementations/vintasend-prisma/src/prisma-notification-backend.d.ts +0 -318
  8. package/dist/implementations/vintasend-prisma/src/prisma-notification-backend.js +0 -406
  9. package/dist/services/notification-backends/base-notification-backend.d.ts +0 -89
  10. package/dist/services/notification-backends/base-notification-backend.js +0 -1
  11. package/dist/types/identifier.d.ts +0 -2
  12. package/dist/types/identifier.js +0 -1
  13. package/dist/types/json-values.d.ts +0 -19
  14. package/dist/types/json-values.js +0 -1
  15. package/dist/types/notification-context-generators.d.ts +0 -6
  16. package/dist/types/notification-context-generators.js +0 -1
  17. package/dist/types/notification-status.d.ts +0 -1
  18. package/dist/types/notification-status.js +0 -1
  19. package/dist/types/notification-type-config.d.ts +0 -7
  20. package/dist/types/notification-type-config.js +0 -1
  21. package/dist/types/notification-type.d.ts +0 -1
  22. package/dist/types/notification-type.js +0 -1
  23. package/dist/types/notification.d.ts +0 -97
  24. package/dist/types/notification.js +0 -1
  25. package/dist/types/one-off-notification.d.ts +0 -91
  26. package/dist/types/one-off-notification.js +0 -1
  27. package/dist/types/uuid.d.ts +0 -1
  28. package/dist/types/uuid.js +0 -1
@@ -111,12 +111,6 @@ type PrismaNotificationWhereInput<NotificationIdType, UserIdType> = {
111
111
  createdAt?: PrismaDateRangeFilter;
112
112
  sentAt?: PrismaDateRangeFilter;
113
113
  };
114
- type AwaitedTuple<T extends readonly unknown[]> = {
115
- [K in keyof T]: Awaited<T[K]>;
116
- };
117
- type PrismaTransactionOptions = {
118
- isolationLevel?: unknown;
119
- };
120
114
  interface NotificationPrismaDelegates<NotificationIdType, UserIdType> {
121
115
  notification: {
122
116
  findMany(args?: {
@@ -241,12 +235,20 @@ interface NotificationPrismaDelegates<NotificationIdType, UserIdType> {
241
235
  }): Promise<PrismaNotificationAttachmentModel>;
242
236
  };
243
237
  }
238
+ type AwaitedTuple<T extends readonly unknown[]> = {
239
+ [K in keyof T]: Awaited<T[K]>;
240
+ };
241
+ type PrismaTransactionOptions = {
242
+ maxWait?: number;
243
+ timeout?: number;
244
+ isolationLevel?: string;
245
+ };
244
246
  export interface NotificationPrismaTransactionClientInterface<NotificationIdType, UserIdType> extends NotificationPrismaDelegates<NotificationIdType, UserIdType> {
245
247
  }
246
248
  export interface NotificationPrismaClientInterface<NotificationIdType, UserIdType> {
247
249
  $transaction: {
250
+ <P extends readonly PromiseLike<unknown>[]>(arg: [...P], options?: PrismaTransactionOptions): Promise<AwaitedTuple<P>>;
248
251
  <R>(fn: (prisma: NotificationPrismaTransactionClientInterface<NotificationIdType, UserIdType>) => Promise<R>, options?: PrismaTransactionOptions): Promise<R>;
249
- <P extends readonly unknown[]>(arg: [...P], options?: PrismaTransactionOptions): Promise<AwaitedTuple<P>>;
250
252
  };
251
253
  }
252
254
  export interface NotificationPrismaClientInterface<NotificationIdType, UserIdType> extends NotificationPrismaDelegates<NotificationIdType, UserIdType> {
@@ -403,10 +405,11 @@ export declare class PrismaNotificationBackend<Client extends NotificationPrisma
403
405
  * @private
404
406
  */
405
407
  private getAttachmentManager;
408
+ private runInteractiveTransaction;
406
409
  deserializeNotification(notification: Omit<AnyNotification<Config>, 'id'> & {
407
410
  id?: Config['NotificationIdType'];
408
411
  }): PrismaNotificationCreateData<Config['UserIdType']>;
409
- deserializeNotificationForUpdate(notification: Partial<Notification<Config>>): Partial<Parameters<typeof this.prismaClient.notification.update>[0]['data']>;
412
+ deserializeNotificationForUpdate(notification: Partial<Notification<Config>>): Partial<BaseNotificationUpdateInput<Config['UserIdType']>>;
410
413
  getAllPendingNotifications(): Promise<AnyDatabaseNotification<Config>[]>;
411
414
  getPendingNotifications(page?: number, pageSize?: number): Promise<AnyDatabaseNotification<Config>[]>;
412
415
  getAllFutureNotifications(): Promise<AnyDatabaseNotification<Config>[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"prisma-notification-backend.d.ts","sourceRoot":"","sources":["../src/prisma-notification-backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,UAAU,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,SAAS,EACT,YAAY,EAEZ,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EAEvB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAGnB,eAAO,MAAM,sBAAsB;;;;;;CAMzB,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AAEX,MAAM,WAAW,uBAAuB,CAAC,MAAM,EAAE,MAAM;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,SAAS,CAAC;IAC7B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,WAAW,EAAE,SAAS,GAAG,IAAI,CAAC;IAC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B;CAyBlC;AAED,qBAAa,gCAAgC,CAAC,MAAM,SAAS,0BAA0B;IACrF,MAAM,CACJ,MAAM,SAAS,iCAAiC,CAC9C,MAAM,CAAC,oBAAoB,CAAC,EAC5B,MAAM,CAAC,YAAY,CAAC,CACrB,EACD,YAAY,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,UAAU,CAAC,EAAE,MAAM;CAOvF"}
1
+ {"version":3,"file":"prisma-notification-backend.d.ts","sourceRoot":"","sources":["../src/prisma-notification-backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,UAAU,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,SAAS,EACT,YAAY,EAEZ,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EAEvB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAGnB,eAAO,MAAM,sBAAsB;;;;;;CAMzB,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AAEX,MAAM,WAAW,uBAAuB,CAAC,MAAM,EAAE,MAAM;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,SAAS,CAAC;IAC7B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CA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uB,CAAC,MAAM,CAAC,EAAE,CAAC;IAY7C;;;;;OAKG;YACW,uCAAuC;IAyCrD;;;OAGG;IACH,OAAO,CAAC,6BAA6B;IAarC;;;OAGG;IACH,OAAO,CAAC,yBAAyB;CAyBlC;AAED,qBAAa,gCAAgC,CAAC,MAAM,SAAS,0BAA0B;IACrF,MAAM,CACJ,MAAM,SAAS,iCAAiC,CAC9C,MAAM,CAAC,oBAAoB,CAAC,EAC5B,MAAM,CAAC,YAAY,CAAC,CACrB,EACD,YAAY,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,UAAU,CAAC,EAAE,MAAM;CAOvF"}
@@ -515,7 +515,7 @@ export class PrismaNotificationBackend {
515
515
  this.getAttachmentManager();
516
516
  // Use transaction to ensure atomicity of notification + attachments
517
517
  this.logger?.info(`Creating notification with ${attachments.length} attachment(s)`);
518
- return await this.prismaClient.$transaction(async (tx) => {
518
+ return await this.runInteractiveTransaction(async (tx) => {
519
519
  const created = await tx.notification.create({
520
520
  data: buildData(notificationData),
521
521
  include: notificationWithAttachmentsInclude,
@@ -543,6 +543,10 @@ export class PrismaNotificationBackend {
543
543
  }
544
544
  return this.attachmentManager;
545
545
  }
546
+ runInteractiveTransaction(fn) {
547
+ const transactionRunner = this.prismaClient.$transaction;
548
+ return transactionRunner(fn);
549
+ }
546
550
  deserializeNotification(notification) {
547
551
  return this.buildCreateData(notification);
548
552
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vintasend-prisma",
3
- "version": "0.11.1",
3
+ "version": "0.11.2-alpha2",
4
4
  "description": "VintaSend Backend implementation for Prisma",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@prisma/client": "^7.4.2",
23
23
  "prisma": "^7.4.2",
24
- "vintasend": "^0.11.1"
24
+ "vintasend": "^0.11.2-alpha2"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@biomejs/biome": "^2.4.5",
@@ -1,2 +0,0 @@
1
- export { PrismaNotificationBackendFactory } from './prisma-notification-backend';
2
- export type { PrismaNotificationBackend } from './prisma-notification-backend';
@@ -1,7 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- exports.PrismaNotificationBackendFactory = void 0;
3
- var prisma_notification_backend_1 = require('./prisma-notification-backend');
4
- Object.defineProperty(exports, 'PrismaNotificationBackendFactory', {
5
- enumerable: true,
6
- get: () => prisma_notification_backend_1.PrismaNotificationBackendFactory,
7
- });
@@ -1,318 +0,0 @@
1
- import type { InputJsonValue, JsonValue } from 'vintasend/dist/types/json-values';
2
- import type {
3
- DatabaseNotification,
4
- Notification,
5
- NotificationInput,
6
- } from 'vintasend/dist/types/notification';
7
- import type { NotificationStatus } from 'vintasend/dist/types/notification-status';
8
- import type { NotificationType } from 'vintasend/dist/types/notification-type';
9
- import type { BaseNotificationTypeConfig } from 'vintasend/dist/types/notification-type-config';
10
- import type { BaseNotificationBackend } from '../../../services/notification-backends/base-notification-backend';
11
- import type {
12
- AnyDatabaseNotification,
13
- DatabaseOneOffNotification,
14
- OneOffNotificationInput,
15
- } from '../../../types/notification';
16
- export declare const NotificationStatusEnum: {
17
- readonly PENDING_SEND: 'PENDING_SEND';
18
- readonly SENT: 'SENT';
19
- readonly FAILED: 'FAILED';
20
- readonly READ: 'READ';
21
- readonly CANCELLED: 'CANCELLED';
22
- };
23
- export declare const NotificationTypeEnum: {
24
- readonly EMAIL: 'EMAIL';
25
- readonly PUSH: 'PUSH';
26
- readonly SMS: 'SMS';
27
- readonly IN_APP: 'IN_APP';
28
- };
29
- export interface PrismaNotificationModel<IdType, UserId> {
30
- id: IdType;
31
- userId: UserId | null;
32
- emailOrPhone: string | null;
33
- firstName: string | null;
34
- lastName: string | null;
35
- notificationType: NotificationType;
36
- title: string | null;
37
- bodyTemplate: string;
38
- contextName: string;
39
- contextParameters: JsonValue;
40
- sendAfter: Date | null;
41
- subjectTemplate: string | null;
42
- status: NotificationStatus;
43
- contextUsed: JsonValue | null;
44
- extraParams: JsonValue | null;
45
- adapterUsed: string | null;
46
- sentAt: Date | null;
47
- readAt: Date | null;
48
- createdAt: Date;
49
- updatedAt: Date;
50
- user?: {
51
- email: string;
52
- };
53
- }
54
- export interface NotificationPrismaClientInterface<NotificationIdType, UserIdType> {
55
- notification: {
56
- findMany(args: {
57
- where?: {
58
- status?:
59
- | NotificationStatus
60
- | {
61
- not: NotificationStatus;
62
- };
63
- sendAfter?: {
64
- lte: Date;
65
- } | null;
66
- userId?: UserIdType | null;
67
- readAt?: null;
68
- emailOrPhone?:
69
- | string
70
- | {
71
- not: null;
72
- };
73
- };
74
- skip?: number;
75
- take?: number;
76
- include?: {
77
- user?: boolean;
78
- };
79
- }): Promise<PrismaNotificationModel<NotificationIdType, UserIdType>[]>;
80
- create(args: {
81
- data: BaseNotificationCreateInput<UserIdType>;
82
- include?: {
83
- user?: boolean;
84
- };
85
- }): Promise<PrismaNotificationModel<NotificationIdType, UserIdType>>;
86
- createMany(args: {
87
- data: BaseNotificationCreateInput<UserIdType>[];
88
- }): Promise<NotificationIdType[]>;
89
- update(args: {
90
- where: {
91
- id: NotificationIdType;
92
- };
93
- data: Partial<BaseNotificationUpdateInput<UserIdType>>;
94
- include?: {
95
- user?: boolean;
96
- };
97
- }): Promise<PrismaNotificationModel<NotificationIdType, UserIdType>>;
98
- findUnique(args: {
99
- where: {
100
- id: NotificationIdType;
101
- };
102
- include?: {
103
- user?: boolean;
104
- };
105
- }): Promise<PrismaNotificationModel<NotificationIdType, UserIdType> | null>;
106
- };
107
- }
108
- type NoExpand<T> = T extends unknown ? T : never;
109
- type AtLeast<O extends object, K extends string> = NoExpand<
110
- O extends unknown
111
- ?
112
- | (K extends keyof O
113
- ? {
114
- [P in K]: O[P];
115
- } & O
116
- : O)
117
- | ({
118
- [P in keyof O as P extends K ? K : never]-?: O[P];
119
- } & O)
120
- : never
121
- >;
122
- export interface BaseNotificationCreateInput<UserIdType> {
123
- user?: {
124
- connect?: AtLeast<
125
- {
126
- id?: UserIdType;
127
- email?: string;
128
- },
129
- 'id' | 'email'
130
- >;
131
- };
132
- userId?: UserIdType | null;
133
- emailOrPhone?: string | null;
134
- firstName?: string | null;
135
- lastName?: string | null;
136
- notificationType: NotificationType;
137
- title?: string | null;
138
- bodyTemplate: string;
139
- contextName: string;
140
- contextParameters: InputJsonValue;
141
- sendAfter?: Date | null;
142
- subjectTemplate?: string | null;
143
- status?: NotificationStatus;
144
- contextUsed?: InputJsonValue;
145
- extraParams?: InputJsonValue;
146
- adapterUsed?: string | null;
147
- sentAt?: Date | null;
148
- readAt?: Date | null;
149
- }
150
- export interface BaseNotificationUpdateInput<UserIdType> {
151
- user?: {
152
- connect?: AtLeast<
153
- {
154
- id?: UserIdType;
155
- email?: string;
156
- },
157
- 'id' | 'email'
158
- >;
159
- };
160
- emailOrPhone?: string | null;
161
- firstName?: string | null;
162
- lastName?: string | null;
163
- notificationType?: NotificationType;
164
- title?: string | null;
165
- bodyTemplate?: string;
166
- contextName?: string;
167
- contextParameters?: InputJsonValue;
168
- sendAfter?: Date | null;
169
- subjectTemplate?: string | null;
170
- status?: NotificationStatus;
171
- contextUsed?: InputJsonValue;
172
- extraParams?: InputJsonValue;
173
- adapterUsed?: string | null;
174
- sentAt?: Date | null;
175
- readAt?: Date | null;
176
- }
177
- export declare class PrismaNotificationBackend<
178
- Client extends NotificationPrismaClientInterface<
179
- Config['NotificationIdType'],
180
- Config['UserIdType']
181
- >,
182
- Config extends BaseNotificationTypeConfig,
183
- > implements BaseNotificationBackend<Config>
184
- {
185
- private prismaClient;
186
- constructor(prismaClient: Client);
187
- /**
188
- * Serialize a Prisma notification model to either DatabaseNotification or DatabaseOneOffNotification
189
- * based on whether it has a userId or not
190
- */
191
- serializeNotification(
192
- notification: NonNullable<
193
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
194
- >,
195
- ): AnyDatabaseNotification<Config>;
196
- deserializeNotification(
197
- notification: NotificationInput<Config>,
198
- ): BaseNotificationCreateInput<Config['UserIdType']>;
199
- deserializeNotificationForUpdate(
200
- notification: Partial<Notification<Config>>,
201
- ): Partial<Parameters<typeof this.prismaClient.notification.update>[0]['data']>;
202
- getAllPendingNotifications(): Promise<AnyDatabaseNotification<Config>[]>;
203
- getPendingNotifications(
204
- page?: number,
205
- pageSize?: number,
206
- ): Promise<AnyDatabaseNotification<Config>[]>;
207
- getAllFutureNotifications(): Promise<AnyDatabaseNotification<Config>[]>;
208
- getFutureNotifications(
209
- page?: number,
210
- pageSize?: number,
211
- ): Promise<AnyDatabaseNotification<Config>[]>;
212
- getAllFutureNotificationsFromUser(
213
- userId: NonNullable<
214
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
215
- >['userId'],
216
- ): Promise<DatabaseNotification<Config>[]>;
217
- getFutureNotificationsFromUser(
218
- userId: NonNullable<
219
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
220
- >['userId'],
221
- page: number,
222
- pageSize: number,
223
- ): Promise<DatabaseNotification<Config>[]>;
224
- getAllNotifications(): Promise<AnyDatabaseNotification<Config>[]>;
225
- getNotifications(page: number, pageSize: number): Promise<AnyDatabaseNotification<Config>[]>;
226
- persistNotification(
227
- notification: NotificationInput<Config>,
228
- ): Promise<DatabaseNotification<Config>>;
229
- persistNotificationUpdate(
230
- notificationId: NonNullable<
231
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
232
- >['id'],
233
- notification: Partial<Omit<DatabaseNotification<Config>, 'id'>>,
234
- ): Promise<DatabaseNotification<Config>>;
235
- persistOneOffNotification(
236
- notification: OneOffNotificationInput<Config>,
237
- ): Promise<DatabaseOneOffNotification<Config>>;
238
- persistOneOffNotificationUpdate(
239
- notificationId: NonNullable<
240
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
241
- >['id'],
242
- notification: Partial<Omit<DatabaseOneOffNotification<Config>, 'id'>>,
243
- ): Promise<DatabaseOneOffNotification<Config>>;
244
- getOneOffNotification(
245
- notificationId: NonNullable<
246
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
247
- >['id'],
248
- _forUpdate: boolean,
249
- ): Promise<DatabaseOneOffNotification<Config> | null>;
250
- getAllOneOffNotifications(): Promise<DatabaseOneOffNotification<Config>[]>;
251
- getOneOffNotifications(
252
- page: number,
253
- pageSize: number,
254
- ): Promise<DatabaseOneOffNotification<Config>[]>;
255
- markAsSent(
256
- notificationId: NonNullable<
257
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
258
- >['id'],
259
- checkIsPending?: boolean,
260
- ): Promise<AnyDatabaseNotification<Config>>;
261
- markAsFailed(
262
- notificationId: NonNullable<
263
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
264
- >['id'],
265
- checkIsPending?: boolean,
266
- ): Promise<AnyDatabaseNotification<Config>>;
267
- markAsRead(
268
- notificationId: NonNullable<
269
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
270
- >['id'],
271
- checkIsSent?: boolean,
272
- ): Promise<DatabaseNotification<Config>>;
273
- cancelNotification(
274
- notificationId: NonNullable<
275
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
276
- >['id'],
277
- ): Promise<void>;
278
- getNotification(
279
- notificationId: NonNullable<
280
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
281
- >['id'],
282
- _forUpdate: boolean,
283
- ): Promise<AnyDatabaseNotification<Config> | null>;
284
- filterAllInAppUnreadNotifications(
285
- userId: NonNullable<
286
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
287
- >['userId'],
288
- ): Promise<DatabaseNotification<Config>[]>;
289
- filterInAppUnreadNotifications(
290
- userId: NonNullable<
291
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
292
- >['userId'],
293
- page: number,
294
- pageSize: number,
295
- ): Promise<DatabaseNotification<Config>[]>;
296
- getUserEmailFromNotification(
297
- notificationId: NonNullable<
298
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
299
- >['id'],
300
- ): Promise<string | undefined>;
301
- storeContextUsed(
302
- notificationId: NonNullable<
303
- Awaited<ReturnType<typeof this.prismaClient.notification.findUnique>>
304
- >['id'],
305
- context: InputJsonValue,
306
- ): Promise<void>;
307
- bulkPersistNotifications(
308
- notifications: Omit<Notification<Config>, 'id'>[],
309
- ): Promise<Config['NotificationIdType'][]>;
310
- }
311
- export declare class PrismaNotificationBackendFactory<Config extends BaseNotificationTypeConfig> {
312
- create<
313
- Client extends NotificationPrismaClientInterface<
314
- Config['NotificationIdType'],
315
- Config['UserIdType']
316
- >,
317
- >(prismaClient: Client): PrismaNotificationBackend<Client, Config>;
318
- }
@@ -1,406 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- exports.PrismaNotificationBackendFactory =
3
- exports.PrismaNotificationBackend =
4
- exports.NotificationTypeEnum =
5
- exports.NotificationStatusEnum =
6
- void 0;
7
- exports.NotificationStatusEnum = {
8
- PENDING_SEND: 'PENDING_SEND',
9
- SENT: 'SENT',
10
- FAILED: 'FAILED',
11
- READ: 'READ',
12
- CANCELLED: 'CANCELLED',
13
- };
14
- exports.NotificationTypeEnum = {
15
- EMAIL: 'EMAIL',
16
- PUSH: 'PUSH',
17
- SMS: 'SMS',
18
- IN_APP: 'IN_APP',
19
- };
20
- function convertJsonValueToRecord(jsonValue) {
21
- if (typeof jsonValue === 'object' && !Array.isArray(jsonValue)) {
22
- return jsonValue;
23
- }
24
- throw new Error('Invalid JSON value. It should be an object.');
25
- }
26
- class PrismaNotificationBackend {
27
- constructor(prismaClient) {
28
- this.prismaClient = prismaClient;
29
- }
30
- /**
31
- * Serialize a Prisma notification model to either DatabaseNotification or DatabaseOneOffNotification
32
- * based on whether it has a userId or not
33
- */
34
- serializeNotification(notification) {
35
- const baseData = {
36
- id: notification.id,
37
- notificationType: notification.notificationType,
38
- title: notification.title,
39
- bodyTemplate: notification.bodyTemplate,
40
- contextName: notification.contextName,
41
- contextParameters: notification.contextParameters ? notification.contextParameters : {},
42
- sendAfter: notification.sendAfter,
43
- subjectTemplate: notification.subjectTemplate,
44
- status: notification.status,
45
- contextUsed: notification.contextUsed,
46
- extraParams: notification.extraParams
47
- ? convertJsonValueToRecord(notification.extraParams)
48
- : null,
49
- adapterUsed: notification.adapterUsed,
50
- sentAt: notification.sentAt,
51
- readAt: notification.readAt,
52
- createdAt: notification.createdAt,
53
- updatedAt: notification.updatedAt,
54
- };
55
- // Check if this is a one-off notification (has emailOrPhone but no userId)
56
- if (notification.emailOrPhone && !notification.userId) {
57
- return {
58
- ...baseData,
59
- emailOrPhone: notification.emailOrPhone,
60
- firstName: notification.firstName || '',
61
- lastName: notification.lastName || '',
62
- };
63
- }
64
- // Regular notification with userId
65
- return {
66
- ...baseData,
67
- userId: notification.userId,
68
- };
69
- }
70
- deserializeNotification(notification) {
71
- return {
72
- user: {
73
- connect: {
74
- id: notification.userId,
75
- },
76
- },
77
- notificationType: notification.notificationType,
78
- title: notification.title,
79
- bodyTemplate: notification.bodyTemplate,
80
- contextName: notification.contextName,
81
- contextParameters: notification.contextParameters,
82
- sendAfter: notification.sendAfter,
83
- subjectTemplate: notification.subjectTemplate,
84
- extraParams: notification.extraParams,
85
- };
86
- }
87
- deserializeNotificationForUpdate(notification) {
88
- return {
89
- ...(notification.userId ? { user: { connect: { id: notification.userId } } } : {}),
90
- ...(notification.notificationType
91
- ? {
92
- notificationType: exports.NotificationTypeEnum[notification.notificationType],
93
- }
94
- : {}),
95
- ...(notification.title ? { title: notification.title } : {}),
96
- ...(notification.bodyTemplate ? { bodyTemplate: notification.bodyTemplate } : {}),
97
- ...(notification.contextName ? { contextName: notification.contextName } : {}),
98
- ...(notification.contextParameters
99
- ? {
100
- contextParameters: notification.contextParameters ? notification.contextParameters : {},
101
- }
102
- : {}),
103
- ...(notification.sendAfter ? { sendAfter: notification.sendAfter } : {}),
104
- ...(notification.subjectTemplate ? { subjectTemplate: notification.subjectTemplate } : {}),
105
- };
106
- }
107
- async getAllPendingNotifications() {
108
- const notifications = await this.prismaClient.notification.findMany({
109
- where: { status: exports.NotificationStatusEnum.PENDING_SEND },
110
- });
111
- return notifications.map((n) => this.serializeNotification(n));
112
- }
113
- async getPendingNotifications(page = 0, pageSize = 100) {
114
- const notifications = await this.prismaClient.notification.findMany({
115
- where: {
116
- status: exports.NotificationStatusEnum.PENDING_SEND,
117
- sendAfter: null,
118
- },
119
- skip: page * pageSize,
120
- take: pageSize,
121
- });
122
- return notifications.map((n) => this.serializeNotification(n));
123
- }
124
- async getAllFutureNotifications() {
125
- const notifications = await this.prismaClient.notification.findMany({
126
- where: {
127
- status: { not: exports.NotificationStatusEnum.PENDING_SEND },
128
- sendAfter: { lte: new Date() },
129
- },
130
- });
131
- return notifications.map((n) => this.serializeNotification(n));
132
- }
133
- async getFutureNotifications(page = 0, pageSize = 100) {
134
- const notifications = await this.prismaClient.notification.findMany({
135
- where: {
136
- status: { not: exports.NotificationStatusEnum.PENDING_SEND },
137
- sendAfter: { lte: new Date() },
138
- },
139
- skip: page * pageSize,
140
- take: pageSize,
141
- });
142
- return notifications.map((n) => this.serializeNotification(n));
143
- }
144
- async getAllFutureNotificationsFromUser(userId) {
145
- const notifications = await this.prismaClient.notification.findMany({
146
- where: {
147
- userId,
148
- status: {
149
- not: exports.NotificationStatusEnum.PENDING_SEND,
150
- },
151
- sendAfter: {
152
- lte: new Date(),
153
- },
154
- },
155
- });
156
- // These are guaranteed to be regular notifications (not one-off) since we're filtering by userId
157
- return notifications.map((n) => this.serializeNotification(n));
158
- }
159
- async getFutureNotificationsFromUser(userId, page, pageSize) {
160
- const notifications = await this.prismaClient.notification.findMany({
161
- where: {
162
- userId,
163
- status: {
164
- not: exports.NotificationStatusEnum.PENDING_SEND,
165
- },
166
- sendAfter: {
167
- lte: new Date(),
168
- },
169
- },
170
- skip: page * pageSize,
171
- take: pageSize,
172
- });
173
- // These are guaranteed to be regular notifications (not one-off) since we're filtering by userId
174
- return notifications.map((n) => this.serializeNotification(n));
175
- }
176
- async getAllNotifications() {
177
- const notifications = await this.prismaClient.notification.findMany({});
178
- return notifications.map((n) => this.serializeNotification(n));
179
- }
180
- async getNotifications(page, pageSize) {
181
- const notifications = await this.prismaClient.notification.findMany({
182
- skip: page * pageSize,
183
- take: pageSize,
184
- });
185
- return notifications.map((n) => this.serializeNotification(n));
186
- }
187
- async persistNotification(notification) {
188
- const created = await this.prismaClient.notification.create({
189
- data: this.deserializeNotification(notification),
190
- });
191
- // persistNotification takes NotificationInput which always has userId, so this is always a regular notification
192
- return this.serializeNotification(created);
193
- }
194
- async persistNotificationUpdate(notificationId, notification) {
195
- const updated = await this.prismaClient.notification.update({
196
- where: {
197
- id: notificationId,
198
- },
199
- data: this.deserializeNotificationForUpdate(notification),
200
- });
201
- // persistNotificationUpdate takes Partial<DatabaseNotification> which has userId, so this is always a regular notification
202
- return this.serializeNotification(updated);
203
- }
204
- /* One-off notification persistence and query methods */
205
- async persistOneOffNotification(notification) {
206
- const created = await this.prismaClient.notification.create({
207
- data: {
208
- userId: null, // One-off notifications don't have a userId
209
- emailOrPhone: notification.emailOrPhone,
210
- firstName: notification.firstName,
211
- lastName: notification.lastName,
212
- notificationType: notification.notificationType,
213
- title: notification.title,
214
- bodyTemplate: notification.bodyTemplate,
215
- contextName: notification.contextName,
216
- contextParameters: notification.contextParameters,
217
- sendAfter: notification.sendAfter,
218
- subjectTemplate: notification.subjectTemplate,
219
- extraParams: notification.extraParams,
220
- status: exports.NotificationStatusEnum.PENDING_SEND,
221
- },
222
- });
223
- return this.serializeNotification(created);
224
- }
225
- async persistOneOffNotificationUpdate(notificationId, notification) {
226
- const data = {
227
- ...(notification.emailOrPhone !== undefined
228
- ? { emailOrPhone: notification.emailOrPhone }
229
- : {}),
230
- ...(notification.firstName !== undefined ? { firstName: notification.firstName } : {}),
231
- ...(notification.lastName !== undefined ? { lastName: notification.lastName } : {}),
232
- ...(notification.notificationType ? { notificationType: notification.notificationType } : {}),
233
- ...(notification.title ? { title: notification.title } : {}),
234
- ...(notification.bodyTemplate ? { bodyTemplate: notification.bodyTemplate } : {}),
235
- ...(notification.contextName ? { contextName: notification.contextName } : {}),
236
- ...(notification.contextParameters
237
- ? { contextParameters: notification.contextParameters }
238
- : {}),
239
- ...(notification.sendAfter ? { sendAfter: notification.sendAfter } : {}),
240
- ...(notification.subjectTemplate ? { subjectTemplate: notification.subjectTemplate } : {}),
241
- };
242
- const updated = await this.prismaClient.notification.update({
243
- where: { id: notificationId },
244
- data,
245
- });
246
- return this.serializeNotification(updated);
247
- }
248
- async getOneOffNotification(notificationId, _forUpdate) {
249
- const notification = await this.prismaClient.notification.findUnique({
250
- where: {
251
- id: notificationId,
252
- },
253
- });
254
- if (!notification || !notification.emailOrPhone || notification.userId !== null) {
255
- return null;
256
- }
257
- return this.serializeNotification(notification);
258
- }
259
- async getAllOneOffNotifications() {
260
- const notifications = await this.prismaClient.notification.findMany({
261
- where: {
262
- userId: null,
263
- emailOrPhone: { not: null },
264
- },
265
- });
266
- return notifications
267
- .filter((n) => n.emailOrPhone !== null)
268
- .map((n) => this.serializeNotification(n));
269
- }
270
- async getOneOffNotifications(page, pageSize) {
271
- const notifications = await this.prismaClient.notification.findMany({
272
- where: {
273
- userId: null,
274
- emailOrPhone: { not: null },
275
- },
276
- skip: page * pageSize,
277
- take: pageSize,
278
- });
279
- return notifications
280
- .filter((n) => n.emailOrPhone !== null)
281
- .map((n) => this.serializeNotification(n));
282
- }
283
- async markAsSent(notificationId, checkIsPending = true) {
284
- const whereClause = {
285
- id: notificationId,
286
- };
287
- if (checkIsPending) {
288
- whereClause.status = exports.NotificationStatusEnum.PENDING_SEND;
289
- }
290
- const updated = await this.prismaClient.notification.update({
291
- where: whereClause,
292
- data: {
293
- status: exports.NotificationStatusEnum.SENT,
294
- sentAt: new Date(),
295
- },
296
- });
297
- return this.serializeNotification(updated);
298
- }
299
- async markAsFailed(notificationId, checkIsPending = true) {
300
- const whereClause = {
301
- id: notificationId,
302
- };
303
- if (checkIsPending) {
304
- whereClause.status = exports.NotificationStatusEnum.PENDING_SEND;
305
- }
306
- const updated = await this.prismaClient.notification.update({
307
- where: whereClause,
308
- data: {
309
- status: exports.NotificationStatusEnum.FAILED,
310
- sentAt: new Date(),
311
- },
312
- });
313
- return this.serializeNotification(updated);
314
- }
315
- async markAsRead(notificationId, checkIsSent = true) {
316
- const whereClause = {
317
- id: notificationId,
318
- };
319
- if (checkIsSent) {
320
- whereClause.status = exports.NotificationStatusEnum.SENT;
321
- }
322
- const updated = await this.prismaClient.notification.update({
323
- where: whereClause,
324
- data: {
325
- status: 'READ',
326
- readAt: new Date(),
327
- },
328
- });
329
- // markAsRead is only for in-app notifications (which are always regular notifications with userId)
330
- return this.serializeNotification(updated);
331
- }
332
- async cancelNotification(notificationId) {
333
- await this.prismaClient.notification.update({
334
- where: {
335
- id: notificationId,
336
- },
337
- data: {
338
- status: exports.NotificationStatusEnum.CANCELLED,
339
- },
340
- });
341
- }
342
- async getNotification(notificationId, _forUpdate) {
343
- const notification = await this.prismaClient.notification.findUnique({
344
- where: { id: notificationId },
345
- });
346
- if (!notification) return null;
347
- return this.serializeNotification(notification);
348
- }
349
- async filterAllInAppUnreadNotifications(userId) {
350
- const notifications = await this.prismaClient.notification.findMany({
351
- where: {
352
- userId,
353
- status: 'SENT',
354
- readAt: null,
355
- },
356
- });
357
- // These are guaranteed to be regular notifications (not one-off) since we're filtering by userId
358
- return notifications.map((n) => this.serializeNotification(n));
359
- }
360
- async filterInAppUnreadNotifications(userId, page, pageSize) {
361
- const notifications = await this.prismaClient.notification.findMany({
362
- where: {
363
- userId,
364
- status: 'SENT',
365
- readAt: null,
366
- },
367
- skip: page * pageSize,
368
- take: pageSize,
369
- });
370
- // These are guaranteed to be regular notifications (not one-off) since we're filtering by userId
371
- return notifications.map((n) => this.serializeNotification(n));
372
- }
373
- async getUserEmailFromNotification(notificationId) {
374
- var _a;
375
- const notification = await this.prismaClient.notification.findUnique({
376
- where: {
377
- id: notificationId,
378
- },
379
- include: {
380
- user: true,
381
- },
382
- });
383
- return (_a = notification === null || notification === void 0 ? void 0 : notification.user) ===
384
- null || _a === void 0
385
- ? void 0
386
- : _a.email;
387
- }
388
- async storeContextUsed(notificationId, context) {
389
- await this.prismaClient.notification.update({
390
- where: { id: notificationId },
391
- data: { contextUsed: context },
392
- });
393
- }
394
- async bulkPersistNotifications(notifications) {
395
- return this.prismaClient.notification.createMany({
396
- data: notifications.map((notification) => this.deserializeNotification(notification)),
397
- });
398
- }
399
- }
400
- exports.PrismaNotificationBackend = PrismaNotificationBackend;
401
- class PrismaNotificationBackendFactory {
402
- create(prismaClient) {
403
- return new PrismaNotificationBackend(prismaClient);
404
- }
405
- }
406
- exports.PrismaNotificationBackendFactory = PrismaNotificationBackendFactory;
@@ -1,89 +0,0 @@
1
- import type { InputJsonValue } from '../../types/json-values';
2
- import type {
3
- AnyDatabaseNotification,
4
- DatabaseNotification,
5
- DatabaseOneOffNotification,
6
- Notification,
7
- OneOffNotificationInput,
8
- } from '../../types/notification';
9
- import type { BaseNotificationTypeConfig } from '../../types/notification-type-config';
10
- export interface BaseNotificationBackend<Config extends BaseNotificationTypeConfig> {
11
- getAllPendingNotifications(): Promise<AnyDatabaseNotification<Config>[]>;
12
- getPendingNotifications(
13
- page: number,
14
- pageSize: number,
15
- ): Promise<AnyDatabaseNotification<Config>[]>;
16
- getAllFutureNotifications(): Promise<AnyDatabaseNotification<Config>[]>;
17
- getFutureNotifications(
18
- page: number,
19
- pageSize: number,
20
- ): Promise<AnyDatabaseNotification<Config>[]>;
21
- getAllFutureNotificationsFromUser(
22
- userId: Config['UserIdType'],
23
- ): Promise<DatabaseNotification<Config>[]>;
24
- getFutureNotificationsFromUser(
25
- userId: Config['UserIdType'],
26
- page: number,
27
- pageSize: number,
28
- ): Promise<DatabaseNotification<Config>[]>;
29
- persistNotification(
30
- notification: Omit<Notification<Config>, 'id'>,
31
- ): Promise<DatabaseNotification<Config>>;
32
- getAllNotifications(): Promise<AnyDatabaseNotification<Config>[]>;
33
- getNotifications(page: number, pageSize: number): Promise<AnyDatabaseNotification<Config>[]>;
34
- bulkPersistNotifications(
35
- notifications: Omit<Notification<Config>, 'id'>[],
36
- ): Promise<Config['NotificationIdType'][]>;
37
- persistNotificationUpdate(
38
- notificationId: Config['NotificationIdType'],
39
- notification: Partial<Omit<Notification<Config>, 'id'>>,
40
- ): Promise<DatabaseNotification<Config>>;
41
- markAsSent(
42
- notificationId: Config['NotificationIdType'],
43
- checkIsPending: boolean,
44
- ): Promise<AnyDatabaseNotification<Config>>;
45
- markAsFailed(
46
- notificationId: Config['NotificationIdType'],
47
- checkIsPending: boolean,
48
- ): Promise<AnyDatabaseNotification<Config>>;
49
- markAsRead(
50
- notificationId: Config['NotificationIdType'],
51
- checkIsSent: boolean,
52
- ): Promise<DatabaseNotification<Config>>;
53
- cancelNotification(notificationId: Config['NotificationIdType']): Promise<void>;
54
- getNotification(
55
- notificationId: Config['NotificationIdType'],
56
- forUpdate: boolean,
57
- ): Promise<AnyDatabaseNotification<Config> | null>;
58
- filterAllInAppUnreadNotifications(
59
- userId: Config['UserIdType'],
60
- ): Promise<DatabaseNotification<Config>[]>;
61
- filterInAppUnreadNotifications(
62
- userId: Config['UserIdType'],
63
- page: number,
64
- pageSize: number,
65
- ): Promise<DatabaseNotification<Config>[]>;
66
- getUserEmailFromNotification(
67
- notificationId: Config['NotificationIdType'],
68
- ): Promise<string | undefined>;
69
- storeContextUsed(
70
- notificationId: Config['NotificationIdType'],
71
- context: InputJsonValue,
72
- ): Promise<void>;
73
- persistOneOffNotification(
74
- notification: Omit<OneOffNotificationInput<Config>, 'id'>,
75
- ): Promise<DatabaseOneOffNotification<Config>>;
76
- persistOneOffNotificationUpdate(
77
- notificationId: Config['NotificationIdType'],
78
- notification: Partial<Omit<OneOffNotificationInput<Config>, 'id'>>,
79
- ): Promise<DatabaseOneOffNotification<Config>>;
80
- getOneOffNotification(
81
- notificationId: Config['NotificationIdType'],
82
- forUpdate: boolean,
83
- ): Promise<DatabaseOneOffNotification<Config> | null>;
84
- getAllOneOffNotifications(): Promise<DatabaseOneOffNotification<Config>[]>;
85
- getOneOffNotifications(
86
- page: number,
87
- pageSize: number,
88
- ): Promise<DatabaseOneOffNotification<Config>[]>;
89
- }
@@ -1 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,2 +0,0 @@
1
- import type { UUID } from './uuid';
2
- export type Identifier = string | number | UUID;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,19 +0,0 @@
1
- export type JsonPrimitive = string | number | boolean | null;
2
- export interface JsonArray extends Array<JsonValue> {}
3
- export type JsonObject = {
4
- [Key in string]?: JsonValue;
5
- };
6
- export type JsonValue = string | number | boolean | JsonObject | JsonArray | null;
7
- export type InputJsonObject = {
8
- readonly [Key in string]?: InputJsonValue | null;
9
- };
10
- export interface InputJsonArray extends ReadonlyArray<InputJsonValue | null> {}
11
- export type InputJsonValue =
12
- | string
13
- | number
14
- | boolean
15
- | InputJsonObject
16
- | InputJsonArray
17
- | {
18
- toJSON(): unknown;
19
- };
@@ -1 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,6 +0,0 @@
1
- import type { JsonObject, JsonPrimitive } from './json-values';
2
- export interface ContextGenerator<
3
- Params extends Record<string, JsonPrimitive> = Record<string, JsonPrimitive>,
4
- > {
5
- generate(params: Params): JsonObject | Promise<JsonObject>;
6
- }
@@ -1 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
@@ -1 +0,0 @@
1
- export type NotificationStatus = 'PENDING_SEND' | 'SENT' | 'FAILED' | 'READ' | 'CANCELLED';
@@ -1 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,7 +0,0 @@
1
- import type { Identifier } from './identifier';
2
- import type { ContextGenerator } from './notification-context-generators';
3
- export type BaseNotificationTypeConfig = {
4
- ContextMap: Record<string, ContextGenerator>;
5
- NotificationIdType: Identifier;
6
- UserIdType: Identifier;
7
- };
@@ -1 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
@@ -1 +0,0 @@
1
- export type NotificationType = 'PUSH' | 'EMAIL' | 'SMS' | 'IN_APP';
@@ -1 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,97 +0,0 @@
1
- import type { InputJsonValue, JsonValue } from './json-values';
2
- import type { NotificationStatus } from './notification-status';
3
- import type { NotificationType } from './notification-type';
4
- import type { BaseNotificationTypeConfig } from './notification-type-config';
5
- export type {
6
- OneOffNotificationInput,
7
- OneOffNotificationResendWithContextInput,
8
- DatabaseOneOffNotification,
9
- OneOffNotification,
10
- } from './one-off-notification';
11
- export type NotificationInput<Config extends BaseNotificationTypeConfig> = {
12
- userId: Config['UserIdType'];
13
- notificationType: NotificationType;
14
- title: string | null;
15
- bodyTemplate: string;
16
- contextName: string & keyof Config['ContextMap'];
17
- contextParameters: Parameters<
18
- Config['ContextMap'][NotificationInput<Config>['contextName']]['generate']
19
- >[0];
20
- sendAfter: Date | null;
21
- subjectTemplate: string | null;
22
- extraParams: InputJsonValue | null;
23
- };
24
- export type NotificationResendWithContextInput<Config extends BaseNotificationTypeConfig> = {
25
- userId: Config['UserIdType'];
26
- notificationType: NotificationType;
27
- title: string | null;
28
- bodyTemplate: string;
29
- contextName: string & keyof Config['ContextMap'];
30
- contextParameters: Parameters<
31
- Config['ContextMap'][NotificationResendWithContextInput<Config>['contextName']]['generate']
32
- >[0];
33
- contextUsed: ReturnType<
34
- Config['ContextMap'][NotificationResendWithContextInput<Config>['contextName']]['generate']
35
- > extends Promise<infer T>
36
- ? T
37
- : ReturnType<
38
- Config['ContextMap'][NotificationResendWithContextInput<Config>['contextName']]['generate']
39
- >;
40
- sendAfter: Date | null;
41
- subjectTemplate: string | null;
42
- extraParams: InputJsonValue | null;
43
- };
44
- export type DatabaseNotification<Config extends BaseNotificationTypeConfig> = {
45
- id: Config['NotificationIdType'];
46
- userId: Config['UserIdType'];
47
- notificationType: NotificationType;
48
- title: string | null;
49
- bodyTemplate: string;
50
- contextName: string & keyof Config['ContextMap'];
51
- contextParameters: Parameters<
52
- Config['ContextMap'][DatabaseNotification<Config>['contextName']]['generate']
53
- >[0];
54
- sendAfter: Date | null;
55
- subjectTemplate: string | null;
56
- status: NotificationStatus;
57
- contextUsed:
58
- | null
59
- | (ReturnType<
60
- Config['ContextMap'][DatabaseNotification<Config>['contextName']]['generate']
61
- > extends Promise<infer T>
62
- ? T
63
- : ReturnType<
64
- Config['ContextMap'][DatabaseNotification<Config>['contextName']]['generate']
65
- >);
66
- extraParams: JsonValue;
67
- adapterUsed: string | null;
68
- sentAt: Date | null;
69
- readAt: Date | null;
70
- createdAt?: Date;
71
- updatedAt?: Date;
72
- };
73
- export type Notification<Config extends BaseNotificationTypeConfig> =
74
- | NotificationInput<Config>
75
- | NotificationResendWithContextInput<Config>
76
- | DatabaseNotification<Config>;
77
- /**
78
- * Union type representing any notification type (regular or one-off).
79
- * This is useful for methods that handle both notification types.
80
- */
81
- export type AnyNotification<Config extends BaseNotificationTypeConfig> =
82
- | Notification<Config>
83
- | import('./one-off-notification').OneOffNotification<Config>;
84
- /**
85
- * Union type for database notifications only (regular or one-off).
86
- * Useful for send methods and database queries.
87
- */
88
- export type AnyDatabaseNotification<Config extends BaseNotificationTypeConfig> =
89
- | DatabaseNotification<Config>
90
- | import('./one-off-notification').DatabaseOneOffNotification<Config>;
91
- /**
92
- * Union type for notification inputs only (regular or one-off).
93
- * Useful for creation methods.
94
- */
95
- export type AnyNotificationInput<Config extends BaseNotificationTypeConfig> =
96
- | NotificationInput<Config>
97
- | import('./one-off-notification').OneOffNotificationInput<Config>;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,91 +0,0 @@
1
- import type { InputJsonValue, JsonValue } from './json-values';
2
- import type { NotificationStatus } from './notification-status';
3
- import type { NotificationType } from './notification-type';
4
- import type { BaseNotificationTypeConfig } from './notification-type-config';
5
- /**
6
- * Input type for creating a one-off notification.
7
- * One-off notifications are sent directly to an email/phone without requiring a user account.
8
- */
9
- export type OneOffNotificationInput<Config extends BaseNotificationTypeConfig> = {
10
- emailOrPhone: string;
11
- firstName: string;
12
- lastName: string;
13
- notificationType: NotificationType;
14
- title: string | null;
15
- bodyTemplate: string;
16
- contextName: string & keyof Config['ContextMap'];
17
- contextParameters: Parameters<
18
- Config['ContextMap'][OneOffNotificationInput<Config>['contextName']]['generate']
19
- >[0];
20
- sendAfter: Date | null;
21
- subjectTemplate: string | null;
22
- extraParams: InputJsonValue | null;
23
- };
24
- /**
25
- * Input type for resending a one-off notification with stored context.
26
- * Similar to OneOffNotificationInput but includes the contextUsed field.
27
- */
28
- export type OneOffNotificationResendWithContextInput<Config extends BaseNotificationTypeConfig> = {
29
- emailOrPhone: string;
30
- firstName: string;
31
- lastName: string;
32
- notificationType: NotificationType;
33
- title: string | null;
34
- bodyTemplate: string;
35
- contextName: string & keyof Config['ContextMap'];
36
- contextParameters: Parameters<
37
- Config['ContextMap'][OneOffNotificationResendWithContextInput<Config>['contextName']]['generate']
38
- >[0];
39
- contextUsed: ReturnType<
40
- Config['ContextMap'][OneOffNotificationResendWithContextInput<Config>['contextName']]['generate']
41
- > extends Promise<infer T>
42
- ? T
43
- : ReturnType<
44
- Config['ContextMap'][OneOffNotificationResendWithContextInput<Config>['contextName']]['generate']
45
- >;
46
- sendAfter: Date | null;
47
- subjectTemplate: string | null;
48
- extraParams: InputJsonValue | null;
49
- };
50
- /**
51
- * Database representation of a one-off notification.
52
- * Includes all fields from input plus database-managed fields (id, status, timestamps, etc.)
53
- */
54
- export type DatabaseOneOffNotification<Config extends BaseNotificationTypeConfig> = {
55
- id: Config['NotificationIdType'];
56
- emailOrPhone: string;
57
- firstName: string;
58
- lastName: string;
59
- notificationType: NotificationType;
60
- title: string | null;
61
- bodyTemplate: string;
62
- contextName: string & keyof Config['ContextMap'];
63
- contextParameters: Parameters<
64
- Config['ContextMap'][DatabaseOneOffNotification<Config>['contextName']]['generate']
65
- >[0];
66
- sendAfter: Date | null;
67
- subjectTemplate: string | null;
68
- status: NotificationStatus;
69
- contextUsed:
70
- | null
71
- | (ReturnType<
72
- Config['ContextMap'][DatabaseOneOffNotification<Config>['contextName']]['generate']
73
- > extends Promise<infer T>
74
- ? T
75
- : ReturnType<
76
- Config['ContextMap'][DatabaseOneOffNotification<Config>['contextName']]['generate']
77
- >);
78
- extraParams: JsonValue;
79
- adapterUsed: string | null;
80
- sentAt: Date | null;
81
- readAt: Date | null;
82
- createdAt?: Date;
83
- updatedAt?: Date;
84
- };
85
- /**
86
- * Union type representing any one-off notification (input, resend, or database).
87
- */
88
- export type OneOffNotification<Config extends BaseNotificationTypeConfig> =
89
- | OneOffNotificationInput<Config>
90
- | OneOffNotificationResendWithContextInput<Config>
91
- | DatabaseOneOffNotification<Config>;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
@@ -1 +0,0 @@
1
- export type UUID = `${string}-${string}-${string}-${string}-${string}`;
@@ -1 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });