export type DeleteApiApiV1CachesProviderProviderFlushGroupIdArgs = {provider: string, group: string, id: string}; export type DeleteApiApiV1CachesProviderProviderFlushGroupIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * DELETE /api/v1/caches/provider/{provider}/flush/{group}/{id} */ export const deleteApiApiV1CachesProviderProviderFlushGroupId = async (args: DeleteApiApiV1CachesProviderProviderFlushGroupIdArgs, options: DeleteApiApiV1CachesProviderProviderFlushGroupIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/caches/provider/${encodeURIComponent(String(args.provider))}/flush/${encodeURIComponent(String(args.group))}/${encodeURIComponent(String(args.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 (await res.json()) as unknown };