tornapi-typescript 3.0.9 → 3.0.10

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.
package/dist/index.d.ts CHANGED
@@ -44,6 +44,9 @@ export type FactionCrimeUserOutcome = "Successful" | "Failed" | "Jailed" | "Inju
44
44
  export type FactionCrimeUserItemOutcomeEnum = "user" | "faction";
45
45
  export type FactionCrimeItemOutcomeEnum = "lost" | "used";
46
46
  export type RaceId = number;
47
+ export type HonorId = number;
48
+ export type MedalId = number;
49
+ export type MeritId = number;
47
50
  export type OrganizedCrimeName = string;
48
51
  export type PropertyTypeId = number;
49
52
  export type PropertyId = number;
@@ -102,6 +105,7 @@ export interface RequestMetadataWithLinksAndTotal {
102
105
  */
103
106
  export type ForumFeedTypeEnum = 1 | 2 | 3 | 4 | 5 | 6 | 7;
104
107
  export type UserGenderEnum = "Male" | "Female" | "Enby";
108
+ export type HonorRarityEnum = "Extremely Rare" | "Very Rare" | "Rare" | "Limited" | "Uncommon" | "Common" | "Very Common" | "Unknown";
105
109
  export type Parameters = string;
106
110
  export type ReviveSetting = "Everyone" | "Friends & faction" | "No one" | "Unknown";
107
111
  export type FactionWarfareTypeEnum = "ranked" | "territory" | "raid" | "chain" | "db";
@@ -112,6 +116,8 @@ export type AttackActionEnum = "attackerhosp" | "busy" | "critical hit" | "attac
112
116
  export type TornItemAmmoTypeEnum = "Standard" | "Hollow Point" | "Piercing" | "Tracer" | "Incendiary";
113
117
  export type TornItemWeaponTypeEnum = "Heavy artillery" | "Machine gun" | "Pistol" | "Rifle" | "Shotgun" | "SMG" | "Temporary" | "Clubbing" | "Piercing" | "Slashing" | "Mechanical";
114
118
  export type TornItemWeaponCategoryEnum = "Melee" | "Secondary" | "Primary" | "Temporary";
119
+ export type MedalTypeEnum = "combat" | "commitment" | "crime" | "level" | "miscellaneous" | "networth" | "rank";
120
+ export type HonorTypeEnum = "attacking" | "camo" | "weapons" | "education" | "crimes" | "drugs" | "jail" | "hospital" | "travel" | "gym" | "level" | "competitions" | "money" | "items" | "commitment" | "casino" | "missions" | "misc" | "default";
115
121
  export type TornItemTypeEnum = "Alcohol" | "Armor" | "Artifact" | "Book" | "Booster" | "Candy" | "Car" | "Clothing" | "Collectible" | "Drug" | "Energy Drink" | "Enhancer" | "Flower" | "Jewelry" | "Material" | "Medical" | "Other" | "Plushie" | "Special" | "Supply Pack" | "Tool" | "Unused" | "Weapon";
116
122
  export type TornItemCategory = "All" | "Alcohol" | "Armor" | "Artifact" | "Book" | "Booster" | "Candy" | "Car" | "Clothing" | "Collectible" | "Defensive" | "Drug" | "Energy Drink" | "Enhancer" | "Flower" | "Jewelry" | "Material" | "Medical" | "Melee" | "Other" | "Plushie" | "Primary" | "Secondary" | "Special" | "Supply Pack" | "Temporary" | "Tool" | "Unused" | "Weapon";
117
123
  export type TornItemArmorCoveragePartEnum = "Full Body" | "Heart" | "Stomach" | "Chest" | "Arm" | "Groin" | "Leg" | "Throat" | "Hand" | "Foot" | "Head";
@@ -791,11 +797,39 @@ export interface UserListResponse {
791
797
  list: UserList[];
792
798
  _metadata: RequestMetadataWithLinks;
793
799
  }
794
- /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','log','medals','merits','messages','missions','networth','newevents','newmessages','notifications','perks','profile','refills','stocks','travel','weaponexp'. */
800
+ /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','icons','inventory','messages','missions','networth','newevents','newmessages','notifications','perks','profile','refills','stocks','travel','weaponexp'. */
795
801
  export type UserSelectionName = string;
796
802
  export interface UserLookupResponse {
797
803
  selections: UserSelectionName[];
798
804
  }
805
+ export interface UserHonor {
806
+ id: HonorId;
807
+ timestamp: number;
808
+ }
809
+ export interface UserHonorsResponse {
810
+ honors: UserHonor[];
811
+ }
812
+ export interface UserMedal {
813
+ id: MedalId;
814
+ timestamp: number;
815
+ }
816
+ export interface UserMedalsResponse {
817
+ medals: UserMedal[];
818
+ }
819
+ export interface UserMeritUpgrade {
820
+ id: MeritId;
821
+ level: number;
822
+ }
823
+ export interface UserMerits {
824
+ upgrades: UserMeritUpgrade[];
825
+ available: number;
826
+ used: number;
827
+ medals: number;
828
+ honors: number;
829
+ }
830
+ export interface UserMeritsResponse {
831
+ merits: UserMerits;
832
+ }
799
833
  export interface PersonalStatsOther {
800
834
  other: {
801
835
  activity: {
@@ -2463,6 +2497,44 @@ export type PropertySelectionName = string;
2463
2497
  export interface PropertyLookupResponse {
2464
2498
  selections: PropertySelectionName[];
2465
2499
  }
2500
+ export interface TornMerit {
2501
+ id: MeritId;
2502
+ name: string;
2503
+ description: string;
2504
+ }
2505
+ export interface TornMeritsResponse {
2506
+ merits: TornMerit[];
2507
+ }
2508
+ /** Properties 'circulation', 'equipped' & 'rarity' are only populated for honors which do not have type.id value 1. */
2509
+ export interface TornHonor {
2510
+ id: HonorId;
2511
+ name: string;
2512
+ description: string;
2513
+ type: {
2514
+ id: number;
2515
+ title: HonorTypeEnum;
2516
+ };
2517
+ circulation?: number;
2518
+ equipped?: number;
2519
+ rarity?: HonorRarityEnum;
2520
+ }
2521
+ export interface TornHonorsResponse {
2522
+ honors: TornHonor[];
2523
+ }
2524
+ export interface TornMedal {
2525
+ id: MedalId;
2526
+ name: string;
2527
+ description: string;
2528
+ type: {
2529
+ id: string;
2530
+ title: MedalTypeEnum;
2531
+ };
2532
+ circulation: number;
2533
+ rarity: HonorRarityEnum;
2534
+ }
2535
+ export interface TornMedalsResponse {
2536
+ medals: TornMedal[];
2537
+ }
2466
2538
  export interface TornOrganizedCrimeResponse {
2467
2539
  organizedcrimes: TornOrganizedCrime[];
2468
2540
  }
@@ -2796,7 +2868,7 @@ export interface TornFactionTreeResponse {
2796
2868
  factionTree: TornFactionTree[];
2797
2869
  }
2798
2870
  /**
2799
- * The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.
2871
+ * The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','itemdetails','itemstats','organisedcrimes','pawnshop','pokertables','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.
2800
2872
  * * The following selections are not available in API v2: 'dirtybombs','raidreport','raids', 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.
2801
2873
  */
2802
2874
  export type TornSelectionName = string;
@@ -6120,6 +6192,10 @@ export interface UserV2 extends BaseSchema {
6120
6192
  response: UserHofResponse;
6121
6193
  params: "timestamp";
6122
6194
  };
6195
+ honors: {
6196
+ response: UserHonorsResponse;
6197
+ params: "timestamp";
6198
+ };
6123
6199
  itemmarket: {
6124
6200
  response: UserItemMarketResponse;
6125
6201
  params: "offset" | "timestamp";
@@ -6140,6 +6216,14 @@ export interface UserV2 extends BaseSchema {
6140
6216
  response: UserLogsResponse;
6141
6217
  params: "log" | "cat" | "limit" | "to" | "from" | "timestamp";
6142
6218
  };
6219
+ medals: {
6220
+ response: UserMedalsResponse;
6221
+ params: "timestamp";
6222
+ };
6223
+ merits: {
6224
+ response: UserMeritsResponse;
6225
+ params: "timestamp";
6226
+ };
6143
6227
  money: {
6144
6228
  response: UserMoneyResponse;
6145
6229
  params: "timestamp";
@@ -6488,6 +6572,10 @@ export interface TornV2 extends BaseSchema {
6488
6572
  response: TornFactionTreeResponse;
6489
6573
  params: "timestamp";
6490
6574
  };
6575
+ honors: {
6576
+ response: TornHonorsResponse;
6577
+ params: "timestamp";
6578
+ };
6491
6579
  hof: {
6492
6580
  response: TornHofResponse;
6493
6581
  params: "limit" | "offset" | "cat" | "timestamp";
@@ -6512,6 +6600,14 @@ export interface TornV2 extends BaseSchema {
6512
6600
  response: TornLogTypesResponse;
6513
6601
  params: "timestamp";
6514
6602
  };
6603
+ medals: {
6604
+ response: TornMedalsResponse;
6605
+ params: "timestamp";
6606
+ };
6607
+ merits: {
6608
+ response: TornMeritsResponse;
6609
+ params: "timestamp";
6610
+ };
6515
6611
  organizedcrimes: {
6516
6612
  response: TornOrganizedCrimeResponse;
6517
6613
  params: "timestamp";
package/dist/index.ts CHANGED
@@ -4578,6 +4578,12 @@ export type FactionCrimeItemOutcomeEnum = "lost" | "used";
4578
4578
 
4579
4579
  export type RaceId = number;
4580
4580
 
4581
+ export type HonorId = number;
4582
+
4583
+ export type MedalId = number;
4584
+
4585
+ export type MeritId = number;
4586
+
4581
4587
  export type OrganizedCrimeName = string;
4582
4588
 
4583
4589
  export type PropertyTypeId = number;
@@ -4674,6 +4680,16 @@ export type ForumFeedTypeEnum = 1 | 2 | 3 | 4 | 5 | 6 | 7;
4674
4680
 
4675
4681
  export type UserGenderEnum = "Male" | "Female" | "Enby";
4676
4682
 
4683
+ export type HonorRarityEnum =
4684
+ | "Extremely Rare"
4685
+ | "Very Rare"
4686
+ | "Rare"
4687
+ | "Limited"
4688
+ | "Uncommon"
4689
+ | "Common"
4690
+ | "Very Common"
4691
+ | "Unknown";
4692
+
4677
4693
  export type Parameters = string;
4678
4694
 
4679
4695
  export type ReviveSetting =
@@ -4777,6 +4793,36 @@ export type TornItemWeaponCategoryEnum =
4777
4793
  | "Primary"
4778
4794
  | "Temporary";
4779
4795
 
4796
+ export type MedalTypeEnum =
4797
+ | "combat"
4798
+ | "commitment"
4799
+ | "crime"
4800
+ | "level"
4801
+ | "miscellaneous"
4802
+ | "networth"
4803
+ | "rank";
4804
+
4805
+ export type HonorTypeEnum =
4806
+ | "attacking"
4807
+ | "camo"
4808
+ | "weapons"
4809
+ | "education"
4810
+ | "crimes"
4811
+ | "drugs"
4812
+ | "jail"
4813
+ | "hospital"
4814
+ | "travel"
4815
+ | "gym"
4816
+ | "level"
4817
+ | "competitions"
4818
+ | "money"
4819
+ | "items"
4820
+ | "commitment"
4821
+ | "casino"
4822
+ | "missions"
4823
+ | "misc"
4824
+ | "default";
4825
+
4780
4826
  export type TornItemTypeEnum =
4781
4827
  | "Alcohol"
4782
4828
  | "Armor"
@@ -5654,13 +5700,48 @@ export interface UserListResponse {
5654
5700
  _metadata: RequestMetadataWithLinks;
5655
5701
  }
5656
5702
 
5657
- /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','log','medals','merits','messages','missions','networth','newevents','newmessages','notifications','perks','profile','refills','stocks','travel','weaponexp'. */
5703
+ /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','icons','inventory','messages','missions','networth','newevents','newmessages','notifications','perks','profile','refills','stocks','travel','weaponexp'. */
5658
5704
  export type UserSelectionName = string;
5659
5705
 
5660
5706
  export interface UserLookupResponse {
5661
5707
  selections: UserSelectionName[];
5662
5708
  }
5663
5709
 
5710
+ export interface UserHonor {
5711
+ id: HonorId;
5712
+ timestamp: number;
5713
+ }
5714
+
5715
+ export interface UserHonorsResponse {
5716
+ honors: UserHonor[];
5717
+ }
5718
+
5719
+ export interface UserMedal {
5720
+ id: MedalId;
5721
+ timestamp: number;
5722
+ }
5723
+
5724
+ export interface UserMedalsResponse {
5725
+ medals: UserMedal[];
5726
+ }
5727
+
5728
+ export interface UserMeritUpgrade {
5729
+ id: MeritId;
5730
+ level: number;
5731
+ }
5732
+
5733
+ export interface UserMerits {
5734
+ upgrades: UserMeritUpgrade[];
5735
+ available: number;
5736
+ used: number;
5737
+ medals: number;
5738
+ honors: number;
5739
+ }
5740
+
5741
+ export interface UserMeritsResponse {
5742
+ merits: UserMerits;
5743
+ }
5744
+
5664
5745
  export interface PersonalStatsOther {
5665
5746
  other: {
5666
5747
  activity: {
@@ -7835,6 +7916,50 @@ export interface PropertyLookupResponse {
7835
7916
  selections: PropertySelectionName[];
7836
7917
  }
7837
7918
 
7919
+ export interface TornMerit {
7920
+ id: MeritId;
7921
+ name: string;
7922
+ description: string;
7923
+ }
7924
+
7925
+ export interface TornMeritsResponse {
7926
+ merits: TornMerit[];
7927
+ }
7928
+
7929
+ /** Properties 'circulation', 'equipped' & 'rarity' are only populated for honors which do not have type.id value 1. */
7930
+ export interface TornHonor {
7931
+ id: HonorId;
7932
+ name: string;
7933
+ description: string;
7934
+ type: {
7935
+ id: number;
7936
+ title: HonorTypeEnum;
7937
+ };
7938
+ circulation?: number;
7939
+ equipped?: number;
7940
+ rarity?: HonorRarityEnum;
7941
+ }
7942
+
7943
+ export interface TornHonorsResponse {
7944
+ honors: TornHonor[];
7945
+ }
7946
+
7947
+ export interface TornMedal {
7948
+ id: MedalId;
7949
+ name: string;
7950
+ description: string;
7951
+ type: {
7952
+ id: string;
7953
+ title: MedalTypeEnum;
7954
+ };
7955
+ circulation: number;
7956
+ rarity: HonorRarityEnum;
7957
+ }
7958
+
7959
+ export interface TornMedalsResponse {
7960
+ medals: TornMedal[];
7961
+ }
7962
+
7838
7963
  export interface TornOrganizedCrimeResponse {
7839
7964
  organizedcrimes: TornOrganizedCrime[];
7840
7965
  }
@@ -8223,7 +8348,7 @@ export interface TornFactionTreeResponse {
8223
8348
  }
8224
8349
 
8225
8350
  /**
8226
- * The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.
8351
+ * The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','itemdetails','itemstats','organisedcrimes','pawnshop','pokertables','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.
8227
8352
  * * The following selections are not available in API v2: 'dirtybombs','raidreport','raids', 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.
8228
8353
  */
8229
8354
  export type TornSelectionName = string;
@@ -11619,6 +11744,10 @@ export interface UserV2 extends BaseSchema {
11619
11744
  response: UserHofResponse;
11620
11745
  params: "timestamp";
11621
11746
  };
11747
+ honors: {
11748
+ response: UserHonorsResponse;
11749
+ params: "timestamp";
11750
+ };
11622
11751
  itemmarket: {
11623
11752
  response: UserItemMarketResponse;
11624
11753
  params: "offset" | "timestamp";
@@ -11639,6 +11768,14 @@ export interface UserV2 extends BaseSchema {
11639
11768
  response: UserLogsResponse;
11640
11769
  params: "log" | "cat" | "limit" | "to" | "from" | "timestamp";
11641
11770
  };
11771
+ medals: {
11772
+ response: UserMedalsResponse;
11773
+ params: "timestamp";
11774
+ };
11775
+ merits: {
11776
+ response: UserMeritsResponse;
11777
+ params: "timestamp";
11778
+ };
11642
11779
  money: {
11643
11780
  response: UserMoneyResponse;
11644
11781
  params: "timestamp";
@@ -12046,6 +12183,10 @@ export interface TornV2 extends BaseSchema {
12046
12183
  response: TornFactionTreeResponse;
12047
12184
  params: "timestamp";
12048
12185
  };
12186
+ honors: {
12187
+ response: TornHonorsResponse;
12188
+ params: "timestamp";
12189
+ };
12049
12190
  hof: {
12050
12191
  response: TornHofResponse;
12051
12192
  params: "limit" | "offset" | "cat" | "timestamp";
@@ -12070,6 +12211,14 @@ export interface TornV2 extends BaseSchema {
12070
12211
  response: TornLogTypesResponse;
12071
12212
  params: "timestamp";
12072
12213
  };
12214
+ medals: {
12215
+ response: TornMedalsResponse;
12216
+ params: "timestamp";
12217
+ };
12218
+ merits: {
12219
+ response: TornMeritsResponse;
12220
+ params: "timestamp";
12221
+ };
12073
12222
  organizedcrimes: {
12074
12223
  response: TornOrganizedCrimeResponse;
12075
12224
  params: "timestamp";
package/dist/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Torn API",
5
5
  "description": "\n * The development of Torn's API v2 is still ongoing.\n * If selections remain unaltered, they will default to the API v1 version.\n * Unlike API v1, API v2 accepts both selections and IDs as path and query parameters.\n * If any discrepancies or errors are found, please submit a [bug report](https://www.torn.com/forums.php#/p=forums&f=19&b=0&a=0) on the Torn Forums.\n * In case you're using bots to check for changes on openapi.json file, make sure to specificy a custom user-agent header - CloudFlare sometimes prevents requests from default user-agents.",
6
- "version": "3.0.9"
6
+ "version": "3.0.10"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -976,6 +976,45 @@
976
976
  "x-stability": "Stable"
977
977
  }
978
978
  },
979
+ "/user/honors": {
980
+ "get": {
981
+ "tags": [
982
+ "User"
983
+ ],
984
+ "summary": "Get your achieved honors",
985
+ "description": "Requires minimal access key. <br>",
986
+ "operationId": "03bcd69dc16d287da5a5c1239b1e35ae",
987
+ "parameters": [
988
+ {
989
+ "$ref": "#/components/parameters/ApiTimestamp"
990
+ },
991
+ {
992
+ "$ref": "#/components/parameters/ApiComment"
993
+ },
994
+ {
995
+ "$ref": "#/components/parameters/ApiKeyPublic"
996
+ }
997
+ ],
998
+ "responses": {
999
+ "200": {
1000
+ "description": "Successful operation",
1001
+ "content": {
1002
+ "application/json": {
1003
+ "schema": {
1004
+ "$ref": "#/components/schemas/UserHonorsResponse"
1005
+ }
1006
+ }
1007
+ }
1008
+ }
1009
+ },
1010
+ "security": [
1011
+ {
1012
+ "api_key": []
1013
+ }
1014
+ ],
1015
+ "x-stability": "Stable"
1016
+ }
1017
+ },
979
1018
  "/user/itemmarket": {
980
1019
  "get": {
981
1020
  "tags": [
@@ -1224,6 +1263,84 @@
1224
1263
  "x-stability": "Unstable"
1225
1264
  }
1226
1265
  },
1266
+ "/user/medals": {
1267
+ "get": {
1268
+ "tags": [
1269
+ "User"
1270
+ ],
1271
+ "summary": "Get your achieved medals",
1272
+ "description": "Requires minimal access key. <br>",
1273
+ "operationId": "5c1d150273feb0c553f6cfb96071bf1b",
1274
+ "parameters": [
1275
+ {
1276
+ "$ref": "#/components/parameters/ApiTimestamp"
1277
+ },
1278
+ {
1279
+ "$ref": "#/components/parameters/ApiComment"
1280
+ },
1281
+ {
1282
+ "$ref": "#/components/parameters/ApiKeyPublic"
1283
+ }
1284
+ ],
1285
+ "responses": {
1286
+ "200": {
1287
+ "description": "Successful operation",
1288
+ "content": {
1289
+ "application/json": {
1290
+ "schema": {
1291
+ "$ref": "#/components/schemas/UserMedalsResponse"
1292
+ }
1293
+ }
1294
+ }
1295
+ }
1296
+ },
1297
+ "security": [
1298
+ {
1299
+ "api_key": []
1300
+ }
1301
+ ],
1302
+ "x-stability": "Stable"
1303
+ }
1304
+ },
1305
+ "/user/merits": {
1306
+ "get": {
1307
+ "tags": [
1308
+ "User"
1309
+ ],
1310
+ "summary": "Get your merits",
1311
+ "description": "Requires minimal access key. <br>",
1312
+ "operationId": "af17d832a1ff8c1d327f262886b39fec",
1313
+ "parameters": [
1314
+ {
1315
+ "$ref": "#/components/parameters/ApiTimestamp"
1316
+ },
1317
+ {
1318
+ "$ref": "#/components/parameters/ApiComment"
1319
+ },
1320
+ {
1321
+ "$ref": "#/components/parameters/ApiKeyPublic"
1322
+ }
1323
+ ],
1324
+ "responses": {
1325
+ "200": {
1326
+ "description": "Successful operation",
1327
+ "content": {
1328
+ "application/json": {
1329
+ "schema": {
1330
+ "$ref": "#/components/schemas/UserMeritsResponse"
1331
+ }
1332
+ }
1333
+ }
1334
+ }
1335
+ },
1336
+ "security": [
1337
+ {
1338
+ "api_key": []
1339
+ }
1340
+ ],
1341
+ "x-stability": "Stable"
1342
+ }
1343
+ },
1227
1344
  "/user/money": {
1228
1345
  "get": {
1229
1346
  "tags": [
@@ -6830,6 +6947,98 @@
6830
6947
  "x-stability": "Unstable"
6831
6948
  }
6832
6949
  },
6950
+ "/torn/honors": {
6951
+ "get": {
6952
+ "tags": [
6953
+ "Torn"
6954
+ ],
6955
+ "summary": "Get all honors",
6956
+ "description": "Requires public access key. <br>",
6957
+ "operationId": "4b7322594732b4e263f2e612f648e6a4",
6958
+ "parameters": [
6959
+ {
6960
+ "$ref": "#/components/parameters/ApiTimestamp"
6961
+ },
6962
+ {
6963
+ "$ref": "#/components/parameters/ApiComment"
6964
+ },
6965
+ {
6966
+ "$ref": "#/components/parameters/ApiKeyPublic"
6967
+ }
6968
+ ],
6969
+ "responses": {
6970
+ "200": {
6971
+ "description": "Successful operation",
6972
+ "content": {
6973
+ "application/json": {
6974
+ "schema": {
6975
+ "$ref": "#/components/schemas/TornHonorsResponse"
6976
+ }
6977
+ }
6978
+ }
6979
+ }
6980
+ },
6981
+ "security": [
6982
+ {
6983
+ "api_key": []
6984
+ }
6985
+ ],
6986
+ "x-stability": "Stable"
6987
+ }
6988
+ },
6989
+ "/torn/{ids}/honors": {
6990
+ "get": {
6991
+ "tags": [
6992
+ "Torn"
6993
+ ],
6994
+ "summary": "Get specific honors",
6995
+ "description": "Requires public access key. <br>",
6996
+ "operationId": "bdbbefa4dc1cd7f146f500816ccbec1a",
6997
+ "parameters": [
6998
+ {
6999
+ "name": "ids",
7000
+ "in": "path",
7001
+ "description": "Honor id or a list of honor ids (comma separated)",
7002
+ "required": true,
7003
+ "style": "form",
7004
+ "explode": false,
7005
+ "schema": {
7006
+ "type": "array",
7007
+ "items": {
7008
+ "$ref": "#/components/schemas/HonorId"
7009
+ }
7010
+ }
7011
+ },
7012
+ {
7013
+ "$ref": "#/components/parameters/ApiTimestamp"
7014
+ },
7015
+ {
7016
+ "$ref": "#/components/parameters/ApiComment"
7017
+ },
7018
+ {
7019
+ "$ref": "#/components/parameters/ApiKeyPublic"
7020
+ }
7021
+ ],
7022
+ "responses": {
7023
+ "200": {
7024
+ "description": "Successful operation",
7025
+ "content": {
7026
+ "application/json": {
7027
+ "schema": {
7028
+ "$ref": "#/components/schemas/TornHonorsResponse"
7029
+ }
7030
+ }
7031
+ }
7032
+ }
7033
+ },
7034
+ "security": [
7035
+ {
7036
+ "api_key": []
7037
+ }
7038
+ ],
7039
+ "x-stability": "Stable"
7040
+ }
7041
+ },
6833
7042
  "/torn/hof": {
6834
7043
  "get": {
6835
7044
  "tags": [
@@ -7195,6 +7404,137 @@
7195
7404
  "x-stability": "Stable"
7196
7405
  }
7197
7406
  },
7407
+ "/torn/medals": {
7408
+ "get": {
7409
+ "tags": [
7410
+ "Torn"
7411
+ ],
7412
+ "summary": "Get all medals",
7413
+ "description": "Requires public access key. <br>",
7414
+ "operationId": "c6e00a242c309a53a98852b225de5e0b",
7415
+ "parameters": [
7416
+ {
7417
+ "$ref": "#/components/parameters/ApiTimestamp"
7418
+ },
7419
+ {
7420
+ "$ref": "#/components/parameters/ApiComment"
7421
+ },
7422
+ {
7423
+ "$ref": "#/components/parameters/ApiKeyPublic"
7424
+ }
7425
+ ],
7426
+ "responses": {
7427
+ "200": {
7428
+ "description": "Successful operation",
7429
+ "content": {
7430
+ "application/json": {
7431
+ "schema": {
7432
+ "$ref": "#/components/schemas/TornMedalsResponse"
7433
+ }
7434
+ }
7435
+ }
7436
+ }
7437
+ },
7438
+ "security": [
7439
+ {
7440
+ "api_key": []
7441
+ }
7442
+ ],
7443
+ "x-stability": "Stable"
7444
+ }
7445
+ },
7446
+ "/torn/{ids}/medals": {
7447
+ "get": {
7448
+ "tags": [
7449
+ "Torn"
7450
+ ],
7451
+ "summary": "Get specific medals",
7452
+ "description": "Requires public access key. <br>",
7453
+ "operationId": "a2f817c8fb95707aa71a7b28bed08a56",
7454
+ "parameters": [
7455
+ {
7456
+ "name": "ids",
7457
+ "in": "path",
7458
+ "description": "Medal id or a list of medal ids (comma separated)",
7459
+ "required": true,
7460
+ "style": "form",
7461
+ "explode": false,
7462
+ "schema": {
7463
+ "type": "array",
7464
+ "items": {
7465
+ "$ref": "#/components/schemas/MedalId"
7466
+ }
7467
+ }
7468
+ },
7469
+ {
7470
+ "$ref": "#/components/parameters/ApiTimestamp"
7471
+ },
7472
+ {
7473
+ "$ref": "#/components/parameters/ApiComment"
7474
+ },
7475
+ {
7476
+ "$ref": "#/components/parameters/ApiKeyPublic"
7477
+ }
7478
+ ],
7479
+ "responses": {
7480
+ "200": {
7481
+ "description": "Successful operation",
7482
+ "content": {
7483
+ "application/json": {
7484
+ "schema": {
7485
+ "$ref": "#/components/schemas/TornMedalsResponse"
7486
+ }
7487
+ }
7488
+ }
7489
+ }
7490
+ },
7491
+ "security": [
7492
+ {
7493
+ "api_key": []
7494
+ }
7495
+ ],
7496
+ "x-stability": "Stable"
7497
+ }
7498
+ },
7499
+ "/torn/merits": {
7500
+ "get": {
7501
+ "tags": [
7502
+ "Torn"
7503
+ ],
7504
+ "summary": "Get all merits",
7505
+ "description": "Requires public access key. <br>",
7506
+ "operationId": "06198712e3cfdee6b3d5ea11fb6754ef",
7507
+ "parameters": [
7508
+ {
7509
+ "$ref": "#/components/parameters/ApiTimestamp"
7510
+ },
7511
+ {
7512
+ "$ref": "#/components/parameters/ApiComment"
7513
+ },
7514
+ {
7515
+ "$ref": "#/components/parameters/ApiKeyPublic"
7516
+ }
7517
+ ],
7518
+ "responses": {
7519
+ "200": {
7520
+ "description": "Successful operation",
7521
+ "content": {
7522
+ "application/json": {
7523
+ "schema": {
7524
+ "$ref": "#/components/schemas/TornMeritsResponse"
7525
+ }
7526
+ }
7527
+ }
7528
+ }
7529
+ },
7530
+ "security": [
7531
+ {
7532
+ "api_key": []
7533
+ }
7534
+ ],
7535
+ "x-stability": "Stable"
7536
+ }
7537
+ },
7198
7538
  "/torn/organizedcrimes": {
7199
7539
  "get": {
7200
7540
  "tags": [
@@ -12358,6 +12698,18 @@
12358
12698
  "type": "integer",
12359
12699
  "format": "int32"
12360
12700
  },
12701
+ "HonorId": {
12702
+ "type": "integer",
12703
+ "format": "int32"
12704
+ },
12705
+ "MedalId": {
12706
+ "type": "integer",
12707
+ "format": "int32"
12708
+ },
12709
+ "MeritId": {
12710
+ "type": "integer",
12711
+ "format": "int32"
12712
+ },
12361
12713
  "OrganizedCrimeName": {
12362
12714
  "type": "string"
12363
12715
  },
@@ -12573,6 +12925,19 @@
12573
12925
  "Enby"
12574
12926
  ]
12575
12927
  },
12928
+ "HonorRarityEnum": {
12929
+ "type": "string",
12930
+ "enum": [
12931
+ "Extremely Rare",
12932
+ "Very Rare",
12933
+ "Rare",
12934
+ "Limited",
12935
+ "Uncommon",
12936
+ "Common",
12937
+ "Very Common",
12938
+ "Unknown"
12939
+ ]
12940
+ },
12576
12941
  "Parameters": {
12577
12942
  "oneOf": [
12578
12943
  {
@@ -12709,13 +13074,49 @@
12709
13074
  "Mechanical"
12710
13075
  ]
12711
13076
  },
12712
- "TornItemWeaponCategoryEnum": {
13077
+ "TornItemWeaponCategoryEnum": {
13078
+ "type": "string",
13079
+ "enum": [
13080
+ "Melee",
13081
+ "Secondary",
13082
+ "Primary",
13083
+ "Temporary"
13084
+ ]
13085
+ },
13086
+ "MedalTypeEnum": {
13087
+ "type": "string",
13088
+ "enum": [
13089
+ "combat",
13090
+ "commitment",
13091
+ "crime",
13092
+ "level",
13093
+ "miscellaneous",
13094
+ "networth",
13095
+ "rank"
13096
+ ]
13097
+ },
13098
+ "HonorTypeEnum": {
12713
13099
  "type": "string",
12714
13100
  "enum": [
12715
- "Melee",
12716
- "Secondary",
12717
- "Primary",
12718
- "Temporary"
13101
+ "attacking",
13102
+ "camo",
13103
+ "weapons",
13104
+ "education",
13105
+ "crimes",
13106
+ "drugs",
13107
+ "jail",
13108
+ "hospital",
13109
+ "travel",
13110
+ "gym",
13111
+ "level",
13112
+ "competitions",
13113
+ "money",
13114
+ "items",
13115
+ "commitment",
13116
+ "casino",
13117
+ "missions",
13118
+ "misc",
13119
+ "default"
12719
13120
  ]
12720
13121
  },
12721
13122
  "TornItemTypeEnum": {
@@ -16103,7 +16504,7 @@
16103
16504
  "UserSelectionName": {
16104
16505
  "oneOf": [
16105
16506
  {
16106
- "description": "The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','log','medals','merits','messages','missions','networth','newevents','newmessages','notifications','perks','profile','refills','stocks','travel','weaponexp'.",
16507
+ "description": "The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','icons','inventory','messages','missions','networth','newevents','newmessages','notifications','perks','profile','refills','stocks','travel','weaponexp'.",
16107
16508
  "type": "string",
16108
16509
  "enum": [
16109
16510
  "attacks",
@@ -16121,11 +16522,15 @@
16121
16522
  "forumsubscribedthreads",
16122
16523
  "forumthreads",
16123
16524
  "hof",
16525
+ "honors",
16124
16526
  "itemmarket",
16125
16527
  "jobpoints",
16126
16528
  "jobranks",
16127
16529
  "list",
16530
+ "log",
16128
16531
  "lookup",
16532
+ "medals",
16533
+ "merits",
16129
16534
  "money",
16130
16535
  "organizedcrime",
16131
16536
  "personalstats",
@@ -16150,12 +16555,8 @@
16150
16555
  "equipment",
16151
16556
  "events",
16152
16557
  "gym",
16153
- "honors",
16154
16558
  "icons",
16155
16559
  "inventory",
16156
- "log",
16157
- "medals",
16158
- "merits",
16159
16560
  "messages",
16160
16561
  "missions",
16161
16562
  "networth",
@@ -16189,6 +16590,127 @@
16189
16590
  },
16190
16591
  "type": "object"
16191
16592
  },
16593
+ "UserHonor": {
16594
+ "required": [
16595
+ "id",
16596
+ "timestamp"
16597
+ ],
16598
+ "properties": {
16599
+ "id": {
16600
+ "$ref": "#/components/schemas/HonorId"
16601
+ },
16602
+ "timestamp": {
16603
+ "type": "integer",
16604
+ "format": "int32"
16605
+ }
16606
+ },
16607
+ "type": "object"
16608
+ },
16609
+ "UserHonorsResponse": {
16610
+ "required": [
16611
+ "honors"
16612
+ ],
16613
+ "properties": {
16614
+ "honors": {
16615
+ "type": "array",
16616
+ "items": {
16617
+ "$ref": "#/components/schemas/UserHonor"
16618
+ }
16619
+ }
16620
+ },
16621
+ "type": "object"
16622
+ },
16623
+ "UserMedal": {
16624
+ "required": [
16625
+ "id",
16626
+ "timestamp"
16627
+ ],
16628
+ "properties": {
16629
+ "id": {
16630
+ "$ref": "#/components/schemas/MedalId"
16631
+ },
16632
+ "timestamp": {
16633
+ "type": "integer",
16634
+ "format": "int32"
16635
+ }
16636
+ },
16637
+ "type": "object"
16638
+ },
16639
+ "UserMedalsResponse": {
16640
+ "required": [
16641
+ "medals"
16642
+ ],
16643
+ "properties": {
16644
+ "medals": {
16645
+ "type": "array",
16646
+ "items": {
16647
+ "$ref": "#/components/schemas/UserMedal"
16648
+ }
16649
+ }
16650
+ },
16651
+ "type": "object"
16652
+ },
16653
+ "UserMeritUpgrade": {
16654
+ "required": [
16655
+ "id",
16656
+ "level"
16657
+ ],
16658
+ "properties": {
16659
+ "id": {
16660
+ "$ref": "#/components/schemas/MeritId"
16661
+ },
16662
+ "level": {
16663
+ "type": "integer",
16664
+ "format": "int32"
16665
+ }
16666
+ },
16667
+ "type": "object"
16668
+ },
16669
+ "UserMerits": {
16670
+ "required": [
16671
+ "upgrades",
16672
+ "available",
16673
+ "used",
16674
+ "medals",
16675
+ "honors"
16676
+ ],
16677
+ "properties": {
16678
+ "upgrades": {
16679
+ "type": "array",
16680
+ "items": {
16681
+ "$ref": "#/components/schemas/UserMeritUpgrade"
16682
+ }
16683
+ },
16684
+ "available": {
16685
+ "type": "integer",
16686
+ "format": "int32"
16687
+ },
16688
+ "used": {
16689
+ "type": "integer",
16690
+ "format": "int32"
16691
+ },
16692
+ "medals": {
16693
+ "type": "integer",
16694
+ "format": "int32"
16695
+ },
16696
+ "honors": {
16697
+ "type": "integer",
16698
+ "format": "int32"
16699
+ }
16700
+ },
16701
+ "type": "object"
16702
+ },
16703
+ "UserMeritsResponse": {
16704
+ "required": [
16705
+ "merits"
16706
+ ],
16707
+ "properties": {
16708
+ "merits": {
16709
+ "$ref": "#/components/schemas/UserMerits"
16710
+ }
16711
+ },
16712
+ "type": "object"
16713
+ },
16192
16714
  "PersonalStatsOther": {
16193
16715
  "required": [
16194
16716
  "other"
@@ -24498,6 +25020,160 @@
24498
25020
  },
24499
25021
  "type": "object"
24500
25022
  },
25023
+ "TornMerit": {
25024
+ "required": [
25025
+ "id",
25026
+ "name",
25027
+ "description"
25028
+ ],
25029
+ "properties": {
25030
+ "id": {
25031
+ "$ref": "#/components/schemas/MeritId"
25032
+ },
25033
+ "name": {
25034
+ "type": "string"
25035
+ },
25036
+ "description": {
25037
+ "type": "string"
25038
+ }
25039
+ },
25040
+ "type": "object"
25041
+ },
25042
+ "TornMeritsResponse": {
25043
+ "required": [
25044
+ "merits"
25045
+ ],
25046
+ "properties": {
25047
+ "merits": {
25048
+ "type": "array",
25049
+ "items": {
25050
+ "$ref": "#/components/schemas/TornMerit"
25051
+ }
25052
+ }
25053
+ },
25054
+ "type": "object"
25055
+ },
25056
+ "TornHonor": {
25057
+ "description": "Properties 'circulation', 'equipped' & 'rarity' are only populated for honors which do not have type.id value 1.",
25058
+ "required": [
25059
+ "id",
25060
+ "name",
25061
+ "description",
25062
+ "type"
25063
+ ],
25064
+ "properties": {
25065
+ "id": {
25066
+ "$ref": "#/components/schemas/HonorId"
25067
+ },
25068
+ "name": {
25069
+ "type": "string"
25070
+ },
25071
+ "description": {
25072
+ "type": "string"
25073
+ },
25074
+ "type": {
25075
+ "required": [
25076
+ "id",
25077
+ "title"
25078
+ ],
25079
+ "properties": {
25080
+ "id": {
25081
+ "type": "integer",
25082
+ "format": "int32"
25083
+ },
25084
+ "title": {
25085
+ "$ref": "#/components/schemas/HonorTypeEnum"
25086
+ }
25087
+ },
25088
+ "type": "object"
25089
+ },
25090
+ "circulation": {
25091
+ "type": "integer",
25092
+ "format": "int32"
25093
+ },
25094
+ "equipped": {
25095
+ "type": "integer",
25096
+ "format": "int32"
25097
+ },
25098
+ "rarity": {
25099
+ "$ref": "#/components/schemas/HonorRarityEnum"
25100
+ }
25101
+ },
25102
+ "type": "object"
25103
+ },
25104
+ "TornHonorsResponse": {
25105
+ "required": [
25106
+ "honors"
25107
+ ],
25108
+ "properties": {
25109
+ "honors": {
25110
+ "type": "array",
25111
+ "items": {
25112
+ "$ref": "#/components/schemas/TornHonor"
25113
+ }
25114
+ }
25115
+ },
25116
+ "type": "object"
25117
+ },
25118
+ "TornMedal": {
25119
+ "required": [
25120
+ "id",
25121
+ "name",
25122
+ "description",
25123
+ "type",
25124
+ "circulation",
25125
+ "equipped",
25126
+ "rarity"
25127
+ ],
25128
+ "properties": {
25129
+ "id": {
25130
+ "$ref": "#/components/schemas/MedalId"
25131
+ },
25132
+ "name": {
25133
+ "type": "string"
25134
+ },
25135
+ "description": {
25136
+ "type": "string"
25137
+ },
25138
+ "type": {
25139
+ "required": [
25140
+ "id",
25141
+ "title"
25142
+ ],
25143
+ "properties": {
25144
+ "id": {
25145
+ "type": "string"
25146
+ },
25147
+ "title": {
25148
+ "$ref": "#/components/schemas/MedalTypeEnum"
25149
+ }
25150
+ },
25151
+ "type": "object"
25152
+ },
25153
+ "circulation": {
25154
+ "type": "integer",
25155
+ "format": "int32"
25156
+ },
25157
+ "rarity": {
25158
+ "$ref": "#/components/schemas/HonorRarityEnum"
25159
+ }
25160
+ },
25161
+ "type": "object"
25162
+ },
25163
+ "TornMedalsResponse": {
25164
+ "required": [
25165
+ "medals"
25166
+ ],
25167
+ "properties": {
25168
+ "medals": {
25169
+ "type": "array",
25170
+ "items": {
25171
+ "$ref": "#/components/schemas/TornMedal"
25172
+ }
25173
+ }
25174
+ },
25175
+ "type": "object"
25176
+ },
24501
25177
  "TornOrganizedCrimeResponse": {
24502
25178
  "required": [
24503
25179
  "organizedcrimes"
@@ -26151,7 +26827,7 @@
26151
26827
  "TornSelectionName": {
26152
26828
  "oneOf": [
26153
26829
  {
26154
- "description": "The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.\n * The following selections are not available in API v2: 'dirtybombs','raidreport','raids', 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.",
26830
+ "description": "The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','itemdetails','itemstats','organisedcrimes','pawnshop','pokertables','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.\n * The following selections are not available in API v2: 'dirtybombs','raidreport','raids', 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.",
26155
26831
  "type": "string",
26156
26832
  "enum": [
26157
26833
  "attacklog",
@@ -26162,12 +26838,15 @@
26162
26838
  "factionhof",
26163
26839
  "factiontree",
26164
26840
  "hof",
26841
+ "honors",
26165
26842
  "itemammo",
26166
26843
  "itemmods",
26167
26844
  "items",
26168
26845
  "logcategories",
26169
26846
  "logtypes",
26170
26847
  "lookup",
26848
+ "medals",
26849
+ "merits",
26171
26850
  "organizedcrimes",
26172
26851
  "properties",
26173
26852
  "subcrimes",
@@ -26179,10 +26858,8 @@
26179
26858
  "companies",
26180
26859
  "competition",
26181
26860
  "gyms",
26182
- "honors",
26183
26861
  "itemdetails",
26184
26862
  "itemstats",
26185
- "medals",
26186
26863
  "organisedcrimes",
26187
26864
  "pawnshop",
26188
26865
  "pokertables",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "3.0.9",
4
+ "version": "3.0.10",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@scalar/openapi-types": "^0.3.7",
10
- "@types/node": "^22.17.2",
10
+ "@types/node": "^22.18.0",
11
11
  "prettier": "^3.6.2",
12
12
  "typeconv": "^2.3.1",
13
13
  "typescript": "^5.9.2"