PhoenixKitInbox.Schemas.Mailbox (PhoenixKitInbox v0.2.0)

Copy Markdown View Source

A mailbox — the thing messages are delivered to.

Two kinds, both stored in this one table:

  • "user" — a personal mailbox owned by exactly one PhoenixKit user. owner_uuid is set and there is at most one per user (enforced by a partial unique index in the migration).
  • "shared" — a team mailbox (support, sales, …). owner_uuid is the user who created it; everyone else reaches it through a PhoenixKitInbox.Schemas.MailboxGrant.

address is the mailbox's identity inside the app ("support@example.com", or the owner's login email for a user mailbox). Inbox is an internal messaging system — nothing is sent to the outside world through this address, it is a display/lookup handle only. Outbound delivery to a real inbox happens, if at all, through PhoenixKitInbox.Notify.

Tables are created by PhoenixKitInbox.Migrations, never by this schema.

Summary

Functions

Valid values for the kind column.

Valid values for the status column.

Types

t()

@type t() :: %PhoenixKitInbox.Schemas.Mailbox{
  __meta__: term(),
  address: term(),
  inserted_at: term(),
  kind: term(),
  name: term(),
  owner_uuid: term(),
  settings: term(),
  slug: term(),
  status: term(),
  updated_at: term(),
  uuid: term()
}

Functions

kinds()

@spec kinds() :: [String.t()]

Valid values for the kind column.

statuses()

@spec statuses() :: [String.t()]

Valid values for the status column.