@cowliss/cli 0.4.0 → 0.6.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.
- package/README.md +14 -9
- package/dist/guest/{driver-DaNdNhuF.js → driver-DBt5l1Z5.js} +4 -4
- package/dist/guest/driver.d.ts +1 -1
- package/dist/guest/driver.js +1 -1
- package/dist/guest/emails.d.ts +18 -1
- package/dist/guest/{index-DAGLEHDn.d.ts → index-CXcCEcAg.d.ts} +8 -9
- package/dist/guest/{journeys-B_xg_GnL.js → journeys-BrcKEXz0.js} +103 -117
- package/dist/guest/journeys.d.ts +27 -21
- package/dist/guest/journeys.js +1 -1
- package/dist/guest/wasi.js +1 -1
- package/dist/index.js +1728 -1733
- package/examples/abandoned-checkout/journeys/abandoned-checkout.ts +0 -1
- package/examples/abandoned-checkout/scenarios/abandoned-checkout.timeout.json +1 -2
- package/examples/activity-decay/journeys/activity-decay.ts +0 -1
- package/examples/cross-app-pitch/journeys/cross-app-pitch.ts +4 -4
- package/examples/cross-app-pitch/scenarios/cross-app-pitch.json +1 -1
- package/examples/winback/journeys/winback.ts +0 -1
- package/examples/winback/scenarios/winback.json +1 -1
- package/package.json +1 -1
- package/dist/guest/constants-B0wk-87t.d.ts +0 -30
|
@@ -12,7 +12,6 @@ import { defineJourney } from "@cowliss/cli/journeys";
|
|
|
12
12
|
export default defineJourney({
|
|
13
13
|
trigger: { event: "checkout_started" },
|
|
14
14
|
purpose: "emailMarketing",
|
|
15
|
-
senderIdentity: "cowliss-default",
|
|
16
15
|
tags: ["demo", "checkout"],
|
|
17
16
|
run: async (event, api) => {
|
|
18
17
|
const purchased = await api.waitForEvent("purchase_completed", {
|
|
@@ -21,7 +21,6 @@ import { defineJourney } from "@cowliss/cli/journeys";
|
|
|
21
21
|
export default defineJourney({
|
|
22
22
|
trigger: { event: "*" },
|
|
23
23
|
purpose: "emailMarketing",
|
|
24
|
-
senderIdentity: "cowliss-default",
|
|
25
24
|
tags: ["demo", "retention"],
|
|
26
25
|
run: async (_event, api) => {
|
|
27
26
|
await api.traits.set("active_30d", true);
|
|
@@ -13,10 +13,10 @@ import { defineJourney } from "@cowliss/cli/journeys";
|
|
|
13
13
|
export default defineJourney({
|
|
14
14
|
trigger: { event: "plan_upgraded", appId: "app_b" },
|
|
15
15
|
purpose: "emailMarketing",
|
|
16
|
-
//
|
|
17
|
-
// reads better from a product address than from the one your
|
|
18
|
-
// from.
|
|
19
|
-
|
|
16
|
+
// An address of its own rather than the shared one: a pitch for your other
|
|
17
|
+
// product reads better from a product address than from the one your
|
|
18
|
+
// receipts come from. Verify its domain under Settings, Domains first.
|
|
19
|
+
from: "Product News <product-news@example.com>",
|
|
20
20
|
tags: ["demo", "cross-app"],
|
|
21
21
|
run: async (_event, api) => {
|
|
22
22
|
await api.sleep("1d");
|
|
@@ -12,7 +12,6 @@ import { defineJourney } from "@cowliss/cli/journeys";
|
|
|
12
12
|
export default defineJourney({
|
|
13
13
|
trigger: { event: "purchase_completed" },
|
|
14
14
|
purpose: "emailMarketing",
|
|
15
|
-
senderIdentity: "cowliss-default",
|
|
16
15
|
tags: ["demo", "retention"],
|
|
17
16
|
run: async (_event, api) => {
|
|
18
17
|
await api.traits.set("purchased_recently", true);
|
package/package.json
CHANGED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
//#region ../../packages/shared/src/constants.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The two fixed environments every org has (spec: Environments). An app
|
|
4
|
-
* belongs to one, so the environment of every write is the app's;
|
|
5
|
-
* profiles, identifiers, events, memberships, journey instances,
|
|
6
|
-
* deliveries, violations, quarantine, the address ledger, and idempotency
|
|
7
|
-
* keys are per environment, while the catalog, sending domains, the
|
|
8
|
-
* suppression mirror, billing, and journey code are shared. A third
|
|
9
|
-
* environment is a one-line change here plus the mirrored db enum.
|
|
10
|
-
*/
|
|
11
|
-
declare const ENVIRONMENTS: readonly ["development", "production"];
|
|
12
|
-
type Environment = (typeof ENVIRONMENTS)[number];
|
|
13
|
-
/**
|
|
14
|
-
* The two classes of send, declared on the template rather than passed per
|
|
15
|
-
* call so the class cannot drift between two sends of the same message.
|
|
16
|
-
*
|
|
17
|
-
* Marketing is everything a journey sends on the org's behalf: it carries
|
|
18
|
-
* the RFC 8058 unsubscribe headers and runs the full gate list.
|
|
19
|
-
* Transactional is the developer's own operational mail (a receipt, an
|
|
20
|
-
* export-is-ready notice): it carries neither header and skips consent and
|
|
21
|
-
* the per-user frequency cap, because an unsubscribe link on an invoice is
|
|
22
|
-
* wrong and a receipt must not silently vanish for anyone who once left a
|
|
23
|
-
* newsletter. Suppression, the quota, the sending pause, and the from-domain
|
|
24
|
-
* check still apply to both: those bound cost and protect the shared SES
|
|
25
|
-
* account, and none of them are about what the recipient asked for.
|
|
26
|
-
*/
|
|
27
|
-
declare const SEND_CLASSES: readonly ["marketing", "transactional"];
|
|
28
|
-
type SendClass = (typeof SEND_CLASSES)[number];
|
|
29
|
-
//#endregion
|
|
30
|
-
export { SendClass as n, Environment as t };
|