export type DeleteApiSelfHostedTerraformPlansKeyOutputArgs = {key: string}; export type DeleteApiSelfHostedTerraformPlansKeyOutputOptions = {baseUrl?: string | undefined, RunnerPoolAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Terraform plan output (self-hosted) * * DELETE /self-hosted/terraform/plans/{key}/output */ export const deleteApiSelfHostedTerraformPlansKeyOutput = async (args: DeleteApiSelfHostedTerraformPlansKeyOutputArgs, options?: DeleteApiSelfHostedTerraformPlansKeyOutputOptions) => { const {baseUrl = "https://api.firefly.ai/v2", fetch: fetchFn = fetch, RunnerPoolAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (RunnerPoolAuth !== undefined) headers.set('authorization', `Bearer ${RunnerPoolAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/self-hosted/terraform/plans/${encodeURIComponent(String(args.key))}/output${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 };