export type DeleteApiV1ObservabilityPipelinesPipelineIdArgs = {pipeline_id: string}; export type DeleteApiV1ObservabilityPipelinesPipelineIdOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a pipeline * * DELETE /v1/observability/pipelines/{pipeline_id} */ export const deleteApiV1ObservabilityPipelinesPipelineId = async (args: DeleteApiV1ObservabilityPipelinesPipelineIdArgs, options?: DeleteApiV1ObservabilityPipelinesPipelineIdOptions) => { const {baseUrl = "https://api.mistral.ai", fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKey !== undefined) headers.set('authorization', `Bearer ${ApiKey}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/observability/pipelines/${encodeURIComponent(String(args.pipeline_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 };