@s2-dev/streamstore - v0.18.1
    Preparing search index...

    Type Alias ReadData

    Generated API types re-exported for convenience.

    These mirror the server REST resources and payloads.

    type ReadData = {
        body?: never;
        headers?: { "s2-format"?: S2Format };
        path: { stream: StreamNameStr };
        query?: {
            bytes?: number;
            clamp?: boolean;
            count?: number;
            seq_num?: U64;
            tail_offset?: number;
            timestamp?: U64;
            until?: U64;
            wait?: number;
        };
        url: "/streams/{stream}/records";
    }
    Index

    Properties

    body?: never
    headers?: { "s2-format"?: S2Format }

    Type Declaration

    • Optionals2-format?: S2Format

      Defines the interpretation of record data (header name, header value, and body) with the JSON content type. Use raw (default) for efficient transmission and storage of Unicode data — storage will be in UTF-8. Use base64 for safe transmission with efficient storage of binary data.

    path: { stream: StreamNameStr }

    Type Declaration

    query?: {
        bytes?: number;
        clamp?: boolean;
        count?: number;
        seq_num?: U64;
        tail_offset?: number;
        timestamp?: U64;
        until?: U64;
        wait?: number;
    }

    Type Declaration

    • Optionalbytes?: number

      Metered bytes limit. Non-streaming reads are capped by the default limit of 1 MiB.

    • Optionalclamp?: boolean

      Start reading from the tail if the requested position is beyond it. Otherwise, a 416 Range Not Satisfiable response is returned.

    • Optionalcount?: number

      Record count limit. Non-streaming reads are capped by the default limit of 1000 records.

    • Optionalseq_num?: U64

      Start from a sequence number.

    • Optionaltail_offset?: number

      Start from number of records before the next sequence number.

    • Optionaltimestamp?: U64

      Start from a timestamp.

    • Optionaluntil?: U64

      Exclusive timestamp to read until.

    • Optionalwait?: number

      Duration in seconds to wait for new records. The default duration is 0 if there is a bound on count, bytes, or until, and otherwise infinite. Non-streaming reads are always bounded on count and bytes, so you can achieve long poll semantics by specifying a non-zero duration up to 60 seconds. In the context of an SSE or S2S streaming read, the duration will bound how much time can elapse between records throughout the lifetime of the session.

    url: "/streams/{stream}/records"