export type DeleteApiProjectsProjectIdCcrRepositoriesRepositoryIdArgs = {project_id: string, repository_id: string, location?: string | undefined}; export type DeleteApiProjectsProjectIdCcrRepositoriesRepositoryIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a container registry repository from the project. * * DELETE /projects/{project_id}/ccr/repositories/{repository_id} */ export const deleteApiProjectsProjectIdCcrRepositoriesRepositoryId = async (args: DeleteApiProjectsProjectIdCcrRepositoriesRepositoryIdArgs, options?: DeleteApiProjectsProjectIdCcrRepositoriesRepositoryIdOptions) => { const {baseUrl = "https://api.cloud.crusoe.ai/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.location != null) query.append("location", String(args.location)) const url = `${baseUrl.replace(/\/+$/, '')}/projects/${encodeURIComponent(String(args.project_id))}/ccr/repositories/${encodeURIComponent(String(args.repository_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 };