tornapi-typescript 6.0.3 → 6.1.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 +8 -0
- package/dist/index.ts +8 -0
- package/dist/openapi.json +64 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -755,6 +755,10 @@ export interface UserCooldownsResponse {
|
|
|
755
755
|
export interface UserBar {
|
|
756
756
|
current: number;
|
|
757
757
|
maximum: number;
|
|
758
|
+
increment: number;
|
|
759
|
+
interval: number;
|
|
760
|
+
tick_time: number;
|
|
761
|
+
full_time: number;
|
|
758
762
|
}
|
|
759
763
|
export interface UserBars {
|
|
760
764
|
energy: UserBar;
|
|
@@ -7400,6 +7404,10 @@ export interface FactionV2 extends BaseSchema {
|
|
|
7400
7404
|
response: FactionSearchResponse;
|
|
7401
7405
|
params: "name" | "filters" | "limit" | "offset" | "timestamp";
|
|
7402
7406
|
};
|
|
7407
|
+
snapshot: {
|
|
7408
|
+
response: null;
|
|
7409
|
+
params: "timestamp";
|
|
7410
|
+
};
|
|
7403
7411
|
stats: {
|
|
7404
7412
|
response: FactionStatsResponse;
|
|
7405
7413
|
params: "timestamp";
|
package/dist/index.ts
CHANGED
|
@@ -5816,6 +5816,10 @@ export interface UserCooldownsResponse {
|
|
|
5816
5816
|
export interface UserBar {
|
|
5817
5817
|
current: number;
|
|
5818
5818
|
maximum: number;
|
|
5819
|
+
increment: number;
|
|
5820
|
+
interval: number;
|
|
5821
|
+
tick_time: number;
|
|
5822
|
+
full_time: number;
|
|
5819
5823
|
}
|
|
5820
5824
|
|
|
5821
5825
|
export interface UserBars {
|
|
@@ -13337,6 +13341,10 @@ export interface FactionV2 extends BaseSchema {
|
|
|
13337
13341
|
response: FactionSearchResponse;
|
|
13338
13342
|
params: "name" | "filters" | "limit" | "offset" | "timestamp";
|
|
13339
13343
|
};
|
|
13344
|
+
snapshot: {
|
|
13345
|
+
response: null;
|
|
13346
|
+
params: "timestamp";
|
|
13347
|
+
};
|
|
13340
13348
|
stats: {
|
|
13341
13349
|
response: FactionStatsResponse;
|
|
13342
13350
|
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": "6.0
|
|
6
|
+
"version": "6.1.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -2380,7 +2380,7 @@
|
|
|
2380
2380
|
"tags": [
|
|
2381
2381
|
"User"
|
|
2382
2382
|
],
|
|
2383
|
-
"summary": "Get available slots for organized crimes with status 'Recruiting'",
|
|
2383
|
+
"summary": "Get your available slots for organized crimes with status 'Recruiting'",
|
|
2384
2384
|
"description": "Requires minimal access key. <br>Unlike 'faction' -> 'crimes', this selection only shows empty slots, and only for crimes with the 'Recruiting' status.",
|
|
2385
2385
|
"operationId": "getMyAvailableOrganizedCrimes",
|
|
2386
2386
|
"parameters": [
|
|
@@ -2851,7 +2851,7 @@
|
|
|
2851
2851
|
"tags": [
|
|
2852
2852
|
"User"
|
|
2853
2853
|
],
|
|
2854
|
-
"summary": "Get
|
|
2854
|
+
"summary": "Get your races",
|
|
2855
2855
|
"description": "Requires minimal access key. <br>Returns a list of user races, ordered by race start timestamp.",
|
|
2856
2856
|
"operationId": "getMyRaces",
|
|
2857
2857
|
"parameters": [
|
|
@@ -5564,6 +5564,46 @@
|
|
|
5564
5564
|
"x-stability": "Stable"
|
|
5565
5565
|
}
|
|
5566
5566
|
},
|
|
5567
|
+
"/faction/snapshot": {
|
|
5568
|
+
"get": {
|
|
5569
|
+
"tags": [
|
|
5570
|
+
"Faction"
|
|
5571
|
+
],
|
|
5572
|
+
"summary": "Get daily factions snapshot CSV",
|
|
5573
|
+
"description": "Requires public access key.<br>Returns a CSV daily snapshot of factions.<br>This selection is standalone and cannot be used together with other selections.<br>\nCSV columns: id, name, tag, tag_image, banner_image, leader_id, co_leader_id, respect, days_old, rank, members, members_max, member_list, recruiting, destroyed_timestamp",
|
|
5574
|
+
"operationId": "getFactionsSnapshot",
|
|
5575
|
+
"parameters": [
|
|
5576
|
+
{
|
|
5577
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
5578
|
+
},
|
|
5579
|
+
{
|
|
5580
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
5581
|
+
},
|
|
5582
|
+
{
|
|
5583
|
+
"$ref": "#/components/parameters/ApiKeyPublic"
|
|
5584
|
+
}
|
|
5585
|
+
],
|
|
5586
|
+
"responses": {
|
|
5587
|
+
"200": {
|
|
5588
|
+
"description": "Successful CSV response",
|
|
5589
|
+
"content": {
|
|
5590
|
+
"text/csv": {
|
|
5591
|
+
"schema": {
|
|
5592
|
+
"type": "string",
|
|
5593
|
+
"example": "id,name,tag,tag_image,banner_image,leader_id,co_leader_id,respect,days_old,rank,members,members_max,member_list,recruiting,destroyed_timestamp\\n33,Honour and Pride,H&P,33-0.png,861778851-33.jpg,68358,,132939,6657,13,3,20,[68358, 123013, 295496],1"
|
|
5594
|
+
}
|
|
5595
|
+
}
|
|
5596
|
+
}
|
|
5597
|
+
}
|
|
5598
|
+
},
|
|
5599
|
+
"security": [
|
|
5600
|
+
{
|
|
5601
|
+
"api_key": []
|
|
5602
|
+
}
|
|
5603
|
+
],
|
|
5604
|
+
"x-stability": "Unstable"
|
|
5605
|
+
}
|
|
5606
|
+
},
|
|
5567
5607
|
"/faction/stats": {
|
|
5568
5608
|
"get": {
|
|
5569
5609
|
"tags": [
|
|
@@ -19298,7 +19338,11 @@
|
|
|
19298
19338
|
"UserBar": {
|
|
19299
19339
|
"required": [
|
|
19300
19340
|
"current",
|
|
19301
|
-
"maximum"
|
|
19341
|
+
"maximum",
|
|
19342
|
+
"increment",
|
|
19343
|
+
"interval",
|
|
19344
|
+
"tick_time",
|
|
19345
|
+
"full_time"
|
|
19302
19346
|
],
|
|
19303
19347
|
"properties": {
|
|
19304
19348
|
"current": {
|
|
@@ -19308,6 +19352,22 @@
|
|
|
19308
19352
|
"maximum": {
|
|
19309
19353
|
"type": "integer",
|
|
19310
19354
|
"format": "int32"
|
|
19355
|
+
},
|
|
19356
|
+
"increment": {
|
|
19357
|
+
"type": "integer",
|
|
19358
|
+
"format": "int32"
|
|
19359
|
+
},
|
|
19360
|
+
"interval": {
|
|
19361
|
+
"type": "integer",
|
|
19362
|
+
"format": "int32"
|
|
19363
|
+
},
|
|
19364
|
+
"tick_time": {
|
|
19365
|
+
"type": "integer",
|
|
19366
|
+
"format": "int32"
|
|
19367
|
+
},
|
|
19368
|
+
"full_time": {
|
|
19369
|
+
"type": "integer",
|
|
19370
|
+
"format": "int32"
|
|
19311
19371
|
}
|
|
19312
19372
|
},
|
|
19313
19373
|
"type": "object"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.0
|
|
4
|
+
"version": "6.1.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "git+https://github.com/Torn-Playground/tornapi-typescript.git"
|
|
7
7
|
},
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"generate-types": "tsc && node build/index.js"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@scalar/openapi-types": "^0.9.
|
|
12
|
+
"@scalar/openapi-types": "^0.9.2",
|
|
13
13
|
"@types/node": "^25.9.5",
|
|
14
14
|
"prettier": "^3.9.5",
|
|
15
15
|
"typeconv": "^2.3.1",
|