tornapi-typescript 4.5.0 → 4.7.0

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
@@ -78,6 +78,8 @@ export type TerritoryWarId = number;
78
78
  export type RaidWarId = number;
79
79
  export type ItemUid = number;
80
80
  export type UserId = number;
81
+ export type DiscordId = string;
82
+ export type UserDiscordPathId = UserId | DiscordId;
81
83
  export type UserMessageId = number;
82
84
  export type UserEventId = string;
83
85
  export type UserIconId = number;
@@ -358,6 +360,25 @@ export interface ReportsResponse {
358
360
  _metadata: RequestMetadataWithLinks;
359
361
  }
360
362
  export type SelectionCategoryEnum = ReportTypeEnum | UserListEnum | PersonalStatsCategoryEnum | RacingRaceTypeEnum;
363
+ export type UserEquipment = TornItemDetails & {
364
+ slot: number;
365
+ };
366
+ export interface UserClothing {
367
+ id: ItemId;
368
+ name: string;
369
+ uid: ItemUid;
370
+ type: TornItemTypeEnum;
371
+ }
372
+ export interface UserEquipmentResponse {
373
+ equipment: UserEquipment[];
374
+ clothing: UserClothing[];
375
+ }
376
+ export interface UserDiscordResponse {
377
+ discord: {
378
+ discord_id: DiscordId;
379
+ user_id: UserId;
380
+ };
381
+ }
361
382
  export interface UserWeaponExpResponse {
362
383
  weaponexp: UserWeaponExp[];
363
384
  }
@@ -1085,7 +1106,7 @@ export interface UserListResponse {
1085
1106
  list: UserList[];
1086
1107
  _metadata: RequestMetadataWithLinks;
1087
1108
  }
1088
- /** The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','discord','display','equipment','gym','inventory','networth','perks','stocks'. */
1109
+ /** The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','display','gym','inventory','networth','perks','stocks'. */
1089
1110
  export type UserSelectionName = string;
1090
1111
  export interface UserLookupResponse {
1091
1112
  selections: UserSelectionName[];
@@ -2785,6 +2806,15 @@ export type PropertySelectionName = string;
2785
2806
  export interface PropertyLookupResponse {
2786
2807
  selections: PropertySelectionName[];
2787
2808
  }
2809
+ export interface TornItemDetails extends ItemMarketListingItemDetails {
2810
+ id: ItemId;
2811
+ name: string;
2812
+ type: TornItemTypeEnum;
2813
+ sub_type: TornItemWeaponTypeEnum | null;
2814
+ }
2815
+ export interface TornItemDetailsResponse {
2816
+ itemdetails: TornItemDetails;
2817
+ }
2788
2818
  export interface TornMerit {
2789
2819
  id: MeritId;
2790
2820
  name: string;
@@ -6476,6 +6506,10 @@ export interface UserV2 extends BaseSchema {
6476
6506
  response: UserCrimesResponse;
6477
6507
  params: "crimeId" | "timestamp";
6478
6508
  };
6509
+ discord: {
6510
+ response: UserDiscordResponse;
6511
+ params: "timestamp";
6512
+ };
6479
6513
  education: {
6480
6514
  response: UserEducationResponse;
6481
6515
  params: "timestamp";
@@ -6484,6 +6518,10 @@ export interface UserV2 extends BaseSchema {
6484
6518
  response: UserEnlistedCarsResponse;
6485
6519
  params: "timestamp";
6486
6520
  };
6521
+ equipment: {
6522
+ response: UserEquipmentResponse;
6523
+ params: "timestamp";
6524
+ };
6487
6525
  events: {
6488
6526
  response: UserEventsResponse;
6489
6527
  params: "striptags" | "limit" | "from" | "to" | "timestamp";
@@ -6960,6 +6998,10 @@ export interface TornV2 extends BaseSchema {
6960
6998
  response: TornItemAmmoResponse;
6961
6999
  params: "timestamp";
6962
7000
  };
7001
+ itemdetails: {
7002
+ response: TornItemDetailsResponse;
7003
+ params: "timestamp";
7004
+ };
6963
7005
  itemmods: {
6964
7006
  response: TornItemModsResponse;
6965
7007
  params: "timestamp";
package/dist/index.ts CHANGED
@@ -4771,6 +4771,10 @@ export type ItemUid = number;
4771
4771
 
4772
4772
  export type UserId = number;
4773
4773
 
4774
+ export type DiscordId = string;
4775
+
4776
+ export type UserDiscordPathId = UserId | DiscordId;
4777
+
4774
4778
  export type UserMessageId = number;
4775
4779
 
4776
4780
  export type UserEventId = string;
@@ -5319,6 +5323,29 @@ export type SelectionCategoryEnum =
5319
5323
  | PersonalStatsCategoryEnum
5320
5324
  | RacingRaceTypeEnum;
5321
5325
 
5326
+ export type UserEquipment = TornItemDetails & {
5327
+ slot: number;
5328
+ };
5329
+
5330
+ export interface UserClothing {
5331
+ id: ItemId;
5332
+ name: string;
5333
+ uid: ItemUid;
5334
+ type: TornItemTypeEnum;
5335
+ }
5336
+
5337
+ export interface UserEquipmentResponse {
5338
+ equipment: UserEquipment[];
5339
+ clothing: UserClothing[];
5340
+ }
5341
+
5342
+ export interface UserDiscordResponse {
5343
+ discord: {
5344
+ discord_id: DiscordId;
5345
+ user_id: UserId;
5346
+ };
5347
+ }
5348
+
5322
5349
  export interface UserWeaponExpResponse {
5323
5350
  weaponexp: UserWeaponExp[];
5324
5351
  }
@@ -5773,8 +5800,7 @@ export interface UserPropertyDetailsExtended extends UserPropertyBasicDetails {
5773
5800
  status: "none" | "in_use";
5774
5801
  }
5775
5802
 
5776
- export interface UserPropertyDetailsExtendedWithRent
5777
- extends UserPropertyBasicDetails {
5803
+ export interface UserPropertyDetailsExtendedWithRent extends UserPropertyBasicDetails {
5778
5804
  used_by: BasicUser[];
5779
5805
  status: "none" | "in_use";
5780
5806
  rented_by?: BasicUser;
@@ -5784,8 +5810,7 @@ export interface UserPropertyDetails extends UserPropertyBasicDetails {
5784
5810
  used_by: BasicUser[];
5785
5811
  }
5786
5812
 
5787
- export interface UserPropertyDetailsExtendedRented
5788
- extends UserPropertyBasicDetails {
5813
+ export interface UserPropertyDetailsExtendedRented extends UserPropertyBasicDetails {
5789
5814
  used_by: BasicUser[];
5790
5815
  status: "rented";
5791
5816
  cost: number;
@@ -5800,8 +5825,7 @@ export interface UserPropertyDetailsExtendedRented
5800
5825
  } | null;
5801
5826
  }
5802
5827
 
5803
- export interface UserPropertyDetailsExtendedForRent
5804
- extends UserPropertyBasicDetails {
5828
+ export interface UserPropertyDetailsExtendedForRent extends UserPropertyBasicDetails {
5805
5829
  used_by: BasicUser[];
5806
5830
  status: "for_rent";
5807
5831
  cost: number;
@@ -5810,8 +5834,7 @@ export interface UserPropertyDetailsExtendedForRent
5810
5834
  renter_asked?: BasicUser;
5811
5835
  }
5812
5836
 
5813
- export interface UserPropertyDetailsExtendedForSale
5814
- extends UserPropertyBasicDetails {
5837
+ export interface UserPropertyDetailsExtendedForSale extends UserPropertyBasicDetails {
5815
5838
  used_by: BasicUser[];
5816
5839
  status: "for_sale";
5817
5840
  cost: number;
@@ -6186,7 +6209,7 @@ export interface UserListResponse {
6186
6209
  _metadata: RequestMetadataWithLinks;
6187
6210
  }
6188
6211
 
6189
- /** The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','discord','display','equipment','gym','inventory','networth','perks','stocks'. */
6212
+ /** The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','display','gym','inventory','networth','perks','stocks'. */
6190
6213
  export type UserSelectionName = string;
6191
6214
 
6192
6215
  export interface UserLookupResponse {
@@ -8402,6 +8425,17 @@ export interface PropertyLookupResponse {
8402
8425
  selections: PropertySelectionName[];
8403
8426
  }
8404
8427
 
8428
+ export interface TornItemDetails extends ItemMarketListingItemDetails {
8429
+ id: ItemId;
8430
+ name: string;
8431
+ type: TornItemTypeEnum;
8432
+ sub_type: TornItemWeaponTypeEnum | null;
8433
+ }
8434
+
8435
+ export interface TornItemDetailsResponse {
8436
+ itemdetails: TornItemDetails;
8437
+ }
8438
+
8405
8439
  export interface TornMerit {
8406
8440
  id: MeritId;
8407
8441
  name: string;
@@ -8679,7 +8713,7 @@ export interface Bounty {
8679
8713
  export interface AttackLogSummary {
8680
8714
  id: UserId | null;
8681
8715
  name: /** Name of the participant, could be null in stealthed attacks. */
8682
- string | null;
8716
+ string | null;
8683
8717
  hits: number;
8684
8718
  misses: number;
8685
8719
  damage: number;
@@ -12216,6 +12250,10 @@ export interface UserV2 extends BaseSchema {
12216
12250
  response: UserCrimesResponse;
12217
12251
  params: "crimeId" | "timestamp";
12218
12252
  };
12253
+ discord: {
12254
+ response: UserDiscordResponse;
12255
+ params: "timestamp";
12256
+ };
12219
12257
  education: {
12220
12258
  response: UserEducationResponse;
12221
12259
  params: "timestamp";
@@ -12224,6 +12262,10 @@ export interface UserV2 extends BaseSchema {
12224
12262
  response: UserEnlistedCarsResponse;
12225
12263
  params: "timestamp";
12226
12264
  };
12265
+ equipment: {
12266
+ response: UserEquipmentResponse;
12267
+ params: "timestamp";
12268
+ };
12227
12269
  events: {
12228
12270
  response: UserEventsResponse;
12229
12271
  params: "striptags" | "limit" | "from" | "to" | "timestamp";
@@ -12778,6 +12820,10 @@ export interface TornV2 extends BaseSchema {
12778
12820
  response: TornItemAmmoResponse;
12779
12821
  params: "timestamp";
12780
12822
  };
12823
+ itemdetails: {
12824
+ response: TornItemDetailsResponse;
12825
+ params: "timestamp";
12826
+ };
12781
12827
  itemmods: {
12782
12828
  response: TornItemModsResponse;
12783
12829
  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": "4.5.0"
6
+ "version": "4.7.0"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -18,7 +18,7 @@
18
18
  "User"
19
19
  ],
20
20
  "summary": "Get your ammo information",
21
- "description": "Requires public minimal key. <br>",
21
+ "description": "Requires minimal key. <br>",
22
22
  "operationId": "39826224a85f3a0dde89080ce7489685",
23
23
  "parameters": [
24
24
  {
@@ -252,10 +252,10 @@
252
252
  {
253
253
  "name": "id",
254
254
  "in": "path",
255
- "description": "User id",
255
+ "description": "User id or user discord id",
256
256
  "required": true,
257
257
  "schema": {
258
- "$ref": "#/components/schemas/UserId"
258
+ "$ref": "#/components/schemas/UserDiscordPathId"
259
259
  }
260
260
  },
261
261
  {
@@ -381,10 +381,10 @@
381
381
  {
382
382
  "name": "id",
383
383
  "in": "path",
384
- "description": "User id",
384
+ "description": "User id or user discord id",
385
385
  "required": true,
386
386
  "schema": {
387
- "$ref": "#/components/schemas/UserId"
387
+ "$ref": "#/components/schemas/UserDiscordPathId"
388
388
  }
389
389
  },
390
390
  {
@@ -507,10 +507,10 @@
507
507
  {
508
508
  "name": "id",
509
509
  "in": "path",
510
- "description": "User id",
510
+ "description": "User id or user discord id",
511
511
  "required": true,
512
512
  "schema": {
513
- "$ref": "#/components/schemas/UserId"
513
+ "$ref": "#/components/schemas/UserDiscordPathId"
514
514
  }
515
515
  },
516
516
  {
@@ -630,6 +630,93 @@
630
630
  "x-stability": "Stable"
631
631
  }
632
632
  },
633
+ "/user/discord": {
634
+ "get": {
635
+ "tags": [
636
+ "User"
637
+ ],
638
+ "summary": "Get your discord information",
639
+ "description": "Requires public key. <br>",
640
+ "operationId": "68f0493291a1ad38d42053d861b1bba5",
641
+ "parameters": [
642
+ {
643
+ "$ref": "#/components/parameters/ApiTimestamp"
644
+ },
645
+ {
646
+ "$ref": "#/components/parameters/ApiComment"
647
+ },
648
+ {
649
+ "$ref": "#/components/parameters/ApiKeyPublic"
650
+ }
651
+ ],
652
+ "responses": {
653
+ "200": {
654
+ "description": "Successful operation",
655
+ "content": {
656
+ "application/json": {
657
+ "schema": {
658
+ "$ref": "#/components/schemas/UserDiscordResponse"
659
+ }
660
+ }
661
+ }
662
+ }
663
+ },
664
+ "security": [
665
+ {
666
+ "api_key": []
667
+ }
668
+ ],
669
+ "x-stability": "Unstable"
670
+ }
671
+ },
672
+ "/user/{id}/discord": {
673
+ "get": {
674
+ "tags": [
675
+ "User"
676
+ ],
677
+ "summary": "Get discord information for a specific user",
678
+ "description": "Requires public access key. <br>",
679
+ "operationId": "6bb6623979be4fa4149f0eab3fda3c53",
680
+ "parameters": [
681
+ {
682
+ "name": "id",
683
+ "in": "path",
684
+ "description": "User id or user discord id",
685
+ "required": true,
686
+ "schema": {
687
+ "$ref": "#/components/schemas/UserDiscordPathId"
688
+ }
689
+ },
690
+ {
691
+ "$ref": "#/components/parameters/ApiTimestamp"
692
+ },
693
+ {
694
+ "$ref": "#/components/parameters/ApiComment"
695
+ },
696
+ {
697
+ "$ref": "#/components/parameters/ApiKeyPublic"
698
+ }
699
+ ],
700
+ "responses": {
701
+ "200": {
702
+ "description": "Successful operation",
703
+ "content": {
704
+ "application/json": {
705
+ "schema": {
706
+ "$ref": "#/components/schemas/UserDiscordResponse"
707
+ }
708
+ }
709
+ }
710
+ }
711
+ },
712
+ "security": [
713
+ {
714
+ "api_key": []
715
+ }
716
+ ],
717
+ "x-stability": "Unstable"
718
+ }
719
+ },
633
720
  "/user/education": {
634
721
  "get": {
635
722
  "tags": [
@@ -708,6 +795,45 @@
708
795
  "x-stability": "Stable"
709
796
  }
710
797
  },
798
+ "/user/equipment": {
799
+ "get": {
800
+ "tags": [
801
+ "User"
802
+ ],
803
+ "summary": "Get your equipment & clothing",
804
+ "description": "Requires minimal access key.",
805
+ "operationId": "273c3a96077332793a1b6ffe21c10218",
806
+ "parameters": [
807
+ {
808
+ "$ref": "#/components/parameters/ApiTimestamp"
809
+ },
810
+ {
811
+ "$ref": "#/components/parameters/ApiComment"
812
+ },
813
+ {
814
+ "$ref": "#/components/parameters/ApiKeyMinimal"
815
+ }
816
+ ],
817
+ "responses": {
818
+ "200": {
819
+ "description": "Successful operation",
820
+ "content": {
821
+ "application/json": {
822
+ "schema": {
823
+ "$ref": "#/components/schemas/UserEquipmentResponse"
824
+ }
825
+ }
826
+ }
827
+ }
828
+ },
829
+ "security": [
830
+ {
831
+ "api_key": []
832
+ }
833
+ ],
834
+ "x-stability": "Unstable"
835
+ }
836
+ },
711
837
  "/user/events": {
712
838
  "get": {
713
839
  "tags": [
@@ -810,10 +936,10 @@
810
936
  {
811
937
  "name": "id",
812
938
  "in": "path",
813
- "description": "User id",
939
+ "description": "User id or user discord id",
814
940
  "required": true,
815
941
  "schema": {
816
- "$ref": "#/components/schemas/UserId"
942
+ "$ref": "#/components/schemas/UserDiscordPathId"
817
943
  }
818
944
  },
819
945
  {
@@ -1033,10 +1159,10 @@
1033
1159
  {
1034
1160
  "name": "id",
1035
1161
  "in": "path",
1036
- "description": "User id",
1162
+ "description": "User id or user discord id",
1037
1163
  "required": true,
1038
1164
  "schema": {
1039
- "$ref": "#/components/schemas/UserId"
1165
+ "$ref": "#/components/schemas/UserDiscordPathId"
1040
1166
  }
1041
1167
  },
1042
1168
  {
@@ -1183,10 +1309,10 @@
1183
1309
  {
1184
1310
  "name": "id",
1185
1311
  "in": "path",
1186
- "description": "User id",
1312
+ "description": "User id or user discord id",
1187
1313
  "required": true,
1188
1314
  "schema": {
1189
- "$ref": "#/components/schemas/UserId"
1315
+ "$ref": "#/components/schemas/UserDiscordPathId"
1190
1316
  }
1191
1317
  },
1192
1318
  {
@@ -1282,10 +1408,10 @@
1282
1408
  {
1283
1409
  "name": "id",
1284
1410
  "in": "path",
1285
- "description": "User id",
1411
+ "description": "User id or user discord id",
1286
1412
  "required": true,
1287
1413
  "schema": {
1288
- "$ref": "#/components/schemas/UserId"
1414
+ "$ref": "#/components/schemas/UserDiscordPathId"
1289
1415
  }
1290
1416
  },
1291
1417
  {
@@ -1408,10 +1534,10 @@
1408
1534
  {
1409
1535
  "name": "id",
1410
1536
  "in": "path",
1411
- "description": "User id",
1537
+ "description": "User id or user discord id",
1412
1538
  "required": true,
1413
1539
  "schema": {
1414
- "$ref": "#/components/schemas/UserId"
1540
+ "$ref": "#/components/schemas/UserDiscordPathId"
1415
1541
  }
1416
1542
  },
1417
1543
  {
@@ -1537,10 +1663,10 @@
1537
1663
  {
1538
1664
  "name": "id",
1539
1665
  "in": "path",
1540
- "description": "User id",
1666
+ "description": "User id or user discord id",
1541
1667
  "required": true,
1542
1668
  "schema": {
1543
- "$ref": "#/components/schemas/UserId"
1669
+ "$ref": "#/components/schemas/UserDiscordPathId"
1544
1670
  }
1545
1671
  },
1546
1672
  {
@@ -2238,10 +2364,10 @@
2238
2364
  {
2239
2365
  "name": "id",
2240
2366
  "in": "path",
2241
- "description": "User id",
2367
+ "description": "User id or user discord id",
2242
2368
  "required": true,
2243
2369
  "schema": {
2244
- "$ref": "#/components/schemas/UserId"
2370
+ "$ref": "#/components/schemas/UserDiscordPathId"
2245
2371
  }
2246
2372
  },
2247
2373
  {
@@ -2358,10 +2484,10 @@
2358
2484
  {
2359
2485
  "name": "id",
2360
2486
  "in": "path",
2361
- "description": "User id",
2487
+ "description": "User id or user discord id",
2362
2488
  "required": true,
2363
2489
  "schema": {
2364
- "$ref": "#/components/schemas/UserId"
2490
+ "$ref": "#/components/schemas/UserDiscordPathId"
2365
2491
  }
2366
2492
  },
2367
2493
  {
@@ -2457,10 +2583,10 @@
2457
2583
  {
2458
2584
  "name": "id",
2459
2585
  "in": "path",
2460
- "description": "User id",
2586
+ "description": "User id or user discord id",
2461
2587
  "required": true,
2462
2588
  "schema": {
2463
- "$ref": "#/components/schemas/UserId"
2589
+ "$ref": "#/components/schemas/UserDiscordPathId"
2464
2590
  }
2465
2591
  },
2466
2592
  {
@@ -2553,10 +2679,10 @@
2553
2679
  {
2554
2680
  "name": "id",
2555
2681
  "in": "path",
2556
- "description": "User id",
2682
+ "description": "User id or user discord id",
2557
2683
  "required": true,
2558
2684
  "schema": {
2559
- "$ref": "#/components/schemas/UserId"
2685
+ "$ref": "#/components/schemas/UserDiscordPathId"
2560
2686
  }
2561
2687
  },
2562
2688
  {
@@ -3027,7 +3153,7 @@
3027
3153
  "User"
3028
3154
  ],
3029
3155
  "summary": "Get your weapon experience information",
3030
- "description": "Requires public minimal key. <br>",
3156
+ "description": "Requires minimal key. <br>",
3031
3157
  "operationId": "0b35f182b0a14eccc166ec542f1e7234",
3032
3158
  "parameters": [
3033
3159
  {
@@ -3208,7 +3334,7 @@
3208
3334
  "schema": {
3209
3335
  "oneOf": [
3210
3336
  {
3211
- "$ref": "#/components/schemas/UserId"
3337
+ "$ref": "#/components/schemas/UserDiscordPathId"
3212
3338
  },
3213
3339
  {
3214
3340
  "$ref": "#/components/schemas/TornCrimeId"
@@ -3316,6 +3442,9 @@
3316
3442
  {
3317
3443
  "$ref": "#/components/schemas/UserAmmoResponse"
3318
3444
  },
3445
+ {
3446
+ "$ref": "#/components/schemas/UserDiscordResponse"
3447
+ },
3319
3448
  {
3320
3449
  "$ref": "#/components/schemas/UserRacesResponse"
3321
3450
  },
@@ -8268,6 +8397,45 @@
8268
8397
  "x-stability": "Stable"
8269
8398
  }
8270
8399
  },
8400
+ "/torn/itemdetails": {
8401
+ "get": {
8402
+ "tags": [
8403
+ "Torn"
8404
+ ],
8405
+ "summary": "Get information about a specific item",
8406
+ "description": "Requires public key.",
8407
+ "operationId": "5767dbbbd08f6ce35b7c10922afaf6fc",
8408
+ "parameters": [
8409
+ {
8410
+ "$ref": "#/components/parameters/ApiTimestamp"
8411
+ },
8412
+ {
8413
+ "$ref": "#/components/parameters/ApiComment"
8414
+ },
8415
+ {
8416
+ "$ref": "#/components/parameters/ApiKeyPublic"
8417
+ }
8418
+ ],
8419
+ "responses": {
8420
+ "200": {
8421
+ "description": "Successful operation",
8422
+ "content": {
8423
+ "application/json": {
8424
+ "schema": {
8425
+ "$ref": "#/components/schemas/TornItemDetailsResponse"
8426
+ }
8427
+ }
8428
+ }
8429
+ }
8430
+ },
8431
+ "security": [
8432
+ {
8433
+ "api_key": []
8434
+ }
8435
+ ],
8436
+ "x-stability": "Unstable"
8437
+ }
8438
+ },
8271
8439
  "/torn/itemmods": {
8272
8440
  "get": {
8273
8441
  "tags": [
@@ -14163,6 +14331,19 @@
14163
14331
  "type": "integer",
14164
14332
  "format": "int32"
14165
14333
  },
14334
+ "DiscordId": {
14335
+ "type": "string"
14336
+ },
14337
+ "UserDiscordPathId": {
14338
+ "oneOf": [
14339
+ {
14340
+ "$ref": "#/components/schemas/UserId"
14341
+ },
14342
+ {
14343
+ "$ref": "#/components/schemas/DiscordId"
14344
+ }
14345
+ ]
14346
+ },
14166
14347
  "UserMessageId": {
14167
14348
  "type": "integer",
14168
14349
  "format": "int64"
@@ -15710,6 +15891,92 @@
15710
15891
  }
15711
15892
  ]
15712
15893
  },
15894
+ "UserEquipment": {
15895
+ "allOf": [
15896
+ {
15897
+ "$ref": "#/components/schemas/TornItemDetails"
15898
+ },
15899
+ {
15900
+ "required": [
15901
+ "slot"
15902
+ ],
15903
+ "properties": {
15904
+ "slot": {
15905
+ "type": "integer",
15906
+ "format": "int32"
15907
+ }
15908
+ },
15909
+ "type": "object"
15910
+ }
15911
+ ]
15912
+ },
15913
+ "UserClothing": {
15914
+ "required": [
15915
+ "id",
15916
+ "name",
15917
+ "uid",
15918
+ "type"
15919
+ ],
15920
+ "properties": {
15921
+ "id": {
15922
+ "$ref": "#/components/schemas/ItemId"
15923
+ },
15924
+ "name": {
15925
+ "type": "string"
15926
+ },
15927
+ "uid": {
15928
+ "$ref": "#/components/schemas/ItemUid"
15929
+ },
15930
+ "type": {
15931
+ "$ref": "#/components/schemas/TornItemTypeEnum"
15932
+ }
15933
+ },
15934
+ "type": "object"
15935
+ },
15936
+ "UserEquipmentResponse": {
15937
+ "required": [
15938
+ "equipment",
15939
+ "clothing"
15940
+ ],
15941
+ "properties": {
15942
+ "equipment": {
15943
+ "type": "array",
15944
+ "items": {
15945
+ "$ref": "#/components/schemas/UserEquipment"
15946
+ }
15947
+ },
15948
+ "clothing": {
15949
+ "type": "array",
15950
+ "items": {
15951
+ "$ref": "#/components/schemas/UserClothing"
15952
+ }
15953
+ }
15954
+ },
15955
+ "type": "object"
15956
+ },
15957
+ "UserDiscordResponse": {
15958
+ "required": [
15959
+ "discord"
15960
+ ],
15961
+ "properties": {
15962
+ "discord": {
15963
+ "required": [
15964
+ "discord_id",
15965
+ "user_id"
15966
+ ],
15967
+ "properties": {
15968
+ "discord_id": {
15969
+ "$ref": "#/components/schemas/DiscordId"
15970
+ },
15971
+ "user_id": {
15972
+ "$ref": "#/components/schemas/UserId"
15973
+ }
15974
+ },
15975
+ "type": "object"
15976
+ }
15977
+ },
15978
+ "type": "object"
15979
+ },
15713
15980
  "UserWeaponExpResponse": {
15714
15981
  "required": [
15715
15982
  "weaponexp"
@@ -19248,7 +19515,7 @@
19248
19515
  "UserSelectionName": {
19249
19516
  "oneOf": [
19250
19517
  {
19251
- "description": "The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','discord','display','equipment','gym','inventory','networth','perks','stocks'.",
19518
+ "description": "The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','display','gym','inventory','networth','perks','stocks'.",
19252
19519
  "type": "string",
19253
19520
  "enum": [
19254
19521
  "ammo",
@@ -19262,7 +19529,9 @@
19262
19529
  "competition",
19263
19530
  "cooldowns",
19264
19531
  "crimes",
19532
+ "discord",
19265
19533
  "enlistedcars",
19534
+ "equipment",
19266
19535
  "events",
19267
19536
  "faction",
19268
19537
  "factionbalance",
@@ -19307,10 +19576,8 @@
19307
19576
  "workstats",
19308
19577
  "bazaar",
19309
19578
  "criminalrecord",
19310
- "discord",
19311
19579
  "display",
19312
19580
  "education",
19313
- "equipment",
19314
19581
  "gym",
19315
19582
  "inventory",
19316
19583
  "networth",
@@ -27745,6 +28012,54 @@
27745
28012
  },
27746
28013
  "type": "object"
27747
28014
  },
28015
+ "TornItemDetails": {
28016
+ "allOf": [
28017
+ {
28018
+ "$ref": "#/components/schemas/ItemMarketListingItemDetails"
28019
+ },
28020
+ {
28021
+ "required": [
28022
+ "id",
28023
+ "name",
28024
+ "type",
28025
+ "sub_type"
28026
+ ],
28027
+ "properties": {
28028
+ "id": {
28029
+ "$ref": "#/components/schemas/ItemId"
28030
+ },
28031
+ "name": {
28032
+ "type": "string"
28033
+ },
28034
+ "type": {
28035
+ "$ref": "#/components/schemas/TornItemTypeEnum"
28036
+ },
28037
+ "sub_type": {
28038
+ "oneOf": [
28039
+ {
28040
+ "$ref": "#/components/schemas/TornItemWeaponTypeEnum"
28041
+ },
28042
+ {
28043
+ "type": "null"
28044
+ }
28045
+ ]
28046
+ }
28047
+ },
28048
+ "type": "object"
28049
+ }
28050
+ ]
28051
+ },
28052
+ "TornItemDetailsResponse": {
28053
+ "required": [
28054
+ "itemdetails"
28055
+ ],
28056
+ "properties": {
28057
+ "itemdetails": {
28058
+ "$ref": "#/components/schemas/TornItemDetails"
28059
+ }
28060
+ },
28061
+ "type": "object"
28062
+ },
27748
28063
  "TornMerit": {
27749
28064
  "required": [
27750
28065
  "id",
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "4.5.0",
4
+ "version": "4.7.0",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@scalar/openapi-types": "^0.5.1",
10
10
  "@types/node": "^24.10.1",
11
- "prettier": "^3.6.2",
11
+ "prettier": "^3.7.3",
12
12
  "typeconv": "^2.3.1",
13
13
  "typescript": "^5.9.3"
14
14
  },