@clipboard-health/notifications 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -80
- package/package.json +6 -6
- package/src/lib/notificationClient.d.ts +7 -6
- package/src/lib/notificationClient.js +7 -6
- package/src/lib/notificationClient.js.map +1 -1
- package/src/lib/notificationJobEnqueuer.d.ts +14 -13
- package/src/lib/notificationJobEnqueuer.js +14 -13
- package/src/lib/notificationJobEnqueuer.js.map +1 -1
package/README.md
CHANGED
|
@@ -4,102 +4,47 @@ Send notifications through third-party providers.
|
|
|
4
4
|
|
|
5
5
|
## Table of contents <!-- omit from toc -->
|
|
6
6
|
|
|
7
|
-
- [Install](#install)
|
|
8
|
-
- [Usage](#usage)
|
|
9
7
|
- [Local development commands](#local-development-commands)
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
<embedex source="packages/notifications/examples/usage.md">
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
npm install @clipboard-health/notifications
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
1. Export a `NotificationJobEnqueuer` instance:
|
|
20
|
-
|
|
21
|
-
<embedex source="packages/notifications/examples/notificationJobEnqueuer.ts">
|
|
11
|
+
1. Search your service for a `NotificationJobEnqueuer` instance. If there isn't one, create and export it:
|
|
22
12
|
|
|
23
13
|
```ts
|
|
24
14
|
import { NotificationJobEnqueuer } from "@clipboard-health/notifications";
|
|
25
15
|
|
|
26
16
|
import { BackgroundJobsService } from "./setup";
|
|
27
17
|
|
|
28
|
-
//
|
|
18
|
+
// Create and export one instance of this in your microservice.
|
|
29
19
|
export const notificationJobEnqueuer = new NotificationJobEnqueuer({
|
|
20
|
+
// Use your instance of `@clipboard-health/mongo-jobs` or `@clipboard-health/background-jobs-postgres` here.
|
|
30
21
|
adapter: new BackgroundJobsService(),
|
|
31
22
|
});
|
|
32
23
|
```
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
1. Enqueue your job:
|
|
37
|
-
|
|
38
|
-
<embedex source="packages/notifications/examples/enqueueNotificationJob.ts">
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
import {
|
|
42
|
-
type ExampleNotificationEnqueueData,
|
|
43
|
-
ExampleNotificationJob,
|
|
44
|
-
} from "./exampleNotification.job";
|
|
45
|
-
import { notificationJobEnqueuer } from "./notificationJobEnqueuer";
|
|
46
|
-
|
|
47
|
-
async function enqueueNotificationJob() {
|
|
48
|
-
await notificationJobEnqueuer.enqueueOneOrMore<ExampleNotificationEnqueueData>(
|
|
49
|
-
ExampleNotificationJob,
|
|
50
|
-
{
|
|
51
|
-
// Set expiresAt at enqueue-time so it remains stable across job retries.
|
|
52
|
-
expiresAt: minutesFromNow(60).toISOString(),
|
|
53
|
-
// Set idempotencyKey at enqueue-time so it remains stable across job retries.
|
|
54
|
-
idempotencyKey: {
|
|
55
|
-
resourceId: "event-123",
|
|
56
|
-
},
|
|
57
|
-
// Set recipients at enqueue-time so they respect our notification provider's limits.
|
|
58
|
-
recipients: ["user-1"],
|
|
59
|
-
|
|
60
|
-
workflowKey: "event-starting-reminder",
|
|
61
|
-
|
|
62
|
-
// Any additional enqueue-time data passed to the job:
|
|
63
|
-
workplaceId: "workplace-123",
|
|
64
|
-
},
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// eslint-disable-next-line unicorn/prefer-top-level-await
|
|
69
|
-
void enqueueNotificationJob();
|
|
70
|
-
|
|
71
|
-
function minutesFromNow(minutes: number) {
|
|
72
|
-
return new Date(Date.now() + minutes * 60_000);
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
</embedex>
|
|
77
|
-
|
|
78
|
-
1. Implement your job, which should be minimal, calling off to a service to send the actual notification:
|
|
79
|
-
|
|
80
|
-
<embedex source="packages/notifications/examples/exampleNotification.job.ts">
|
|
25
|
+
1. Implement a minimal job, calling off to a NestJS service for any business logic and to send the notification.
|
|
81
26
|
|
|
82
27
|
```ts
|
|
83
28
|
import { type BaseHandler } from "@clipboard-health/background-jobs-adapter";
|
|
84
|
-
import {
|
|
85
|
-
type NotificationEnqueueData,
|
|
86
|
-
type NotificationJobData,
|
|
87
|
-
} from "@clipboard-health/notifications";
|
|
29
|
+
import { type NotificationData } from "@clipboard-health/notifications";
|
|
88
30
|
import { isFailure, toError } from "@clipboard-health/util-ts";
|
|
89
31
|
|
|
90
32
|
import { type ExampleNotificationService } from "./exampleNotification.service";
|
|
91
33
|
|
|
92
|
-
|
|
34
|
+
export type ExampleNotificationData = NotificationData<{
|
|
93
35
|
workplaceId: string;
|
|
94
|
-
}
|
|
36
|
+
}>;
|
|
95
37
|
|
|
96
|
-
export
|
|
97
|
-
|
|
38
|
+
export const EXAMPLE_NOTIFICATION_JOB_NAME = "ExampleNotificationJob";
|
|
39
|
+
|
|
40
|
+
// For mongo-jobs, you'll implement HandlerInterface<ExampleNotificationData["Job"]>
|
|
41
|
+
// For background-jobs-postgres, you'll implement Handler<ExampleNotificationData["Job"]>
|
|
42
|
+
export class ExampleNotificationJob implements BaseHandler<ExampleNotificationData["Job"]> {
|
|
43
|
+
public name = EXAMPLE_NOTIFICATION_JOB_NAME;
|
|
98
44
|
|
|
99
|
-
export class ExampleNotificationJob implements BaseHandler<ExampleNotificationJobData> {
|
|
100
45
|
constructor(private readonly service: ExampleNotificationService) {}
|
|
101
46
|
|
|
102
|
-
async perform(data:
|
|
47
|
+
async perform(data: ExampleNotificationData["Job"], job: { attemptsCount: number }) {
|
|
103
48
|
const result = await this.service.sendNotification({
|
|
104
49
|
...data,
|
|
105
50
|
// Include the job's attempts count for debugging, this is called `retryAttempts` in `background-jobs-postgres`.
|
|
@@ -113,18 +58,61 @@ npm install @clipboard-health/notifications
|
|
|
113
58
|
}
|
|
114
59
|
```
|
|
115
60
|
|
|
116
|
-
|
|
61
|
+
1. Search your service for a constant that stores workflow keys. If there isn't one, create and export it:
|
|
117
62
|
|
|
118
|
-
|
|
63
|
+
```ts
|
|
64
|
+
export const WORKFLOW_KEYS = {
|
|
65
|
+
eventStartingReminder: "event-starting-reminder",
|
|
66
|
+
} as const;
|
|
67
|
+
```
|
|
119
68
|
|
|
120
|
-
|
|
69
|
+
1. Enqueue your job:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import {
|
|
73
|
+
EXAMPLE_NOTIFICATION_JOB_NAME,
|
|
74
|
+
type ExampleNotificationData,
|
|
75
|
+
} from "./exampleNotification.job";
|
|
76
|
+
import { notificationJobEnqueuer } from "./notificationJobEnqueuer";
|
|
77
|
+
import { WORKFLOW_KEYS } from "./workflowKeys";
|
|
78
|
+
|
|
79
|
+
async function enqueueNotificationJob() {
|
|
80
|
+
await notificationJobEnqueuer.enqueueOneOrMore<ExampleNotificationData["Enqueue"]>(
|
|
81
|
+
EXAMPLE_NOTIFICATION_JOB_NAME,
|
|
82
|
+
// Important: Read the TypeDoc documentation for additional context.
|
|
83
|
+
{
|
|
84
|
+
/**
|
|
85
|
+
* Set expiresAt at enqueue-time so it remains stable across job retries. Use date-fns in your
|
|
86
|
+
* service instead of this manual calculation.
|
|
87
|
+
*/
|
|
88
|
+
expiresAt: new Date(Date.now() + 60 * 60_000).toISOString(),
|
|
89
|
+
// Set idempotencyKey at enqueue-time so it remains stable across job retries.
|
|
90
|
+
idempotencyKey: {
|
|
91
|
+
resourceId: "event-123",
|
|
92
|
+
},
|
|
93
|
+
// Set recipients at enqueue-time so they respect our notification provider's limits.
|
|
94
|
+
recipients: ["userId-1"],
|
|
95
|
+
|
|
96
|
+
workflowKey: WORKFLOW_KEYS.eventStartingReminder,
|
|
97
|
+
|
|
98
|
+
// Any additional enqueue-time data passed to the job:
|
|
99
|
+
workplaceId: "workplaceId-123",
|
|
100
|
+
},
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// eslint-disable-next-line unicorn/prefer-top-level-await
|
|
105
|
+
void enqueueNotificationJob();
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
1. Trigger the job in your NestJS service:
|
|
121
109
|
|
|
122
110
|
```ts
|
|
123
111
|
import { type NotificationClient } from "@clipboard-health/notifications";
|
|
124
112
|
|
|
125
|
-
import { type
|
|
113
|
+
import { type ExampleNotificationData } from "./exampleNotification.job";
|
|
126
114
|
|
|
127
|
-
type ExampleNotificationDo =
|
|
115
|
+
type ExampleNotificationDo = ExampleNotificationData["Job"] & { attempt: number };
|
|
128
116
|
|
|
129
117
|
export class ExampleNotificationService {
|
|
130
118
|
constructor(private readonly client: NotificationClient) {}
|
|
@@ -132,19 +120,20 @@ npm install @clipboard-health/notifications
|
|
|
132
120
|
async sendNotification(params: ExampleNotificationDo) {
|
|
133
121
|
const { attempt, expiresAt, idempotencyKey, recipients, workflowKey, workplaceId } = params;
|
|
134
122
|
|
|
135
|
-
// Assume this comes from a database and
|
|
136
|
-
|
|
123
|
+
// Assume this comes from a database and are used as template variables...
|
|
124
|
+
// Use @clipboard-health/date-time's formatShortDateTime in your service for consistency.
|
|
125
|
+
const data = { favoriteColor: "blue", favoriteAt: new Date().toISOString(), secret: "2" };
|
|
137
126
|
|
|
127
|
+
// Important: Read the TypeDoc documentation for additional context.
|
|
138
128
|
return await this.client.trigger({
|
|
139
129
|
attempt,
|
|
140
130
|
body: {
|
|
141
|
-
recipients,
|
|
142
131
|
data,
|
|
132
|
+
recipients,
|
|
143
133
|
workplaceId,
|
|
144
134
|
},
|
|
145
135
|
expiresAt: new Date(expiresAt),
|
|
146
136
|
idempotencyKey,
|
|
147
|
-
key: workflowKey,
|
|
148
137
|
keysToRedact: ["secret"],
|
|
149
138
|
workflowKey,
|
|
150
139
|
});
|
|
@@ -152,7 +141,7 @@ npm install @clipboard-health/notifications
|
|
|
152
141
|
}
|
|
153
142
|
```
|
|
154
143
|
|
|
155
|
-
|
|
144
|
+
</embedex>
|
|
156
145
|
|
|
157
146
|
## Local development commands
|
|
158
147
|
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/notifications",
|
|
3
3
|
"description": "Send notifications through third-party providers.",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.4",
|
|
5
5
|
"bugs": "https://github.com/ClipboardHealth/core-utils/issues",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@clipboard-health/background-jobs-adapter": "0.5.
|
|
8
|
-
"@clipboard-health/phone-number": "0.9.
|
|
9
|
-
"@clipboard-health/util-ts": "3.18.
|
|
7
|
+
"@clipboard-health/background-jobs-adapter": "0.5.2",
|
|
8
|
+
"@clipboard-health/phone-number": "0.9.2",
|
|
9
|
+
"@clipboard-health/util-ts": "3.18.2",
|
|
10
10
|
"@knocklabs/node": "1.20.0",
|
|
11
11
|
"tslib": "2.8.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@clipboard-health/testing-core": "0.27.
|
|
15
|
-
"type-fest": "5.0
|
|
14
|
+
"@clipboard-health/testing-core": "0.27.2",
|
|
15
|
+
"type-fest": "5.1.0"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [],
|
|
18
18
|
"license": "MIT",
|
|
@@ -44,9 +44,9 @@ export declare class NotificationClient {
|
|
|
44
44
|
* ```ts
|
|
45
45
|
* import { type NotificationClient } from "@clipboard-health/notifications";
|
|
46
46
|
*
|
|
47
|
-
* import { type
|
|
47
|
+
* import { type ExampleNotificationData } from "./exampleNotification.job";
|
|
48
48
|
*
|
|
49
|
-
* type ExampleNotificationDo =
|
|
49
|
+
* type ExampleNotificationDo = ExampleNotificationData["Job"] & { attempt: number };
|
|
50
50
|
*
|
|
51
51
|
* export class ExampleNotificationService {
|
|
52
52
|
* constructor(private readonly client: NotificationClient) {}
|
|
@@ -54,19 +54,20 @@ export declare class NotificationClient {
|
|
|
54
54
|
* async sendNotification(params: ExampleNotificationDo) {
|
|
55
55
|
* const { attempt, expiresAt, idempotencyKey, recipients, workflowKey, workplaceId } = params;
|
|
56
56
|
*
|
|
57
|
-
* // Assume this comes from a database and
|
|
58
|
-
*
|
|
57
|
+
* // Assume this comes from a database and are used as template variables...
|
|
58
|
+
* // Use @clipboard-health/date-time's formatShortDateTime in your service for consistency.
|
|
59
|
+
* const data = { favoriteColor: "blue", favoriteAt: new Date().toISOString(), secret: "2" };
|
|
59
60
|
*
|
|
61
|
+
* // Important: Read the TypeDoc documentation for additional context.
|
|
60
62
|
* return await this.client.trigger({
|
|
61
63
|
* attempt,
|
|
62
64
|
* body: {
|
|
63
|
-
* recipients,
|
|
64
65
|
* data,
|
|
66
|
+
* recipients,
|
|
65
67
|
* workplaceId,
|
|
66
68
|
* },
|
|
67
69
|
* expiresAt: new Date(expiresAt),
|
|
68
70
|
* idempotencyKey,
|
|
69
|
-
* key: workflowKey,
|
|
70
71
|
* keysToRedact: ["secret"],
|
|
71
72
|
* workflowKey,
|
|
72
73
|
* });
|
|
@@ -79,9 +79,9 @@ class NotificationClient {
|
|
|
79
79
|
* ```ts
|
|
80
80
|
* import { type NotificationClient } from "@clipboard-health/notifications";
|
|
81
81
|
*
|
|
82
|
-
* import { type
|
|
82
|
+
* import { type ExampleNotificationData } from "./exampleNotification.job";
|
|
83
83
|
*
|
|
84
|
-
* type ExampleNotificationDo =
|
|
84
|
+
* type ExampleNotificationDo = ExampleNotificationData["Job"] & { attempt: number };
|
|
85
85
|
*
|
|
86
86
|
* export class ExampleNotificationService {
|
|
87
87
|
* constructor(private readonly client: NotificationClient) {}
|
|
@@ -89,19 +89,20 @@ class NotificationClient {
|
|
|
89
89
|
* async sendNotification(params: ExampleNotificationDo) {
|
|
90
90
|
* const { attempt, expiresAt, idempotencyKey, recipients, workflowKey, workplaceId } = params;
|
|
91
91
|
*
|
|
92
|
-
* // Assume this comes from a database and
|
|
93
|
-
*
|
|
92
|
+
* // Assume this comes from a database and are used as template variables...
|
|
93
|
+
* // Use @clipboard-health/date-time's formatShortDateTime in your service for consistency.
|
|
94
|
+
* const data = { favoriteColor: "blue", favoriteAt: new Date().toISOString(), secret: "2" };
|
|
94
95
|
*
|
|
96
|
+
* // Important: Read the TypeDoc documentation for additional context.
|
|
95
97
|
* return await this.client.trigger({
|
|
96
98
|
* attempt,
|
|
97
99
|
* body: {
|
|
98
|
-
* recipients,
|
|
99
100
|
* data,
|
|
101
|
+
* recipients,
|
|
100
102
|
* workplaceId,
|
|
101
103
|
* },
|
|
102
104
|
* expiresAt: new Date(expiresAt),
|
|
103
105
|
* idempotencyKey,
|
|
104
|
-
* key: workflowKey,
|
|
105
106
|
* keysToRedact: ["secret"],
|
|
106
107
|
* workflowKey,
|
|
107
108
|
* });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationClient.js","sourceRoot":"","sources":["../../../../../packages/notifications/src/lib/notificationClient.ts"],"names":[],"mappings":";;;AAAA,uDAQmC;AACnC,0CAAgD;AAEhD,8EAA2E;AAC3E,oFAAiF;AACjF,gEAA6D;AAC7D,sFAAmF;AACnF,8CAA2C;AAC3C,sEAAmE;AACnE,4DAAyD;AACzD,oGAAiG;AAiBjG,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE;QACP,SAAS,EAAE,uBAAuB;QAClC,WAAW,EAAE,yBAAyB;KACvC;IACD,eAAe,EAAE;QACf,SAAS,EAAE,+BAA+B;QAC1C,WAAW,EAAE,4BAA4B;KAC1C;IACD,eAAe,EAAE;QACf,SAAS,EAAE,+BAA+B;QAC1C,WAAW,EAAE,mBAAmB;KACjC;IACD,aAAa,EAAE;QACb,SAAS,EAAE,6BAA6B;QACxC,WAAW,EAAE,qBAAqB;KACnC;CACF,CAAC;AAEW,QAAA,wBAAwB,GAAG,IAAI,CAAC;AAEhC,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,qBAAqB,EAAE,uBAAuB;IAC9C,0BAA0B,EAAE,4BAA4B;IACxD,0BAA0B,EAAE,4BAA4B;IACxD,iBAAiB,EAAE,mBAAmB;IACtC,OAAO,EAAE,SAAS;CACV,CAAC;AASX;;GAEG;AACH,MAAa,kBAAkB;IACV,MAAM,CAAqC;IAC3C,QAAQ,CAAiD;IACzD,MAAM,CAAqC;IAC7C,UAAU,CAAyC;IAEpE;;OAEG;IACH,YAAY,MAAgC;QAC1C,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAE9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ;YACX,UAAU,IAAI,MAAM;gBAClB,CAAC,CAAC,4DAA4D;oBAC5D,MAAM,CAAC,QAAQ;gBACjB,CAAC,CAAC,4DAA4D;oBAC5D,IAAI,iCAAe,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"notificationClient.js","sourceRoot":"","sources":["../../../../../packages/notifications/src/lib/notificationClient.ts"],"names":[],"mappings":";;;AAAA,uDAQmC;AACnC,0CAAgD;AAEhD,8EAA2E;AAC3E,oFAAiF;AACjF,gEAA6D;AAC7D,sFAAmF;AACnF,8CAA2C;AAC3C,sEAAmE;AACnE,4DAAyD;AACzD,oGAAiG;AAiBjG,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE;QACP,SAAS,EAAE,uBAAuB;QAClC,WAAW,EAAE,yBAAyB;KACvC;IACD,eAAe,EAAE;QACf,SAAS,EAAE,+BAA+B;QAC1C,WAAW,EAAE,4BAA4B;KAC1C;IACD,eAAe,EAAE;QACf,SAAS,EAAE,+BAA+B;QAC1C,WAAW,EAAE,mBAAmB;KACjC;IACD,aAAa,EAAE;QACb,SAAS,EAAE,6BAA6B;QACxC,WAAW,EAAE,qBAAqB;KACnC;CACF,CAAC;AAEW,QAAA,wBAAwB,GAAG,I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G,SAAS;YACZ,YAAY,EAAE;gBACZ,GAAG,IAAI;gBACP,kDAAkD;gBAClD,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM;gBAClC,IAAI,EAAE,IAAA,eAAM,EAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,SAAS,EAAE,YAAY,EAAE,CAAC;aAC7D;SACF,CAAC,CAAC;IACL,CAAC;IAEO,kBAAkB,CAAC,MAK1B;QACC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAEjD,IAAI,EAAE,OAAO,CAAC;YACZ,aAAa,EAAE,EAAE;YACjB,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,SAAS,WAAW,EAAE,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEpF,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAtYD,gDAsYC"}
|
|
@@ -125,38 +125,39 @@ export declare class NotificationJobEnqueuer {
|
|
|
125
125
|
*
|
|
126
126
|
* ```ts
|
|
127
127
|
* import {
|
|
128
|
-
*
|
|
129
|
-
*
|
|
128
|
+
* EXAMPLE_NOTIFICATION_JOB_NAME,
|
|
129
|
+
* type ExampleNotificationData,
|
|
130
130
|
* } from "./exampleNotification.job";
|
|
131
131
|
* import { notificationJobEnqueuer } from "./notificationJobEnqueuer";
|
|
132
|
+
* import { WORKFLOW_KEYS } from "./workflowKeys";
|
|
132
133
|
*
|
|
133
134
|
* async function enqueueNotificationJob() {
|
|
134
|
-
* await notificationJobEnqueuer.enqueueOneOrMore<
|
|
135
|
-
*
|
|
135
|
+
* await notificationJobEnqueuer.enqueueOneOrMore<ExampleNotificationData["Enqueue"]>(
|
|
136
|
+
* EXAMPLE_NOTIFICATION_JOB_NAME,
|
|
137
|
+
* // Important: Read the TypeDoc documentation for additional context.
|
|
136
138
|
* {
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
+
* /**
|
|
140
|
+
* * Set expiresAt at enqueue-time so it remains stable across job retries. Use date-fns in your
|
|
141
|
+
* * service instead of this manual calculation.
|
|
142
|
+
* *\/
|
|
143
|
+
* expiresAt: new Date(Date.now() + 60 * 60_000).toISOString(),
|
|
139
144
|
* // Set idempotencyKey at enqueue-time so it remains stable across job retries.
|
|
140
145
|
* idempotencyKey: {
|
|
141
146
|
* resourceId: "event-123",
|
|
142
147
|
* },
|
|
143
148
|
* // Set recipients at enqueue-time so they respect our notification provider's limits.
|
|
144
|
-
* recipients: ["
|
|
149
|
+
* recipients: ["userId-1"],
|
|
145
150
|
*
|
|
146
|
-
* workflowKey:
|
|
151
|
+
* workflowKey: WORKFLOW_KEYS.eventStartingReminder,
|
|
147
152
|
*
|
|
148
153
|
* // Any additional enqueue-time data passed to the job:
|
|
149
|
-
* workplaceId: "
|
|
154
|
+
* workplaceId: "workplaceId-123",
|
|
150
155
|
* },
|
|
151
156
|
* );
|
|
152
157
|
* }
|
|
153
158
|
*
|
|
154
159
|
* // eslint-disable-next-line unicorn/prefer-top-level-await
|
|
155
160
|
* void enqueueNotificationJob();
|
|
156
|
-
*
|
|
157
|
-
* function minutesFromNow(minutes: number) {
|
|
158
|
-
* return new Date(Date.now() + minutes * 60_000);
|
|
159
|
-
* }
|
|
160
161
|
* ```
|
|
161
162
|
*
|
|
162
163
|
* </embedex>
|
|
@@ -43,38 +43,39 @@ class NotificationJobEnqueuer {
|
|
|
43
43
|
*
|
|
44
44
|
* ```ts
|
|
45
45
|
* import {
|
|
46
|
-
*
|
|
47
|
-
*
|
|
46
|
+
* EXAMPLE_NOTIFICATION_JOB_NAME,
|
|
47
|
+
* type ExampleNotificationData,
|
|
48
48
|
* } from "./exampleNotification.job";
|
|
49
49
|
* import { notificationJobEnqueuer } from "./notificationJobEnqueuer";
|
|
50
|
+
* import { WORKFLOW_KEYS } from "./workflowKeys";
|
|
50
51
|
*
|
|
51
52
|
* async function enqueueNotificationJob() {
|
|
52
|
-
* await notificationJobEnqueuer.enqueueOneOrMore<
|
|
53
|
-
*
|
|
53
|
+
* await notificationJobEnqueuer.enqueueOneOrMore<ExampleNotificationData["Enqueue"]>(
|
|
54
|
+
* EXAMPLE_NOTIFICATION_JOB_NAME,
|
|
55
|
+
* // Important: Read the TypeDoc documentation for additional context.
|
|
54
56
|
* {
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
+
* /**
|
|
58
|
+
* * Set expiresAt at enqueue-time so it remains stable across job retries. Use date-fns in your
|
|
59
|
+
* * service instead of this manual calculation.
|
|
60
|
+
* *\/
|
|
61
|
+
* expiresAt: new Date(Date.now() + 60 * 60_000).toISOString(),
|
|
57
62
|
* // Set idempotencyKey at enqueue-time so it remains stable across job retries.
|
|
58
63
|
* idempotencyKey: {
|
|
59
64
|
* resourceId: "event-123",
|
|
60
65
|
* },
|
|
61
66
|
* // Set recipients at enqueue-time so they respect our notification provider's limits.
|
|
62
|
-
* recipients: ["
|
|
67
|
+
* recipients: ["userId-1"],
|
|
63
68
|
*
|
|
64
|
-
* workflowKey:
|
|
69
|
+
* workflowKey: WORKFLOW_KEYS.eventStartingReminder,
|
|
65
70
|
*
|
|
66
71
|
* // Any additional enqueue-time data passed to the job:
|
|
67
|
-
* workplaceId: "
|
|
72
|
+
* workplaceId: "workplaceId-123",
|
|
68
73
|
* },
|
|
69
74
|
* );
|
|
70
75
|
* }
|
|
71
76
|
*
|
|
72
77
|
* // eslint-disable-next-line unicorn/prefer-top-level-await
|
|
73
78
|
* void enqueueNotificationJob();
|
|
74
|
-
*
|
|
75
|
-
* function minutesFromNow(minutes: number) {
|
|
76
|
-
* return new Date(Date.now() + minutes * 60_000);
|
|
77
|
-
* }
|
|
78
79
|
* ```
|
|
79
80
|
*
|
|
80
81
|
* </embedex>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationJobEnqueuer.js","sourceRoot":"","sources":["../../../../../packages/notifications/src/lib/notificationJobEnqueuer.ts"],"names":[],"mappings":";;;AAAA,uFAMmD;AAEnD,gEAA6D;AAC7D,oGAAiG;AACjG,mEAIiC;AAiHjC,MAAa,uBAAuB;IACjB,OAAO,CAA2C;IAEnE,YAAY,MAAqC;QAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAE3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"notificationJobEnqueuer.js","sourceRoot":"","sources":["../../../../../packages/notifications/src/lib/notificationJobEnqueuer.ts"],"names":[],"mappings":";;;AAAA,uFAMmD;AAEnD,gEAA6D;AAC7D,oGAAiG;AACjG,mEAIiC;AAiHjC,MAAa,uBAAuB;IACjB,OAAO,CAA2C;IAEnE,YAAY,MAAqC;QAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAE3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoEG;IACH,KAAK,CAAC,gBAAgB,CACpB,sBAA4C,EAC5C,IAAkB,EAClB,OAAiC;QAEjC,MAAM,OAAO,CAAC,GAAG,CACf,IAAA,iCAAe,EAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE;YACpF,MAAM,oBAAoB,GAAgC;gBACxD,GAAG,IAAI,CAAC,cAAc;gBACtB,KAAK,EAAE,MAAM;gBACb,UAAU;gBACV,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,CAAC;YAEF,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CACxB,sBAAsB,EACtB;gBACE,GAAG,IAAI;gBACP,UAAU;gBACV,cAAc,EAAE,IAAA,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