@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,622 @@
|
|
|
1
|
+
import { contacts, type Database, emailPreferences } from "@hogsend/db";
|
|
2
|
+
import { type SQL } from "drizzle-orm";
|
|
3
|
+
import { type ContactUnlinkFact, type LinkOwner } from "./account-links.js";
|
|
4
|
+
export declare const UUID_REGEX: RegExp;
|
|
5
|
+
/**
|
|
6
|
+
* `contact_aliases.reason` values written by PRD 02's dual-write and backfill.
|
|
7
|
+
* One exported const per value so the writer (here), the backfill job
|
|
8
|
+
* (`workflows/identity-alias-backfill.ts`) and any rollback statement share a
|
|
9
|
+
* single spelling — `reason` is bare text with no CHECK, so a typo would
|
|
10
|
+
* silently escape a string-matched filter. The pre-existing `'promote'` /
|
|
11
|
+
* `'merge'` literals are provenance events and are deliberately not touched.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ALIAS_REASON_RESOLVE = "resolve";
|
|
14
|
+
export declare const ALIAS_REASON_BACKFILL = "backfill";
|
|
15
|
+
/**
|
|
16
|
+
* Thrown by {@link resolveOrCreateContact} when a PUBLISHABLE (browser, pk_) anon
|
|
17
|
+
* write would attach to / merge into / mutate a contact that already carries an
|
|
18
|
+
* IDENTIFIED key (`external_id` or `email`), OR would drive a collide-MERGE.
|
|
19
|
+
*
|
|
20
|
+
* The `anonymousId` (PostHog `get_distinct_id()`) is browser-readable by design,
|
|
21
|
+
* so on the publishable path it is NOT a secret and must never be a merge driver
|
|
22
|
+
* or a path to a victim's identified contact. An anon-only publishable write may
|
|
23
|
+
* only create or update its OWN anonymous-only contact. Handlers translate this
|
|
24
|
+
* to a 403. The secret-key path NEVER sets `restrictToAnonymous`, so its behavior
|
|
25
|
+
* is unchanged.
|
|
26
|
+
*/
|
|
27
|
+
export declare class PublishableAnonymousMergeError extends Error {
|
|
28
|
+
constructor(message?: string);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Thrown by the resolver when a supplied identity key's kind is absent from
|
|
32
|
+
* the caller's declared `ResolvePolicy.trustedKinds` (PRD 06 T5).
|
|
33
|
+
*
|
|
34
|
+
* INTERNAL — deliberately NOT exported from `index.ts`. This is defence in
|
|
35
|
+
* depth, not a request-shaping tool: every browser-facing route is already
|
|
36
|
+
* gated one layer up (`gatePublishableIdentity` for `/v1/events`,
|
|
37
|
+
* `/v1/contacts` and the `lists` handlers; `arrive`'s keys come from the
|
|
38
|
+
* first-write-wins stamp; `feed`'s re-ingests are engine-internal full-trust
|
|
39
|
+
* with a server-derived subject — the three-legged L3 proof), so this throw
|
|
40
|
+
* is unreachable from every route today. It exists to catch a FUTURE route
|
|
41
|
+
* that forgets the gate — a caller bug, surfaced loudly in dev, never a
|
|
42
|
+
* condition for consumers to branch on. Thrown BEFORE any advisory lock is
|
|
43
|
+
* taken and before the transaction opens, so a refused call leaves no lock
|
|
44
|
+
* and no row behind.
|
|
45
|
+
*/
|
|
46
|
+
export declare class UntrustedKeyKindError extends Error {
|
|
47
|
+
constructor(kind: string, trustedKinds: readonly string[]);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* True when `value` names an IDENTIFIED person: a live contact's canonical
|
|
51
|
+
* `external_id` (or its `email` when that is its canonical key), OR — via the
|
|
52
|
+
* identity table — any non-anonymous key a live contact holds, including a
|
|
53
|
+
* merged loser's STALE key (PRD 07 T6b). Such a value must NOT be claimable by
|
|
54
|
+
* a token-less publishable/unauthenticated caller as an "anon id" (the
|
|
55
|
+
* feed-read and arrival-stamp forgery guard).
|
|
56
|
+
*
|
|
57
|
+
* A genuine browser anon id only ever matches a contact via `anonymous_id`
|
|
58
|
+
* whose canonical key is that same anon id (the contact has no `external_id`)
|
|
59
|
+
* — that is the caller's OWN anon contact and is allowed (returns false).
|
|
60
|
+
*
|
|
61
|
+
* Lives here beside `PublishableAnonymousMergeError` because it is the same
|
|
62
|
+
* invariant read-side: consumed by `resolveFeedRecipient` (feed reads) and
|
|
63
|
+
* `POST /v1/t/arrive` (arrival stamps).
|
|
64
|
+
*/
|
|
65
|
+
export declare function collidesWithIdentified(db: Database, value: string): Promise<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
* Thrown by {@link resolveOrCreateContact}'s engine-internal `contactId` pin when
|
|
68
|
+
* the pinned subject row no longer exists and no merge-alias chain leads to a live
|
|
69
|
+
* survivor (the subject was hard-deleted). The internal re-emit is then dropped
|
|
70
|
+
* (ingestEvent returns `{ stored: false }`, logs `identity.provenance.lost`) rather
|
|
71
|
+
* than value-resolving — a value fall-back could mint the very phantom twin the
|
|
72
|
+
* pin exists to prevent. Reachable ONLY for a hard-deleted/unfollowable subject.
|
|
73
|
+
*/
|
|
74
|
+
export declare class ContactProvenanceLostError extends Error {
|
|
75
|
+
readonly contactId: string;
|
|
76
|
+
constructor(contactId: string);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The transaction handle drizzle hands to a `db.transaction(cb)` callback. It
|
|
80
|
+
* exposes the same `.select/.insert/.update/.execute/.query` surface as the
|
|
81
|
+
* top-level `Database`, so the merge helpers below accept it interchangeably.
|
|
82
|
+
*/
|
|
83
|
+
type Tx = Parameters<Parameters<Database["transaction"]>[0]>[0];
|
|
84
|
+
type ContactRow = typeof contacts.$inferSelect;
|
|
85
|
+
export declare function resolveContact(opts: {
|
|
86
|
+
db: Database;
|
|
87
|
+
id: string;
|
|
88
|
+
}): Promise<{
|
|
89
|
+
email: string | null;
|
|
90
|
+
id: string;
|
|
91
|
+
createdAt: Date;
|
|
92
|
+
updatedAt: Date;
|
|
93
|
+
organizationId: string | null;
|
|
94
|
+
externalId: string | null;
|
|
95
|
+
anonymousId: string | null;
|
|
96
|
+
discordId: string | null;
|
|
97
|
+
phone: string | null;
|
|
98
|
+
source: string | null;
|
|
99
|
+
sourcedAt: Date | null;
|
|
100
|
+
timezone: string | null;
|
|
101
|
+
properties: Record<string, unknown> | null;
|
|
102
|
+
firstSeenAt: Date;
|
|
103
|
+
lastSeenAt: Date;
|
|
104
|
+
deletedAt: Date | null;
|
|
105
|
+
} | null>;
|
|
106
|
+
export interface SerializedContact {
|
|
107
|
+
id: string;
|
|
108
|
+
externalId: string | null;
|
|
109
|
+
email: string | null;
|
|
110
|
+
properties: Record<string, unknown>;
|
|
111
|
+
firstSeenAt: string;
|
|
112
|
+
lastSeenAt: string;
|
|
113
|
+
createdAt: string;
|
|
114
|
+
updatedAt: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Serialize a contact row to its JSON shape (timestamps → ISO strings). The
|
|
118
|
+
* PUBLIC `/v1/contacts` Contact shape (§2.5 / `@hogsend/client`) does NOT include
|
|
119
|
+
* `anonymousId`; the admin surface does. `includeAnonymousId` toggles that single
|
|
120
|
+
* field (and the return type) so both routes share one serializer without
|
|
121
|
+
* diverging the public type.
|
|
122
|
+
*/
|
|
123
|
+
export declare function serializeContact(row: ContactRow, opts: {
|
|
124
|
+
includeAnonymousId: true;
|
|
125
|
+
}): SerializedContact & {
|
|
126
|
+
anonymousId: string | null;
|
|
127
|
+
};
|
|
128
|
+
export declare function serializeContact(row: ContactRow, opts?: {
|
|
129
|
+
includeAnonymousId?: false;
|
|
130
|
+
}): SerializedContact;
|
|
131
|
+
/**
|
|
132
|
+
* The BROWSER-safe projection of a contact (`GET /v1/contacts/me`). Applies the
|
|
133
|
+
* operator allowlist: only EXACT `publicProperties` keys survive, and `email`
|
|
134
|
+
* is present only when `exposeEmail` is on. A missing row projects to
|
|
135
|
+
* `{ identified: false, traits: {} }` — the route never 404s, so the absence of
|
|
136
|
+
* a contact is indistinguishable from an empty allowlist.
|
|
137
|
+
*
|
|
138
|
+
* `identified` means the row carries a real identity (`externalId` or `email`);
|
|
139
|
+
* an anonymous-only row reads its own traits but is NOT identified.
|
|
140
|
+
*/
|
|
141
|
+
export declare function projectPublicContact(row: ContactRow | null | undefined, config: {
|
|
142
|
+
publicProperties: string[];
|
|
143
|
+
exposeEmail: boolean;
|
|
144
|
+
}): {
|
|
145
|
+
identified: boolean;
|
|
146
|
+
traits: Record<string, unknown>;
|
|
147
|
+
email?: string | null;
|
|
148
|
+
};
|
|
149
|
+
export declare function serializePrefs(row: typeof emailPreferences.$inferSelect): {
|
|
150
|
+
id: string;
|
|
151
|
+
userId: string;
|
|
152
|
+
email: string;
|
|
153
|
+
unsubscribedAll: boolean;
|
|
154
|
+
suppressed: boolean;
|
|
155
|
+
bounceCount: number;
|
|
156
|
+
categories: Record<string, boolean>;
|
|
157
|
+
suppressedAt: string | null;
|
|
158
|
+
lastBounceAt: string | null;
|
|
159
|
+
};
|
|
160
|
+
export declare function contactSearchFilter(search: string): SQL<unknown> | undefined;
|
|
161
|
+
/**
|
|
162
|
+
* "Has this person EVER identified?" — the single display predicate behind
|
|
163
|
+
* `GET /v1/admin/contacts?identity=…` and Studio's identified-only default.
|
|
164
|
+
*
|
|
165
|
+
* FOUR columns, not two. `external_id` and `email` are the obvious pair, but
|
|
166
|
+
* `contacts.discord_id` and `contacts.phone` are documented in the schema as
|
|
167
|
+
* RESOLVABLE identity keys, NOT properties (`schema/contacts.ts:34-53`), each
|
|
168
|
+
* carrying its own live partial-unique index. A Discord-linked community
|
|
169
|
+
* member and an SMS-only subscriber have both identified; dropping either leg
|
|
170
|
+
* makes a real customer vanish from the default list. `anonymous_id` is
|
|
171
|
+
* deliberately absent — it is exactly what this predicate exists to exclude.
|
|
172
|
+
*
|
|
173
|
+
* The complement is `not(identifiedContactFilter())`, and it is EXACT: every
|
|
174
|
+
* operand is `IS NOT NULL`, which never yields NULL, so three-valued logic
|
|
175
|
+
* cannot swallow a row under the negation. Hence
|
|
176
|
+
* `total(identified) + total(anonymous) === total(all)`, and the rare keyless
|
|
177
|
+
* row (no identity column at all — the engine already handles those by uuid)
|
|
178
|
+
* lands in `anonymous`, which is the truthful bucket for it.
|
|
179
|
+
*
|
|
180
|
+
* FUTURE (PRD 02/03) — the swap is this function body and nothing else:
|
|
181
|
+
*
|
|
182
|
+
* ```ts
|
|
183
|
+
* or(
|
|
184
|
+
* sql`exists (select 1 from contact_aliases ca
|
|
185
|
+
* where ca.contact_id = ${contacts.id} and ca.alias_kind <> 'anonymous')`,
|
|
186
|
+
* isNotNull(contacts.phone),
|
|
187
|
+
* )
|
|
188
|
+
* ```
|
|
189
|
+
*
|
|
190
|
+
* Two ordering rules govern it. (1) It is correct only AFTER PRD 02's alias
|
|
191
|
+
* backfill is verified — today `contact_aliases` is written only on
|
|
192
|
+
* merge/promote, so the `EXISTS` would read as "never identified" for almost
|
|
193
|
+
* everyone and empty the list. (2) The `phone` leg SURVIVES the swap: PRD 02
|
|
194
|
+
* deliberately excludes phone from both the backfill and the dual-write
|
|
195
|
+
* (phone is not yet a merge-participating `Kind`), so a phone-only contact has
|
|
196
|
+
* no non-anonymous alias row. That leg retires only when phone joins the
|
|
197
|
+
* identity table.
|
|
198
|
+
*
|
|
199
|
+
* PRD 07 verdict (2026-07-29): the swap is NOT taken. The rescope keeps the
|
|
200
|
+
* columns as written mirrors forever, so these `IS NOT NULL` legs stay exact —
|
|
201
|
+
* and the swap would empty the list on a deployment whose alias backfill never
|
|
202
|
+
* ran, for zero benefit. Revisit only if the columns ever actually die.
|
|
203
|
+
*/
|
|
204
|
+
export declare function identifiedContactFilter(): SQL;
|
|
205
|
+
/**
|
|
206
|
+
* Normalized, sendable email: `trim` + `toLowerCase`. No dot/+tag stripping —
|
|
207
|
+
* we store the NORMALIZED RAW email (D1), so the address must still deliver.
|
|
208
|
+
*/
|
|
209
|
+
export declare function normalizeEmail(raw: string): string;
|
|
210
|
+
/** `normalizeEmail` for a maybe-missing address. */
|
|
211
|
+
export declare function normalizeEmailOrNull(email: string | null | undefined): string | null;
|
|
212
|
+
/**
|
|
213
|
+
* The four key kinds identity resolution understands (PRD 06 — the module-local
|
|
214
|
+
* `Kind` promoted to the public API). `phone` is deliberately absent: it is not
|
|
215
|
+
* yet a merge-participating kind (SMS STOP resolves a contact by a direct
|
|
216
|
+
* `contacts.phone` lookup, outside the resolver).
|
|
217
|
+
*/
|
|
218
|
+
export type IdentityKind = "external" | "email" | "anonymous" | "discord";
|
|
219
|
+
export type Kind = IdentityKind;
|
|
220
|
+
/**
|
|
221
|
+
* Explicit, caller-declared trust for ONE resolve call (PRD 06). Replaces the
|
|
222
|
+
* legacy inference from `restrictToAnonymous`/`allowCreate` plus *which keys
|
|
223
|
+
* happen to be present*: trust travels with the call instead of being
|
|
224
|
+
* reconstructed inside the resolver. Pass at most one shape — `policy` OR the
|
|
225
|
+
* legacy fields — never both (the resolver throws; no precedence rule exists).
|
|
226
|
+
*/
|
|
227
|
+
export interface ResolvePolicy {
|
|
228
|
+
/**
|
|
229
|
+
* MINT policy. `"on-miss"` is the historic create arm: when no live contact
|
|
230
|
+
* owns any supplied key, insert one. `"refuse-on-miss"` is the D1 observation
|
|
231
|
+
* refusal: return `{ id: null }` and mint nothing (reachable only through
|
|
232
|
+
* {@link resolveContactNoCreate}). The refusal KEY is never accepted from the
|
|
233
|
+
* caller — it stays DERIVED (`userId ?? anonymousId`) and D8-validated inside
|
|
234
|
+
* `resolveContactNoCreate`: a caller-supplied key could diverge from what the
|
|
235
|
+
* create arm would have made canonical and strand the event's history under a
|
|
236
|
+
* key no contact will ever own (A1).
|
|
237
|
+
*/
|
|
238
|
+
create: "on-miss" | "refuse-on-miss";
|
|
239
|
+
/**
|
|
240
|
+
* MERGE/ATTACH policy. `"any"` is the historic unrestricted behavior.
|
|
241
|
+
* `"anonymous-only"` is the publishable clamp (§Phase 1 GAP-1, the legacy
|
|
242
|
+
* `restrictToAnonymous`): it bites only when the supplied keys are EXACTLY
|
|
243
|
+
* one `anonymous` key, and then refuses to fill-in-link to / merge with an
|
|
244
|
+
* identified contact and ignores the `contactId` provenance pin.
|
|
245
|
+
*
|
|
246
|
+
* `"never-identified-pair"` is RESERVED and NOT IMPLEMENTED — selecting it
|
|
247
|
+
* throws until it is. It names the rule the current vocabulary cannot
|
|
248
|
+
* express: never merge two ALREADY-IDENTIFIED persons. The concrete harm it
|
|
249
|
+
* will one day prevent: person A signs in on a browser (the browser's anon
|
|
250
|
+
* id `V` is claimed onto A's identified contact), then person B signs in on
|
|
251
|
+
* the SAME browser without `reset()` — the resolve `{ userId: B,
|
|
252
|
+
* anonymousId: V }` finds two candidates, both identified, and
|
|
253
|
+
* `mergeContacts` folds two real humans into one: {@link pickSurvivor}
|
|
254
|
+
* prefers identified-then-oldest and never checks whether BOTH candidates
|
|
255
|
+
* are identified. Shared computers, family devices and kiosks make this an
|
|
256
|
+
* ordinary event, not an attack. Fixing it is a behaviour change and out of
|
|
257
|
+
* this refactor's scope (D8); no built-in caller selects the value.
|
|
258
|
+
*/
|
|
259
|
+
allowMerge: "any" | "anonymous-only" | "never-identified-pair";
|
|
260
|
+
/**
|
|
261
|
+
* The key kinds THIS CALLER is authorized to assert. ENFORCED (PRD 06 T5):
|
|
262
|
+
* a supplied key whose kind is absent from this list throws
|
|
263
|
+
* `UntrustedKeyKindError` — after the keys array is built, before any
|
|
264
|
+
* advisory lock is taken and before the transaction opens. The default when
|
|
265
|
+
* no policy is supplied is all four kinds, so legacy-shape callers are
|
|
266
|
+
* unaffected.
|
|
267
|
+
*/
|
|
268
|
+
trustedKinds: readonly IdentityKind[];
|
|
269
|
+
}
|
|
270
|
+
/** Every kind — the legacy shapes' implicit trust grant (the server default).
|
|
271
|
+
* Exported (module-level, not public API) so policy-declaring callers state
|
|
272
|
+
* the full grant without re-spelling the four literals (PRD 06 T3). */
|
|
273
|
+
export declare const ALL_IDENTITY_KINDS: readonly IdentityKind[];
|
|
274
|
+
/** The canonical text user_id key for a contact: external_id ?? anonymous_id ??
|
|
275
|
+
* id. This is what the 5 contact-referencing tables join on (risk 1). */
|
|
276
|
+
export declare function contactKey(row: ContactRow): string;
|
|
277
|
+
/**
|
|
278
|
+
* The SQL analogue of {@link contactKey}: the canonical text user_id key as a
|
|
279
|
+
* `coalesce(external_id, anonymous_id, id::text)` fragment. The `::text` cast on
|
|
280
|
+
* `id` (uuid) is required — `coalesce(text, text, uuid)` is rejected by Postgres
|
|
281
|
+
* (42804). Used by every set-based query that projects/joins on the resolved key
|
|
282
|
+
* (bucket backfill + reconcile) so the cast lives in exactly one place.
|
|
283
|
+
*/
|
|
284
|
+
export declare function contactKeySql(): SQL<string>;
|
|
285
|
+
/**
|
|
286
|
+
* The identity keys + options EVERY resolve entry point accepts. Named (rather
|
|
287
|
+
* than inline) so {@link resolveOrCreateContact} and {@link
|
|
288
|
+
* resolveContactNoCreate} declare one option shape over one implementation
|
|
289
|
+
* ({@link resolveContactShared}) and can never drift apart. Purely an
|
|
290
|
+
* extraction — the exported parameter type is structurally unchanged.
|
|
291
|
+
*/
|
|
292
|
+
interface ResolveContactOptions {
|
|
293
|
+
db: Database;
|
|
294
|
+
userId?: string;
|
|
295
|
+
email?: string;
|
|
296
|
+
anonymousId?: string;
|
|
297
|
+
discordId?: string;
|
|
298
|
+
contactProperties?: Record<string, unknown>;
|
|
299
|
+
/**
|
|
300
|
+
* PUBLISHABLE (browser, pk_) safety clamp (§Phase 1 GAP-1). When set, an
|
|
301
|
+
* anon-only write (no `userId`/`email`/`discordId`) may ONLY create or update
|
|
302
|
+
* its own anonymous-only contact: it is forbidden from filling-in-linking to,
|
|
303
|
+
* or merging with, any contact that already carries an `external_id`/`email`,
|
|
304
|
+
* and from driving a collide-MERGE — throwing {@link
|
|
305
|
+
* PublishableAnonymousMergeError}. The `anonymousId` is browser-readable
|
|
306
|
+
* (`get_distinct_id()`), so without this clamp a pk_ key could forge events as
|
|
307
|
+
* / poison a victim's identified contact via the anon resolution arm. The
|
|
308
|
+
* secret-key path NEVER sets this, so its behavior is byte-for-byte unchanged.
|
|
309
|
+
*
|
|
310
|
+
* @deprecated PRD 06 — declare {@link ResolvePolicy} instead:
|
|
311
|
+
* `policy: { allowMerge: "anonymous-only", … }`. Still fully accepted and
|
|
312
|
+
* honoured (removal is a breaking change deferred to a later sweep), but
|
|
313
|
+
* mutually exclusive with `policy` — supplying both shapes throws.
|
|
314
|
+
*/
|
|
315
|
+
restrictToAnonymous?: boolean;
|
|
316
|
+
/**
|
|
317
|
+
* Explicit caller trust (PRD 06). Mutually exclusive with the legacy
|
|
318
|
+
* `restrictToAnonymous` field (and, on the internal shared body, the derived
|
|
319
|
+
* `refuseCreateWithKey` channel): supplying both shapes throws — no
|
|
320
|
+
* precedence rule exists. Absent ⇒ the legacy fields (or their defaults)
|
|
321
|
+
* apply unchanged.
|
|
322
|
+
*/
|
|
323
|
+
policy?: ResolvePolicy;
|
|
324
|
+
/**
|
|
325
|
+
* ENGINE-INTERNAL provenance — the subject contact's UNFORGEABLE row id
|
|
326
|
+
* (`contacts.id`, a server-minted uuid). Set ONLY by engine-internal re-emit
|
|
327
|
+
* sites that already resolved the subject (ingestEvent's downstream re-ingests,
|
|
328
|
+
* the feed mark/clear re-ingests, journey/bucket re-emits). When present (and
|
|
329
|
+
* uuid-shaped, and not a clamped publishable write), the resolver PINS to that
|
|
330
|
+
* exact row — never value-resolving, never minting — so an internal event whose
|
|
331
|
+
* `userId` is a contact's own canonical key (its anonymous_id/id round-tripping)
|
|
332
|
+
* folds back into that contact instead of minting a phantom `external_id` twin.
|
|
333
|
+
* NEVER settable from a request body: the public `/v1/events`/`/v1/contacts`/
|
|
334
|
+
* `/v1/feed` Zod schemas omit it and their handlers build the resolve call
|
|
335
|
+
* literally, so an attacker cannot forge provenance. Mutually exclusive with
|
|
336
|
+
* `restrictToAnonymous`.
|
|
337
|
+
*/
|
|
338
|
+
contactId?: string;
|
|
339
|
+
/**
|
|
340
|
+
* PROVENANCE (best-effort metadata, NOT an identity key): the Source id that
|
|
341
|
+
* created this contact — a Contact Source id ("clay"/"attio") or the ingest
|
|
342
|
+
* `source`. First-touch: written on create, and on a fill-in-link/merge that
|
|
343
|
+
* supplies one ONLY when the resolved row has none; never overwrites an
|
|
344
|
+
* existing value. NEVER participates in key resolution or survivor selection,
|
|
345
|
+
* so it cannot steer identity — a safe non-identity column threaded alongside.
|
|
346
|
+
*/
|
|
347
|
+
source?: string;
|
|
348
|
+
/** Timestamp paired with {@link source}; defaults to now() at create time. */
|
|
349
|
+
sourcedAt?: Date;
|
|
350
|
+
/**
|
|
351
|
+
* JOURNEY-PLANE opt-out for the merge fold's `account.unlinked` re-ingest
|
|
352
|
+
* (PRD 08 T5). Default `true`: an organic resolve (a live `/v1/events`
|
|
353
|
+
* ingest that happens to fold two contacts) SHOULD enrol journeys on the
|
|
354
|
+
* `account.unlinked` a merge produced, exactly as a direct unlink would.
|
|
355
|
+
*
|
|
356
|
+
* A BULK importer sets `false`. A CSV import is a statement about the PAST,
|
|
357
|
+
* and one job can merge many rows whose losers each held a live linked
|
|
358
|
+
* account — so left on, a single import would fan out one journey enrolment
|
|
359
|
+
* per such row (the same amplification class the `/v1/accounts/import`
|
|
360
|
+
* route gates with its own `enrollJourneys`). This suppresses ONLY the
|
|
361
|
+
* journey plane; the outbound `account.unlinked` webhook still fires, so the
|
|
362
|
+
* customer's mirror converges whether or not a journey ran.
|
|
363
|
+
*/
|
|
364
|
+
enrollJourneys?: boolean;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* One `linked_accounts` soft-unlink the merge fold performed (PRD 04 T2): the
|
|
368
|
+
* loser's live singleton link lost the arbitration to the survivor's. PRD 08
|
|
369
|
+
* emits one `account.unlinked` per entry AFTER the resolve transaction
|
|
370
|
+
* commits; nothing is emitted here (DECISIONS §8). `version` is that pair's
|
|
371
|
+
* OWN next version, a STRING end to end (DECISIONS §5.1).
|
|
372
|
+
*/
|
|
373
|
+
export interface MergedLinkUnlink {
|
|
374
|
+
provider: string;
|
|
375
|
+
providerUserId: string;
|
|
376
|
+
version: string;
|
|
377
|
+
/** The loser contact that held the soft-unlinked row. */
|
|
378
|
+
contactId: string;
|
|
379
|
+
reason: "relinked";
|
|
380
|
+
/**
|
|
381
|
+
* The owner facts the store read INSIDE the fold's transaction (DECISIONS
|
|
382
|
+
* §15.5). PRD 08's payload carries `userId` (`contactKey()`) and `email`,
|
|
383
|
+
* and neither lives on `linked_accounts` — without carrying them here the
|
|
384
|
+
* post-commit emit would either ship two nulls or bolt a second contacts
|
|
385
|
+
* read on after the lock released, which is no longer the state that
|
|
386
|
+
* committed. `unlinkAccountInTx`'s `unlinked` arm returns it
|
|
387
|
+
* (`account-links.ts:260`) and the fold only narrows to that arm, so the
|
|
388
|
+
* fold copies it straight across — no extra query.
|
|
389
|
+
*/
|
|
390
|
+
owner: LinkOwner;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* THE resolver (D1) — create-on-miss. A thin entry point over
|
|
394
|
+
* {@link resolveContactShared} (see there for the create / fill-in-link /
|
|
395
|
+
* collide-MERGE arms and the INSERT-race lock strategy). Behavior and published
|
|
396
|
+
* type are unchanged by the extraction: `id` is a plain `string`, never `null`,
|
|
397
|
+
* because this entry point never passes `refuseCreateWithKey` — the refusal arm
|
|
398
|
+
* is unreachable from here. That matters concretely (D3): three sites annotate
|
|
399
|
+
* on `Awaited<ReturnType<typeof resolveOrCreateContact>>`, one of them the
|
|
400
|
+
* published `IdentityService.linkContact`, so widening `id` here would ripple
|
|
401
|
+
* into the semver surface. Callers that want the refusal reach for
|
|
402
|
+
* {@link resolveContactNoCreate} instead.
|
|
403
|
+
*/
|
|
404
|
+
export declare function resolveOrCreateContact(opts: ResolveContactOptions): Promise<{
|
|
405
|
+
id: string;
|
|
406
|
+
/**
|
|
407
|
+
* The contact's canonical text user_id key AFTER this resolve
|
|
408
|
+
* (`external_id ?? anonymous_id ?? id`), i.e. {@link contactKey} of the final
|
|
409
|
+
* row — for a merge, the SURVIVOR's key. Lets callers (ingestEvent) key the
|
|
410
|
+
* history tables without a second read-back of the contact row.
|
|
411
|
+
*/
|
|
412
|
+
resolvedKey: string;
|
|
413
|
+
created: boolean;
|
|
414
|
+
linked: boolean;
|
|
415
|
+
merged: boolean;
|
|
416
|
+
/**
|
|
417
|
+
* SAFE-to-absorb loser keys (§5.3 MF-2): the anonymous/uuid keys the resolver
|
|
418
|
+
* folded INTO `resolvedKey` this call — populated only on a collide-MERGE or a
|
|
419
|
+
* canonical-key flip that absorbed an anon/uuid key. Callers fan these out via
|
|
420
|
+
* `mergeAnalyticsIdentities({ distinctId: resolvedKey, alias: <key> })`. An
|
|
421
|
+
* `external_id` is NEVER listed here (it carried an identified PostHog person;
|
|
422
|
+
* aliasing it is the merge PostHog refuses — R2/R4); it surfaces in
|
|
423
|
+
* {@link mergedIdentifiedKeys} instead. Empty/absent ⇒ nothing to stitch.
|
|
424
|
+
*/
|
|
425
|
+
mergedKeys?: string[];
|
|
426
|
+
/**
|
|
427
|
+
* Loser keys MF-2 could NOT safely absorb — already-identified `external_id`s
|
|
428
|
+
* (and the superseded `external_id` on a key flip). These are the known
|
|
429
|
+
* steady-state twin residual (§10, OQ-1); callers log them as
|
|
430
|
+
* `identity.merge.residual_twin` for observability. Never aliased.
|
|
431
|
+
*/
|
|
432
|
+
mergedIdentifiedKeys?: string[];
|
|
433
|
+
/**
|
|
434
|
+
* PRD 04: the `linked_accounts` soft-unlinks a collide-MERGE performed
|
|
435
|
+
* (loser's live singleton link lost the arbitration — see
|
|
436
|
+
* {@link MergedLinkUnlink}). PRD 08 emits one `account.unlinked` per entry
|
|
437
|
+
* post-commit. Absent when the resolve unlinked nothing.
|
|
438
|
+
*/
|
|
439
|
+
linkUnlinks?: MergedLinkUnlink[];
|
|
440
|
+
}>;
|
|
441
|
+
/**
|
|
442
|
+
* THE resolver's refuse-on-miss sibling (D1/D3). Same implementation, same
|
|
443
|
+
* fill-in-link and collide-MERGE behavior — the ONLY difference is that a miss
|
|
444
|
+
* returns `{ id: null }` instead of minting a `contacts` row. Use it wherever a
|
|
445
|
+
* write is pure OBSERVATION (an unidentified browser, a chat-gateway presence
|
|
446
|
+
* ping): seeing traffic is not grounds for a CRM row, and the event still
|
|
447
|
+
* stores under `resolvedKey` (D2), so journey routing, exit checks and
|
|
448
|
+
* analytics mirroring are untouched.
|
|
449
|
+
*
|
|
450
|
+
* PRECONDITION (D8) — THROWS unless the highest-precedence supplied key is
|
|
451
|
+
* `userId` or `anonymousId`. The canonical key is
|
|
452
|
+
* `contactKey = external_id ?? anonymous_id ?? id`, so `email` and `discord_id`
|
|
453
|
+
* are NEVER canonical: for an email-only / discord-only call today's code keys
|
|
454
|
+
* history on the freshly-minted row's uuid, which a refusal cannot reproduce and
|
|
455
|
+
* for which no repoint path back exists. Refusal there would strand history, so
|
|
456
|
+
* the shape is rejected as a misuse rather than silently mis-keyed.
|
|
457
|
+
*
|
|
458
|
+
* The refusal key is exactly what the create arm would have made canonical for
|
|
459
|
+
* the two permitted shapes (`userId ?? anonymousId`), so a refused call and a
|
|
460
|
+
* creating one agree on `resolvedKey` byte-for-byte.
|
|
461
|
+
*/
|
|
462
|
+
export declare function resolveContactNoCreate(opts: ResolveContactOptions): Promise<{
|
|
463
|
+
/** `null` ⇒ REFUSED: no live contact owned any supplied key, and none was
|
|
464
|
+
* minted. Otherwise the resolved (linked/merged) contact's id. */
|
|
465
|
+
id: string | null;
|
|
466
|
+
/** As {@link resolveOrCreateContact}; on a refusal, the supplied key. */
|
|
467
|
+
resolvedKey: string;
|
|
468
|
+
/** Always false — this entry point never mints. */
|
|
469
|
+
created: false;
|
|
470
|
+
linked: boolean;
|
|
471
|
+
merged: boolean;
|
|
472
|
+
mergedKeys?: string[];
|
|
473
|
+
mergedIdentifiedKeys?: string[];
|
|
474
|
+
/** As {@link resolveOrCreateContact} (PRD 04). */
|
|
475
|
+
linkUnlinks?: MergedLinkUnlink[];
|
|
476
|
+
}>;
|
|
477
|
+
/**
|
|
478
|
+
* PRD 02 T1 — the erasure hook. Deletes EVERY `contact_aliases` row whose
|
|
479
|
+
* `contact_id` is the erased contact — no `reason` filter, no `from_contact_id`
|
|
480
|
+
* filter. Two earlier revisions of this rule each kept a subset and each kept a
|
|
481
|
+
* leak: `promote` rows hold the person's own email; ABSORBED rows
|
|
482
|
+
* (`from_contact_id` set) hold the same human's pre-merge email in the common
|
|
483
|
+
* merge. The erasure question is "whose data is this?", and for any row keyed
|
|
484
|
+
* to the erased contact the answer is always *theirs*.
|
|
485
|
+
*
|
|
486
|
+
* This does NOT strand `followToSurvivor`: that walk follows rows by
|
|
487
|
+
* `from_contact_id = <loser>`, and those rows live under the SURVIVOR's
|
|
488
|
+
* `contact_id` — erasing a loser touches none of them, and erasing a survivor
|
|
489
|
+
* makes the chain into it moot (the alias probe only resolves live contacts).
|
|
490
|
+
*
|
|
491
|
+
* Called from both soft-delete sites (`softDeleteContact` and the admin
|
|
492
|
+
* `DELETE /v1/admin/contacts/:id` route) inside their transactions. The merge
|
|
493
|
+
* path's loser soft-delete is deliberately NOT a caller — a merge is a fold,
|
|
494
|
+
* not an erasure, and its aliases (pointing at the survivor) are the mechanism
|
|
495
|
+
* that keeps the loser's stale keys resolving.
|
|
496
|
+
*/
|
|
497
|
+
export declare function deleteIdentityAliasesForContact(db: Database | Tx, contactId: string): Promise<void>;
|
|
498
|
+
/**
|
|
499
|
+
* Retained thin wrapper so existing callers (`ingestion.ts`,
|
|
500
|
+
* `import-contacts.ts`) keep compiling. `externalId` is now OPTIONAL and its
|
|
501
|
+
* `properties` are forwarded as `contactProperties`. Delegates to the real
|
|
502
|
+
* `resolveOrCreateContact` (the old `onConflictDoUpdate(target: externalId)`
|
|
503
|
+
* upsert couldn't create email-only/anon contacts or merge — decision #9 / §5).
|
|
504
|
+
*/
|
|
505
|
+
export declare function upsertContact(opts: {
|
|
506
|
+
db: Database;
|
|
507
|
+
externalId?: string;
|
|
508
|
+
email?: string;
|
|
509
|
+
anonymousId?: string;
|
|
510
|
+
discordId?: string;
|
|
511
|
+
properties?: Record<string, unknown>;
|
|
512
|
+
/** First-touch provenance (see {@link resolveOrCreateContact} `source`). */
|
|
513
|
+
source?: string;
|
|
514
|
+
sourcedAt?: Date;
|
|
515
|
+
}): Promise<{
|
|
516
|
+
id: string;
|
|
517
|
+
resolvedKey: string;
|
|
518
|
+
created: boolean;
|
|
519
|
+
linked: boolean;
|
|
520
|
+
merged: boolean;
|
|
521
|
+
/** §5.3 MF-2: safe-to-absorb loser keys folded this call (anon/uuid). */
|
|
522
|
+
mergedKeys?: string[];
|
|
523
|
+
/** §5.3 MF-2: already-identified loser keys (twin residual); never aliased. */
|
|
524
|
+
mergedIdentifiedKeys?: string[];
|
|
525
|
+
/** As {@link resolveOrCreateContact} (PRD 04). */
|
|
526
|
+
linkUnlinks?: MergedLinkUnlink[];
|
|
527
|
+
}>;
|
|
528
|
+
/**
|
|
529
|
+
* Find non-deleted contacts by email or external id. Used by the public
|
|
530
|
+
* `/v1/contacts/find` route. Email is normalized before lookup.
|
|
531
|
+
*/
|
|
532
|
+
export declare function findContacts(opts: {
|
|
533
|
+
db: Database;
|
|
534
|
+
email?: string;
|
|
535
|
+
userId?: string;
|
|
536
|
+
}): Promise<ContactRow[]>;
|
|
537
|
+
/**
|
|
538
|
+
* Soft-delete a contact resolved by email or external id (sets `deletedAt`).
|
|
539
|
+
*
|
|
540
|
+
* Returns `{ deleted }` plus the soft-deleted row's identity (`id`,
|
|
541
|
+
* `externalId`, `email`) so the delete route can both make its 404 decision
|
|
542
|
+
* (`deleted`) AND emit the `contact.deleted` outbound webhook with the real
|
|
543
|
+
* identity — without a second read-back. `deleted` is false (and the identity
|
|
544
|
+
* fields absent) when no live row matched.
|
|
545
|
+
*/
|
|
546
|
+
export declare function softDeleteContact(opts: {
|
|
547
|
+
db: Database;
|
|
548
|
+
email?: string;
|
|
549
|
+
userId?: string;
|
|
550
|
+
}): Promise<{
|
|
551
|
+
deleted: boolean;
|
|
552
|
+
id?: string;
|
|
553
|
+
externalId?: string | null;
|
|
554
|
+
email?: string | null;
|
|
555
|
+
/**
|
|
556
|
+
* PRD 04 T5 (DECISIONS §15.3): one fact per live `linked_accounts` row this
|
|
557
|
+
* delete soft-unlinked (token blobs hard-deleted alongside). PRD 08 emits
|
|
558
|
+
* one `account.unlinked` per entry post-commit so mirrors converge. Absent
|
|
559
|
+
* when the deleted contact(s) held no live links.
|
|
560
|
+
*/
|
|
561
|
+
linkUnlinks?: ContactUnlinkFact[];
|
|
562
|
+
}>;
|
|
563
|
+
/**
|
|
564
|
+
* Resolve a sendable recipient for `/v1/emails` and `applyListMembership`.
|
|
565
|
+
* Returns the contact's normalized email plus the identity needed to denormalize
|
|
566
|
+
* a send row / key an `email_preferences` write. Returns null when no resolvable
|
|
567
|
+
* email exists (the caller maps that to a 404/400).
|
|
568
|
+
*
|
|
569
|
+
* Lookup precedence: a normalized `email` arg short-circuits; otherwise resolve
|
|
570
|
+
* the contact by `userId` (external id, alias-aware) and read back its email.
|
|
571
|
+
* `externalId` is the contact's external id (may be null for an email-only
|
|
572
|
+
* contact); `contactId` is the uuid fallback for the `email_preferences.user_id`
|
|
573
|
+
* column (risk 10) when externalId is null.
|
|
574
|
+
*/
|
|
575
|
+
export declare function resolveRecipient(opts: {
|
|
576
|
+
db: Database;
|
|
577
|
+
userId?: string;
|
|
578
|
+
email?: string;
|
|
579
|
+
}): Promise<{
|
|
580
|
+
email: string;
|
|
581
|
+
externalId: string | null;
|
|
582
|
+
contactId: string;
|
|
583
|
+
} | null>;
|
|
584
|
+
/**
|
|
585
|
+
* Resolve the live contact that OWNS a canonical history key, for the PRD 04
|
|
586
|
+
* `contact_id` DUAL-WRITE and nothing else.
|
|
587
|
+
*
|
|
588
|
+
* WHAT IT IS FOR. Every history row (`user_events`, `journey_states`,
|
|
589
|
+
* `bucket_memberships`, `email_sends`, `email_preferences`) is stored under a
|
|
590
|
+
* canonical STRING key (`external_id ?? anonymous_id ?? id`). The dual-write
|
|
591
|
+
* stamps the owning `contacts.id` alongside it at insert time, so this must
|
|
592
|
+
* resolve EXACTLY the key the row is stored under — no widening, no minting.
|
|
593
|
+
* A miss is a legal, expected `null`: the column is nullable bookkeeping and a
|
|
594
|
+
* later backfill fills what this could not see. Callers wrap it per D6 (a
|
|
595
|
+
* bookkeeping resolve may never fail the operation it rides on).
|
|
596
|
+
*
|
|
597
|
+
* WHY ALIAS-AWARE. Since PRD 03 a second device's anonymous id can live ONLY in
|
|
598
|
+
* `contact_aliases` (the contact row already carries a different
|
|
599
|
+
* `anonymous_id`), so a column-only probe would stamp NULL for that visitor
|
|
600
|
+
* FOREVER — the backfill reads the same columns and would miss it too. The
|
|
601
|
+
* alias probe is restricted to kinds `external`/`anonymous` because those are
|
|
602
|
+
* the only kinds a CANONICAL key can be: folding in an `email`/`discord` alias
|
|
603
|
+
* would resolve history that today resolves to nothing, which is a read-shape
|
|
604
|
+
* change smuggled in through a write. When both kinds carry the value,
|
|
605
|
+
* `external` wins — mirroring the canonical-key precedence `external_id ??
|
|
606
|
+
* anonymous_id` so the answer is deterministic rather than index-order luck.
|
|
607
|
+
*
|
|
608
|
+
* WHY NOT {@link findByKey}. That one takes a `(kind, value)` pair, probes
|
|
609
|
+
* aliases FIRST across every kind, and carries a uuid-as-external fallback with
|
|
610
|
+
* merge/mint semantics attached — resolution for a WRITE that may change the
|
|
611
|
+
* identity graph. This is a read-only ownership question about one already-fixed
|
|
612
|
+
* string, so it stays a separate, narrower probe.
|
|
613
|
+
*/
|
|
614
|
+
export declare function lookupContactIdByKey(db: Database, key: string): Promise<string | null>;
|
|
615
|
+
/** Alias-aware lookup helper (mirrors findByKey's alias probe but on the
|
|
616
|
+
* top-level db handle, no tx). Engine-internal export: `resolveRecipient`
|
|
617
|
+
* below and the feed's anonymous-recipient resolver (PRD 03 T5 — a second
|
|
618
|
+
* device's anon id lives ONLY as an identity row) both fall back to it after
|
|
619
|
+
* their column probes miss. */
|
|
620
|
+
export declare function resolveViaAlias(db: Database | Tx, kind: Kind, value: string): Promise<ContactRow | null>;
|
|
621
|
+
export {};
|
|
622
|
+
//# sourceMappingURL=contacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/lib/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL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