Skip to main content

Crate qefro_backend_sdk

Crate qefro_backend_sdk 

Source
Expand description

Qefro backend SDK — mirrors @qefro-ai/backend (TypeScript).

Organizations expose one signed webhook (typically POST /qefro). Qefro Runtime calls ping, tools.list, tool.invoke, and tool.resume.

Structs§

AuthBuilder
Helpers matching JS AuthBuilder.
AuthenticationContextPayload
BusinessFlow
A Business Flow as advertised through capabilities.list. Never executed by the SDK.
BusinessFlowMetadata
Immutable identity + descriptive metadata for a Business Flow.
ChallengePayload
ChallengeSignal
Signal an auth challenge from a tool handler (caught like JS ChallengeSignal).
ConsentContext
ctx.consent — grant/revoke consent purposes.
Conversation
CustomerApi
In-handler customer API (mirrors JS ctx.customer).
CustomerAuthorizeContext
CustomerLookupContext
CustomerState
EventHandlerDefinition
Standalone event / webhook / schedule handler advertised via capabilities.list.
FlowBuilder
Fluent builder returned by Qefro::flow. Step methods append into the SDK’s flow registry as they are declared and never panic; the first step-id violation is recorded and surfaced by FlowBuilder::complete.
FlowStep
Wire shape of a flow step: { id, type, config }.
ListenHandle
ListenOptions
MembershipContext
ctx.membership — attach/detach solution membership.
PlatformCapabilities
Platform capabilities injected on tool.invoke.
PlatformCustomerBinding
PlatformCustomerContext
Customer Hub gateway context injected on tool.invoke (platform.customer).
PlatformStorageBinding
PlatformStorageContext
Managed storage context (ADR-002) — kept for platform parity; Hub is independent.
Qefro
QefroConfig
QefroRequest
RegisteredTool
TimelineContext
ctx.timeline — append Customer Hub timeline activities.
ToolContext
ToolLookup
Identity attributes the Qefro runtime must resolve before tool.invoke.
ToolMetadata

Enums§

AuthOutcome
FlowError
Developer mistakes surfaced as explicit errors — the SDK never panics on a malformed flow declaration.
FlowStepKind
Type-specific settings for a flow step. Serialized as { "type": ..., "config": {...} } so new settings (retry, timeout, permissions, parallel) extend config without changing the wire schema.
FlowTrigger
How a Business Flow is entered (Phase 3). Events are triggers into the Qefro runtime — not a second execution engine.
QefroResponse
ToolAuthMode

Constants§

SDK_NAME
Package name reported to Qefro Runtime (X-Qefro-SDK / protocol payloads).
SDK_VERSION
Package version reported to Qefro Runtime (sdk_version / X-Qefro-Version).

Traits§

CustomerProvider

Functions§

env_flag_true
hub_call
POST /v1/internal/customer-hub/{op}. Soft-skip or hard-fail per flags.
hub_customer_from_person
Map a Person / Hub JSON object to the canonical HubCustomer projection.
is_customer_hub_enabled
Master switch — when false, hub methods soft-skip (never call Hub).
is_customer_hub_optional
When true (default), missing hub config returns None / no-ops.
normalize_lookup
Normalize lookup.by / lookup.required into a deduped lowercase attribute list.
pick_identity
read_identity_phone
seed_from_person
Seed hub customer projection from a Person snapshot on tool.invoke.