sendwend 0.0.0-stage → 12.7.3
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/LICENSE +21 -0
- package/README.md +2082 -2
- package/dist/_virtual/_rolldown/runtime.cjs +22 -0
- package/dist/apns-relay.cjs +91 -0
- package/dist/apns-relay.cjs.map +1 -0
- package/dist/apns-relay.d.cts +26 -0
- package/dist/apns-relay.d.cts.map +1 -0
- package/dist/apns-relay.d.mts +26 -0
- package/dist/apns-relay.d.mts.map +1 -0
- package/dist/apns-relay.mjs +90 -0
- package/dist/apns-relay.mjs.map +1 -0
- package/dist/apns.cjs +215 -0
- package/dist/apns.cjs.map +1 -0
- package/dist/apns.d.cts +110 -0
- package/dist/apns.d.cts.map +1 -0
- package/dist/apns.d.mts +110 -0
- package/dist/apns.d.mts.map +1 -0
- package/dist/apns.mjs +207 -0
- package/dist/apns.mjs.map +1 -0
- package/dist/aws/engine-step.cjs +105 -0
- package/dist/aws/engine-step.cjs.map +1 -0
- package/dist/aws/engine-step.d.cts +42 -0
- package/dist/aws/engine-step.d.cts.map +1 -0
- package/dist/aws/engine-step.d.mts +42 -0
- package/dist/aws/engine-step.d.mts.map +1 -0
- package/dist/aws/engine-step.mjs +103 -0
- package/dist/aws/engine-step.mjs.map +1 -0
- package/dist/aws/function-url.cjs +53 -0
- package/dist/aws/function-url.cjs.map +1 -0
- package/dist/aws/function-url.d.cts +36 -0
- package/dist/aws/function-url.d.cts.map +1 -0
- package/dist/aws/function-url.d.mts +36 -0
- package/dist/aws/function-url.d.mts.map +1 -0
- package/dist/aws/function-url.mjs +50 -0
- package/dist/aws/function-url.mjs.map +1 -0
- package/dist/aws/index.cjs +232 -0
- package/dist/aws/index.cjs.map +1 -0
- package/dist/aws/index.d.cts +73 -0
- package/dist/aws/index.d.cts.map +1 -0
- package/dist/aws/index.d.mts +73 -0
- package/dist/aws/index.d.mts.map +1 -0
- package/dist/aws/index.mjs +218 -0
- package/dist/aws/index.mjs.map +1 -0
- package/dist/aws/instances.cjs +218 -0
- package/dist/aws/instances.cjs.map +1 -0
- package/dist/aws/instances.d.cts +102 -0
- package/dist/aws/instances.d.cts.map +1 -0
- package/dist/aws/instances.d.mts +102 -0
- package/dist/aws/instances.d.mts.map +1 -0
- package/dist/aws/instances.mjs +214 -0
- package/dist/aws/instances.mjs.map +1 -0
- package/dist/aws/lambda-api.cjs +86 -0
- package/dist/aws/lambda-api.cjs.map +1 -0
- package/dist/aws/lambda-api.d.cts +41 -0
- package/dist/aws/lambda-api.d.cts.map +1 -0
- package/dist/aws/lambda-api.d.mts +41 -0
- package/dist/aws/lambda-api.d.mts.map +1 -0
- package/dist/aws/lambda-api.mjs +85 -0
- package/dist/aws/lambda-api.mjs.map +1 -0
- package/dist/client.cjs +216 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +193 -0
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.mts +193 -0
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +212 -0
- package/dist/client.mjs.map +1 -0
- package/dist/cloudflare/bindings.cjs +49 -0
- package/dist/cloudflare/bindings.cjs.map +1 -0
- package/dist/cloudflare/bindings.d.cts +31 -0
- package/dist/cloudflare/bindings.d.cts.map +1 -0
- package/dist/cloudflare/bindings.d.mts +31 -0
- package/dist/cloudflare/bindings.d.mts.map +1 -0
- package/dist/cloudflare/bindings.mjs +46 -0
- package/dist/cloudflare/bindings.mjs.map +1 -0
- package/dist/cloudflare/index.cjs +73 -0
- package/dist/cloudflare/index.d.cts +25 -0
- package/dist/cloudflare/index.d.mts +25 -0
- package/dist/cloudflare/index.mjs +20 -0
- package/dist/cloudflare/runner.cjs +200 -0
- package/dist/cloudflare/runner.cjs.map +1 -0
- package/dist/cloudflare/runner.d.cts +83 -0
- package/dist/cloudflare/runner.d.cts.map +1 -0
- package/dist/cloudflare/runner.d.mts +83 -0
- package/dist/cloudflare/runner.d.mts.map +1 -0
- package/dist/cloudflare/runner.mjs +199 -0
- package/dist/cloudflare/runner.mjs.map +1 -0
- package/dist/cloudflare/worker.cjs +106 -0
- package/dist/cloudflare/worker.cjs.map +1 -0
- package/dist/cloudflare/worker.d.cts +52 -0
- package/dist/cloudflare/worker.d.cts.map +1 -0
- package/dist/cloudflare/worker.d.mts +52 -0
- package/dist/cloudflare/worker.d.mts.map +1 -0
- package/dist/cloudflare/worker.mjs +104 -0
- package/dist/cloudflare/worker.mjs.map +1 -0
- package/dist/cloudflare/workers.d.cjs +0 -0
- package/dist/cloudflare/workers.d.cts +42 -0
- package/dist/cloudflare/workers.d.cts.map +1 -0
- package/dist/cloudflare/workers.d.mts +42 -0
- package/dist/cloudflare/workers.d.mts.map +1 -0
- package/dist/config.cjs +257 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +184 -0
- package/dist/config.d.cts.map +1 -0
- package/dist/config.d.mts +184 -0
- package/dist/config.d.mts.map +1 -0
- package/dist/config.mjs +246 -0
- package/dist/config.mjs.map +1 -0
- package/dist/contract.cjs +222 -0
- package/dist/contract.cjs.map +1 -0
- package/dist/contract.d.cts +110 -0
- package/dist/contract.d.cts.map +1 -0
- package/dist/contract.d.mts +110 -0
- package/dist/contract.d.mts.map +1 -0
- package/dist/contract.mjs +216 -0
- package/dist/contract.mjs.map +1 -0
- package/dist/date-time.cjs +22 -0
- package/dist/date-time.cjs.map +1 -0
- package/dist/date-time.d.cts +10 -0
- package/dist/date-time.d.cts.map +1 -0
- package/dist/date-time.d.mts +10 -0
- package/dist/date-time.d.mts.map +1 -0
- package/dist/date-time.mjs +21 -0
- package/dist/date-time.mjs.map +1 -0
- package/dist/dsl/action.cjs +25 -0
- package/dist/dsl/action.cjs.map +1 -0
- package/dist/dsl/action.d.cts +63 -0
- package/dist/dsl/action.d.cts.map +1 -0
- package/dist/dsl/action.d.mts +63 -0
- package/dist/dsl/action.d.mts.map +1 -0
- package/dist/dsl/action.mjs +24 -0
- package/dist/dsl/action.mjs.map +1 -0
- package/dist/dsl/base.cjs +33 -0
- package/dist/dsl/base.cjs.map +1 -0
- package/dist/dsl/base.d.cts +43 -0
- package/dist/dsl/base.d.cts.map +1 -0
- package/dist/dsl/base.d.mts +43 -0
- package/dist/dsl/base.d.mts.map +1 -0
- package/dist/dsl/base.mjs +29 -0
- package/dist/dsl/base.mjs.map +1 -0
- package/dist/dsl/bundle.cjs +287 -0
- package/dist/dsl/bundle.cjs.map +1 -0
- package/dist/dsl/bundle.d.cts +33 -0
- package/dist/dsl/bundle.d.cts.map +1 -0
- package/dist/dsl/bundle.d.mts +33 -0
- package/dist/dsl/bundle.d.mts.map +1 -0
- package/dist/dsl/bundle.mjs +284 -0
- package/dist/dsl/bundle.mjs.map +1 -0
- package/dist/dsl/condition.cjs +200 -0
- package/dist/dsl/condition.cjs.map +1 -0
- package/dist/dsl/condition.d.cts +151 -0
- package/dist/dsl/condition.d.cts.map +1 -0
- package/dist/dsl/condition.d.mts +151 -0
- package/dist/dsl/condition.d.mts.map +1 -0
- package/dist/dsl/condition.mjs +178 -0
- package/dist/dsl/condition.mjs.map +1 -0
- package/dist/dsl/flow.cjs +335 -0
- package/dist/dsl/flow.cjs.map +1 -0
- package/dist/dsl/flow.d.cts +278 -0
- package/dist/dsl/flow.d.cts.map +1 -0
- package/dist/dsl/flow.d.mts +278 -0
- package/dist/dsl/flow.d.mts.map +1 -0
- package/dist/dsl/flow.mjs +331 -0
- package/dist/dsl/flow.mjs.map +1 -0
- package/dist/dsl/index.cjs +37 -0
- package/dist/dsl/index.d.cts +34 -0
- package/dist/dsl/index.d.mts +34 -0
- package/dist/dsl/index.mjs +9 -0
- package/dist/dsl/refs.cjs +101 -0
- package/dist/dsl/refs.cjs.map +1 -0
- package/dist/dsl/refs.d.cts +127 -0
- package/dist/dsl/refs.d.cts.map +1 -0
- package/dist/dsl/refs.d.mts +127 -0
- package/dist/dsl/refs.d.mts.map +1 -0
- package/dist/dsl/refs.mjs +93 -0
- package/dist/dsl/refs.mjs.map +1 -0
- package/dist/dsl/template.cjs +19 -0
- package/dist/dsl/template.cjs.map +1 -0
- package/dist/dsl/template.d.cts +30 -0
- package/dist/dsl/template.d.cts.map +1 -0
- package/dist/dsl/template.d.mts +30 -0
- package/dist/dsl/template.d.mts.map +1 -0
- package/dist/dsl/template.mjs +18 -0
- package/dist/dsl/template.mjs.map +1 -0
- package/dist/dsl/trigger.cjs +53 -0
- package/dist/dsl/trigger.cjs.map +1 -0
- package/dist/dsl/trigger.d.cts +112 -0
- package/dist/dsl/trigger.d.cts.map +1 -0
- package/dist/dsl/trigger.d.mts +112 -0
- package/dist/dsl/trigger.d.mts.map +1 -0
- package/dist/dsl/trigger.mjs +52 -0
- package/dist/dsl/trigger.mjs.map +1 -0
- package/dist/dsl/workflow.cjs +143 -0
- package/dist/dsl/workflow.cjs.map +1 -0
- package/dist/dsl/workflow.d.cts +88 -0
- package/dist/dsl/workflow.d.cts.map +1 -0
- package/dist/dsl/workflow.d.mts +88 -0
- package/dist/dsl/workflow.d.mts.map +1 -0
- package/dist/dsl/workflow.mjs +142 -0
- package/dist/dsl/workflow.mjs.map +1 -0
- package/dist/email-context.cjs +28 -0
- package/dist/email-context.cjs.map +1 -0
- package/dist/email-context.d.cts +9 -0
- package/dist/email-context.d.cts.map +1 -0
- package/dist/email-context.d.mts +9 -0
- package/dist/email-context.d.mts.map +1 -0
- package/dist/email-context.mjs +26 -0
- package/dist/email-context.mjs.map +1 -0
- package/dist/email-sender.cjs +93 -0
- package/dist/email-sender.cjs.map +1 -0
- package/dist/email-sender.d.cts +88 -0
- package/dist/email-sender.d.cts.map +1 -0
- package/dist/email-sender.d.mts +88 -0
- package/dist/email-sender.d.mts.map +1 -0
- package/dist/email-sender.mjs +90 -0
- package/dist/email-sender.mjs.map +1 -0
- package/dist/email.cjs +73 -0
- package/dist/email.cjs.map +1 -0
- package/dist/email.d.cts +59 -0
- package/dist/email.d.cts.map +1 -0
- package/dist/email.d.mts +59 -0
- package/dist/email.d.mts.map +1 -0
- package/dist/email.mjs +68 -0
- package/dist/email.mjs.map +1 -0
- package/dist/engine/actions.cjs +19 -0
- package/dist/engine/actions.cjs.map +1 -0
- package/dist/engine/actions.d.cts +27 -0
- package/dist/engine/actions.d.cts.map +1 -0
- package/dist/engine/actions.d.mts +27 -0
- package/dist/engine/actions.d.mts.map +1 -0
- package/dist/engine/actions.mjs +18 -0
- package/dist/engine/actions.mjs.map +1 -0
- package/dist/engine/bucket.cjs +71 -0
- package/dist/engine/bucket.cjs.map +1 -0
- package/dist/engine/bucket.d.cts +30 -0
- package/dist/engine/bucket.d.cts.map +1 -0
- package/dist/engine/bucket.d.mts +30 -0
- package/dist/engine/bucket.d.mts.map +1 -0
- package/dist/engine/bucket.mjs +68 -0
- package/dist/engine/bucket.mjs.map +1 -0
- package/dist/engine/condition.cjs +199 -0
- package/dist/engine/condition.cjs.map +1 -0
- package/dist/engine/condition.d.cts +76 -0
- package/dist/engine/condition.d.cts.map +1 -0
- package/dist/engine/condition.d.mts +76 -0
- package/dist/engine/condition.d.mts.map +1 -0
- package/dist/engine/condition.mjs +192 -0
- package/dist/engine/condition.mjs.map +1 -0
- package/dist/engine/duration.cjs +33 -0
- package/dist/engine/duration.cjs.map +1 -0
- package/dist/engine/duration.d.cts +3 -0
- package/dist/engine/duration.d.cts.map +1 -0
- package/dist/engine/duration.d.mts +3 -0
- package/dist/engine/duration.d.mts.map +1 -0
- package/dist/engine/duration.mjs +32 -0
- package/dist/engine/duration.mjs.map +1 -0
- package/dist/engine/index.cjs +33 -0
- package/dist/engine/index.d.cts +10 -0
- package/dist/engine/index.d.mts +10 -0
- package/dist/engine/index.mjs +9 -0
- package/dist/engine/interpreter.cjs +613 -0
- package/dist/engine/interpreter.cjs.map +1 -0
- package/dist/engine/interpreter.d.cts +4 -0
- package/dist/engine/interpreter.d.cts.map +1 -0
- package/dist/engine/interpreter.d.mts +4 -0
- package/dist/engine/interpreter.d.mts.map +1 -0
- package/dist/engine/interpreter.mjs +612 -0
- package/dist/engine/interpreter.mjs.map +1 -0
- package/dist/engine/ports.cjs +0 -0
- package/dist/engine/ports.d.cts +373 -0
- package/dist/engine/ports.d.cts.map +1 -0
- package/dist/engine/ports.d.mts +373 -0
- package/dist/engine/ports.d.mts.map +1 -0
- package/dist/engine/ports.mjs +1 -0
- package/dist/engine/recipient.cjs +22 -0
- package/dist/engine/recipient.cjs.map +1 -0
- package/dist/engine/recipient.d.cts +11 -0
- package/dist/engine/recipient.d.cts.map +1 -0
- package/dist/engine/recipient.d.mts +11 -0
- package/dist/engine/recipient.d.mts.map +1 -0
- package/dist/engine/recipient.mjs +21 -0
- package/dist/engine/recipient.mjs.map +1 -0
- package/dist/engine/retry.cjs +106 -0
- package/dist/engine/retry.cjs.map +1 -0
- package/dist/engine/retry.d.cts +73 -0
- package/dist/engine/retry.d.cts.map +1 -0
- package/dist/engine/retry.d.mts +73 -0
- package/dist/engine/retry.d.mts.map +1 -0
- package/dist/engine/retry.mjs +98 -0
- package/dist/engine/retry.mjs.map +1 -0
- package/dist/engine/time-scale.cjs +153 -0
- package/dist/engine/time-scale.cjs.map +1 -0
- package/dist/engine/time-scale.d.cts +41 -0
- package/dist/engine/time-scale.d.cts.map +1 -0
- package/dist/engine/time-scale.d.mts +41 -0
- package/dist/engine/time-scale.d.mts.map +1 -0
- package/dist/engine/time-scale.mjs +150 -0
- package/dist/engine/time-scale.mjs.map +1 -0
- package/dist/engine/time-window.cjs +148 -0
- package/dist/engine/time-window.cjs.map +1 -0
- package/dist/engine/time-window.d.cts +20 -0
- package/dist/engine/time-window.d.cts.map +1 -0
- package/dist/engine/time-window.d.mts +20 -0
- package/dist/engine/time-window.d.mts.map +1 -0
- package/dist/engine/time-window.mjs +146 -0
- package/dist/engine/time-window.mjs.map +1 -0
- package/dist/fcm.cjs +208 -0
- package/dist/fcm.cjs.map +1 -0
- package/dist/fcm.d.cts +89 -0
- package/dist/fcm.d.cts.map +1 -0
- package/dist/fcm.d.mts +89 -0
- package/dist/fcm.d.mts.map +1 -0
- package/dist/fcm.mjs +202 -0
- package/dist/fcm.mjs.map +1 -0
- package/dist/hash.cjs +244 -0
- package/dist/hash.cjs.map +1 -0
- package/dist/hash.d.cts +28 -0
- package/dist/hash.d.cts.map +1 -0
- package/dist/hash.d.mts +28 -0
- package/dist/hash.d.mts.map +1 -0
- package/dist/hash.mjs +238 -0
- package/dist/hash.mjs.map +1 -0
- package/dist/host/auth.cjs +48 -0
- package/dist/host/auth.cjs.map +1 -0
- package/dist/host/auth.d.cts +33 -0
- package/dist/host/auth.d.cts.map +1 -0
- package/dist/host/auth.d.mts +33 -0
- package/dist/host/auth.d.mts.map +1 -0
- package/dist/host/auth.mjs +45 -0
- package/dist/host/auth.mjs.map +1 -0
- package/dist/host/batch.cjs +178 -0
- package/dist/host/batch.cjs.map +1 -0
- package/dist/host/batch.d.cts +92 -0
- package/dist/host/batch.d.cts.map +1 -0
- package/dist/host/batch.d.mts +92 -0
- package/dist/host/batch.d.mts.map +1 -0
- package/dist/host/batch.mjs +169 -0
- package/dist/host/batch.mjs.map +1 -0
- package/dist/host/channels.cjs +256 -0
- package/dist/host/channels.cjs.map +1 -0
- package/dist/host/channels.d.cts +66 -0
- package/dist/host/channels.d.cts.map +1 -0
- package/dist/host/channels.d.mts +66 -0
- package/dist/host/channels.d.mts.map +1 -0
- package/dist/host/channels.mjs +252 -0
- package/dist/host/channels.mjs.map +1 -0
- package/dist/host/execute.cjs +102 -0
- package/dist/host/execute.cjs.map +1 -0
- package/dist/host/execute.d.cts +38 -0
- package/dist/host/execute.d.cts.map +1 -0
- package/dist/host/execute.d.mts +38 -0
- package/dist/host/execute.d.mts.map +1 -0
- package/dist/host/execute.mjs +101 -0
- package/dist/host/execute.mjs.map +1 -0
- package/dist/host/fresh-read.cjs +29 -0
- package/dist/host/fresh-read.cjs.map +1 -0
- package/dist/host/fresh-read.d.cts +16 -0
- package/dist/host/fresh-read.d.cts.map +1 -0
- package/dist/host/fresh-read.d.mts +16 -0
- package/dist/host/fresh-read.d.mts.map +1 -0
- package/dist/host/fresh-read.mjs +28 -0
- package/dist/host/fresh-read.mjs.map +1 -0
- package/dist/host/http.cjs +393 -0
- package/dist/host/http.cjs.map +1 -0
- package/dist/host/http.d.cts +61 -0
- package/dist/host/http.d.cts.map +1 -0
- package/dist/host/http.d.mts +61 -0
- package/dist/host/http.d.mts.map +1 -0
- package/dist/host/http.mjs +389 -0
- package/dist/host/http.mjs.map +1 -0
- package/dist/host/ingest.cjs +1210 -0
- package/dist/host/ingest.cjs.map +1 -0
- package/dist/host/ingest.d.cts +497 -0
- package/dist/host/ingest.d.cts.map +1 -0
- package/dist/host/ingest.d.mts +497 -0
- package/dist/host/ingest.d.mts.map +1 -0
- package/dist/host/ingest.mjs +1172 -0
- package/dist/host/ingest.mjs.map +1 -0
- package/dist/host/journey-host.cjs +223 -0
- package/dist/host/journey-host.cjs.map +1 -0
- package/dist/host/journey-host.d.cts +118 -0
- package/dist/host/journey-host.d.cts.map +1 -0
- package/dist/host/journey-host.d.mts +118 -0
- package/dist/host/journey-host.d.mts.map +1 -0
- package/dist/host/journey-host.mjs +219 -0
- package/dist/host/journey-host.mjs.map +1 -0
- package/dist/host/platform.cjs +20 -0
- package/dist/host/platform.cjs.map +1 -0
- package/dist/host/platform.d.cts +120 -0
- package/dist/host/platform.d.cts.map +1 -0
- package/dist/host/platform.d.mts +120 -0
- package/dist/host/platform.d.mts.map +1 -0
- package/dist/host/platform.mjs +18 -0
- package/dist/host/platform.mjs.map +1 -0
- package/dist/host/senders.cjs +71 -0
- package/dist/host/senders.cjs.map +1 -0
- package/dist/host/senders.d.cts +34 -0
- package/dist/host/senders.d.cts.map +1 -0
- package/dist/host/senders.d.mts +34 -0
- package/dist/host/senders.d.mts.map +1 -0
- package/dist/host/senders.mjs +67 -0
- package/dist/host/senders.mjs.map +1 -0
- package/dist/host/workflow-cache.cjs +47 -0
- package/dist/host/workflow-cache.cjs.map +1 -0
- package/dist/host/workflow-cache.d.cts +21 -0
- package/dist/host/workflow-cache.d.cts.map +1 -0
- package/dist/host/workflow-cache.d.mts +21 -0
- package/dist/host/workflow-cache.d.mts.map +1 -0
- package/dist/host/workflow-cache.mjs +46 -0
- package/dist/host/workflow-cache.mjs.map +1 -0
- package/dist/http2-client.cjs +89 -0
- package/dist/http2-client.cjs.map +1 -0
- package/dist/http2-client.d.cts +45 -0
- package/dist/http2-client.d.cts.map +1 -0
- package/dist/http2-client.d.mts +45 -0
- package/dist/http2-client.d.mts.map +1 -0
- package/dist/http2-client.mjs +87 -0
- package/dist/http2-client.mjs.map +1 -0
- package/dist/index.cjs +130 -0
- package/dist/index.d.cts +21 -0
- package/dist/index.d.mts +21 -0
- package/dist/index.mjs +20 -0
- package/dist/inflight.cjs +116 -0
- package/dist/inflight.cjs.map +1 -0
- package/dist/inflight.d.cts +49 -0
- package/dist/inflight.d.cts.map +1 -0
- package/dist/inflight.d.mts +49 -0
- package/dist/inflight.d.mts.map +1 -0
- package/dist/inflight.mjs +113 -0
- package/dist/inflight.mjs.map +1 -0
- package/dist/ir.cjs +429 -0
- package/dist/ir.cjs.map +1 -0
- package/dist/ir.d.cts +593 -0
- package/dist/ir.d.cts.map +1 -0
- package/dist/ir.d.mts +593 -0
- package/dist/ir.d.mts.map +1 -0
- package/dist/ir.mjs +404 -0
- package/dist/ir.mjs.map +1 -0
- package/dist/jwt.cjs +17 -0
- package/dist/jwt.cjs.map +1 -0
- package/dist/jwt.d.cts +7 -0
- package/dist/jwt.d.cts.map +1 -0
- package/dist/jwt.d.mts +7 -0
- package/dist/jwt.d.mts.map +1 -0
- package/dist/jwt.mjs +15 -0
- package/dist/jwt.mjs.map +1 -0
- package/dist/node/index.cjs +231 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +59 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.d.mts +59 -0
- package/dist/node/index.d.mts.map +1 -0
- package/dist/node/index.mjs +225 -0
- package/dist/node/index.mjs.map +1 -0
- package/dist/node/runs.cjs +222 -0
- package/dist/node/runs.cjs.map +1 -0
- package/dist/node/runs.d.cts +93 -0
- package/dist/node/runs.d.cts.map +1 -0
- package/dist/node/runs.d.mts +93 -0
- package/dist/node/runs.d.mts.map +1 -0
- package/dist/node/runs.mjs +221 -0
- package/dist/node/runs.mjs.map +1 -0
- package/dist/node/runtime.cjs +351 -0
- package/dist/node/runtime.cjs.map +1 -0
- package/dist/node/runtime.d.cts +96 -0
- package/dist/node/runtime.d.cts.map +1 -0
- package/dist/node/runtime.d.mts +96 -0
- package/dist/node/runtime.d.mts.map +1 -0
- package/dist/node/runtime.mjs +348 -0
- package/dist/node/runtime.mjs.map +1 -0
- package/dist/plan.cjs +221 -0
- package/dist/plan.cjs.map +1 -0
- package/dist/plan.d.cts +68 -0
- package/dist/plan.d.cts.map +1 -0
- package/dist/plan.d.mts +68 -0
- package/dist/plan.d.mts.map +1 -0
- package/dist/plan.mjs +218 -0
- package/dist/plan.mjs.map +1 -0
- package/dist/postgres-js.cjs +51 -0
- package/dist/postgres-js.cjs.map +1 -0
- package/dist/postgres-js.d.cts +32 -0
- package/dist/postgres-js.d.cts.map +1 -0
- package/dist/postgres-js.d.mts +32 -0
- package/dist/postgres-js.d.mts.map +1 -0
- package/dist/postgres-js.mjs +46 -0
- package/dist/postgres-js.mjs.map +1 -0
- package/dist/provenance.cjs +66 -0
- package/dist/provenance.cjs.map +1 -0
- package/dist/provenance.d.cts +40 -0
- package/dist/provenance.d.cts.map +1 -0
- package/dist/provenance.d.mts +40 -0
- package/dist/provenance.d.mts.map +1 -0
- package/dist/provenance.mjs +64 -0
- package/dist/provenance.mjs.map +1 -0
- package/dist/push.cjs +11 -0
- package/dist/push.cjs.map +1 -0
- package/dist/push.d.cts +14 -0
- package/dist/push.d.cts.map +1 -0
- package/dist/push.d.mts +14 -0
- package/dist/push.d.mts.map +1 -0
- package/dist/push.mjs +10 -0
- package/dist/push.mjs.map +1 -0
- package/dist/react-email.cjs +56 -0
- package/dist/react-email.cjs.map +1 -0
- package/dist/react-email.d.cts +5 -0
- package/dist/react-email.d.cts.map +1 -0
- package/dist/react-email.d.mts +5 -0
- package/dist/react-email.d.mts.map +1 -0
- package/dist/react-email.mjs +55 -0
- package/dist/react-email.mjs.map +1 -0
- package/dist/reporting/classify.cjs +46 -0
- package/dist/reporting/classify.cjs.map +1 -0
- package/dist/reporting/classify.d.cts +65 -0
- package/dist/reporting/classify.d.cts.map +1 -0
- package/dist/reporting/classify.d.mts +65 -0
- package/dist/reporting/classify.d.mts.map +1 -0
- package/dist/reporting/classify.mjs +42 -0
- package/dist/reporting/classify.mjs.map +1 -0
- package/dist/reporting/observer.cjs +137 -0
- package/dist/reporting/observer.cjs.map +1 -0
- package/dist/reporting/observer.d.cts +31 -0
- package/dist/reporting/observer.d.cts.map +1 -0
- package/dist/reporting/observer.d.mts +31 -0
- package/dist/reporting/observer.d.mts.map +1 -0
- package/dist/reporting/observer.mjs +134 -0
- package/dist/reporting/observer.mjs.map +1 -0
- package/dist/reporting/tracking.cjs +185 -0
- package/dist/reporting/tracking.cjs.map +1 -0
- package/dist/reporting/tracking.d.cts +63 -0
- package/dist/reporting/tracking.d.cts.map +1 -0
- package/dist/reporting/tracking.d.mts +63 -0
- package/dist/reporting/tracking.d.mts.map +1 -0
- package/dist/reporting/tracking.mjs +182 -0
- package/dist/reporting/tracking.mjs.map +1 -0
- package/dist/runtime.cjs +18 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.d.cts +44 -0
- package/dist/runtime.d.cts.map +1 -0
- package/dist/runtime.d.mts +44 -0
- package/dist/runtime.d.mts.map +1 -0
- package/dist/runtime.mjs +17 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/store/condition-sql.cjs +145 -0
- package/dist/store/condition-sql.cjs.map +1 -0
- package/dist/store/condition-sql.d.cts +38 -0
- package/dist/store/condition-sql.d.cts.map +1 -0
- package/dist/store/condition-sql.d.mts +38 -0
- package/dist/store/condition-sql.d.mts.map +1 -0
- package/dist/store/condition-sql.mjs +144 -0
- package/dist/store/condition-sql.mjs.map +1 -0
- package/dist/store/erasure.cjs +21 -0
- package/dist/store/erasure.cjs.map +1 -0
- package/dist/store/erasure.d.cts +16 -0
- package/dist/store/erasure.d.cts.map +1 -0
- package/dist/store/erasure.d.mts +16 -0
- package/dist/store/erasure.d.mts.map +1 -0
- package/dist/store/erasure.mjs +20 -0
- package/dist/store/erasure.mjs.map +1 -0
- package/dist/store/facts.cjs +79 -0
- package/dist/store/facts.cjs.map +1 -0
- package/dist/store/facts.d.cts +41 -0
- package/dist/store/facts.d.cts.map +1 -0
- package/dist/store/facts.d.mts +41 -0
- package/dist/store/facts.d.mts.map +1 -0
- package/dist/store/facts.mjs +77 -0
- package/dist/store/facts.mjs.map +1 -0
- package/dist/store/identity.cjs +34 -0
- package/dist/store/identity.cjs.map +1 -0
- package/dist/store/identity.d.cts +13 -0
- package/dist/store/identity.d.cts.map +1 -0
- package/dist/store/identity.d.mts +13 -0
- package/dist/store/identity.d.mts.map +1 -0
- package/dist/store/identity.mjs +30 -0
- package/dist/store/identity.mjs.map +1 -0
- package/dist/store/index.cjs +35 -0
- package/dist/store/index.cjs.map +1 -0
- package/dist/store/index.d.cts +766 -0
- package/dist/store/index.d.cts.map +1 -0
- package/dist/store/index.d.mts +766 -0
- package/dist/store/index.d.mts.map +1 -0
- package/dist/store/index.mjs +22 -0
- package/dist/store/index.mjs.map +1 -0
- package/dist/store/postgres-reporting.cjs +327 -0
- package/dist/store/postgres-reporting.cjs.map +1 -0
- package/dist/store/postgres-reporting.d.cts +95 -0
- package/dist/store/postgres-reporting.d.cts.map +1 -0
- package/dist/store/postgres-reporting.d.mts +95 -0
- package/dist/store/postgres-reporting.d.mts.map +1 -0
- package/dist/store/postgres-reporting.mjs +326 -0
- package/dist/store/postgres-reporting.mjs.map +1 -0
- package/dist/store/postgres.cjs +1173 -0
- package/dist/store/postgres.cjs.map +1 -0
- package/dist/store/postgres.d.cts +199 -0
- package/dist/store/postgres.d.cts.map +1 -0
- package/dist/store/postgres.d.mts +199 -0
- package/dist/store/postgres.d.mts.map +1 -0
- package/dist/store/postgres.mjs +1170 -0
- package/dist/store/postgres.mjs.map +1 -0
- package/dist/store/sql.cjs +24 -0
- package/dist/store/sql.cjs.map +1 -0
- package/dist/store/sql.d.cts +26 -0
- package/dist/store/sql.d.cts.map +1 -0
- package/dist/store/sql.d.mts +26 -0
- package/dist/store/sql.d.mts.map +1 -0
- package/dist/store/sql.mjs +23 -0
- package/dist/store/sql.mjs.map +1 -0
- package/dist/store/tables.cjs +660 -0
- package/dist/store/tables.cjs.map +1 -0
- package/dist/store/tables.d.cts +103 -0
- package/dist/store/tables.d.cts.map +1 -0
- package/dist/store/tables.d.mts +103 -0
- package/dist/store/tables.d.mts.map +1 -0
- package/dist/store/tables.mjs +653 -0
- package/dist/store/tables.mjs.map +1 -0
- package/dist/store/user-lock.cjs +42 -0
- package/dist/store/user-lock.cjs.map +1 -0
- package/dist/store/user-lock.d.cts +30 -0
- package/dist/store/user-lock.d.cts.map +1 -0
- package/dist/store/user-lock.d.mts +30 -0
- package/dist/store/user-lock.d.mts.map +1 -0
- package/dist/store/user-lock.mjs +39 -0
- package/dist/store/user-lock.mjs.map +1 -0
- package/dist/template-rules.cjs +94 -0
- package/dist/template-rules.cjs.map +1 -0
- package/dist/template-rules.d.cts +80 -0
- package/dist/template-rules.d.cts.map +1 -0
- package/dist/template-rules.d.mts +80 -0
- package/dist/template-rules.d.mts.map +1 -0
- package/dist/template-rules.mjs +86 -0
- package/dist/template-rules.mjs.map +1 -0
- package/dist/templates.cjs +375 -0
- package/dist/templates.cjs.map +1 -0
- package/dist/templates.d.cts +358 -0
- package/dist/templates.d.cts.map +1 -0
- package/dist/templates.d.mts +358 -0
- package/dist/templates.d.mts.map +1 -0
- package/dist/templates.mjs +353 -0
- package/dist/templates.mjs.map +1 -0
- package/dist/transports/cloudflare-email.cjs +69 -0
- package/dist/transports/cloudflare-email.cjs.map +1 -0
- package/dist/transports/cloudflare-email.d.cts +63 -0
- package/dist/transports/cloudflare-email.d.cts.map +1 -0
- package/dist/transports/cloudflare-email.d.mts +63 -0
- package/dist/transports/cloudflare-email.d.mts.map +1 -0
- package/dist/transports/cloudflare-email.mjs +67 -0
- package/dist/transports/cloudflare-email.mjs.map +1 -0
- package/dist/transports/ses.cjs +142 -0
- package/dist/transports/ses.cjs.map +1 -0
- package/dist/transports/ses.d.cts +49 -0
- package/dist/transports/ses.d.cts.map +1 -0
- package/dist/transports/ses.d.mts +49 -0
- package/dist/transports/ses.d.mts.map +1 -0
- package/dist/transports/ses.mjs +139 -0
- package/dist/transports/ses.mjs.map +1 -0
- package/dist/transports/sigv4.cjs +86 -0
- package/dist/transports/sigv4.cjs.map +1 -0
- package/dist/transports/sigv4.d.cts +25 -0
- package/dist/transports/sigv4.d.cts.map +1 -0
- package/dist/transports/sigv4.d.mts +25 -0
- package/dist/transports/sigv4.d.mts.map +1 -0
- package/dist/transports/sigv4.mjs +85 -0
- package/dist/transports/sigv4.mjs.map +1 -0
- package/dist/webhooks.cjs +97 -0
- package/dist/webhooks.cjs.map +1 -0
- package/dist/webhooks.d.cts +23 -0
- package/dist/webhooks.d.cts.map +1 -0
- package/dist/webhooks.d.mts +23 -0
- package/dist/webhooks.d.mts.map +1 -0
- package/dist/webhooks.mjs +95 -0
- package/dist/webhooks.mjs.map +1 -0
- package/dist/webpush.cjs +361 -0
- package/dist/webpush.cjs.map +1 -0
- package/dist/webpush.d.cts +135 -0
- package/dist/webpush.d.cts.map +1 -0
- package/dist/webpush.d.mts +135 -0
- package/dist/webpush.d.mts.map +1 -0
- package/dist/webpush.mjs +350 -0
- package/dist/webpush.mjs.map +1 -0
- package/package.json +279 -3
- package/src/cloudflare/workers.d.ts +44 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { PushDevice } from "../engine/ports.mjs";
|
|
2
|
+
import { BundleIR, ConditionIR, WorkflowIR } from "../ir.mjs";
|
|
3
|
+
import { ErasureState } from "./erasure.mjs";
|
|
4
|
+
import { AdmittedEntry, BundleVersion, DateCandidate, DeviceInput, DueDateTrigger, EntryInput, EntryOutcome, EntryState, EventCursor, EventInput, EventWindow, ExecutionRegistry, JourneyReporting, JourneyStore, ProfileProps, RunningInstance, RunningPin, SeedingSegment, SegmentCandidate, SegmentTriggerRoute, SuppressionChange, SweepPass, TriggerRoute, UnadmittedEntry, VisitorMerge } from "./index.mjs";
|
|
5
|
+
import { SqlClientLike, uuidv7 } from "./sql.mjs";
|
|
6
|
+
import { DEFAULT_SCHEMA } from "./tables.mjs";
|
|
7
|
+
export interface PostgresJourneyStoreOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The Postgres schema the engine's tables live in — `workflow` by default, the config's
|
|
10
|
+
* `database.schema` under journeyWorker. A schema of its own keeps the tables apart from the
|
|
11
|
+
* app's. The host creates them with its own migrations, from the drizzle file
|
|
12
|
+
* `renderDrizzleSchema` generates (or the plain `renderPostgresDdl`).
|
|
13
|
+
*/
|
|
14
|
+
schema?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The journey data plane on Postgres: native types where Postgres has them
|
|
18
|
+
* (jsonb, timestamptz), and the concurrency guarantees come from the database: the user lock for the entry ledger, ON CONFLICT for
|
|
19
|
+
* idempotent subscriptions, a transaction for the route swap, a jsonb merge
|
|
20
|
+
* for /identify. The tables are declared in tables.ts.
|
|
21
|
+
*
|
|
22
|
+
* Every write about a user is conditional on their erasure tombstone not existing
|
|
23
|
+
* (`INSERT ... SELECT ... WHERE NOT EXISTS`, see `notErased`), and runs in a transaction that
|
|
24
|
+
* holds the user's advisory lock (`lockUser`, the protocol in user-lock.ts): an event, a
|
|
25
|
+
* profile merge, a device, a subscription, a segment membership with its starts, an entry, an
|
|
26
|
+
* admission, and the reporting's instance and message rows (postgres-reporting.ts). The
|
|
27
|
+
* erasure's two steps, `requestErasure` and `forgetUser`, take the same lock. Under READ
|
|
28
|
+
* COMMITTED a conditional write sees only what was committed when its statement began, and an
|
|
29
|
+
* erasure sees only rows committed when it looked — so without the lock a write's transaction
|
|
30
|
+
* could commit its rows after the erase deleted everything (the user comes back), and a runner
|
|
31
|
+
* could admit itself after the tombstone (the instance runs on). With it, every write and the
|
|
32
|
+
* erasure of one user run one after another: a write either commits before the tombstone,
|
|
33
|
+
* where the erasure finds and deletes it, or waits for the lock, reads the tombstone and is
|
|
34
|
+
* refused (`UserErasedError`). Nothing lands after the erase, so there is no second pass. The
|
|
35
|
+
* conditional statement stays the in-transaction check; a write that wrote nothing reads the
|
|
36
|
+
* tombstone on that path only, to tell a refusal from a plain no-op (`refuseIfErased`).
|
|
37
|
+
* Suppressions are the one exception: an opt-out is written whatever the user's state.
|
|
38
|
+
*/
|
|
39
|
+
export declare class PostgresJourneyStore implements JourneyStore {
|
|
40
|
+
private readonly sql;
|
|
41
|
+
private readonly t;
|
|
42
|
+
private readonly schema;
|
|
43
|
+
readonly reporting: JourneyReporting;
|
|
44
|
+
readonly executions: ExecutionRegistry;
|
|
45
|
+
constructor(sql: SqlClientLike, options?: PostgresJourneyStoreOptions);
|
|
46
|
+
/**
|
|
47
|
+
* What the live database lacks against tables.ts: missing tables, missing columns, a column
|
|
48
|
+
* of another type or nullability, and missing unique indexes (the store's ON CONFLICT targets
|
|
49
|
+
* — without one the first ingest fails, not the deploy). Read-only — the engine never migrates
|
|
50
|
+
* the host's database; a deploy fails with these problems listed, and the fix is to regenerate
|
|
51
|
+
* the drizzle file and run the host's migrations.
|
|
52
|
+
*/
|
|
53
|
+
checkSchema(): Promise<string[]>;
|
|
54
|
+
insertEvent(input: EventInput): Promise<boolean>;
|
|
55
|
+
storedEvent(userId: string, id: string): Promise<{
|
|
56
|
+
event: string;
|
|
57
|
+
ts: number;
|
|
58
|
+
payload: Record<string, unknown>;
|
|
59
|
+
} | undefined>;
|
|
60
|
+
/** The condition every write about a user carries: no erasure tombstone for `$user`. */
|
|
61
|
+
private notErased;
|
|
62
|
+
/**
|
|
63
|
+
* A conditional write wrote nothing: on that path only, read why. Throws when the tombstone
|
|
64
|
+
* refused it; returns when the statement had another reason (a duplicate, an entry taken).
|
|
65
|
+
*/
|
|
66
|
+
private refuseIfErased;
|
|
67
|
+
/**
|
|
68
|
+
* The first two statements of every transaction that writes about the user (user-lock.ts):
|
|
69
|
+
* READ COMMITTED, then the user's advisory lock, held until the transaction ends. Any read
|
|
70
|
+
* about the user comes after, on a snapshot taken once the lock is held.
|
|
71
|
+
*/
|
|
72
|
+
private lockUser;
|
|
73
|
+
/** The event rows of one user and name, within the window's bounds (both inclusive). */
|
|
74
|
+
private eventWindow;
|
|
75
|
+
countEvents(userId: string, event: string, window?: EventWindow, atLeast?: number): Promise<number>;
|
|
76
|
+
pageEventPayloads(userId: string, event: string, window: EventWindow | undefined, page: {
|
|
77
|
+
limit: number;
|
|
78
|
+
after?: EventCursor | undefined;
|
|
79
|
+
}): Promise<{
|
|
80
|
+
payloads: Record<string, unknown>[];
|
|
81
|
+
next?: EventCursor | undefined;
|
|
82
|
+
}>;
|
|
83
|
+
getProfile(userId: string): Promise<ProfileProps | undefined>;
|
|
84
|
+
mergeProfile(userId: string, props: ProfileProps, at?: number): Promise<ProfileProps>;
|
|
85
|
+
listSegmentCandidates(page: {
|
|
86
|
+
segments: readonly {
|
|
87
|
+
id: string;
|
|
88
|
+
condition: ConditionIR;
|
|
89
|
+
}[];
|
|
90
|
+
now: number;
|
|
91
|
+
after?: string | undefined;
|
|
92
|
+
limit: number;
|
|
93
|
+
}): Promise<SegmentCandidate[]>;
|
|
94
|
+
listDateCandidates(page: {
|
|
95
|
+
filter?: ConditionIR | undefined;
|
|
96
|
+
now: number;
|
|
97
|
+
after?: string | undefined;
|
|
98
|
+
limit: number;
|
|
99
|
+
}): Promise<DateCandidate[]>;
|
|
100
|
+
listDevices(subject: string): Promise<PushDevice[]>;
|
|
101
|
+
upsertDevice(device: DeviceInput): Promise<string[]>;
|
|
102
|
+
linkedUser(visitorId: string): Promise<string | undefined>;
|
|
103
|
+
touchVisitor(visitorId: string, at: number): Promise<string>;
|
|
104
|
+
pruneVisitors(before: number, limit: number): Promise<number>;
|
|
105
|
+
entryOwner(instanceId: string): Promise<string | undefined>;
|
|
106
|
+
linkVisitor(visitorId: string, userId: string, at: number): Promise<VisitorMerge | null>;
|
|
107
|
+
/**
|
|
108
|
+
* The visitor's properties under the user's, a key the user has a time for going to the later
|
|
109
|
+
* write, one a row older than the times going to the user if they hold it. The visitor's row
|
|
110
|
+
* goes. Answers the keys that moved.
|
|
111
|
+
*/
|
|
112
|
+
private mergeProfileInto;
|
|
113
|
+
requestErasure(userId: string, at: number): Promise<void>;
|
|
114
|
+
pendingErasures(): Promise<string[]>;
|
|
115
|
+
erasureState(userId: string): Promise<ErasureState>;
|
|
116
|
+
runningInstances(userId: string): Promise<RunningInstance[]>;
|
|
117
|
+
admitInstance(instanceId: string, userId: string): Promise<boolean>;
|
|
118
|
+
forgetUser(userId: string, at: number): Promise<void>;
|
|
119
|
+
/** Everything kept about a user or visitor, on a transaction holding their lock. */
|
|
120
|
+
private deleteSubjectRows;
|
|
121
|
+
isSuppressed(userId: string, channel: string, topic?: string): Promise<boolean>;
|
|
122
|
+
listSuppressions(userId: string, channel: string): Promise<(string | null)[]>;
|
|
123
|
+
updateSuppressions(userId: string, channel: string, changes: readonly SuppressionChange[], at: number): Promise<void>;
|
|
124
|
+
removeDevice(token: string): Promise<string | undefined>;
|
|
125
|
+
unbindDevice(token: string): Promise<string | undefined>;
|
|
126
|
+
listSegments(): Promise<{
|
|
127
|
+
id: string;
|
|
128
|
+
condition: ConditionIR;
|
|
129
|
+
}[]>;
|
|
130
|
+
seedingSegments(): Promise<SeedingSegment[]>;
|
|
131
|
+
finishSeeding(segments: readonly SeedingSegment[]): Promise<void>;
|
|
132
|
+
openSweepPass(now: number): Promise<SweepPass>;
|
|
133
|
+
advanceSweepPass(pass: SweepPass, progress: {
|
|
134
|
+
after: string;
|
|
135
|
+
evaluated: number;
|
|
136
|
+
}): Promise<boolean>;
|
|
137
|
+
finishSweepPass(pass: SweepPass): Promise<boolean>;
|
|
138
|
+
getSegmentCondition(id: string): Promise<ConditionIR | undefined>;
|
|
139
|
+
findTriggers(event: string): Promise<TriggerRoute[]>;
|
|
140
|
+
listSegmentTriggers(): Promise<SegmentTriggerRoute[]>;
|
|
141
|
+
dueDateTriggers(now: number): Promise<DueDateTrigger[]>;
|
|
142
|
+
advanceDateRun(run: {
|
|
143
|
+
workflow: string;
|
|
144
|
+
at: number;
|
|
145
|
+
after?: string | undefined;
|
|
146
|
+
}, progress: {
|
|
147
|
+
after?: string | undefined;
|
|
148
|
+
entered?: number;
|
|
149
|
+
finished?: boolean;
|
|
150
|
+
skipped?: 'missed';
|
|
151
|
+
now: number;
|
|
152
|
+
}): Promise<void>;
|
|
153
|
+
putWorkflowIR(workflow: WorkflowIR): Promise<void>;
|
|
154
|
+
getWorkflowIR(contentHash: string): Promise<WorkflowIR | undefined>;
|
|
155
|
+
runningPins(): Promise<RunningPin[]>;
|
|
156
|
+
replaceRoutes(bundle: BundleIR, version?: BundleVersion): Promise<void>;
|
|
157
|
+
liveBundleVersion(): Promise<BundleVersion | undefined>;
|
|
158
|
+
replaceRoutesIfNewer(bundle: BundleIR, version: BundleVersion): Promise<boolean>;
|
|
159
|
+
/** `version`: the code version applying the bundle, kept on every route it writes. */
|
|
160
|
+
private swapRoutes;
|
|
161
|
+
isSegmentMember(segment: string, userId: string): Promise<boolean>;
|
|
162
|
+
addSegmentMember(segment: string, userId: string, ts: number, workflows: readonly string[]): Promise<void>;
|
|
163
|
+
pendingSegmentStarts(segment: string, userId: string): Promise<{
|
|
164
|
+
workflow: string;
|
|
165
|
+
since: number;
|
|
166
|
+
}[]>;
|
|
167
|
+
completeSegmentStart(segment: string, userId: string, workflow: string): Promise<void>;
|
|
168
|
+
removeSegmentMember(segment: string, userId: string): Promise<void>;
|
|
169
|
+
enterJourney(entry: EntryInput): Promise<EntryOutcome>;
|
|
170
|
+
private claimEntry;
|
|
171
|
+
/**
|
|
172
|
+
* Take over the occurrence's row of a dead instance rather than losing the occurrence over one
|
|
173
|
+
* outage (the unique key leaves no room for a second row). The status test is inside the
|
|
174
|
+
* UPDATE, as a second guard beside the lock; the only other way it matches nothing is the
|
|
175
|
+
* tombstone. The reclaim is a new
|
|
176
|
+
* attempt: it starts unadmitted, even under the same instance id, so the previous attempt's
|
|
177
|
+
* admission is not inherited (`runningInstances` would report a runner that has not been
|
|
178
|
+
* created yet).
|
|
179
|
+
*/
|
|
180
|
+
private reclaimEntry;
|
|
181
|
+
/**
|
|
182
|
+
* Only an entry this call claimed records a start, so a row already there is a previous
|
|
183
|
+
* attempt's — a failed entry reclaimed under the same instance id (an event replayed with its
|
|
184
|
+
* ts). It is replaced whole: the new attempt's name and payload, nothing submitted yet.
|
|
185
|
+
*/
|
|
186
|
+
private recordStart;
|
|
187
|
+
removeEntry(instanceId: string): Promise<void>;
|
|
188
|
+
getEntry(workflow: string, userId: string, occurrence: string): Promise<EntryState | undefined>;
|
|
189
|
+
unadmittedEntries(claimedBefore: number, limit: number): Promise<UnadmittedEntry[]>;
|
|
190
|
+
failUnadmittedEntry(instanceId: string): Promise<boolean>;
|
|
191
|
+
admittedEntries(admittedBefore: number, limit: number): Promise<AdmittedEntry[]>;
|
|
192
|
+
failAdmittedEntry(instanceId: string): Promise<boolean>;
|
|
193
|
+
setEntryStatus(instanceId: string, status: string): Promise<void>;
|
|
194
|
+
findWakeHandles(userId: string, event: string): Promise<string[]>;
|
|
195
|
+
subscribe(handle: string, userId: string, events: readonly string[], ts: number): Promise<void>;
|
|
196
|
+
unsubscribe(handle: string): Promise<void>;
|
|
197
|
+
}
|
|
198
|
+
export { DEFAULT_SCHEMA, type SqlClientLike, uuidv7 };
|
|
199
|
+
//# sourceMappingURL=postgres.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres.d.mts","names":[],"sources":["../../src/store/postgres.ts"],"mappings":";;;;;;iBAyDiB;;;;;;;EAOf;;;;;;;;;;;;;;;;;;;;;;;;;qBA6CW,gCAAgC;mBAOxB;mBANF;mBACA;WACR,WAAW;WACX,YAAY;EAErB,YACmB,KAAK,eACtB,UAAS;;;;;;;;EAkBL,eAAe;EAiEf,YAAY,OAAO,aAAa;EA2BhC,YACJ,gBACA,aACC;IAAU;IAAe;IAAY,SAAS;;;UAoBzC;;;;;UAQM;;;;;;UAYN;;UAKA;EAcF,YACJ,gBACA,eACA,SAAS,aACT,mBACC;EAcG,kBACJ,gBACA,eACA,QAAQ,yBACR;IAAQ;IAAe,QAAQ;MAC9B;IAAU,UAAU;IAA2B,OAAO;;EAwBnD,WAAW,iBAAiB,QAAQ;EASpC,aACJ,gBACA,OAAO,cACP,cACC,QAAQ;EAgCL,sBAAsB;IAC1B;MAAqB;MAAY,WAAW;;IAC5C;IACA;IACA;MACE,QAAQ;EAgDN,mBAAmB;IACvB,SAAS;IACT;IACA;IACA;MACE,QAAQ;EA0CZ,YAAY,kBAAkB,QAAQ;EAWhC,aAAa,QAAQ,cAAc;EA+CnC,WAAW,oBAAoB;EAQ/B,aAAa,mBAAmB,aAAa;EAW7C,cAAc,gBAAgB,gBAAgB;EA0B9C,WAAW,qBAAqB;EAQhC,YAAY,mBAAmB,gBAAgB,aAAa,QAAQ;;;;;;UAmF5D;EAiCR,eAAe,gBAAgB,aAAa;EAa5C,mBAAmB;EAOnB,aAAa,iBAAiB,QAAQ;EAUtC,iBAAiB,iBAAiB,QAAQ;EAS1C,cAAc,oBAAoB,iBAAiB;EAmBnD,WAAW,gBAAgB,aAAa;;UAehC;EAuCR,aAAa,gBAAgB,iBAAiB,iBAAiB;EAU/D,iBAAiB,gBAAgB,kBAAkB;EASnD,mBACJ,gBACA,iBACA,kBAAkB,qBAClB,aACC;EAuBG,aAAa,gBAAgB;EAQ7B,aAAa,gBAAgB;EAW7B,gBAAgB;IAAU;IAAY,WAAW;;EAUjD,mBAAmB,QAAQ;EAQ3B,cAAc,mBAAmB,mBAAmB;EAUpD,cAAc,cAAc,QAAQ;EAiCpC,iBACJ,MAAM,WACN;IAAY;IAAe;MAC1B;EAUG,gBAAgB,MAAM,YAAY;EAUlC,oBAAoB,aAAa,QAAQ;EASzC,aAAa,gBAAgB,QAAQ;EAwBrC,uBAAuB,QAAQ;EAuB/B,gBAAgB,cAAc,QAAQ;EAmCtC,eACJ;IAAO;IAAkB;IAAY;KACrC;IACE;IACA;IACA;IACA;IACA;MAED;EAuBG,cAAc,UAAU,aAAa;EAQrC,cAAc,sBAAsB,QAAQ;EAS5C,eAAe,QAAQ;EAY7B,cAAc,QAAQ,UAAU,UAAU,gBAAgB;EAkBpD,qBAAqB,QAAQ;EAcnC,qBAAqB,QAAQ,UAAU,SAAS,gBAAgB;;UAoBlD;EAwFR,gBAAgB,iBAAiB,iBAAiB;EAQlD,iBACJ,iBACA,gBACA,YACA,+BACC;EA8BG,qBACJ,iBACA,iBACC;IAAU;IAAkB;;EASzB,qBAAqB,iBAAiB,gBAAgB,mBAAmB;EAOzE,oBAAoB,iBAAiB,iBAAiB;EAatD,aAAa,OAAO,aAAa,QAAQ;UAejC;;;;;;;;;;UAgEA;;;;;;UA+BA;EA6BR,YAAY,qBAAqB;EAIjC,SACJ,kBACA,gBACA,qBACC,QAAQ;EAgBL,kBAAkB,uBAAuB,gBAAgB,QAAQ;EAiBjE,oBAAoB,qBAAqB;EAYzC,gBAAgB,wBAAwB,gBAAgB,QAAQ;EAehE,kBAAkB,qBAAqB;EAYvC,eAAe,oBAAoB,iBAAiB;EAOpD,gBAAgB,gBAAgB,gBAAgB;EAQhD,UACJ,gBACA,gBACA,2BACA,aACC;EAmBG,YAAY,iBAAiB"}
|