export type DeleteApiApiV1AccountAuthIdCallCallUuidArgs = {auth_id: string, call_uuid: string}; export type DeleteApiApiV1AccountAuthIdCallCallUuidOptions = {baseUrl?: string | undefined, AuthID?: string | undefined, AuthToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Hang up a call * * DELETE /api/v1/Account/{auth_id}/Call/{call_uuid} */ export const deleteApiApiV1AccountAuthIdCallCallUuid = async (args: DeleteApiApiV1AccountAuthIdCallCallUuidArgs, options?: DeleteApiApiV1AccountAuthIdCallCallUuidOptions) => { const {baseUrl = "https://api.vobiz.ai", fetch: fetchFn = fetch, AuthID, AuthToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (AuthID !== undefined) headers.set("X-Auth-ID", AuthID) if (AuthToken !== undefined) headers.set("X-Auth-Token", AuthToken) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/Account/${encodeURIComponent(String(args.auth_id))}/Call/${encodeURIComponent(String(args.call_uuid))}${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 undefined };