@coveo/headless
    Preparing search index...

    Type Alias FetchStaticStateOptions

    This interface will be remove on the next major version. Use BuildConfig interface instead

    type FetchStaticStateOptions = {
        accessToken?: string;
        navigatorContext?: NavigatorContext;
    }
    Index
    accessToken?: string

    A per-request access token (for example, a per-user Coveo search token) to use for this fetchStaticState() call only.

    When provided, it overrides the access token from the engine definition configuration for this request without mutating the shared definition, which is the supported way to use per-user search tokens in a multi-tenant server process. When omitted, the definition's configured access token is used.

    The resulting engine is request-scoped, so it is not subscribed to setAccessToken() updates: a concurrent call on the shared definition cannot overwrite this token.

    This token is NOT carried over to hydrateStaticState(). When you pass an accessToken here, you MUST pass the same token to the matching hydrateStaticState() call, otherwise the hydrated engine silently falls back to the definition's configured token and every client-side request (facets, pagination, search-as-you-type) queries with the wrong permissions.

    navigatorContext?: NavigatorContext

    The navigator context to use for this request only.

    When provided, it is applied to this request's engine without mutating the shared definition, so concurrent requests do not read each other's client ID, user agent, or forwarded-for values. When omitted, the provider set with setNavigatorContextProvider is used.