Expand description
Sylphx Platform SDK — default app client for the runtime API.
use sylphx_sdk::Client;
let client = Client::new(std::env::var("SYLPHX_SECRET_KEY").unwrap(), "my-app")?;
client.kv_set("k", &serde_json::json!(1), None).await?;Modules§
- types
- Generated API types (Protobuf → buffa/connectrpc). Prefer this over depending on
sylphx-api-typesdirectly. - wire
Deprecated - Deprecated alias for
types— prefersylphx_sdk::types.
Structs§
- Build
Connection UrlInput - Connection URL SSOT (ADR-123 dual-oracle of
@sylphx/sdkconnection-url). Input forbuild_connection_url. - Client
- Default Sylphx app client (runtime API).
- Client
Builder - Builder for
Client. - Email
Send Options - Full email send options (
Client::email_send_with). Options forClient::email_send_with— field-stable product surface matching PlatformEmailSendBody+ TS@sylphx/sdkSendEmailOptions(optional extras ignored by runtime when unsupported). - Parsed
Connection Url - Connection URL SSOT (ADR-123 dual-oracle of
@sylphx/sdkconnection-url). Parsed Sylphx connection URL components (dual-oracle ofParsedConnectionUrl). - Retry
Config - Retry policy for transient failures.
- Transport
- Production HTTP transport.
- Transport
Config - Shared HTTP client configuration for one plane endpoint.
- Verified
Binding Context - Re-export contract identity for consumers and CLI evidence. Immutable identity and scope proved by Platform binding admission.
Enums§
- Connection
Credential Type - Connection URL SSOT (ADR-123 dual-oracle of
@sylphx/sdkconnection-url). Credential kind — publishable (pk) or secret (sk). - Connection
Env - Connection URL SSOT (ADR-123 dual-oracle of
@sylphx/sdkconnection-url). Target environment encoded in the credential. - Credential
- Credential material for a plane.
- SdkError
- SDK-level errors.
- Verified
Binding Context Error - Re-export contract identity for consumers and CLI evidence. Failure to construct a verified-binding context from incomplete claims.
Constants§
- API_
TYPES_ CONTRACT_ PACKAGE - Re-export contract identity for consumers and CLI evidence. Schema identity for publish/admission evidence.
- API_
TYPES_ CONTRACT_ REVISION - Re-export contract identity for consumers and CLI evidence. Human-readable contract revision for this crate release.
- VERIFIED_
BINDING_ CONTEXT_ REVISION - Re-export contract identity for consumers and CLI evidence. Canonical revision of the verified-binding request context contract.
- WIRE_
CONTRACT_ PACKAGE - Deprecated aliases — prefer API_TYPES_CONTRACT_*. Schema identity for publish/admission evidence.
- WIRE_
CONTRACT_ REVISION - Deprecated aliases — prefer API_TYPES_CONTRACT_*. Human-readable contract revision for this crate release.
Functions§
- auth_
header_ pair - Build Authorization / x-app-secret header pair for inspection/tests.
- baas_
base_ url - Build the BaaS plane base URL for a tenant slug.
- build_
connection_ url - Connection URL SSOT (ADR-123 dual-oracle of
@sylphx/sdkconnection-url). Build a canonical Sylphx connection URL (dual-oracle ofbuildConnectionUrl). - encode_
path_ segment - Percent-encode a path segment using UTF-8 bytes (RFC 3986 unreserved).
- parse_
connection_ url - Connection URL SSOT (ADR-123 dual-oracle of
@sylphx/sdkconnection-url). Parse a Sylphx connection URL (dual-oracle ofparseConnectionUrl).