@visulima/notification 1.0.8 → 1.0.10

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 (108) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/channels/email/index.d.ts +23 -23
  3. package/dist/channels/email/index.js +1 -1
  4. package/dist/channels/inapp/index.d.ts +31 -31
  5. package/dist/digest/index.d.ts +55 -55
  6. package/dist/digest/index.js +1 -1
  7. package/dist/events/index.d.ts +16 -16
  8. package/dist/i18n/index.d.ts +21 -21
  9. package/dist/i18n/index.js +1 -1
  10. package/dist/index.d.ts +97 -108
  11. package/dist/index.js +1 -1
  12. package/dist/layouts/index.d.ts +28 -28
  13. package/dist/middleware/index.d.ts +49 -49
  14. package/dist/middleware/index.js +1 -1
  15. package/dist/packem_shared/{Notification-B22tuJPy.js → Notification-DH2mcFWI.js} +1 -1
  16. package/dist/packem_shared/NotificationError-B8CyoEaX.js +1 -0
  17. package/dist/packem_shared/{RequiredOptionError-CuL42XRq.js → RequiredOptionError-Bs282gKK.js} +1 -1
  18. package/dist/packem_shared/apnsProvider-BPH0pHvd.js +1 -0
  19. package/dist/packem_shared/{circuitBreakerMiddleware-BlZN7SVT.js → circuitBreakerMiddleware-CRBi0H7e.js} +1 -1
  20. package/dist/packem_shared/{createDigester-vMNPejGF.js → createDigester-DenmT8_X.js} +1 -1
  21. package/dist/packem_shared/{createNotificationWorkflow-B70OgeED.js → createNotificationWorkflow-5AY-ays0.js} +1 -1
  22. package/dist/packem_shared/{createTranslator-CY91C2eS.js → createTranslator-ByyvYNfG.js} +1 -1
  23. package/dist/packem_shared/{discordProvider-BhfXcCcI.js → discordProvider-BvKwrC8K.js} +1 -1
  24. package/dist/packem_shared/{emailChannel-CNDlX96Q.js → emailChannel-Cf8wZPZL.js} +1 -1
  25. package/dist/packem_shared/{expoProvider-DsZR4sUk.js → expoProvider-13gY7Ne8.js} +1 -1
  26. package/dist/packem_shared/{failoverProvider-D1dAmW8U.js → failoverProvider-DXcwmYev.js} +1 -1
  27. package/dist/packem_shared/{fcmProvider-DWRx8XBv.js → fcmProvider-DsGjzBzz.js} +1 -1
  28. package/dist/packem_shared/{messageBirdProvider-BfiTaNLn.js → messageBirdProvider-D1c3jUqj.js} +1 -1
  29. package/dist/packem_shared/{mockProvider-BLwTZlkw.js → mockProvider-DZ3immtm.js} +1 -1
  30. package/dist/packem_shared/{msTeamsProvider-DrmL3RYX.js → msTeamsProvider-Cd-BUhH1.js} +1 -1
  31. package/dist/packem_shared/notification.d-D0ado_cy.d.ts +104 -0
  32. package/dist/packem_shared/{plivoProvider-Dr8d5yD3.js → plivoProvider-C_koQ8X-.js} +1 -1
  33. package/dist/packem_shared/{provider.d-BQAGriz6.d.ts → provider.d-Dh32nRm9.d.ts} +10 -10
  34. package/dist/packem_shared/{roundRobinProvider-BetXJUUm.js → roundRobinProvider-CK3Vyc_u.js} +1 -1
  35. package/dist/packem_shared/{slackProvider-DPG1IlA0.js → slackProvider-B92QDf3e.js} +1 -1
  36. package/dist/packem_shared/{sms-CU-OZvNU.js → sms-64HGUCLu.js} +1 -1
  37. package/dist/packem_shared/{snsProvider-C2T2UxDK.js → snsProvider-CPGjOUP_.js} +1 -1
  38. package/dist/packem_shared/{telegramProvider-wyx3ksVm.js → telegramProvider-BmmroM5A.js} +1 -1
  39. package/dist/packem_shared/{telnyxProvider-jgpEwgPh.js → telnyxProvider-C41tE4VF.js} +1 -1
  40. package/dist/packem_shared/{tracer.d-Co1s_NwG.d.ts → tracer.d-BPznIQx9.d.ts} +2 -2
  41. package/dist/packem_shared/{twilioProvider-DMYWqvgZ.js → twilioProvider-DanDTzi3.js} +1 -1
  42. package/dist/packem_shared/{types.d-67TogK4k.d.ts → types.d--kw9ifOI.d.ts} +6 -6
  43. package/dist/packem_shared/types.d-BU-37j3S.d.ts +10 -0
  44. package/dist/packem_shared/{types.d-GUzX1jTk.d.ts → types.d-C7l7qdMG.d.ts} +52 -52
  45. package/dist/packem_shared/{types.d-CximoA8M.d.ts → types.d-CRs03TYV.d.ts} +13 -13
  46. package/dist/packem_shared/{types.d-C1GoEAlI.d-Bv3grfyD.d.ts → types.d-CcjfiGpo.d-DuZME7ry.d.ts} +27 -34
  47. package/dist/packem_shared/{vonageProvider-CT4KoWXu.js → vonageProvider-epeGBWW8.js} +1 -1
  48. package/dist/packem_shared/{webPushProvider-DwjmWASr.js → webPushProvider-K6-Drhaf.js} +1 -1
  49. package/dist/packem_shared/{webhookProvider-CPA1nKXJ.js → webhookProvider-DlwFyaGc.js} +1 -1
  50. package/dist/preferences/index.d.ts +19 -19
  51. package/dist/providers/chat/discord/index.d.ts +5 -5
  52. package/dist/providers/chat/discord/index.js +1 -1
  53. package/dist/providers/chat/msteams/index.d.ts +7 -7
  54. package/dist/providers/chat/msteams/index.js +1 -1
  55. package/dist/providers/chat/slack/index.d.ts +6 -6
  56. package/dist/providers/chat/slack/index.js +1 -1
  57. package/dist/providers/chat/telegram/index.d.ts +5 -5
  58. package/dist/providers/chat/telegram/index.js +1 -1
  59. package/dist/providers/failover/index.d.ts +7 -7
  60. package/dist/providers/failover/index.js +1 -1
  61. package/dist/providers/mock/index.d.ts +5 -5
  62. package/dist/providers/mock/index.js +1 -1
  63. package/dist/providers/opentelemetry/index.d.ts +14 -14
  64. package/dist/providers/push/apns/index.d.ts +9 -9
  65. package/dist/providers/push/apns/index.js +1 -1
  66. package/dist/providers/push/expo/index.d.ts +5 -5
  67. package/dist/providers/push/expo/index.js +1 -1
  68. package/dist/providers/push/fcm/index.d.ts +13 -13
  69. package/dist/providers/push/fcm/index.js +1 -1
  70. package/dist/providers/push/web-push/index.d.ts +11 -11
  71. package/dist/providers/push/web-push/index.js +1 -1
  72. package/dist/providers/roundrobin/index.d.ts +8 -8
  73. package/dist/providers/roundrobin/index.js +1 -1
  74. package/dist/providers/sms/messagebird/index.d.ts +5 -5
  75. package/dist/providers/sms/messagebird/index.js +1 -1
  76. package/dist/providers/sms/plivo/index.d.ts +5 -5
  77. package/dist/providers/sms/plivo/index.js +1 -1
  78. package/dist/providers/sms/sns/index.d.ts +6 -6
  79. package/dist/providers/sms/sns/index.js +1 -1
  80. package/dist/providers/sms/telnyx/index.d.ts +5 -5
  81. package/dist/providers/sms/telnyx/index.js +1 -1
  82. package/dist/providers/sms/twilio/index.d.ts +5 -5
  83. package/dist/providers/sms/twilio/index.js +1 -1
  84. package/dist/providers/sms/vonage/index.d.ts +5 -5
  85. package/dist/providers/sms/vonage/index.js +1 -1
  86. package/dist/providers/webhook/index.d.ts +7 -7
  87. package/dist/providers/webhook/index.js +1 -1
  88. package/dist/queue/bullmq-queue.d.ts +24 -24
  89. package/dist/queue/index.d.ts +15 -15
  90. package/dist/queue/pg-boss-queue.d.ts +26 -26
  91. package/dist/queue/sqs-queue.d.ts +27 -27
  92. package/dist/queue/unstorage-queue.d.ts +14 -14
  93. package/dist/routing/index.d.ts +22 -22
  94. package/dist/template-engines/handlebars.d.ts +13 -13
  95. package/dist/template-engines/handlebars.js +1 -1
  96. package/dist/template-engines/liquid.d.ts +13 -13
  97. package/dist/template-engines/liquid.js +1 -1
  98. package/dist/template-engines/string.d.ts +17 -17
  99. package/dist/utils/result.d.ts +32 -32
  100. package/dist/utils/result.js +1 -1
  101. package/dist/webhooks/index.d.ts +84 -84
  102. package/dist/workflow/index.d.ts +42 -42
  103. package/dist/workflow/index.js +1 -1
  104. package/package.json +2 -2
  105. package/dist/packem_shared/NotificationError-DVfMJQ1u.js +0 -1
  106. package/dist/packem_shared/apnsProvider-C9WSv5sc.js +0 -1
  107. package/dist/packem_shared/notification.d-DFCVTods.d.ts +0 -104
  108. package/dist/packem_shared/types.d-td-F2Oh0.d.ts +0 -10
