tornapi-typescript 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3006 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * This file is generated by core-types-ts on behalf of typeconv, DO NOT EDIT.
5
+ * For more information, see:
6
+ * - {@link https://github.com/grantila/core-types-ts}
7
+ * - {@link https://github.com/grantila/typeconv}
8
+ */
9
+
10
+ export type RaceClassEnum = "A" | "B" | "C" | "D" | "E";
11
+
12
+ export type FactionOrganizedCrimePayoutType =
13
+ | "balance"
14
+ | "wallet"
15
+ | "inventory";
16
+
17
+ export type FactionNewsCategory =
18
+ | "main"
19
+ | "attack"
20
+ | "armoryDeposit"
21
+ | "armoryAction"
22
+ | "territoryWar"
23
+ | "rankedWar"
24
+ | "territoryGain"
25
+ | "chain"
26
+ | "crime"
27
+ | "membership"
28
+ | "depositFunds"
29
+ | "giveFunds";
30
+
31
+ export type FactionRankEnum =
32
+ | "Unranked"
33
+ | "Bronze"
34
+ | "Silver"
35
+ | "Gold"
36
+ | "Platinum"
37
+ | "Diamond";
38
+
39
+ export type UserCrimeUniquesRewardAmmoEnum = "standard" | "special";
40
+
41
+ export type RaceStatusEnum = "open" | "in_progress" | "finished";
42
+
43
+ export type TornHofCategory =
44
+ | "level"
45
+ | "busts"
46
+ | "rank"
47
+ | "traveltime"
48
+ | "workstats"
49
+ | "networth"
50
+ | "revives"
51
+ | "defends"
52
+ | "offences"
53
+ | "attacks"
54
+ | "awards"
55
+ | "racingwins"
56
+ | "racingpoints"
57
+ | "racingskill";
58
+
59
+ export type TornFactionHofCategory = "respect" | "chains" | "rank";
60
+
61
+ export type FactionAttackResult =
62
+ | "None"
63
+ | "Attacked"
64
+ | "Mugged"
65
+ | "Hospitalized"
66
+ | "Arrested"
67
+ | "Looted"
68
+ | "Lost"
69
+ | "Stalemate"
70
+ | "Assist"
71
+ | "Escape"
72
+ | "Timeout"
73
+ | "Special"
74
+ | "Bounty"
75
+ | "Interrupted";
76
+
77
+ export type RaceCarUpgradeCategory =
78
+ | "Aerodynamics"
79
+ | "Brakes"
80
+ | "Engine"
81
+ | "Exhaust and Induction"
82
+ | "Fuel"
83
+ | "Safety"
84
+ | "Suspension"
85
+ | "Transmission"
86
+ | "Weight Reduction"
87
+ | "Wheels and Tyres";
88
+
89
+ export type JobPositionArmyEnum =
90
+ | "Private"
91
+ | "Corporal"
92
+ | "Sergeant"
93
+ | "Master Sergeant"
94
+ | "Warrant Officer"
95
+ | "Lieutenant"
96
+ | "Major"
97
+ | "Colonel"
98
+ | "Brigadier"
99
+ | "General";
100
+
101
+ export type JobPositionGrocerEnum =
102
+ | "Bagboy"
103
+ | "Price Labeler"
104
+ | "Cashier"
105
+ | "Food Delivery"
106
+ | "Manager";
107
+
108
+ export type WeaponBonusEnum =
109
+ | "Any"
110
+ | "Double"
111
+ | "Yellow"
112
+ | "Orange"
113
+ | "Red"
114
+ | "Achilles"
115
+ | "Assassinate"
116
+ | "Backstab"
117
+ | "Berserk"
118
+ | "Bleed"
119
+ | "Blindfire"
120
+ | "Blindside"
121
+ | "Bloodlust"
122
+ | "Burn"
123
+ | "Comeback"
124
+ | "Conserve"
125
+ | "Cripple"
126
+ | "Crusher"
127
+ | "Cupid"
128
+ | "Deadeye"
129
+ | "Deadly"
130
+ | "Demoralize"
131
+ | "Disarm"
132
+ | "Double-edged"
133
+ | "Double Tap"
134
+ | "Emasculate"
135
+ | "Empower"
136
+ | "Eviscerate"
137
+ | "Execute"
138
+ | "Expose"
139
+ | "Finale"
140
+ | "Focus"
141
+ | "Freeze"
142
+ | "Frenzy"
143
+ | "Fury"
144
+ | "Grace"
145
+ | "Hazardous"
146
+ | "Home run"
147
+ | "Irradiate"
148
+ | "Lacerate"
149
+ | "Motivation"
150
+ | "Paralyze"
151
+ | "Parry"
152
+ | "Penetrate"
153
+ | "Plunder"
154
+ | "Poison"
155
+ | "Powerful"
156
+ | "Proficience"
157
+ | "Puncture"
158
+ | "Quicken"
159
+ | "Rage"
160
+ | "Revitalize"
161
+ | "Roshambo"
162
+ | "Shock"
163
+ | "Sleep"
164
+ | "Slow"
165
+ | "Smash"
166
+ | "Smurf"
167
+ | "Specialist"
168
+ | "Spray"
169
+ | "Storage"
170
+ | "Stricken"
171
+ | "Stun"
172
+ | "Suppress"
173
+ | "Sure Shot"
174
+ | "Throttle"
175
+ | "Toxin"
176
+ | "Warlord"
177
+ | "Weaken"
178
+ | "Wind-up"
179
+ | "Wither";
180
+
181
+ export type JobPositionCasinoEnum =
182
+ | "Gaming Consultant"
183
+ | "Marketing Manager"
184
+ | "Revenue Manager"
185
+ | "Casino Manager"
186
+ | "Casino President";
187
+
188
+ export type AttackFinishingHitEffect =
189
+ | "proficience"
190
+ | "stricken"
191
+ | "revitalize"
192
+ | "warlord"
193
+ | "plunder"
194
+ | "irradiate";
195
+
196
+ export type JobPositionMedicalEnum =
197
+ | "Medical Student"
198
+ | "Houseman"
199
+ | "Senior Houseman"
200
+ | "GP"
201
+ | "Consultant"
202
+ | "Surgeon"
203
+ | "Brain Surgeon";
204
+
205
+ export type JobPositionLawEnum =
206
+ | "Law Student"
207
+ | "Paralegal"
208
+ | "Probate Lawyer"
209
+ | "Trial Lawyer"
210
+ | "Circuit Court Judge"
211
+ | "Federal Judge";
212
+
213
+ export type JobPositionEducationEnum =
214
+ | "Recess Supervisor"
215
+ | "Substitute Teacher"
216
+ | "Elementary Teacher"
217
+ | "Secondary Teacher"
218
+ | "Professor"
219
+ | "Vice-Principal"
220
+ | "Principal";
221
+
222
+ export type RaceCarUpgradeSubCategory =
223
+ | "Engine Cooling"
224
+ | "Front Diffuser"
225
+ | "Rear Diffuser"
226
+ | "Spoiler"
227
+ | "Brake Accessory"
228
+ | "Brake Control"
229
+ | "Callipers"
230
+ | "Discs"
231
+ | "Brake Cooling"
232
+ | "Fluid"
233
+ | "Rear Control Arms"
234
+ | "Springs"
235
+ | "Upper Front Brace"
236
+ | "Clutch"
237
+ | "Differential"
238
+ | "Flywheel"
239
+ | "Gearbox"
240
+ | "Shifting"
241
+ | "Boot"
242
+ | "Hood"
243
+ | "Interior"
244
+ | "Roof"
245
+ | "Steering wheel"
246
+ | "Strip out"
247
+ | "Windows"
248
+ | "Tyres"
249
+ | "Wheels"
250
+ | "Rear Bushes"
251
+ | "Rear Brace"
252
+ | "Lower Front Brace"
253
+ | "Front Tie Rods"
254
+ | "Front Bushes"
255
+ | "Seat"
256
+ | "Safety Accessory"
257
+ | "Roll cage"
258
+ | "Overalls"
259
+ | "Helmet"
260
+ | "Fire Extinguisher"
261
+ | "Cut-off"
262
+ | "Fuel"
263
+ | "Manifold"
264
+ | "Exhaust"
265
+ | "Air Filter"
266
+ | "Turbo"
267
+ | "Pistons"
268
+ | "Intercooler"
269
+ | "Gasket"
270
+ | "Fuel Pump"
271
+ | "Engine Porting"
272
+ | "Engine Cleaning"
273
+ | "Computer"
274
+ | "Camshaft"
275
+ | "Pads";
276
+
277
+ export type FactionApplicationStatusEnum =
278
+ | "accepted"
279
+ | "declined"
280
+ | "withdrawn";
281
+
282
+ export type FactionRankedWarsCategoryEnum = "all" | "ongoing";
283
+
284
+ export type RaceId = number;
285
+
286
+ export type RaceTrackId = number;
287
+
288
+ export type RaceCarId = number;
289
+
290
+ export type RaceCarUpgradeId = number;
291
+
292
+ export type ItemId = number;
293
+
294
+ export type ItemModId = number;
295
+
296
+ export type AmmoId = number;
297
+
298
+ export type RankedWarId = number;
299
+
300
+ export type ItemUid = number;
301
+
302
+ export type UserId = number;
303
+
304
+ export type ReviveId = number;
305
+
306
+ export type LogId = number;
307
+
308
+ export type LogCategoryId = number;
309
+
310
+ export type FactionId = number;
311
+
312
+ export type FactionCrimeId = number;
313
+
314
+ export type ChainId = number;
315
+
316
+ export type AttackId = number;
317
+
318
+ export type AttackCode = string;
319
+
320
+ export type ForumId = number;
321
+
322
+ export type ForumThreadId = number;
323
+
324
+ export type ForumPostId = number;
325
+
326
+ export interface RequestLinks {
327
+ next: /** Auto-generated link to get the next set of records. */
328
+ string /** Auto-generated link to get the next set of records. */ | null;
329
+ prev: /** Auto-generated link to get the prev set of records. */
330
+ string /** Auto-generated link to get the prev set of records. */ | null;
331
+ }
332
+
333
+ export interface RequestMetadata {
334
+ links: RequestLinks;
335
+ }
336
+
337
+ export interface RequestMetadataWithLinks {
338
+ links: RequestLinks;
339
+ }
340
+
341
+ /**
342
+ * This represents the type of the activity. Values range from 1 to 8 where:
343
+ * * 1 = 'X posted on a thread',
344
+ * * 2 = 'X created a thread',
345
+ * * 3 = 'X liked your thread',
346
+ * * 4 = 'X disliked your thread',
347
+ * * 5 = 'X liked your post',
348
+ * * 6 = 'X disliked your post',
349
+ * * 7 = 'X quoted your post'.
350
+ */
351
+ export type ForumFeedTypeEnum = 1 | 2 | 3 | 4 | 5 | 6 | 7;
352
+
353
+ export type ReviveSetting =
354
+ | "Everyone"
355
+ | "Friends & faction"
356
+ | "No one"
357
+ | "Unknown";
358
+
359
+ export type FactionCrimeStatusEnum =
360
+ | "Recruiting"
361
+ | "Planning"
362
+ | "Successful"
363
+ | "Failure"
364
+ | "Expired";
365
+
366
+ export type AttackActionEnum =
367
+ | "attackerhosp"
368
+ | "busy"
369
+ | "critical hit"
370
+ | "attackerjail"
371
+ | "escapefail"
372
+ | "hit"
373
+ | "hosp"
374
+ | "joinfight"
375
+ | "leave"
376
+ | "loot"
377
+ | "lost"
378
+ | "missed"
379
+ | "mug"
380
+ | "noAmmo"
381
+ | "onItemUseEff"
382
+ | "opponenthosp"
383
+ | "opponentjail"
384
+ | "paralyzed"
385
+ | "reload"
386
+ | "runaway"
387
+ | "specialTemp"
388
+ | "specialTempI"
389
+ | "stalemate"
390
+ | "startfight"
391
+ | "stunned"
392
+ | "suppressed"
393
+ | "timeout"
394
+ | "won";
395
+
396
+ export type TornItemAmmoTypeEnum =
397
+ | "Standard"
398
+ | "Hollow Point"
399
+ | "Piercing"
400
+ | "Tracer"
401
+ | "Incendiary";
402
+
403
+ export type TornItemWeaponTypeEnum =
404
+ | "Heavy artillery"
405
+ | "Machine gun"
406
+ | "Pistol"
407
+ | "Rifle"
408
+ | "Shotgun"
409
+ | "SMG"
410
+ | "Temporary"
411
+ | "Clubbing"
412
+ | "Piercing"
413
+ | "Slashing"
414
+ | "Mechanical";
415
+
416
+ export type TornItemWeaponCategoryEnum =
417
+ | "Melee"
418
+ | "Secondary"
419
+ | "Primary"
420
+ | "Temporary";
421
+
422
+ export type TornItemTypeEnum =
423
+ | "Alcohol"
424
+ | "Armor"
425
+ | "Artifact"
426
+ | "Book"
427
+ | "Booster"
428
+ | "Candy"
429
+ | "Car"
430
+ | "Clothing"
431
+ | "Collectible"
432
+ | "Defensive"
433
+ | "Drug"
434
+ | "Energy Drink"
435
+ | "Enhancer"
436
+ | "Flower"
437
+ | "Jewelry"
438
+ | "Material"
439
+ | "Medical"
440
+ | "Melee"
441
+ | "Other"
442
+ | "Plushie"
443
+ | "Primary"
444
+ | "Secondary"
445
+ | "Special"
446
+ | "Supply Pack"
447
+ | "Temporary"
448
+ | "Tool"
449
+ | "Unused"
450
+ | "Weapon";
451
+
452
+ export type TornItemCategory =
453
+ | "All"
454
+ | "Alcohol"
455
+ | "Armor"
456
+ | "Artifact"
457
+ | "Book"
458
+ | "Booster"
459
+ | "Candy"
460
+ | "Car"
461
+ | "Clothing"
462
+ | "Collectible"
463
+ | "Defensive"
464
+ | "Drug"
465
+ | "Energy Drink"
466
+ | "Enhancer"
467
+ | "Flower"
468
+ | "Jewelry"
469
+ | "Material"
470
+ | "Medical"
471
+ | "Melee"
472
+ | "Other"
473
+ | "Plushie"
474
+ | "Primary"
475
+ | "Secondary"
476
+ | "Special"
477
+ | "Supply Pack"
478
+ | "Temporary"
479
+ | "Tool"
480
+ | "Unused"
481
+ | "Weapon";
482
+
483
+ export type TornItemArmorCoveragePartEnum =
484
+ | "Full Body"
485
+ | "Heart"
486
+ | "Stomach"
487
+ | "Chest"
488
+ | "Arm"
489
+ | "Groin"
490
+ | "Leg"
491
+ | "Throat"
492
+ | "Hand"
493
+ | "Foot"
494
+ | "Head";
495
+
496
+ export interface AttackPlayerFaction {
497
+ id: FactionId;
498
+ name: string;
499
+ }
500
+
501
+ export interface AttackPlayer {
502
+ id: UserId;
503
+ name: string;
504
+ level: number;
505
+ faction: AttackPlayerFaction | null;
506
+ }
507
+
508
+ export interface AttackPlayerSimplified {
509
+ id: UserId;
510
+ faction_id: FactionId & (number | null);
511
+ }
512
+
513
+ export interface AttackingFinishingHitEffects {
514
+ name: AttackFinishingHitEffect;
515
+ /** Advanced weapon bonus value in percentage. */
516
+ value: number;
517
+ }
518
+
519
+ export interface Attack {
520
+ id: AttackId;
521
+ code: AttackCode;
522
+ /** Attack start timestamp. */
523
+ started: number;
524
+ /** Attack end timestamp. */
525
+ ended: number;
526
+ attacker: AttackPlayer | null;
527
+ defender: AttackPlayer;
528
+ result: FactionAttackResult;
529
+ respect_gain: number;
530
+ respect_loss: number;
531
+ chain: number;
532
+ /** This is an experimental flag which should help determine 'assist' attacks which have not contributed to the chain. For example, attacks such as where the opponent lost to someoene else before the attacker could finish the attack. This flag might not work entirely correctly, so use with caution. */
533
+ is_interrupted: boolean;
534
+ is_stealthed: boolean;
535
+ is_raid: boolean;
536
+ is_ranked_war: boolean;
537
+ finishing_hit_effects: AttackingFinishingHitEffects[];
538
+ modifiers: {
539
+ fair_fight: number;
540
+ war: number;
541
+ retaliation: number;
542
+ group: number;
543
+ overseas: number;
544
+ chain: number;
545
+ warlord: number;
546
+ };
547
+ }
548
+
549
+ export interface AttackSimplified {
550
+ id: AttackId;
551
+ code: AttackCode;
552
+ /** Attack start timestamp. */
553
+ started: number;
554
+ /** Attack end timestamp. */
555
+ ended: number;
556
+ attacker: AttackPlayerSimplified | null;
557
+ defender: AttackPlayerSimplified;
558
+ result: FactionAttackResult;
559
+ respect_gain: number;
560
+ respect_loss: number;
561
+ }
562
+
563
+ export interface ReviveSimplified {
564
+ id: ReviveId;
565
+ reviver: {
566
+ id: UserId;
567
+ faction_id: FactionId & (number | null);
568
+ };
569
+ target: {
570
+ id: UserId;
571
+ faction_id: FactionId & (number | null);
572
+ hospital_reason: string;
573
+ early_discharge: boolean;
574
+ last_action: number;
575
+ online_status: string;
576
+ };
577
+ success_chance: number;
578
+ result: string;
579
+ timestamp: number;
580
+ }
581
+
582
+ export interface Revive {
583
+ id: ReviveId;
584
+ reviver: {
585
+ id: UserId;
586
+ name: string;
587
+ faction: {
588
+ id: FactionId;
589
+ name: string;
590
+ } | null;
591
+ };
592
+ target: {
593
+ id: UserId;
594
+ name: string;
595
+ faction: {
596
+ id: FactionId;
597
+ name: string;
598
+ } | null;
599
+ hospital_reason: string;
600
+ early_discharge: boolean;
601
+ last_action: number;
602
+ online_status: string;
603
+ };
604
+ success_chance: number;
605
+ result: string;
606
+ timestamp: number;
607
+ }
608
+
609
+ export interface RevivesResponse {
610
+ revives: Revive[];
611
+ _metadata: RequestMetadataWithLinks;
612
+ }
613
+
614
+ export interface RevivesFullResponse {
615
+ revives: ReviveSimplified[];
616
+ _metadata: RequestMetadataWithLinks;
617
+ }
618
+
619
+ export interface TimestampResponse {
620
+ timestamp: number;
621
+ }
622
+
623
+ export interface FactionHofStats {
624
+ rank: HofValueString;
625
+ respect: HofValue;
626
+ chain: HofValue;
627
+ }
628
+
629
+ export interface FactionHofResponse {
630
+ hof: FactionHofStats[];
631
+ }
632
+
633
+ /** Details about a faction member. */
634
+ export interface FactionMember {
635
+ id: UserId;
636
+ name: string;
637
+ position: string;
638
+ level: number;
639
+ days_in_faction: number;
640
+ is_revivable: boolean;
641
+ /** Shows if the member is currently defending territory wall. */
642
+ is_on_wall: boolean;
643
+ /** Shows if the member is currently participating in an organized crime. Show false for members of other factions. */
644
+ is_in_oc: boolean;
645
+ /** Shows if the member is eligible for an early discharge from the hospital. */
646
+ has_early_discharge: boolean;
647
+ last_action: UserLastAction;
648
+ status: UserStatus;
649
+ life: UserLife;
650
+ revive_setting: ReviveSetting;
651
+ }
652
+
653
+ /** Details about a user's last action. */
654
+ export interface UserLastAction {
655
+ status: string;
656
+ timestamp: number;
657
+ relative: string;
658
+ }
659
+
660
+ /** Unfortunately, current life value is often shown incorrectly, and the calculation for each member is very resource heavy, so this field is deprecated and will be removed on 1st of May, 2025. */
661
+ export interface UserLife {
662
+ current: number;
663
+ maximum: number;
664
+ }
665
+
666
+ /** Details about a user's status. */
667
+ export interface UserStatus {
668
+ description: string;
669
+ details: string | null;
670
+ state: string;
671
+ until: number | null;
672
+ }
673
+
674
+ export interface FactionMembersResponse {
675
+ members: FactionMember[];
676
+ }
677
+
678
+ export interface FactionRank {
679
+ level: number;
680
+ name: string;
681
+ division: number;
682
+ position: number;
683
+ wins: number;
684
+ }
685
+
686
+ export interface FactionBasic {
687
+ id: FactionId;
688
+ name: string;
689
+ tag: string;
690
+ tag_image: string;
691
+ leader_id: UserId;
692
+ "co-leader_id": UserId;
693
+ respect: number;
694
+ days_old: number;
695
+ capacity: number;
696
+ members: number;
697
+ is_enlisted: /** Indicates if the faction is enlisted for ranked wars. Available only with faction AA permissions for your own faction. */
698
+ | boolean /** Indicates if the faction is enlisted for ranked wars. Available only with faction AA permissions for your own faction. */
699
+ | null;
700
+ rank: FactionRank;
701
+ best_chain: number;
702
+ }
703
+
704
+ export interface FactionBasicResponse {
705
+ basic: FactionBasic;
706
+ }
707
+
708
+ export interface FactionPact {
709
+ faction_id: FactionId;
710
+ faction_name: string;
711
+ /** The duration until when is the non-aggression pact valid. */
712
+ until: string;
713
+ }
714
+
715
+ export interface FactionRankedWarParticipant {
716
+ id: FactionId;
717
+ name: string;
718
+ score: number;
719
+ /** Faction's current chain. */
720
+ chain: number;
721
+ }
722
+
723
+ export interface FactionRankedWar {
724
+ war_id: number;
725
+ start: number;
726
+ end: number | null;
727
+ /** The score target of the war. */
728
+ target: number;
729
+ winner: number | null;
730
+ /** The factions involved in the ranked war. */
731
+ factions: FactionRankedWarParticipant[];
732
+ }
733
+
734
+ export interface FactionRaidWarParticipant {
735
+ id: FactionId;
736
+ name: string;
737
+ score: number;
738
+ /** Faction's current chain. */
739
+ chain: number;
740
+ is_aggressor: boolean;
741
+ }
742
+
743
+ export interface FactionRaidWar {
744
+ war_id: number;
745
+ start: number;
746
+ end: number | null;
747
+ /** The factions involved in the raid war. */
748
+ factions: FactionRaidWarParticipant[];
749
+ }
750
+
751
+ export interface FactionTerritoryWarParticipant {
752
+ id: FactionId;
753
+ name: string;
754
+ score: number;
755
+ /** Faction's current chain. */
756
+ chain: number;
757
+ is_aggressor: boolean;
758
+ playerIds: UserId[];
759
+ }
760
+
761
+ export interface FactionTerritoryWar {
762
+ war_id: number;
763
+ territory: string;
764
+ start: number;
765
+ end: number | null;
766
+ /** The score target of the war. */
767
+ target: number;
768
+ winner: number | null;
769
+ /** The factions involved in the territory war. */
770
+ factions: FactionTerritoryWarParticipant[];
771
+ }
772
+
773
+ export interface FactionWars {
774
+ ranked: FactionRankedWar | null;
775
+ raids: FactionRaidWar[];
776
+ territory: FactionTerritoryWar[];
777
+ }
778
+
779
+ export interface FactionWarsResponse {
780
+ pacts: FactionPact[];
781
+ wars: FactionWars;
782
+ }
783
+
784
+ export interface FactionNews {
785
+ id: string;
786
+ text: string;
787
+ timestamp: number;
788
+ }
789
+
790
+ export interface FactionNewsResponse {
791
+ news: FactionNews[];
792
+ _metadata: RequestMetadataWithLinks;
793
+ }
794
+
795
+ export interface FactionAttacksResponse {
796
+ attacks: Attack[];
797
+ _metadata: RequestMetadataWithLinks;
798
+ }
799
+
800
+ export interface FactionAttacksFullResponse {
801
+ attacks: AttackSimplified[];
802
+ _metadata: RequestMetadataWithLinks;
803
+ }
804
+
805
+ export interface FactionApplication {
806
+ /** application id */
807
+ id: number;
808
+ user: {
809
+ id: UserId;
810
+ name: string;
811
+ level: string;
812
+ stats: {
813
+ strength: number;
814
+ speed: number;
815
+ dexterity: number;
816
+ defense: number;
817
+ };
818
+ };
819
+ message: string;
820
+ valid_until: number;
821
+ status: FactionApplicationStatusEnum;
822
+ }
823
+
824
+ export interface FactionApplicationsResponse {
825
+ applications: FactionApplication[];
826
+ }
827
+
828
+ export interface FactionOngoingChain {
829
+ id: ChainId;
830
+ current: number;
831
+ max: number;
832
+ /** Seconds until chain breaks. */
833
+ timeout: number;
834
+ modifier: number;
835
+ /** Timestamp until when chain is on cooldown. */
836
+ cooldown: number;
837
+ start: number;
838
+ end: number;
839
+ }
840
+
841
+ export interface FactionOngoingChainResponse {
842
+ chain: FactionOngoingChain;
843
+ }
844
+
845
+ export interface FactionChain {
846
+ id: ChainId;
847
+ chain: number;
848
+ respect: number;
849
+ start: number;
850
+ end: number;
851
+ }
852
+
853
+ export interface FactionChainsResponse {
854
+ chains: FactionChain[];
855
+ _metadata: RequestMetadataWithLinks;
856
+ }
857
+
858
+ export interface FactionChainReportResponse {
859
+ chainreport: FactionChainReport;
860
+ }
861
+
862
+ export interface FactionChainReport {
863
+ id: ChainId;
864
+ faction_id: FactionId;
865
+ start: number;
866
+ end: number;
867
+ details: FactionChainReportDetails;
868
+ bonuses: FactionChainReportBonus[];
869
+ attackers: FactionChainReportAttacker[];
870
+ "non-attackers": UserId[];
871
+ }
872
+
873
+ export interface FactionChainReportDetails {
874
+ chain: number;
875
+ respect: number;
876
+ members: number;
877
+ targets: number;
878
+ war: number;
879
+ best: number;
880
+ leave: number;
881
+ mug: number;
882
+ hospitalize: number;
883
+ assists: number;
884
+ retaliations: number;
885
+ overseas: number;
886
+ draws: number;
887
+ escapes: number;
888
+ losses: number;
889
+ }
890
+
891
+ export interface FactionChainReportBonus {
892
+ attacker_id: UserId;
893
+ defender_id: UserId;
894
+ chain: number;
895
+ respect: number;
896
+ }
897
+
898
+ export interface FactionChainReportAttacker {
899
+ id: UserId;
900
+ respect: FactionChainReportAttackerRespect;
901
+ attacks: FactionChainReportAttackerAttacks;
902
+ }
903
+
904
+ export interface FactionChainReportAttackerRespect {
905
+ total: number;
906
+ average: number;
907
+ best: number;
908
+ }
909
+
910
+ export interface FactionChainReportAttackerAttacks {
911
+ total: number;
912
+ leave: number;
913
+ mug: number;
914
+ hospitalize: number;
915
+ assists: number;
916
+ retaliations: number;
917
+ overseas: number;
918
+ draws: number;
919
+ escapes: number;
920
+ losses: number;
921
+ war: number;
922
+ bonuses: number;
923
+ }
924
+
925
+ export interface FactionCrimeUser {
926
+ id: UserId;
927
+ /** The timestamp at which the user joined the slot. */
928
+ joined_at: number;
929
+ /** Current planning progress on the slot. */
930
+ progress: number;
931
+ }
932
+
933
+ export interface FactionCrimeRewardItem {
934
+ id: ItemId;
935
+ quantity: number;
936
+ }
937
+
938
+ export interface FactionCrimeRewardPayout {
939
+ type: FactionOrganizedCrimePayoutType;
940
+ /** Total percentage split between all participants. */
941
+ percentage: number;
942
+ paid_by: UserId;
943
+ paid_at: number;
944
+ }
945
+
946
+ export interface FactionCrimeReward {
947
+ money: number;
948
+ items: FactionCrimeRewardItem[];
949
+ respect: number;
950
+ payout: FactionCrimeRewardPayout | null;
951
+ }
952
+
953
+ export interface FactionCrimeSlot {
954
+ position: string;
955
+ item_requirement: {
956
+ id?: ItemId;
957
+ /** Shows if the item is reusable or consumed during the crime. */
958
+ is_reusable?: boolean;
959
+ /** Shows if user has the required item. */
960
+ is_available?: boolean;
961
+ } | null;
962
+ user_id: UserId;
963
+ user: FactionCrimeUser | null;
964
+ success_chance: number;
965
+ }
966
+
967
+ export interface FactionCrime {
968
+ id: FactionCrimeId;
969
+ name: string;
970
+ difficulty: number;
971
+ status: FactionCrimeStatusEnum;
972
+ /** The timestamp at which the crime was created. */
973
+ created_at: number;
974
+ initiated_at: /** Replaced by the 'planning_at' field (same value). This field will be removed in the future (1st Februrary 2025 or later). */
975
+ | number /** Replaced by the 'planning_at' field (same value). This field will be removed in the future (1st Februrary 2025 or later). */
976
+ | null;
977
+ planning_at: /** The timestamp at which the planning phase for the crime has begun. */
978
+ | number /** The timestamp at which the planning phase for the crime has begun. */
979
+ | null;
980
+ ready_at: /** The timestamp at which the crime will be ready. */
981
+ number /** The timestamp at which the crime will be ready. */ | null;
982
+ /** The timestamp at which the crime will expire. */
983
+ expired_at: number;
984
+ executed_at: /** The timestamp at which the crime was executed. <br> Note: this value is null for all crimes executed before January 15th, 2025. */
985
+ | number /** The timestamp at which the crime was executed. <br> Note: this value is null for all crimes executed before January 15th, 2025. */
986
+ | null;
987
+ slots: FactionCrimeSlot[];
988
+ rewards: FactionCrimeReward | null;
989
+ }
990
+
991
+ export interface FactionCrimesResponse {
992
+ crimes: FactionCrime[];
993
+ _metadata: RequestMetadataWithLinks;
994
+ }
995
+
996
+ /** The following selections will fallback to API v1 and may change at any time: 'armor', 'boosters', 'caches', 'cesium', 'contributors', 'crimeexp', 'currency', 'donations', 'drugs', 'medical', 'positions', 'reports', 'stats', 'temporary', 'upgrades', 'weapons'. */
997
+ export type FactionSelectionName =
998
+ | "applications"
999
+ | "attacks"
1000
+ | "attacksfull"
1001
+ | "basic"
1002
+ | "chain"
1003
+ | "chainreport"
1004
+ | "chains"
1005
+ | "crimes"
1006
+ | "hof"
1007
+ | "lookup"
1008
+ | "members"
1009
+ | "news"
1010
+ | "rankedwars"
1011
+ | "rankedwarreport"
1012
+ | "revives"
1013
+ | "revivesfull"
1014
+ | "timestamp"
1015
+ | "wars"
1016
+ | "armor"
1017
+ | "boosters"
1018
+ | "caches"
1019
+ | "cesium"
1020
+ | "contributors"
1021
+ | "crimeexp"
1022
+ | "currency"
1023
+ | "donations"
1024
+ | "drugs"
1025
+ | "medical"
1026
+ | "positions"
1027
+ | "reports"
1028
+ | "stats"
1029
+ | "temporary"
1030
+ | "territory"
1031
+ | "upgrades"
1032
+ | "weapons";
1033
+
1034
+ export interface FactionLookupResponse {
1035
+ selections: FactionSelectionName[];
1036
+ }
1037
+
1038
+ export interface FactionRankedWarDetails {
1039
+ id: RankedWarId;
1040
+ /** Timestamp the war started at. */
1041
+ start: number;
1042
+ /** Timestamp the war ended at. */
1043
+ end: number;
1044
+ target: number;
1045
+ winner: FactionId & (number | null);
1046
+ factions: {
1047
+ id?: FactionId;
1048
+ name?: string;
1049
+ score?: number;
1050
+ chain?: number;
1051
+ }[];
1052
+ }
1053
+
1054
+ export interface FactionRankedWarResponse {
1055
+ rankedwars: FactionRankedWarDetails[];
1056
+ _metadata: RequestMetadataWithLinks;
1057
+ }
1058
+
1059
+ export interface FactionRankedWarReportResponse {
1060
+ rankedwarreport: {
1061
+ id: RankedWarId;
1062
+ /** Timestamp the war started at. */
1063
+ start: number;
1064
+ /** Timestamp the war ended at. */
1065
+ end: number;
1066
+ winner: FactionId;
1067
+ forfeit: boolean;
1068
+ factions: {
1069
+ id?: FactionId;
1070
+ name?: string;
1071
+ score?: number;
1072
+ attacks?: number;
1073
+ rank?: {
1074
+ before?: string;
1075
+ after?: string;
1076
+ };
1077
+ rewards?: {
1078
+ respect?: number;
1079
+ points?: number;
1080
+ items?: {
1081
+ id?: ItemId;
1082
+ name?: string;
1083
+ quantity?: number;
1084
+ }[];
1085
+ };
1086
+ members?: {
1087
+ id?: UserId;
1088
+ name?: string;
1089
+ level?: number;
1090
+ attacks?: number;
1091
+ score?: number;
1092
+ }[];
1093
+ }[];
1094
+ };
1095
+ }
1096
+
1097
+ export interface ForumCategoriesResponse {
1098
+ categories: {
1099
+ id?: ForumId;
1100
+ title?: string;
1101
+ acronym?: string;
1102
+ threads?: number;
1103
+ }[];
1104
+ }
1105
+
1106
+ export interface ForumThreadAuthor {
1107
+ id: UserId;
1108
+ username: string;
1109
+ karma: number;
1110
+ }
1111
+
1112
+ export interface ForumPollVote {
1113
+ answer: string;
1114
+ votes: number;
1115
+ }
1116
+
1117
+ export interface ForumPoll {
1118
+ question: string;
1119
+ answers_count: number;
1120
+ answers: ForumPollVote[];
1121
+ }
1122
+
1123
+ export interface ForumThreadBase {
1124
+ id: ForumThreadId;
1125
+ title: string;
1126
+ forum_id: ForumId;
1127
+ posts: number;
1128
+ rating: number;
1129
+ /** Total number of times players have opened this thread. */
1130
+ views: number;
1131
+ author: ForumThreadAuthor;
1132
+ last_poster: ForumThreadAuthor;
1133
+ first_post_time: number;
1134
+ last_post_time: number | null;
1135
+ has_poll: boolean;
1136
+ is_locked: boolean;
1137
+ is_sticky: boolean;
1138
+ }
1139
+
1140
+ export interface ForumThreadExtended extends ForumThreadBase {
1141
+ content?: string;
1142
+ content_raw?: string;
1143
+ poll?: ForumPoll;
1144
+ }
1145
+
1146
+ export interface ForumPost {
1147
+ id: ForumPostId;
1148
+ thread_id: ForumThreadId;
1149
+ author: ForumThreadAuthor;
1150
+ /** Indicates whether post was made using the old formatting engine which doesn't use HTML. */
1151
+ is_legacy: boolean;
1152
+ is_topic: boolean;
1153
+ is_edited: boolean;
1154
+ is_pinned: boolean;
1155
+ created_time: number;
1156
+ edited_by: UserId;
1157
+ has_quote: boolean;
1158
+ quoted_post_id: /** 'quoted_post_id' is null when 'has_quote' is false. */
1159
+ number /** 'quoted_post_id' is null when 'has_quote' is false. */ | null;
1160
+ /** depending on the input 'cat' parameter, this will either return raw value (with HTML) or plain text. Legacy posts are returned as is, they can't be stripped of tags. */
1161
+ content: string;
1162
+ likes: number;
1163
+ dislikes: number;
1164
+ }
1165
+
1166
+ export interface ForumThreadUserExtended extends ForumThreadBase {
1167
+ new_posts?: /** Available only when requesting data for yourself (no id or your id) with at least 'Minimal' access type key. */
1168
+ | number /** Available only when requesting data for yourself (no id or your id) with at least 'Minimal' access type key. */
1169
+ | null;
1170
+ }
1171
+
1172
+ export interface ForumSubscribedThreadPostsCount {
1173
+ new: number;
1174
+ total: number;
1175
+ }
1176
+
1177
+ export interface ForumSubscribedThread {
1178
+ id: ForumThreadId;
1179
+ forum_id: ForumId;
1180
+ author: ForumThreadAuthor;
1181
+ title: string;
1182
+ posts: ForumSubscribedThreadPostsCount;
1183
+ }
1184
+
1185
+ export interface ForumFeed {
1186
+ thread_id: ForumThreadId;
1187
+ post_id: ForumPostId;
1188
+ user: ForumThreadAuthor;
1189
+ title: string;
1190
+ text: string;
1191
+ timestamp: number;
1192
+ is_seen: boolean;
1193
+ type: ForumFeedTypeEnum;
1194
+ }
1195
+
1196
+ export interface ForumThreadsResponse {
1197
+ threads: ForumThreadBase[];
1198
+ _metadata: RequestMetadataWithLinks;
1199
+ }
1200
+
1201
+ export interface ForumThreadResponse {
1202
+ thread: ForumThreadExtended;
1203
+ }
1204
+
1205
+ export interface ForumPostsResponse {
1206
+ posts: ForumPost[];
1207
+ _metadata: RequestMetadataWithLinks;
1208
+ }
1209
+
1210
+ export type ForumSelectionName =
1211
+ | "categories"
1212
+ | "lookup"
1213
+ | "posts"
1214
+ | "thread"
1215
+ | "threads"
1216
+ | "timestamp";
1217
+
1218
+ export interface ForumLookupResponse {
1219
+ selections: ForumSelectionName[];
1220
+ }
1221
+
1222
+ export interface ItemMarketListingItemBonus {
1223
+ id: number;
1224
+ title: string;
1225
+ description: string;
1226
+ }
1227
+
1228
+ export interface ItemMarketListingItemStats {
1229
+ damage: number | null;
1230
+ accuracy: number | null;
1231
+ armor: number | null;
1232
+ }
1233
+
1234
+ export interface ItemMarketItem {
1235
+ id: ItemId;
1236
+ name: string;
1237
+ type: string;
1238
+ average_price: number;
1239
+ }
1240
+
1241
+ export interface ItemMarketListingStackable {
1242
+ id: number;
1243
+ price: number;
1244
+ amount: number;
1245
+ }
1246
+
1247
+ export interface ItemMarketListingItemDetails {
1248
+ uid: number;
1249
+ stats: ItemMarketListingItemStats;
1250
+ bonuses: ItemMarketListingItemBonus[];
1251
+ rarity: ("yellow" | "orange" | "red") | null;
1252
+ }
1253
+
1254
+ export interface ItemMarketListingNonstackable {
1255
+ id: number;
1256
+ price: number;
1257
+ amount: number;
1258
+ itemDetails: ItemMarketListingItemDetails;
1259
+ }
1260
+
1261
+ export interface ItemMarket {
1262
+ item: ItemMarketItem;
1263
+ listings: (ItemMarketListingNonstackable | ItemMarketListingStackable)[];
1264
+ }
1265
+
1266
+ export interface MarketItemMarketResponse {
1267
+ itemmarket: ItemMarket;
1268
+ _metadata: RequestMetadataWithLinks;
1269
+ }
1270
+
1271
+ /** The following selections will fallback to API v1 and may change at any time: 'pointsmarket'. */
1272
+ export type MarketSelectionName =
1273
+ | "itemmarket"
1274
+ | "lookup"
1275
+ | "timestamp"
1276
+ | "pointsmarket";
1277
+
1278
+ export interface MarketLookupResponse {
1279
+ selections: MarketSelectionName[];
1280
+ }
1281
+
1282
+ export interface RacingCarsResponse {
1283
+ cars: RaceCar[];
1284
+ }
1285
+
1286
+ export interface RaceCar {
1287
+ car_item_id: ItemId;
1288
+ car_item_name: string;
1289
+ top_speed: number;
1290
+ acceleration: number;
1291
+ braking: number;
1292
+ dirt: number;
1293
+ handling: number;
1294
+ safety: number;
1295
+ tarmac: number;
1296
+ class: RaceClassEnum;
1297
+ }
1298
+
1299
+ export interface RacingTracksResponse {
1300
+ tracks: RaceTrack[];
1301
+ }
1302
+
1303
+ export interface RaceTrack {
1304
+ id: RaceTrackId;
1305
+ title: string;
1306
+ description: string;
1307
+ }
1308
+
1309
+ export interface RacingCarUpgradesResponse {
1310
+ carupgrades: RaceCarUpgrade[];
1311
+ }
1312
+
1313
+ export interface RaceCarUpgrade {
1314
+ id: RaceCarUpgradeId;
1315
+ class_required: RaceClassEnum;
1316
+ name: string;
1317
+ description: string;
1318
+ category: RaceCarUpgradeCategory;
1319
+ subcategory: RaceCarUpgradeSubCategory;
1320
+ effects: {
1321
+ top_speed: number;
1322
+ acceleration: number;
1323
+ braking: number;
1324
+ handling: number;
1325
+ safety: number;
1326
+ dirt: number;
1327
+ tarmac: number;
1328
+ };
1329
+ cost: {
1330
+ points: number;
1331
+ cash: number;
1332
+ };
1333
+ }
1334
+
1335
+ export interface RacingRacesResponse {
1336
+ races: Race[];
1337
+ _metadata: RequestMetadataWithLinks;
1338
+ }
1339
+
1340
+ export interface Race {
1341
+ id: RaceId;
1342
+ title: string;
1343
+ track_id: RaceTrackId;
1344
+ creator_id: UserId;
1345
+ status: RaceStatusEnum;
1346
+ laps: number;
1347
+ participants: {
1348
+ minimum: number;
1349
+ maximum: number;
1350
+ current: number;
1351
+ };
1352
+ schedule: {
1353
+ join_from: number;
1354
+ join_until: number;
1355
+ start: number;
1356
+ end: number | null;
1357
+ };
1358
+ requirements: {
1359
+ car_class: RaceClassEnum;
1360
+ driver_class: RaceClassEnum;
1361
+ car_item_id: ItemId;
1362
+ requires_stock_car: boolean;
1363
+ requires_password: boolean;
1364
+ join_fee: number;
1365
+ };
1366
+ }
1367
+
1368
+ export interface RacingTrackRecordsResponse {
1369
+ records: RaceRecord[];
1370
+ }
1371
+
1372
+ export interface RaceRecord {
1373
+ driver_id: UserId;
1374
+ driver_name: string;
1375
+ car_item_id: ItemId;
1376
+ lap_time: number;
1377
+ car_item_name: string;
1378
+ }
1379
+
1380
+ export interface RacerDetails {
1381
+ driver_id: UserId;
1382
+ position: number | null;
1383
+ car_id: RaceCarId;
1384
+ car_item_id: ItemId;
1385
+ car_item_name: string;
1386
+ car_class: RaceClassEnum;
1387
+ has_crashed: boolean | null;
1388
+ best_lap_time: number | null;
1389
+ race_time: number | null;
1390
+ time_ended: number | null;
1391
+ }
1392
+
1393
+ export interface RacingRaceDetailsResponse extends Race {
1394
+ results?: RacerDetails[];
1395
+ }
1396
+
1397
+ export type RacingSelectionName =
1398
+ | "cars"
1399
+ | "carupgrades"
1400
+ | "lookup"
1401
+ | "race"
1402
+ | "races"
1403
+ | "records"
1404
+ | "timestamp"
1405
+ | "tracks";
1406
+
1407
+ export interface RacingLookupResponse {
1408
+ selections: RacingSelectionName[];
1409
+ }
1410
+
1411
+ export interface TornSubcrimesResponse {
1412
+ subcrimes: TornSubcrime[];
1413
+ }
1414
+
1415
+ export interface TornSubcrime {
1416
+ id: number;
1417
+ name: string;
1418
+ nerve_cost: number;
1419
+ }
1420
+
1421
+ export interface TornCrimesResponse {
1422
+ crimes: TornCrime[];
1423
+ }
1424
+
1425
+ export interface TornCrime {
1426
+ id: number;
1427
+ name: string;
1428
+ category_id: number;
1429
+ category_name: string;
1430
+ enhancer_id: number;
1431
+ enhancer_name: string;
1432
+ unique_outcomes_count: number;
1433
+ unique_outcomes_ids: number[];
1434
+ notes: string[];
1435
+ }
1436
+
1437
+ export interface TornCalendarActivity {
1438
+ title: string;
1439
+ description: string;
1440
+ start: number;
1441
+ end: number;
1442
+ }
1443
+
1444
+ export interface TornCalendarResponse {
1445
+ calendar: {
1446
+ competitions: TornCalendarActivity[];
1447
+ events: TornCalendarActivity[];
1448
+ };
1449
+ }
1450
+
1451
+ export interface TornHof {
1452
+ id: UserId;
1453
+ username: string;
1454
+ faction_id: FactionId;
1455
+ level: number;
1456
+ last_action: number;
1457
+ rank_name: string;
1458
+ rank_number: number;
1459
+ position: number;
1460
+ signed_up: number;
1461
+ age_in_days: number;
1462
+ value: any;
1463
+ rank: string;
1464
+ }
1465
+
1466
+ export interface TornHofResponse {
1467
+ hof: TornHof[];
1468
+ _metadata: RequestMetadataWithLinks;
1469
+ }
1470
+
1471
+ export interface FactionHofValues {
1472
+ chain: /** Maximum chain achieved by the faction. Null if chosen category is 'rank' or 'respect'. */
1473
+ | number /** Maximum chain achieved by the faction. Null if chosen category is 'rank' or 'respect'. */
1474
+ | null;
1475
+ chain_duration: /** The duration of the chain. Null if chosen category is 'rank' or 'respect'. */
1476
+ | number /** The duration of the chain. Null if chosen category is 'rank' or 'respect'. */
1477
+ | null;
1478
+ respect: /** Null if chosen category is 'chain'. */
1479
+ number /** Null if chosen category is 'chain'. */ | null;
1480
+ }
1481
+
1482
+ export interface TornFactionHof {
1483
+ faction_id: FactionId;
1484
+ name: string;
1485
+ members: number;
1486
+ position: number;
1487
+ /** The full rank title & division of the faction. */
1488
+ rank: string;
1489
+ values: FactionHofValues;
1490
+ }
1491
+
1492
+ export interface TornFactionHofResponse {
1493
+ factionhof: TornFactionHof[];
1494
+ _metadata: RequestMetadataWithLinks;
1495
+ }
1496
+
1497
+ export interface TornLog {
1498
+ id: LogId;
1499
+ title: string;
1500
+ }
1501
+
1502
+ export interface TornLogCategory {
1503
+ id: LogCategoryId;
1504
+ title: string;
1505
+ }
1506
+
1507
+ export interface TornLogTypesResponse {
1508
+ logtypes: TornLog[];
1509
+ }
1510
+
1511
+ export interface TornLogCategoriesResponse {
1512
+ logcategories: TornLogCategory[];
1513
+ }
1514
+
1515
+ export interface Bounty {
1516
+ target_id: UserId;
1517
+ target_name: string;
1518
+ target_level: number;
1519
+ lister_id: UserId & (number | null);
1520
+ lister_name: /** If the bounty is anonymous this field is null. */
1521
+ string /** If the bounty is anonymous this field is null. */ | null;
1522
+ reward: number;
1523
+ reason: string | null;
1524
+ quantity: number;
1525
+ is_anonymous: boolean;
1526
+ valid_until: number;
1527
+ }
1528
+
1529
+ export interface AttackLogSummary {
1530
+ id: UserId /** Id of the participant, could be null in stealthed attacks. */ &
1531
+ (
1532
+ | number /** Id of the participant, could be null in stealthed attacks. */
1533
+ | null
1534
+ );
1535
+ name: /** Name of the participant, could be null in stealthed attacks. */
1536
+ | string /** Name of the participant, could be null in stealthed attacks. */
1537
+ | null;
1538
+ hits: number;
1539
+ misses: number;
1540
+ damage: number;
1541
+ }
1542
+
1543
+ export interface AttackLog {
1544
+ text: string;
1545
+ timestamp: number;
1546
+ action: AttackActionEnum;
1547
+ icon: string;
1548
+ attacker: /** This value could be null in stealthed attacks. */
1549
+ | {
1550
+ id: UserId;
1551
+ name: string;
1552
+ item: /** This object could be null if there was no item being used in this turn or during this effect. */
1553
+ | {
1554
+ id: ItemId;
1555
+ name: string;
1556
+ } /** This object could be null if there was no item being used in this turn or during this effect. */
1557
+ | null;
1558
+ } /** This value could be null in stealthed attacks. */
1559
+ | null;
1560
+ defender: /** This value could be null in stealthed attacks. */
1561
+ | {
1562
+ id: number;
1563
+ name: string;
1564
+ } /** This value could be null in stealthed attacks. */
1565
+ | null;
1566
+ }
1567
+
1568
+ export interface AttackLogResponse {
1569
+ attacklog: {
1570
+ log: AttackLog[];
1571
+ summary: AttackLogSummary[];
1572
+ };
1573
+ _metadata: RequestMetadataWithLinks;
1574
+ }
1575
+
1576
+ export interface TornBountiesResponse {
1577
+ bounties: Bounty[];
1578
+ _metadata: RequestMetadataWithLinks;
1579
+ }
1580
+
1581
+ export interface TornItemAmmo {
1582
+ id: AmmoId;
1583
+ name: string;
1584
+ price: number;
1585
+ /** Types of ammo */
1586
+ types: TornItemAmmoTypeEnum[];
1587
+ }
1588
+
1589
+ export interface TornItemAmmoResponse {
1590
+ itemammo: TornItemAmmo[];
1591
+ }
1592
+
1593
+ export interface TornItemMods {
1594
+ id: ItemModId;
1595
+ name: string;
1596
+ description: string;
1597
+ /** Whether the upgrade fits on dual weapons. */
1598
+ dual_fit: boolean;
1599
+ /** The weapon types this upgrade can be attached to. */
1600
+ weapons: TornItemWeaponTypeEnum[];
1601
+ }
1602
+
1603
+ export interface TornItemModsResponse {
1604
+ itemmods: TornItemMods[];
1605
+ }
1606
+
1607
+ export interface TornItemBaseStats {
1608
+ damage: number;
1609
+ accuracy: number;
1610
+ armor: number;
1611
+ }
1612
+
1613
+ export interface TornItemWeaponDetails {
1614
+ stealth_level: number;
1615
+ base_stats: TornItemBaseStats;
1616
+ category: TornItemWeaponCategoryEnum;
1617
+ ammo: {
1618
+ "": AmmoId;
1619
+ name: string;
1620
+ magazine_rounds: number;
1621
+ rate_of_fire: {
1622
+ minimum: number;
1623
+ maximum: number;
1624
+ };
1625
+ } | null;
1626
+ mods: ItemModId[];
1627
+ }
1628
+
1629
+ export interface TornItemArmorCoverage {
1630
+ name: TornItemArmorCoveragePartEnum;
1631
+ value: number;
1632
+ }
1633
+
1634
+ export interface TornItemArmorDetails {
1635
+ coverage: TornItemArmorCoverage[];
1636
+ base_stats: TornItemBaseStats;
1637
+ }
1638
+
1639
+ export interface TornItem {
1640
+ id: ItemId;
1641
+ name: string;
1642
+ description: string;
1643
+ effect: string | null;
1644
+ requirement: string | null;
1645
+ image: string;
1646
+ type: TornItemTypeEnum;
1647
+ sub_type: TornItemWeaponTypeEnum & (string | null);
1648
+ is_masked: boolean;
1649
+ is_tradable: boolean;
1650
+ is_found_in_city: boolean;
1651
+ value: {
1652
+ vendor: {
1653
+ country: string;
1654
+ name: string;
1655
+ } | null;
1656
+ buy_price: number | null;
1657
+ sell_price: number | null;
1658
+ market_price: number;
1659
+ };
1660
+ circulation: number;
1661
+ details: (TornItemWeaponDetails & TornItemArmorDetails) | null;
1662
+ }
1663
+
1664
+ export interface TornItemsResponse {
1665
+ items: TornItem[];
1666
+ }
1667
+
1668
+ /** The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','dirtybombs','education','factiontree','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','properties','rackets','raidreport','raids','rockpaperscissors','searchforcash','shoplifting','stats','stocks','territory','territorynames','territorywarreport','territorywars'. */
1669
+ export type TornSelectionName =
1670
+ | "attacklog"
1671
+ | "bounties"
1672
+ | "calendar"
1673
+ | "crimes"
1674
+ | "factionHof"
1675
+ | "hof"
1676
+ | "itemammo"
1677
+ | "itemmods"
1678
+ | "items"
1679
+ | "logcategories"
1680
+ | "logtypes"
1681
+ | "lookup"
1682
+ | "subcrimes"
1683
+ | "timestamp"
1684
+ | "bank"
1685
+ | "cards"
1686
+ | "cityshops"
1687
+ | "companies"
1688
+ | "competition"
1689
+ | "dirtybombs"
1690
+ | "education"
1691
+ | "factiontree"
1692
+ | "gyms"
1693
+ | "honors"
1694
+ | "itemdetails"
1695
+ | "itemstats"
1696
+ | "medals"
1697
+ | "organisedcrimes"
1698
+ | "pawnshop"
1699
+ | "pokertables"
1700
+ | "properties"
1701
+ | "rackets"
1702
+ | "raidreport"
1703
+ | "raids"
1704
+ | "rankedwarreport"
1705
+ | "rankedwars"
1706
+ | "rockpaperscissors"
1707
+ | "searchforcash"
1708
+ | "shoplifting"
1709
+ | "stats"
1710
+ | "stocks"
1711
+ | "territory"
1712
+ | "territorynames"
1713
+ | "territorywarreport"
1714
+ | "territorywars";
1715
+
1716
+ export interface TornLookupResponse {
1717
+ selections: TornSelectionName[];
1718
+ }
1719
+
1720
+ export interface PersonalStatsOther {
1721
+ other: {
1722
+ activity: {
1723
+ /** Time played in seconds */
1724
+ time: number;
1725
+ streak: {
1726
+ best: number;
1727
+ current: number;
1728
+ };
1729
+ };
1730
+ awards: number;
1731
+ merits_bought: number;
1732
+ refills: {
1733
+ energy: number;
1734
+ nerve: number;
1735
+ token: number;
1736
+ };
1737
+ donator_days: number;
1738
+ ranked_war_wins: number;
1739
+ };
1740
+ }
1741
+
1742
+ export interface PersonalStatsOtherPopular {
1743
+ other: {
1744
+ activity: {
1745
+ /** Time played in seconds */
1746
+ time: number;
1747
+ streak: {
1748
+ best: number;
1749
+ current: number;
1750
+ };
1751
+ };
1752
+ awards: number;
1753
+ merits_bought: number;
1754
+ refills: {
1755
+ energy: number;
1756
+ nerve: number;
1757
+ };
1758
+ donator_days: number;
1759
+ ranked_war_wins: number;
1760
+ };
1761
+ }
1762
+
1763
+ export interface PersonalStatsNetworthExtended {
1764
+ networth: {
1765
+ total: number;
1766
+ wallet: number;
1767
+ vaults: number;
1768
+ bank: number;
1769
+ overseas_bank: number;
1770
+ points: number;
1771
+ inventory: number;
1772
+ display_case: number;
1773
+ bazaar: number;
1774
+ item_market: number;
1775
+ property: number;
1776
+ stock_market: number;
1777
+ auction_house: number;
1778
+ bookie: number;
1779
+ company: number;
1780
+ enlisted_cars: number;
1781
+ piggy_bank: number;
1782
+ pending: number;
1783
+ loans: number;
1784
+ unpaid_fees: number;
1785
+ };
1786
+ }
1787
+
1788
+ export interface PersonalStatsNetworthPublic {
1789
+ networth: {
1790
+ total: number;
1791
+ };
1792
+ }
1793
+
1794
+ export interface PersonalStatsRacing {
1795
+ racing: {
1796
+ skill: number;
1797
+ points: number;
1798
+ races: {
1799
+ entered: number;
1800
+ won: number;
1801
+ };
1802
+ };
1803
+ }
1804
+
1805
+ export interface PersonalStatsMissions {
1806
+ missions: {
1807
+ missions: number;
1808
+ contracts: {
1809
+ total: number;
1810
+ duke: number;
1811
+ };
1812
+ credits: number;
1813
+ };
1814
+ }
1815
+
1816
+ export interface PersonalStatsDrugs {
1817
+ drugs: {
1818
+ cannabis: number;
1819
+ ecstasy: number;
1820
+ ketamine: number;
1821
+ lsd: number;
1822
+ opium: number;
1823
+ pcp: number;
1824
+ shrooms: number;
1825
+ speed: number;
1826
+ vicodin: number;
1827
+ xanax: number;
1828
+ total: number;
1829
+ overdoses: number;
1830
+ rehabilitations: {
1831
+ amount: number;
1832
+ fees: number;
1833
+ };
1834
+ };
1835
+ }
1836
+
1837
+ export interface PersonalStatsTravel {
1838
+ travel: {
1839
+ total: number;
1840
+ time_spent: number;
1841
+ items_bought: number;
1842
+ hunting: {
1843
+ skill: number;
1844
+ };
1845
+ attacks_won: number;
1846
+ defends_lost: number;
1847
+ argentina: number;
1848
+ canada: number;
1849
+ cayman_islands: number;
1850
+ china: number;
1851
+ hawaii: number;
1852
+ japan: number;
1853
+ mexico: number;
1854
+ united_arab_emirates: number;
1855
+ united_kingdom: number;
1856
+ south_africa: number;
1857
+ switzerland: number;
1858
+ };
1859
+ }
1860
+
1861
+ export interface PersonalStatsTravelPopular {
1862
+ travel: {
1863
+ total: number;
1864
+ time_spent: number;
1865
+ };
1866
+ }
1867
+
1868
+ export interface PersonalStatsItems {
1869
+ items: {
1870
+ found: {
1871
+ city: number;
1872
+ dump: number;
1873
+ easter_eggs: number;
1874
+ };
1875
+ trashed: number;
1876
+ used: {
1877
+ books: number;
1878
+ boosters: number;
1879
+ consumables: number;
1880
+ candy: number;
1881
+ alcohol: number;
1882
+ energy_drinks: number;
1883
+ stat_enhancers: number;
1884
+ easter_eggs: number;
1885
+ };
1886
+ viruses_coded: number;
1887
+ };
1888
+ }
1889
+
1890
+ export interface PersonalStatsItemsPopular {
1891
+ items: {
1892
+ found: {
1893
+ dump: number;
1894
+ };
1895
+ used: {
1896
+ books: number;
1897
+ boosters: number;
1898
+ consumables: number;
1899
+ candy: number;
1900
+ alcohol: number;
1901
+ energy_drinks: number;
1902
+ stat_enhancers: number;
1903
+ easter_eggs: number;
1904
+ };
1905
+ };
1906
+ }
1907
+
1908
+ export interface PersonalStatsInvestments {
1909
+ investments: {
1910
+ bank: {
1911
+ total: number;
1912
+ profit: number;
1913
+ current: number;
1914
+ time_remaining: number;
1915
+ };
1916
+ stocks: {
1917
+ profits: number;
1918
+ losses: number;
1919
+ fees: number;
1920
+ net_profits: number;
1921
+ payouts: number;
1922
+ };
1923
+ };
1924
+ }
1925
+
1926
+ export interface PersonalStatsBounties {
1927
+ bounties: {
1928
+ placed: {
1929
+ amount: number;
1930
+ value: number;
1931
+ };
1932
+ collected: {
1933
+ amount: number;
1934
+ value: number;
1935
+ };
1936
+ received: {
1937
+ amount: number;
1938
+ value: number;
1939
+ };
1940
+ };
1941
+ }
1942
+
1943
+ export interface PersonalStatsCrimesV2 {
1944
+ offenses: {
1945
+ vandalism: number;
1946
+ fraud: number;
1947
+ theft: number;
1948
+ counterfeiting: number;
1949
+ illicit_services: number;
1950
+ cybercrime: number;
1951
+ extortion: number;
1952
+ illegal_production: number;
1953
+ organized_crimes: number;
1954
+ total: number;
1955
+ };
1956
+ skills: {
1957
+ search_for_cash: number;
1958
+ bootlegging: number;
1959
+ graffiti: number;
1960
+ shoplifting: number;
1961
+ pickpocketing: number;
1962
+ card_skimming: number;
1963
+ burglary: number;
1964
+ hustling: number;
1965
+ disposal: number;
1966
+ cracking: number;
1967
+ forgery: number;
1968
+ scamming: number;
1969
+ };
1970
+ version: string;
1971
+ }
1972
+
1973
+ export interface PersonalStatsCrimesV1 {
1974
+ total: number;
1975
+ sell_illegal_goods: number;
1976
+ theft: number;
1977
+ auto_theft: number;
1978
+ drug_deals: number;
1979
+ computer: number;
1980
+ fraud: number;
1981
+ murder: number;
1982
+ other: number;
1983
+ organized_crimes: number;
1984
+ version: string;
1985
+ }
1986
+
1987
+ export interface PersonalStatsCrimesPopular {
1988
+ crimes: {
1989
+ total: number;
1990
+ version: string;
1991
+ };
1992
+ }
1993
+
1994
+ export interface PersonalStatsCommunication {
1995
+ communication: {
1996
+ mails_sent: {
1997
+ total: number;
1998
+ friends: number;
1999
+ faction: number;
2000
+ colleagues: number;
2001
+ spouse: number;
2002
+ };
2003
+ classified_ads: number;
2004
+ personals: number;
2005
+ };
2006
+ }
2007
+
2008
+ export interface PersonalStatsFinishingHits {
2009
+ finishing_hits: {
2010
+ heavy_artillery: number;
2011
+ machine_guns: number;
2012
+ rifles: number;
2013
+ sub_machine_guns: number;
2014
+ shotguns: number;
2015
+ pistols: number;
2016
+ temporary: number;
2017
+ piercing: number;
2018
+ slashing: number;
2019
+ clubbing: number;
2020
+ mechanical: number;
2021
+ hand_to_hand: number;
2022
+ };
2023
+ }
2024
+
2025
+ export interface PersonalStatsHospital {
2026
+ hospital: {
2027
+ times_hospitalized: number;
2028
+ medical_items_used: number;
2029
+ blood_withdrawn: number;
2030
+ reviving: {
2031
+ skill: number;
2032
+ revives: number;
2033
+ revives_received: number;
2034
+ };
2035
+ };
2036
+ }
2037
+
2038
+ export interface PersonalStatsHospitalPopular {
2039
+ hospital: {
2040
+ medical_items_used: number;
2041
+ reviving: {
2042
+ skill: number;
2043
+ revives: number;
2044
+ };
2045
+ };
2046
+ }
2047
+
2048
+ export interface PersonalStatsJail {
2049
+ jail: {
2050
+ times_jailed: number;
2051
+ busts: {
2052
+ success: number;
2053
+ fails: number;
2054
+ };
2055
+ bails: {
2056
+ amount: number;
2057
+ fees: number;
2058
+ };
2059
+ };
2060
+ }
2061
+
2062
+ export interface PersonalStatsTrading {
2063
+ trading: {
2064
+ items: {
2065
+ bought: {
2066
+ market: number;
2067
+ shops: number;
2068
+ };
2069
+ auctions: {
2070
+ won: number;
2071
+ sold: number;
2072
+ };
2073
+ sent: number;
2074
+ };
2075
+ trades: number;
2076
+ points: {
2077
+ bought: number;
2078
+ sold: number;
2079
+ };
2080
+ bazaar: {
2081
+ customers: number;
2082
+ sales: number;
2083
+ profit: number;
2084
+ };
2085
+ };
2086
+ }
2087
+
2088
+ export interface PersonalStatsJobsPublic {
2089
+ jobs: {
2090
+ job_points_used: number;
2091
+ trains_received: number;
2092
+ };
2093
+ }
2094
+
2095
+ export interface PersonalStatsJobsExtended {
2096
+ jobs: {
2097
+ job_points_used: number;
2098
+ trains_received: number;
2099
+ stats: {
2100
+ manual: number;
2101
+ intelligence: number;
2102
+ endurance: number;
2103
+ total: number;
2104
+ };
2105
+ };
2106
+ }
2107
+
2108
+ export interface PersonalStatsBattleStats {
2109
+ battle_stats: {
2110
+ strength: number;
2111
+ defense: number;
2112
+ speed: number;
2113
+ dexterity: number;
2114
+ total: number;
2115
+ };
2116
+ }
2117
+
2118
+ export interface PersonalStatsAttackingPublic {
2119
+ attacking: {
2120
+ attacks: {
2121
+ won: number;
2122
+ lost: number;
2123
+ stalemate: number;
2124
+ assist: number;
2125
+ stealth: number;
2126
+ };
2127
+ defends: {
2128
+ won: number;
2129
+ lost: number;
2130
+ stalemate: number;
2131
+ total: number;
2132
+ };
2133
+ elo: number;
2134
+ unarmored_wins: number;
2135
+ highest_level_beaten: number;
2136
+ escapes: {
2137
+ player: number;
2138
+ foes: number;
2139
+ };
2140
+ killstreak: {
2141
+ best: number;
2142
+ };
2143
+ hits: {
2144
+ success: number;
2145
+ miss: number;
2146
+ critical: number;
2147
+ one_hit_kills: number;
2148
+ };
2149
+ damage: {
2150
+ total: number;
2151
+ best: number;
2152
+ };
2153
+ networth: {
2154
+ money_mugged: number;
2155
+ largest_mug: number;
2156
+ items_looted: number;
2157
+ };
2158
+ ammunition: {
2159
+ total: number;
2160
+ special: number;
2161
+ hollow_point: number;
2162
+ tracer: number;
2163
+ piercing: number;
2164
+ incendiary: number;
2165
+ };
2166
+ faction: {
2167
+ respect: number;
2168
+ retaliations: number;
2169
+ ranked_war_hits: number;
2170
+ raid_hits: number;
2171
+ territory: {
2172
+ wall_joins: number;
2173
+ wall_clears: number;
2174
+ wall_time: number;
2175
+ };
2176
+ };
2177
+ };
2178
+ }
2179
+
2180
+ export interface PersonalStatsAttackingExtended {
2181
+ attacking: {
2182
+ attacks: {
2183
+ won: number;
2184
+ lost: number;
2185
+ stalemate: number;
2186
+ assist: number;
2187
+ stealth: number;
2188
+ };
2189
+ defends: {
2190
+ won: number;
2191
+ lost: number;
2192
+ stalemate: number;
2193
+ total: number;
2194
+ };
2195
+ elo: number;
2196
+ unarmored_wins: number;
2197
+ highest_level_beaten: number;
2198
+ escapes: {
2199
+ player: number;
2200
+ foes: number;
2201
+ };
2202
+ killstreak: {
2203
+ best: number;
2204
+ current: number;
2205
+ };
2206
+ hits: {
2207
+ success: number;
2208
+ miss: number;
2209
+ critical: number;
2210
+ one_hit_kills: number;
2211
+ };
2212
+ damage: {
2213
+ total: number;
2214
+ best: number;
2215
+ };
2216
+ networth: {
2217
+ money_mugged: number;
2218
+ largest_mug: number;
2219
+ items_looted: number;
2220
+ };
2221
+ ammunition: {
2222
+ total: number;
2223
+ special: number;
2224
+ hollow_point: number;
2225
+ tracer: number;
2226
+ piercing: number;
2227
+ incendiary: number;
2228
+ };
2229
+ faction: {
2230
+ respect: number;
2231
+ retaliations: number;
2232
+ ranked_war_hits: number;
2233
+ raid_hits: number;
2234
+ territory: {
2235
+ wall_joins: number;
2236
+ wall_clears: number;
2237
+ wall_time: number;
2238
+ };
2239
+ };
2240
+ };
2241
+ }
2242
+
2243
+ export interface PersonalStatsAttackingPopular {
2244
+ attacking: {
2245
+ attacks: {
2246
+ won: number;
2247
+ lost: number;
2248
+ stalemate: number;
2249
+ assist: number;
2250
+ };
2251
+ defends: {
2252
+ won: number;
2253
+ lost: number;
2254
+ stalemate: number;
2255
+ };
2256
+ elo: number;
2257
+ escapes: {
2258
+ player: number;
2259
+ foes: number;
2260
+ };
2261
+ killstreak: {
2262
+ best: number;
2263
+ };
2264
+ hits: {
2265
+ success: number;
2266
+ miss: number;
2267
+ critical: number;
2268
+ one_hit_kills: number;
2269
+ };
2270
+ damage: {
2271
+ total: number;
2272
+ best: number;
2273
+ };
2274
+ networth: {
2275
+ money_mugged: number;
2276
+ largest_mug: number;
2277
+ items_looted: number;
2278
+ };
2279
+ ammunition: {
2280
+ total: number;
2281
+ special: number;
2282
+ hollow_point: number;
2283
+ tracer: number;
2284
+ piercing: number;
2285
+ incendiary: number;
2286
+ };
2287
+ faction: {
2288
+ respect: number;
2289
+ ranked_war_hits: number;
2290
+ };
2291
+ };
2292
+ }
2293
+
2294
+ export interface PersonalStatsHistoricStat {
2295
+ /** Requested stat name */
2296
+ name: string;
2297
+ value: number;
2298
+ /** Timestamp when the stat was last updated */
2299
+ timestamp: number;
2300
+ }
2301
+
2302
+ export interface UserPersonalStatsHistoric {
2303
+ personalstats: PersonalStatsHistoricStat[];
2304
+ }
2305
+
2306
+ /** Response for PersonalStatsCrimes depends on which crime version user is currently. */
2307
+ export interface PersonalStatsCrimes {
2308
+ crimes: PersonalStatsCrimesV1 | PersonalStatsCrimesV2;
2309
+ }
2310
+
2311
+ export interface UserPersonalStatsPopular {
2312
+ personalstats: PersonalStatsAttackingPopular &
2313
+ PersonalStatsJobsPublic &
2314
+ PersonalStatsHospitalPopular &
2315
+ PersonalStatsCrimesPopular &
2316
+ PersonalStatsItemsPopular &
2317
+ PersonalStatsTravelPopular &
2318
+ PersonalStatsDrugs &
2319
+ PersonalStatsNetworthPublic &
2320
+ PersonalStatsOtherPopular;
2321
+ }
2322
+
2323
+ /** Schema name corresponds to the requested category */
2324
+ export interface UserPersonalStatsCategory {
2325
+ personalstats:
2326
+ | PersonalStatsAttackingPublic
2327
+ | PersonalStatsJobsPublic
2328
+ | PersonalStatsTrading
2329
+ | PersonalStatsJail
2330
+ | PersonalStatsHospital
2331
+ | PersonalStatsFinishingHits
2332
+ | PersonalStatsCommunication
2333
+ | PersonalStatsCrimes
2334
+ | PersonalStatsBounties
2335
+ | PersonalStatsItems
2336
+ | PersonalStatsTravel
2337
+ | PersonalStatsDrugs
2338
+ | PersonalStatsMissions
2339
+ | PersonalStatsRacing
2340
+ | PersonalStatsNetworthPublic
2341
+ | PersonalStatsOther;
2342
+ }
2343
+
2344
+ export interface UserPersonalStatsFull {
2345
+ personalstats: PersonalStatsAttackingExtended &
2346
+ PersonalStatsBattleStats &
2347
+ PersonalStatsJobsExtended &
2348
+ PersonalStatsTrading &
2349
+ PersonalStatsJail &
2350
+ PersonalStatsHospital &
2351
+ PersonalStatsFinishingHits &
2352
+ PersonalStatsCommunication &
2353
+ PersonalStatsCrimes &
2354
+ PersonalStatsBounties &
2355
+ PersonalStatsInvestments &
2356
+ PersonalStatsItems &
2357
+ PersonalStatsTravel &
2358
+ PersonalStatsDrugs &
2359
+ PersonalStatsMissions &
2360
+ PersonalStatsRacing &
2361
+ PersonalStatsNetworthExtended &
2362
+ PersonalStatsOther;
2363
+ }
2364
+
2365
+ export interface UserPersonalStatsFullPublic {
2366
+ personalstats: PersonalStatsAttackingPublic &
2367
+ PersonalStatsJobsPublic &
2368
+ PersonalStatsTrading &
2369
+ PersonalStatsJail &
2370
+ PersonalStatsHospital &
2371
+ PersonalStatsFinishingHits &
2372
+ PersonalStatsCommunication &
2373
+ PersonalStatsCrimes &
2374
+ PersonalStatsBounties &
2375
+ PersonalStatsItems &
2376
+ PersonalStatsTravel &
2377
+ PersonalStatsDrugs &
2378
+ PersonalStatsMissions &
2379
+ PersonalStatsRacing &
2380
+ PersonalStatsNetworthPublic &
2381
+ PersonalStatsOther;
2382
+ }
2383
+
2384
+ export type UserPersonalStatsResponse =
2385
+ | UserPersonalStatsFull
2386
+ | UserPersonalStatsFullPublic
2387
+ | UserPersonalStatsCategory
2388
+ | UserPersonalStatsPopular
2389
+ | UserPersonalStatsHistoric;
2390
+
2391
+ export type PersonalStatsCategoryEnum =
2392
+ | "all"
2393
+ | "popular"
2394
+ | "attacking"
2395
+ | "battle_stats"
2396
+ | "jobs"
2397
+ | "trading"
2398
+ | "jail"
2399
+ | "hospital"
2400
+ | "finishing_hits"
2401
+ | "communication"
2402
+ | "crimes"
2403
+ | "bounties"
2404
+ | "investments"
2405
+ | "items"
2406
+ | "travel"
2407
+ | "drugs"
2408
+ | "missions"
2409
+ | "racing"
2410
+ | "networth"
2411
+ | "other";
2412
+
2413
+ export type PersonalStatsStatName =
2414
+ | "attackswon"
2415
+ | "attackslost"
2416
+ | "attacksdraw"
2417
+ | "attacksassisted"
2418
+ | "defendswon"
2419
+ | "defendslost"
2420
+ | "defendsstalemated"
2421
+ | "elo"
2422
+ | "yourunaway"
2423
+ | "theyrunaway"
2424
+ | "unarmoredwon"
2425
+ | "bestkillstreak"
2426
+ | "attackhits"
2427
+ | "attackmisses"
2428
+ | "attackdamage"
2429
+ | "bestdamage"
2430
+ | "onehitkills"
2431
+ | "attackcriticalhits"
2432
+ | "roundsfired"
2433
+ | "specialammoused"
2434
+ | "hollowammoused"
2435
+ | "tracerammoused"
2436
+ | "piercingammoused"
2437
+ | "incendiaryammoused"
2438
+ | "attacksstealthed"
2439
+ | "retals"
2440
+ | "moneymugged"
2441
+ | "largestmug"
2442
+ | "itemslooted"
2443
+ | "highestbeaten"
2444
+ | "respectforfaction"
2445
+ | "rankedwarhits"
2446
+ | "raidhits"
2447
+ | "territoryjoins"
2448
+ | "territoryclears"
2449
+ | "territorytime"
2450
+ | "jobpointsused"
2451
+ | "trainsreceived"
2452
+ | "marketitemsbought"
2453
+ | "auctionswon"
2454
+ | "auctionsells"
2455
+ | "itemssent"
2456
+ | "trades"
2457
+ | "cityitemsbought"
2458
+ | "pointsbought"
2459
+ | "pointssold"
2460
+ | "bazaarcustomers"
2461
+ | "bazaarsales"
2462
+ | "bazaarprofit"
2463
+ | "jailed"
2464
+ | "peoplebusted"
2465
+ | "failedbusts"
2466
+ | "peoplebought"
2467
+ | "peopleboughtspent"
2468
+ | "hospital"
2469
+ | "medicalitemsused"
2470
+ | "bloodwithdrawn"
2471
+ | "reviveskill"
2472
+ | "revives"
2473
+ | "revivesreceived"
2474
+ | "heavyhits"
2475
+ | "machinehits"
2476
+ | "riflehits"
2477
+ | "smghits"
2478
+ | "shotgunhits"
2479
+ | "pistolhits"
2480
+ | "temphits"
2481
+ | "piercinghits"
2482
+ | "slashinghits"
2483
+ | "clubbinghits"
2484
+ | "mechanicalhits"
2485
+ | "h2hhits"
2486
+ | "mailssent"
2487
+ | "friendmailssent"
2488
+ | "factionmailssent"
2489
+ | "companymailssent"
2490
+ | "spousemailssent"
2491
+ | "classifiedadsplaced"
2492
+ | "personalsplaced"
2493
+ | "criminaloffensesold"
2494
+ | "sellillegalgoods"
2495
+ | "theftold"
2496
+ | "autotheftcrime"
2497
+ | "drugdealscrime"
2498
+ | "computercrime"
2499
+ | "fraudold"
2500
+ | "murdercrime"
2501
+ | "othercrime"
2502
+ | "organizedcrimes"
2503
+ | "bountiesplaced"
2504
+ | "totalbountyspent"
2505
+ | "bountiescollected"
2506
+ | "totalbountyreward"
2507
+ | "bountiesreceived"
2508
+ | "receivedbountyvalue"
2509
+ | "cityfinds"
2510
+ | "dumpfinds"
2511
+ | "itemsdumped"
2512
+ | "booksread"
2513
+ | "boostersused"
2514
+ | "consumablesused"
2515
+ | "candyused"
2516
+ | "alcoholused"
2517
+ | "energydrinkused"
2518
+ | "statenhancersused"
2519
+ | "eastereggsfound"
2520
+ | "eastereggsused"
2521
+ | "virusescoded"
2522
+ | "traveltimes"
2523
+ | "timespenttraveling"
2524
+ | "itemsboughtabroad"
2525
+ | "attackswonabroad"
2526
+ | "defendslostabroad"
2527
+ | "argtravel"
2528
+ | "mextravel"
2529
+ | "uaetravel"
2530
+ | "hawtravel"
2531
+ | "japtravel"
2532
+ | "uktravel"
2533
+ | "satravel"
2534
+ | "switravel"
2535
+ | "chitravel"
2536
+ | "cantravel"
2537
+ | "caytravel"
2538
+ | "drugsused"
2539
+ | "overdosed"
2540
+ | "rehabs"
2541
+ | "rehabcost"
2542
+ | "cantaken"
2543
+ | "exttaken"
2544
+ | "kettaken"
2545
+ | "lsdtaken"
2546
+ | "opitaken"
2547
+ | "pcptaken"
2548
+ | "shrtaken"
2549
+ | "spetaken"
2550
+ | "victaken"
2551
+ | "xantaken"
2552
+ | "missionscompleted"
2553
+ | "contractscompleted"
2554
+ | "dukecontractscompleted"
2555
+ | "missioncreditsearned"
2556
+ | "racingskill"
2557
+ | "racingpointsearned"
2558
+ | "racesentered"
2559
+ | "raceswon"
2560
+ | "networth"
2561
+ | "timeplayed"
2562
+ | "activestreak"
2563
+ | "bestactivestreak"
2564
+ | "awards"
2565
+ | "refills"
2566
+ | "nerverefills"
2567
+ | "tokenrefills"
2568
+ | "meritsbought"
2569
+ | "daysbeendonator"
2570
+ | "criminaloffenses"
2571
+ | "vandalism"
2572
+ | "theft"
2573
+ | "counterfeiting"
2574
+ | "fraud"
2575
+ | "illicitservices"
2576
+ | "cybercrime"
2577
+ | "extortion"
2578
+ | "illegalproduction"
2579
+ | "currentkillstreak"
2580
+ | "strength"
2581
+ | "defense"
2582
+ | "speed"
2583
+ | "dexterity"
2584
+ | "totalstats"
2585
+ | "manuallabor"
2586
+ | "intelligence"
2587
+ | "endurance"
2588
+ | "totalworkingstats"
2589
+ | "moneyinvested"
2590
+ | "investedprofit"
2591
+ | "investamount"
2592
+ | "banktimeleft"
2593
+ | "stockprofits"
2594
+ | "stocklosses"
2595
+ | "stockfees"
2596
+ | "stocknetprofits"
2597
+ | "stockpayouts"
2598
+ | "networthwallet"
2599
+ | "networthvault"
2600
+ | "networthbank"
2601
+ | "networthcayman"
2602
+ | "networthpoints"
2603
+ | "networthitems"
2604
+ | "networthdisplaycase"
2605
+ | "networthbazaar"
2606
+ | "networthitemmarket"
2607
+ | "networthproperties"
2608
+ | "networthstockmarket"
2609
+ | "networthauctionhouse"
2610
+ | "networthbookie"
2611
+ | "networthcompany"
2612
+ | "networthenlistedcars"
2613
+ | "networthpiggybank"
2614
+ | "networthpending"
2615
+ | "networthloan"
2616
+ | "networthunpaidfees"
2617
+ | "huntingskill"
2618
+ | "searchforcashskill"
2619
+ | "bootleggingskill"
2620
+ | "graffitiskill"
2621
+ | "shopliftingskill"
2622
+ | "pickpocketingskill"
2623
+ | "cardskimmingskill"
2624
+ | "burglaryskill"
2625
+ | "hustlingskill"
2626
+ | "disposalskill"
2627
+ | "crackingskill"
2628
+ | "forgeryskill"
2629
+ | "scammingskill";
2630
+
2631
+ export interface UserCrimeDetailsBootlegging {
2632
+ /** Online store statistics. */
2633
+ online_store: {
2634
+ earnings: number;
2635
+ visits: number;
2636
+ customers: number;
2637
+ sales: number;
2638
+ };
2639
+ /** DVD sales statistics. */
2640
+ dvd_sales: {
2641
+ action: number;
2642
+ comedy: number;
2643
+ drama: number;
2644
+ fantasy: number;
2645
+ horror: number;
2646
+ romance: number;
2647
+ thriller: number;
2648
+ "sci-fi": number;
2649
+ total: number;
2650
+ earnings: number;
2651
+ };
2652
+ dvds_copied: number;
2653
+ }
2654
+
2655
+ export interface UserCrimeDetailsGraffiti {
2656
+ cans_used: number;
2657
+ most_graffiti_in_one_area: number;
2658
+ most_graffiti_simultaneously: number;
2659
+ graffiti_removed: number;
2660
+ cost_to_city: number;
2661
+ }
2662
+
2663
+ export interface UserCrimeDetailsShoplifting {
2664
+ average_notoriety: number;
2665
+ }
2666
+
2667
+ export interface UserCrimeDetailsCardSkimming {
2668
+ card_details: {
2669
+ recoverable: number;
2670
+ recovered: number;
2671
+ sold: number;
2672
+ lost: number;
2673
+ areas: {
2674
+ id?: number;
2675
+ amount?: number;
2676
+ }[];
2677
+ };
2678
+ skimmers: {
2679
+ active: number;
2680
+ most_lucrative: number;
2681
+ oldest_recovered: number;
2682
+ lost: number;
2683
+ };
2684
+ }
2685
+
2686
+ export interface UserCrimeDetailsHustling {
2687
+ total_audience_gathered: number;
2688
+ biggest_money_won: number;
2689
+ shill_money_collected: number;
2690
+ pickpocket_money_collected: number;
2691
+ }
2692
+
2693
+ export interface UserCrimeDetailsCracking {
2694
+ brute_force_cycles: number;
2695
+ encryption_layers_broken: number;
2696
+ highest_mips: number;
2697
+ chars_guessed: number;
2698
+ chars_guessed_total: number;
2699
+ }
2700
+
2701
+ export interface UserCrimeDetailsScamming {
2702
+ most_responses: number;
2703
+ zones: {
2704
+ red: number;
2705
+ neutral: number;
2706
+ concern: number;
2707
+ sensitivity: number;
2708
+ temptation: number;
2709
+ hesitation: number;
2710
+ low_reward: number;
2711
+ medium_reward: number;
2712
+ high_reward: number;
2713
+ };
2714
+ concerns: {
2715
+ attempts: number;
2716
+ resolved: number;
2717
+ };
2718
+ payouts: {
2719
+ low: number;
2720
+ medium: number;
2721
+ high: number;
2722
+ };
2723
+ emails: {
2724
+ scraper: number;
2725
+ phisher: number;
2726
+ };
2727
+ }
2728
+
2729
+ export interface UserSubcrime {
2730
+ id: number;
2731
+ total: number;
2732
+ success: number;
2733
+ fail: number;
2734
+ }
2735
+
2736
+ export interface UserCrimeRewardAmmo {
2737
+ standard: number;
2738
+ special: number;
2739
+ }
2740
+
2741
+ export interface UserCrimeRewardItem {
2742
+ id: number;
2743
+ amount: number;
2744
+ }
2745
+
2746
+ export interface UserCrimeRewards {
2747
+ money: number;
2748
+ ammo: UserCrimeRewardAmmo;
2749
+ items: UserCrimeRewardItem[];
2750
+ }
2751
+
2752
+ export interface UserCrimeAttempts {
2753
+ total: number;
2754
+ success: number;
2755
+ fail: number;
2756
+ critical_fail: number;
2757
+ subcrimes: UserSubcrime[];
2758
+ }
2759
+
2760
+ export interface UserCrimeUniquesRewardMoney {
2761
+ min: number;
2762
+ max: number;
2763
+ }
2764
+
2765
+ export interface UserCrimeUniquesRewardAmmo {
2766
+ amount: number;
2767
+ type: UserCrimeUniquesRewardAmmoEnum;
2768
+ }
2769
+
2770
+ export interface UserCrimeUniquesReward {
2771
+ items: UserCrimeRewardItem[];
2772
+ money: UserCrimeUniquesRewardMoney | null;
2773
+ ammo: UserCrimeUniquesRewardAmmo | null;
2774
+ }
2775
+
2776
+ export interface UserCrimeUniques {
2777
+ /** Unique result id. */
2778
+ id: number;
2779
+ rewards: UserCrimeUniquesReward[];
2780
+ }
2781
+
2782
+ export interface UserCrimesResponse {
2783
+ crimes: UserCrime;
2784
+ }
2785
+
2786
+ export interface UserCrime {
2787
+ nerve_spent: number;
2788
+ skill: number;
2789
+ progression_bonus: number;
2790
+ rewards: UserCrimeRewards;
2791
+ attempts: UserCrimeAttempts;
2792
+ uniques: UserCrimeUniques[];
2793
+ miscellaneous:
2794
+ | UserCrimeDetailsBootlegging
2795
+ | UserCrimeDetailsGraffiti
2796
+ | UserCrimeDetailsShoplifting
2797
+ | UserCrimeDetailsCardSkimming
2798
+ | UserCrimeDetailsHustling
2799
+ | UserCrimeDetailsCracking
2800
+ | UserCrimeDetailsScamming;
2801
+ }
2802
+
2803
+ export interface UserRacesResponse {
2804
+ races: RacingRaceDetailsResponse[];
2805
+ _metadata: RequestMetadataWithLinks;
2806
+ }
2807
+
2808
+ export interface UserRaceCarDetails extends RaceCar {
2809
+ id?: RaceCarId;
2810
+ name?: string;
2811
+ worth?: number;
2812
+ points_spent?: number;
2813
+ races_entered?: number;
2814
+ races_won?: number;
2815
+ is_removed?: boolean;
2816
+ parts?: RaceCarUpgradeId[];
2817
+ }
2818
+
2819
+ export interface UserEnlistedCarsResponse {
2820
+ enlistedcars: UserRaceCarDetails[];
2821
+ }
2822
+
2823
+ export interface UserForumPostsResponse {
2824
+ forumPosts: ForumPost[];
2825
+ _metadata: RequestMetadataWithLinks;
2826
+ }
2827
+
2828
+ export interface UserForumThreadsResponse {
2829
+ forumThreads: ForumThreadUserExtended[];
2830
+ _metadata: RequestMetadataWithLinks;
2831
+ }
2832
+
2833
+ export interface UserForumSubscribedThreadsResponse {
2834
+ forumSubscribedThreads: ForumSubscribedThread[];
2835
+ }
2836
+
2837
+ export interface UserForumFeedResponse {
2838
+ forumFeed: ForumFeed[];
2839
+ }
2840
+
2841
+ export interface UserForumFriendsResponse {
2842
+ forumFriends: ForumFeed[];
2843
+ }
2844
+
2845
+ export interface HofValue {
2846
+ value: number;
2847
+ rank: number;
2848
+ }
2849
+
2850
+ export interface HofValueString {
2851
+ value: string;
2852
+ rank: number;
2853
+ }
2854
+
2855
+ export interface UserHofStats {
2856
+ attacks: HofValue;
2857
+ busts: HofValue;
2858
+ defends: HofValue;
2859
+ networth: HofValue;
2860
+ offences: HofValue;
2861
+ revives: HofValue;
2862
+ level: HofValue;
2863
+ rank: HofValue;
2864
+ awards: HofValue;
2865
+ racing_skill: HofValue;
2866
+ racing_points: HofValue;
2867
+ racing_wins: HofValue;
2868
+ travel_time: HofValue;
2869
+ working_stats: HofValue;
2870
+ battle_stats: HofValue | null;
2871
+ }
2872
+
2873
+ export interface UserHofResponse {
2874
+ hof: UserHofStats[];
2875
+ }
2876
+
2877
+ export interface UserCalendar {
2878
+ /** Event start time displayed in TCT. */
2879
+ start_time: string;
2880
+ }
2881
+
2882
+ export interface UserCalendarResponse {
2883
+ calendar: UserCalendar;
2884
+ }
2885
+
2886
+ export interface UserBountiesResponse {
2887
+ bounties: Bounty[];
2888
+ }
2889
+
2890
+ export interface UserJobRanks {
2891
+ army: JobPositionArmyEnum;
2892
+ grocer: JobPositionGrocerEnum;
2893
+ casino: JobPositionCasinoEnum;
2894
+ medical: JobPositionMedicalEnum;
2895
+ law: JobPositionLawEnum;
2896
+ education: JobPositionEducationEnum;
2897
+ }
2898
+
2899
+ export interface UserJobRanksResponse {
2900
+ jobranks: UserJobRanks;
2901
+ }
2902
+
2903
+ export interface UserItemMarkeListingItemDetails {
2904
+ id: number;
2905
+ name: string;
2906
+ type: string;
2907
+ rarity: ("yellow" | "orange" | "red") | null;
2908
+ uid: number | null;
2909
+ stats: ItemMarketListingItemStats | null;
2910
+ bonuses: ItemMarketListingItemBonus[];
2911
+ }
2912
+
2913
+ export interface UserItemMarketListing {
2914
+ id: number;
2915
+ price: number;
2916
+ average_price: number;
2917
+ amount: number;
2918
+ is_anonymous: boolean;
2919
+ /** Amount remaining in the inventory. */
2920
+ available: number;
2921
+ item: UserItemMarkeListingItemDetails;
2922
+ }
2923
+
2924
+ export interface UserItemMarketResponse {
2925
+ itemmarket: UserItemMarketListing[];
2926
+ _metadata: RequestMetadataWithLinks;
2927
+ }
2928
+
2929
+ export interface UserFactionBalance {
2930
+ money: number;
2931
+ points: number;
2932
+ }
2933
+
2934
+ export interface UserFactionBalanceResponse {
2935
+ factionBalance: UserFactionBalance | null;
2936
+ }
2937
+
2938
+ export interface UserOrganizedCrimeResponse {
2939
+ organizedCrime: FactionCrime | null;
2940
+ }
2941
+
2942
+ /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','basic','battlestats','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','jobpoints','log','medals','merits','messages','missions','money','networth','newevents','newmessages','notifications','perks','profile','properties','refills','reports','skills','stocks','travel','weaponexp','workstats'. */
2943
+ export type UserSelectionName =
2944
+ | "attacks"
2945
+ | "attacksfull"
2946
+ | "bounties"
2947
+ | "calendar"
2948
+ | "crimes"
2949
+ | "enlistedcars"
2950
+ | "factionbalance"
2951
+ | "forumfeed"
2952
+ | "forumfriends"
2953
+ | "forumposts"
2954
+ | "forumsubscribedthreads"
2955
+ | "forumthreads"
2956
+ | "hof"
2957
+ | "itemmarket"
2958
+ | "jobranks"
2959
+ | "lookup"
2960
+ | "organizedcrime"
2961
+ | "personalstats"
2962
+ | "races"
2963
+ | "revives"
2964
+ | "revivesfull"
2965
+ | "timestamp"
2966
+ | "ammo"
2967
+ | "bars"
2968
+ | "basic"
2969
+ | "battlestats"
2970
+ | "bazaar"
2971
+ | "cooldowns"
2972
+ | "criminalrecord"
2973
+ | "discord"
2974
+ | "display"
2975
+ | "education"
2976
+ | "equipment"
2977
+ | "events"
2978
+ | "gym"
2979
+ | "honors"
2980
+ | "icons"
2981
+ | "inventory"
2982
+ | "jobpoints"
2983
+ | "log"
2984
+ | "medals"
2985
+ | "merits"
2986
+ | "messages"
2987
+ | "missions"
2988
+ | "money"
2989
+ | "networth"
2990
+ | "newevents"
2991
+ | "newmessages"
2992
+ | "notifications"
2993
+ | "perks"
2994
+ | "profile"
2995
+ | "properties"
2996
+ | "refills"
2997
+ | "reports"
2998
+ | "skills"
2999
+ | "stocks"
3000
+ | "travel"
3001
+ | "weaponexp"
3002
+ | "workstats";
3003
+
3004
+ export interface UserLookupResponse {
3005
+ selections: UserSelectionName[];
3006
+ }