Sedex (sedex v1.0.3) View Source

Sedex Interface

Link to this section Summary

Link to this section Types

Specs

envelope() :: %{
  message_id: String.t(),
  message_type: String.t(),
  message_class: non_neg_integer(),
  sender_id: String.t(),
  recipient_id: [String.t()],
  event_date: DateTime.t()
}

Specs

receipt() :: %{
  event_date: DateTime.t(),
  status_code: :ok | {:error, 200..500},
  status_info: String.t() | nil,
  message_id: String.t(),
  message_type: 0..2_699_999,
  message_class: non_neg_integer(),
  sender_id: String.t(),
  recipient_id: String.t()
}

Specs

status() ::
  :message_correctly_transmitted
  | :invalid_envelope_syntax
  | :duplicate_message_id
  | :no_payload_found
  | :message_too_old
  | :message_expired
  | :unknown_sender_id
  | :unknown_recipient_id
  | :unknown_physical_sender_id
  | :invalid_message_type
  | :invalid_message_class
  | :not_allowed_to_send
  | :not_allowed_to_receive
  | :user_certificate_not_valid
  | :recipient_not_allowed_to_receive
  | :message_size_exceeds_limit
  | :network_error
  | :osci_hub_not_reachable
  | :folder_not_reachable
  | :logging_service_not_reachable
  | :authorization_service_not_reachable
  | :internal_error
  | :error_during_receiving
  | :message_successfully_sent
  | :message_expires_soon

Link to this section Functions

Specs

cleanup(id :: String.t()) :: :ok
Link to this function

message_status(message_id)

View Source

Specs

message_status(message_id :: String.t()) ::
  {:ok, status :: status(), message :: String.t()} | {:error, :not_found}
Link to this function

send(files, sender_name, envelope, public_key)

View Source

Specs

send(
  files :: %{required(filename :: String.t()) => iodata() | Enumerable.t()},
  sender_name :: String.t(),
  envelope :: envelope(),
  public_key :: :public_key.public_key()
) :: :ok