export type UpdateApiFleetsFleetIdArgs = {fleet_id: number, 'Accept-Language'?: ('en' | 'de' | 'fr' | 'ja' | 'ru' | 'zh' | 'ko' | 'es') | undefined, 'If-None-Match'?: string | undefined, 'X-Compatibility-Date': '2025-12-16', 'X-Tenant'?: string | undefined, 'If-Modified-Since'?: string | undefined, body: {is_free_move?: boolean | undefined, motd?: string | undefined}}; export type UpdateApiFleetsFleetIdOptions = {baseUrl?: string | undefined, OAuth2?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update fleet * * PUT /fleets/{fleet_id} */ export const updateApiFleetsFleetId = async (args: UpdateApiFleetsFleetIdArgs, options?: UpdateApiFleetsFleetIdOptions) => { const {baseUrl = "https://esi.evetech.net", fetch: fetchFn = fetch, OAuth2} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args['Accept-Language'] != null) headers.set("Accept-Language", String(args['Accept-Language'])) if (args['If-None-Match'] != null) headers.set("If-None-Match", String(args['If-None-Match'])) if (args['X-Compatibility-Date'] != null) headers.set("X-Compatibility-Date", String(args['X-Compatibility-Date'])) if (args['X-Tenant'] != null) headers.set("X-Tenant", String(args['X-Tenant'])) if (args['If-Modified-Since'] != null) headers.set("If-Modified-Since", String(args['If-Modified-Since'])) if (OAuth2 !== undefined) headers.set('authorization', `Bearer ${OAuth2}`) const url = `${baseUrl.replace(/\/+$/, '')}/fleets/${encodeURIComponent(String(args.fleet_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", 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 };