tornapi-typescript 4.3.8 → 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 +30 -1
- package/dist/index.ts +35 -1
- package/dist/openapi.json +176 -5
- package/package.json +1 -1
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;
|
|
@@ -674,6 +682,19 @@ export interface UserBattleStatModifierDetail {
|
|
|
674
682
|
value: number;
|
|
675
683
|
type: string;
|
|
676
684
|
}
|
|
685
|
+
export interface UserAmmoResponse {
|
|
686
|
+
ammo?: UserAmmo[];
|
|
687
|
+
}
|
|
688
|
+
export interface UserAmmo {
|
|
689
|
+
id: AmmoId;
|
|
690
|
+
name: string;
|
|
691
|
+
types: UserAmmoType[];
|
|
692
|
+
}
|
|
693
|
+
export interface UserAmmoType {
|
|
694
|
+
name: TornItemAmmoTypeEnum;
|
|
695
|
+
quantity: number;
|
|
696
|
+
equipped: boolean;
|
|
697
|
+
}
|
|
677
698
|
export interface UserBasic {
|
|
678
699
|
id: UserId;
|
|
679
700
|
name: string;
|
|
@@ -1064,7 +1085,7 @@ export interface UserListResponse {
|
|
|
1064
1085
|
list: UserList[];
|
|
1065
1086
|
_metadata: RequestMetadataWithLinks;
|
|
1066
1087
|
}
|
|
1067
|
-
/** The following selections will fallback to API v1 and may change at any time: '
|
|
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'. */
|
|
1068
1089
|
export type UserSelectionName = string;
|
|
1069
1090
|
export interface UserLookupResponse {
|
|
1070
1091
|
selections: UserSelectionName[];
|
|
@@ -6411,6 +6432,10 @@ export interface SectionsV1Map {
|
|
|
6411
6432
|
}
|
|
6412
6433
|
export interface UserV2 extends BaseSchema {
|
|
6413
6434
|
selections: {
|
|
6435
|
+
ammo: {
|
|
6436
|
+
response: UserAmmoResponse;
|
|
6437
|
+
params: "timestamp";
|
|
6438
|
+
};
|
|
6414
6439
|
attacks: {
|
|
6415
6440
|
response: FactionAttacksResponse;
|
|
6416
6441
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
|
@@ -6615,6 +6640,10 @@ export interface UserV2 extends BaseSchema {
|
|
|
6615
6640
|
response: UserVirusResponse;
|
|
6616
6641
|
params: "timestamp";
|
|
6617
6642
|
};
|
|
6643
|
+
weaponexp: {
|
|
6644
|
+
response: UserWeaponExpResponse;
|
|
6645
|
+
params: "timestamp";
|
|
6646
|
+
};
|
|
6618
6647
|
workstats: {
|
|
6619
6648
|
response: UserWorkStatsResponse;
|
|
6620
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;
|
|
@@ -5689,6 +5699,22 @@ export interface UserBattleStatModifierDetail {
|
|
|
5689
5699
|
type: string;
|
|
5690
5700
|
}
|
|
5691
5701
|
|
|
5702
|
+
export interface UserAmmoResponse {
|
|
5703
|
+
ammo?: UserAmmo[];
|
|
5704
|
+
}
|
|
5705
|
+
|
|
5706
|
+
export interface UserAmmo {
|
|
5707
|
+
id: AmmoId;
|
|
5708
|
+
name: string;
|
|
5709
|
+
types: UserAmmoType[];
|
|
5710
|
+
}
|
|
5711
|
+
|
|
5712
|
+
export interface UserAmmoType {
|
|
5713
|
+
name: TornItemAmmoTypeEnum;
|
|
5714
|
+
quantity: number;
|
|
5715
|
+
equipped: boolean;
|
|
5716
|
+
}
|
|
5717
|
+
|
|
5692
5718
|
export interface UserBasic {
|
|
5693
5719
|
id: UserId;
|
|
5694
5720
|
name: string;
|
|
@@ -6160,7 +6186,7 @@ export interface UserListResponse {
|
|
|
6160
6186
|
_metadata: RequestMetadataWithLinks;
|
|
6161
6187
|
}
|
|
6162
6188
|
|
|
6163
|
-
/** The following selections will fallback to API v1 and may change at any time: '
|
|
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'. */
|
|
6164
6190
|
export type UserSelectionName = string;
|
|
6165
6191
|
|
|
6166
6192
|
export interface UserLookupResponse {
|
|
@@ -12146,6 +12172,10 @@ export interface SectionsV1Map {
|
|
|
12146
12172
|
}
|
|
12147
12173
|
export interface UserV2 extends BaseSchema {
|
|
12148
12174
|
selections: {
|
|
12175
|
+
ammo: {
|
|
12176
|
+
response: UserAmmoResponse;
|
|
12177
|
+
params: "timestamp";
|
|
12178
|
+
};
|
|
12149
12179
|
attacks: {
|
|
12150
12180
|
response: FactionAttacksResponse;
|
|
12151
12181
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
|
@@ -12383,6 +12413,10 @@ export interface UserV2 extends BaseSchema {
|
|
|
12383
12413
|
response: UserVirusResponse;
|
|
12384
12414
|
params: "timestamp";
|
|
12385
12415
|
};
|
|
12416
|
+
weaponexp: {
|
|
12417
|
+
response: UserWeaponExpResponse;
|
|
12418
|
+
params: "timestamp";
|
|
12419
|
+
};
|
|
12386
12420
|
workstats: {
|
|
12387
12421
|
response: UserWorkStatsResponse;
|
|
12388
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.
|
|
6
|
+
"version": "4.5.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -12,6 +12,45 @@
|
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
14
|
"paths": {
|
|
15
|
+
"/user/ammo": {
|
|
16
|
+
"get": {
|
|
17
|
+
"tags": [
|
|
18
|
+
"User"
|
|
19
|
+
],
|
|
20
|
+
"summary": "Get your ammo information",
|
|
21
|
+
"description": "Requires public minimal key. <br>",
|
|
22
|
+
"operationId": "39826224a85f3a0dde89080ce7489685",
|
|
23
|
+
"parameters": [
|
|
24
|
+
{
|
|
25
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"$ref": "#/components/parameters/ApiKeyMinimal"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"responses": {
|
|
35
|
+
"200": {
|
|
36
|
+
"description": "Successful operation",
|
|
37
|
+
"content": {
|
|
38
|
+
"application/json": {
|
|
39
|
+
"schema": {
|
|
40
|
+
"$ref": "#/components/schemas/UserAmmoResponse"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"security": [
|
|
47
|
+
{
|
|
48
|
+
"api_key": []
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"x-stability": "Unstable"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
15
54
|
"/user/attacks": {
|
|
16
55
|
"get": {
|
|
17
56
|
"tags": [
|
|
@@ -2982,6 +3021,45 @@
|
|
|
2982
3021
|
"x-stability": "Stable"
|
|
2983
3022
|
}
|
|
2984
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
|
+
},
|
|
2985
3063
|
"/user/workstats": {
|
|
2986
3064
|
"get": {
|
|
2987
3065
|
"tags": [
|
|
@@ -3232,6 +3310,12 @@
|
|
|
3232
3310
|
{
|
|
3233
3311
|
"$ref": "#/components/schemas/UserCrimesResponse"
|
|
3234
3312
|
},
|
|
3313
|
+
{
|
|
3314
|
+
"$ref": "#/components/schemas/UserWeaponExpResponse"
|
|
3315
|
+
},
|
|
3316
|
+
{
|
|
3317
|
+
"$ref": "#/components/schemas/UserAmmoResponse"
|
|
3318
|
+
},
|
|
3235
3319
|
{
|
|
3236
3320
|
"$ref": "#/components/schemas/UserRacesResponse"
|
|
3237
3321
|
},
|
|
@@ -15626,6 +15710,40 @@
|
|
|
15626
15710
|
}
|
|
15627
15711
|
]
|
|
15628
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
|
+
},
|
|
15629
15747
|
"MissionRewardDetailsAmmo": {
|
|
15630
15748
|
"required": [
|
|
15631
15749
|
"id",
|
|
@@ -17173,6 +17291,59 @@
|
|
|
17173
17291
|
},
|
|
17174
17292
|
"type": "object"
|
|
17175
17293
|
},
|
|
17294
|
+
"UserAmmoResponse": {
|
|
17295
|
+
"properties": {
|
|
17296
|
+
"ammo": {
|
|
17297
|
+
"type": "array",
|
|
17298
|
+
"items": {
|
|
17299
|
+
"$ref": "#/components/schemas/UserAmmo"
|
|
17300
|
+
}
|
|
17301
|
+
}
|
|
17302
|
+
},
|
|
17303
|
+
"type": "object"
|
|
17304
|
+
},
|
|
17305
|
+
"UserAmmo": {
|
|
17306
|
+
"required": [
|
|
17307
|
+
"id",
|
|
17308
|
+
"name",
|
|
17309
|
+
"types"
|
|
17310
|
+
],
|
|
17311
|
+
"properties": {
|
|
17312
|
+
"id": {
|
|
17313
|
+
"$ref": "#/components/schemas/AmmoId"
|
|
17314
|
+
},
|
|
17315
|
+
"name": {
|
|
17316
|
+
"type": "string"
|
|
17317
|
+
},
|
|
17318
|
+
"types": {
|
|
17319
|
+
"type": "array",
|
|
17320
|
+
"items": {
|
|
17321
|
+
"$ref": "#/components/schemas/UserAmmoType"
|
|
17322
|
+
}
|
|
17323
|
+
}
|
|
17324
|
+
},
|
|
17325
|
+
"type": "object"
|
|
17326
|
+
},
|
|
17327
|
+
"UserAmmoType": {
|
|
17328
|
+
"required": [
|
|
17329
|
+
"name",
|
|
17330
|
+
"quantity",
|
|
17331
|
+
"equipped"
|
|
17332
|
+
],
|
|
17333
|
+
"properties": {
|
|
17334
|
+
"name": {
|
|
17335
|
+
"$ref": "#/components/schemas/TornItemAmmoTypeEnum"
|
|
17336
|
+
},
|
|
17337
|
+
"quantity": {
|
|
17338
|
+
"type": "integer",
|
|
17339
|
+
"format": "int32"
|
|
17340
|
+
},
|
|
17341
|
+
"equipped": {
|
|
17342
|
+
"type": "boolean"
|
|
17343
|
+
}
|
|
17344
|
+
},
|
|
17345
|
+
"type": "object"
|
|
17346
|
+
},
|
|
17176
17347
|
"UserBasic": {
|
|
17177
17348
|
"required": [
|
|
17178
17349
|
"id",
|
|
@@ -19077,9 +19248,10 @@
|
|
|
19077
19248
|
"UserSelectionName": {
|
|
19078
19249
|
"oneOf": [
|
|
19079
19250
|
{
|
|
19080
|
-
"description": "The following selections will fallback to API v1 and may change at any time: '
|
|
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'.",
|
|
19081
19252
|
"type": "string",
|
|
19082
19253
|
"enum": [
|
|
19254
|
+
"ammo",
|
|
19083
19255
|
"attacks",
|
|
19084
19256
|
"attacksfull",
|
|
19085
19257
|
"bars",
|
|
@@ -19131,8 +19303,8 @@
|
|
|
19131
19303
|
"skills",
|
|
19132
19304
|
"timestamp",
|
|
19133
19305
|
"travel",
|
|
19306
|
+
"weaponexp",
|
|
19134
19307
|
"workstats",
|
|
19135
|
-
"ammo",
|
|
19136
19308
|
"bazaar",
|
|
19137
19309
|
"criminalrecord",
|
|
19138
19310
|
"discord",
|
|
@@ -19143,8 +19315,7 @@
|
|
|
19143
19315
|
"inventory",
|
|
19144
19316
|
"networth",
|
|
19145
19317
|
"perks",
|
|
19146
|
-
"stocks"
|
|
19147
|
-
"weaponexp"
|
|
19318
|
+
"stocks"
|
|
19148
19319
|
]
|
|
19149
19320
|
},
|
|
19150
19321
|
{
|