moqtail-ts
    Preparing search index...

    Type Alias FetchOptions

    Options for performing a FETCH operation for historical or relative object ranges.

    const { requestId, stream } = await client.fetch({
    priority: 64,
    groupOrder: GroupOrder.Original,
    typeAndProps: {
    type: FetchType.StandAlone,
    props: { fullTrackName, startLocation, endLocation }
    }
    })
    const { requestId: subId } = await client.subscribe({
    fullTrackName,
    priority: 0,
    groupOrder: GroupOrder.Original,
    forward: true,
    filterType: FilterType.LatestObject
    })
    const fetchRes = await client.fetch({
    priority: 32,
    groupOrder: GroupOrder.Original,
    typeAndProps: {
    type: FetchType.Relative,
    props: { joiningRequestId: subId, joiningStart: 0n }
    }
    })
    type FetchOptions = {
        groupOrder: GroupOrder;
        parameters?: VersionSpecificParameters;
        priority: number;
        typeAndProps:
            | {
                props: {
                    endLocation: Location;
                    fullTrackName: FullTrackName;
                    startLocation: Location;
                };
                type: StandAlone;
            }
            | {
                props: { joiningRequestId: bigint; joiningStart: bigint };
                type: Relative;
            }
            | {
                props: { joiningRequestId: bigint; joiningStart: bigint };
                type: Absolute;
            };
    }
    Index

    Properties

    groupOrder: GroupOrder

    GroupOrder governing sequencing.

    Optional VersionSpecificParameters block.

    priority: number

    Request priority (0 = highest, 255 = lowest). Rounded & clamped.

    typeAndProps:
        | {
            props: {
                endLocation: Location;
                fullTrackName: FullTrackName;
                startLocation: Location;
            };
            type: StandAlone;
        }
        | {
            props: { joiningRequestId: bigint; joiningStart: bigint };
            type: Relative;
        }
        | {
            props: { joiningRequestId: bigint; joiningStart: bigint };
            type: Absolute;
        }

    Discriminated union selecting the FetchType mode and its specific properties:

    • StandAlone: full explicit range on a FullTrackName with start/end Locations.
    • Relative / Absolute: join an existing SubscribeRequest (identified by joiningRequestId) with starting position joiningStart.

    Type declaration

    • {
          props: {
              endLocation: Location;
              fullTrackName: FullTrackName;
              startLocation: Location;
          };
          type: StandAlone;
      }
    • { props: { joiningRequestId: bigint; joiningStart: bigint }; type: Relative }
      • props: { joiningRequestId: bigint; joiningStart: bigint }

        Properties for relative fetch: subscription id and starting position.

      • type: Relative

        Fetch a range relative to an existing SubscribeRequest identified by joiningRequestId.

    • { props: { joiningRequestId: bigint; joiningStart: bigint }; type: Absolute }
      • props: { joiningRequestId: bigint; joiningStart: bigint }

        Properties for absolute fetch: subscription id and starting position.

      • type: Absolute

        Fetch an absolute group/object range relative to a SubscribeRequest.