Crosswake. Transfer. Contracts
(crosswake v0.1.0)
View Source
Typed, versioned route-local transfer declarations for upload, download, import, and export seams.
Summary
Types
@type declaration() :: Crosswake.Transfer.Contracts.Declaration.t()
@type destination() :: :app_sandbox | :user_visible_files | :phoenix_origin
@type direction() :: :inbound | :outbound
@type intent() :: :upload | :download | :import | :export
@type source() :: :native_picker | :native_capture | :app_sandbox
@type state() ::
:queued
| :preparing
| :transferring
| :awaiting_network
| :verifying
| :complete
| :failed
| :canceled
@type verification() :: :required | :none
Functions
@spec intents() :: [intent()]
@spec new_declaration(keyword()) :: declaration()
@spec new_result(keyword()) :: Crosswake.Transfer.Contracts.Result.t()
@spec normalize_declaration(term()) :: {:ok, declaration()} | {:error, String.t()}
@spec protocol() :: String.t()
@spec transfer_states() :: [state()]
@spec validate_picker_declaration(declaration()) :: :ok | {:error, :invalid_picker_direction | :invalid_picker_intent | :invalid_picker_source}
@spec version() :: String.t()