Public entry point for DripDrop.
DripDrop is a backend-first, database-driven messaging sequence engine. The foundation currently exposes boot-time validation while the domain APIs are implemented capability by capability.
Summary
Functions
Activates a sequence version and archives the previously active version.
Adds an adapter to an outbound pool.
Creates an outbound adapter pool.
Creates a channel adapter.
Creates a condition attached to a step by default, or to a transition when transition_id is provided.
Creates an HTTP hook for a sequence.
Creates a sequence.
Creates a sequence version.
Creates a step in a sequence version.
Creates a transition in a sequence version.
Deletes an outbound adapter pool.
Enrolls a subscriber into the active version of a sequence.
Gets the active default adapter for a channel and tenant, falling back to the global default.
Deprecated unscoped enrollment lookup. Use get_enrollment/4.
Gets an enrollment by sequence, subscriber identity, and explicit tenant scope.
Ingests a normalized inbound email from host-owned inbox infrastructure.
Lists active enrollments.
Lists outbound adapter pools.
Lists channel adapters.
Deprecated unscoped HTTP hook listing. Use list_http_hooks/2.
Lists HTTP hooks for a sequence and explicit tenant scope.
Lists outbound pool members.
Deprecated unscoped pause. Use pause_enrollment/2.
Pauses an enrollment scoped by tenant.
Removes an adapter from an outbound pool.
Reassigns an enrollment to a different outbound adapter.
Replays a failed step execution with a fresh idempotency key.
Deprecated unscoped resume. Use resume_enrollment/2.
Resumes an enrollment scoped by tenant.
Sets an adapter health state from a host-supplied external signal.
Creates or updates an outbound adapter sequence budget.
Validates the host application's DripDrop runtime configuration.
Creates or updates a suppression for a channel recipient.
Runs an HTTP hook out of band and stores its redacted test result.
Tracks an event by subscriber identity (tenant_key in the map) or deprecated unscoped enrollment id.
Tracks an event for a tenant-scoped enrollment id.
Deprecated unscoped cancel. Use unenroll/2.
Cancels an enrollment scoped by tenant.
Updates an outbound adapter pool.
Updates a channel adapter.
Updates an HTTP hook.
Validates a sequence version before activation.
Returns webhook routes declared by active channel adapters.
Functions
@spec activate_sequence_version(Ecto.UUID.t()) :: {:ok, Ecto.Schema.t()} | {:error, term()}
Activates a sequence version and archives the previously active version.
@spec add_pool_member(Ecto.Schema.t() | Ecto.UUID.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Adds an adapter to an outbound pool.
@spec create_adapter_pool(map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Creates an outbound adapter pool.
@spec create_channel_adapter(map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Creates a channel adapter.
@spec create_condition(Ecto.UUID.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Creates a condition attached to a step by default, or to a transition when transition_id is provided.
@spec create_http_hook(Ecto.UUID.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Creates an HTTP hook for a sequence.
@spec create_sequence(map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Creates a sequence.
@spec create_sequence_version(Ecto.UUID.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Creates a sequence version.
@spec create_step(Ecto.UUID.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Creates a step in a sequence version.
@spec create_step_transition(Ecto.UUID.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Creates a transition in a sequence version.
@spec delete_adapter_pool(Ecto.Schema.t() | Ecto.UUID.t(), map() | keyword()) :: {:ok, Ecto.Schema.t()} | {:error, map()}
Deletes an outbound adapter pool.
@spec enroll(map()) :: {:ok, Ecto.Schema.t()} | {:error, term()}
Enrolls a subscriber into the active version of a sequence.
@spec get_default_adapter(binary() | atom(), binary() | nil) :: Ecto.Schema.t() | nil
Gets the active default adapter for a channel and tenant, falling back to the global default.
@spec get_enrollment(Ecto.UUID.t(), binary(), binary()) :: no_return()
Deprecated unscoped enrollment lookup. Use get_enrollment/4.
@spec get_enrollment(Ecto.UUID.t(), binary(), binary(), binary() | nil) :: Ecto.Schema.t() | nil
Gets an enrollment by sequence, subscriber identity, and explicit tenant scope.
@spec ingest_inbound_message(Ecto.UUID.t() | map(), map()) :: :ok | {:error, term()}
Ingests a normalized inbound email from host-owned inbox infrastructure.
Example:
DripDrop.ingest_inbound_message(adapter.id, %{
message_id: "reply@gmail.com",
in_reply_to: "0197...@example.com",
references: ["0197...@example.com"],
from: "prospect@example.org",
to: "sales@example.com",
body_text: "Sure, let's talk.",
received_at: DateTime.utc_now(),
intent: :reply
})Hosts can feed this from IMAP, Gmail API watches, or Microsoft Graph subscriptions after normalizing provider-specific payloads into this map.
@spec list_active_enrollments(map()) :: [Ecto.Schema.t()]
Lists active enrollments.
@spec list_adapter_pools(map()) :: [Ecto.Schema.t()]
Lists outbound adapter pools.
@spec list_channel_adapters(map()) :: [Ecto.Schema.t()]
Lists channel adapters.
@spec list_http_hooks(Ecto.UUID.t()) :: no_return()
Deprecated unscoped HTTP hook listing. Use list_http_hooks/2.
@spec list_http_hooks(Ecto.UUID.t(), binary() | nil) :: [Ecto.Schema.t()]
Lists HTTP hooks for a sequence and explicit tenant scope.
@spec list_pool_members(Ecto.Schema.t() | Ecto.UUID.t() | map()) :: [Ecto.Schema.t()]
Lists outbound pool members.
@spec pause_enrollment(Ecto.UUID.t()) :: no_return()
Deprecated unscoped pause. Use pause_enrollment/2.
@spec pause_enrollment(Ecto.UUID.t(), binary() | nil) :: {:ok, Ecto.Schema.t()} | {:error, term()}
Pauses an enrollment scoped by tenant.
@spec remove_pool_member(Ecto.Schema.t() | Ecto.UUID.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, :not_found}
Removes an adapter from an outbound pool.
@spec repin_enrollment(Ecto.UUID.t(), Ecto.UUID.t(), keyword() | map()) :: {:ok, Ecto.Schema.t()} | {:error, term()}
Reassigns an enrollment to a different outbound adapter.
@spec replay(Ecto.UUID.t()) :: {:ok, Ecto.Schema.t()} | {:error, term()}
Replays a failed step execution with a fresh idempotency key.
@spec resume_enrollment(Ecto.UUID.t()) :: no_return()
Deprecated unscoped resume. Use resume_enrollment/2.
@spec resume_enrollment(Ecto.UUID.t(), binary() | nil) :: {:ok, Ecto.Schema.t()} | {:error, term()}
Resumes an enrollment scoped by tenant.
@spec set_adapter_health(Ecto.UUID.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, term()}
Sets an adapter health state from a host-supplied external signal.
@spec set_adapter_sequence_budget(Ecto.UUID.t(), Ecto.UUID.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Creates or updates an outbound adapter sequence budget.
@spec startup_check() :: :ok | {:error, [DripDrop.StartupCheck.error()]}
Validates the host application's DripDrop runtime configuration.
This check is intended for host Application.start/2 callbacks after the
host Repo, PgFlow supervisor, and custom channel registrations have been
configured.
@spec suppress(map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Creates or updates a suppression for a channel recipient.
@spec test_http_hook(Ecto.UUID.t(), map()) :: {:ok, term()} | {:error, term()}
Runs an HTTP hook out of band and stores its redacted test result.
@spec track_event(Ecto.UUID.t() | map(), binary(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()} | no_return()
Tracks an event by subscriber identity (tenant_key in the map) or deprecated unscoped enrollment id.
@spec track_event(Ecto.UUID.t(), binary(), map(), binary() | nil) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Tracks an event for a tenant-scoped enrollment id.
@spec unenroll(Ecto.UUID.t()) :: no_return()
Deprecated unscoped cancel. Use unenroll/2.
@spec unenroll(Ecto.UUID.t(), binary() | nil) :: {:ok, Ecto.Schema.t()} | {:error, term()}
Cancels an enrollment scoped by tenant.
@spec update_adapter_pool(Ecto.Schema.t() | Ecto.UUID.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Updates an outbound adapter pool.
@spec update_channel_adapter(Ecto.Schema.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Updates a channel adapter.
@spec update_http_hook(Ecto.Schema.t(), map()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
Updates an HTTP hook.
@spec validate_sequence_version(Ecto.UUID.t()) :: {:ok, Ecto.Schema.t()} | {:error, list()}
Validates a sequence version before activation.
@spec webhook_routes() :: [DripDrop.Channel.webhook_route()]
Returns webhook routes declared by active channel adapters.