Sanity Library Reference Docs
    Preparing search index...

    Interface LiveClient

    interface LiveClient {
        events(
            __namedParameters?: {
                includeDrafts?: boolean;
                tag?: string;
                waitFor?: "function";
            },
        ): Observable<LiveEvent>;
    }
    Index

    Methods

    Methods

    • Requires apiVersion to be 2021-03-25 or later.

      Parameters

      • __namedParameters: { includeDrafts?: boolean; tag?: string; waitFor?: "function" } = {}
        • OptionalincludeDrafts?: boolean
        • Optionaltag?: string

          Optional request tag for the listener. Use to identify the request in logs.

          undefined

        • OptionalwaitFor?: "function"

          Delays events until after a Sanity Function has processed them and called the callback endpoint. When omitted, events are delivered immediately.

      Returns Observable<LiveEvent>