export type DeleteApiPolicyTenantLocatorQuotesGroupsLocatorArgs = {tenantLocator: string, locator: unknown}; export type DeleteApiPolicyTenantLocatorQuotesGroupsLocatorOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * DELETE /policy/{tenantLocator}/quotes/groups/{locator} */ export const deleteApiPolicyTenantLocatorQuotesGroupsLocator = async (args: DeleteApiPolicyTenantLocatorQuotesGroupsLocatorArgs, options: DeleteApiPolicyTenantLocatorQuotesGroupsLocatorOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/policy/${encodeURIComponent(String(args.tenantLocator))}/quotes/groups/${encodeURIComponent(String(args.locator))}${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 };