export type DeleteApiOrganizationsProjectsProjectIdArgs = {project_id: string}; export type DeleteApiOrganizationsProjectsProjectIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a project. * * DELETE /organizations/projects/{project_id} */ export const deleteApiOrganizationsProjectsProjectId = async (args: DeleteApiOrganizationsProjectsProjectIdArgs, options?: DeleteApiOrganizationsProjectsProjectIdOptions) => { const {baseUrl = "https://api.cloud.crusoe.ai/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/organizations/projects/${encodeURIComponent(String(args.project_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 undefined };