export type CreateApiAppCreateGKeywordPlannerPlannerIdReprocessArgs = {plannerId: number, body: {url: string, prompt?: (string | null) | undefined, language?: (number | null) | undefined, locations?: (Array | null) | undefined}}; export type CreateApiAppCreateGKeywordPlannerPlannerIdReprocessOptions = {baseUrl: string, token?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /app/create/g/keywordPlanner/{plannerId}/reprocess */ export const createApiAppCreateGKeywordPlannerPlannerIdReprocess = async (args: CreateApiAppCreateGKeywordPlannerPlannerIdReprocessArgs, options: CreateApiAppCreateGKeywordPlannerPlannerIdReprocessOptions) => { const {baseUrl, fetch: fetchFn = fetch, token} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (token !== undefined) headers.set("authorization", token) const url = `${baseUrl.replace(/\/+$/, '')}/app/create/g/keywordPlanner/${encodeURIComponent(String(args.plannerId))}/reprocess${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };