mailery 0.8.0 → 0.9.0

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.
@@ -378,6 +378,13 @@ interface Queues {
378
378
  type QueueDriverConfig = {
379
379
  driver: 'bull';
380
380
  redis: RedisOptions | IORedis;
381
+ /**
382
+ * Redis key prefix for all queue keys (BullMQ default: 'bull').
383
+ * Namespaces multiple mailery instances on one Redis cluster — e.g.
384
+ * 'mailery-dev' / 'mailery-prod' to isolate environments. Must not
385
+ * contain ':' (BullMQ uses it as the key separator).
386
+ */
387
+ prefix?: string;
381
388
  } | {
382
389
  driver: 'agenda';
383
390
  db?: Db;
@@ -848,6 +855,12 @@ interface FlowRunDoc {
848
855
  properties: Record<string, unknown>;
849
856
  occurredAt: Date;
850
857
  } | null;
858
+ /**
859
+ * Dedupe key of the triggering event. Unique per flow (partial index) so the
860
+ * trigger scan's overlap window can re-read an event without creating a
861
+ * second run. Null for non-event entries (manual/API).
862
+ */
863
+ triggerDedupeKey?: string | null;
851
864
  enteredAt: Date;
852
865
  status: FlowRunStatus;
853
866
  currentStepIndex: number;
@@ -1376,6 +1389,7 @@ declare class Mailer {
1376
1389
  * MAILER_MONGODB_URI — Mongo connection string (required)
1377
1390
  * MAILER_MONGODB_DB — database name (optional; defaults to the URI default)
1378
1391
  * MAILER_REDIS_URL — Redis connection URL (required)
1392
+ * MAILER_QUEUE_PREFIX — Redis key prefix to namespace this instance (optional)
1379
1393
  * MAILER_PUBLIC_URL — base for tracking/unsub URLs (required)
1380
1394
  * MAILER_UNSUBSCRIBE_SECRET — HMAC key (required)
1381
1395
  * MAILER_SENDER_ADDRESS — postal address for CAN-SPAM (optional)
@@ -378,6 +378,13 @@ interface Queues {
378
378
  type QueueDriverConfig = {
379
379
  driver: 'bull';
380
380
  redis: RedisOptions | IORedis;
381
+ /**
382
+ * Redis key prefix for all queue keys (BullMQ default: 'bull').
383
+ * Namespaces multiple mailery instances on one Redis cluster — e.g.
384
+ * 'mailery-dev' / 'mailery-prod' to isolate environments. Must not
385
+ * contain ':' (BullMQ uses it as the key separator).
386
+ */
387
+ prefix?: string;
381
388
  } | {
382
389
  driver: 'agenda';
383
390
  db?: Db;
@@ -848,6 +855,12 @@ interface FlowRunDoc {
848
855
  properties: Record<string, unknown>;
849
856
  occurredAt: Date;
850
857
  } | null;
858
+ /**
859
+ * Dedupe key of the triggering event. Unique per flow (partial index) so the
860
+ * trigger scan's overlap window can re-read an event without creating a
861
+ * second run. Null for non-event entries (manual/API).
862
+ */
863
+ triggerDedupeKey?: string | null;
851
864
  enteredAt: Date;
852
865
  status: FlowRunStatus;
853
866
  currentStepIndex: number;
@@ -1376,6 +1389,7 @@ declare class Mailer {
1376
1389
  * MAILER_MONGODB_URI — Mongo connection string (required)
1377
1390
  * MAILER_MONGODB_DB — database name (optional; defaults to the URI default)
1378
1391
  * MAILER_REDIS_URL — Redis connection URL (required)
1392
+ * MAILER_QUEUE_PREFIX — Redis key prefix to namespace this instance (optional)
1379
1393
  * MAILER_PUBLIC_URL — base for tracking/unsub URLs (required)
1380
1394
  * MAILER_UNSUBSCRIBE_SECRET — HMAC key (required)
1381
1395
  * MAILER_SENDER_ADDRESS — postal address for CAN-SPAM (optional)