@@ -1 +1 @@
1
- import{default as e}from"../../../packem_shared/plivoProvider-Dr8d5yD3.js";export{e as plivoProvider};
1
+ import{default as e}from"../../../packem_shared/plivoProvider-C_koQ8X-.js";export{e as plivoProvider};
@@ -1,5 +1,5 @@
1
- import { d as BaseConfig, S as SmsPayload } from "../../../packem_shared/types.d-GUzX1jTk.js";
2
- import { a as ProviderFactory } from "../../../packem_shared/provider.d-BQAGriz6.js";
1
+ import { d as BaseConfig, S as SmsPayload } from "../../../packem_shared/types.d-C7l7qdMG.js";
2
+ import { a as ProviderFactory } from "../../../packem_shared/provider.d-Dh32nRm9.js";
3
3
  interface SnsConfig extends BaseConfig {
4
4
  /** AWS access key id. */
5
5
  accessKeyId: string;
@@ -13,9 +13,9 @@ interface SnsConfig extends BaseConfig {
13
13
  sessionToken?: string;
14
14
  }
15
15
  /**
16
- * AWS SNS SMS provider. Edge-safe — signs the `Publish` action with Signature V4
17
- * computed entirely via Web Crypto (HMAC-SHA256 + SHA-256), no `node:crypto`.
18
- * @see https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
19
- */
16
+ * AWS SNS SMS provider. Edge-safe — signs the `Publish` action with Signature V4
17
+ * computed entirely via Web Crypto (HMAC-SHA256 + SHA-256), no `node:crypto`.
18
+ * @see https://docs.aws.amazon.com/sns/latest/api/API_Publish.html
19
+ */
20
20
  declare const snsProvider: ProviderFactory<SnsConfig, SmsPayload>;
21
21
  export { type SnsConfig, snsProvider };
@@ -1 +1 @@
1
- import{default as o}from"../../../packem_shared/snsProvider-C2T2UxDK.js";export{o as snsProvider};
1
+ import{default as o}from"../../../packem_shared/snsProvider-CPGjOUP_.js";export{o as snsProvider};
@@ -1,5 +1,5 @@
1
- import { d as BaseConfig, S as SmsPayload } from "../../../packem_shared/types.d-GUzX1jTk.js";
2
- import { a as ProviderFactory } from "../../../packem_shared/provider.d-BQAGriz6.js";
1
+ import { d as BaseConfig, S as SmsPayload } from "../../../packem_shared/types.d-C7l7qdMG.js";
2
+ import { a as ProviderFactory } from "../../../packem_shared/provider.d-Dh32nRm9.js";
3
3
  interface TelnyxConfig extends BaseConfig {
4
4
  /** Telnyx API key (v2). */
5
5
  apiKey: string;
@@ -11,8 +11,8 @@ interface TelnyxConfig extends BaseConfig {
11
11
  messagingProfileId?: string;
12
12
  }
13
13
  /**
14
- * Telnyx SMS/MMS provider (v2 API). Edge-safe — `fetch` + Bearer auth.
15
- * @see https://developers.telnyx.com/api/messaging/send-message
16
- */
14
+ * Telnyx SMS/MMS provider (v2 API). Edge-safe — `fetch` + Bearer auth.
15
+ * @see https://developers.telnyx.com/api/messaging/send-message
16
+ */
17
17
  declare const telnyxProvider: ProviderFactory<TelnyxConfig, SmsPayload>;
18
18
  export { type TelnyxConfig, telnyxProvider };
@@ -1 +1 @@
1
- import{default as o}from"../../../packem_shared/telnyxProvider-jgpEwgPh.js";export{o as telnyxProvider};
1
+ import{default as o}from"../../../packem_shared/telnyxProvider-C41tE4VF.js";export{o as telnyxProvider};
@@ -1,5 +1,5 @@
1
- import { d as BaseConfig, S as SmsPayload } from "../../../packem_shared/types.d-GUzX1jTk.js";
2
- import { a as ProviderFactory } from "../../../packem_shared/provider.d-BQAGriz6.js";
1
+ import { d as BaseConfig, S as SmsPayload } from "../../../packem_shared/types.d-C7l7qdMG.js";
2
+ import { a as ProviderFactory } from "../../../packem_shared/provider.d-Dh32nRm9.js";
3
3
  interface TwilioConfig extends BaseConfig {
4
4
  /** Twilio Account SID. */
5
5
  accountSid: string;
@@ -13,8 +13,8 @@ interface TwilioConfig extends BaseConfig {
13
13
  messagingServiceSid?: string;
14
14
  }
15
15
  /**
16
- * Twilio SMS/MMS provider. Edge-safe — uses `fetch` + Basic auth, no Node built-ins.
17
- * @see https://www.twilio.com/docs/sms/api/message-resource
18
- */
16
+ * Twilio SMS/MMS provider. Edge-safe — uses `fetch` + Basic auth, no Node built-ins.
17
+ * @see https://www.twilio.com/docs/sms/api/message-resource
18
+ */
19
19
  declare const twilioProvider: ProviderFactory<TwilioConfig, SmsPayload>;
20
20
  export { type TwilioConfig, twilioProvider };
@@ -1 +1 @@
1
- import{default as e}from"../../../packem_shared/twilioProvider-DMYWqvgZ.js";export{e as twilioProvider};
1
+ import{default as e}from"../../../packem_shared/twilioProvider-DanDTzi3.js";export{e as twilioProvider};
@@ -1,5 +1,5 @@
1
- import { d as BaseConfig, S as SmsPayload } from "../../../packem_shared/types.d-GUzX1jTk.js";
2
- import { a as ProviderFactory } from "../../../packem_shared/provider.d-BQAGriz6.js";
1
+ import { d as BaseConfig, S as SmsPayload } from "../../../packem_shared/types.d-C7l7qdMG.js";
2
+ import { a as ProviderFactory } from "../../../packem_shared/provider.d-Dh32nRm9.js";
3
3
  interface VonageConfig extends BaseConfig {
4
4
  /** Vonage (Nexmo) API key. */
5
5
  apiKey: string;
@@ -11,8 +11,8 @@ interface VonageConfig extends BaseConfig {
11
11
  from?: string;
12
12
  }
13
13
  /**
14
- * Vonage (Nexmo) SMS provider. Edge-safe — `fetch` + form auth.
15
- * @see https://developer.vonage.com/en/api/sms
16
- */
14
+ * Vonage (Nexmo) SMS provider. Edge-safe — `fetch` + form auth.
15
+ * @see https://developer.vonage.com/en/api/sms
16
+ */
17
17
  declare const vonageProvider: ProviderFactory<VonageConfig, SmsPayload>;
18
18
  export { type VonageConfig, vonageProvider };
@@ -1 +1 @@
1
- import{default as r}from"../../../packem_shared/vonageProvider-CT4KoWXu.js";export{r as vonageProvider};
1
+ import{default as r}from"../../../packem_shared/vonageProvider-epeGBWW8.js";export{r as vonageProvider};
@@ -1,5 +1,5 @@
1
- import { d as BaseConfig, W as WebhookPayload } from "../../packem_shared/types.d-GUzX1jTk.js";
2
- import { P as Provider } from "../../packem_shared/provider.d-BQAGriz6.js";
1
+ import { d as BaseConfig, W as WebhookPayload } from "../../packem_shared/types.d-C7l7qdMG.js";
2
+ import { P as Provider } from "../../packem_shared/provider.d-Dh32nRm9.js";
3
3
  interface WebhookConfig extends BaseConfig {
4
4
  /** Default headers merged into every request. */
5
5
  headers?: Record<string, string>;
@@ -9,10 +9,10 @@ interface WebhookConfig extends BaseConfig {
9
9
  url?: string;
10
10
  }
11
11
  /**
12
- * Generic outbound webhook provider. Edge-safe — `fetch` only. Useful for custom
13
- * integrations and as a fan-out sink.
14
- * @param config Optional config.
15
- * @returns A webhook-channel provider.
16
- */
12
+ * Generic outbound webhook provider. Edge-safe — `fetch` only. Useful for custom
13
+ * integrations and as a fan-out sink.
14
+ * @param config Optional config.
15
+ * @returns A webhook-channel provider.
16
+ */
17
17
  declare const webhookProvider: (config?: WebhookConfig) => Provider<WebhookConfig, WebhookPayload>;
18
18
  export { type WebhookConfig, webhookProvider };
@@ -1 +1 @@
1
- import{webhookProvider as e}from"../../packem_shared/webhookProvider-CPA1nKXJ.js";export{e as webhookProvider};
1
+ import{webhookProvider as e}from"../../packem_shared/webhookProvider-DlwFyaGc.js";export{e as webhookProvider};
@@ -1,11 +1,11 @@
1
- import { a as NotificationMessage } from "../packem_shared/notification.d-DFCVTods.js";
2
- import { Q as QueueJob, N as NotificationQueue } from "../packem_shared/types.d-67TogK4k.js";
3
- import "../packem_shared/types.d-CximoA8M.js";
4
- import "../packem_shared/types.d-GUzX1jTk.js";
5
- import "../packem_shared/provider.d-BQAGriz6.js";
1
+ import { a as NotificationMessage } from "../packem_shared/notification.d-D0ado_cy.js";
2
+ import { Q as QueueJob, N as NotificationQueue } from "../packem_shared/types.d--kw9ifOI.js";
3
+ import "../packem_shared/types.d-CRs03TYV.js";
4
+ import "../packem_shared/types.d-C7l7qdMG.js";
5
+ import "../packem_shared/provider.d-Dh32nRm9.js";
6
6
  /**
7
- * A BullMQ job, narrowed to the members this adapter reads.
8
- */
7
+ * A BullMQ job, narrowed to the members this adapter reads.
8
+ */
9
9
  interface BullmqJobLike {
10
10
  attemptsMade: number;
11
11
  data: unknown;
@@ -14,9 +14,9 @@ interface BullmqJobLike {
14
14
  remove: () => Promise<unknown>;
15
15
  }
16
16
  /**
17
- * The subset of a [BullMQ](https://docs.bullmq.io/) `Queue` this adapter uses. Typed structurally so
18
- * the `bullmq` optional peer is never imported — pass a real `Queue` instance, which satisfies this.
19
- */
17
+ * The subset of a [BullMQ](https://docs.bullmq.io/) `Queue` this adapter uses. Typed structurally so
18
+ * the `bullmq` optional peer is never imported — pass a real `Queue` instance, which satisfies this.
19
+ */
20
20
  interface BullmqQueueLike {
21
21
  add: (name: string, data: unknown, options?: {
22
22
  delay?: number;
@@ -28,15 +28,15 @@ interface BullmqQueueLike {
28
28
  getNextJob: (token: string) => Promise<BullmqJobLike | undefined>;
29
29
  }
30
30
  /**
31
- * A {@link NotificationQueue} backed by [BullMQ](https://docs.bullmq.io/) (Redis).
32
- *
33
- * BullMQ is push-based: jobs are normally consumed by a BullMQ `Worker`. This adapter maps the
34
- * pull-based reserve/ack model onto BullMQ's `getNextJob`-style primitives so it composes with the
35
- * notification `QueueWorker`. Pass an already-configured `Queue` instance — `bullmq` is an optional
36
- * peer dependency and is never instantiated here.
37
- *
38
- * Runtime: NODE ONLY (requires a Redis connection). Not Cloudflare Workers compatible.
39
- */
31
+ * A {@link NotificationQueue} backed by [BullMQ](https://docs.bullmq.io/) (Redis).
32
+ *
33
+ * BullMQ is push-based: jobs are normally consumed by a BullMQ `Worker`. This adapter maps the
34
+ * pull-based reserve/ack model onto BullMQ's `getNextJob`-style primitives so it composes with the
35
+ * notification `QueueWorker`. Pass an already-configured `Queue` instance — `bullmq` is an optional
36
+ * peer dependency and is never instantiated here.
37
+ *
38
+ * Runtime: NODE ONLY (requires a Redis connection). Not Cloudflare Workers compatible.
39
+ */
40
40
  declare class BullMqQueue implements NotificationQueue {
41
41
  #private;
42
42
  constructor(queue: BullmqQueueLike, jobName?: string);
@@ -49,10 +49,10 @@ declare class BullMqQueue implements NotificationQueue {
49
49
  size(): Promise<number>;
50
50
  }
51
51
  /**
52
- * Convenience factory for {@link BullMqQueue}.
53
- * @param queue A configured BullMQ `Queue` instance (optional peer).
54
- * @param jobName The name jobs are enqueued under.
55
- * @returns A new {@link BullMqQueue}.
56
- */
52
+ * Convenience factory for {@link BullMqQueue}.
53
+ * @param queue A configured BullMQ `Queue` instance (optional peer).
54
+ * @param jobName The name jobs are enqueued under.
55
+ * @returns A new {@link BullMqQueue}.
56
+ */
57
57
  declare const createBullMqQueue: (queue: BullmqQueueLike, jobName?: string) => BullMqQueue;
58
58
  export { BullMqQueue, type BullmqJobLike, type BullmqQueueLike, createBullMqQueue };
@@ -1,15 +1,15 @@
1
1
  export { BullMqQueue, createBullMqQueue } from "./bullmq-queue.js";
2
- import { a as NotificationMessage, N as Notification } from "../packem_shared/notification.d-DFCVTods.js";
3
- import { Q as QueueJob, N as NotificationQueue } from "../packem_shared/types.d-67TogK4k.js";
2
+ import { a as NotificationMessage, N as Notification } from "../packem_shared/notification.d-D0ado_cy.js";
3
+ import { Q as QueueJob, N as NotificationQueue } from "../packem_shared/types.d--kw9ifOI.js";
4
4
  export { PgBossQueue, type PgBossQueueOptions, createPgBossQueue } from "./pg-boss-queue.js";
5
5
  export { SqsQueue, type SqsQueueOptions, createSqsQueue } from "./sqs-queue.js";
6
- import { c as Receipt } from "../packem_shared/types.d-GUzX1jTk.js";
7
- import "../packem_shared/types.d-CximoA8M.js";
8
- import "../packem_shared/provider.d-BQAGriz6.js";
6
+ import { c as Receipt } from "../packem_shared/types.d-C7l7qdMG.js";
7
+ import "../packem_shared/types.d-CRs03TYV.js";
8
+ import "../packem_shared/provider.d-Dh32nRm9.js";
9
9
  /**
10
- * In-process {@link NotificationQueue}. Suitable for single-instance apps, tests and the
11
- * default worker; swap for the unstorage/BullMQ adapters for durability.
12
- */
10
+ * In-process {@link NotificationQueue}. Suitable for single-instance apps, tests and the
11
+ * default worker; swap for the unstorage/BullMQ adapters for durability.
12
+ */
13
13
  declare class MemoryQueue implements NotificationQueue {
14
14
  #private;
15
15
  enqueue(message: NotificationMessage, options?: {
@@ -39,12 +39,12 @@ interface QueueWorker {
39
39
  stop: () => void;
40
40
  }
41
41
  /**
42
- * Creates a worker that reserves jobs from a queue and delivers them via a
43
- * {@link Notification} facade, retrying with backoff and dropping after `maxAttempts`.
44
- * @param queue The queue to drain.
45
- * @param notification The facade used to deliver messages.
46
- * @param options Behaviour tuning (max attempts, backoff curve, poll interval, drop hook).
47
- * @returns A controllable worker.
48
- */
42
+ * Creates a worker that reserves jobs from a queue and delivers them via a
43
+ * {@link Notification} facade, retrying with backoff and dropping after `maxAttempts`.
44
+ * @param queue The queue to drain.
45
+ * @param notification The facade used to deliver messages.
46
+ * @param options Behaviour tuning (max attempts, backoff curve, poll interval, drop hook).
47
+ * @returns A controllable worker.
48
+ */
49
49
  declare const createQueueWorker: (queue: NotificationQueue, notification: Notification, options?: QueueWorkerOptions) => QueueWorker;
50
50
  export { MemoryQueue, type NotificationQueue, type QueueJob, type QueueWorker, type QueueWorkerOptions, createQueueWorker };
@@ -1,11 +1,11 @@
1
- import { a as NotificationMessage } from "../packem_shared/notification.d-DFCVTods.js";
2
- import { Q as QueueJob, N as NotificationQueue } from "../packem_shared/types.d-67TogK4k.js";
3
- import "../packem_shared/types.d-CximoA8M.js";
4
- import "../packem_shared/types.d-GUzX1jTk.js";
5
- import "../packem_shared/provider.d-BQAGriz6.js";
1
+ import { a as NotificationMessage } from "../packem_shared/notification.d-D0ado_cy.js";
2
+ import { Q as QueueJob, N as NotificationQueue } from "../packem_shared/types.d--kw9ifOI.js";
3
+ import "../packem_shared/types.d-CRs03TYV.js";
4
+ import "../packem_shared/types.d-C7l7qdMG.js";
5
+ import "../packem_shared/provider.d-Dh32nRm9.js";
6
6
  /**
7
- * A pg-boss job fetched with `includeMetadata`, narrowed to the members this adapter reads.
8
- */
7
+ * A pg-boss job fetched with `includeMetadata`, narrowed to the members this adapter reads.
8
+ */
9
9
  interface PgBossJobLike {
10
10
  data: unknown;
11
11
  id: string;
@@ -13,9 +13,9 @@ interface PgBossJobLike {
13
13
  retryCount?: number;
14
14
  }
15
15
  /**
16
- * The subset of a [pg-boss](https://github.com/timgit/pg-boss) instance this adapter uses (v10 API).
17
- * Typed structurally so the `pg-boss` optional peer is never imported — pass a started `PgBoss` instance.
18
- */
16
+ * The subset of a [pg-boss](https://github.com/timgit/pg-boss) instance this adapter uses (v10 API).
17
+ * Typed structurally so the `pg-boss` optional peer is never imported — pass a started `PgBoss` instance.
18
+ */
19
19
  interface PgBossLike {
20
20
  complete: (name: string, id: string) => Promise<unknown>;
21
21
  fail: (name: string, id: string) => Promise<unknown>;
@@ -29,22 +29,22 @@ interface PgBossLike {
29
29
  }) => Promise<null | string>;
30
30
  }
31
31
  /**
32
- * Options for {@link createPgBossQueue}.
33
- */
32
+ * Options for {@link createPgBossQueue}.
33
+ */
34
34
  interface PgBossQueueOptions {
35
35
  /** The pg-boss queue name. */
36
36
  queueName: string;
37
37
  }
38
38
  /**
39
- * A {@link NotificationQueue} backed by [pg-boss](https://github.com/timgit/pg-boss) (Postgres, v10 API).
40
- *
41
- * Pass a started pg-boss instance — `pg-boss` is an optional peer dependency and is never started here.
42
- * `reserve` uses `fetch` with `includeMetadata`, so the job's `attempts` reflects pg-boss's own
43
- * `retryCount`. `retry` calls `fail`, so the retry delay is governed by the queue's pg-boss retry policy
44
- * rather than the `delayMs` argument.
45
- *
46
- * Runtime: NODE ONLY (requires a Postgres connection). Not Cloudflare Workers compatible.
47
- */
39
+ * A {@link NotificationQueue} backed by [pg-boss](https://github.com/timgit/pg-boss) (Postgres, v10 API).
40
+ *
41
+ * Pass a started pg-boss instance — `pg-boss` is an optional peer dependency and is never started here.
42
+ * `reserve` uses `fetch` with `includeMetadata`, so the job's `attempts` reflects pg-boss's own
43
+ * `retryCount`. `retry` calls `fail`, so the retry delay is governed by the queue's pg-boss retry policy
44
+ * rather than the `delayMs` argument.
45
+ *
46
+ * Runtime: NODE ONLY (requires a Postgres connection). Not Cloudflare Workers compatible.
47
+ */
48
48
  declare class PgBossQueue implements NotificationQueue {
49
49
  #private;
50
50
  constructor(boss: PgBossLike, options: PgBossQueueOptions);
@@ -57,10 +57,10 @@ declare class PgBossQueue implements NotificationQueue {
57
57
  size(): Promise<number>;
58
58
  }
59
59
  /**
60
- * Convenience factory for {@link PgBossQueue}.
61
- * @param boss A started pg-boss instance (optional peer).
62
- * @param options Queue options. See {@link PgBossQueueOptions}.
63
- * @returns A new {@link PgBossQueue}.
64
- */
60
+ * Convenience factory for {@link PgBossQueue}.
61
+ * @param boss A started pg-boss instance (optional peer).
62
+ * @param options Queue options. See {@link PgBossQueueOptions}.
63
+ * @returns A new {@link PgBossQueue}.
64
+ */
65
65
  declare const createPgBossQueue: (boss: PgBossLike, options: PgBossQueueOptions) => PgBossQueue;
66
66
  export { type PgBossJobLike, type PgBossLike, PgBossQueue, PgBossQueueOptions, createPgBossQueue };
@@ -1,21 +1,21 @@
1
- import { a as NotificationMessage } from "../packem_shared/notification.d-DFCVTods.js";
2
- import { Q as QueueJob, N as NotificationQueue } from "../packem_shared/types.d-67TogK4k.js";
3
- import "../packem_shared/types.d-CximoA8M.js";
4
- import "../packem_shared/types.d-GUzX1jTk.js";
5
- import "../packem_shared/provider.d-BQAGriz6.js";
1
+ import { a as NotificationMessage } from "../packem_shared/notification.d-D0ado_cy.js";
2
+ import { Q as QueueJob, N as NotificationQueue } from "../packem_shared/types.d--kw9ifOI.js";
3
+ import "../packem_shared/types.d-CRs03TYV.js";
4
+ import "../packem_shared/types.d-C7l7qdMG.js";
5
+ import "../packem_shared/provider.d-Dh32nRm9.js";
6
6
  /**
7
- * A single SQS message, narrowed to the members this adapter reads.
8
- */
7
+ * A single SQS message, narrowed to the members this adapter reads.
8
+ */
9
9
  interface SqsMessageLike {
10
10
  Attributes?: Record<string, string>;
11
11
  Body?: string;
12
12
  ReceiptHandle?: string;
13
13
  }
14
14
  /**
15
- * The subset of the high-level `@aws-sdk/client-sqs` `SQS` operations this adapter uses. The `SQS`
16
- * class exposes these operation methods directly (unlike the command-based `SQSClient.send`), keeping
17
- * the adapter mockable with plain method stubs and avoiding an import of the optional peer.
18
- */
15
+ * The subset of the high-level `@aws-sdk/client-sqs` `SQS` operations this adapter uses. The `SQS`
16
+ * class exposes these operation methods directly (unlike the command-based `SQSClient.send`), keeping
17
+ * the adapter mockable with plain method stubs and avoiding an import of the optional peer.
18
+ */
19
19
  interface SqsClientLike {
20
20
  changeMessageVisibility: (input: {
21
21
  QueueUrl: string;
@@ -50,8 +50,8 @@ interface SqsClientLike {
50
50
  }>;
51
51
  }
52
52
  /**
53
- * Options for {@link createSqsQueue}.
54
- */
53
+ * Options for {@link createSqsQueue}.
54
+ */
55
55
  interface SqsQueueOptions {
56
56
  /** The SQS queue URL. */
57
57
  queueUrl: string;
@@ -61,15 +61,15 @@ interface SqsQueueOptions {
61
61
  waitTimeSeconds?: number;
62
62
  }
63
63
  /**
64
- * A {@link NotificationQueue} backed by Amazon SQS, which maps natively onto the reserve/ack/retry
65
- * model (ReceiveMessage / DeleteMessage / ChangeMessageVisibility).
66
- *
67
- * Pass an `@aws-sdk/client-sqs` `SQS` instance — it is an optional peer dependency and is never
68
- * constructed here. The reserved job `id` is the SQS `ReceiptHandle`. `scheduledAt` is honored up to
69
- * the SQS 15-minute delay limit.
70
- *
71
- * Runtime: NODE ONLY (depends on the AWS SDK). Not Cloudflare Workers compatible.
72
- */
64
+ * A {@link NotificationQueue} backed by Amazon SQS, which maps natively onto the reserve/ack/retry
65
+ * model (ReceiveMessage / DeleteMessage / ChangeMessageVisibility).
66
+ *
67
+ * Pass an `@aws-sdk/client-sqs` `SQS` instance — it is an optional peer dependency and is never
68
+ * constructed here. The reserved job `id` is the SQS `ReceiptHandle`. `scheduledAt` is honored up to
69
+ * the SQS 15-minute delay limit.
70
+ *
71
+ * Runtime: NODE ONLY (depends on the AWS SDK). Not Cloudflare Workers compatible.
72
+ */
73
73
  declare class SqsQueue implements NotificationQueue {
74
74
  #private;
75
75
  constructor(client: SqsClientLike, options: SqsQueueOptions);
@@ -82,10 +82,10 @@ declare class SqsQueue implements NotificationQueue {
82
82
  size(): Promise<number>;
83
83
  }
84
84
  /**
85
- * Convenience factory for {@link SqsQueue}.
86
- * @param client An `@aws-sdk/client-sqs` `SQS` instance (optional peer).
87
- * @param options Queue options. See {@link SqsQueueOptions}.
88
- * @returns A new {@link SqsQueue}.
89
- */
85
+ * Convenience factory for {@link SqsQueue}.
86
+ * @param client An `@aws-sdk/client-sqs` `SQS` instance (optional peer).
87
+ * @param options Queue options. See {@link SqsQueueOptions}.
88
+ * @returns A new {@link SqsQueue}.
89
+ */
90
90
  declare const createSqsQueue: (client: SqsClientLike, options: SqsQueueOptions) => SqsQueue;
91
91
  export { type SqsClientLike, type SqsMessageLike, SqsQueue, SqsQueueOptions, createSqsQueue };
@@ -1,14 +1,14 @@
1
1
  import { S as Storage } from "../packem_shared/unstorage.DqlWKU2I.d-CogP3Etw.js";
2
- import { a as NotificationMessage } from "../packem_shared/notification.d-DFCVTods.js";
3
- import { Q as QueueJob, N as NotificationQueue } from "../packem_shared/types.d-67TogK4k.js";
4
- import "../packem_shared/types.d-CximoA8M.js";
5
- import "../packem_shared/types.d-GUzX1jTk.js";
6
- import "../packem_shared/provider.d-BQAGriz6.js";
2
+ import { a as NotificationMessage } from "../packem_shared/notification.d-D0ado_cy.js";
3
+ import { Q as QueueJob, N as NotificationQueue } from "../packem_shared/types.d--kw9ifOI.js";
4
+ import "../packem_shared/types.d-CRs03TYV.js";
5
+ import "../packem_shared/types.d-C7l7qdMG.js";
6
+ import "../packem_shared/provider.d-Dh32nRm9.js";
7
7
  /**
8
- * A {@link NotificationQueue} backed by an [unstorage](https://unstorage.unjs.io) driver,
9
- * giving durable, multi-backend persistence (Redis, filesystem, KV, ...). `unstorage` is
10
- * an optional peer dependency — pass a configured `Storage` instance.
11
- */
8
+ * A {@link NotificationQueue} backed by an [unstorage](https://unstorage.unjs.io) driver,
9
+ * giving durable, multi-backend persistence (Redis, filesystem, KV, ...). `unstorage` is
10
+ * an optional peer dependency — pass a configured `Storage` instance.
11
+ */
12
12
  declare class UnstorageQueue implements NotificationQueue {
13
13
  #private;
14
14
  constructor(storage: Storage, prefix?: string);
@@ -21,10 +21,10 @@ declare class UnstorageQueue implements NotificationQueue {
21
21
  size(): Promise<number>;
22
22
  }
23
23
  /**
24
- * Convenience factory for {@link UnstorageQueue}.
25
- * @param storage A configured unstorage `Storage` instance.
26
- * @param prefix Key prefix under which jobs are stored.
27
- * @returns A new {@link UnstorageQueue}.
28
- */
24
+ * Convenience factory for {@link UnstorageQueue}.
25
+ * @param storage A configured unstorage `Storage` instance.
26
+ * @param prefix Key prefix under which jobs are stored.
27
+ * @returns A new {@link UnstorageQueue}.
28
+ */
29
29
  declare const createUnstorageQueue: (storage: Storage, prefix?: string) => UnstorageQueue;
30
30
  export { UnstorageQueue, createUnstorageQueue };
@@ -1,35 +1,35 @@
1
- import { C as ChannelPayloadMap, N as Notification, a as NotificationMessage } from "../packem_shared/notification.d-DFCVTods.js";
2
- import { C as ChannelType, M as MaybePromise, c as Receipt } from "../packem_shared/types.d-GUzX1jTk.js";
3
- import "../packem_shared/types.d-CximoA8M.js";
4
- import "../packem_shared/provider.d-BQAGriz6.js";
1
+ import { C as ChannelPayloadMap, N as Notification, a as NotificationMessage } from "../packem_shared/notification.d-D0ado_cy.js";
2
+ import { C as ChannelType, M as MaybePromise, c as Receipt } from "../packem_shared/types.d-C7l7qdMG.js";
3
+ import "../packem_shared/types.d-CRs03TYV.js";
4
+ import "../packem_shared/provider.d-Dh32nRm9.js";
5
5
  /**
6
- * A gate decides whether a channel should be attempted for a given payload. Use it for
7
- * preferences, capability checks, send-windows or arbitrary conditions.
8
- */
6
+ * A gate decides whether a channel should be attempted for a given payload. Use it for
7
+ * preferences, capability checks, send-windows or arbitrary conditions.
8
+ */
9
9
  type ChannelGate = (channel: ChannelType, payload: ChannelPayloadMap[ChannelType]) => MaybePromise<boolean>;
10
10
  interface RouteOptions {
11
11
  /**
12
- * Optional gate run before each channel send. Returning false skips the channel.
13
- */
12
+ * Optional gate run before each channel send. Returning false skips the channel.
13
+ */
14
14
  gate?: ChannelGate;
15
15
  /**
16
- * `"best-of"` (default) sends in `order` and stops at the first success;
17
- * `"all"` broadcasts to every present, gated channel in parallel.
18
- */
16
+ * `"best-of"` (default) sends in `order` and stops at the first success;
17
+ * `"all"` broadcasts to every present, gated channel in parallel.
18
+ */
19
19
  mode?: "all" | "best-of";
20
20
  /**
21
- * Channel priority order. Channels absent from the message are skipped; channels in
22
- * the message but absent from `order` are appended in object order.
23
- */
21
+ * Channel priority order. Channels absent from the message are skipped; channels in
22
+ * the message but absent from `order` are appended in object order.
23
+ */
24
24
  order?: ChannelType[];
25
25
  }
26
26
  /**
27
- * Routes a multi-channel message across channels with a priority order and an optional
28
- * gate. `"best-of"` stops at the first success (channel fallback); `"all"` broadcasts.
29
- * @param notification The facade used to send.
30
- * @param message The multi-channel message.
31
- * @param options Routing options.
32
- * @returns The receipts produced (one per attempted channel).
33
- */
27
+ * Routes a multi-channel message across channels with a priority order and an optional
28
+ * gate. `"best-of"` stops at the first success (channel fallback); `"all"` broadcasts.
29
+ * @param notification The facade used to send.
30
+ * @param message The multi-channel message.
31
+ * @param options Routing options.
32
+ * @returns The receipts produced (one per attempted channel).
33
+ */
34
34
  declare const route: (notification: Notification, message: NotificationMessage, options?: RouteOptions) => Promise<Receipt[]>;
35
35
  export { ChannelGate, RouteOptions, route };
@@ -1,16 +1,16 @@
1
- import { T as TemplateRenderer } from "../packem_shared/types.d-td-F2Oh0.js";
1
+ import { T as TemplateRenderer } from "../packem_shared/types.d-BU-37j3S.js";
2
2
  /**
3
- * Renders a [Handlebars](https://handlebarsjs.com/) template to a string.
4
- *
5
- * `handlebars` is an optional peer, loaded lazily so a missing install surfaces here
6
- * as a {@link NotificationError} rather than at import time. Pure JS — edge-safe and
7
- * runnable on Cloudflare Workers.
8
- * @param template The Handlebars template string.
9
- * @param data The data/variables exposed to the template.
10
- * @param options Handlebars compile options.
11
- * @returns The rendered string.
12
- * @throws {TypeError} When the template is not a string.
13
- * @throws {NotificationError} When `handlebars` is not installed or rendering fails.
14
- */
3
+ * Renders a [Handlebars](https://handlebarsjs.com/) template to a string.
4
+ *
5
+ * `handlebars` is an optional peer, loaded lazily so a missing install surfaces here
6
+ * as a {@link NotificationError} rather than at import time. Pure JS — edge-safe and
7
+ * runnable on Cloudflare Workers.
8
+ * @param template The Handlebars template string.
9
+ * @param data The data/variables exposed to the template.
10
+ * @param options Handlebars compile options.
11
+ * @returns The rendered string.
12
+ * @throws {TypeError} When the template is not a string.
13
+ * @throws {NotificationError} When `handlebars` is not installed or rendering fails.
14
+ */
15
15
  declare const renderHandlebars: TemplateRenderer;
16
16
  export { renderHandlebars as default, renderHandlebars };
@@ -1 +1 @@
1
- import r from"../packem_shared/NotificationError-DVfMJQ1u.js";const d=async(a,n,s)=>{if(typeof a!="string")throw new TypeError("Handlebars template must be a string");let t;try{const e=await import("handlebars");t=e.default??e}catch(e){throw new r("handlebars","handlebars is not installed. Please install it: pnpm add handlebars",{cause:e})}try{return t.compile(a,s)(n??{})}catch(e){throw new r("handlebars",`Failed to render Handlebars template: ${e.message}`,{cause:e})}};export{d as default,d as renderHandlebars};
1
+ import r from"../packem_shared/NotificationError-B8CyoEaX.js";const d=async(a,n,s)=>{if(typeof a!="string")throw new TypeError("Handlebars template must be a string");let t;try{const e=await import("handlebars");t=e.default??e}catch(e){throw new r("handlebars","handlebars is not installed. Please install it: pnpm add handlebars",{cause:e})}try{return t.compile(a,s)(n??{})}catch(e){throw new r("handlebars",`Failed to render Handlebars template: ${e.message}`,{cause:e})}};export{d as default,d as renderHandlebars};
@@ -1,16 +1,16 @@
1
- import { T as TemplateRenderer } from "../packem_shared/types.d-td-F2Oh0.js";
1
+ import { T as TemplateRenderer } from "../packem_shared/types.d-BU-37j3S.js";
2
2
  /**
3
- * Renders a [LiquidJS](https://liquidjs.com/) template to a string.
4
- *
5
- * `liquidjs` is an optional peer, loaded lazily so a missing install surfaces here as
6
- * a {@link NotificationError} rather than at import time. Pure JS — edge-safe and
7
- * runnable on Cloudflare Workers.
8
- * @param template The Liquid template string.
9
- * @param data The data/variables exposed to the template.
10
- * @param options LiquidJS engine options (passed to the `Liquid` constructor).
11
- * @returns The rendered output.
12
- * @throws {TypeError} When the template is not a string.
13
- * @throws {NotificationError} When `liquidjs` is not installed or rendering fails.
14
- */
3
+ * Renders a [LiquidJS](https://liquidjs.com/) template to a string.
4
+ *
5
+ * `liquidjs` is an optional peer, loaded lazily so a missing install surfaces here as
6
+ * a {@link NotificationError} rather than at import time. Pure JS — edge-safe and
7
+ * runnable on Cloudflare Workers.
8
+ * @param template The Liquid template string.
9
+ * @param data The data/variables exposed to the template.
10
+ * @param options LiquidJS engine options (passed to the `Liquid` constructor).
11
+ * @returns The rendered output.
12
+ * @throws {TypeError} When the template is not a string.
13
+ * @throws {NotificationError} When `liquidjs` is not installed or rendering fails.
14
+ */
15
15
  declare const renderLiquid: TemplateRenderer;
16
16
  export { renderLiquid as default, renderLiquid };
@@ -1 +1 @@
1
- import r from"../packem_shared/NotificationError-DVfMJQ1u.js";const s=async(t,a,d)=>{if(typeof t!="string")throw new TypeError("Liquid template must be a string");let i;try{i=await import("liquidjs")}catch(e){throw new r("liquid","liquidjs is not installed. Please install it: pnpm add liquidjs",{cause:e})}try{return await new i.Liquid(d??{}).parseAndRender(t,a??{})}catch(e){throw new r("liquid",`Failed to render Liquid template: ${e.message}`,{cause:e})}};export{s as default,s as renderLiquid};
1
+ import r from"../packem_shared/NotificationError-B8CyoEaX.js";const s=async(t,a,d)=>{if(typeof t!="string")throw new TypeError("Liquid template must be a string");let i;try{i=await import("liquidjs")}catch(e){throw new r("liquid","liquidjs is not installed. Please install it: pnpm add liquidjs",{cause:e})}try{return await new i.Liquid(d??{}).parseAndRender(t,a??{})}catch(e){throw new r("liquid",`Failed to render Liquid template: ${e.message}`,{cause:e})}};export{s as default,s as renderLiquid};