Skip to main content

Crate sylphx_sdk

Crate sylphx_sdk 

Source
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-types directly.
wireDeprecated
Deprecated alias for types — prefer sylphx_sdk::types.

Structs§

BuildConnectionUrlInput
Connection URL SSOT (ADR-123 dual-oracle of @sylphx/sdk connection-url). Input for build_connection_url.
Client
Default Sylphx app client (runtime API).
ClientBuilder
Builder for Client.
EmailSendOptions
Full email send options (Client::email_send_with). Options for Client::email_send_with — field-stable product surface matching Platform EmailSendBody + TS @sylphx/sdk SendEmailOptions (optional extras ignored by runtime when unsupported).
ParsedConnectionUrl
Connection URL SSOT (ADR-123 dual-oracle of @sylphx/sdk connection-url). Parsed Sylphx connection URL components (dual-oracle of ParsedConnectionUrl).
RetryConfig
Retry policy for transient failures.
Transport
Production HTTP transport.
TransportConfig
Shared HTTP client configuration for one plane endpoint.
VerifiedBindingContext
Re-export contract identity for consumers and CLI evidence. Immutable identity and scope proved by Platform binding admission.

Enums§

ConnectionCredentialType
Connection URL SSOT (ADR-123 dual-oracle of @sylphx/sdk connection-url). Credential kind — publishable (pk) or secret (sk).
ConnectionEnv
Connection URL SSOT (ADR-123 dual-oracle of @sylphx/sdk connection-url). Target environment encoded in the credential.
Credential
Credential material for a plane.
SdkError
SDK-level errors.
VerifiedBindingContextError
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/sdk connection-url). Build a canonical Sylphx connection URL (dual-oracle of buildConnectionUrl).
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/sdk connection-url). Parse a Sylphx connection URL (dual-oracle of parseConnectionUrl).