tornapi-typescript 4.3.8 → 4.4.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 +18 -1
- package/dist/index.ts +21 -1
- package/dist/openapi.json +95 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -674,6 +674,19 @@ export interface UserBattleStatModifierDetail {
|
|
|
674
674
|
value: number;
|
|
675
675
|
type: string;
|
|
676
676
|
}
|
|
677
|
+
export interface UserAmmoResponse {
|
|
678
|
+
ammo?: UserAmmo[];
|
|
679
|
+
}
|
|
680
|
+
export interface UserAmmo {
|
|
681
|
+
id: AmmoId;
|
|
682
|
+
name: string;
|
|
683
|
+
types: UserAmmoType[];
|
|
684
|
+
}
|
|
685
|
+
export interface UserAmmoType {
|
|
686
|
+
name: TornItemAmmoTypeEnum;
|
|
687
|
+
quantity: number;
|
|
688
|
+
equipped: boolean;
|
|
689
|
+
}
|
|
677
690
|
export interface UserBasic {
|
|
678
691
|
id: UserId;
|
|
679
692
|
name: string;
|
|
@@ -1064,7 +1077,7 @@ export interface UserListResponse {
|
|
|
1064
1077
|
list: UserList[];
|
|
1065
1078
|
_metadata: RequestMetadataWithLinks;
|
|
1066
1079
|
}
|
|
1067
|
-
/** The following selections will fallback to API v1 and may change at any time: '
|
|
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'. */
|
|
1068
1081
|
export type UserSelectionName = string;
|
|
1069
1082
|
export interface UserLookupResponse {
|
|
1070
1083
|
selections: UserSelectionName[];
|
|
@@ -6411,6 +6424,10 @@ export interface SectionsV1Map {
|
|
|
6411
6424
|
}
|
|
6412
6425
|
export interface UserV2 extends BaseSchema {
|
|
6413
6426
|
selections: {
|
|
6427
|
+
ammo: {
|
|
6428
|
+
response: UserAmmoResponse;
|
|
6429
|
+
params: "timestamp";
|
|
6430
|
+
};
|
|
6414
6431
|
attacks: {
|
|
6415
6432
|
response: FactionAttacksResponse;
|
|
6416
6433
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
package/dist/index.ts
CHANGED
|
@@ -5689,6 +5689,22 @@ export interface UserBattleStatModifierDetail {
|
|
|
5689
5689
|
type: string;
|
|
5690
5690
|
}
|
|
5691
5691
|
|
|
5692
|
+
export interface UserAmmoResponse {
|
|
5693
|
+
ammo?: UserAmmo[];
|
|
5694
|
+
}
|
|
5695
|
+
|
|
5696
|
+
export interface UserAmmo {
|
|
5697
|
+
id: AmmoId;
|
|
5698
|
+
name: string;
|
|
5699
|
+
types: UserAmmoType[];
|
|
5700
|
+
}
|
|
5701
|
+
|
|
5702
|
+
export interface UserAmmoType {
|
|
5703
|
+
name: TornItemAmmoTypeEnum;
|
|
5704
|
+
quantity: number;
|
|
5705
|
+
equipped: boolean;
|
|
5706
|
+
}
|
|
5707
|
+
|
|
5692
5708
|
export interface UserBasic {
|
|
5693
5709
|
id: UserId;
|
|
5694
5710
|
name: string;
|
|
@@ -6160,7 +6176,7 @@ export interface UserListResponse {
|
|
|
6160
6176
|
_metadata: RequestMetadataWithLinks;
|
|
6161
6177
|
}
|
|
6162
6178
|
|
|
6163
|
-
/** The following selections will fallback to API v1 and may change at any time: '
|
|
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'. */
|
|
6164
6180
|
export type UserSelectionName = string;
|
|
6165
6181
|
|
|
6166
6182
|
export interface UserLookupResponse {
|
|
@@ -12146,6 +12162,10 @@ export interface SectionsV1Map {
|
|
|
12146
12162
|
}
|
|
12147
12163
|
export interface UserV2 extends BaseSchema {
|
|
12148
12164
|
selections: {
|
|
12165
|
+
ammo: {
|
|
12166
|
+
response: UserAmmoResponse;
|
|
12167
|
+
params: "timestamp";
|
|
12168
|
+
};
|
|
12149
12169
|
attacks: {
|
|
12150
12170
|
response: FactionAttacksResponse;
|
|
12151
12171
|
params: "filters" | "limit" | "sort" | "to" | "from" | "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.4.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": [
|
|
@@ -17173,6 +17212,59 @@
|
|
|
17173
17212
|
},
|
|
17174
17213
|
"type": "object"
|
|
17175
17214
|
},
|
|
17215
|
+
"UserAmmoResponse": {
|
|
17216
|
+
"properties": {
|
|
17217
|
+
"ammo": {
|
|
17218
|
+
"type": "array",
|
|
17219
|
+
"items": {
|
|
17220
|
+
"$ref": "#/components/schemas/UserAmmo"
|
|
17221
|
+
}
|
|
17222
|
+
}
|
|
17223
|
+
},
|
|
17224
|
+
"type": "object"
|
|
17225
|
+
},
|
|
17226
|
+
"UserAmmo": {
|
|
17227
|
+
"required": [
|
|
17228
|
+
"id",
|
|
17229
|
+
"name",
|
|
17230
|
+
"types"
|
|
17231
|
+
],
|
|
17232
|
+
"properties": {
|
|
17233
|
+
"id": {
|
|
17234
|
+
"$ref": "#/components/schemas/AmmoId"
|
|
17235
|
+
},
|
|
17236
|
+
"name": {
|
|
17237
|
+
"type": "string"
|
|
17238
|
+
},
|
|
17239
|
+
"types": {
|
|
17240
|
+
"type": "array",
|
|
17241
|
+
"items": {
|
|
17242
|
+
"$ref": "#/components/schemas/UserAmmoType"
|
|
17243
|
+
}
|
|
17244
|
+
}
|
|
17245
|
+
},
|
|
17246
|
+
"type": "object"
|
|
17247
|
+
},
|
|
17248
|
+
"UserAmmoType": {
|
|
17249
|
+
"required": [
|
|
17250
|
+
"name",
|
|
17251
|
+
"quantity",
|
|
17252
|
+
"equipped"
|
|
17253
|
+
],
|
|
17254
|
+
"properties": {
|
|
17255
|
+
"name": {
|
|
17256
|
+
"$ref": "#/components/schemas/TornItemAmmoTypeEnum"
|
|
17257
|
+
},
|
|
17258
|
+
"quantity": {
|
|
17259
|
+
"type": "integer",
|
|
17260
|
+
"format": "int32"
|
|
17261
|
+
},
|
|
17262
|
+
"equipped": {
|
|
17263
|
+
"type": "boolean"
|
|
17264
|
+
}
|
|
17265
|
+
},
|
|
17266
|
+
"type": "object"
|
|
17267
|
+
},
|
|
17176
17268
|
"UserBasic": {
|
|
17177
17269
|
"required": [
|
|
17178
17270
|
"id",
|
|
@@ -19077,9 +19169,10 @@
|
|
|
19077
19169
|
"UserSelectionName": {
|
|
19078
19170
|
"oneOf": [
|
|
19079
19171
|
{
|
|
19080
|
-
"description": "The following selections will fallback to API v1 and may change at any time: '
|
|
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'.",
|
|
19081
19173
|
"type": "string",
|
|
19082
19174
|
"enum": [
|
|
19175
|
+
"ammo",
|
|
19083
19176
|
"attacks",
|
|
19084
19177
|
"attacksfull",
|
|
19085
19178
|
"bars",
|
|
@@ -19132,7 +19225,6 @@
|
|
|
19132
19225
|
"timestamp",
|
|
19133
19226
|
"travel",
|
|
19134
19227
|
"workstats",
|
|
19135
|
-
"ammo",
|
|
19136
19228
|
"bazaar",
|
|
19137
19229
|
"criminalrecord",
|
|
19138
19230
|
"discord",
|