@shware/workflow 3.2.0 → 4.0.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 +100 -29
- package/dist/apns.cjs +113 -26
- package/dist/apns.cjs.map +1 -1
- package/dist/apns.d.cts +52 -6
- package/dist/apns.d.cts.map +1 -1
- package/dist/apns.d.mts +52 -6
- package/dist/apns.d.mts.map +1 -1
- package/dist/apns.mjs +111 -27
- package/dist/apns.mjs.map +1 -1
- package/dist/aws/engine-step.cjs +5 -5
- package/dist/aws/engine-step.cjs.map +1 -1
- package/dist/aws/engine-step.d.cts +8 -2
- package/dist/aws/engine-step.d.cts.map +1 -1
- package/dist/aws/engine-step.d.mts +8 -2
- package/dist/aws/engine-step.d.mts.map +1 -1
- package/dist/aws/engine-step.mjs +5 -5
- package/dist/aws/engine-step.mjs.map +1 -1
- package/dist/aws/index.cjs +47 -6
- package/dist/aws/index.cjs.map +1 -1
- package/dist/aws/index.d.cts +2 -2
- package/dist/aws/index.d.cts.map +1 -1
- package/dist/aws/index.d.mts +2 -2
- package/dist/aws/index.d.mts.map +1 -1
- package/dist/aws/index.mjs +47 -6
- package/dist/aws/index.mjs.map +1 -1
- package/dist/aws/instances.cjs +29 -6
- package/dist/aws/instances.cjs.map +1 -1
- package/dist/aws/instances.d.cts +11 -1
- package/dist/aws/instances.d.cts.map +1 -1
- package/dist/aws/instances.d.mts +11 -1
- package/dist/aws/instances.d.mts.map +1 -1
- package/dist/aws/instances.mjs +27 -4
- package/dist/aws/instances.mjs.map +1 -1
- package/dist/client.cjs +4 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.mts +2 -2
- package/dist/client.d.mts.map +1 -1
- package/dist/client.mjs +4 -1
- package/dist/client.mjs.map +1 -1
- package/dist/cloudflare/bindings.cjs +28 -25
- package/dist/cloudflare/bindings.cjs.map +1 -1
- package/dist/cloudflare/bindings.d.cts +17 -129
- package/dist/cloudflare/bindings.d.cts.map +1 -1
- package/dist/cloudflare/bindings.d.mts +17 -129
- package/dist/cloudflare/bindings.d.mts.map +1 -1
- package/dist/cloudflare/bindings.mjs +28 -23
- package/dist/cloudflare/bindings.mjs.map +1 -1
- package/dist/cloudflare/d1-env.cjs +6 -6
- package/dist/cloudflare/d1-env.cjs.map +1 -1
- package/dist/cloudflare/d1-env.d.cts +5 -5
- package/dist/cloudflare/d1-env.d.mts +5 -5
- package/dist/cloudflare/d1-env.mjs +6 -6
- package/dist/cloudflare/d1-env.mjs.map +1 -1
- package/dist/cloudflare/index.cjs +28 -18
- package/dist/cloudflare/index.d.cts +8 -4
- package/dist/cloudflare/index.d.mts +8 -4
- package/dist/cloudflare/index.mjs +9 -5
- package/dist/cloudflare/runner.cjs +29 -14
- package/dist/cloudflare/runner.cjs.map +1 -1
- package/dist/cloudflare/runner.d.cts +9 -2
- package/dist/cloudflare/runner.d.cts.map +1 -1
- package/dist/cloudflare/runner.d.mts +9 -2
- package/dist/cloudflare/runner.d.mts.map +1 -1
- package/dist/cloudflare/runner.mjs +28 -13
- package/dist/cloudflare/runner.mjs.map +1 -1
- package/dist/cloudflare/schema.sql +27 -6
- package/dist/cloudflare/worker.cjs +19 -9
- package/dist/cloudflare/worker.cjs.map +1 -1
- package/dist/cloudflare/worker.d.cts +2 -2
- package/dist/cloudflare/worker.d.cts.map +1 -1
- package/dist/cloudflare/worker.d.mts +2 -2
- package/dist/cloudflare/worker.d.mts.map +1 -1
- package/dist/cloudflare/worker.mjs +19 -9
- package/dist/cloudflare/worker.mjs.map +1 -1
- package/dist/config.cjs +21 -5
- package/dist/config.cjs.map +1 -1
- package/dist/config.mjs +21 -5
- package/dist/config.mjs.map +1 -1
- package/dist/dsl/action.cjs +3 -6
- package/dist/dsl/action.cjs.map +1 -1
- package/dist/dsl/action.d.cts +12 -11
- package/dist/dsl/action.d.cts.map +1 -1
- package/dist/dsl/action.d.mts +12 -11
- package/dist/dsl/action.d.mts.map +1 -1
- package/dist/dsl/action.mjs +3 -6
- package/dist/dsl/action.mjs.map +1 -1
- package/dist/dsl/bundle.cjs +35 -31
- package/dist/dsl/bundle.cjs.map +1 -1
- package/dist/dsl/bundle.d.cts.map +1 -1
- package/dist/dsl/bundle.d.mts.map +1 -1
- package/dist/dsl/bundle.mjs +35 -31
- package/dist/dsl/bundle.mjs.map +1 -1
- package/dist/dsl/condition.cjs +13 -1
- package/dist/dsl/condition.cjs.map +1 -1
- package/dist/dsl/condition.d.cts +9 -1
- package/dist/dsl/condition.d.cts.map +1 -1
- package/dist/dsl/condition.d.mts +9 -1
- package/dist/dsl/condition.d.mts.map +1 -1
- package/dist/dsl/condition.mjs +13 -2
- package/dist/dsl/condition.mjs.map +1 -1
- package/dist/dsl/flow.cjs +33 -11
- package/dist/dsl/flow.cjs.map +1 -1
- package/dist/dsl/flow.d.cts +9 -1
- package/dist/dsl/flow.d.cts.map +1 -1
- package/dist/dsl/flow.d.mts +9 -1
- package/dist/dsl/flow.d.mts.map +1 -1
- package/dist/dsl/flow.mjs +34 -13
- package/dist/dsl/flow.mjs.map +1 -1
- package/dist/dsl/workflow.cjs +2 -3
- package/dist/dsl/workflow.cjs.map +1 -1
- package/dist/dsl/workflow.d.cts.map +1 -1
- package/dist/dsl/workflow.d.mts.map +1 -1
- package/dist/dsl/workflow.mjs +3 -4
- package/dist/dsl/workflow.mjs.map +1 -1
- package/dist/email-sender.cjs +24 -0
- package/dist/email-sender.cjs.map +1 -1
- package/dist/email-sender.d.cts +18 -0
- package/dist/email-sender.d.cts.map +1 -1
- package/dist/email-sender.d.mts +18 -0
- package/dist/email-sender.d.mts.map +1 -1
- package/dist/email-sender.mjs +24 -1
- package/dist/email-sender.mjs.map +1 -1
- package/dist/engine/actions.cjs +1 -8
- package/dist/engine/actions.cjs.map +1 -1
- package/dist/engine/actions.d.cts +1 -12
- package/dist/engine/actions.d.cts.map +1 -1
- package/dist/engine/actions.d.mts +1 -12
- package/dist/engine/actions.d.mts.map +1 -1
- package/dist/engine/actions.mjs +1 -8
- package/dist/engine/actions.mjs.map +1 -1
- package/dist/engine/condition.cjs +25 -5
- package/dist/engine/condition.cjs.map +1 -1
- package/dist/engine/condition.d.cts +12 -3
- package/dist/engine/condition.d.cts.map +1 -1
- package/dist/engine/condition.d.mts +12 -3
- package/dist/engine/condition.d.mts.map +1 -1
- package/dist/engine/condition.mjs +25 -6
- package/dist/engine/condition.mjs.map +1 -1
- package/dist/engine/index.cjs +3 -0
- package/dist/engine/index.d.cts +5 -5
- package/dist/engine/index.d.mts +5 -5
- package/dist/engine/index.mjs +4 -4
- package/dist/engine/interpreter.cjs +27 -20
- package/dist/engine/interpreter.cjs.map +1 -1
- package/dist/engine/interpreter.d.cts.map +1 -1
- package/dist/engine/interpreter.d.mts.map +1 -1
- package/dist/engine/interpreter.mjs +27 -20
- package/dist/engine/interpreter.mjs.map +1 -1
- package/dist/engine/ports.d.cts +21 -6
- package/dist/engine/ports.d.cts.map +1 -1
- package/dist/engine/ports.d.mts +21 -6
- package/dist/engine/ports.d.mts.map +1 -1
- package/dist/engine/retry.cjs +13 -0
- package/dist/engine/retry.cjs.map +1 -1
- package/dist/engine/retry.d.cts +12 -0
- package/dist/engine/retry.d.cts.map +1 -1
- package/dist/engine/retry.d.mts +12 -0
- package/dist/engine/retry.d.mts.map +1 -1
- package/dist/engine/retry.mjs +13 -1
- package/dist/engine/retry.mjs.map +1 -1
- package/dist/engine/time-scale.cjs +90 -15
- package/dist/engine/time-scale.cjs.map +1 -1
- package/dist/engine/time-scale.d.cts +9 -6
- package/dist/engine/time-scale.d.cts.map +1 -1
- package/dist/engine/time-scale.d.mts +9 -6
- package/dist/engine/time-scale.d.mts.map +1 -1
- package/dist/engine/time-scale.mjs +90 -16
- package/dist/engine/time-scale.mjs.map +1 -1
- package/dist/fcm.cjs +111 -38
- package/dist/fcm.cjs.map +1 -1
- package/dist/fcm.d.cts +45 -5
- package/dist/fcm.d.cts.map +1 -1
- package/dist/fcm.d.mts +45 -5
- package/dist/fcm.d.mts.map +1 -1
- package/dist/fcm.mjs +110 -39
- package/dist/fcm.mjs.map +1 -1
- package/dist/hash.cjs +6 -6
- package/dist/hash.cjs.map +1 -1
- package/dist/hash.mjs +6 -6
- package/dist/hash.mjs.map +1 -1
- package/dist/host/auth.cjs +49 -0
- package/dist/host/auth.cjs.map +1 -0
- package/dist/host/auth.d.cts +21 -0
- package/dist/host/auth.d.cts.map +1 -0
- package/dist/host/auth.d.mts +21 -0
- package/dist/host/auth.d.mts.map +1 -0
- package/dist/host/auth.mjs +47 -0
- package/dist/host/auth.mjs.map +1 -0
- package/dist/host/channels.cjs +118 -40
- package/dist/host/channels.cjs.map +1 -1
- package/dist/host/channels.d.cts +27 -1
- package/dist/host/channels.d.cts.map +1 -1
- package/dist/host/channels.d.mts +27 -1
- package/dist/host/channels.d.mts.map +1 -1
- package/dist/host/channels.mjs +121 -44
- package/dist/host/channels.mjs.map +1 -1
- package/dist/host/execute.cjs +14 -2
- package/dist/host/execute.cjs.map +1 -1
- package/dist/host/execute.d.cts +4 -4
- package/dist/host/execute.d.cts.map +1 -1
- package/dist/host/execute.d.mts +4 -4
- package/dist/host/execute.d.mts.map +1 -1
- package/dist/host/execute.mjs +13 -1
- package/dist/host/execute.mjs.map +1 -1
- package/dist/host/fresh-read.cjs +30 -0
- package/dist/host/fresh-read.cjs.map +1 -0
- package/dist/host/fresh-read.d.cts +18 -0
- package/dist/host/fresh-read.d.cts.map +1 -0
- package/dist/host/fresh-read.d.mts +18 -0
- package/dist/host/fresh-read.d.mts.map +1 -0
- package/dist/host/fresh-read.mjs +29 -0
- package/dist/host/fresh-read.mjs.map +1 -0
- package/dist/host/http.cjs +321 -0
- package/dist/host/http.cjs.map +1 -0
- package/dist/host/http.d.cts +54 -0
- package/dist/host/http.d.cts.map +1 -0
- package/dist/host/http.d.mts +54 -0
- package/dist/host/http.d.mts.map +1 -0
- package/dist/host/http.mjs +317 -0
- package/dist/host/http.mjs.map +1 -0
- package/dist/host/{router.cjs → ingest.cjs} +147 -175
- package/dist/host/ingest.cjs.map +1 -0
- package/dist/host/{router.d.cts → ingest.d.cts} +48 -30
- package/dist/host/ingest.d.cts.map +1 -0
- package/dist/host/{router.d.mts → ingest.d.mts} +48 -30
- package/dist/host/ingest.d.mts.map +1 -0
- package/dist/host/{router.mjs → ingest.mjs} +144 -173
- package/dist/host/ingest.mjs.map +1 -0
- package/dist/host/journey-host.cjs +65 -93
- package/dist/host/journey-host.cjs.map +1 -1
- package/dist/host/journey-host.d.cts +19 -26
- package/dist/host/journey-host.d.cts.map +1 -1
- package/dist/host/journey-host.d.mts +19 -26
- package/dist/host/journey-host.d.mts.map +1 -1
- package/dist/host/journey-host.mjs +65 -93
- package/dist/host/journey-host.mjs.map +1 -1
- package/dist/host/platform.cjs +21 -0
- package/dist/host/platform.cjs.map +1 -0
- package/dist/host/platform.d.cts +126 -0
- package/dist/host/platform.d.cts.map +1 -0
- package/dist/host/platform.d.mts +126 -0
- package/dist/host/platform.d.mts.map +1 -0
- package/dist/host/platform.mjs +19 -0
- package/dist/host/platform.mjs.map +1 -0
- package/dist/host/senders.cjs +18 -9
- package/dist/host/senders.cjs.map +1 -1
- package/dist/host/senders.d.cts +9 -4
- package/dist/host/senders.d.cts.map +1 -1
- package/dist/host/senders.d.mts +9 -4
- package/dist/host/senders.d.mts.map +1 -1
- package/dist/host/senders.mjs +18 -9
- package/dist/host/senders.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/ir.cjs +5 -7
- package/dist/ir.cjs.map +1 -1
- package/dist/ir.d.cts +3 -12
- package/dist/ir.d.cts.map +1 -1
- package/dist/ir.d.mts +3 -12
- package/dist/ir.d.mts.map +1 -1
- package/dist/ir.mjs +5 -7
- package/dist/ir.mjs.map +1 -1
- package/dist/plan.cjs +27 -33
- package/dist/plan.cjs.map +1 -1
- package/dist/plan.d.cts +1 -1
- package/dist/plan.d.cts.map +1 -1
- package/dist/plan.d.mts +1 -1
- package/dist/plan.d.mts.map +1 -1
- package/dist/plan.mjs +27 -33
- package/dist/plan.mjs.map +1 -1
- package/dist/reporting/observer.cjs +1 -0
- package/dist/reporting/observer.cjs.map +1 -1
- package/dist/reporting/observer.mjs +1 -0
- package/dist/reporting/observer.mjs.map +1 -1
- package/dist/reporting/tracking.cjs +19 -4
- package/dist/reporting/tracking.cjs.map +1 -1
- package/dist/reporting/tracking.d.cts +13 -11
- package/dist/reporting/tracking.d.cts.map +1 -1
- package/dist/reporting/tracking.d.mts +13 -11
- package/dist/reporting/tracking.d.mts.map +1 -1
- package/dist/reporting/tracking.mjs +19 -4
- package/dist/reporting/tracking.mjs.map +1 -1
- package/dist/store/d1.cjs +88 -29
- package/dist/store/d1.cjs.map +1 -1
- package/dist/store/d1.d.cts +29 -11
- package/dist/store/d1.d.cts.map +1 -1
- package/dist/store/d1.d.mts +29 -11
- package/dist/store/d1.d.mts.map +1 -1
- package/dist/store/d1.mjs +88 -29
- package/dist/store/d1.mjs.map +1 -1
- package/dist/store/erasure.cjs +22 -0
- package/dist/store/erasure.cjs.map +1 -0
- package/dist/store/erasure.d.cts +18 -0
- package/dist/store/erasure.d.cts.map +1 -0
- package/dist/store/erasure.d.mts +18 -0
- package/dist/store/erasure.d.mts.map +1 -0
- package/dist/store/erasure.mjs +21 -0
- package/dist/store/erasure.mjs.map +1 -0
- package/dist/store/index.cjs +2 -0
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +67 -13
- package/dist/store/index.d.cts.map +1 -1
- package/dist/store/index.d.mts +67 -13
- package/dist/store/index.d.mts.map +1 -1
- package/dist/store/index.mjs +2 -1
- package/dist/store/index.mjs.map +1 -1
- package/dist/store/postgres-reporting.cjs +125 -62
- package/dist/store/postgres-reporting.cjs.map +1 -1
- package/dist/store/postgres-reporting.d.cts +30 -2
- package/dist/store/postgres-reporting.d.cts.map +1 -1
- package/dist/store/postgres-reporting.d.mts +30 -2
- package/dist/store/postgres-reporting.d.mts.map +1 -1
- package/dist/store/postgres-reporting.mjs +125 -62
- package/dist/store/postgres-reporting.mjs.map +1 -1
- package/dist/store/postgres.cjs +179 -60
- package/dist/store/postgres.cjs.map +1 -1
- package/dist/store/postgres.d.cts +44 -7
- package/dist/store/postgres.d.cts.map +1 -1
- package/dist/store/postgres.d.mts +44 -7
- package/dist/store/postgres.d.mts.map +1 -1
- package/dist/store/postgres.mjs +179 -60
- package/dist/store/postgres.mjs.map +1 -1
- package/dist/store/tables.cjs +7 -5
- package/dist/store/tables.cjs.map +1 -1
- package/dist/store/tables.d.cts.map +1 -1
- package/dist/store/tables.d.mts.map +1 -1
- package/dist/store/tables.mjs +7 -5
- package/dist/store/tables.mjs.map +1 -1
- package/dist/store/user-lock.cjs +43 -0
- package/dist/store/user-lock.cjs.map +1 -0
- package/dist/store/user-lock.d.cts +32 -0
- package/dist/store/user-lock.d.cts.map +1 -0
- package/dist/store/user-lock.d.mts +32 -0
- package/dist/store/user-lock.d.mts.map +1 -0
- package/dist/store/user-lock.mjs +40 -0
- package/dist/store/user-lock.mjs.map +1 -0
- package/dist/transports/cloudflare-email.cjs +3 -2
- package/dist/transports/cloudflare-email.cjs.map +1 -1
- package/dist/transports/cloudflare-email.mjs +3 -2
- package/dist/transports/cloudflare-email.mjs.map +1 -1
- package/dist/transports/ses.cjs +52 -7
- package/dist/transports/ses.cjs.map +1 -1
- package/dist/transports/ses.d.cts +9 -1
- package/dist/transports/ses.d.cts.map +1 -1
- package/dist/transports/ses.d.mts +9 -1
- package/dist/transports/ses.d.mts.map +1 -1
- package/dist/transports/ses.mjs +52 -8
- package/dist/transports/ses.mjs.map +1 -1
- package/dist/webpush.cjs +133 -47
- package/dist/webpush.cjs.map +1 -1
- package/dist/webpush.d.cts +49 -8
- package/dist/webpush.d.cts.map +1 -1
- package/dist/webpush.d.mts +49 -8
- package/dist/webpush.d.mts.map +1 -1
- package/dist/webpush.mjs +130 -47
- package/dist/webpush.mjs.map +1 -1
- package/package.json +1 -1
- package/src/cloudflare/schema.sql +27 -6
- package/dist/host/router.cjs.map +0 -1
- package/dist/host/router.d.cts.map +0 -1
- package/dist/host/router.d.mts.map +0 -1
- package/dist/host/router.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmailAddress } from "../email.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { WorkflowBindingLike } from "../host/platform.mjs";
|
|
3
3
|
//#region src/cloudflare/bindings.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A minimal structural interface over the Cloudflare bindings.
|
|
@@ -9,10 +9,6 @@ import { ExecutionStart } from "../store/index.mjs";
|
|
|
9
9
|
* subset plus the ambient cloudflare:workers declaration is enough to compile,
|
|
10
10
|
* and the real bindings satisfy it structurally at runtime.
|
|
11
11
|
*/
|
|
12
|
-
export interface KVNamespaceLike {
|
|
13
|
-
get(key: string): Promise<string | null>;
|
|
14
|
-
put(key: string, value: string): Promise<void>;
|
|
15
|
-
}
|
|
16
12
|
/** Structural subset of D1Result: `meta.changes` is how INSERT OR IGNORE reports whether it inserted. */
|
|
17
13
|
export interface D1RunResultLike {
|
|
18
14
|
meta?: {
|
|
@@ -32,53 +28,6 @@ export interface D1DatabaseLike {
|
|
|
32
28
|
/** Statements run in order inside one transaction (real D1 semantics) — deploy relies on the atomicity. */
|
|
33
29
|
batch(statements: D1PreparedStatementLike[]): Promise<unknown>;
|
|
34
30
|
}
|
|
35
|
-
export interface WorkflowInstanceLike {
|
|
36
|
-
id: string;
|
|
37
|
-
sendEvent(event: {
|
|
38
|
-
type: string;
|
|
39
|
-
payload?: unknown;
|
|
40
|
-
}): Promise<void>;
|
|
41
|
-
/** Stop the instance for good (Cloudflare Workflows' `terminate`). */
|
|
42
|
-
terminate?(): Promise<void>;
|
|
43
|
-
/** Where it stands (`complete`, `errored`, `terminated`, `running`, …). */
|
|
44
|
-
status?(): Promise<{
|
|
45
|
-
status: string;
|
|
46
|
-
}>;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* How the router starts, wakes and stops instances: Cloudflare's workflow binding, or the AWS
|
|
50
|
-
* adapter's equivalent over durable executions.
|
|
51
|
-
*/
|
|
52
|
-
export interface WorkflowBindingLike {
|
|
53
|
-
create(options: {
|
|
54
|
-
id: string;
|
|
55
|
-
params: unknown;
|
|
56
|
-
}): Promise<WorkflowInstanceLike>;
|
|
57
|
-
get(id: string): Promise<WorkflowInstanceLike>;
|
|
58
|
-
/**
|
|
59
|
-
* For a runtime whose start is a submit that can be lost in flight (AWS): the start to record
|
|
60
|
-
* with the entry, in one transaction. A failed `create` then keeps the entry — its recorded
|
|
61
|
-
* start is retried by the next ingest for the pair (`resume`) or by maintenance, never rolled
|
|
62
|
-
* back and re-entered as a second execution.
|
|
63
|
-
*/
|
|
64
|
-
plan?(options: {
|
|
65
|
-
id: string;
|
|
66
|
-
params: JourneyParams;
|
|
67
|
-
ts: number;
|
|
68
|
-
/** The code version whose routes named `params.contentHash` (absent after a forced deploy). */
|
|
69
|
-
version?: string | undefined;
|
|
70
|
-
}): Promise<ExecutionStart>;
|
|
71
|
-
/** Retry the recorded, unconfirmed start of the (workflow, user) entry still running, if any. */
|
|
72
|
-
resume?(entry: {
|
|
73
|
-
workflow: string;
|
|
74
|
-
userId: string;
|
|
75
|
-
}): Promise<void>;
|
|
76
|
-
/**
|
|
77
|
-
* Maintenance the sweep runs first: old unconfirmed starts retried (or given up on), and
|
|
78
|
-
* executions the platform ended on its own (timeout, stop, crash) reconciled into the ledger.
|
|
79
|
-
*/
|
|
80
|
-
maintain?(): Promise<void>;
|
|
81
|
-
}
|
|
82
31
|
/**
|
|
83
32
|
* Cloudflare Email Service's send_email binding (structural subset).
|
|
84
33
|
*
|
|
@@ -96,84 +45,20 @@ export interface EmailBindingLike {
|
|
|
96
45
|
replyTo?: EmailAddress;
|
|
97
46
|
subject: string;
|
|
98
47
|
html: string;
|
|
48
|
+
/** List-Unsubscribe and List-Unsubscribe-Post, when the email has an unsubscribe link. */
|
|
49
|
+
headers?: Readonly<Record<string, string>>;
|
|
99
50
|
/** `${instanceId}:${nodeId}`: stable across replays and retries — drop a send whose key was already delivered. */
|
|
100
51
|
idempotencyKey: string;
|
|
101
52
|
}): Promise<unknown>;
|
|
102
53
|
}
|
|
103
|
-
/**
|
|
104
|
-
export
|
|
105
|
-
/**
|
|
106
|
-
* BundleIR storage for the default D1 store (`wf:${contentHash}` → WorkflowIR JSON). Optional:
|
|
107
|
-
* a Worker on another JourneyStore (Postgres, say) does not declare it.
|
|
108
|
-
*/
|
|
109
|
-
WORKFLOW_KV?: KVNamespaceLike;
|
|
110
|
-
/** Tables of the default D1 store (events / profiles / segments / triggers / entries / subscriptions). Optional, as above. */
|
|
111
|
-
DB?: D1DatabaseLike;
|
|
112
|
-
/** JourneyRunner's workflow binding (creating instances and waking them). */
|
|
113
|
-
JOURNEY: WorkflowBindingLike;
|
|
114
|
-
/** Optional message-delivery webhook (defaults to the console logging sender). */
|
|
115
|
-
MESSAGE_WEBHOOK_URL?: string;
|
|
116
|
-
/**
|
|
117
|
-
* Bearer token required on every mutating HTTP endpoint (`Authorization:
|
|
118
|
-
* Bearer <token>`). Unset = open — acceptable only for local dev; /deploy in
|
|
119
|
-
* particular rewrites the whole routing table, so production must set this.
|
|
120
|
-
*/
|
|
121
|
-
API_TOKEN?: string;
|
|
122
|
-
/**
|
|
123
|
-
* This Worker's public origin. With a store that keeps reporting (Postgres), journey emails'
|
|
124
|
-
* links and open pixel point at its `/t/...` routes; without it emails go out untracked.
|
|
125
|
-
*/
|
|
126
|
-
WORKFLOW_ORIGIN?: string;
|
|
127
|
-
/** Which `workflow.config.ts` entry applies (`development`, `production`, …); production when unset. */
|
|
128
|
-
ENVIRONMENT?: string;
|
|
129
|
-
/** Cloudflare Email Sending, when the config has `emails`. */
|
|
130
|
-
EMAIL?: EmailBindingLike;
|
|
131
|
-
/** The APNs auth key (`.p8`, base64) named by the config's `apns.keyId`. */
|
|
132
|
-
APNS_PRIVATE_KEY_BASE64?: string;
|
|
133
|
-
/** The Firebase service account (base64 JSON) the config's `fcm` sends with. */
|
|
134
|
-
GOOGLE_APPLICATION_CREDENTIALS_BASE64?: string;
|
|
135
|
-
/** The VAPID key pair web pushes are signed with (`generateVapidKeys`); the config's `webPush` turns the channel on. */
|
|
136
|
-
VAPID_PUBLIC_KEY?: string;
|
|
137
|
-
VAPID_PRIVATE_KEY?: string;
|
|
138
|
-
/**
|
|
139
|
-
* Cloudflare's version metadata binding (wrangler `"version_metadata": { "binding":
|
|
140
|
-
* "CF_VERSION_METADATA" }`). With it, and a store that records the live version (Postgres),
|
|
141
|
-
* journeyWorker makes the bundle compiled into each new version live by itself: `wrangler
|
|
142
|
-
* deploy` is the whole deploy.
|
|
143
|
-
*/
|
|
144
|
-
CF_VERSION_METADATA?: {
|
|
145
|
-
id: string;
|
|
146
|
-
tag?: string;
|
|
147
|
-
timestamp: string;
|
|
148
|
-
};
|
|
149
|
-
/** Development only: the HTTP/2 relay `wrangler dev` sends APNs requests through (see `@shware/workflow/apns-relay`). */
|
|
150
|
-
APNS_RELAY_ORIGIN?: string;
|
|
151
|
-
}
|
|
152
|
-
/** The runtime does not know the instance: the only failure that lets the router drop its wakes. */
|
|
153
|
-
export declare class InstanceNotFoundError extends Error {
|
|
154
|
-
readonly instanceId: string;
|
|
155
|
-
readonly name = "InstanceNotFoundError";
|
|
156
|
-
constructor(instanceId: string);
|
|
157
|
-
}
|
|
54
|
+
/** Cloudflare's Workflow binding, as far as the host uses it. */
|
|
55
|
+
export type CfWorkflowBinding = Pick<WorkflowBindingLike, 'create' | 'get'>;
|
|
158
56
|
/**
|
|
159
|
-
*
|
|
160
|
-
*
|
|
57
|
+
* The Workflow binding as the host's runtime port: `get` answers an unknown id with
|
|
58
|
+
* `InstanceNotFoundError`, as the port promises, instead of Cloudflare's own error. Everything
|
|
59
|
+
* else is forwarded as is.
|
|
161
60
|
*/
|
|
162
|
-
export declare function
|
|
163
|
-
/** The event type the router uses to wake waiting instances (sendEvent's `type`). */
|
|
164
|
-
export declare const WAKE_EVENT_TYPE = "wake";
|
|
165
|
-
/** Journey instance parameters, passed by the ingest router when it creates one. */
|
|
166
|
-
export interface JourneyParams {
|
|
167
|
-
workflowId: string;
|
|
168
|
-
/** The IR version pinned at entry. */
|
|
169
|
-
contentHash: string;
|
|
170
|
-
userId: string;
|
|
171
|
-
trigger: {
|
|
172
|
-
event: string;
|
|
173
|
-
payload: Record<string, unknown>;
|
|
174
|
-
};
|
|
175
|
-
[key: string]: unknown;
|
|
176
|
-
}
|
|
61
|
+
export declare function cloudflareJourneyBinding(binding: CfWorkflowBinding): WorkflowBindingLike;
|
|
177
62
|
/**
|
|
178
63
|
* Slack on the deadline when deciding whether a thrown wait was a timeout: the
|
|
179
64
|
* platform may surface the expiry a moment early, and a wait shorter than this
|
|
@@ -184,11 +69,14 @@ export declare const WAKE_TIMEOUT_TOLERANCE_MS = 5000;
|
|
|
184
69
|
* Did a wait that threw actually reach its deadline?
|
|
185
70
|
*
|
|
186
71
|
* CF signals a wait timeout by throwing, and so does every other failure in
|
|
187
|
-
* there — a broken binding, an evicted instance, a malformed timeout.
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
72
|
+
* there — a broken binding, an evicted instance, a malformed timeout. Reading
|
|
73
|
+
* them all as timeouts would make an infrastructure fault indistinguishable
|
|
74
|
+
* from "the user never did it" (the journey would take its onTimeout branch,
|
|
75
|
+
* early and silently). Only the clock can tell them apart, and only against
|
|
76
|
+
* the absolute deadline: measured from when the wait was parked, a replay
|
|
77
|
+
* after an eviction would start the measure over and read a
|
|
78
|
+
* genuine expiry as a failure.
|
|
191
79
|
*/
|
|
192
|
-
export declare function wakeExpired(
|
|
80
|
+
export declare function wakeExpired(deadlineMs: number, now: number): boolean;
|
|
193
81
|
//#endregion
|
|
194
82
|
//# sourceMappingURL=bindings.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.d.mts","names":[],"sources":["../../src/cloudflare/bindings.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"bindings.d.mts","names":[],"sources":["../../src/cloudflare/bindings.ts"],"mappings":";;;;;;;;;;;;iBAaiB;EACf;IAAS;;;iBAGM;EACf,QAAQ,oBAAoB;EAC5B,MAAM,IAAI,4BAA4B,QAAQ;EAC9C,IAAI,IAAI,4BAA4B;IAAU,SAAS;;EACvD,OAAO,QAAQ;;iBAGA;EACf,QAAQ,cAAc;;EAEtB,MAAM,YAAY,4BAA4B;;;;;;;;;;;;iBAa/B;EACf,KAAK;IACH,MAAM;IACN,IAAI;IACJ,UAAU;IACV;IACA;;IAEA,UAAU,SAAS;;IAEnB;MACE;;;YAIM,oBAAoB,KAAK;;;;;;wBAUrB,yBAAyB,SAAS,oBAAoB;;;;;;qBAqBzD;;;;;;;;;;;;;wBAcG,YAAY,oBAAoB"}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
+
import { InstanceNotFoundError } from "../host/platform.mjs";
|
|
1
2
|
//#region src/cloudflare/bindings.ts
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
instanceId;
|
|
5
|
-
name = "InstanceNotFoundError";
|
|
6
|
-
constructor(instanceId) {
|
|
7
|
-
super(`no such instance: ${instanceId}`);
|
|
8
|
-
this.instanceId = instanceId;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
3
|
+
/** How Cloudflare's `get` reports an unknown instance id. */
|
|
4
|
+
const CF_NOT_FOUND = "instance.not_found";
|
|
11
5
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
6
|
+
* The Workflow binding as the host's runtime port: `get` answers an unknown id with
|
|
7
|
+
* `InstanceNotFoundError`, as the port promises, instead of Cloudflare's own error. Everything
|
|
8
|
+
* else is forwarded as is.
|
|
14
9
|
*/
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
function cloudflareJourneyBinding(binding) {
|
|
11
|
+
return {
|
|
12
|
+
create: (options) => binding.create(options),
|
|
13
|
+
async get(id) {
|
|
14
|
+
try {
|
|
15
|
+
return await binding.get(id);
|
|
16
|
+
} catch (error) {
|
|
17
|
+
if (String(error).includes(CF_NOT_FOUND)) throw new InstanceNotFoundError(id, { cause: error });
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
18
22
|
}
|
|
19
|
-
/** The event type the router uses to wake waiting instances (sendEvent's `type`). */
|
|
20
|
-
const WAKE_EVENT_TYPE = "wake";
|
|
21
23
|
/**
|
|
22
24
|
* Slack on the deadline when deciding whether a thrown wait was a timeout: the
|
|
23
25
|
* platform may surface the expiry a moment early, and a wait shorter than this
|
|
@@ -28,15 +30,18 @@ const WAKE_TIMEOUT_TOLERANCE_MS = 5e3;
|
|
|
28
30
|
* Did a wait that threw actually reach its deadline?
|
|
29
31
|
*
|
|
30
32
|
* CF signals a wait timeout by throwing, and so does every other failure in
|
|
31
|
-
* there — a broken binding, an evicted instance, a malformed timeout.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* there — a broken binding, an evicted instance, a malformed timeout. Reading
|
|
34
|
+
* them all as timeouts would make an infrastructure fault indistinguishable
|
|
35
|
+
* from "the user never did it" (the journey would take its onTimeout branch,
|
|
36
|
+
* early and silently). Only the clock can tell them apart, and only against
|
|
37
|
+
* the absolute deadline: measured from when the wait was parked, a replay
|
|
38
|
+
* after an eviction would start the measure over and read a
|
|
39
|
+
* genuine expiry as a failure.
|
|
35
40
|
*/
|
|
36
|
-
function wakeExpired(
|
|
37
|
-
return now
|
|
41
|
+
function wakeExpired(deadlineMs, now) {
|
|
42
|
+
return now >= deadlineMs - WAKE_TIMEOUT_TOLERANCE_MS;
|
|
38
43
|
}
|
|
39
44
|
//#endregion
|
|
40
|
-
export {
|
|
45
|
+
export { WAKE_TIMEOUT_TOLERANCE_MS, cloudflareJourneyBinding, wakeExpired };
|
|
41
46
|
|
|
42
47
|
//# sourceMappingURL=bindings.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.mjs","names":[],"sources":["../../src/cloudflare/bindings.ts"],"sourcesContent":["import type { EmailAddress } from '../email';\nimport type
|
|
1
|
+
{"version":3,"file":"bindings.mjs","names":[],"sources":["../../src/cloudflare/bindings.ts"],"sourcesContent":["import type { EmailAddress } from '../email';\nimport { InstanceNotFoundError, type WorkflowBindingLike } from '../host/platform';\n\n/**\n * A minimal structural interface over the Cloudflare bindings.\n *\n * @cloudflare/workers-types is deliberately not used: the global types it\n * injects clash with the DOM lib this package's react side needs. A structural\n * subset plus the ambient cloudflare:workers declaration is enough to compile,\n * and the real bindings satisfy it structurally at runtime.\n */\n\n/** Structural subset of D1Result: `meta.changes` is how INSERT OR IGNORE reports whether it inserted. */\nexport interface D1RunResultLike {\n meta?: { changes?: number };\n}\n\nexport interface D1PreparedStatementLike {\n bind(...values: unknown[]): D1PreparedStatementLike;\n first<T = Record<string, unknown>>(): Promise<T | null>;\n all<T = Record<string, unknown>>(): Promise<{ results: T[] }>;\n run(): Promise<D1RunResultLike>;\n}\n\nexport interface D1DatabaseLike {\n prepare(sql: string): D1PreparedStatementLike;\n /** Statements run in order inside one transaction (real D1 semantics) — deploy relies on the atomicity. */\n batch(statements: D1PreparedStatementLike[]): Promise<unknown>;\n}\n\n/**\n * Cloudflare Email Service's send_email binding (structural subset).\n *\n * `idempotencyKey` is part of the call because the send happens inside a\n * `step.do`: a step body re-runs after its fn resolved but before the\n * checkpoint committed, so a binding that drops the key mails the user twice.\n * The binding is app-supplied glue (nothing here can de-duplicate — there is\n * no state between two runs of the same step), which is why the port makes the\n * key impossible to miss rather than merely available.\n */\nexport interface EmailBindingLike {\n send(message: {\n from: EmailAddress;\n to: EmailAddress;\n replyTo?: EmailAddress;\n subject: string;\n html: string;\n /** List-Unsubscribe and List-Unsubscribe-Post, when the email has an unsubscribe link. */\n headers?: Readonly<Record<string, string>>;\n /** `${instanceId}:${nodeId}`: stable across replays and retries — drop a send whose key was already delivered. */\n idempotencyKey: string;\n }): Promise<unknown>;\n}\n\n/** Cloudflare's Workflow binding, as far as the host uses it. */\nexport type CfWorkflowBinding = Pick<WorkflowBindingLike, 'create' | 'get'>;\n\n/** How Cloudflare's `get` reports an unknown instance id. */\nconst CF_NOT_FOUND = 'instance.not_found';\n\n/**\n * The Workflow binding as the host's runtime port: `get` answers an unknown id with\n * `InstanceNotFoundError`, as the port promises, instead of Cloudflare's own error. Everything\n * else is forwarded as is.\n */\nexport function cloudflareJourneyBinding(binding: CfWorkflowBinding): WorkflowBindingLike {\n return {\n create: (options) => binding.create(options),\n async get(id) {\n try {\n return await binding.get(id);\n } catch (error) {\n if (String(error).includes(CF_NOT_FOUND)) {\n throw new InstanceNotFoundError(id, { cause: error });\n }\n throw error;\n }\n },\n };\n}\n\n/**\n * Slack on the deadline when deciding whether a thrown wait was a timeout: the\n * platform may surface the expiry a moment early, and a wait shorter than this\n * has no room to tell the two apart anyway.\n */\nexport const WAKE_TIMEOUT_TOLERANCE_MS = 5_000;\n\n/**\n * Did a wait that threw actually reach its deadline?\n *\n * CF signals a wait timeout by throwing, and so does every other failure in\n * there — a broken binding, an evicted instance, a malformed timeout. Reading\n * them all as timeouts would make an infrastructure fault indistinguishable\n * from \"the user never did it\" (the journey would take its onTimeout branch,\n * early and silently). Only the clock can tell them apart, and only against\n * the absolute deadline: measured from when the wait was parked, a replay\n * after an eviction would start the measure over and read a\n * genuine expiry as a failure.\n */\nexport function wakeExpired(deadlineMs: number, now: number): boolean {\n return now >= deadlineMs - WAKE_TIMEOUT_TOLERANCE_MS;\n}\n"],"mappings":";;;AA0DA,MAAM,eAAe;;;;;;AAOrB,SAAgB,yBAAyB,SAAiD;CACxF,OAAO;EACL,SAAS,YAAY,QAAQ,OAAO,OAAO;EAC3C,MAAM,IAAI,IAAI;GACZ,IAAI;IACF,OAAO,MAAM,QAAQ,IAAI,EAAE;GAC7B,SAAS,OAAO;IACd,IAAI,OAAO,KAAK,CAAC,CAAC,SAAS,YAAY,GACrC,MAAM,IAAI,sBAAsB,IAAI,EAAE,OAAO,MAAM,CAAC;IAEtD,MAAM;GACR;EACF;CACF;AACF;;;;;;AAOA,MAAa,4BAA4B;;;;;;;;;;;;;AAczC,SAAgB,YAAY,YAAoB,KAAsB;CACpE,OAAO,OAAO,aAAa;AAC7B"}
|
|
@@ -2,14 +2,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_store_d1 = require("../store/d1.cjs");
|
|
3
3
|
//#region src/cloudflare/d1-env.ts
|
|
4
4
|
/**
|
|
5
|
-
* The default store: D1
|
|
6
|
-
* and the runner fall back to it when no store
|
|
7
|
-
* declares `DB`
|
|
8
|
-
* PostgresJourneyStore) passes its own and may omit
|
|
5
|
+
* The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see
|
|
6
|
+
* ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store
|
|
7
|
+
* is passed, so a Worker that declares `DB` needs no wiring; one on another store (say
|
|
8
|
+
* PostgresJourneyStore) passes its own and may omit the binding entirely.
|
|
9
9
|
*/
|
|
10
10
|
function d1Store(env) {
|
|
11
|
-
if (env.DB === void 0
|
|
12
|
-
return new require_store_d1.D1JourneyStore(env.DB
|
|
11
|
+
if (env.DB === void 0) throw new Error("JourneyStore not configured: declare the DB binding for the default D1 store, or pass a store explicitly");
|
|
12
|
+
return new require_store_d1.D1JourneyStore(env.DB);
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
15
|
exports.d1Store = d1Store;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d1-env.cjs","names":["D1JourneyStore"],"sources":["../../src/cloudflare/d1-env.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"d1-env.cjs","names":["D1JourneyStore"],"sources":["../../src/cloudflare/d1-env.ts"],"sourcesContent":["import type { JourneyEnv } from '../host/platform';\nimport { D1JourneyStore } from '../store/d1';\nimport type { JourneyStore } from '../store/index';\n\n/**\n * The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see\n * ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store\n * is passed, so a Worker that declares `DB` needs no wiring; one on another store (say\n * PostgresJourneyStore) passes its own and may omit the binding entirely.\n */\nexport function d1Store(env: JourneyEnv): JourneyStore {\n if (env.DB === undefined) {\n throw new Error(\n 'JourneyStore not configured: declare the DB binding for the default D1 store, or pass a store explicitly'\n );\n }\n return new D1JourneyStore(env.DB);\n}\n"],"mappings":";;;;;;;;;AAUA,SAAgB,QAAQ,KAA+B;CACrD,IAAI,IAAI,OAAO,KAAA,GACb,MAAM,IAAI,MACR,0GACF;CAEF,OAAO,IAAIA,iBAAAA,eAAe,IAAI,EAAE;AAClC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { JourneyEnv } from "
|
|
1
|
+
import { JourneyEnv } from "../host/platform.cjs";
|
|
2
2
|
import { JourneyStore } from "../store/index.cjs";
|
|
3
3
|
//#region src/cloudflare/d1-env.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* The default store: D1
|
|
6
|
-
* and the runner fall back to it when no store
|
|
7
|
-
* declares `DB`
|
|
8
|
-
* PostgresJourneyStore) passes its own and may omit
|
|
5
|
+
* The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see
|
|
6
|
+
* ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store
|
|
7
|
+
* is passed, so a Worker that declares `DB` needs no wiring; one on another store (say
|
|
8
|
+
* PostgresJourneyStore) passes its own and may omit the binding entirely.
|
|
9
9
|
*/
|
|
10
10
|
export declare function d1Store(env: JourneyEnv): JourneyStore;
|
|
11
11
|
//#endregion
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { JourneyEnv } from "
|
|
1
|
+
import { JourneyEnv } from "../host/platform.mjs";
|
|
2
2
|
import { JourneyStore } from "../store/index.mjs";
|
|
3
3
|
//#region src/cloudflare/d1-env.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* The default store: D1
|
|
6
|
-
* and the runner fall back to it when no store
|
|
7
|
-
* declares `DB`
|
|
8
|
-
* PostgresJourneyStore) passes its own and may omit
|
|
5
|
+
* The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see
|
|
6
|
+
* ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store
|
|
7
|
+
* is passed, so a Worker that declares `DB` needs no wiring; one on another store (say
|
|
8
|
+
* PostgresJourneyStore) passes its own and may omit the binding entirely.
|
|
9
9
|
*/
|
|
10
10
|
export declare function d1Store(env: JourneyEnv): JourneyStore;
|
|
11
11
|
//#endregion
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { D1JourneyStore } from "../store/d1.mjs";
|
|
2
2
|
//#region src/cloudflare/d1-env.ts
|
|
3
3
|
/**
|
|
4
|
-
* The default store: D1
|
|
5
|
-
* and the runner fall back to it when no store
|
|
6
|
-
* declares `DB`
|
|
7
|
-
* PostgresJourneyStore) passes its own and may omit
|
|
4
|
+
* The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see
|
|
5
|
+
* ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store
|
|
6
|
+
* is passed, so a Worker that declares `DB` needs no wiring; one on another store (say
|
|
7
|
+
* PostgresJourneyStore) passes its own and may omit the binding entirely.
|
|
8
8
|
*/
|
|
9
9
|
function d1Store(env) {
|
|
10
|
-
if (env.DB === void 0
|
|
11
|
-
return new D1JourneyStore(env.DB
|
|
10
|
+
if (env.DB === void 0) throw new Error("JourneyStore not configured: declare the DB binding for the default D1 store, or pass a store explicitly");
|
|
11
|
+
return new D1JourneyStore(env.DB);
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
export { d1Store };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d1-env.mjs","names":[],"sources":["../../src/cloudflare/d1-env.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"d1-env.mjs","names":[],"sources":["../../src/cloudflare/d1-env.ts"],"sourcesContent":["import type { JourneyEnv } from '../host/platform';\nimport { D1JourneyStore } from '../store/d1';\nimport type { JourneyStore } from '../store/index';\n\n/**\n * The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see\n * ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store\n * is passed, so a Worker that declares `DB` needs no wiring; one on another store (say\n * PostgresJourneyStore) passes its own and may omit the binding entirely.\n */\nexport function d1Store(env: JourneyEnv): JourneyStore {\n if (env.DB === undefined) {\n throw new Error(\n 'JourneyStore not configured: declare the DB binding for the default D1 store, or pass a store explicitly'\n );\n }\n return new D1JourneyStore(env.DB);\n}\n"],"mappings":";;;;;;;;AAUA,SAAgB,QAAQ,KAA+B;CACrD,IAAI,IAAI,OAAO,KAAA,GACb,MAAM,IAAI,MACR,0GACF;CAEF,OAAO,IAAI,eAAe,IAAI,EAAE;AAClC"}
|
|
@@ -1,59 +1,69 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_email_sender = require("../email-sender.cjs");
|
|
3
|
+
const require_store_erasure = require("../store/erasure.cjs");
|
|
3
4
|
const require_store_postgres_reporting = require("../store/postgres-reporting.cjs");
|
|
4
5
|
const require_store_postgres = require("../store/postgres.cjs");
|
|
5
6
|
const require_store_facts = require("../store/facts.cjs");
|
|
6
|
-
const require_cloudflare_bindings = require("./bindings.cjs");
|
|
7
7
|
const require_store_d1 = require("../store/d1.cjs");
|
|
8
8
|
const require_cloudflare_d1_env = require("./d1-env.cjs");
|
|
9
|
-
const require_reporting_classify = require("../reporting/classify.cjs");
|
|
10
|
-
const require_reporting_tracking = require("../reporting/tracking.cjs");
|
|
11
9
|
const require_store_index = require("../store/index.cjs");
|
|
12
|
-
const
|
|
10
|
+
const require_host_platform = require("../host/platform.cjs");
|
|
11
|
+
const require_host_ingest = require("../host/ingest.cjs");
|
|
13
12
|
const require_reporting_observer = require("../reporting/observer.cjs");
|
|
14
13
|
const require_host_senders = require("../host/senders.cjs");
|
|
15
14
|
const require_host_channels = require("../host/channels.cjs");
|
|
15
|
+
const require_reporting_classify = require("../reporting/classify.cjs");
|
|
16
|
+
const require_reporting_tracking = require("../reporting/tracking.cjs");
|
|
17
|
+
const require_host_auth = require("../host/auth.cjs");
|
|
18
|
+
const require_host_http = require("../host/http.cjs");
|
|
16
19
|
const require_host_journey_host = require("../host/journey-host.cjs");
|
|
20
|
+
const require_cloudflare_bindings = require("./bindings.cjs");
|
|
17
21
|
const require_cloudflare_runner = require("./runner.cjs");
|
|
18
22
|
const require_cloudflare_worker = require("./worker.cjs");
|
|
19
23
|
exports.BURST_WINDOW_MS = require_reporting_classify.BURST_WINDOW_MS;
|
|
20
|
-
exports.BundleIntegrityError =
|
|
24
|
+
exports.BundleIntegrityError = require_host_ingest.BundleIntegrityError;
|
|
21
25
|
exports.D1JourneyStore = require_store_d1.D1JourneyStore;
|
|
22
26
|
exports.DEFAULT_QUICK_MS = require_reporting_classify.DEFAULT_QUICK_MS;
|
|
23
27
|
exports.EmailSender = require_email_sender.EmailSender;
|
|
24
28
|
exports.EnvValidationError = require_host_journey_host.EnvValidationError;
|
|
25
|
-
exports.InstanceNotFoundError =
|
|
29
|
+
exports.InstanceNotFoundError = require_host_platform.InstanceNotFoundError;
|
|
26
30
|
exports.JourneyFactSource = require_store_facts.JourneyFactSource;
|
|
27
31
|
exports.JourneyRunner = require_cloudflare_runner.JourneyRunner;
|
|
28
32
|
exports.LogMessageSender = require_host_senders.LogMessageSender;
|
|
29
33
|
exports.PostgresJourneyStore = require_store_postgres.PostgresJourneyStore;
|
|
30
34
|
exports.PostgresReporting = require_store_postgres_reporting.PostgresReporting;
|
|
35
|
+
exports.SWEEP_PAGE_SIZE = require_host_ingest.SWEEP_PAGE_SIZE;
|
|
31
36
|
exports.SchemaMismatchError = require_store_index.SchemaMismatchError;
|
|
32
|
-
exports.UnversionedStoreError =
|
|
33
|
-
exports.
|
|
37
|
+
exports.UnversionedStoreError = require_host_ingest.UnversionedStoreError;
|
|
38
|
+
exports.UserErasedError = require_store_erasure.UserErasedError;
|
|
39
|
+
exports.WAKE_EVENT_TYPE = require_host_platform.WAKE_EVENT_TYPE;
|
|
34
40
|
exports.WAKE_TIMEOUT_TOLERANCE_MS = require_cloudflare_bindings.WAKE_TIMEOUT_TOLERANCE_MS;
|
|
35
41
|
exports.WebhookMessageSender = require_host_senders.WebhookMessageSender;
|
|
42
|
+
exports.authorized = require_host_auth.authorized;
|
|
43
|
+
exports.bearerMatches = require_host_auth.bearerMatches;
|
|
36
44
|
exports.channelsFromConfig = require_host_channels.channelsFromConfig;
|
|
37
45
|
exports.classifyClick = require_reporting_classify.classifyClick;
|
|
38
46
|
exports.classifyOpen = require_reporting_classify.classifyOpen;
|
|
47
|
+
exports.cloudflareJourneyBinding = require_cloudflare_bindings.cloudflareJourneyBinding;
|
|
39
48
|
exports.d1Store = require_cloudflare_d1_env.d1Store;
|
|
40
|
-
exports.deployBundle =
|
|
41
|
-
exports.forgetUser =
|
|
42
|
-
exports.handleRequest =
|
|
49
|
+
exports.deployBundle = require_host_ingest.deployBundle;
|
|
50
|
+
exports.forgetUser = require_host_ingest.forgetUser;
|
|
51
|
+
exports.handleRequest = require_host_http.handleRequest;
|
|
43
52
|
exports.handleTracking = require_reporting_tracking.handleTracking;
|
|
44
|
-
exports.identifyUser =
|
|
45
|
-
exports.ingestEvent =
|
|
46
|
-
exports.isInstanceNotFound = require_cloudflare_bindings.isInstanceNotFound;
|
|
53
|
+
exports.identifyUser = require_host_ingest.identifyUser;
|
|
54
|
+
exports.ingestEvent = require_host_ingest.ingestEvent;
|
|
47
55
|
exports.journeyMode = require_host_channels.journeyMode;
|
|
48
56
|
exports.journeyWorker = require_cloudflare_worker.journeyWorker;
|
|
49
57
|
exports.recordPushOpen = require_reporting_tracking.recordPushOpen;
|
|
50
|
-
exports.registerDevice =
|
|
51
|
-
exports.removeDevice =
|
|
58
|
+
exports.registerDevice = require_host_ingest.registerDevice;
|
|
59
|
+
exports.removeDevice = require_host_ingest.removeDevice;
|
|
52
60
|
exports.reportingObserver = require_reporting_observer.reportingObserver;
|
|
53
61
|
exports.routeByChannel = require_host_senders.routeByChannel;
|
|
54
62
|
exports.routeByPlatform = require_host_senders.routeByPlatform;
|
|
55
63
|
exports.runtimeFromConfig = require_host_channels.runtimeFromConfig;
|
|
56
|
-
exports.
|
|
64
|
+
exports.sweepMaintenance = require_host_ingest.sweepMaintenance;
|
|
65
|
+
exports.sweepSegments = require_host_ingest.sweepSegments;
|
|
66
|
+
exports.sweepSegmentsPaged = require_host_ingest.sweepSegmentsPaged;
|
|
57
67
|
exports.trackEmail = require_email_sender.trackEmail;
|
|
58
|
-
exports.unbindDevice =
|
|
68
|
+
exports.unbindDevice = require_host_ingest.unbindDevice;
|
|
59
69
|
exports.wakeExpired = require_cloudflare_bindings.wakeExpired;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { JourneyObserver, LinkPurpose, MessageTracking, OutboundMessage, PushDevice, SendResult } from "../engine/ports.cjs";
|
|
2
2
|
import { EmailAddress } from "../email.cjs";
|
|
3
|
-
import {
|
|
3
|
+
import { UserErasedError } from "../store/erasure.cjs";
|
|
4
|
+
import { InstanceNotFoundError, JourneyEnv, JourneyParams, WAKE_EVENT_TYPE, WorkflowBindingLike, WorkflowInstanceLike } from "../host/platform.cjs";
|
|
5
|
+
import { D1DatabaseLike, EmailBindingLike, WAKE_TIMEOUT_TOLERANCE_MS, cloudflareJourneyBinding, wakeExpired } from "./bindings.cjs";
|
|
4
6
|
import { D1JourneyStore } from "../store/d1.cjs";
|
|
5
7
|
import { JourneyFactSource } from "../store/facts.cjs";
|
|
6
8
|
import { SqlClientLike } from "../store/sql.cjs";
|
|
@@ -8,14 +10,16 @@ import { PostgresJourneyStore, PostgresJourneyStoreOptions } from "../store/post
|
|
|
8
10
|
import { PostgresReporting } from "../store/postgres-reporting.cjs";
|
|
9
11
|
import { BundleVersion, Engagement, EntryInput, EntryOutcome, EventInput, JourneyReporting, JourneyStore, MessageRecord, ProfileProps, SchemaMismatchError, SegmentTriggerRoute, StoreLease, TriggerRoute } from "../store/index.cjs";
|
|
10
12
|
import { EmailMessage, EmailRenderer, EmailSender, EmailSenderOptions, EmailTransport, RenderedEmail, trackEmail } from "../email-sender.cjs";
|
|
11
|
-
import { BundleIntegrityError, DeployResult, DeviceRegistration, IdentifyResult, IngestInput, IngestResult, SweepResult, UnversionedStoreError, deployBundle, forgetUser,
|
|
13
|
+
import { BundleIntegrityError, DeployResult, DeviceRegistration, IdentifyResult, IngestInput, IngestResult, SWEEP_PAGE_SIZE, SweepPage, SweepResult, UnversionedStoreError, deployBundle, forgetUser, identifyUser, ingestEvent, registerDevice, removeDevice, sweepMaintenance, sweepSegments, sweepSegmentsPaged, unbindDevice } from "../host/ingest.cjs";
|
|
12
14
|
import { EnvValidationError } from "../host/journey-host.cjs";
|
|
13
15
|
import { d1Store } from "./d1-env.cjs";
|
|
16
|
+
import { TrackingOptions, handleTracking, recordPushOpen } from "../reporting/tracking.cjs";
|
|
17
|
+
import { IngestValidation, handleRequest } from "../host/http.cjs";
|
|
18
|
+
import { authorized, bearerMatches } from "../host/auth.cjs";
|
|
14
19
|
import { JourneyRunner } from "./runner.cjs";
|
|
15
20
|
import { LogMessageSender, WebhookMessageSender, routeByChannel, routeByPlatform } from "../host/senders.cjs";
|
|
16
21
|
import { ChannelsConfig, channelsFromConfig, journeyMode, runtimeFromConfig } from "../host/channels.cjs";
|
|
17
22
|
import { reportingObserver } from "../reporting/observer.cjs";
|
|
18
|
-
import { TrackingOptions, handleTracking, recordPushOpen } from "../reporting/tracking.cjs";
|
|
19
23
|
import { BURST_WINDOW_MS, ClassifyOptions, ClickFacts, DEFAULT_QUICK_MS, RequestFacts, Verdict, classifyClick, classifyOpen } from "../reporting/classify.cjs";
|
|
20
24
|
import { ExecutionContextLike, JourneyWorker, JourneyWorkerOptions, journeyWorker } from "./worker.cjs";
|
|
21
|
-
export { BURST_WINDOW_MS, BundleIntegrityError, type BundleVersion, type ChannelsConfig, type ClassifyOptions, type ClickFacts, type D1DatabaseLike, D1JourneyStore, DEFAULT_QUICK_MS, type DeployResult, type DeviceRegistration, type EmailAddress, type EmailBindingLike, type EmailMessage, type EmailRenderer, EmailSender, type EmailSenderOptions, type EmailTransport, type Engagement, type EntryInput, type EntryOutcome, EnvValidationError, type EventInput, type ExecutionContextLike, type IdentifyResult, type IngestInput, type IngestResult, InstanceNotFoundError, type JourneyEnv, JourneyFactSource, type JourneyObserver, type JourneyParams, type JourneyReporting, JourneyRunner, type JourneyStore, type JourneyWorker, type JourneyWorkerOptions, type
|
|
25
|
+
export { BURST_WINDOW_MS, BundleIntegrityError, type BundleVersion, type ChannelsConfig, type ClassifyOptions, type ClickFacts, type D1DatabaseLike, D1JourneyStore, DEFAULT_QUICK_MS, type DeployResult, type DeviceRegistration, type EmailAddress, type EmailBindingLike, type EmailMessage, type EmailRenderer, EmailSender, type EmailSenderOptions, type EmailTransport, type Engagement, type EntryInput, type EntryOutcome, EnvValidationError, type EventInput, type ExecutionContextLike, type IdentifyResult, type IngestInput, type IngestResult, type IngestValidation, InstanceNotFoundError, type JourneyEnv, JourneyFactSource, type JourneyObserver, type JourneyParams, type JourneyReporting, JourneyRunner, type JourneyStore, type JourneyWorker, type JourneyWorkerOptions, type LinkPurpose, LogMessageSender, type MessageRecord, type MessageTracking, type OutboundMessage, PostgresJourneyStore, type PostgresJourneyStoreOptions, PostgresReporting, type ProfileProps, type PushDevice, type RenderedEmail, type RequestFacts, SWEEP_PAGE_SIZE, SchemaMismatchError, type SegmentTriggerRoute, type SendResult, type SqlClientLike, type StoreLease, type SweepPage, type SweepResult, type TrackingOptions, type TriggerRoute, UnversionedStoreError, UserErasedError, type Verdict, WAKE_EVENT_TYPE, WAKE_TIMEOUT_TOLERANCE_MS, WebhookMessageSender, type WorkflowBindingLike, type WorkflowInstanceLike, authorized, bearerMatches, channelsFromConfig, classifyClick, classifyOpen, cloudflareJourneyBinding, d1Store, deployBundle, forgetUser, handleRequest, handleTracking, identifyUser, ingestEvent, journeyMode, journeyWorker, recordPushOpen, registerDevice, removeDevice, reportingObserver, routeByChannel, routeByPlatform, runtimeFromConfig, sweepMaintenance, sweepSegments, sweepSegmentsPaged, trackEmail, unbindDevice, wakeExpired };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { JourneyObserver, LinkPurpose, MessageTracking, OutboundMessage, PushDevice, SendResult } from "../engine/ports.mjs";
|
|
2
2
|
import { EmailAddress } from "../email.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { UserErasedError } from "../store/erasure.mjs";
|
|
4
|
+
import { InstanceNotFoundError, JourneyEnv, JourneyParams, WAKE_EVENT_TYPE, WorkflowBindingLike, WorkflowInstanceLike } from "../host/platform.mjs";
|
|
5
|
+
import { D1DatabaseLike, EmailBindingLike, WAKE_TIMEOUT_TOLERANCE_MS, cloudflareJourneyBinding, wakeExpired } from "./bindings.mjs";
|
|
4
6
|
import { D1JourneyStore } from "../store/d1.mjs";
|
|
5
7
|
import { JourneyFactSource } from "../store/facts.mjs";
|
|
6
8
|
import { SqlClientLike } from "../store/sql.mjs";
|
|
@@ -8,14 +10,16 @@ import { PostgresJourneyStore, PostgresJourneyStoreOptions } from "../store/post
|
|
|
8
10
|
import { PostgresReporting } from "../store/postgres-reporting.mjs";
|
|
9
11
|
import { BundleVersion, Engagement, EntryInput, EntryOutcome, EventInput, JourneyReporting, JourneyStore, MessageRecord, ProfileProps, SchemaMismatchError, SegmentTriggerRoute, StoreLease, TriggerRoute } from "../store/index.mjs";
|
|
10
12
|
import { EmailMessage, EmailRenderer, EmailSender, EmailSenderOptions, EmailTransport, RenderedEmail, trackEmail } from "../email-sender.mjs";
|
|
11
|
-
import { BundleIntegrityError, DeployResult, DeviceRegistration, IdentifyResult, IngestInput, IngestResult, SweepResult, UnversionedStoreError, deployBundle, forgetUser,
|
|
13
|
+
import { BundleIntegrityError, DeployResult, DeviceRegistration, IdentifyResult, IngestInput, IngestResult, SWEEP_PAGE_SIZE, SweepPage, SweepResult, UnversionedStoreError, deployBundle, forgetUser, identifyUser, ingestEvent, registerDevice, removeDevice, sweepMaintenance, sweepSegments, sweepSegmentsPaged, unbindDevice } from "../host/ingest.mjs";
|
|
12
14
|
import { EnvValidationError } from "../host/journey-host.mjs";
|
|
13
15
|
import { d1Store } from "./d1-env.mjs";
|
|
16
|
+
import { TrackingOptions, handleTracking, recordPushOpen } from "../reporting/tracking.mjs";
|
|
17
|
+
import { IngestValidation, handleRequest } from "../host/http.mjs";
|
|
18
|
+
import { authorized, bearerMatches } from "../host/auth.mjs";
|
|
14
19
|
import { JourneyRunner } from "./runner.mjs";
|
|
15
20
|
import { LogMessageSender, WebhookMessageSender, routeByChannel, routeByPlatform } from "../host/senders.mjs";
|
|
16
21
|
import { ChannelsConfig, channelsFromConfig, journeyMode, runtimeFromConfig } from "../host/channels.mjs";
|
|
17
22
|
import { reportingObserver } from "../reporting/observer.mjs";
|
|
18
|
-
import { TrackingOptions, handleTracking, recordPushOpen } from "../reporting/tracking.mjs";
|
|
19
23
|
import { BURST_WINDOW_MS, ClassifyOptions, ClickFacts, DEFAULT_QUICK_MS, RequestFacts, Verdict, classifyClick, classifyOpen } from "../reporting/classify.mjs";
|
|
20
24
|
import { ExecutionContextLike, JourneyWorker, JourneyWorkerOptions, journeyWorker } from "./worker.mjs";
|
|
21
|
-
export { BURST_WINDOW_MS, BundleIntegrityError, type BundleVersion, type ChannelsConfig, type ClassifyOptions, type ClickFacts, type D1DatabaseLike, D1JourneyStore, DEFAULT_QUICK_MS, type DeployResult, type DeviceRegistration, type EmailAddress, type EmailBindingLike, type EmailMessage, type EmailRenderer, EmailSender, type EmailSenderOptions, type EmailTransport, type Engagement, type EntryInput, type EntryOutcome, EnvValidationError, type EventInput, type ExecutionContextLike, type IdentifyResult, type IngestInput, type IngestResult, InstanceNotFoundError, type JourneyEnv, JourneyFactSource, type JourneyObserver, type JourneyParams, type JourneyReporting, JourneyRunner, type JourneyStore, type JourneyWorker, type JourneyWorkerOptions, type
|
|
25
|
+
export { BURST_WINDOW_MS, BundleIntegrityError, type BundleVersion, type ChannelsConfig, type ClassifyOptions, type ClickFacts, type D1DatabaseLike, D1JourneyStore, DEFAULT_QUICK_MS, type DeployResult, type DeviceRegistration, type EmailAddress, type EmailBindingLike, type EmailMessage, type EmailRenderer, EmailSender, type EmailSenderOptions, type EmailTransport, type Engagement, type EntryInput, type EntryOutcome, EnvValidationError, type EventInput, type ExecutionContextLike, type IdentifyResult, type IngestInput, type IngestResult, type IngestValidation, InstanceNotFoundError, type JourneyEnv, JourneyFactSource, type JourneyObserver, type JourneyParams, type JourneyReporting, JourneyRunner, type JourneyStore, type JourneyWorker, type JourneyWorkerOptions, type LinkPurpose, LogMessageSender, type MessageRecord, type MessageTracking, type OutboundMessage, PostgresJourneyStore, type PostgresJourneyStoreOptions, PostgresReporting, type ProfileProps, type PushDevice, type RenderedEmail, type RequestFacts, SWEEP_PAGE_SIZE, SchemaMismatchError, type SegmentTriggerRoute, type SendResult, type SqlClientLike, type StoreLease, type SweepPage, type SweepResult, type TrackingOptions, type TriggerRoute, UnversionedStoreError, UserErasedError, type Verdict, WAKE_EVENT_TYPE, WAKE_TIMEOUT_TOLERANCE_MS, WebhookMessageSender, type WorkflowBindingLike, type WorkflowInstanceLike, authorized, bearerMatches, channelsFromConfig, classifyClick, classifyOpen, cloudflareJourneyBinding, d1Store, deployBundle, forgetUser, handleRequest, handleTracking, identifyUser, ingestEvent, journeyMode, journeyWorker, recordPushOpen, registerDevice, removeDevice, reportingObserver, routeByChannel, routeByPlatform, runtimeFromConfig, sweepMaintenance, sweepSegments, sweepSegmentsPaged, trackEmail, unbindDevice, wakeExpired };
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { EmailSender, trackEmail } from "../email-sender.mjs";
|
|
2
|
+
import { UserErasedError } from "../store/erasure.mjs";
|
|
2
3
|
import { PostgresReporting } from "../store/postgres-reporting.mjs";
|
|
3
4
|
import { PostgresJourneyStore } from "../store/postgres.mjs";
|
|
4
5
|
import { JourneyFactSource } from "../store/facts.mjs";
|
|
5
|
-
import { InstanceNotFoundError, WAKE_EVENT_TYPE, WAKE_TIMEOUT_TOLERANCE_MS, isInstanceNotFound, wakeExpired } from "./bindings.mjs";
|
|
6
6
|
import { D1JourneyStore } from "../store/d1.mjs";
|
|
7
7
|
import { d1Store } from "./d1-env.mjs";
|
|
8
|
-
import { BURST_WINDOW_MS, DEFAULT_QUICK_MS, classifyClick, classifyOpen } from "../reporting/classify.mjs";
|
|
9
|
-
import { handleTracking, recordPushOpen } from "../reporting/tracking.mjs";
|
|
10
8
|
import { SchemaMismatchError } from "../store/index.mjs";
|
|
11
|
-
import {
|
|
9
|
+
import { InstanceNotFoundError, WAKE_EVENT_TYPE } from "../host/platform.mjs";
|
|
10
|
+
import { BundleIntegrityError, SWEEP_PAGE_SIZE, UnversionedStoreError, deployBundle, forgetUser, identifyUser, ingestEvent, registerDevice, removeDevice, sweepMaintenance, sweepSegments, sweepSegmentsPaged, unbindDevice } from "../host/ingest.mjs";
|
|
12
11
|
import { reportingObserver } from "../reporting/observer.mjs";
|
|
13
12
|
import { LogMessageSender, WebhookMessageSender, routeByChannel, routeByPlatform } from "../host/senders.mjs";
|
|
14
13
|
import { channelsFromConfig, journeyMode, runtimeFromConfig } from "../host/channels.mjs";
|
|
14
|
+
import { BURST_WINDOW_MS, DEFAULT_QUICK_MS, classifyClick, classifyOpen } from "../reporting/classify.mjs";
|
|
15
|
+
import { handleTracking, recordPushOpen } from "../reporting/tracking.mjs";
|
|
16
|
+
import { authorized, bearerMatches } from "../host/auth.mjs";
|
|
17
|
+
import { handleRequest } from "../host/http.mjs";
|
|
15
18
|
import { EnvValidationError } from "../host/journey-host.mjs";
|
|
19
|
+
import { WAKE_TIMEOUT_TOLERANCE_MS, cloudflareJourneyBinding, wakeExpired } from "./bindings.mjs";
|
|
16
20
|
import { JourneyRunner } from "./runner.mjs";
|
|
17
21
|
import { journeyWorker } from "./worker.mjs";
|
|
18
|
-
export { BURST_WINDOW_MS, BundleIntegrityError, D1JourneyStore, DEFAULT_QUICK_MS, EmailSender, EnvValidationError, InstanceNotFoundError, JourneyFactSource, JourneyRunner, LogMessageSender, PostgresJourneyStore, PostgresReporting, SchemaMismatchError, UnversionedStoreError, WAKE_EVENT_TYPE, WAKE_TIMEOUT_TOLERANCE_MS, WebhookMessageSender, channelsFromConfig, classifyClick, classifyOpen, d1Store, deployBundle, forgetUser, handleRequest, handleTracking, identifyUser, ingestEvent,
|
|
22
|
+
export { BURST_WINDOW_MS, BundleIntegrityError, D1JourneyStore, DEFAULT_QUICK_MS, EmailSender, EnvValidationError, InstanceNotFoundError, JourneyFactSource, JourneyRunner, LogMessageSender, PostgresJourneyStore, PostgresReporting, SWEEP_PAGE_SIZE, SchemaMismatchError, UnversionedStoreError, UserErasedError, WAKE_EVENT_TYPE, WAKE_TIMEOUT_TOLERANCE_MS, WebhookMessageSender, authorized, bearerMatches, channelsFromConfig, classifyClick, classifyOpen, cloudflareJourneyBinding, d1Store, deployBundle, forgetUser, handleRequest, handleTracking, identifyUser, ingestEvent, journeyMode, journeyWorker, recordPushOpen, registerDevice, removeDevice, reportingObserver, routeByChannel, routeByPlatform, runtimeFromConfig, sweepMaintenance, sweepSegments, sweepSegmentsPaged, trackEmail, unbindDevice, wakeExpired };
|