OptionalretryConfig: RetryConfigAppend a batch of records to the stream.
fencingToken and matchSeqNum in the input.streamConfig in the input is applied only if the append auto-creates the stream.Use AppendInput.create to construct a validated AppendInput.
For high-throughput sequential appends, use appendSession() instead.
The append input containing records and optional conditions
Optionaloptions: S2RequestOptionsOptional request options
Create an append session that guarantees ordering of submissions.
Use this to coordinate high-throughput, sequential appends with backpressure.
Records can be either string or bytes format - the format is specified in each record.
sessionOptions.streamConfig is sent whenever the session connects and is
applied only if the append auto-creates the stream.
OptionalsessionOptions: AppendSessionOptionsOptions that control append session behavior
OptionalrequestOptions: S2RequestOptionsOptional request options
Check the tail of the stream.
Returns the next sequence number and timestamp to be assigned (tail).
Optionaloptions: S2RequestOptionsRead records from the stream.
as: "bytes" is provided, bodies and headers are decoded from base64 to Uint8Array.seq_num, timestamp, or tail_offset and can clamp to the tail.count and bytes (defaults 1000 and 1 MiB).ignoreCommandRecords is set, command records are filtered from the single
returned batch, which may then be empty. Use readSession to keep reading until
data records are found.streamConfig is applied only if the read auto-creates the stream.Optionalinput: ReadInputOptionaloptions: S2RequestOptions & { as?: Format }Open a streaming read session
Use the returned session as an async iterable or as a readable stream.
When as: "bytes" is provided, bodies and headers are decoded to Uint8Array.
streamConfig is sent whenever the session connects and is applied only if
the read auto-creates the stream.
Optionalinput: ReadInputOptionaloptions: S2RequestOptions & { as?: Format }Return a new stream handle that sends the supplied encryption key on append/read requests.
Basin-scoped stream helper for append/read operations.
Created via S2Basin.stream. Provides direct methods plus factories for read/append sessions.