Sanity Library Reference Docs
    Preparing search index...

    Interface SyncTagInvalidateContextBeta

    The context object passed to the sync tag invalidate event handler.

    interface SyncTagInvalidateContext {
        callbackToken: string;
        clientOptions: {
            apiHost: string;
            dataset: string;
            projectId: string;
            token?: string;
        };
        eventResourceId: string;
        eventResourceType: string;
        functionResourceId: string;
        functionResourceType: string;
        local?: boolean;
    }

    Hierarchy

    Index

    Properties

    callbackToken: string

    A short-lived token that should be used to notify Sanity of sync tag invalidation routine completion. Recommended to use the done helper argument provided to the sync tag invalidate event handler instead of this token directly.

    clientOptions: {
        apiHost: string;
        dataset: string;
        projectId: string;
        token?: string;
    }

    Type declaration

    eventResourceId: string

    The resource ID of the event source; resource ID that invoked the function.

    eventResourceType: string

    The resource type of the event source; resource type that invoked the function.

    functionResourceId: string

    The resource ID of the function container; resource ID that houses the function.

    functionResourceType: string

    The resource type of the function container; resource type that houses the function.

    local?: boolean

    local is set to true when testing your function locally. i.e. sanity function test func-name Otherwise, the property is not set.