export type DeleteApiV1NameArgs = {name: string}; export type DeleteApiV1NameOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a specific question written by the current user. * * DELETE /v1/{+name} */ export const deleteApiV1Name = async (args: DeleteApiV1NameArgs, options?: DeleteApiV1NameOptions) => { const {baseUrl = "https://mybusinessqanda.googleapis.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/v1/${encodeURIComponent(String(args['+name']))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };