import { VOUCH_EMBED_TYPE } from '../../constants'; import type { EmbedVouch, VouchEmbedGTMEvent } from '../../types'; import { Environment } from '../environment'; import { UseFetchReturn } from './useFetch'; export declare const API: string; export declare const DEFAULT_HEADERS: { 'Content-Type': string; 'x-gtm-server-preview': string; }; export type Payload = { vouch?: EmbedVouch; events: Array; }; export type WatchPayload = { env?: Environment; hashId: string; apiKey: string; ordinality: number; embedType: keyof typeof VOUCH_EMBED_TYPE; }; interface UseTrackReturn extends Omit, 'refetch'> { track: (payload: Payload) => void; trackOnce: (payload: Payload) => void; trackWatch: (payload: WatchPayload) => void; } export declare function getRequestBody({ vouch, ...payload }: Payload): BodyInit | undefined; /** * Google Tag Manager (GTM) hook * * @returns GraphQL-alike `loading`, `error`, `data` and `track` function to trigger fetch */ export default function (): UseTrackReturn; export {};