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

    Variable AppendRecord

    AppendRecord: {
        command: {
            (command: string, body?: string, timestamp?: number): AppendRecordType;
            (
                command: Uint8Array,
                body?: Uint8Array,
                timestamp?: number,
            ): AppendRecordType;
        };
        fence: (fencing_token: string, timestamp?: number) => AppendRecordType;
        make: {
            (
                body?: string,
                headers?: [string, string][] | Record<string, string>,
                timestamp?: number,
            ): AppendRecordType;
            (
                body?: Uint8Array,
                headers?: [Uint8Array, Uint8Array][],
                timestamp?: number,
            ): AppendRecordType;
        };
        trim: (seqNum: number | bigint, timestamp?: number) => AppendRecordType;
    }

    Helpers to construct appendable records.

    These helpers mirror the OpenAPI record schema and add convenience builders for S2 command records:

    • make creates a normal record
    • command creates a command record with an empty-name header set to the command name
    • fence is a command record enforcing a fencing token
    • trim is a command record that encodes a sequence number for trimming

    Type Declaration

    • Readonlycommand: {
          (command: string, body?: string, timestamp?: number): AppendRecordType;
          (
              command: Uint8Array,
              body?: Uint8Array,
              timestamp?: number,
          ): AppendRecordType;
      }
    • Readonlyfence: (fencing_token: string, timestamp?: number) => AppendRecordType
    • Readonlymake: {
          (
              body?: string,
              headers?: [string, string][] | Record<string, string>,
              timestamp?: number,
          ): AppendRecordType;
          (
              body?: Uint8Array,
              headers?: [Uint8Array, Uint8Array][],
              timestamp?: number,
          ): AppendRecordType;
      }
    • Readonlytrim: (seqNum: number | bigint, timestamp?: number) => AppendRecordType