export type CharacterID = number; export type UpdateApiCharactersCharacterIdContactsArgs = {character_id: CharacterID, label_ids?: Array | undefined, standing: number, watched?: boolean | undefined, '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: Array}; export type UpdateApiCharactersCharacterIdContactsOptions = {baseUrl?: string | undefined, OAuth2?: string | undefined, fetch?: typeof fetch | undefined}; /** * Edit contacts * * PUT /characters/{character_id}/contacts */ export const updateApiCharactersCharacterIdContacts = async (args: UpdateApiCharactersCharacterIdContactsArgs, options?: UpdateApiCharactersCharacterIdContactsOptions) => { 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") for (const item of args.label_ids ?? []) query.append("label_ids", String(item)) if (args.standing != null) query.append("standing", String(args.standing)) if (args.watched != null) query.append("watched", String(args.watched)) 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(/\/+$/, '')}/characters/${encodeURIComponent(String(args.character_id))}/contacts${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 };