export type DeleteApiApiopsProjectsProjectNameConsumerOrganizationsCodeArgs = {projectName: string, code: string}; export type DeleteApiApiopsProjectsProjectNameConsumerOrganizationsCodeOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a consumer organization * * DELETE /apiops/projects/{projectName}/consumer-organizations/{code} */ export const deleteApiApiopsProjectsProjectNameConsumerOrganizationsCode = async (args: DeleteApiApiopsProjectsProjectNameConsumerOrganizationsCodeArgs, options?: DeleteApiApiopsProjectsProjectNameConsumerOrganizationsCodeOptions) => { const {baseUrl = "http://167.86.118.166:32080", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/apiops/projects/${encodeURIComponent(String(args.projectName))}/consumer-organizations/${encodeURIComponent(String(args.code))}${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 };