Namespace: workflowStreams
Workflow-side entrypoint for @temporalio/workflow-streams.
Instantiate WorkflowStream once at the start of your workflow function; the
constructor registers the workflow stream signal, update, and query handlers on
the current workflow via setHandler.
For workflows that support continue-as-new, include a
WorkflowStreamState | undefined field on the workflow input and pass it as
priorState — it is undefined on fresh starts and carries
accumulated state on continue-as-new.
Both workflow-side WorkflowStream.publish and client-side
WorkflowStreamClient.publish use the default payload converter for per-item
Payload construction. The codec chain (encryption, PII-redaction,
compression) is NOT applied per item on either side — it runs once at
the envelope level when Temporal's SDK encodes the signal/update that
carries the batch.
This entrypoint exports only the workflow-safe surface so that it can be
pulled into a workflow bundle. The client-side surface lives at
@temporalio/workflow-streams/client and pulls in crypto,
@temporalio/activity, and @temporalio/client — none of which can be
resolved in the workflow sandbox.
Classes
Interfaces
Variables
workflowStreamOffsetQuery
• Const workflowStreamOffsetQuery: workflow
workflowStreamPollUpdate
• Const workflowStreamPollUpdate: common
workflowStreamPublishSignal
• Const workflowStreamPublishSignal: workflow
Functions
decodeBase64
▸ decodeBase64(data): Uint8Array
Decode standard base64 to bytes. Throws TypeError on malformed input.
Parameters
| Name | Type |
|---|---|
data | string |
Returns
Uint8Array
decodePayloadProto
▸ decodePayloadProto(bytes): Payload
Decode protobuf binary bytes to a Payload.
Parameters
| Name | Type |
|---|---|
bytes | Uint8Array |
Returns
decodePayloadWire
▸ decodePayloadWire(wire): Payload
Convenience: decode the base64 wire format to a Payload.
Parameters
| Name | Type |
|---|---|
wire | string |
Returns
encodeBase64
▸ encodeBase64(data): string
Encode bytes to standard base64 (padded).
Parameters
| Name | Type |
|---|---|
data | Uint8Array |
Returns
string
encodePayloadProto
▸ encodePayloadProto(payload): Uint8Array
Encode a Payload to its protobuf binary representation.
Parameters
| Name | Type |
|---|---|
payload | IPayload |
Returns
Uint8Array
encodePayloadWire
▸ encodePayloadWire(payload): string
Convenience: encode a Payload to the base64 wire format used by stream.
Parameters
| Name | Type |
|---|---|
payload | IPayload |
Returns
string