export type DeleteApiProjectsProjectIdRunbooksnapshotsIdArgs = {projectId: string, id: string}; export type DeleteApiProjectsProjectIdRunbooksnapshotsIdOptions = {baseUrl?: string | undefined, APIKeyHeader?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an existing Runbook Snapshot * * DELETE /projects/{projectId}/runbooksnapshots/{id} * * Also accepts auth: APIKeyQuery, NugetApiKeyHeader */ export const deleteApiProjectsProjectIdRunbooksnapshotsId = async (args: DeleteApiProjectsProjectIdRunbooksnapshotsIdArgs, options?: DeleteApiProjectsProjectIdRunbooksnapshotsIdOptions) => { const {baseUrl = "https://demo.octopus.app/api", fetch: fetchFn = fetch, APIKeyHeader} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKeyHeader !== undefined) headers.set("X-Octopus-ApiKey", APIKeyHeader) const url = `${baseUrl.replace(/\/+$/, '')}/projects/${encodeURIComponent(String(args.projectId))}/runbooksnapshots/${encodeURIComponent(String(args.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 };