export type PatchApiV3AdminOrganizationsIdArgs = {id: string, body: {name?: string | undefined, email?: string | undefined, phone?: string | undefined, address?: string | undefined, city?: string | undefined, stateOrProvince?: string | undefined, zip?: string | undefined, country?: string | undefined, vatNumber?: string | undefined, language?: string | undefined, currency?: string | undefined, ettoreModel?: string | undefined, ettoreInstructions?: string | undefined, assistantDailyBudget?: (number | null) | undefined, falai_api_key?: string | undefined, open_router_api_key?: string | undefined, pending_approval?: boolean | undefined, is_catalogue?: boolean | undefined, is_vendor?: boolean | undefined}}; export type PatchApiV3AdminOrganizationsIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update an organization * * PATCH /v3/admin/organizations/{id} */ export const patchApiV3AdminOrganizationsId = async (args: PatchApiV3AdminOrganizationsIdArgs, options?: PatchApiV3AdminOrganizationsIdOptions) => { const {baseUrl = "https://api.rhinoartisan.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (ApiKeyAuth !== undefined) headers.set("apikey", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v3/admin/organizations/${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 };