tornapi-typescript 5.6.1 → 5.7.1
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 +13 -2
- package/dist/index.ts +14 -2
- package/dist/openapi.json +76 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -497,6 +497,12 @@ export interface UserTradesResponse {
|
|
|
497
497
|
trades: UserTrade[];
|
|
498
498
|
_metadata: RequestMetadataWithLinks;
|
|
499
499
|
}
|
|
500
|
+
export interface UserCasinoResponse {
|
|
501
|
+
casino: {
|
|
502
|
+
tokens: number;
|
|
503
|
+
streak: number;
|
|
504
|
+
};
|
|
505
|
+
}
|
|
500
506
|
export interface UserInventoryItem {
|
|
501
507
|
id: ItemId;
|
|
502
508
|
amount: number;
|
|
@@ -2284,6 +2290,7 @@ export interface FactionBasic {
|
|
|
2284
2290
|
name: string;
|
|
2285
2291
|
tag: string;
|
|
2286
2292
|
tag_image: string;
|
|
2293
|
+
banner_image: string;
|
|
2287
2294
|
leader_id: UserId;
|
|
2288
2295
|
co_leader_id: UserId;
|
|
2289
2296
|
respect: number;
|
|
@@ -2302,7 +2309,7 @@ export interface FactionPact {
|
|
|
2302
2309
|
faction_id: FactionId;
|
|
2303
2310
|
faction_name: string;
|
|
2304
2311
|
/** The duration until when is the non-aggression pact valid. */
|
|
2305
|
-
until:
|
|
2312
|
+
until: number;
|
|
2306
2313
|
}
|
|
2307
2314
|
export interface FactionRankedWarParticipant {
|
|
2308
2315
|
id: FactionId;
|
|
@@ -3464,7 +3471,7 @@ export interface TornBountiesResponse {
|
|
|
3464
3471
|
bounties_timestamp: number;
|
|
3465
3472
|
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
3466
3473
|
bounties_delay?: number;
|
|
3467
|
-
_metadata:
|
|
3474
|
+
_metadata: RequestMetadataWithLinksAndTotal;
|
|
3468
3475
|
}
|
|
3469
3476
|
export interface TornItemAmmo {
|
|
3470
3477
|
id: AmmoId;
|
|
@@ -6870,6 +6877,10 @@ export interface UserV2 extends BaseSchema {
|
|
|
6870
6877
|
response: UserCalendarResponse;
|
|
6871
6878
|
params: "timestamp";
|
|
6872
6879
|
};
|
|
6880
|
+
casino: {
|
|
6881
|
+
response: UserCasinoResponse;
|
|
6882
|
+
params: "timestamp";
|
|
6883
|
+
};
|
|
6873
6884
|
competition: {
|
|
6874
6885
|
response: UserCompetitionResponse;
|
|
6875
6886
|
params: "timestamp";
|
package/dist/index.ts
CHANGED
|
@@ -5561,6 +5561,13 @@ export interface UserTradesResponse {
|
|
|
5561
5561
|
_metadata: RequestMetadataWithLinks;
|
|
5562
5562
|
}
|
|
5563
5563
|
|
|
5564
|
+
export interface UserCasinoResponse {
|
|
5565
|
+
casino: {
|
|
5566
|
+
tokens: number;
|
|
5567
|
+
streak: number;
|
|
5568
|
+
};
|
|
5569
|
+
}
|
|
5570
|
+
|
|
5564
5571
|
export interface UserInventoryItem {
|
|
5565
5572
|
id: ItemId;
|
|
5566
5573
|
amount: number;
|
|
@@ -7913,6 +7920,7 @@ export interface FactionBasic {
|
|
|
7913
7920
|
name: string;
|
|
7914
7921
|
tag: string;
|
|
7915
7922
|
tag_image: string;
|
|
7923
|
+
banner_image: string;
|
|
7916
7924
|
leader_id: UserId;
|
|
7917
7925
|
co_leader_id: UserId;
|
|
7918
7926
|
respect: number;
|
|
@@ -7933,7 +7941,7 @@ export interface FactionPact {
|
|
|
7933
7941
|
faction_id: FactionId;
|
|
7934
7942
|
faction_name: string;
|
|
7935
7943
|
/** The duration until when is the non-aggression pact valid. */
|
|
7936
|
-
until:
|
|
7944
|
+
until: number;
|
|
7937
7945
|
}
|
|
7938
7946
|
|
|
7939
7947
|
export interface FactionRankedWarParticipant {
|
|
@@ -9275,7 +9283,7 @@ export interface TornBountiesResponse {
|
|
|
9275
9283
|
bounties_timestamp: number;
|
|
9276
9284
|
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
9277
9285
|
bounties_delay?: number;
|
|
9278
|
-
_metadata:
|
|
9286
|
+
_metadata: RequestMetadataWithLinksAndTotal;
|
|
9279
9287
|
}
|
|
9280
9288
|
|
|
9281
9289
|
export interface TornItemAmmo {
|
|
@@ -12776,6 +12784,10 @@ export interface UserV2 extends BaseSchema {
|
|
|
12776
12784
|
response: UserCalendarResponse;
|
|
12777
12785
|
params: "timestamp";
|
|
12778
12786
|
};
|
|
12787
|
+
casino: {
|
|
12788
|
+
response: UserCasinoResponse;
|
|
12789
|
+
params: "timestamp";
|
|
12790
|
+
};
|
|
12779
12791
|
competition: {
|
|
12780
12792
|
response: UserCompetitionResponse;
|
|
12781
12793
|
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": "5.
|
|
6
|
+
"version": "5.7.1"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -456,6 +456,45 @@
|
|
|
456
456
|
"x-stability": "Stable"
|
|
457
457
|
}
|
|
458
458
|
},
|
|
459
|
+
"/user/casino": {
|
|
460
|
+
"get": {
|
|
461
|
+
"tags": [
|
|
462
|
+
"User"
|
|
463
|
+
],
|
|
464
|
+
"summary": "Get your casino streak & tokens",
|
|
465
|
+
"description": "Requires limited access key. <br>Only available to yourself.",
|
|
466
|
+
"operationId": "getMyCasinoStreak",
|
|
467
|
+
"parameters": [
|
|
468
|
+
{
|
|
469
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"$ref": "#/components/parameters/ApiKeyLimited"
|
|
476
|
+
}
|
|
477
|
+
],
|
|
478
|
+
"responses": {
|
|
479
|
+
"200": {
|
|
480
|
+
"description": "Successful operation",
|
|
481
|
+
"content": {
|
|
482
|
+
"application/json": {
|
|
483
|
+
"schema": {
|
|
484
|
+
"$ref": "#/components/schemas/UserCasinoResponse"
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
"security": [
|
|
491
|
+
{
|
|
492
|
+
"api_key": []
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
"x-stability": "Unstable"
|
|
496
|
+
}
|
|
497
|
+
},
|
|
459
498
|
"/user/competition": {
|
|
460
499
|
"get": {
|
|
461
500
|
"tags": [
|
|
@@ -3786,6 +3825,9 @@
|
|
|
3786
3825
|
{
|
|
3787
3826
|
"$ref": "#/components/schemas/AttacksFullResponse"
|
|
3788
3827
|
},
|
|
3828
|
+
{
|
|
3829
|
+
"$ref": "#/components/schemas/UserCasinoResponse"
|
|
3830
|
+
},
|
|
3789
3831
|
{
|
|
3790
3832
|
"$ref": "#/components/schemas/UserMoneyResponse"
|
|
3791
3833
|
},
|
|
@@ -17263,6 +17305,31 @@
|
|
|
17263
17305
|
},
|
|
17264
17306
|
"type": "object"
|
|
17265
17307
|
},
|
|
17308
|
+
"UserCasinoResponse": {
|
|
17309
|
+
"required": [
|
|
17310
|
+
"casino"
|
|
17311
|
+
],
|
|
17312
|
+
"properties": {
|
|
17313
|
+
"casino": {
|
|
17314
|
+
"required": [
|
|
17315
|
+
"tokens",
|
|
17316
|
+
"streak"
|
|
17317
|
+
],
|
|
17318
|
+
"properties": {
|
|
17319
|
+
"tokens": {
|
|
17320
|
+
"type": "integer",
|
|
17321
|
+
"format": "int32"
|
|
17322
|
+
},
|
|
17323
|
+
"streak": {
|
|
17324
|
+
"type": "integer",
|
|
17325
|
+
"format": "int64"
|
|
17326
|
+
}
|
|
17327
|
+
},
|
|
17328
|
+
"type": "object"
|
|
17329
|
+
}
|
|
17330
|
+
},
|
|
17331
|
+
"type": "object"
|
|
17332
|
+
},
|
|
17266
17333
|
"UserInventoryItem": {
|
|
17267
17334
|
"required": [
|
|
17268
17335
|
"id",
|
|
@@ -21437,6 +21504,7 @@
|
|
|
21437
21504
|
"battlestats",
|
|
21438
21505
|
"bounties",
|
|
21439
21506
|
"calendar",
|
|
21507
|
+
"casino",
|
|
21440
21508
|
"competition",
|
|
21441
21509
|
"cooldowns",
|
|
21442
21510
|
"crimes",
|
|
@@ -26061,6 +26129,7 @@
|
|
|
26061
26129
|
"name",
|
|
26062
26130
|
"tag",
|
|
26063
26131
|
"tag_image",
|
|
26132
|
+
"banner_image",
|
|
26064
26133
|
"leader_id",
|
|
26065
26134
|
"co_leader_id",
|
|
26066
26135
|
"respect",
|
|
@@ -26084,6 +26153,9 @@
|
|
|
26084
26153
|
"tag_image": {
|
|
26085
26154
|
"type": "string"
|
|
26086
26155
|
},
|
|
26156
|
+
"banner_image": {
|
|
26157
|
+
"type": "string"
|
|
26158
|
+
},
|
|
26087
26159
|
"leader_id": {
|
|
26088
26160
|
"$ref": "#/components/schemas/UserId"
|
|
26089
26161
|
},
|
|
@@ -26156,7 +26228,8 @@
|
|
|
26156
26228
|
},
|
|
26157
26229
|
"until": {
|
|
26158
26230
|
"description": "The duration until when is the non-aggression pact valid.",
|
|
26159
|
-
"type": "
|
|
26231
|
+
"type": "integer",
|
|
26232
|
+
"format": "int32"
|
|
26160
26233
|
}
|
|
26161
26234
|
},
|
|
26162
26235
|
"type": "object"
|
|
@@ -31857,7 +31930,7 @@
|
|
|
31857
31930
|
"format": "int32"
|
|
31858
31931
|
},
|
|
31859
31932
|
"_metadata": {
|
|
31860
|
-
"$ref": "#/components/schemas/
|
|
31933
|
+
"$ref": "#/components/schemas/RequestMetadataWithLinksAndTotal"
|
|
31861
31934
|
}
|
|
31862
31935
|
},
|
|
31863
31936
|
"type": "object"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.7.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate-types": "tsc && node build/index.js"
|
|
7
7
|
},
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@types/node": "^24.12.2",
|
|
11
11
|
"prettier": "^3.8.3",
|
|
12
12
|
"typeconv": "^2.3.1",
|
|
13
|
-
"typescript": "^6.0.
|
|
13
|
+
"typescript": "^6.0.3"
|
|
14
14
|
},
|
|
15
15
|
"main": "./dist/index.js",
|
|
16
16
|
"types": "./dist/index.d.ts",
|