export type DeleteApiApiopsProjectsProjectNameCredentialOrganizationsCodeArgs = {projectName: string, code: string}; export type DeleteApiApiopsProjectsProjectNameCredentialOrganizationsCodeOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Credential Organization * * DELETE /apiops/projects/{projectName}/credential-organizations/{code} */ export const deleteApiApiopsProjectsProjectNameCredentialOrganizationsCode = async (args: DeleteApiApiopsProjectsProjectNameCredentialOrganizationsCodeArgs, options?: DeleteApiApiopsProjectsProjectNameCredentialOrganizationsCodeOptions) => { 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))}/credential-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 };