export type CreateApiContextDevBrandPrefetchOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Signal that you may fetch brand data for a particular domain soon to improve latency. This endpoint does not charge credits and is available for paid customers to optimize future requests. [You must be on a paid plan to use this endpoint] * * POST /context-dev/brand/prefetch */ export const createApiContextDevBrandPrefetch = async (options?: CreateApiContextDevBrandPrefetchOptions) => { const {baseUrl = "https://mpp.orthogonal.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/context-dev/brand/prefetch${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };