tornapi-typescript 0.2.4 → 0.2.7

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +198 -184
  2. package/dist/openapi.json +1496 -396
  3. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -9,6 +9,31 @@
9
9
 
10
10
  export type RaceClassEnum = "A" | "B" | "C" | "D" | "E";
11
11
 
12
+ export type CountryEnum =
13
+ | "Mexico"
14
+ | "Hawaii"
15
+ | "South Africa"
16
+ | "Japan"
17
+ | "China"
18
+ | "Argentina"
19
+ | "Switzerland"
20
+ | "Canada"
21
+ | "United Kingdom"
22
+ | "UAE"
23
+ | "Cayman Islands";
24
+
25
+ export type ReportTypeEnum =
26
+ | "mostwanted"
27
+ | "money"
28
+ | "stats"
29
+ | "references"
30
+ | "friendorfoe"
31
+ | "companyfinancials"
32
+ | "truelevel"
33
+ | "stockanalysis"
34
+ | "anonymousbounties"
35
+ | "investment";
36
+
12
37
  export type ApiKeyAccessTypeEnum =
13
38
  | "Custom"
14
39
  | "Public Only"
@@ -4174,6 +4199,8 @@ export type FactionStatEnum =
4174
4199
 
4175
4200
  export type FactionBranchStateEnum = "war" | "peace";
4176
4201
 
4202
+ export type RacingRaceTypeEnum = "official" | "custom";
4203
+
4177
4204
  export type FactionPositionAbilityEnum =
4178
4205
  | "Medical Item Usage"
4179
4206
  | "Booster Item Usage"
