@hogsend/engine 0.67.0 → 0.68.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 +3 -2
- package/dist/account-links/__fixtures__/fake-fetch.d.ts +38 -0
- package/dist/account-links/__fixtures__/fake-fetch.d.ts.map +1 -0
- package/dist/account-links/battlenet.d.ts +36 -0
- package/dist/account-links/battlenet.d.ts.map +1 -0
- package/dist/account-links/epic.d.ts +36 -0
- package/dist/account-links/epic.d.ts.map +1 -0
- package/dist/account-links/index.d.ts +7 -0
- package/dist/account-links/index.d.ts.map +1 -0
- package/dist/account-links/riot.d.ts +35 -0
- package/dist/account-links/riot.d.ts.map +1 -0
- package/dist/account-links/steam.d.ts +35 -0
- package/dist/account-links/steam.d.ts.map +1 -0
- package/dist/account-links/twitch.d.ts +38 -0
- package/dist/account-links/twitch.d.ts.map +1 -0
- package/dist/account-links/xbox.d.ts +39 -0
- package/dist/account-links/xbox.d.ts.map +1 -0
- package/dist/app.d.ts +50 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/buckets/bucket-access.d.ts +60 -0
- package/dist/buckets/bucket-access.d.ts.map +1 -0
- package/dist/buckets/bucket-reactions.d.ts +100 -0
- package/dist/buckets/bucket-reactions.d.ts.map +1 -0
- package/dist/buckets/check-membership.d.ts +105 -0
- package/dist/buckets/check-membership.d.ts.map +1 -0
- package/dist/buckets/define-bucket.d.ts +53 -0
- package/dist/buckets/define-bucket.d.ts.map +1 -0
- package/dist/buckets/membership-epoch.d.ts +74 -0
- package/dist/buckets/membership-epoch.d.ts.map +1 -0
- package/dist/buckets/registry-singleton.d.ts +6 -0
- package/dist/buckets/registry-singleton.d.ts.map +1 -0
- package/dist/buckets/registry.d.ts +59 -0
- package/dist/buckets/registry.d.ts.map +1 -0
- package/dist/campaigns/cohort-sql.d.ts +54 -0
- package/dist/campaigns/cohort-sql.d.ts.map +1 -0
- package/dist/campaigns/define-campaign.d.ts +105 -0
- package/dist/campaigns/define-campaign.d.ts.map +1 -0
- package/dist/campaigns/reconcile.d.ts +13 -0
- package/dist/campaigns/reconcile.d.ts.map +1 -0
- package/dist/campaigns/steps.d.ts +29 -0
- package/dist/campaigns/steps.d.ts.map +1 -0
- package/dist/cold-connect/index.d.ts +98 -0
- package/dist/cold-connect/index.d.ts.map +1 -0
- package/dist/cold-connect/page.d.ts +69 -0
- package/dist/cold-connect/page.d.ts.map +1 -0
- package/dist/cold-connect/throttle.d.ts +39 -0
- package/dist/cold-connect/throttle.d.ts.map +1 -0
- package/dist/cold-connect/token.d.ts +57 -0
- package/dist/cold-connect/token.d.ts.map +1 -0
- package/dist/connectors/action-registry-singleton.d.ts +21 -0
- package/dist/connectors/action-registry-singleton.d.ts.map +1 -0
- package/dist/connectors/define-action.d.ts +117 -0
- package/dist/connectors/define-action.d.ts.map +1 -0
- package/dist/connectors/define-connector.d.ts +172 -0
- package/dist/connectors/define-connector.d.ts.map +1 -0
- package/dist/connectors/presets/index.d.ts +17 -0
- package/dist/connectors/presets/index.d.ts.map +1 -0
- package/dist/connectors/registry-singleton.d.ts +34 -0
- package/dist/connectors/registry-singleton.d.ts.map +1 -0
- package/dist/connectors/runtime.d.ts +68 -0
- package/dist/connectors/runtime.d.ts.map +1 -0
- package/dist/container.d.ts +678 -0
- package/dist/container.d.ts.map +1 -0
- package/dist/destinations/define-destination.d.ts +96 -0
- package/dist/destinations/define-destination.d.ts.map +1 -0
- package/dist/destinations/presets/index.d.ts +42 -0
- package/dist/destinations/presets/index.d.ts.map +1 -0
- package/dist/destinations/presets/posthog.d.ts +12 -0
- package/dist/destinations/presets/posthog.d.ts.map +1 -0
- package/dist/destinations/presets/segment.d.ts +15 -0
- package/dist/destinations/presets/segment.d.ts.map +1 -0
- package/dist/destinations/presets/slack.d.ts +10 -0
- package/dist/destinations/presets/slack.d.ts.map +1 -0
- package/dist/destinations/presets/webhook.d.ts +14 -0
- package/dist/destinations/presets/webhook.d.ts.map +1 -0
- package/dist/destinations/registry-singleton.d.ts +44 -0
- package/dist/destinations/registry-singleton.d.ts.map +1 -0
- package/dist/env.d.ts +119 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/flags/reconcile.d.ts +36 -0
- package/dist/flags/reconcile.d.ts.map +1 -0
- package/dist/index.d.ts +210 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/journeys/authoring.d.ts +15 -0
- package/dist/journeys/authoring.d.ts.map +1 -0
- package/dist/journeys/client-defaults-singleton.d.ts +16 -0
- package/dist/journeys/client-defaults-singleton.d.ts.map +1 -0
- package/dist/journeys/constants.d.ts +32 -0
- package/dist/journeys/constants.d.ts.map +1 -0
- package/dist/journeys/define-journey.d.ts +33 -0
- package/dist/journeys/define-journey.d.ts.map +1 -0
- package/dist/journeys/durable-law-harness.d.ts +74 -0
- package/dist/journeys/durable-law-harness.d.ts.map +1 -0
- package/dist/journeys/errors.d.ts +13 -0
- package/dist/journeys/errors.d.ts.map +1 -0
- package/dist/journeys/execute-journey-run.d.ts +160 -0
- package/dist/journeys/execute-journey-run.d.ts.map +1 -0
- package/dist/journeys/graph/build-graph.d.ts +24 -0
- package/dist/journeys/graph/build-graph.d.ts.map +1 -0
- package/dist/journeys/group-scope.d.ts +56 -0
- package/dist/journeys/group-scope.d.ts.map +1 -0
- package/dist/journeys/journey-boundary.d.ts +264 -0
- package/dist/journeys/journey-boundary.d.ts.map +1 -0
- package/dist/journeys/journey-context.d.ts +60 -0
- package/dist/journeys/journey-context.d.ts.map +1 -0
- package/dist/journeys/journey-log.d.ts +42 -0
- package/dist/journeys/journey-log.d.ts.map +1 -0
- package/dist/journeys/journey-source-locations-singleton.d.ts +6 -0
- package/dist/journeys/journey-source-locations-singleton.d.ts.map +1 -0
- package/dist/journeys/journey-sources-singleton.d.ts +5 -0
- package/dist/journeys/journey-sources-singleton.d.ts.map +1 -0
- package/dist/journeys/journey-task-factory.d.ts +11 -0
- package/dist/journeys/journey-task-factory.d.ts.map +1 -0
- package/dist/journeys/journey-task-runtime.d.ts +2 -0
- package/dist/journeys/journey-task-runtime.d.ts.map +1 -0
- package/dist/journeys/journey-version.d.ts +71 -0
- package/dist/journeys/journey-version.d.ts.map +1 -0
- package/dist/journeys/record-once.d.ts +56 -0
- package/dist/journeys/record-once.d.ts.map +1 -0
- package/dist/journeys/registry-singleton.d.ts +6 -0
- package/dist/journeys/registry-singleton.d.ts.map +1 -0
- package/dist/journeys/registry.d.ts +59 -0
- package/dist/journeys/registry.d.ts.map +1 -0
- package/dist/journeys/with-durable-gate.d.ts +97 -0
- package/dist/journeys/with-durable-gate.d.ts.map +1 -0
- package/dist/lib/account-link-emit.d.ts +69 -0
- package/dist/lib/account-link-emit.d.ts.map +1 -0
- package/dist/lib/account-link-events.d.ts +128 -0
- package/dist/lib/account-link-events.d.ts.map +1 -0
- package/dist/lib/account-link-hooks.d.ts +32 -0
- package/dist/lib/account-link-hooks.d.ts.map +1 -0
- package/dist/lib/account-link-ingest.d.ts +78 -0
- package/dist/lib/account-link-ingest.d.ts.map +1 -0
- package/dist/lib/account-link-nonce.d.ts +29 -0
- package/dist/lib/account-link-nonce.d.ts.map +1 -0
- package/dist/lib/account-link-origins.d.ts +37 -0
- package/dist/lib/account-link-origins.d.ts.map +1 -0
- package/dist/lib/account-link-pkce.d.ts +48 -0
- package/dist/lib/account-link-pkce.d.ts.map +1 -0
- package/dist/lib/account-link-provider-registry.d.ts +35 -0
- package/dist/lib/account-link-provider-registry.d.ts.map +1 -0
- package/dist/lib/account-link-throttle.d.ts +76 -0
- package/dist/lib/account-link-throttle.d.ts.map +1 -0
- package/dist/lib/account-link-url.d.ts +41 -0
- package/dist/lib/account-link-url.d.ts.map +1 -0
- package/dist/lib/account-links-from-env.d.ts +62 -0
- package/dist/lib/account-links-from-env.d.ts.map +1 -0
- package/dist/lib/account-links.d.ts +353 -0
- package/dist/lib/account-links.d.ts.map +1 -0
- package/dist/lib/agent/config.d.ts +14 -0
- package/dist/lib/agent/config.d.ts.map +1 -0
- package/dist/lib/agent/proposals.d.ts +52 -0
- package/dist/lib/agent/proposals.d.ts.map +1 -0
- package/dist/lib/agent/provider.d.ts +9 -0
- package/dist/lib/agent/provider.d.ts.map +1 -0
- package/dist/lib/agent/risk.d.ts +24 -0
- package/dist/lib/agent/risk.d.ts.map +1 -0
- package/dist/lib/agent/system-prompt.d.ts +8 -0
- package/dist/lib/agent/system-prompt.d.ts.map +1 -0
- package/dist/lib/agent/tools.d.ts +258 -0
- package/dist/lib/agent/tools.d.ts.map +1 -0
- package/dist/lib/alerting.d.ts +7 -0
- package/dist/lib/alerting.d.ts.map +1 -0
- package/dist/lib/analytics-adapter.d.ts +24 -0
- package/dist/lib/analytics-adapter.d.ts.map +1 -0
- package/dist/lib/analytics-identity.d.ts +60 -0
- package/dist/lib/analytics-identity.d.ts.map +1 -0
- package/dist/lib/analytics-provider-registry.d.ts +20 -0
- package/dist/lib/analytics-provider-registry.d.ts.map +1 -0
- package/dist/lib/analytics-providers-from-env.d.ts +41 -0
- package/dist/lib/analytics-providers-from-env.d.ts.map +1 -0
- package/dist/lib/analytics-singleton.d.ts +10 -0
- package/dist/lib/analytics-singleton.d.ts.map +1 -0
- package/dist/lib/api-key-hash.d.ts +9 -0
- package/dist/lib/api-key-hash.d.ts.map +1 -0
- package/dist/lib/app-secret.d.ts +29 -0
- package/dist/lib/app-secret.d.ts.map +1 -0
- package/dist/lib/attachments.d.ts +53 -0
- package/dist/lib/attachments.d.ts.map +1 -0
- package/dist/lib/attribution-backfill.d.ts +48 -0
- package/dist/lib/attribution-backfill.d.ts.map +1 -0
- package/dist/lib/attribution.d.ts +44 -0
- package/dist/lib/attribution.d.ts.map +1 -0
- package/dist/lib/auth.d.ts +136 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/backfill.d.ts +41 -0
- package/dist/lib/backfill.d.ts.map +1 -0
- package/dist/lib/banner.d.ts +52 -0
- package/dist/lib/banner.d.ts.map +1 -0
- package/dist/lib/blueprint-lock.d.ts +19 -0
- package/dist/lib/blueprint-lock.d.ts.map +1 -0
- package/dist/lib/blueprints.d.ts +573 -0
- package/dist/lib/blueprints.d.ts.map +1 -0
- package/dist/lib/boot-api-key.d.ts +38 -0
- package/dist/lib/boot-api-key.d.ts.map +1 -0
- package/dist/lib/boot.d.ts +23 -0
- package/dist/lib/boot.d.ts.map +1 -0
- package/dist/lib/bootstrap-admin.d.ts +33 -0
- package/dist/lib/bootstrap-admin.d.ts.map +1 -0
- package/dist/lib/bot-prefetch.d.ts +21 -0
- package/dist/lib/bot-prefetch.d.ts.map +1 -0
- package/dist/lib/bucket-emit.d.ts +75 -0
- package/dist/lib/bucket-emit.d.ts.map +1 -0
- package/dist/lib/bucket-posthog-sync.d.ts +29 -0
- package/dist/lib/bucket-posthog-sync.d.ts.map +1 -0
- package/dist/lib/campaign-send-key.d.ts +31 -0
- package/dist/lib/campaign-send-key.d.ts.map +1 -0
- package/dist/lib/connector-actions.d.ts +83 -0
- package/dist/lib/connector-actions.d.ts.map +1 -0
- package/dist/lib/connector-heartbeat.d.ts +35 -0
- package/dist/lib/connector-heartbeat.d.ts.map +1 -0
- package/dist/lib/connector-link-codes.d.ts +105 -0
- package/dist/lib/connector-link-codes.d.ts.map +1 -0
- package/dist/lib/connector-state.d.ts +97 -0
- package/dist/lib/connector-state.d.ts.map +1 -0
- package/dist/lib/contacts.d.ts +622 -0
- package/dist/lib/contacts.d.ts.map +1 -0
- package/dist/lib/conversion-dispatch.d.ts +98 -0
- package/dist/lib/conversion-dispatch.d.ts.map +1 -0
- package/dist/lib/conversions.d.ts +75 -0
- package/dist/lib/conversions.d.ts.map +1 -0
- package/dist/lib/create-admin.d.ts +54 -0
- package/dist/lib/create-admin.d.ts.map +1 -0
- package/dist/lib/crm-deals.d.ts +66 -0
- package/dist/lib/crm-deals.d.ts.map +1 -0
- package/dist/lib/crm-ingest.d.ts +38 -0
- package/dist/lib/crm-ingest.d.ts.map +1 -0
- package/dist/lib/crm-provider-registry.d.ts +20 -0
- package/dist/lib/crm-provider-registry.d.ts.map +1 -0
- package/dist/lib/crm-registry-singleton.d.ts +18 -0
- package/dist/lib/crm-registry-singleton.d.ts.map +1 -0
- package/dist/lib/db.d.ts +3 -0
- package/dist/lib/db.d.ts.map +1 -0
- package/dist/lib/deal-money-events.d.ts +35 -0
- package/dist/lib/deal-money-events.d.ts.map +1 -0
- package/dist/lib/discord-gateway-heartbeat.d.ts +47 -0
- package/dist/lib/discord-gateway-heartbeat.d.ts.map +1 -0
- package/dist/lib/domain-status.d.ts +87 -0
- package/dist/lib/domain-status.d.ts.map +1 -0
- package/dist/lib/email-provider-registry.d.ts +30 -0
- package/dist/lib/email-provider-registry.d.ts.map +1 -0
- package/dist/lib/email-providers-from-env.d.ts +12 -0
- package/dist/lib/email-providers-from-env.d.ts.map +1 -0
- package/dist/lib/email-service-types.d.ts +189 -0
- package/dist/lib/email-service-types.d.ts.map +1 -0
- package/dist/lib/email-stats.d.ts +12 -0
- package/dist/lib/email-stats.d.ts.map +1 -0
- package/dist/lib/email.d.ts +73 -0
- package/dist/lib/email.d.ts.map +1 -0
- package/dist/lib/enrichment-ledger.d.ts +101 -0
- package/dist/lib/enrichment-ledger.d.ts.map +1 -0
- package/dist/lib/enrichment-provider-registry.d.ts +20 -0
- package/dist/lib/enrichment-provider-registry.d.ts.map +1 -0
- package/dist/lib/enrichment-providers-from-env.d.ts +13 -0
- package/dist/lib/enrichment-providers-from-env.d.ts.map +1 -0
- package/dist/lib/enrichment-registry-singleton.d.ts +9 -0
- package/dist/lib/enrichment-registry-singleton.d.ts.map +1 -0
- package/dist/lib/enrollment-guards.d.ts +28 -0
- package/dist/lib/enrollment-guards.d.ts.map +1 -0
- package/dist/lib/enrollment-policy.d.ts +25 -0
- package/dist/lib/enrollment-policy.d.ts.map +1 -0
- package/dist/lib/event-names.d.ts +27 -0
- package/dist/lib/event-names.d.ts.map +1 -0
- package/dist/lib/feed.d.ts +64 -0
- package/dist/lib/feed.d.ts.map +1 -0
- package/dist/lib/flags-registry.d.ts +23 -0
- package/dist/lib/flags-registry.d.ts.map +1 -0
- package/dist/lib/flags.d.ts +143 -0
- package/dist/lib/flags.d.ts.map +1 -0
- package/dist/lib/frequency-cap.d.ts +38 -0
- package/dist/lib/frequency-cap.d.ts.map +1 -0
- package/dist/lib/from-address.d.ts +15 -0
- package/dist/lib/from-address.d.ts.map +1 -0
- package/dist/lib/funnel-progress.d.ts +37 -0
- package/dist/lib/funnel-progress.d.ts.map +1 -0
- package/dist/lib/funnel-registry.d.ts +44 -0
- package/dist/lib/funnel-registry.d.ts.map +1 -0
- package/dist/lib/funnel-transitions.d.ts +63 -0
- package/dist/lib/funnel-transitions.d.ts.map +1 -0
- package/dist/lib/fx.d.ts +118 -0
- package/dist/lib/fx.d.ts.map +1 -0
- package/dist/lib/global-control-readout.d.ts +72 -0
- package/dist/lib/global-control-readout.d.ts.map +1 -0
- package/dist/lib/groups.d.ts +138 -0
- package/dist/lib/groups.d.ts.map +1 -0
- package/dist/lib/hatchet-duration.d.ts +14 -0
- package/dist/lib/hatchet-duration.d.ts.map +1 -0
- package/dist/lib/hatchet.d.ts +3 -0
- package/dist/lib/hatchet.d.ts.map +1 -0
- package/dist/lib/headers.d.ts +8 -0
- package/dist/lib/headers.d.ts.map +1 -0
- package/dist/lib/holdout.d.ts +36 -0
- package/dist/lib/holdout.d.ts.map +1 -0
- package/dist/lib/html.d.ts +5 -0
- package/dist/lib/html.d.ts.map +1 -0
- package/dist/lib/identity-service.d.ts +60 -0
- package/dist/lib/identity-service.d.ts.map +1 -0
- package/dist/lib/identity-token.d.ts +81 -0
- package/dist/lib/identity-token.d.ts.map +1 -0
- package/dist/lib/ingestion.d.ts +218 -0
- package/dist/lib/ingestion.d.ts.map +1 -0
- package/dist/lib/journey-lift.d.ts +56 -0
- package/dist/lib/journey-lift.d.ts.map +1 -0
- package/dist/lib/journey-suppress.d.ts +59 -0
- package/dist/lib/journey-suppress.d.ts.map +1 -0
- package/dist/lib/leader-lease.d.ts +36 -0
- package/dist/lib/leader-lease.d.ts.map +1 -0
- package/dist/lib/lift-stats.d.ts +46 -0
- package/dist/lib/lift-stats.d.ts.map +1 -0
- package/dist/lib/links.d.ts +186 -0
- package/dist/lib/links.d.ts.map +1 -0
- package/dist/lib/load-optional-plugin.d.ts +47 -0
- package/dist/lib/load-optional-plugin.d.ts.map +1 -0
- package/dist/lib/logger.d.ts +4 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/mailer.d.ts +43 -0
- package/dist/lib/mailer.d.ts.map +1 -0
- package/dist/lib/metrics-sql.d.ts +11 -0
- package/dist/lib/metrics-sql.d.ts.map +1 -0
- package/dist/lib/notifications.d.ts +17 -0
- package/dist/lib/notifications.d.ts.map +1 -0
- package/dist/lib/oauth-token-manager.d.ts +74 -0
- package/dist/lib/oauth-token-manager.d.ts.map +1 -0
- package/dist/lib/operator-settings.d.ts +33 -0
- package/dist/lib/operator-settings.d.ts.map +1 -0
- package/dist/lib/operator.d.ts +20 -0
- package/dist/lib/operator.d.ts.map +1 -0
- package/dist/lib/outbound-endpoint-cache.d.ts +25 -0
- package/dist/lib/outbound-endpoint-cache.d.ts.map +1 -0
- package/dist/lib/outbound.d.ts +687 -0
- package/dist/lib/outbound.d.ts.map +1 -0
- package/dist/lib/phone.d.ts +11 -0
- package/dist/lib/phone.d.ts.map +1 -0
- package/dist/lib/posthog-scopes.d.ts +30 -0
- package/dist/lib/posthog-scopes.d.ts.map +1 -0
- package/dist/lib/posthog.d.ts +16 -0
- package/dist/lib/posthog.d.ts.map +1 -0
- package/dist/lib/preferences.d.ts +72 -0
- package/dist/lib/preferences.d.ts.map +1 -0
- package/dist/lib/provider-credentials.d.ts +149 -0
- package/dist/lib/provider-credentials.d.ts.map +1 -0
- package/dist/lib/provision-posthog-loop.d.ts +100 -0
- package/dist/lib/provision-posthog-loop.d.ts.map +1 -0
- package/dist/lib/recipient-preferences.d.ts +29 -0
- package/dist/lib/recipient-preferences.d.ts.map +1 -0
- package/dist/lib/redis.d.ts +33 -0
- package/dist/lib/redis.d.ts.map +1 -0
- package/dist/lib/referral-intent.d.ts +99 -0
- package/dist/lib/referral-intent.d.ts.map +1 -0
- package/dist/lib/referral-link.d.ts +59 -0
- package/dist/lib/referral-link.d.ts.map +1 -0
- package/dist/lib/referral-registry.d.ts +37 -0
- package/dist/lib/referral-registry.d.ts.map +1 -0
- package/dist/lib/referral-report.d.ts +178 -0
- package/dist/lib/referral-report.d.ts.map +1 -0
- package/dist/lib/referral-runtime.d.ts +43 -0
- package/dist/lib/referral-runtime.d.ts.map +1 -0
- package/dist/lib/referrals.d.ts +184 -0
- package/dist/lib/referrals.d.ts.map +1 -0
- package/dist/lib/refine-chain.d.ts +236 -0
- package/dist/lib/refine-chain.d.ts.map +1 -0
- package/dist/lib/refine-traits.d.ts +78 -0
- package/dist/lib/refine-traits.d.ts.map +1 -0
- package/dist/lib/refine.d.ts +35 -0
- package/dist/lib/refine.d.ts.map +1 -0
- package/dist/lib/reset-email.d.ts +38 -0
- package/dist/lib/reset-email.d.ts.map +1 -0
- package/dist/lib/revenue.d.ts +61 -0
- package/dist/lib/revenue.d.ts.map +1 -0
- package/dist/lib/schemas.d.ts +9 -0
- package/dist/lib/schemas.d.ts.map +1 -0
- package/dist/lib/seed-posthog-destination.d.ts +22 -0
- package/dist/lib/seed-posthog-destination.d.ts.map +1 -0
- package/dist/lib/semantic-click.d.ts +58 -0
- package/dist/lib/semantic-click.d.ts.map +1 -0
- package/dist/lib/sending-domain-guidance.d.ts +40 -0
- package/dist/lib/sending-domain-guidance.d.ts.map +1 -0
- package/dist/lib/singleton.d.ts +24 -0
- package/dist/lib/singleton.d.ts.map +1 -0
- package/dist/lib/sms-frequency-cap.d.ts +16 -0
- package/dist/lib/sms-frequency-cap.d.ts.map +1 -0
- package/dist/lib/sms-inbound.d.ts +37 -0
- package/dist/lib/sms-inbound.d.ts.map +1 -0
- package/dist/lib/sms-link-tracking.d.ts +53 -0
- package/dist/lib/sms-link-tracking.d.ts.map +1 -0
- package/dist/lib/sms-mailer.d.ts +12 -0
- package/dist/lib/sms-mailer.d.ts.map +1 -0
- package/dist/lib/sms-provider-registry.d.ts +20 -0
- package/dist/lib/sms-provider-registry.d.ts.map +1 -0
- package/dist/lib/sms-providers-from-env.d.ts +4 -0
- package/dist/lib/sms-providers-from-env.d.ts.map +1 -0
- package/dist/lib/sms-service-types.d.ts +131 -0
- package/dist/lib/sms-service-types.d.ts.map +1 -0
- package/dist/lib/sms-tracked.d.ts +36 -0
- package/dist/lib/sms-tracked.d.ts.map +1 -0
- package/dist/lib/sms.d.ts +58 -0
- package/dist/lib/sms.d.ts.map +1 -0
- package/dist/lib/snippet.d.ts +32 -0
- package/dist/lib/snippet.d.ts.map +1 -0
- package/dist/lib/stable-stringify.d.ts +12 -0
- package/dist/lib/stable-stringify.d.ts.map +1 -0
- package/dist/lib/studio.d.ts +21 -0
- package/dist/lib/studio.d.ts.map +1 -0
- package/dist/lib/survey.d.ts +35 -0
- package/dist/lib/survey.d.ts.map +1 -0
- package/dist/lib/test-mode.d.ts +77 -0
- package/dist/lib/test-mode.d.ts.map +1 -0
- package/dist/lib/timezone.d.ts +55 -0
- package/dist/lib/timezone.d.ts.map +1 -0
- package/dist/lib/tracked.d.ts +95 -0
- package/dist/lib/tracked.d.ts.map +1 -0
- package/dist/lib/tracking-event-names.d.ts +7 -0
- package/dist/lib/tracking-event-names.d.ts.map +1 -0
- package/dist/lib/tracking-events.d.ts +232 -0
- package/dist/lib/tracking-events.d.ts.map +1 -0
- package/dist/lib/tracking.d.ts +47 -0
- package/dist/lib/tracking.d.ts.map +1 -0
- package/dist/lib/unconfigured-email-provider.d.ts +20 -0
- package/dist/lib/unconfigured-email-provider.d.ts.map +1 -0
- package/dist/lib/unique-violation.d.ts +22 -0
- package/dist/lib/unique-violation.d.ts.map +1 -0
- package/dist/lib/user-token.d.ts +44 -0
- package/dist/lib/user-token.d.ts.map +1 -0
- package/dist/lib/variant.d.ts +44 -0
- package/dist/lib/variant.d.ts.map +1 -0
- package/dist/lib/webhook-signing.d.ts +120 -0
- package/dist/lib/webhook-signing.d.ts.map +1 -0
- package/dist/lib/worker-heartbeat.d.ts +18 -0
- package/dist/lib/worker-heartbeat.d.ts.map +1 -0
- package/dist/lists/channels.d.ts +43 -0
- package/dist/lists/channels.d.ts.map +1 -0
- package/dist/lists/define-list.d.ts +76 -0
- package/dist/lists/define-list.d.ts.map +1 -0
- package/dist/lists/registry-singleton.d.ts +8 -0
- package/dist/lists/registry-singleton.d.ts.map +1 -0
- package/dist/lists/registry.d.ts +66 -0
- package/dist/lists/registry.d.ts.map +1 -0
- package/dist/lists/subscription.d.ts +10 -0
- package/dist/lists/subscription.d.ts.map +1 -0
- package/dist/mcp/authoring-guide.d.ts +33 -0
- package/dist/mcp/authoring-guide.d.ts.map +1 -0
- package/dist/mcp/blueprint-tools.d.ts +266 -0
- package/dist/mcp/blueprint-tools.d.ts.map +1 -0
- package/dist/middleware/api-key.d.ts +45 -0
- package/dist/middleware/api-key.d.ts.map +1 -0
- package/dist/middleware/audit.d.ts +3 -0
- package/dist/middleware/audit.d.ts.map +1 -0
- package/dist/middleware/error-handler.d.ts +4 -0
- package/dist/middleware/error-handler.d.ts.map +1 -0
- package/dist/middleware/publishable-key.d.ts +27 -0
- package/dist/middleware/publishable-key.d.ts.map +1 -0
- package/dist/middleware/rate-limit.d.ts +105 -0
- package/dist/middleware/rate-limit.d.ts.map +1 -0
- package/dist/middleware/request-logger.d.ts +4 -0
- package/dist/middleware/request-logger.d.ts.map +1 -0
- package/dist/middleware/require-admin.d.ts +3 -0
- package/dist/middleware/require-admin.d.ts.map +1 -0
- package/dist/routes/_shared.d.ts +52 -0
- package/dist/routes/_shared.d.ts.map +1 -0
- package/dist/routes/accounts/callback.d.ts +18 -0
- package/dist/routes/accounts/callback.d.ts.map +1 -0
- package/dist/routes/accounts/emit.d.ts +96 -0
- package/dist/routes/accounts/emit.d.ts.map +1 -0
- package/dist/routes/accounts/import-links.d.ts +4 -0
- package/dist/routes/accounts/import-links.d.ts.map +1 -0
- package/dist/routes/accounts/index.d.ts +39 -0
- package/dist/routes/accounts/index.d.ts.map +1 -0
- package/dist/routes/accounts/lookup.d.ts +6 -0
- package/dist/routes/accounts/lookup.d.ts.map +1 -0
- package/dist/routes/accounts/me.d.ts +5 -0
- package/dist/routes/accounts/me.d.ts.map +1 -0
- package/dist/routes/accounts/mint.d.ts +5 -0
- package/dist/routes/accounts/mint.d.ts.map +1 -0
- package/dist/routes/accounts/pages.d.ts +23 -0
- package/dist/routes/accounts/pages.d.ts.map +1 -0
- package/dist/routes/accounts/resolve.d.ts +33 -0
- package/dist/routes/accounts/resolve.d.ts.map +1 -0
- package/dist/routes/accounts/serialize.d.ts +57 -0
- package/dist/routes/accounts/serialize.d.ts.map +1 -0
- package/dist/routes/accounts/shared.d.ts +68 -0
- package/dist/routes/accounts/shared.d.ts.map +1 -0
- package/dist/routes/accounts/start.d.ts +16 -0
- package/dist/routes/accounts/start.d.ts.map +1 -0
- package/dist/routes/accounts/unlink.d.ts +36 -0
- package/dist/routes/accounts/unlink.d.ts.map +1 -0
- package/dist/routes/admin/agent.d.ts +4 -0
- package/dist/routes/admin/agent.d.ts.map +1 -0
- package/dist/routes/admin/alerts.d.ts +190 -0
- package/dist/routes/admin/alerts.d.ts.map +1 -0
- package/dist/routes/admin/analytics.d.ts +137 -0
- package/dist/routes/admin/analytics.d.ts.map +1 -0
- package/dist/routes/admin/api-keys.d.ts +158 -0
- package/dist/routes/admin/api-keys.d.ts.map +1 -0
- package/dist/routes/admin/attribution.d.ts +93 -0
- package/dist/routes/admin/attribution.d.ts.map +1 -0
- package/dist/routes/admin/audit-logs.d.ts +40 -0
- package/dist/routes/admin/audit-logs.d.ts.map +1 -0
- package/dist/routes/admin/blueprints.d.ts +4 -0
- package/dist/routes/admin/blueprints.d.ts.map +1 -0
- package/dist/routes/admin/buckets.d.ts +215 -0
- package/dist/routes/admin/buckets.d.ts.map +1 -0
- package/dist/routes/admin/bulk.d.ts +203 -0
- package/dist/routes/admin/bulk.d.ts.map +1 -0
- package/dist/routes/admin/campaigns.d.ts +198 -0
- package/dist/routes/admin/campaigns.d.ts.map +1 -0
- package/dist/routes/admin/connectors.d.ts +116 -0
- package/dist/routes/admin/connectors.d.ts.map +1 -0
- package/dist/routes/admin/contacts.d.ts +246 -0
- package/dist/routes/admin/contacts.d.ts.map +1 -0
- package/dist/routes/admin/conversions.d.ts +103 -0
- package/dist/routes/admin/conversions.d.ts.map +1 -0
- package/dist/routes/admin/deals.d.ts +136 -0
- package/dist/routes/admin/deals.d.ts.map +1 -0
- package/dist/routes/admin/dlq.d.ts +100 -0
- package/dist/routes/admin/dlq.d.ts.map +1 -0
- package/dist/routes/admin/domain.d.ts +314 -0
- package/dist/routes/admin/domain.d.ts.map +1 -0
- package/dist/routes/admin/emails.d.ts +127 -0
- package/dist/routes/admin/emails.d.ts.map +1 -0
- package/dist/routes/admin/events.d.ts +140 -0
- package/dist/routes/admin/events.d.ts.map +1 -0
- package/dist/routes/admin/flags.d.ts +719 -0
- package/dist/routes/admin/flags.d.ts.map +1 -0
- package/dist/routes/admin/funnels.d.ts +71 -0
- package/dist/routes/admin/funnels.d.ts.map +1 -0
- package/dist/routes/admin/groups.d.ts +169 -0
- package/dist/routes/admin/groups.d.ts.map +1 -0
- package/dist/routes/admin/identity.d.ts +72 -0
- package/dist/routes/admin/identity.d.ts.map +1 -0
- package/dist/routes/admin/impact-schemas.d.ts +48 -0
- package/dist/routes/admin/impact-schemas.d.ts.map +1 -0
- package/dist/routes/admin/impact.d.ts +316 -0
- package/dist/routes/admin/impact.d.ts.map +1 -0
- package/dist/routes/admin/index.d.ts +4 -0
- package/dist/routes/admin/index.d.ts.map +1 -0
- package/dist/routes/admin/journey-impact.d.ts +320 -0
- package/dist/routes/admin/journey-impact.d.ts.map +1 -0
- package/dist/routes/admin/journey-logs.d.ts +57 -0
- package/dist/routes/admin/journey-logs.d.ts.map +1 -0
- package/dist/routes/admin/journeys.d.ts +736 -0
- package/dist/routes/admin/journeys.d.ts.map +1 -0
- package/dist/routes/admin/links.d.ts +382 -0
- package/dist/routes/admin/links.d.ts.map +1 -0
- package/dist/routes/admin/lists.d.ts +22 -0
- package/dist/routes/admin/lists.d.ts.map +1 -0
- package/dist/routes/admin/maintenance.d.ts +72 -0
- package/dist/routes/admin/maintenance.d.ts.map +1 -0
- package/dist/routes/admin/metrics.d.ts +212 -0
- package/dist/routes/admin/metrics.d.ts.map +1 -0
- package/dist/routes/admin/open-editor.d.ts +36 -0
- package/dist/routes/admin/open-editor.d.ts.map +1 -0
- package/dist/routes/admin/preferences.d.ts +109 -0
- package/dist/routes/admin/preferences.d.ts.map +1 -0
- package/dist/routes/admin/provider-credentials.d.ts +108 -0
- package/dist/routes/admin/provider-credentials.d.ts.map +1 -0
- package/dist/routes/admin/readiness.d.ts +24 -0
- package/dist/routes/admin/readiness.d.ts.map +1 -0
- package/dist/routes/admin/referrals.d.ts +230 -0
- package/dist/routes/admin/referrals.d.ts.map +1 -0
- package/dist/routes/admin/reporting.d.ts +149 -0
- package/dist/routes/admin/reporting.d.ts.map +1 -0
- package/dist/routes/admin/settings.d.ts +80 -0
- package/dist/routes/admin/settings.d.ts.map +1 -0
- package/dist/routes/admin/suppressions.d.ts +90 -0
- package/dist/routes/admin/suppressions.d.ts.map +1 -0
- package/dist/routes/admin/targeting.d.ts +58 -0
- package/dist/routes/admin/targeting.d.ts.map +1 -0
- package/dist/routes/admin/templates.d.ts +197 -0
- package/dist/routes/admin/templates.d.ts.map +1 -0
- package/dist/routes/admin/timeline.d.ts +51 -0
- package/dist/routes/admin/timeline.d.ts.map +1 -0
- package/dist/routes/admin/webhooks.d.ts +250 -0
- package/dist/routes/admin/webhooks.d.ts.map +1 -0
- package/dist/routes/campaigns/index.d.ts +239 -0
- package/dist/routes/campaigns/index.d.ts.map +1 -0
- package/dist/routes/connectors/index.d.ts +16 -0
- package/dist/routes/connectors/index.d.ts.map +1 -0
- package/dist/routes/contacts/index.d.ts +187 -0
- package/dist/routes/contacts/index.d.ts.map +1 -0
- package/dist/routes/email/index.d.ts +4 -0
- package/dist/routes/email/index.d.ts.map +1 -0
- package/dist/routes/email/preferences.d.ts +17 -0
- package/dist/routes/email/preferences.d.ts.map +1 -0
- package/dist/routes/email/unsubscribe.d.ts +17 -0
- package/dist/routes/email/unsubscribe.d.ts.map +1 -0
- package/dist/routes/emails/index.d.ts +90 -0
- package/dist/routes/emails/index.d.ts.map +1 -0
- package/dist/routes/events/index.d.ts +116 -0
- package/dist/routes/events/index.d.ts.map +1 -0
- package/dist/routes/feed/index.d.ts +248 -0
- package/dist/routes/feed/index.d.ts.map +1 -0
- package/dist/routes/feed/recipient.d.ts +65 -0
- package/dist/routes/feed/recipient.d.ts.map +1 -0
- package/dist/routes/flags/index.d.ts +94 -0
- package/dist/routes/flags/index.d.ts.map +1 -0
- package/dist/routes/groups/index.d.ts +192 -0
- package/dist/routes/groups/index.d.ts.map +1 -0
- package/dist/routes/health.d.ts +57 -0
- package/dist/routes/health.d.ts.map +1 -0
- package/dist/routes/index.d.ts +8 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/lists/index.d.ts +266 -0
- package/dist/routes/lists/index.d.ts.map +1 -0
- package/dist/routes/referrals/index.d.ts +22 -0
- package/dist/routes/referrals/index.d.ts.map +1 -0
- package/dist/routes/referrals/me.d.ts +4 -0
- package/dist/routes/referrals/me.d.ts.map +1 -0
- package/dist/routes/referrals/report.d.ts +5 -0
- package/dist/routes/referrals/report.d.ts.map +1 -0
- package/dist/routes/referrals/shared.d.ts +16 -0
- package/dist/routes/referrals/shared.d.ts.map +1 -0
- package/dist/routes/referrals/touch.d.ts +5 -0
- package/dist/routes/referrals/touch.d.ts.map +1 -0
- package/dist/routes/snippet.d.ts +12 -0
- package/dist/routes/snippet.d.ts.map +1 -0
- package/dist/routes/tracking/answer.d.ts +56 -0
- package/dist/routes/tracking/answer.d.ts.map +1 -0
- package/dist/routes/tracking/arrive.d.ts +32 -0
- package/dist/routes/tracking/arrive.d.ts.map +1 -0
- package/dist/routes/tracking/click-pipeline.d.ts +213 -0
- package/dist/routes/tracking/click-pipeline.d.ts.map +1 -0
- package/dist/routes/tracking/click.d.ts +26 -0
- package/dist/routes/tracking/click.d.ts.map +1 -0
- package/dist/routes/tracking/identify.d.ts +32 -0
- package/dist/routes/tracking/identify.d.ts.map +1 -0
- package/dist/routes/tracking/index.d.ts +4 -0
- package/dist/routes/tracking/index.d.ts.map +1 -0
- package/dist/routes/tracking/open.d.ts +17 -0
- package/dist/routes/tracking/open.d.ts.map +1 -0
- package/dist/routes/tracking/short.d.ts +17 -0
- package/dist/routes/tracking/short.d.ts.map +1 -0
- package/dist/routes/tracking/vanity.d.ts +17 -0
- package/dist/routes/tracking/vanity.d.ts.map +1 -0
- package/dist/routes/webhooks/crm-provider.d.ts +24 -0
- package/dist/routes/webhooks/crm-provider.d.ts.map +1 -0
- package/dist/routes/webhooks/email-provider.d.ts +21 -0
- package/dist/routes/webhooks/email-provider.d.ts.map +1 -0
- package/dist/routes/webhooks/index.d.ts +8 -0
- package/dist/routes/webhooks/index.d.ts.map +1 -0
- package/dist/routes/webhooks/resend.d.ts +35 -0
- package/dist/routes/webhooks/resend.d.ts.map +1 -0
- package/dist/routes/webhooks/sms-provider.d.ts +23 -0
- package/dist/routes/webhooks/sms-provider.d.ts.map +1 -0
- package/dist/routes/webhooks/sources.d.ts +12 -0
- package/dist/routes/webhooks/sources.d.ts.map +1 -0
- package/dist/sources/define-contact-source.d.ts +114 -0
- package/dist/sources/define-contact-source.d.ts.map +1 -0
- package/dist/sources/registry.d.ts +31 -0
- package/dist/sources/registry.d.ts.map +1 -0
- package/dist/sources/webhook-source.d.ts +53 -0
- package/dist/sources/webhook-source.d.ts.map +1 -0
- package/dist/testing.d.ts +10 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/webhook-sources/define-webhook-source.d.ts +60 -0
- package/dist/webhook-sources/define-webhook-source.d.ts.map +1 -0
- package/dist/webhook-sources/presets/clerk.d.ts +9 -0
- package/dist/webhook-sources/presets/clerk.d.ts.map +1 -0
- package/dist/webhook-sources/presets/index.d.ts +140 -0
- package/dist/webhook-sources/presets/index.d.ts.map +1 -0
- package/dist/webhook-sources/presets/intercom.d.ts +44 -0
- package/dist/webhook-sources/presets/intercom.d.ts.map +1 -0
- package/dist/webhook-sources/presets/segment.d.ts +16 -0
- package/dist/webhook-sources/presets/segment.d.ts.map +1 -0
- package/dist/webhook-sources/presets/stripe.d.ts +20 -0
- package/dist/webhook-sources/presets/stripe.d.ts.map +1 -0
- package/dist/webhook-sources/presets/supabase.d.ts +23 -0
- package/dist/webhook-sources/presets/supabase.d.ts.map +1 -0
- package/dist/webhook-sources/verify.d.ts +48 -0
- package/dist/webhook-sources/verify.d.ts.map +1 -0
- package/dist/worker.d.ts +37 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/workflows/backfill-contact-id.d.ts +202 -0
- package/dist/workflows/backfill-contact-id.d.ts.map +1 -0
- package/dist/workflows/bucket-backfill.d.ts +64 -0
- package/dist/workflows/bucket-backfill.d.ts.map +1 -0
- package/dist/workflows/bucket-reconcile.d.ts +73 -0
- package/dist/workflows/bucket-reconcile.d.ts.map +1 -0
- package/dist/workflows/check-alerts.d.ts +10 -0
- package/dist/workflows/check-alerts.d.ts.map +1 -0
- package/dist/workflows/confirm-semantic-click.d.ts +15 -0
- package/dist/workflows/confirm-semantic-click.d.ts.map +1 -0
- package/dist/workflows/crm-reconcile.d.ts +27 -0
- package/dist/workflows/crm-reconcile.d.ts.map +1 -0
- package/dist/workflows/deliver-webhook.d.ts +88 -0
- package/dist/workflows/deliver-webhook.d.ts.map +1 -0
- package/dist/workflows/dispatch-conversion.d.ts +14 -0
- package/dist/workflows/dispatch-conversion.d.ts.map +1 -0
- package/dist/workflows/identity-alias-backfill.d.ts +96 -0
- package/dist/workflows/identity-alias-backfill.d.ts.map +1 -0
- package/dist/workflows/impact-digest.d.ts +142 -0
- package/dist/workflows/impact-digest.d.ts.map +1 -0
- package/dist/workflows/import-contacts.d.ts +14 -0
- package/dist/workflows/import-contacts.d.ts.map +1 -0
- package/dist/workflows/import-suppressions.d.ts +55 -0
- package/dist/workflows/import-suppressions.d.ts.map +1 -0
- package/dist/workflows/journey-blueprint-interpreter.d.ts +73 -0
- package/dist/workflows/journey-blueprint-interpreter.d.ts.map +1 -0
- package/dist/workflows/send-campaign.d.ts +128 -0
- package/dist/workflows/send-campaign.d.ts.map +1 -0
- package/dist/workflows/send-email.d.ts +15 -0
- package/dist/workflows/send-email.d.ts.map +1 -0
- package/dist/workflows/send-feed.d.ts +37 -0
- package/dist/workflows/send-feed.d.ts.map +1 -0
- package/package.json +60 -22
- package/src/app.ts +9 -1
- package/src/buckets/check-membership.ts +54 -20
- package/src/env.ts +30 -0
- package/src/journeys/journey-log.ts +25 -8
- package/src/lib/contacts.ts +47 -1
- package/src/lib/email-service-types.ts +10 -0
- package/src/lib/ingestion.ts +30 -19
- package/src/lib/mailer-bounce-idempotency.test.ts +7 -2
- package/src/lib/mailer-replied.test.ts +7 -2
- package/src/lib/mailer.ts +1 -0
- package/src/lib/outbound-endpoint-cache.ts +83 -0
- package/src/lib/outbound.ts +56 -37
- package/src/lib/seed-posthog-destination.ts +5 -1
- package/src/lib/tracked.ts +11 -3
- package/src/lib/tracking-events.ts +20 -3
- package/src/middleware/api-key.ts +69 -60
- package/src/middleware/publishable-key.ts +11 -23
- package/src/middleware/rate-limit.ts +165 -3
- package/src/routes/admin/api-keys.ts +148 -0
- package/src/routes/admin/targeting.ts +6 -1
- package/src/routes/admin/webhooks.ts +4 -0
- package/src/routes/index.ts +67 -24
- package/src/workflows/backfill-contact-id.ts +3 -7
- package/src/workflows/bucket-backfill.ts +2 -2
- package/src/workflows/bucket-reconcile.ts +28 -12
- package/src/workflows/check-alerts.ts +3 -9
- package/src/workflows/crm-reconcile.ts +3 -2
- package/src/workflows/deliver-webhook.ts +21 -8
- package/src/workflows/dispatch-conversion.ts +2 -2
- package/src/workflows/identity-alias-backfill.ts +3 -2
- package/src/workflows/impact-digest.ts +2 -2
- package/src/workflows/import-contacts.ts +3 -4
- package/src/workflows/import-suppressions.ts +4 -5
- package/src/workflows/send-campaign.ts +10 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { env as engineEnv } from "../../env.js";
|
|
2
|
+
import type { DefinedWebhookSource } from "../define-webhook-source.js";
|
|
3
|
+
export { clerkSource } from "./clerk.js";
|
|
4
|
+
export { intercomSource } from "./intercom.js";
|
|
5
|
+
export { segmentSource } from "./segment.js";
|
|
6
|
+
export { stripeSource } from "./stripe.js";
|
|
7
|
+
export { supabaseSource } from "./supabase.js";
|
|
8
|
+
/**
|
|
9
|
+
* All shipped integration presets, keyed by their webhook-source id. The id is
|
|
10
|
+
* also the route segment: `PRESET_SOURCES.stripe` serves `POST /v1/webhooks/stripe`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PRESET_SOURCES: {
|
|
13
|
+
clerk: DefinedWebhookSource<{
|
|
14
|
+
[x: string]: unknown;
|
|
15
|
+
type: string;
|
|
16
|
+
object?: string | undefined;
|
|
17
|
+
data?: {
|
|
18
|
+
[x: string]: unknown;
|
|
19
|
+
} | null | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
supabase: DefinedWebhookSource<{
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
type: "INSERT" | "UPDATE" | "DELETE";
|
|
24
|
+
table: string;
|
|
25
|
+
schema: string;
|
|
26
|
+
record?: {
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
id?: string | undefined;
|
|
29
|
+
email?: string | null | undefined;
|
|
30
|
+
phone?: string | null | undefined;
|
|
31
|
+
email_confirmed_at?: string | null | undefined;
|
|
32
|
+
raw_user_meta_data?: Record<string, unknown> | null | undefined;
|
|
33
|
+
} | null | undefined;
|
|
34
|
+
old_record?: {
|
|
35
|
+
[x: string]: unknown;
|
|
36
|
+
id?: string | undefined;
|
|
37
|
+
email?: string | null | undefined;
|
|
38
|
+
phone?: string | null | undefined;
|
|
39
|
+
email_confirmed_at?: string | null | undefined;
|
|
40
|
+
raw_user_meta_data?: Record<string, unknown> | null | undefined;
|
|
41
|
+
} | null | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
stripe: DefinedWebhookSource<{
|
|
44
|
+
[x: string]: unknown;
|
|
45
|
+
id: string;
|
|
46
|
+
type: string;
|
|
47
|
+
data: {
|
|
48
|
+
[x: string]: unknown;
|
|
49
|
+
object: {
|
|
50
|
+
[x: string]: unknown;
|
|
51
|
+
id?: string | undefined;
|
|
52
|
+
object?: string | undefined;
|
|
53
|
+
customer?: string | null | undefined;
|
|
54
|
+
email?: string | null | undefined;
|
|
55
|
+
name?: string | null | undefined;
|
|
56
|
+
phone?: string | null | undefined;
|
|
57
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
object?: string | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
segment: DefinedWebhookSource<{
|
|
63
|
+
[x: string]: unknown;
|
|
64
|
+
type: string;
|
|
65
|
+
event?: string | null | undefined;
|
|
66
|
+
messageId?: string | null | undefined;
|
|
67
|
+
userId?: string | null | undefined;
|
|
68
|
+
anonymousId?: string | null | undefined;
|
|
69
|
+
groupId?: string | null | undefined;
|
|
70
|
+
traits?: Record<string, unknown> | null | undefined;
|
|
71
|
+
properties?: Record<string, unknown> | null | undefined;
|
|
72
|
+
context?: {
|
|
73
|
+
[x: string]: unknown;
|
|
74
|
+
traits?: Record<string, unknown> | null | undefined;
|
|
75
|
+
} | null | undefined;
|
|
76
|
+
}>;
|
|
77
|
+
intercom: DefinedWebhookSource<{
|
|
78
|
+
[x: string]: unknown;
|
|
79
|
+
id: string;
|
|
80
|
+
topic: string;
|
|
81
|
+
data: {
|
|
82
|
+
[x: string]: unknown;
|
|
83
|
+
item: {
|
|
84
|
+
[x: string]: unknown;
|
|
85
|
+
type?: string | null | undefined;
|
|
86
|
+
id?: string | null | undefined;
|
|
87
|
+
source?: {
|
|
88
|
+
[x: string]: unknown;
|
|
89
|
+
author?: {
|
|
90
|
+
[x: string]: unknown;
|
|
91
|
+
type?: string | null | undefined;
|
|
92
|
+
id?: string | null | undefined;
|
|
93
|
+
external_id?: string | null | undefined;
|
|
94
|
+
email?: string | null | undefined;
|
|
95
|
+
name?: string | null | undefined;
|
|
96
|
+
} | null | undefined;
|
|
97
|
+
} | null | undefined;
|
|
98
|
+
contacts?: {
|
|
99
|
+
[x: string]: unknown;
|
|
100
|
+
contacts?: {
|
|
101
|
+
[x: string]: unknown;
|
|
102
|
+
type?: string | null | undefined;
|
|
103
|
+
id?: string | null | undefined;
|
|
104
|
+
external_id?: string | null | undefined;
|
|
105
|
+
email?: string | null | undefined;
|
|
106
|
+
name?: string | null | undefined;
|
|
107
|
+
}[] | null | undefined;
|
|
108
|
+
} | null | undefined;
|
|
109
|
+
admin_assignee_id?: string | number | null | undefined;
|
|
110
|
+
team_assignee_id?: string | number | null | undefined;
|
|
111
|
+
conversation_rating?: {
|
|
112
|
+
[x: string]: unknown;
|
|
113
|
+
rating?: number | null | undefined;
|
|
114
|
+
} | null | undefined;
|
|
115
|
+
ai_agent_participated?: boolean | null | undefined;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
type?: string | null | undefined;
|
|
119
|
+
}>;
|
|
120
|
+
};
|
|
121
|
+
/** The stable id of a shipped preset (`"clerk" | "supabase" | "stripe" | "segment" | "intercom"`). */
|
|
122
|
+
export type PresetId = keyof typeof PRESET_SOURCES;
|
|
123
|
+
/** The slice of the validated env `presetsFromEnv` reads (preset secrets + override). */
|
|
124
|
+
type PresetEnv = Pick<typeof engineEnv, "CLERK_WEBHOOK_SECRET" | "SUPABASE_WEBHOOK_SECRET" | "STRIPE_WEBHOOK_SECRET" | "SEGMENT_WEBHOOK_SECRET" | "INTERCOM_CLIENT_SECRET" | "ENABLED_WEBHOOK_PRESETS">;
|
|
125
|
+
/**
|
|
126
|
+
* Resolve which presets to enable from the validated env (decision #13).
|
|
127
|
+
*
|
|
128
|
+
* Resolution order:
|
|
129
|
+
* 1. `ENABLED_WEBHOOK_PRESETS === "none"` → no presets (hard off).
|
|
130
|
+
* 2. `ENABLED_WEBHOOK_PRESETS` is a csv of ids → exactly those, but ONLY when
|
|
131
|
+
* the preset's secret (`env[auth.envKey]`) is also set (a signature source
|
|
132
|
+
* with no secret fails closed at runtime, so enabling it is pointless).
|
|
133
|
+
* 3. `ENABLED_WEBHOOK_PRESETS === "*"` or absent → AUTO: every preset whose
|
|
134
|
+
* secret is present.
|
|
135
|
+
*
|
|
136
|
+
* In every branch a preset is only returned when its secret is configured, so a
|
|
137
|
+
* preset can never be mounted in an always-fail-closed state by accident.
|
|
138
|
+
*/
|
|
139
|
+
export declare function presetsFromEnv(env: PresetEnv): DefinedWebhookSource[];
|
|
140
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webhook-sources/presets/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAOxE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMqB,CAAC;AAEjD,sGAAsG;AACtG,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,cAAc,CAAC;AAEnD,yFAAyF;AACzF,KAAK,SAAS,GAAG,IAAI,CACnB,OAAO,SAAS,EACd,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,wBAAwB,GACxB,wBAAwB,GACxB,yBAAyB,CAC5B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,oBAAoB,EAAE,CA6BrE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const intercomSource: import("../define-webhook-source.js").DefinedWebhookSource<{
|
|
2
|
+
[x: string]: unknown;
|
|
3
|
+
id: string;
|
|
4
|
+
topic: string;
|
|
5
|
+
data: {
|
|
6
|
+
[x: string]: unknown;
|
|
7
|
+
item: {
|
|
8
|
+
[x: string]: unknown;
|
|
9
|
+
type?: string | null | undefined;
|
|
10
|
+
id?: string | null | undefined;
|
|
11
|
+
source?: {
|
|
12
|
+
[x: string]: unknown;
|
|
13
|
+
author?: {
|
|
14
|
+
[x: string]: unknown;
|
|
15
|
+
type?: string | null | undefined;
|
|
16
|
+
id?: string | null | undefined;
|
|
17
|
+
external_id?: string | null | undefined;
|
|
18
|
+
email?: string | null | undefined;
|
|
19
|
+
name?: string | null | undefined;
|
|
20
|
+
} | null | undefined;
|
|
21
|
+
} | null | undefined;
|
|
22
|
+
contacts?: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
contacts?: {
|
|
25
|
+
[x: string]: unknown;
|
|
26
|
+
type?: string | null | undefined;
|
|
27
|
+
id?: string | null | undefined;
|
|
28
|
+
external_id?: string | null | undefined;
|
|
29
|
+
email?: string | null | undefined;
|
|
30
|
+
name?: string | null | undefined;
|
|
31
|
+
}[] | null | undefined;
|
|
32
|
+
} | null | undefined;
|
|
33
|
+
admin_assignee_id?: string | number | null | undefined;
|
|
34
|
+
team_assignee_id?: string | number | null | undefined;
|
|
35
|
+
conversation_rating?: {
|
|
36
|
+
[x: string]: unknown;
|
|
37
|
+
rating?: number | null | undefined;
|
|
38
|
+
} | null | undefined;
|
|
39
|
+
ai_agent_participated?: boolean | null | undefined;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
type?: string | null | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
//# sourceMappingURL=intercom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intercom.d.ts","sourceRoot":"","sources":["../../../src/webhook-sources/presets/intercom.ts"],"names":[],"mappings":"AA2IA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0FzB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const segmentSource: import("../define-webhook-source.js").DefinedWebhookSource<{
|
|
2
|
+
[x: string]: unknown;
|
|
3
|
+
type: string;
|
|
4
|
+
event?: string | null | undefined;
|
|
5
|
+
messageId?: string | null | undefined;
|
|
6
|
+
userId?: string | null | undefined;
|
|
7
|
+
anonymousId?: string | null | undefined;
|
|
8
|
+
groupId?: string | null | undefined;
|
|
9
|
+
traits?: Record<string, unknown> | null | undefined;
|
|
10
|
+
properties?: Record<string, unknown> | null | undefined;
|
|
11
|
+
context?: {
|
|
12
|
+
[x: string]: unknown;
|
|
13
|
+
traits?: Record<string, unknown> | null | undefined;
|
|
14
|
+
} | null | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=segment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment.d.ts","sourceRoot":"","sources":["../../../src/webhook-sources/presets/segment.ts"],"names":[],"mappings":"AA6DA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;EA8GxB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const stripeSource: import("../define-webhook-source.js").DefinedWebhookSource<{
|
|
2
|
+
[x: string]: unknown;
|
|
3
|
+
id: string;
|
|
4
|
+
type: string;
|
|
5
|
+
data: {
|
|
6
|
+
[x: string]: unknown;
|
|
7
|
+
object: {
|
|
8
|
+
[x: string]: unknown;
|
|
9
|
+
id?: string | undefined;
|
|
10
|
+
object?: string | undefined;
|
|
11
|
+
customer?: string | null | undefined;
|
|
12
|
+
email?: string | null | undefined;
|
|
13
|
+
name?: string | null | undefined;
|
|
14
|
+
phone?: string | null | undefined;
|
|
15
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
object?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=stripe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../../src/webhook-sources/presets/stripe.ts"],"names":[],"mappings":"AAqDA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;EA6FvB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const supabaseSource: import("../define-webhook-source.js").DefinedWebhookSource<{
|
|
2
|
+
[x: string]: unknown;
|
|
3
|
+
type: "INSERT" | "UPDATE" | "DELETE";
|
|
4
|
+
table: string;
|
|
5
|
+
schema: string;
|
|
6
|
+
record?: {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
email?: string | null | undefined;
|
|
10
|
+
phone?: string | null | undefined;
|
|
11
|
+
email_confirmed_at?: string | null | undefined;
|
|
12
|
+
raw_user_meta_data?: Record<string, unknown> | null | undefined;
|
|
13
|
+
} | null | undefined;
|
|
14
|
+
old_record?: {
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
id?: string | undefined;
|
|
17
|
+
email?: string | null | undefined;
|
|
18
|
+
phone?: string | null | undefined;
|
|
19
|
+
email_confirmed_at?: string | null | undefined;
|
|
20
|
+
raw_user_meta_data?: Record<string, unknown> | null | undefined;
|
|
21
|
+
} | null | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
//# sourceMappingURL=supabase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../../src/webhook-sources/presets/supabase.ts"],"names":[],"mappings":"AA4CA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;EAsFzB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The signature verification schemes understood by `defineWebhookSource`'s
|
|
3
|
+
* `auth.type: "signature"` variant. Each preset (Clerk, Supabase, Stripe,
|
|
4
|
+
* Segment) maps to one of these; the route resolves the secret from
|
|
5
|
+
* `env[auth.envKey]` and calls {@link verifySignature} BEFORE parsing/handing
|
|
6
|
+
* the payload to `transform()`.
|
|
7
|
+
*
|
|
8
|
+
* - `"svix"` — Standard Webhooks / Svix header set (`svix-id` /
|
|
9
|
+
* `svix-timestamp` / `svix-signature`). Reuses
|
|
10
|
+
* `svix`'s `Webhook.verify` (the same machinery `plugin-resend`
|
|
11
|
+
* uses for inbound Resend webhooks).
|
|
12
|
+
* - `"stripe"` — `stripe-signature: t=<ts>,v1=<hex>[,v1=<hex>...]`. Computes
|
|
13
|
+
* `HMAC_SHA256(secret, `${t}.${rawBody}`)` with `node:crypto`
|
|
14
|
+
* (NO `stripe` SDK), constant-time compares each `v1` candidate,
|
|
15
|
+
* and enforces the 5-minute timestamp tolerance.
|
|
16
|
+
* - `"hmac-hex"` — Generic `HMAC_SHA256(secret, rawBody)` rendered as lowercase
|
|
17
|
+
* hex, constant-time compared against the header value (e.g.
|
|
18
|
+
* Segment's `x-signature`).
|
|
19
|
+
*/
|
|
20
|
+
export type SignatureScheme = "svix" | "stripe" | "hmac-hex";
|
|
21
|
+
export interface VerifySignatureArgs {
|
|
22
|
+
rawBody: string;
|
|
23
|
+
headers: Record<string, string>;
|
|
24
|
+
secret: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Constant-time string comparison that never short-circuits on length. Returns
|
|
28
|
+
* `false` (rather than throwing) on a length mismatch so callers fail closed.
|
|
29
|
+
* Exported so the connector ingress route reuses ONE hardened compare rather
|
|
30
|
+
* than re-implementing `Buffer.from` + `timingSafeEqual` inline (where a later
|
|
31
|
+
* refactor could drop the length guard and reintroduce the throw-on-mismatch).
|
|
32
|
+
*/
|
|
33
|
+
export declare function safeEqual(a: string, b: string): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Verify an inbound provider webhook signature for the given scheme.
|
|
36
|
+
*
|
|
37
|
+
* FAILS CLOSED: returns `false` (never throws) whenever a required header is
|
|
38
|
+
* missing or the signature does not match. The route enforces that the secret
|
|
39
|
+
* itself is present before calling this — an unset signature secret is a 401,
|
|
40
|
+
* NOT an open pass-through (deliberate divergence from the `"match"` variant,
|
|
41
|
+
* which stays open when unconfigured).
|
|
42
|
+
*
|
|
43
|
+
* For `"hmac-hex"` the header carrying the hex digest is passed via `headerName`
|
|
44
|
+
* (e.g. Segment's `x-signature`); `svix`/`stripe` read their own well-known
|
|
45
|
+
* headers and ignore `headerName`.
|
|
46
|
+
*/
|
|
47
|
+
export declare function verifySignature(scheme: SignatureScheme, args: VerifySignatureArgs, headerName?: string): boolean;
|
|
48
|
+
//# sourceMappingURL=verify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/webhook-sources/verify.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB;AAgBD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAOvD;AAqFD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,mBAAmB,EACzB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAcT"}
|
package/dist/worker.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { DefinedBucket } from "./buckets/define-bucket.js";
|
|
2
|
+
import "./journeys/journey-task-runtime.js";
|
|
3
|
+
import type { DefinedCampaign } from "./campaigns/define-campaign.js";
|
|
4
|
+
import { type ConnectorRuntimeFactory } from "./connectors/runtime.js";
|
|
5
|
+
import type { HogsendClient } from "./container.js";
|
|
6
|
+
import type { DefinedJourney } from "./journeys/define-journey.js";
|
|
7
|
+
export interface CreateWorkerOptions {
|
|
8
|
+
container: HogsendClient;
|
|
9
|
+
journeys: DefinedJourney[];
|
|
10
|
+
/** Buckets whose fast-expiry timer tasks are registered. Defaults to none. */
|
|
11
|
+
buckets?: DefinedBucket[];
|
|
12
|
+
/**
|
|
13
|
+
* Code-defined one-shot campaigns (broadcasts) reconciled at boot into
|
|
14
|
+
* scheduled `campaigns` rows. Defaults to `container.campaigns`.
|
|
15
|
+
*/
|
|
16
|
+
campaigns?: DefinedCampaign[];
|
|
17
|
+
/** Defaults to `container.env.ENABLED_JOURNEYS`. */
|
|
18
|
+
enabledJourneys?: string;
|
|
19
|
+
/** Defaults to `container.env.ENABLED_BUCKETS`. */
|
|
20
|
+
enabledBuckets?: string;
|
|
21
|
+
/** Extra client tasks registered alongside the built-in workflows. */
|
|
22
|
+
extraWorkflows?: unknown[];
|
|
23
|
+
/**
|
|
24
|
+
* Inbound connector-runtime factories keyed by connector id (e.g.
|
|
25
|
+
* `{ discord: createDiscordRuntime }`). When `CONNECTOR_RUNTIME_HOST=worker`
|
|
26
|
+
* (default) and `ENABLE_CONNECTOR_RUNTIMES` is on, the worker elects a single
|
|
27
|
+
* leader replica per gateway connector and holds its socket inline — no
|
|
28
|
+
* separate service, no ingress secret.
|
|
29
|
+
*/
|
|
30
|
+
connectorRuntimes?: Record<string, ConnectorRuntimeFactory>;
|
|
31
|
+
}
|
|
32
|
+
export interface Worker {
|
|
33
|
+
start(): Promise<void>;
|
|
34
|
+
stop(): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
export declare function createWorker(opts: CreateWorkerOptions): Worker;
|
|
37
|
+
//# sourceMappingURL=worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,oCAAoC,CAAC;AAM5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAsCnE,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,aAAa,CAAC;IACzB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B,oDAAoD;IACpD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;IAC3B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CA4M9D"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { JsonObject } from "@hatchet-dev/typescript-sdk/v1/types.js";
|
|
2
|
+
import { type Database } from "@hogsend/db";
|
|
3
|
+
import type { Logger } from "../lib/logger.js";
|
|
4
|
+
/**
|
|
5
|
+
* PRD 04 T5 — fill the five history tables' `contact_id` bookkeeping column for
|
|
6
|
+
* rows that predate the dual-write (and for rows a best-effort dual-write
|
|
7
|
+
* missed, D6).
|
|
8
|
+
*
|
|
9
|
+
* NEVER a migration (`docs/UPGRADING.md:82-87`): this is a chunked, paced,
|
|
10
|
+
* resumable Hatchet task, modelled on `identity-alias-backfill.ts` — an
|
|
11
|
+
* `import_jobs` progress row, boot-enqueued, forceable from admin.
|
|
12
|
+
*
|
|
13
|
+
* Shape, per D3/D4:
|
|
14
|
+
* - PASS 1 iterates **contacts**, not events. Per live contact it derives the
|
|
15
|
+
* canonical key (`contactKeySql()` = `external_id ?? anonymous_id ?? id`) and
|
|
16
|
+
* issues one bounded `UPDATE … WHERE id IN (SELECT id … WHERE user_id = $key
|
|
17
|
+
* AND contact_id IS NULL LIMIT $n)` per table, looped to zero. Every table
|
|
18
|
+
* has a leading `user_id` index, so no statement seq-scans `user_events`.
|
|
19
|
+
* - PASS 2 fills rows keyed on a STALE key that only `contact_aliases` knows,
|
|
20
|
+
* restricted to kinds `external`/`anonymous` (the only kinds a canonical key
|
|
21
|
+
* can ever be). A value owned by more than one live contact across those two
|
|
22
|
+
* kinds is SKIPPED and logged — never guessed (D4).
|
|
23
|
+
*
|
|
24
|
+
* Invariants, each pinned by a test:
|
|
25
|
+
* - **Only `contact_id` is ever written.** No inserts, no deletes, no other
|
|
26
|
+
* column touched (not even `updated_at` — the statements set one column).
|
|
27
|
+
* - **`contact_id IS NULL` guards every UPDATE**, so a re-run, a resume, or the
|
|
28
|
+
* periodic re-sweep (D6) updates zero rows and costs only the probes.
|
|
29
|
+
* - **A row whose key owns NO live contact stays NULL. Forever** (D5). The
|
|
30
|
+
* completion criterion is not "zero NULLs"; T6's probe is what judges it.
|
|
31
|
+
* - **Not a repair tool.** A row already carrying a WRONG non-NULL value is
|
|
32
|
+
* left alone by design (risk 3) — the fix for that is a targeted corrective
|
|
33
|
+
* job, not this sweep.
|
|
34
|
+
*/
|
|
35
|
+
/** `import_jobs.format` discriminator for the reused status record. */
|
|
36
|
+
export declare const CONTACT_ID_BACKFILL_FORMAT = "identity-contact-id-backfill";
|
|
37
|
+
/** The five string-keyed history tables carrying the column (D1). */
|
|
38
|
+
declare const TABLES: readonly ["user_events", "journey_states", "bucket_memberships", "email_sends", "email_preferences"];
|
|
39
|
+
export type ContactIdBackfillTable = (typeof TABLES)[number];
|
|
40
|
+
/** Per-table row counts. A mapped type (not an interface) so it carries the
|
|
41
|
+
* implicit index signature the Hatchet `JsonObject` return contract needs. */
|
|
42
|
+
export type ContactIdBackfillCounts = Record<ContactIdBackfillTable, number>;
|
|
43
|
+
export interface ContactIdBackfillInput extends JsonObject {
|
|
44
|
+
/** `import_jobs` row to record progress on. Optional: the task body runs
|
|
45
|
+
* standalone (tests, operator scripts) without one. */
|
|
46
|
+
jobId?: string;
|
|
47
|
+
/** Live contacts read per keyset chunk. Default 500. */
|
|
48
|
+
contactsPerChunk?: number;
|
|
49
|
+
/** Rows per bounded UPDATE. Default 5,000. */
|
|
50
|
+
rowsPerStatement?: number;
|
|
51
|
+
/** Milliseconds to pause after a statement that wrote. Default 25. */
|
|
52
|
+
pauseMs?: number;
|
|
53
|
+
}
|
|
54
|
+
export interface ContactIdBackfillResult extends JsonObject {
|
|
55
|
+
status: "completed" | "failed";
|
|
56
|
+
/** Live contacts visited by pass 1. */
|
|
57
|
+
contactsScanned: number;
|
|
58
|
+
/** Rows stamped by pass 1, per table (the canonical-key population). */
|
|
59
|
+
canonical: ContactIdBackfillCounts;
|
|
60
|
+
/** Rows stamped by pass 2, per table (the stale-alias population). */
|
|
61
|
+
alias: ContactIdBackfillCounts;
|
|
62
|
+
/** `canonical + alias` across all five tables — the number a re-run must
|
|
63
|
+
* report as 0 (the idempotence assertion). */
|
|
64
|
+
updated: number;
|
|
65
|
+
/** Alias VALUES owned by more than one live contact across the two permitted
|
|
66
|
+
* kinds. Skipped, never guessed (D4); a non-zero count wants a human. */
|
|
67
|
+
ambiguousAliases: number;
|
|
68
|
+
/** PRD 05 T3 — stale `email_preferences` rows whose opt-out state was folded
|
|
69
|
+
* into the contact's already-stamped row for the same address, and which were
|
|
70
|
+
* then deleted. The only rows this job ever removes. */
|
|
71
|
+
preferencesFolded: number;
|
|
72
|
+
/** UPDATE statements issued. Observability for the pacing rule. */
|
|
73
|
+
statements: number;
|
|
74
|
+
reason?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The task body, exported directly so tests and operator scripts can run it
|
|
78
|
+
* without a Hatchet engine. `jobId` is optional; when present, progress lands on
|
|
79
|
+
* the `import_jobs` row (`totalRows` = live contacts, `processedRows` = contacts
|
|
80
|
+
* done, `failedRows` = ambiguous alias values skipped — a divergence metric, NOT
|
|
81
|
+
* an error count).
|
|
82
|
+
*
|
|
83
|
+
* RESUME is free rather than bookkept: an interrupted run is re-driven from the
|
|
84
|
+
* top, re-reads live contacts ordered by `id`, and every UPDATE's
|
|
85
|
+
* `contact_id IS NULL` guard makes an already-done contact a single zero-row
|
|
86
|
+
* probe per table. No cursor is persisted because none is needed.
|
|
87
|
+
*/
|
|
88
|
+
export declare function runContactIdBackfill(opts: {
|
|
89
|
+
db: Database;
|
|
90
|
+
logger: Logger;
|
|
91
|
+
jobId?: string;
|
|
92
|
+
contactsPerChunk?: number;
|
|
93
|
+
rowsPerStatement?: number;
|
|
94
|
+
pauseMs?: number;
|
|
95
|
+
}): Promise<ContactIdBackfillResult>;
|
|
96
|
+
/** One table's verdict. `missing` and `mismatched` are failures; `orphaned`
|
|
97
|
+
* (D5) and `duplicates` (PRD 05 T3) are information and may be non-zero. */
|
|
98
|
+
export interface ContactIdVerifyCounts {
|
|
99
|
+
/** A live contact owns the row's `user_id` — canonically OR by alias — but
|
|
100
|
+
* `contact_id` is NULL and the stamp WOULD land. After a completed sweep this
|
|
101
|
+
* is a HOLE: either the backfill missed the row or a dual-write site dropped
|
|
102
|
+
* it (D6). MUST be 0. */
|
|
103
|
+
missing: number;
|
|
104
|
+
/**
|
|
105
|
+
* PRD 05 T3 — a live contact owns the row's `user_id`, `contact_id` is NULL,
|
|
106
|
+
* and stamping it would violate one of the contact-scoped partial unique
|
|
107
|
+
* indexes because the contact ALREADY holds a row for that live journey / live
|
|
108
|
+
* bucket / address. The sweep skips these on purpose (cancelling someone's
|
|
109
|
+
* live enrollment is not a background job's call), so counting them as
|
|
110
|
+
* `missing` would pin the gate shut forever on a population no sweep can
|
|
111
|
+
* drain. Reported separately so operators can triage it; NOT part of the gate.
|
|
112
|
+
*/
|
|
113
|
+
duplicates: number;
|
|
114
|
+
/** `contact_id` points at a contact that owns the row's `user_id` NEITHER
|
|
115
|
+
* canonically NOR by alias (including a pointer at no contact at all). The
|
|
116
|
+
* corruption detector, and the one count an FK could never give: an FK proves
|
|
117
|
+
* the uuid EXISTS, this proves it is the RIGHT uuid. MUST be 0. */
|
|
118
|
+
mismatched: number;
|
|
119
|
+
/** `contact_id` is NULL and NO live contact owns the key either way — a
|
|
120
|
+
* refused anonymous ingest, a keyless raw send. Expected, permitted, reported.
|
|
121
|
+
* NEVER a failure (D5). */
|
|
122
|
+
orphaned: number;
|
|
123
|
+
}
|
|
124
|
+
/** The probe's verdict for the whole database (or, when scoped, for the keys it
|
|
125
|
+
* was pointed at). */
|
|
126
|
+
export interface ContactIdVerifyResult {
|
|
127
|
+
tables: Record<ContactIdBackfillTable, ContactIdVerifyCounts>;
|
|
128
|
+
/** The five tables summed — what the alert line and the gate read. */
|
|
129
|
+
totals: ContactIdVerifyCounts;
|
|
130
|
+
/**
|
|
131
|
+
* **THE PRD 05 ENTRY GATE.** True iff EVERY table reports `missing === 0` AND
|
|
132
|
+
* `mismatched === 0` — i.e. every row a live contact owns is stamped, and
|
|
133
|
+
* every stamp points at a contact that really owns that row's key. `orphaned`
|
|
134
|
+
* and `duplicates` are deliberately NOT part of the gate (D5 makes the first
|
|
135
|
+
* legitimately non-zero forever; the second is a population the sweep skips on
|
|
136
|
+
* purpose — see {@link ContactIdVerifyCounts.duplicates} — so gating on it
|
|
137
|
+
* would shut the door on a number no sweep can drain). PRD 05 flips reads from `user_id` onto `contact_id`; flipping
|
|
138
|
+
* while this is false means silently losing history (`missing`) or attributing
|
|
139
|
+
* it to the wrong person (`mismatched`). Judge it AFTER a completed sweep — a
|
|
140
|
+
* false reading with no sweep on record is just a pending backfill.
|
|
141
|
+
*/
|
|
142
|
+
flipReady: boolean;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* PRD 04 T6 — the invariant probe, and the thing this PRD ships INSTEAD of a
|
|
146
|
+
* foreign key (D1): an FK proves the uuid exists, this proves it is the right
|
|
147
|
+
* uuid. It is also the only control that can catch a dual-write writing the
|
|
148
|
+
* WRONG contact (risk 3) — the backfill cannot, because it only fills NULLs and
|
|
149
|
+
* will happily leave a wrong non-NULL value in place. **The backfill is not a
|
|
150
|
+
* repair tool**; if `mismatched > 0` the fix is a targeted corrective job.
|
|
151
|
+
*
|
|
152
|
+
* Read-only. Five tables × two set-based statements, run SEQUENTIALLY rather
|
|
153
|
+
* than fanned out: these are full-table probes by nature, and five concurrent
|
|
154
|
+
* scans of the two largest tables in the system is not what an operator wants
|
|
155
|
+
* from an on-demand admin endpoint. Nothing here is on a hot path.
|
|
156
|
+
*
|
|
157
|
+
* `userIds` restricts every count to rows carrying one of those exact `user_id`
|
|
158
|
+
* values. **The gate is the UNSCOPED call** — that is what the admin route runs
|
|
159
|
+
* and what `flipReady` means. The scope exists so a caller can ask the question
|
|
160
|
+
* about a known set of keys; in practice that caller is the test suite, which
|
|
161
|
+
* shares one Postgres with concurrently-running files and would otherwise be
|
|
162
|
+
* reduced to asserting deltas on counts other writers move underneath it.
|
|
163
|
+
*/
|
|
164
|
+
export declare function verifyContactIdBackfill(opts: {
|
|
165
|
+
db: Database;
|
|
166
|
+
userIds?: string[];
|
|
167
|
+
}): Promise<ContactIdVerifyResult>;
|
|
168
|
+
export declare const contactIdBackfillTask: import("@hatchet-dev/typescript-sdk/index.js").TaskWorkflowDeclaration<ContactIdBackfillInput, ContactIdBackfillResult, {}, {}, {}, {}>;
|
|
169
|
+
/**
|
|
170
|
+
* D6 — how stale the newest COMPLETED sweep may be before boot runs another.
|
|
171
|
+
* Read raw off `process.env` (the `OUTBOUND_WEBHOOK_*` tunable stance) and
|
|
172
|
+
* validated here: a missing, non-numeric or non-positive value falls back to 24
|
|
173
|
+
* hours rather than disabling the sweep or hammering it.
|
|
174
|
+
*/
|
|
175
|
+
export declare function contactIdResweepIntervalMs(logger?: Logger): number;
|
|
176
|
+
/**
|
|
177
|
+
* Worker-boot enqueue. Unlike the alias backfill's once-per-deployment gate,
|
|
178
|
+
* this is a **periodic reconcile sweep** (D6, revised): the dual-write is
|
|
179
|
+
* best-effort, so "T5 will fill it later" only holds while a later T5 exists.
|
|
180
|
+
* A run therefore starts when EITHER
|
|
181
|
+
* - no completed job of this format exists yet, OR
|
|
182
|
+
* - the newest completed one is older than `CONTACT_ID_BACKFILL_RESWEEP_HOURS`
|
|
183
|
+
* (default 24h).
|
|
184
|
+
* A `pending`/`processing` row always wins — two sweeps must never stack. (A
|
|
185
|
+
* run killed hard enough to never mark its row terminal therefore parks the
|
|
186
|
+
* boot sweep until an operator marks it failed; `POST
|
|
187
|
+
* /v1/admin/maintenance/backfill-contact-id` bypasses this guard entirely and
|
|
188
|
+
* is the escape hatch.)
|
|
189
|
+
*
|
|
190
|
+
* Re-running is cheap by construction: every UPDATE is guarded by
|
|
191
|
+
* `contact_id IS NULL`, so a steady-state sweep is five zero-row probes per
|
|
192
|
+
* contact and writes nothing. Boot-triggered rather than operator-triggered
|
|
193
|
+
* deliberately — the engine is a published dependency, and a manual step every
|
|
194
|
+
* consumer must remember is how deployments strand at PRD 05. Best-effort: a
|
|
195
|
+
* failure to enqueue must never crash worker boot.
|
|
196
|
+
*/
|
|
197
|
+
export declare function enqueueContactIdBackfill(opts: {
|
|
198
|
+
db: Database;
|
|
199
|
+
logger: Logger;
|
|
200
|
+
}): Promise<void>;
|
|
201
|
+
export {};
|
|
202
|
+
//# sourceMappingURL=backfill-contact-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backfill-contact-id.d.ts","sourceRoot":"","sources":["../../src/workflows/backfill-contact-id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAY,KAAK,QAAQ,EAAc,MAAM,aAAa,CAAC;AAKlE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,iCAAiC,CAAC;AAEzE,qEAAqE;AACrE,QAAA,MAAM,MAAM,sGAMF,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;8EAC8E;AAC9E,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;AAmB7E,MAAM,WAAW,sBAAuB,SAAQ,UAAU;IACxD;2DACuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,MAAM,WAAW,uBAAwB,SAAQ,UAAU;IACzD,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,SAAS,EAAE,uBAAuB,CAAC;IACnC,sEAAsE;IACtE,KAAK,EAAE,uBAAuB,CAAC;IAC/B;kDAC8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB;6EACyE;IACzE,gBAAgB,EAAE,MAAM,CAAC;IACzB;;4DAEwD;IACxD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mEAAmE;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAsRD;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CA0KnC;AAMD;4EAC4E;AAC5E,MAAM,WAAW,qBAAqB;IACpC;;;6BAGyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;uEAGmE;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB;;+BAE2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;sBACsB;AACtB,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC,sBAAsB,EAAE,qBAAqB,CAAC,CAAC;IAC9D,sEAAsE;IACtE,MAAM,EAAE,qBAAqB,CAAC;IAC9B;;;;;;;;;;;OAWG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAkJD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,EAAE,EAAE,QAAQ,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAuBjC;AAED,eAAO,MAAM,qBAAqB,yIAmBhC,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAclE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,wBAAwB,CAAC,IAAI,EAAE;IACnD,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDhB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { JsonObject } from "@hatchet-dev/typescript-sdk/v1/types.js";
|
|
2
|
+
import { type ConditionEval } from "@hogsend/core";
|
|
3
|
+
import { type Database } from "@hogsend/db";
|
|
4
|
+
import type { Logger } from "../lib/logger.js";
|
|
5
|
+
/** import_jobs.format discriminator for the reused status record (Section 6.6). */
|
|
6
|
+
export declare const FIRST_TIME_FORMAT = "bucket-backfill";
|
|
7
|
+
/**
|
|
8
|
+
* A stable fingerprint of a bucket's criteria (Section 6.6 B). Normalizes the
|
|
9
|
+
* `ConditionEval` tree (sorted object keys so key order does not change the hash),
|
|
10
|
+
* then sha256-hex. Persisted on `bucket_configs.criteriaHash` and diffed on the
|
|
11
|
+
* next boot to detect a criteria change and enqueue re-evaluation.
|
|
12
|
+
*/
|
|
13
|
+
export declare function computeCriteriaHash(criteria: ConditionEval | undefined): string;
|
|
14
|
+
/**
|
|
15
|
+
* Engine-owned backfill / criteria-change re-evaluation task (Section 6.6). Runs in
|
|
16
|
+
* two modes:
|
|
17
|
+
*
|
|
18
|
+
* - mode:"first-time" — a NEW bucket id appeared. Materialize the full member set
|
|
19
|
+
* via a SET-BASED query per criteria shape, insert `active` rows
|
|
20
|
+
* (`source:"backfill"`, onConflictDoNothing on the partial-active unique
|
|
21
|
+
* index), and SUPPRESS live join emission (historical matches must not fire
|
|
22
|
+
* `bucket:entered` into live journeys — the Customer.io rule).
|
|
23
|
+
* - mode:"reeval" — an EXISTING bucket's criteria changed (detected via
|
|
24
|
+
* `criteriaHash` diff at boot). A FULL diff: INSERT active rows for new
|
|
25
|
+
* matchers (joins, NO emit) AND transition active members who no longer match
|
|
26
|
+
* → `left` via CAS (leaves EMIT `bucket:left` so in-flight journeys exit).
|
|
27
|
+
*
|
|
28
|
+
* Progress is tracked in `import_jobs` (the precedent), discriminated by `format`
|
|
29
|
+
* (`bucket-backfill` / `bucket-reeval`) with `fileName` carrying the bucketId, so
|
|
30
|
+
* the Studio "building / live" badge derives from a real status record (Section
|
|
31
|
+
* 11.3). Set-based, chunked, idempotent, resumable — never run in a migration.
|
|
32
|
+
*/
|
|
33
|
+
export interface BucketBackfillInput extends JsonObject {
|
|
34
|
+
jobId: string;
|
|
35
|
+
bucketId: string;
|
|
36
|
+
mode: "first-time" | "reeval";
|
|
37
|
+
}
|
|
38
|
+
export declare const bucketBackfillTask: import("@hatchet-dev/typescript-sdk/index.js").TaskWorkflowDeclaration<BucketBackfillInput, {
|
|
39
|
+
status: string;
|
|
40
|
+
reason: string;
|
|
41
|
+
joined?: undefined;
|
|
42
|
+
left?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
status: string;
|
|
45
|
+
joined: number;
|
|
46
|
+
left: number;
|
|
47
|
+
reason?: undefined;
|
|
48
|
+
}, {}, {}, {}, {}>;
|
|
49
|
+
/**
|
|
50
|
+
* Detect first-time / criteria-changed buckets at worker boot and enqueue a
|
|
51
|
+
* backfill / re-eval job per bucket (Section 6.6 B). For each enabled dynamic
|
|
52
|
+
* bucket: read the stored `bucket_configs.criteriaHash`; if absent → first-time
|
|
53
|
+
* backfill; if present but different → re-eval; if equal → no-op. Creates an
|
|
54
|
+
* `import_jobs` status record (discriminated by `format`) and pushes
|
|
55
|
+
* `bucketBackfillTask.run(...)` for it.
|
|
56
|
+
*
|
|
57
|
+
* Idempotent and safe to call on every boot — equal hashes are skipped. Best-effort
|
|
58
|
+
* (a failure to enqueue must not crash worker boot).
|
|
59
|
+
*/
|
|
60
|
+
export declare function enqueueBucketBackfills(opts: {
|
|
61
|
+
db: Database;
|
|
62
|
+
logger: Logger;
|
|
63
|
+
}): Promise<void>;
|
|
64
|
+
//# sourceMappingURL=bucket-backfill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bucket-backfill.d.ts","sourceRoot":"","sources":["../../src/workflows/bucket-backfill.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAIL,KAAK,QAAQ,EAGd,MAAM,aAAa,CAAC;AAuBrB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAwB/C,mFAAmF;AACnF,eAAO,MAAM,iBAAiB,oBAAoB,CAAC;AAGnD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,aAAa,GAAG,SAAS,GAClC,MAAM,CAIR;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,GAAG,QAAQ,CAAC;CAC/B;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;kBAoF7B,CAAC;AA4gBH;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDhB"}
|