Kantoor.Ingest.Result (Kantoor v1.0.0)

Outcome of an ingest call.

  • outcome is :stored (visible, UID assigned), :held (over quota, hidden, no UID) or :duplicate (already ingested; message is the existing record).
  • :forwarded has no local message: a forwarding-only alias was durably queued.
  • retention is the value Kantoor wants Karta to apply to this delivery (contract 3a); the 2xx response is where it is conveyed. Data only here.

Summary

Types

retention()

@type retention() :: :keep | {:days, pos_integer()}

t()

@type t() :: %Kantoor.Ingest.Result{
  message: struct() | nil,
  outcome: :stored | :held | :duplicate | :forwarded,
  retention: retention()
}