@@ -4573,6 +4600,8 @@ export interface RequestMetadataWithLinksAndTotal {
4573
4600
  */
4574
4601
  export type ForumFeedTypeEnum = 1 | 2 | 3 | 4 | 5 | 6 | 7;
4575
4602
 
4603
+ export type Parameters = string;
4604
+
4576
4605
  export type ReviveSetting =
4577
4606
  | "Everyone"
4578
4607
  | "Friends & faction"
@@ -4838,6 +4867,138 @@ export interface TimestampResponse {
4838
4867
  timestamp: number;
4839
4868
  }
4840
4869
 
4870
+ export interface ReportBase {
4871
+ type: ReportTypeEnum;
4872
+ target_id: UserId | null;
4873
+ reporter_id: UserId;
4874
+ faction_id: FactionId | null;
4875
+ timestamp: number;
4876
+ }
4877
+
4878
+ export interface ReportWarrantDetails {
4879
+ id: UserId;
4880
+ name: string;
4881
+ warrant: number;
4882
+ }
4883
+
4884
+ export interface ReportMostWanted {
4885
+ top: ReportWarrantDetails[];
4886
+ notable: ReportWarrantDetails[];
4887
+ }
4888
+
4889
+ export interface ReportMoney {
4890
+ money: number;
4891
+ }
4892
+
4893
+ export interface ReportInvestment {
4894
+ amount: number;
4895
+ until: number;
4896
+ }
4897
+
4898
+ export interface ReportTrueLevel {
4899
+ level: number;
4900
+ }
4901
+
4902
+ export interface ReportStats {
4903
+ strength: number | null;
4904
+ speed: number | null;
4905
+ dexterity: number | null;
4906
+ defense: number | null;
4907
+ total: number | null;
4908
+ }
4909
+
4910
+ export interface ReportHistoryFaction {
4911
+ id: FactionId;
4912
+ name: string;
4913
+ joined: string;
4914
+ left: string | null;
4915
+ }
4916
+
4917
+ export interface ReportHistoryCompany {
4918
+ id: CompanyId;
4919
+ name: string;
4920
+ joined: string;
4921
+ left: string | null;
4922
+ }
4923
+
4924
+ export interface ReportHistory {
4925
+ factions: ReportHistoryFaction[];
4926
+ companies: ReportHistoryCompany[];
4927
+ }
4928
+
4929
+ export interface ReportFriendOrFoeUser {
4930
+ id: UserId;
4931
+ name: string;
4932
+ }
4933
+
4934
+ export interface ReportFriendOrFoe {
4935
+ friends: ReportFriendOrFoeUser[];
4936
+ enemies: ReportFriendOrFoeUser[];
4937
+ }
4938
+
4939
+ export interface ReportCompanyFinancials {
4940
+ balance: number;
4941
+ employees: number;
4942
+ wages: {
4943
+ highest: number;
4944
+ lowest: number;
4945
+ average: number;
4946
+ };
4947
+ }
4948
+
4949
+ export interface ReportStockAnalysis {
4950
+ items: {
4951
+ country: CountryEnum;
4952
+ item: {
4953
+ id: ItemId;
4954
+ name: string;
4955
+ price: number;
4956
+ value: number;
4957
+ due: number | null;
4958
+ };
4959
+ trip_duration: number;
4960
+ hourly_profit: number;
4961
+ }[];
4962
+ }
4963
+
4964
+ export interface ReportAnonymousBounties {
4965
+ bounties: {
4966
+ text: string;
4967
+ bounty: number;
4968
+ user: {
4969
+ id: UserId;
4970
+ name: string;
4971
+ } | null;
4972
+ }[];
4973
+ }
4974
+
4975
+ export interface ReportReport {
4976
+ report:
4977
+ | ReportMoney
4978
+ | ReportStats
4979
+ | ReportMostWanted
4980
+ | ReportHistory
4981
+ | ReportFriendOrFoe
4982
+ | ReportCompanyFinancials
4983
+ | ReportTrueLevel
4984
+ | ReportStockAnalysis
4985
+ | ReportAnonymousBounties
4986
+ | ReportInvestment;
4987
+ }
4988
+
4989
+ export interface Report extends ReportBase, ReportReport {}
4990
+
4991
+ export interface ReportsResponse {
4992
+ reports: Report[];
4993
+ _metadata: RequestMetadataWithLinks;
4994
+ }
4995
+
4996
+ export type SelectionCategoryEnum =
4997
+ | ReportTypeEnum
4998
+ | UserListEnum
4999
+ | PersonalStatsCategoryEnum
5000
+ | RacingRaceTypeEnum;
5001
+
4841
5002
  export interface UserCurrentEducation {
4842
5003
  id: EducationId;
4843
5004
  until: number;
@@ -5186,67 +5347,7 @@ export interface UserListResponse {
5186
5347
  }
5187
5348
 
5188
5349
  /** 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'. */
5189
- export type UserSelectionName =
5190
- | "attacks"
5191
- | "attacksfull"
5192
- | "bounties"
5193
- | "calendar"
5194
- | "crimes"
5195
- | "enlistedcars"
5196
- | "factionbalance"
5197
- | "forumfeed"
5198
- | "forumfriends"
5199
- | "forumposts"
5200
- | "forumsubscribedthreads"
5201
- | "forumthreads"
5202
- | "hof"
5203
- | "itemmarket"
5204
- | "jobranks"
5205
- | "list"
5206
- | "lookup"
5207
- | "organizedcrime"
5208
- | "personalstats"
5209
- | "races"
5210
- | "revives"
5211
- | "revivesfull"
5212
- | "timestamp"
5213
- | "ammo"
5214
- | "bars"
5215
- | "basic"
5216
- | "battlestats"
5217
- | "bazaar"
5218
- | "cooldowns"
5219
- | "criminalrecord"
5220
- | "discord"
5221
- | "display"
5222
- | "education"
5223
- | "equipment"
5224
- | "events"
5225
- | "gym"
5226
- | "honors"
5227
- | "icons"
5228
- | "inventory"
5229
- | "jobpoints"
5230
- | "log"
5231
- | "medals"
5232
- | "merits"
5233
- | "messages"
5234
- | "missions"
5235
- | "money"
5236
- | "networth"
5237
- | "newevents"
5238
- | "newmessages"
5239
- | "notifications"
5240
- | "perks"
5241
- | "profile"
5242
- | "properties"
5243
- | "refills"
5244
- | "reports"
5245
- | "skills"
5246
- | "stocks"
5247
- | "travel"
5248
- | "weaponexp"
5249
- | "workstats";
5350
+ export type UserSelectionName = string;
5250
5351
 
5251
5352
  export interface UserLookupResponse {
5252
5353
  selections: UserSelectionName[];
@@ -6180,6 +6281,30 @@ export interface FactionTerritoryWarFinishedFaction {
6180
6281
  is_aggressor: boolean;
6181
6282
  }
6182
6283
 
6284
+ export interface FactionSearchLeader {
6285
+ id: UserId;
6286
+ name: string;
6287
+ }
6288
+
6289
+ export interface FactionSearch {
6290
+ id: FactionId;
6291
+ name: string;
6292
+ respect: number;
6293
+ members: number;
6294
+ leader: FactionSearchLeader;
6295
+ co_leader: FactionSearchLeader | null;
6296
+ image: string | null;
6297
+ tag_image: string | null;
6298
+ tag: string | null;
6299
+ is_destroyed: boolean;
6300
+ is_recruiting: boolean;
6301
+ }
6302
+
6303
+ export interface FactionSearchResponse {
6304
+ search: FactionSearch[];
6305
+ _metadata: RequestMetadataWithLinks;
6306
+ }
6307
+
6183
6308
  export interface FactionTerritoryWarFinished {
6184
6309
  id: TerritoryWarId;
6185
6310
  territory: FactionTerritoryEnum;
@@ -6740,58 +6865,10 @@ export interface FactionBalanceResponse {
6740
6865
  }
6741
6866
 
6742
6867
  /**
6743
- * The following selections will fallback to API v1 and may change at any time: 'armor', 'boosters', 'caches', 'cesium', 'crimeexp', 'drugs', 'medical', 'positions', 'reports', 'temporary', 'weapons'.
6744
- * * The following selections are not available in API v2: 'armorynews', 'attacknews', 'crimenews', 'currency', 'donations', 'fundsnews', 'mainnews', 'membershipnews', 'territorynews'.
6868
+ * The following selections will fallback to API v1 and may change at any time: 'armor', 'boosters', 'caches', 'cesium', 'crimeexp', 'drugs', 'medical', 'temporary', 'weapons'.
6869
+ * * The following selections are not available in API v2: 'armorynews', 'attacknews', 'crimenews', 'currency', 'donations', 'fundsnews', 'mainnews', 'membershipnews', 'territorynews'.
6745
6870
  */
6746
- export type FactionSelectionName =
6747
- | "applications"
6748
- | "attacks"
6749
- | "attacksfull"
6750
- | "balance"
6751
- | "basic"
6752
- | "chain"
6753
- | "chainreport"
6754
- | "chains"
6755
- | "contributors"
6756
- | "crime"
6757
- | "crimes"
6758
- | "hof"
6759
- | "lookup"
6760
- | "members"
6761
- | "news"
6762
- | "rackets"
6763
- | "rankedwars"
6764
- | "rankedwarreport"
6765
- | "revives"
6766
- | "revivesfull"
6767
- | "stats"
6768
- | "territory"
6769
- | "territoryownership"
6770
- | "territorywarreport"
6771
- | "territorywars"
6772
- | "timestamp"
6773
- | "upgrades"
6774
- | "wars"
6775
- | "armor"
6776
- | "boosters"
6777
- | "caches"
6778
- | "cesium"
6779
- | "crimeexp"
6780
- | "drugs"
6781
- | "medical"
6782
- | "positions"
6783
- | "reports"
6784
- | "temporary"
6785
- | "weapons"
6786
- | "armorynews"
6787
- | "attacknews"
6788
- | "crimenews"
6789
- | "currency"
6790
- | "donations"
6791
- | "fundsnews"
6792
- | "mainnews"
6793
- | "membershipnews"
6794
- | "territorynews";
6871
+ export type FactionSelectionName = string;
6795
6872
 
6796
6873
  export interface FactionLookupResponse {
6797
6874
  selections: FactionSelectionName[];
@@ -6966,13 +7043,7 @@ export interface ForumPostsResponse {
6966
7043
  _metadata: RequestMetadataWithLinks;
6967
7044
  }
6968
7045
 
6969
- export type ForumSelectionName =
6970
- | "categories"
6971
- | "lookup"
6972
- | "posts"
6973
- | "thread"
6974
- | "threads"
6975
- | "timestamp";
7046
+ export type ForumSelectionName = string;
6976
7047
 
6977
7048
  export interface ForumLookupResponse {
6978
7049
  selections: ForumSelectionName[];
@@ -6983,7 +7054,7 @@ export interface KeyLogResponse {
6983
7054
  timestamp: number;
6984
7055
  type: string;
6985
7056
  selections: string;
6986
- id: number | null;
7057
+ id: number | string | null;
6987
7058
  comment?: string | null;
6988
7059
  ip: string;
6989
7060
  }[];
@@ -7013,7 +7084,7 @@ export interface KeyInfoResponse {
7013
7084
  };
7014
7085
  }
7015
7086
 
7016
- export type KeySelectionName = "info" | "log";
7087
+ export type KeySelectionName = string;
7017
7088
 
7018
7089
  export interface ItemMarketListingItemBonus {
7019
7090
  id: number;
@@ -7057,6 +7128,8 @@ export interface ItemMarketListingNonstackable {
7057
7128
  export interface ItemMarket {
7058
7129
  item: ItemMarketItem;
7059
7130
  listings: (ItemMarketListingNonstackable | ItemMarketListingStackable)[];
7131
+ /** Timestamp when the data was globally cached at. */
7132
+ cache_timestamp: number;
7060
7133
  }
7061
7134
 
7062
7135
  export interface MarketItemMarketResponse {
@@ -7065,12 +7138,7 @@ export interface MarketItemMarketResponse {
7065
7138
  }
7066
7139
 
7067
7140
  /** The following selections will fallback to API v1 and may change at any time: 'pointsmarket'. */
7068
- export type MarketSelectionName =
7069
- | "itemmarket"
7070
- | "lookup"
7071
- | "timestamp"
7072
- | "pointsmarket"
7073
- | "bazaar";
7141
+ export type MarketSelectionName = string;
7074
7142
 
7075
7143
  export interface MarketLookupResponse {
7076
7144
  selections: MarketSelectionName[];
@@ -7193,15 +7261,7 @@ export interface RacingRaceDetailsResponse {
7193
7261
  };
7194
7262
  }
7195
7263
 
7196
- export type RacingSelectionName =
7197
- | "cars"
7198
- | "carupgrades"
7199
- | "lookup"
7200
- | "race"
7201
- | "races"
7202
- | "records"
7203
- | "timestamp"
7204
- | "tracks";
7264
+ export type RacingSelectionName = string;
7205
7265
 
7206
7266
  export interface RacingLookupResponse {
7207
7267
  selections: RacingSelectionName[];
@@ -7537,55 +7597,9 @@ export interface TornFactionTreeResponse {
7537
7597
 
7538
7598
  /**
7539
7599
  * The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','dirtybombs','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','properties','raidreport','raids','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.
7540
- * * The following selections are not available in API v2: 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.
7600
+ * * The following selections are not available in API v2: 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.
7541
7601
  */
7542
- export type TornSelectionName =
7543
- | "attacklog"
7544
- | "bounties"
7545
- | "calendar"
7546
- | "crimes"
7547
- | "education"
7548
- | "factionhof"
7549
- | "factiontree"
7550
- | "hof"
7551
- | "itemammo"
7552
- | "itemmods"
7553
- | "items"
7554
- | "logcategories"
7555
- | "logtypes"
7556
- | "lookup"
7557
- | "subcrimes"
7558
- | "territory"
7559
- | "timestamp"
7560
- | "bank"
7561
- | "cards"
7562
- | "cityshops"
7563
- | "companies"
7564
- | "competition"
7565
- | "dirtybombs"
7566
- | "gyms"
7567
- | "honors"
7568
- | "itemdetails"
7569
- | "itemstats"
7570
- | "medals"
7571
- | "organisedcrimes"
7572
- | "pawnshop"
7573
- | "pokertables"
7574
- | "properties"
7575
- | "raidreport"
7576
- | "raids"
7577
- | "rockpaperscissors"
7578
- | "searchforcash"
7579
- | "shoplifting"
7580
- | "stats"
7581
- | "stocks"
7582
- | "chainreport"
7583
- | "rackets"
7584
- | "rankedwarreport"
7585
- | "rankedwars"
7586
- | "territorynames"
7587
- | "territorywarreport"
7588
- | "territorywars";
7602
+ export type TornSelectionName = string;
7589
7603
 
7590
7604
  export interface TornLookupResponse {
7591
7605
  selections: TornSelectionName[];