Something went wrong. Try again.
TypeScript client for accessing TLE Community.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200import type { components } from './schema';import type { ViewResponse as BuildingViewResponse } from './building';
/** The 26 spy assignments (`assign_spy`'s `assignment` param, spy `assignment` * and `possible_assignments[].task`). */export type Assignment = | 'Idle' | 'Bugout' | 'Counter Espionage' | 'Security Sweep' | 'Intel Training' | 'Mayhem Training' | 'Politics Training' | 'Theft Training' | 'Political Propaganda' | 'Gather Resource Intelligence' | 'Gather Empire Intelligence' | 'Gather Operative Intelligence' | 'Hack Network 19' | 'Sabotage Probes' | 'Rescue Comrades' | 'Sabotage Resources' | 'Appropriate Resources' | 'Assassinate Operatives' | 'Sabotage Infrastructure' | 'Sabotage Defenses' | 'Sabotage BHG' | 'Incite Mutiny' | 'Abduct Operatives' | 'Appropriate Technology' | 'Incite Rebellion' | 'Incite Insurrection';
export interface Spy { id: number; name: string; assignment: Assignment; possible_assignments?: Array<{ task?: Assignment; recovery?: number; skill?: string }>; level: number; politics: number; mayhem: number; theft: number; intel: number; offense_rating?: number; defense_rating?: number; assigned_to?: { body_id?: number; name?: string; x?: number; y?: number }; based_from?: { body_id?: number; name?: string; x?: number; y?: number }; is_available: 1 | 0; available_on?: string; started_assignment?: string; seconds_remaining?: number; mission_count?: { offensive?: number; defensive?: number };}
/** * The Intelligence Ministry `view` response. `spies` is a top-level sibling of * `building` (not nested inside it). The four spy-*training* buildings * (`inteltraining`, ...) report a different `spies` shape * (`{ max_points, points_per, in_training }`) - see the follow-up TODO. */export interface ViewResponse extends BuildingViewResponse { spies: { maximum: number; current: number; in_training: number; training_costs: { water: number; waste: number; energy: number; food: number; ore: number; /** Fractional; can be an integer on the clamped/unhappy path. */ time: number; }; };}
export interface TrainSpyParams { building_id: number; quantity?: number;}
export interface TrainSpyResponse { trained: number; not_trained: number; reason_not_trained?: { code?: number; message?: string }; status: { server: components['schemas']['server_status']; empire?: components['schemas']['empire_status']; body?: components['schemas']['body_status']; };}
export interface ViewSpiesParams { building_id: number; page_number?: number;}
export interface ViewSpiesResponse { spies: Spy[]; spy_count: number; status: { server: components['schemas']['server_status']; empire?: components['schemas']['empire_status']; body?: components['schemas']['body_status']; };}
export interface ViewAllSpiesParams { building_id: number;}
export interface ViewAllSpiesResponse { spies: Spy[]; spy_count: number; status: { server: components['schemas']['server_status']; empire?: components['schemas']['empire_status']; body?: components['schemas']['body_status']; };}
export interface SubsidizeTrainingParams { building_id: number;}
export interface SubsidizeTrainingResponse { building: components['schemas']['building']; status: { server: components['schemas']['server_status']; empire?: components['schemas']['empire_status']; body?: components['schemas']['body_status']; };}
export interface BurnSpyParams { building_id: number; spy_id: number;}
export interface BurnSpyResponse { status: { server: components['schemas']['server_status']; empire?: components['schemas']['empire_status']; body?: components['schemas']['body_status']; };}
export interface NameSpyParams { building_id: number; spy_id: number; name: string;}
export interface NameSpyResponse { status: { server: components['schemas']['server_status']; empire?: components['schemas']['empire_status']; body?: components['schemas']['body_status']; };}
export interface NameSpiesParams { building_id: number; prefix?: string; suffix?: string; rename_null_only?: boolean;}
export interface NameSpiesResponse { spies: Spy[]; spy_count: number; renamed: number; status: { server: components['schemas']['server_status']; empire?: components['schemas']['empire_status']; body?: components['schemas']['body_status']; };}
export interface AssignSpyParams { building_id: number; spy_id: number; assignment: Assignment | { assignment: Assignment; noempty?: boolean };}
export interface AssignSpyResponse { mission: { result?: 'Accepted' | 'Success' | 'Bounce' | 'Failure'; message_id?: number; reason?: string; }; spy: Spy; status: { server: components['schemas']['server_status']; empire?: components['schemas']['empire_status']; body?: components['schemas']['body_status']; };}