Expand description
The One SDK - a typed client over the One API.
The transport layer is generated by progenitor from the One API’s OpenAPI
snapshot. The hand-written facade (One) wraps it with auth and ergonomic,
verb-less action calls. Each platform’s typed actions ship as their own
crate, withone-<platform>, built on this one.
Re-exports§
pub use crate::transport::types::PaginatedVaultConnectionViewRowsItem as Connection;
Modules§
- transport
- Generated transport client (progenitor over the committed SDK spec).
Structs§
- Call
Response - A successful (2xx) response, tagged with the action’s default output type
Out(the io_schema output, orValuefor raw calls). Holds the raw body;CallResponse::outputdecodes the default,CallResponse::jsonany caller type. - Connection
Scope - A connection-scoped handle. The engine (
ConnectionScope::run) executes declarativeOperations against this connection. - Connection
Webhooks - Handlers scoped to a single connection. Only the events that carry a connection are offered here, so a scoped handler can never be one that could not fire.
- Delivery
- A verified delivery, with the payload still typed as raw JSON.
- Method
- The Request Method (VERB)
- One
- The One SDK client.
- OneBuilder
- Builder for
One. - Operation
- A declarative description of an action invocation.
- Retry
Schedule - Bounded exponential-backoff schedule — the shared timing vocabulary for
retries, used by both the call engine and (later) webhook handler retry.
It holds no HTTP concepts: per-attempt delay doubles up to
max_delayand total attempts are capped bymax_attempts. - Route
- Where one field of a generated action’s flat input goes in the request.
- Routing
- How a generated action’s flat input maps onto its request.
- Status
Code - An HTTP status code (
status-codein RFC 9110 et al.). - Tenancy
- The tenant a request acts within: an organization, optionally narrowed to one of its projects. Empty means the caller’s own personal scope.
- Webhooks
- A registry of typed webhook handlers plus the listener registration that makes One send them.
Enums§
- Credential
- What the client authenticates with.
- Error
- Errors returned by SDK calls.
- Part
- A part of an action request that a flat input field is routed into.
- Webhook
Error - Failures from verifying, parsing, or registering a webhook.
- Webhook
Event Type - Every event a One webhook subscription can deliver.
Traits§
- Into
Operation - Anything
ConnectionScope::runexecutes: anOperation, or a generated action’s input or builder. - Retryable
- Marker trait for errors that can be classified as transient — eligible for
automatic retry — versus structural, where retrying is wasted work. This is
the general classifier used by
WithRetry; HTTP status classification (retry_on,Retry-After) is a separate concern that lives on the call. - Webhook
Handler Output - A webhook handler’s completion value.
- With
Retry - Postfix retry combinator over an async operation factory — the general
retry engine (e.g. for retrying a whole webhook handler). The receiver must
be a factory (
FnMut() -> Future) rather than aFuture, because aFutureis single-use — every retry attempt needs a freshly-produced one.
Type Aliases§
- Handler
Future - A handler’s returned work, boxed so handlers of different concrete future types share one registry.