emailbridgeep

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateEmailDomainEndpoint

type CreateEmailDomainEndpoint struct{}

Registers a domain you own with the email bridge and returns the DKIM tokens to publish.

The domain starts in `pending`. Publish each returned token as a CNAME record in the domain's DNS, then call the verify action to move it to `verified`; only then can inboxes be created on it.

A domain can only be registered once across the platform, so registering one that is already in use returns a conflict error.

func (*CreateEmailDomainEndpoint) Materialize

type CreateEmailDomainRequest

type CreateEmailDomainRequest struct {
	// The fully-qualified domain name to register (e.g. `support.acme.com`).
	//
	// Supply a bare domain, not an email address; the value is lowercased before it is stored.
	Domain string `json:"domain" validate:"required"`
}

Request to register a sending/receiving domain with the email bridge.

func (*CreateEmailDomainRequest) SchemaExample

func (*CreateEmailDomainRequest) SchemaExample() any

type CreateEmailInboxEndpoint

type CreateEmailInboxEndpoint struct{}

Provisions a routable inbox address on a verified domain.

Once created, mail arriving at the address opens a customer case conversation and seats the bound agent and the group's members on it; a reply in a thread that already opened one joins that conversation instead.

func (*CreateEmailInboxEndpoint) Materialize

type CreateEmailInboxRequest

type CreateEmailInboxRequest struct {
	// The verified domain this inbox belongs to.
	EmailDomainID string `json:"email_domain_id" validate:"required"`
	// The full inbox address (e.g. `support@acme.com`).
	//
	// Its domain part must match the selected domain, which must already be verified. The address is lowercased before it is stored, and it must not already be in use by another inbox.
	Address string `json:"address" validate:"required"`
	// Display name for the `From` header of outbound mail.
	FromName field.Optional[string] `json:"from_name,omitzero"`
	// The agent to bind to this inbox to handle incoming mail.
	//
	// With no agent bound, mail is still threaded into a conversation for your team, but nothing runs on it automatically.
	AgentConfigID field.Optional[string] `json:"agent_config_id,omitzero"`
	// How the bound agent decides whether to run on incoming mail.
	//
	// - `mention`: runs only when the agent is @mentioned, matched against the trigger keywords below.
	// - `keyword`: runs when the message contains any of the trigger keywords.
	// - `always`: runs on every incoming message.
	//
	// Leaving this unset makes the agent run on every incoming message, since email has no reliable @mention convention.
	AgentTriggerPolicy field.Optional[constants.AgentTriggerPolicy] `json:"agent_trigger_policy,omitzero"`
	// The keywords that decide whether the agent runs on an incoming message.
	//
	// Under the `keyword` policy a keyword matches anywhere in the message; under `mention` it only counts where it is prefixed with `@`.
	AgentTriggerKeywords []string `json:"agent_trigger_keywords,omitzero"`
	// The messaging group (roster) whose members are seated on every conversation this inbox opens.
	//
	// Must name a group in your own account. Agents in the group are seated to run only when @mentioned, so they do not all fire alongside the inbox's own agent.
	GroupID field.Optional[string] `json:"group_id,omitzero"`
}

Request to provision a routable inbox on a verified domain.

func (*CreateEmailInboxRequest) SchemaExample

func (*CreateEmailInboxRequest) SchemaExample() any

type DeleteEmailDomainEndpoint

type DeleteEmailDomainEndpoint struct{}

Deregisters a domain from the email bridge and removes its sending identity from the mail provider.

Delete the domain's inboxes first: while any inbox still exists on it, this returns a conflict error.

func (*DeleteEmailDomainEndpoint) Materialize

type DeleteEmailDomainRequest

type DeleteEmailDomainRequest struct {
	// Email domain ID.
	ID string `path:"id" validate:"required"`
}

Request to delete an email domain.

type DeleteEmailInboxEndpoint

type DeleteEmailInboxEndpoint struct{}

Removes an email inbox.

Mail sent to its address is no longer routed. Conversations the inbox already opened are kept, but replies can no longer be sent on them, so disable the inbox instead of deleting it if you still need to answer open threads.

func (*DeleteEmailInboxEndpoint) Materialize

type DeleteEmailInboxRequest

type DeleteEmailInboxRequest struct {
	// Email inbox ID.
	ID string `path:"id" validate:"required"`
}

Request to delete an email inbox.

type EmailBridgeSvc

EmailBridgeSvc backs the email-domain and email-inbox management endpoints via the notification-service EmailBridgeService gRPC client. The account is derived from the caller identity propagated over gRPC metadata, so requests never embed it.

func NewEmailBridgeSvc

