export type DeleteApiV1AssetsAssetIdProxiesProxyIdArgs = {'App-ID': string, 'Auth-Token': string, asset_id: string, proxy_id: string}; export type DeleteApiV1AssetsAssetIdProxiesProxyIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete asset's proxy * * DELETE /v1/assets/{asset_id}/proxies/{proxy_id}/ */ export const deleteApiV1AssetsAssetIdProxiesProxyId = async (args: DeleteApiV1AssetsAssetIdProxiesProxyIdArgs, options: DeleteApiV1AssetsAssetIdProxiesProxyIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['App-ID'] != null) headers.set("App-ID", String(args['App-ID'])) if (args['Auth-Token'] != null) headers.set("Auth-Token", String(args['Auth-Token'])) const url = `${baseUrl.replace(/\/+$/, '')}/v1/assets/${encodeURIComponent(String(args.asset_id))}/proxies/${encodeURIComponent(String(args.proxy_id))}/${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 };