mailery 0.1.0 → 0.1.1
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/dist/admin/spa/index-DnPQRmZe.js +41 -0
- package/dist/admin/spa/index-DnPQRmZe.js.map +1 -0
- package/dist/admin/spa/index.html +1 -1
- package/dist/admin/spa/{template-editor-Cx1ky7rr.js → template-editor-DFGyqPn3.js} +2 -2
- package/dist/admin/spa/{template-editor-Cx1ky7rr.js.map → template-editor-DFGyqPn3.js.map} +1 -1
- package/dist/index.cjs +160 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -3
- package/dist/index.d.ts +51 -3
- package/dist/index.js +153 -1
- package/dist/index.js.map +1 -1
- package/dist/{null-7gnz1V98.d.cts → null-sygex0Ru.d.cts} +1 -1
- package/dist/{null-7gnz1V98.d.ts → null-sygex0Ru.d.ts} +1 -1
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/package.json +1 -1
- package/dist/admin/spa/index-C_FJL_E_.js +0 -41
- package/dist/admin/spa/index-C_FJL_E_.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ContactAdapter, a as Contact, A as AdapterFilter, M as MailProvider, S as SendArgs, b as SendResult, N as NormalizedEvent, c as Mailer, T as TemplateDoc, d as SuppressionScope } from './null-
|
|
2
|
-
export {
|
|
1
|
+
import { C as ContactAdapter, a as Contact, A as AdapterFilter, M as MailProvider, S as SendArgs, b as SendResult, N as NormalizedEvent, c as Mailer, T as TemplateDoc, d as SuppressionScope, F as FlowStep, e as SegmentFilter, P as Predicate } from './null-sygex0Ru.cjs';
|
|
2
|
+
export { f as AuditLogDoc, B as BroadcastDoc, g as BroadcastStatus, h as CircuitBreakerThresholds, i as Collections, j as ContactTagDoc, E as EventDoc, k as FlowDoc, l as FlowGoal, m as FlowRunDoc, n as FlowRunStatus, o as FlowVersionDoc, H as HealthDoc, p as HealthStatus, L as LeadDoc, q as MailerConfig, r as NullProvider, O as OutboxDoc, R as RedisOptions, s as SegmentDefinition, t as SendDoc, u as SendStatus, v as SubscriptionDoc, w as SubscriptionStatus, x as SuppressionDoc, y as SuppressionReason, z as TemplateKind, D as TemplateVersionDoc, W as WebhookEventDoc, G as ensureIndexes, I as getCollections } from './null-sygex0Ru.cjs';
|
|
3
3
|
import { Db, Filter } from 'mongodb';
|
|
4
4
|
import { Request, Router } from 'express';
|
|
5
5
|
import Handlebars from 'handlebars';
|
|
@@ -235,9 +235,57 @@ declare function verifyUnsubscribeToken(token: string, secret: string, now?: Dat
|
|
|
235
235
|
*/
|
|
236
236
|
declare function sha256Hex(input: string): string;
|
|
237
237
|
|
|
238
|
+
/**
|
|
239
|
+
* Enumerable option lists for the union types in `./types.ts`. Used by the
|
|
240
|
+
* admin client to render dropdowns + by tooling to enumerate the surface.
|
|
241
|
+
*
|
|
242
|
+
* Kept in `shared/` so the client and server agree on the canonical labels +
|
|
243
|
+
* default constructors. Pure data + pure functions — no React, no DOM.
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
interface FlowStepKindOption {
|
|
247
|
+
value: FlowStep['type'];
|
|
248
|
+
label: string;
|
|
249
|
+
/** Icon name from the client's icon set (lookup at render time). */
|
|
250
|
+
icon: string;
|
|
251
|
+
/** Visual class on the canvas chip. */
|
|
252
|
+
iconClass: string;
|
|
253
|
+
/** One-line description for tooltips / docs generation. */
|
|
254
|
+
description: string;
|
|
255
|
+
}
|
|
256
|
+
declare const FLOW_STEP_KINDS: readonly FlowStepKindOption[];
|
|
257
|
+
declare function defaultFlowStep(type: FlowStep['type']): FlowStep;
|
|
258
|
+
type PredicateKind = 'hasTag' | 'notHasTag' | 'fieldEquals' | 'fieldExists' | 'hasFiredEvent' | 'notHasFiredEvent' | 'subscriptionStatus' | 'hasOpened' | 'hasClicked' | 'hasOpenedExcludingBots' | 'hasClickedExcludingBots' | 'openedAtLeastN' | 'clickedAtLeastN';
|
|
259
|
+
interface PredicateKindOption {
|
|
260
|
+
value: PredicateKind;
|
|
261
|
+
label: string;
|
|
262
|
+
/** True when this predicate's signal is noisy (Apple MPP, bot prefetch). */
|
|
263
|
+
noisy?: boolean;
|
|
264
|
+
}
|
|
265
|
+
declare const PREDICATE_KINDS: readonly PredicateKindOption[];
|
|
266
|
+
/** Identify which kind of predicate this object is (or null for composites/unknown). */
|
|
267
|
+
declare function predicateKind(p: Predicate | null | undefined): PredicateKind | null;
|
|
268
|
+
declare function defaultPredicate(kind: PredicateKind): Predicate;
|
|
269
|
+
type SegmentFilterKind = SegmentFilter['kind'];
|
|
270
|
+
interface SegmentFilterKindOption {
|
|
271
|
+
value: SegmentFilterKind;
|
|
272
|
+
label: string;
|
|
273
|
+
/** Where the filter is evaluated: host-side via adapter, or mailer-side post-filter. */
|
|
274
|
+
side: 'host' | 'mailer' | 'composite';
|
|
275
|
+
}
|
|
276
|
+
declare const SEGMENT_FILTER_KINDS: readonly SegmentFilterKindOption[];
|
|
277
|
+
declare function defaultSegmentFilter(kind: SegmentFilterKind): SegmentFilter;
|
|
278
|
+
interface DedupePolicyOption {
|
|
279
|
+
value: 'once-per-contact' | 'once-per-day' | 'every-time';
|
|
280
|
+
label: string;
|
|
281
|
+
description: string;
|
|
282
|
+
derivedKeyShape: string;
|
|
283
|
+
}
|
|
284
|
+
declare const DEDUPE_POLICIES: readonly DedupePolicyOption[];
|
|
285
|
+
|
|
238
286
|
/**
|
|
239
287
|
* Public exports for the `mailery` package.
|
|
240
288
|
*/
|
|
241
289
|
declare const VERSION = "0.1.0";
|
|
242
290
|
|
|
243
|
-
export { AdapterFilter, type AdminRouterOptions, Contact, ContactAdapter, MailProvider, Mailer, MongoContactAdapter, type MongoContactAdapterOptions, NormalizedEvent, type PublicRouterOptions, SendArgs, SendGridProvider, type SendGridProviderOptions, SendResult, SuppressionScope, TemplateDoc, VERSION, applyTracking, compileTemplate, createAdminRouter, createPublicRouter, derivePlaintext, renderTemplate, sha256Hex, signUnsubscribeToken, verifyUnsubscribeToken };
|
|
291
|
+
export { AdapterFilter, type AdminRouterOptions, Contact, ContactAdapter, DEDUPE_POLICIES, type DedupePolicyOption, FLOW_STEP_KINDS, FlowStep, type FlowStepKindOption, MailProvider, Mailer, MongoContactAdapter, type MongoContactAdapterOptions, NormalizedEvent, PREDICATE_KINDS, Predicate, type PredicateKind, type PredicateKindOption, type PublicRouterOptions, SEGMENT_FILTER_KINDS, SegmentFilter, type SegmentFilterKind, type SegmentFilterKindOption, SendArgs, SendGridProvider, type SendGridProviderOptions, SendResult, SuppressionScope, TemplateDoc, VERSION, applyTracking, compileTemplate, createAdminRouter, createPublicRouter, defaultFlowStep, defaultPredicate, defaultSegmentFilter, derivePlaintext, predicateKind, renderTemplate, sha256Hex, signUnsubscribeToken, verifyUnsubscribeToken };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ContactAdapter, a as Contact, A as AdapterFilter, M as MailProvider, S as SendArgs, b as SendResult, N as NormalizedEvent, c as Mailer, T as TemplateDoc, d as SuppressionScope } from './null-
|
|
2
|
-
export {
|
|
1
|
+
import { C as ContactAdapter, a as Contact, A as AdapterFilter, M as MailProvider, S as SendArgs, b as SendResult, N as NormalizedEvent, c as Mailer, T as TemplateDoc, d as SuppressionScope, F as FlowStep, e as SegmentFilter, P as Predicate } from './null-sygex0Ru.js';
|
|
2
|
+
export { f as AuditLogDoc, B as BroadcastDoc, g as BroadcastStatus, h as CircuitBreakerThresholds, i as Collections, j as ContactTagDoc, E as EventDoc, k as FlowDoc, l as FlowGoal, m as FlowRunDoc, n as FlowRunStatus, o as FlowVersionDoc, H as HealthDoc, p as HealthStatus, L as LeadDoc, q as MailerConfig, r as NullProvider, O as OutboxDoc, R as RedisOptions, s as SegmentDefinition, t as SendDoc, u as SendStatus, v as SubscriptionDoc, w as SubscriptionStatus, x as SuppressionDoc, y as SuppressionReason, z as TemplateKind, D as TemplateVersionDoc, W as WebhookEventDoc, G as ensureIndexes, I as getCollections } from './null-sygex0Ru.js';
|
|
3
3
|
import { Db, Filter } from 'mongodb';
|
|
4
4
|
import { Request, Router } from 'express';
|
|
5
5
|
import Handlebars from 'handlebars';
|
|
@@ -235,9 +235,57 @@ declare function verifyUnsubscribeToken(token: string, secret: string, now?: Dat
|
|
|
235
235
|
*/
|
|
236
236
|
declare function sha256Hex(input: string): string;
|
|
237
237
|
|
|
238
|
+
/**
|
|
239
|
+
* Enumerable option lists for the union types in `./types.ts`. Used by the
|
|
240
|
+
* admin client to render dropdowns + by tooling to enumerate the surface.
|
|
241
|
+
*
|
|
242
|
+
* Kept in `shared/` so the client and server agree on the canonical labels +
|
|
243
|
+
* default constructors. Pure data + pure functions — no React, no DOM.
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
interface FlowStepKindOption {
|
|
247
|
+
value: FlowStep['type'];
|
|
248
|
+
label: string;
|
|
249
|
+
/** Icon name from the client's icon set (lookup at render time). */
|
|
250
|
+
icon: string;
|
|
251
|
+
/** Visual class on the canvas chip. */
|
|
252
|
+
iconClass: string;
|
|
253
|
+
/** One-line description for tooltips / docs generation. */
|
|
254
|
+
description: string;
|
|
255
|
+
}
|
|
256
|
+
declare const FLOW_STEP_KINDS: readonly FlowStepKindOption[];
|
|
257
|
+
declare function defaultFlowStep(type: FlowStep['type']): FlowStep;
|
|
258
|
+
type PredicateKind = 'hasTag' | 'notHasTag' | 'fieldEquals' | 'fieldExists' | 'hasFiredEvent' | 'notHasFiredEvent' | 'subscriptionStatus' | 'hasOpened' | 'hasClicked' | 'hasOpenedExcludingBots' | 'hasClickedExcludingBots' | 'openedAtLeastN' | 'clickedAtLeastN';
|
|
259
|
+
interface PredicateKindOption {
|
|
260
|
+
value: PredicateKind;
|
|
261
|
+
label: string;
|
|
262
|
+
/** True when this predicate's signal is noisy (Apple MPP, bot prefetch). */
|
|
263
|
+
noisy?: boolean;
|
|
264
|
+
}
|
|
265
|
+
declare const PREDICATE_KINDS: readonly PredicateKindOption[];
|
|
266
|
+
/** Identify which kind of predicate this object is (or null for composites/unknown). */
|
|
267
|
+
declare function predicateKind(p: Predicate | null | undefined): PredicateKind | null;
|
|
268
|
+
declare function defaultPredicate(kind: PredicateKind): Predicate;
|
|
269
|
+
type SegmentFilterKind = SegmentFilter['kind'];
|
|
270
|
+
interface SegmentFilterKindOption {
|
|
271
|
+
value: SegmentFilterKind;
|
|
272
|
+
label: string;
|
|
273
|
+
/** Where the filter is evaluated: host-side via adapter, or mailer-side post-filter. */
|
|
274
|
+
side: 'host' | 'mailer' | 'composite';
|
|
275
|
+
}
|
|
276
|
+
declare const SEGMENT_FILTER_KINDS: readonly SegmentFilterKindOption[];
|
|
277
|
+
declare function defaultSegmentFilter(kind: SegmentFilterKind): SegmentFilter;
|
|
278
|
+
interface DedupePolicyOption {
|
|
279
|
+
value: 'once-per-contact' | 'once-per-day' | 'every-time';
|
|
280
|
+
label: string;
|
|
281
|
+
description: string;
|
|
282
|
+
derivedKeyShape: string;
|
|
283
|
+
}
|
|
284
|
+
declare const DEDUPE_POLICIES: readonly DedupePolicyOption[];
|
|
285
|
+
|
|
238
286
|
/**
|
|
239
287
|
* Public exports for the `mailery` package.
|
|
240
288
|
*/
|
|
241
289
|
declare const VERSION = "0.1.0";
|
|
242
290
|
|
|
243
|
-
export { AdapterFilter, type AdminRouterOptions, Contact, ContactAdapter, MailProvider, Mailer, MongoContactAdapter, type MongoContactAdapterOptions, NormalizedEvent, type PublicRouterOptions, SendArgs, SendGridProvider, type SendGridProviderOptions, SendResult, SuppressionScope, TemplateDoc, VERSION, applyTracking, compileTemplate, createAdminRouter, createPublicRouter, derivePlaintext, renderTemplate, sha256Hex, signUnsubscribeToken, verifyUnsubscribeToken };
|
|
291
|
+
export { AdapterFilter, type AdminRouterOptions, Contact, ContactAdapter, DEDUPE_POLICIES, type DedupePolicyOption, FLOW_STEP_KINDS, FlowStep, type FlowStepKindOption, MailProvider, Mailer, MongoContactAdapter, type MongoContactAdapterOptions, NormalizedEvent, PREDICATE_KINDS, Predicate, type PredicateKind, type PredicateKindOption, type PublicRouterOptions, SEGMENT_FILTER_KINDS, SegmentFilter, type SegmentFilterKind, type SegmentFilterKindOption, SendArgs, SendGridProvider, type SendGridProviderOptions, SendResult, SuppressionScope, TemplateDoc, VERSION, applyTracking, compileTemplate, createAdminRouter, createPublicRouter, defaultFlowStep, defaultPredicate, defaultSegmentFilter, derivePlaintext, predicateKind, renderTemplate, sha256Hex, signUnsubscribeToken, verifyUnsubscribeToken };
|
package/dist/index.js
CHANGED
|
@@ -3662,9 +3662,161 @@ function lowercaseHeaders(h) {
|
|
|
3662
3662
|
return out;
|
|
3663
3663
|
}
|
|
3664
3664
|
|
|
3665
|
+
// src/shared/options.ts
|
|
3666
|
+
var FLOW_STEP_KINDS = [
|
|
3667
|
+
{ value: "wait", label: "Wait", icon: "Clock", iconClass: "wait", description: "Pause the run for a duration before continuing." },
|
|
3668
|
+
{ value: "condition", label: "Condition", icon: "Branch", iconClass: "condition", description: "Evaluate a predicate. Exit or skip on false." },
|
|
3669
|
+
{ value: "branch", label: "Branch", icon: "Branch", iconClass: "condition", description: "Evaluate a predicate. Recurse into one of two sub-lists." },
|
|
3670
|
+
{ value: "send", label: "Send", icon: "Mail", iconClass: "send", description: "Send a template to the contact." },
|
|
3671
|
+
{ value: "tag", label: "Tag", icon: "Tag", iconClass: "tag", description: "Add or remove tags on the contact." },
|
|
3672
|
+
{ value: "fire_event", label: "Fire event", icon: "Activity", iconClass: "send", description: "Insert a synthetic event (cross-flow handoff)." },
|
|
3673
|
+
{ value: "webhook", label: "Webhook", icon: "Webhook", iconClass: "tag", description: "POST to an external URL." },
|
|
3674
|
+
{ value: "exit", label: "Exit", icon: "Exit", iconClass: "exit", description: "End the run with an optional reason." }
|
|
3675
|
+
];
|
|
3676
|
+
function defaultFlowStep(type) {
|
|
3677
|
+
switch (type) {
|
|
3678
|
+
case "wait":
|
|
3679
|
+
return { type: "wait", value: 1, unit: "days" };
|
|
3680
|
+
case "condition":
|
|
3681
|
+
return { type: "condition", test: { hasTag: "engaged" }, ifFalse: "exit" };
|
|
3682
|
+
case "branch":
|
|
3683
|
+
return { type: "branch", test: { hasTag: "vip" }, ifTrueSteps: [], ifFalseSteps: [] };
|
|
3684
|
+
case "send":
|
|
3685
|
+
return { type: "send", templateSlug: "" };
|
|
3686
|
+
case "tag":
|
|
3687
|
+
return { type: "tag", addTags: [], removeTags: [] };
|
|
3688
|
+
case "fire_event":
|
|
3689
|
+
return { type: "fire_event", eventName: "" };
|
|
3690
|
+
case "webhook":
|
|
3691
|
+
return { type: "webhook", url: "", method: "POST" };
|
|
3692
|
+
case "exit":
|
|
3693
|
+
return { type: "exit" };
|
|
3694
|
+
}
|
|
3695
|
+
}
|
|
3696
|
+
var PREDICATE_KINDS = [
|
|
3697
|
+
{ value: "hasTag", label: "has tag" },
|
|
3698
|
+
{ value: "notHasTag", label: "does NOT have tag" },
|
|
3699
|
+
{ value: "fieldEquals", label: "field equals" },
|
|
3700
|
+
{ value: "fieldExists", label: "field exists" },
|
|
3701
|
+
{ value: "hasFiredEvent", label: "fired event" },
|
|
3702
|
+
{ value: "notHasFiredEvent", label: "has NOT fired event" },
|
|
3703
|
+
{ value: "subscriptionStatus", label: "subscription status" },
|
|
3704
|
+
{ value: "hasOpened", label: "opened", noisy: true },
|
|
3705
|
+
{ value: "hasClicked", label: "clicked", noisy: true },
|
|
3706
|
+
{ value: "hasOpenedExcludingBots", label: "opened (excl. bots)" },
|
|
3707
|
+
{ value: "hasClickedExcludingBots", label: "clicked (excl. bots)" },
|
|
3708
|
+
{ value: "openedAtLeastN", label: "opened at least N" },
|
|
3709
|
+
{ value: "clickedAtLeastN", label: "clicked at least N" }
|
|
3710
|
+
];
|
|
3711
|
+
function predicateKind(p) {
|
|
3712
|
+
if (!p) return null;
|
|
3713
|
+
for (const k of PREDICATE_KINDS) {
|
|
3714
|
+
if (k.value in p) return k.value;
|
|
3715
|
+
}
|
|
3716
|
+
return null;
|
|
3717
|
+
}
|
|
3718
|
+
function defaultPredicate(kind) {
|
|
3719
|
+
switch (kind) {
|
|
3720
|
+
case "hasTag":
|
|
3721
|
+
return { hasTag: "engaged" };
|
|
3722
|
+
case "notHasTag":
|
|
3723
|
+
return { notHasTag: "cold" };
|
|
3724
|
+
case "fieldEquals":
|
|
3725
|
+
return { fieldEquals: { field: "tier", value: "Pro" } };
|
|
3726
|
+
case "fieldExists":
|
|
3727
|
+
return { fieldExists: "tier" };
|
|
3728
|
+
case "hasFiredEvent":
|
|
3729
|
+
return { hasFiredEvent: "Activated app" };
|
|
3730
|
+
case "notHasFiredEvent":
|
|
3731
|
+
return { notHasFiredEvent: "Cancelled" };
|
|
3732
|
+
case "subscriptionStatus":
|
|
3733
|
+
return { subscriptionStatus: "subscribed" };
|
|
3734
|
+
case "hasOpened":
|
|
3735
|
+
return { hasOpened: { sinceFlowStart: true } };
|
|
3736
|
+
case "hasClicked":
|
|
3737
|
+
return { hasClicked: { sinceFlowStart: true } };
|
|
3738
|
+
case "hasOpenedExcludingBots":
|
|
3739
|
+
return { hasOpenedExcludingBots: { sinceFlowStart: true } };
|
|
3740
|
+
case "hasClickedExcludingBots":
|
|
3741
|
+
return { hasClickedExcludingBots: { sinceFlowStart: true } };
|
|
3742
|
+
case "openedAtLeastN":
|
|
3743
|
+
return { openedAtLeastN: { count: 1, withinDays: 7 } };
|
|
3744
|
+
case "clickedAtLeastN":
|
|
3745
|
+
return { clickedAtLeastN: { count: 1, withinDays: 7 } };
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
var SEGMENT_FILTER_KINDS = [
|
|
3749
|
+
{ value: "subscriptionStatus", label: "Subscription status", side: "mailer" },
|
|
3750
|
+
{ value: "hasTag", label: "Has tag", side: "host" },
|
|
3751
|
+
{ value: "notHasTag", label: "Does NOT have tag", side: "host" },
|
|
3752
|
+
{ value: "fieldEquals", label: "Field equals", side: "host" },
|
|
3753
|
+
{ value: "fieldIn", label: "Field in list", side: "host" },
|
|
3754
|
+
{ value: "fieldExists", label: "Field exists", side: "host" },
|
|
3755
|
+
{ value: "firedEvent", label: "Fired event", side: "mailer" },
|
|
3756
|
+
{ value: "notFiredEvent", label: "Has NOT fired event", side: "mailer" },
|
|
3757
|
+
{ value: "subscribedAfter", label: "Subscribed after", side: "mailer" },
|
|
3758
|
+
{ value: "subscribedBefore", label: "Subscribed before", side: "mailer" },
|
|
3759
|
+
{ value: "opened", label: "Opened", side: "mailer" },
|
|
3760
|
+
{ value: "notOpened", label: "Did NOT open", side: "mailer" },
|
|
3761
|
+
{ value: "any", label: "Any of (OR)", side: "composite" },
|
|
3762
|
+
{ value: "not", label: "NOT", side: "composite" }
|
|
3763
|
+
];
|
|
3764
|
+
function defaultSegmentFilter(kind) {
|
|
3765
|
+
switch (kind) {
|
|
3766
|
+
case "subscriptionStatus":
|
|
3767
|
+
return { kind: "subscriptionStatus", equals: "subscribed" };
|
|
3768
|
+
case "hasTag":
|
|
3769
|
+
return { kind: "hasTag", tag: "" };
|
|
3770
|
+
case "notHasTag":
|
|
3771
|
+
return { kind: "notHasTag", tag: "" };
|
|
3772
|
+
case "fieldEquals":
|
|
3773
|
+
return { kind: "fieldEquals", field: "", value: "" };
|
|
3774
|
+
case "fieldIn":
|
|
3775
|
+
return { kind: "fieldIn", field: "", values: [] };
|
|
3776
|
+
case "fieldExists":
|
|
3777
|
+
return { kind: "fieldExists", field: "" };
|
|
3778
|
+
case "firedEvent":
|
|
3779
|
+
return { kind: "firedEvent", eventName: "", withinDays: 30 };
|
|
3780
|
+
case "notFiredEvent":
|
|
3781
|
+
return { kind: "notFiredEvent", eventName: "", withinDays: 90 };
|
|
3782
|
+
case "subscribedAfter":
|
|
3783
|
+
return { kind: "subscribedAfter", date: new Date(Date.now() - 30 * 864e5) };
|
|
3784
|
+
case "subscribedBefore":
|
|
3785
|
+
return { kind: "subscribedBefore", date: /* @__PURE__ */ new Date() };
|
|
3786
|
+
case "opened":
|
|
3787
|
+
return { kind: "opened", withinDays: 14 };
|
|
3788
|
+
case "notOpened":
|
|
3789
|
+
return { kind: "notOpened", withinDays: 14 };
|
|
3790
|
+
case "any":
|
|
3791
|
+
return { kind: "any", filters: [] };
|
|
3792
|
+
case "not":
|
|
3793
|
+
return { kind: "not", filter: { kind: "hasTag", tag: "" } };
|
|
3794
|
+
}
|
|
3795
|
+
}
|
|
3796
|
+
var DEDUPE_POLICIES = [
|
|
3797
|
+
{
|
|
3798
|
+
value: "once-per-contact",
|
|
3799
|
+
label: "Once per contact",
|
|
3800
|
+
description: "Lifecycle markers (Created, Activated)",
|
|
3801
|
+
derivedKeyShape: "${externalId}:${eventName}"
|
|
3802
|
+
},
|
|
3803
|
+
{
|
|
3804
|
+
value: "once-per-day",
|
|
3805
|
+
label: "Once per day",
|
|
3806
|
+
description: "Daily behaviors (Viewed Storyboard)",
|
|
3807
|
+
derivedKeyShape: "${externalId}:${eventName}:${YYYY-MM-DD}"
|
|
3808
|
+
},
|
|
3809
|
+
{
|
|
3810
|
+
value: "every-time",
|
|
3811
|
+
label: "Every time",
|
|
3812
|
+
description: "True every-occurrence events (Imported)",
|
|
3813
|
+
derivedKeyShape: "${externalId}:${eventName}:${UUIDv4}"
|
|
3814
|
+
}
|
|
3815
|
+
];
|
|
3816
|
+
|
|
3665
3817
|
// src/server/index.ts
|
|
3666
3818
|
var VERSION = "0.1.0";
|
|
3667
3819
|
|
|
3668
|
-
export { Mailer, MongoContactAdapter, NullProvider, SendGridProvider, VERSION, applyTracking, compileTemplate, createAdminRouter, createPublicRouter, derivePlaintext, ensureIndexes, getCollections, renderTemplate, sha256Hex, signUnsubscribeToken, verifyUnsubscribeToken };
|
|
3820
|
+
export { DEDUPE_POLICIES, FLOW_STEP_KINDS, Mailer, MongoContactAdapter, NullProvider, PREDICATE_KINDS, SEGMENT_FILTER_KINDS, SendGridProvider, VERSION, applyTracking, compileTemplate, createAdminRouter, createPublicRouter, defaultFlowStep, defaultPredicate, defaultSegmentFilter, derivePlaintext, ensureIndexes, getCollections, predicateKind, renderTemplate, sha256Hex, signUnsubscribeToken, verifyUnsubscribeToken };
|
|
3669
3821
|
//# sourceMappingURL=index.js.map
|
|
3670
3822
|
//# sourceMappingURL=index.js.map
|