export type DeleteApiV3AdminOrganizationsIdVendorRetailersRetailerIdArgs = {id: string, retailerId: string}; export type DeleteApiV3AdminOrganizationsIdVendorRetailersRetailerIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Stop giving the vendor's capsules to a store * * DELETE /v3/admin/organizations/{id}/vendor/retailers/{retailerId} */ export const deleteApiV3AdminOrganizationsIdVendorRetailersRetailerId = async (args: DeleteApiV3AdminOrganizationsIdVendorRetailersRetailerIdArgs, options?: DeleteApiV3AdminOrganizationsIdVendorRetailersRetailerIdOptions) => { const {baseUrl = "https://api.rhinoartisan.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("apikey", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v3/admin/organizations/${encodeURIComponent(String(args.id))}/vendor/retailers/${encodeURIComponent(String(args.retailerId))}${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 };