API reference
TypeScript public exports
What ships from @cachepuppy/core and @cachepuppy/react.
@cachepuppy/core
| Export | Kind | Summary |
|---|---|---|
createClient | function | Factory for CachePuppyClient. |
CachePuppyClient | class | Websocket-first SDK entry point. |
createAdminClient | function | Factory for CachePuppyAdminClient. |
CachePuppyAdminClient | class | HTTP admin APIs. |
createEnvelope | function | Build versioned envelopes. |
isEnvelope | function | Runtime shape guard. |
nextId | function | Allocate message ids. |
PhoenixTransport | class | Phoenix-backed transport implementation. |
AdminClientOptions | type | Admin client configuration. |
CachePuppyEnvelope | type | Wire envelope JSON. |
ClientEventMap | type | client.on event typing. |
ClientOptions | type | createClient configuration. |
ConnectionState | type | Connection lifecycle union. |
MessageType | type | Envelope type union. |
TopicHandler | type | Subscription callback signature. |
TopicPresenceResponse | type | HTTP presence snapshot typing. |
TopicWebhookConfigOptions | type | Webhook configuration object. |
WorkflowStatus | type | Workflow status union (pending, running, completed, failed). |
WorkflowStepInput | type | Input contract for workflow step endpoints. |
WorkflowSummary | type | Workflow create response shape. |
WorkflowStateResponse | type | Workflow state (steps and groups) response shape. |
WorkflowStepSummary | type | Workflow step metadata/state response shape. |
WorkflowGroupSummary | type | Workflow group metadata response shape. |
WorkflowParallelCreatedResponse | type | Add-parallel response shape. |
WorkflowResumeInput | type | Resume payload shape (stepId, optional output). |
WorkflowStatusResponse | type | Workflow status response shape. |
WorkflowTopicEvent | type | Core workflow subscription event payload. |
WorkflowEventHandler | type | Callback signature for subscribeWorkflow. |
WorkflowStatusHandler | type | Callback signature for onWorkflowStatus. |
CacheSetDataOptions | type | TTL options for cache writes. |
TopicStateResponse | type | Topic state + optional routing metadata. |
@cachepuppy/react
| Export | Kind | Summary |
|---|---|---|
CachePuppyProvider | component | Context provider wrapping createClient. |
CachePuppyProviderProps | type | Provider props (options, autoConnect, …). |
useCachePuppyContext | hook | Low-level access to provider value. |
useCachePuppyClient | hook | Alias of useCachePuppyContext. |
useTopic | hook | Managed subscription lifecycle. |
UseTopicOptions | type | enabled, onMessage, … |
usePresence | hook | Presence count helper. |
UsePresenceResult | type | { clientCount, error }. |
useTopicState | hook | Topic state + mutations. |
UseTopicStateResult | type | { state, loading, error, setState, refresh, clear }. |
useWorkflowEvents | hook | Workflow topic event subscription wrapper. |
UseWorkflowEventsOptions | type | enabled, onEvent. |
useWorkflowStatus | hook | Workflow status subscription wrapper. |
UseWorkflowStatusOptions | type | enabled, onStatus. |
UseWorkflowStatusResult | type | { status, latest, error }. |