func NewEmailBridgeSvc(config *EmailBridgeSvcConfig) EmailBridgeSvc

type EmailBridgeSvcConfig

type EmailBridgeSvcConfig struct {
	// EmailBridgeClient (required) is the notification-service EmailBridgeService gRPC client.
	EmailBridgeClient pb.EmailBridgeServiceClient
}

type GetEmailDomainEndpoint

type GetEmailDomainEndpoint struct{}

Returns a single email domain owned by the account.

func (*GetEmailDomainEndpoint) Materialize

type GetEmailDomainRequest

type GetEmailDomainRequest struct {
	// Email domain ID.
	ID string `path:"id" validate:"required"`
}

Request to read a single email domain.

type GetEmailInboxEndpoint

type GetEmailInboxEndpoint struct{}

Returns a single email inbox owned by the account.

func (*GetEmailInboxEndpoint) Materialize

type GetEmailInboxRequest

type GetEmailInboxRequest struct {
	// Email inbox ID.
	ID string `path:"id" validate:"required"`
}

Request to read a single email inbox.

type ListEmailDomainsEndpoint

type ListEmailDomainsEndpoint struct{}

Returns the account's registered email domains.

Every domain is returned in a single response; this list is not paginated.

type ListEmailDomainsRequest

type ListEmailDomainsRequest struct{}

Request to list the account's registered email domains.

type ListEmailInboxesEndpoint

type ListEmailInboxesEndpoint struct{}

Returns the account's email inboxes across every registered domain.

Every inbox is returned in a single response; this list is not paginated.

type ListEmailInboxesRequest

type ListEmailInboxesRequest struct{}

Request to list the account's email inboxes.

type UpdateEmailInboxEndpoint

type UpdateEmailInboxEndpoint struct{}

Edits an email inbox's from-name, status, agent configuration, and roster.

Every field except `status` is merged into the inbox's current settings: a field you omit — and an empty array you send — keeps the value it already has, so this endpoint can change a setting but cannot clear one back to unset. The inbox's address and domain are fixed at creation and cannot be changed here.

func (*UpdateEmailInboxEndpoint) Materialize

type UpdateEmailInboxRequest

type UpdateEmailInboxRequest struct {
	// Email inbox ID.
	ID string `path:"id" validate:"required"`
	// Whether the inbox accepts mail.
	//
	// - `active`: inbound mail is threaded into a conversation.
	// - `disabled`: the inbox stays provisioned and keeps its history, but inbound mail is dropped without being threaded.
	Status constants.EmailInboxStatus `json:"status" validate:"required"`
	// Display name for the `From` header of outbound mail.
	FromName field.Optional[string] `json:"from_name,omitzero"`
	// The agent to bind to this inbox to handle incoming mail.
	AgentConfigID field.Optional[string] `json:"agent_config_id,omitzero"`
	// How the bound agent decides whether to run on incoming mail.
	//
	// - `mention`: runs only when the agent is @mentioned, matched against the trigger keywords below.
	// - `keyword`: runs when the message contains any of the trigger keywords.
	// - `always`: runs on every incoming message.
	//
	// While no policy has been set, the agent runs on every incoming message, since email has no reliable @mention convention.
	AgentTriggerPolicy field.Optional[constants.AgentTriggerPolicy] `json:"agent_trigger_policy,omitzero"`
	// The keywords that decide whether the agent runs on an incoming message.
	//
	// Under the `keyword` policy a keyword matches anywhere in the message; under `mention` it only counts where it is prefixed with `@`.
	AgentTriggerKeywords []string `json:"agent_trigger_keywords,omitzero"`
	// The messaging group (roster) whose members are seated on every conversation this inbox opens.
	//
	// Must name a group in your own account. Changing it only affects conversations opened afterwards.
	GroupID field.Optional[string] `json:"group_id,omitzero"`
}

Request to edit an email inbox's from-name, status, agent configuration, and roster.

func (*UpdateEmailInboxRequest) SchemaExample

func (*UpdateEmailInboxRequest) SchemaExample() any

type VerifyEmailDomainEndpoint

type VerifyEmailDomainEndpoint struct{}

Checks whether the domain's DKIM records have been published and marks it `verified` once they are confirmed.

Call this after publishing the DKIM records returned at registration. It is safe to call repeatedly: a domain whose records are not visible yet is returned unchanged in `pending`, and an already-verified domain is returned as-is without re-checking. DNS propagation can take a while, so expect to poll.

func (*VerifyEmailDomainEndpoint) Materialize

type VerifyEmailDomainRequest

type VerifyEmailDomainRequest struct {
	// Email domain ID.
	ID string `path:"id" validate:"required"`
}

Request to re-check a domain's DKIM verification status.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL