tornapi-typescript 5.6.1 → 5.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 +11 -1
- package/dist/index.ts +12 -1
- package/dist/openapi.json +70 -2
- 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;
|
|
@@ -3464,7 +3470,7 @@ export interface TornBountiesResponse {
|
|
|
3464
3470
|
bounties_timestamp: number;
|
|
3465
3471
|
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
3466
3472
|
bounties_delay?: number;
|
|
3467
|
-
_metadata:
|
|
3473
|
+
_metadata: RequestMetadataWithLinksAndTotal;
|
|
3468
3474
|
}
|
|
3469
3475
|
export interface TornItemAmmo {
|
|
3470
3476
|
id: AmmoId;
|
|
@@ -6870,6 +6876,10 @@ export interface UserV2 extends BaseSchema {
|
|
|
6870
6876
|
response: UserCalendarResponse;
|
|
6871
6877
|
params: "timestamp";
|
|
6872
6878
|
};
|
|
6879
|
+
casino: {
|
|
6880
|
+
response: UserCasinoResponse;
|
|
6881
|
+
params: "timestamp";
|
|
6882
|
+
};
|
|
6873
6883
|
competition: {
|
|
6874
6884
|
response: UserCompetitionResponse;
|
|
6875
6885
|
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;
|
|
@@ -9275,7 +9282,7 @@ export interface TornBountiesResponse {
|
|
|
9275
9282
|
bounties_timestamp: number;
|
|
9276
9283
|
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
9277
9284
|
bounties_delay?: number;
|
|
9278
|
-
_metadata:
|
|
9285
|
+
_metadata: RequestMetadataWithLinksAndTotal;
|
|
9279
9286
|
}
|
|
9280
9287
|
|
|
9281
9288
|
export interface TornItemAmmo {
|
|
@@ -12776,6 +12783,10 @@ export interface UserV2 extends BaseSchema {
|
|
|
12776
12783
|
response: UserCalendarResponse;
|
|
12777
12784
|
params: "timestamp";
|
|
12778
12785
|
};
|
|
12786
|
+
casino: {
|
|
12787
|
+
response: UserCasinoResponse;
|
|
12788
|
+
params: "timestamp";
|
|
12789
|
+
};
|
|
12779
12790
|
competition: {
|
|
12780
12791
|
response: UserCompetitionResponse;
|
|
12781
12792
|
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.0"
|
|
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",
|
|
@@ -31857,7 +31925,7 @@
|
|
|
31857
31925
|
"format": "int32"
|
|
31858
31926
|
},
|
|
31859
31927
|
"_metadata": {
|
|
31860
|
-
"$ref": "#/components/schemas/
|
|
31928
|
+
"$ref": "#/components/schemas/RequestMetadataWithLinksAndTotal"
|
|
31861
31929
|
}
|
|
31862
31930
|
},
|
|
31863
31931
|
"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.0",
|
|
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",
|