export type RBIAISystemCreate = {system_id: string, risk_mitigation?: Record | undefined, recommendations?: Array | undefined, created_by?: string | undefined, created_at?: string | undefined, updated_at?: string | undefined, submitted_at?: string | undefined, submitted_by?: string | undefined, approved_at?: string | undefined, approved_by?: string | undefined, rejected_at?: string | undefined, rejected_by?: string | undefined, rejection_reason?: string | undefined}; export type PatchApiApiV1RbiAiSystemsIdArgs = {id: string, body: RBIAISystemCreate}; export type PatchApiApiV1RbiAiSystemsIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update AI system * * PATCH /api/v1/rbi/ai-systems/{id} */ export const patchApiApiV1RbiAiSystemsId = async (args: PatchApiApiV1RbiAiSystemsIdArgs, options?: PatchApiApiV1RbiAiSystemsIdOptions) => { const {baseUrl = "https://orchestrator.getaxonflow.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/rbi/ai-systems/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };