@clipboard-health/notifications 2.5.1 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@clipboard-health/notifications",
3
3
  "description": "Send notifications through third-party providers.",
4
- "version": "2.5.1",
4
+ "version": "2.5.3",
5
5
  "bugs": "https://github.com/ClipboardHealth/core-utils/issues",
6
6
  "dependencies": {
7
- "@clipboard-health/background-jobs-adapter": "1.5.1",
8
- "@clipboard-health/phone-number": "1.5.1",
9
- "@clipboard-health/util-ts": "4.5.1",
7
+ "@clipboard-health/background-jobs-adapter": "1.5.3",
8
+ "@clipboard-health/phone-number": "1.5.3",
9
+ "@clipboard-health/util-ts": "4.5.3",
10
10
  "@knocklabs/node": "1.24.0",
11
11
  "tslib": "2.8.1"
12
12
  },
13
13
  "devDependencies": {
14
- "@clipboard-health/testing-core": "1.5.1",
14
+ "@clipboard-health/testing-core": "1.5.3",
15
15
  "type-fest": "5.3.1"
16
16
  },
17
17
  "keywords": [],
@@ -1,7 +1,7 @@
1
1
  import { type BackgroundJobsAdapter, type EnqueueOptions, type MongoEnqueueOptions, type PostgresEnqueueOptions } from "@clipboard-health/background-jobs-adapter";
2
2
  import { type TriggerIdempotencyKey } from "./triggerIdempotencyKey";
3
3
  type EnqueueParameters = Parameters<BackgroundJobsAdapter["enqueue"]>;
4
- export type IdempotencyKeyParts = {
4
+ export interface IdempotencyKeyParts {
5
5
  /**
6
6
  * Prefer `resourceId` over `eventOccurredAt`; it's harder to misuse.
7
7
  *
@@ -10,10 +10,7 @@ export type IdempotencyKeyParts = {
10
10
  *
11
11
  * Use `.toISOString()`.
12
12
  */
13
- eventOccurredAt: string;
14
- resource?: undefined;
15
- } | {
16
- eventOccurredAt?: undefined;
13
+ eventOccurredAt?: string;
17
14
  /**
18
15
  * Do not include `workflowKey`, `recipients`, or `workplaceId`; they are included
19
16
  * automatically.
@@ -24,11 +21,11 @@ export type IdempotencyKeyParts = {
24
21
  * 1. For a "meeting starts in one hour" notification, set resourceId to the meeting ID.
25
22
  * 2. For a payout notification, set resourceId to the payment ID.
26
23
  */
27
- resource: {
24
+ resource?: {
28
25
  type: string;
29
26
  id: string;
30
27
  };
31
- };
28
+ }
32
29
  export interface NotificationEnqueueData {
33
30
  /**
34
31
  * Do not include `workflowKey`, `recipients`, or `workplaceId`; they are included
@@ -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;AAoHjC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuEG;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,mBAAmB;gBAC3B,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,yDAAiC,EAAC,oBAAoB,CAAC;aACxE,EACD;gBACE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClC,CAAC,6CAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC,EAC/D,IAAA,qEAAiC,EAAC,oBAAoB,CAAC;aAC1D,CACF,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AA/GD,0DA+GC"}
1
+ {"version":3,"file":"notificationJobEnqueuer.js","sourceRoot":"","sources":["../../../../../packages/notifications/src/lib/notificationJobEnqueuer.ts"],"names":[],"mappings":";;;AAAA,uFAMmD;AAEnD,gEAA6D;AAC7D,oGAAiG;AACjG,mEAIiC;AA8GjC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuEG;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,mBAAmB;gBAC3B,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,yDAAiC,EAAC,oBAAoB,CAAC;aACxE,EACD;gBACE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClC,CAAC,6CAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC,EAC/D,IAAA,qEAAiC,EAAC,oBAAoB,CAAC;aAC1D,CACF,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AA/GD,0DA+GC"}