tornapi-typescript 4.4.0 → 4.5.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
@@ -358,6 +358,14 @@ export interface ReportsResponse {
358
358
  _metadata: RequestMetadataWithLinks;
359
359
  }
360
360
  export type SelectionCategoryEnum = ReportTypeEnum | UserListEnum | PersonalStatsCategoryEnum | RacingRaceTypeEnum;
361
+ export interface UserWeaponExpResponse {
362
+ weaponexp: UserWeaponExp[];
363
+ }
364
+ export interface UserWeaponExp {
365
+ id: ItemId;
366
+ name: string;
367
+ exp: number;
368
+ }
361
369
  export interface MissionRewardDetailsAmmo {
362
370
  id: AmmoId;
363
371
  name: string;
@@ -1077,7 +1085,7 @@ export interface UserListResponse {
1077
1085
  list: UserList[];
1078
1086
  _metadata: RequestMetadataWithLinks;
1079
1087
  }
1080
- /** The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','discord','display','equipment','gym','inventory','networth','perks','stocks','weaponexp'. */
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'. */
1081
1089
  export type UserSelectionName = string;
1082
1090
  export interface UserLookupResponse {
1083
1091
  selections: UserSelectionName[];
@@ -6632,6 +6640,10 @@ export interface UserV2 extends BaseSchema {
6632
6640
  response: UserVirusResponse;
6633
6641
  params: "timestamp";
6634
6642
  };
6643
+ weaponexp: {
6644
+ response: UserWeaponExpResponse;
6645
+ params: "timestamp";
6646
+ };
6635
6647
  workstats: {
6636
6648
  response: UserWorkStatsResponse;
6637
6649
  params: "timestamp";
package/dist/index.ts CHANGED
@@ -5319,6 +5319,16 @@ export type SelectionCategoryEnum =
5319
5319
  | PersonalStatsCategoryEnum
5320
5320
  | RacingRaceTypeEnum;
5321
5321
 
5322
+ export interface UserWeaponExpResponse {
5323
+ weaponexp: UserWeaponExp[];
5324
+ }
5325
+
5326
+ export interface UserWeaponExp {
5327
+ id: ItemId;
5328
+ name: string;
5329
+ exp: number;
5330
+ }
5331
+
5322
5332
  export interface MissionRewardDetailsAmmo {
5323
5333
  id: AmmoId;
5324
5334
  name: string;
@@ -6176,7 +6186,7 @@ export interface UserListResponse {
6176
6186
  _metadata: RequestMetadataWithLinks;
6177
6187
  }
6178
6188
 
6179
- /** The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','discord','display','equipment','gym','inventory','networth','perks','stocks','weaponexp'. */
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'. */
6180
6190
  export type UserSelectionName = string;
6181
6191
 
6182
6192
  export interface UserLookupResponse {
@@ -12403,6 +12413,10 @@ export interface UserV2 extends BaseSchema {
12403
12413
  response: UserVirusResponse;
12404
12414
  params: "timestamp";
12405
12415
  };
12416
+ weaponexp: {
12417
+ response: UserWeaponExpResponse;
12418
+ params: "timestamp";
12419
+ };
12406
12420
  workstats: {
12407
12421
  response: UserWorkStatsResponse;
12408
12422
  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.4.0"
6
+ "version": "4.5.0"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -3021,6 +3021,45 @@
3021
3021
  "x-stability": "Stable"
3022
3022
  }
3023
3023
  },
3024
+ "/user/weaponexp": {
3025
+ "get": {
3026
+ "tags": [
3027
+ "User"
3028
+ ],
3029
+ "summary": "Get your weapon experience information",
3030
+ "description": "Requires public minimal key. <br>",
3031
+ "operationId": "0b35f182b0a14eccc166ec542f1e7234",
3032
+ "parameters": [
3033
+ {
3034
+ "$ref": "#/components/parameters/ApiTimestamp"
3035
+ },
3036
+ {
3037
+ "$ref": "#/components/parameters/ApiComment"
3038
+ },
3039
+ {
3040
+ "$ref": "#/components/parameters/ApiKeyMinimal"
3041
+ }
3042
+ ],
3043
+ "responses": {
3044
+ "200": {
3045
+ "description": "Successful operation",
3046
+ "content": {
3047
+ "application/json": {
3048
+ "schema": {
3049
+ "$ref": "#/components/schemas/UserWeaponExpResponse"
3050
+ }
3051
+ }
3052
+ }
3053
+ }
3054
+ },
3055
+ "security": [
3056
+ {
3057
+ "api_key": []
3058
+ }
3059
+ ],
3060
+ "x-stability": "Stable"
3061
+ }
3062
+ },
3024
3063
  "/user/workstats": {
3025
3064
  "get": {
3026
3065
  "tags": [
@@ -3271,6 +3310,12 @@
3271
3310
  {
3272
3311
  "$ref": "#/components/schemas/UserCrimesResponse"
3273
3312
  },
3313
+ {
3314
+ "$ref": "#/components/schemas/UserWeaponExpResponse"
3315
+ },
3316
+ {
3317
+ "$ref": "#/components/schemas/UserAmmoResponse"
3318
+ },
3274
3319
  {
3275
3320
  "$ref": "#/components/schemas/UserRacesResponse"
3276
3321
  },
@@ -15665,6 +15710,40 @@
15665
15710
  }
15666
15711
  ]
15667
15712
  },
15713
+ "UserWeaponExpResponse": {
15714
+ "required": [
15715
+ "weaponexp"
15716
+ ],
15717
+ "properties": {
15718
+ "weaponexp": {
15719
+ "type": "array",
15720
+ "items": {
15721
+ "$ref": "#/components/schemas/UserWeaponExp"
15722
+ }
15723
+ }
15724
+ },
15725
+ "type": "object"
15726
+ },
15727
+ "UserWeaponExp": {
15728
+ "required": [
15729
+ "id",
15730
+ "name",
15731
+ "exp"
15732
+ ],
15733
+ "properties": {
15734
+ "id": {
15735
+ "$ref": "#/components/schemas/ItemId"
15736
+ },
15737
+ "name": {
15738
+ "type": "string"
15739
+ },
15740
+ "exp": {
15741
+ "type": "integer",
15742
+ "format": "int32"
15743
+ }
15744
+ },
15745
+ "type": "object"
15746
+ },
15668
15747
  "MissionRewardDetailsAmmo": {
15669
15748
  "required": [
15670
15749
  "id",
@@ -19169,7 +19248,7 @@
19169
19248
  "UserSelectionName": {
19170
19249
  "oneOf": [
19171
19250
  {
19172
- "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','weaponexp'.",
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'.",
19173
19252
  "type": "string",
19174
19253
  "enum": [
19175
19254
  "ammo",
@@ -19224,6 +19303,7 @@
19224
19303
  "skills",
19225
19304
  "timestamp",
19226
19305
  "travel",
19306
+ "weaponexp",
19227
19307
  "workstats",
19228
19308
  "bazaar",
19229
19309
  "criminalrecord",
@@ -19235,8 +19315,7 @@
19235
19315
  "inventory",
19236
19316
  "networth",
19237
19317
  "perks",
19238
- "stocks",
19239
- "weaponexp"
19318
+ "stocks"
19240
19319
  ]
19241
19320
  },
19242
19321
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "4.4.0",
4
+ "version": "4.5.0",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },