export type CharacterID = number; export type DeleteApiCharactersCharacterIdContactsArgs = {character_id: CharacterID, contact_ids: Array, '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}; export type DeleteApiCharactersCharacterIdContactsOptions = {baseUrl?: string | undefined, OAuth2?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete contacts * * DELETE /characters/{character_id}/contacts */ export const deleteApiCharactersCharacterIdContacts = async (args: DeleteApiCharactersCharacterIdContactsArgs, options?: DeleteApiCharactersCharacterIdContactsOptions) => { const {baseUrl = "https://esi.evetech.net", fetch: fetchFn = fetch, OAuth2} = options ?? {} const query = new URLSearchParams() const headers = new Headers() for (const item of args.contact_ids ?? []) query.append("contact_ids", String(item)) 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: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };