tornapi-typescript 5.5.2 → 5.5.4
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 +12 -2
- package/dist/index.ts +12 -1
- package/dist/openapi.json +39 -11
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1275,6 +1275,8 @@ export interface UserCalendarResponse {
|
|
|
1275
1275
|
export interface UserBountiesResponse {
|
|
1276
1276
|
bounties: Bounty[];
|
|
1277
1277
|
bounties_timestamp: number;
|
|
1278
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
1279
|
+
bounties_delay?: number;
|
|
1278
1280
|
}
|
|
1279
1281
|
export interface UserJobRanks {
|
|
1280
1282
|
army: JobPositionArmyEnum;
|
|
@@ -2823,6 +2825,8 @@ export interface MarketRentalDetails {
|
|
|
2823
2825
|
export interface MarketRentalsResponse {
|
|
2824
2826
|
rentals: MarketRentalDetails;
|
|
2825
2827
|
rentals_timestamp: number;
|
|
2828
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
2829
|
+
rentals_delay?: number;
|
|
2826
2830
|
_metadata: RequestMetadataWithLinks;
|
|
2827
2831
|
}
|
|
2828
2832
|
export interface MarketPropertyDetails {
|
|
@@ -2838,6 +2842,8 @@ export interface MarketPropertyDetails {
|
|
|
2838
2842
|
export interface MarketPropertiesResponse {
|
|
2839
2843
|
properties: MarketPropertyDetails;
|
|
2840
2844
|
properties_timestamp: number;
|
|
2845
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
2846
|
+
properties_delay?: number;
|
|
2841
2847
|
_metadata: RequestMetadataWithLinks;
|
|
2842
2848
|
}
|
|
2843
2849
|
export interface BazaarWeekly {
|
|
@@ -2926,6 +2932,8 @@ export interface ItemMarket {
|
|
|
2926
2932
|
listings: (ItemMarketListingNonstackable | ItemMarketListingStackable)[];
|
|
2927
2933
|
/** Timestamp when the data was globally cached at. */
|
|
2928
2934
|
cache_timestamp: number;
|
|
2935
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
2936
|
+
cache_delay?: number;
|
|
2929
2937
|
}
|
|
2930
2938
|
export interface MarketItemMarketResponse {
|
|
2931
2939
|
itemmarket: ItemMarket;
|
|
@@ -3437,6 +3445,8 @@ export interface AttackLogResponse {
|
|
|
3437
3445
|
export interface TornBountiesResponse {
|
|
3438
3446
|
bounties: Bounty[];
|
|
3439
3447
|
bounties_timestamp: number;
|
|
3448
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
3449
|
+
bounties_delay?: number;
|
|
3440
3450
|
_metadata: RequestMetadataWithLinks;
|
|
3441
3451
|
}
|
|
3442
3452
|
export interface TornItemAmmo {
|
|
@@ -7029,7 +7039,7 @@ export interface UserV2 extends BaseSchema {
|
|
|
7029
7039
|
};
|
|
7030
7040
|
trade: {
|
|
7031
7041
|
response: UserTradeResponse;
|
|
7032
|
-
params: "
|
|
7042
|
+
params: "tradeId" | "timestamp";
|
|
7033
7043
|
};
|
|
7034
7044
|
travel: {
|
|
7035
7045
|
response: UserTravelResponse;
|
|
@@ -7097,7 +7107,7 @@ export interface FactionV2 extends BaseSchema {
|
|
|
7097
7107
|
};
|
|
7098
7108
|
crimes: {
|
|
7099
7109
|
response: FactionCrimesResponse;
|
|
7100
|
-
params: "cat" | "filters" | "offset" | "from" | "to" | "sort" | "timestamp";
|
|
7110
|
+
params: "cat" | "filters" | "limit" | "offset" | "from" | "to" | "sort" | "timestamp";
|
|
7101
7111
|
};
|
|
7102
7112
|
crime: {
|
|
7103
7113
|
response: FactionCrimeResponse;
|
package/dist/index.ts
CHANGED
|
@@ -6460,6 +6460,8 @@ export interface UserCalendarResponse {
|
|
|
6460
6460
|
export interface UserBountiesResponse {
|
|
6461
6461
|
bounties: Bounty[];
|
|
6462
6462
|
bounties_timestamp: number;
|
|
6463
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
6464
|
+
bounties_delay?: number;
|
|
6463
6465
|
}
|
|
6464
6466
|
|
|
6465
6467
|
export interface UserJobRanks {
|
|
@@ -8496,6 +8498,8 @@ export interface MarketRentalDetails {
|
|
|
8496
8498
|
export interface MarketRentalsResponse {
|
|
8497
8499
|
rentals: MarketRentalDetails;
|
|
8498
8500
|
rentals_timestamp: number;
|
|
8501
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
8502
|
+
rentals_delay?: number;
|
|
8499
8503
|
_metadata: RequestMetadataWithLinks;
|
|
8500
8504
|
}
|
|
8501
8505
|
|
|
@@ -8513,6 +8517,8 @@ export interface MarketPropertyDetails {
|
|
|
8513
8517
|
export interface MarketPropertiesResponse {
|
|
8514
8518
|
properties: MarketPropertyDetails;
|
|
8515
8519
|
properties_timestamp: number;
|
|
8520
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
8521
|
+
properties_delay?: number;
|
|
8516
8522
|
_metadata: RequestMetadataWithLinks;
|
|
8517
8523
|
}
|
|
8518
8524
|
|
|
@@ -8621,6 +8627,8 @@ export interface ItemMarket {
|
|
|
8621
8627
|
listings: (ItemMarketListingNonstackable | ItemMarketListingStackable)[];
|
|
8622
8628
|
/** Timestamp when the data was globally cached at. */
|
|
8623
8629
|
cache_timestamp: number;
|
|
8630
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
8631
|
+
cache_delay?: number;
|
|
8624
8632
|
}
|
|
8625
8633
|
|
|
8626
8634
|
export interface MarketItemMarketResponse {
|
|
@@ -9215,6 +9223,8 @@ export interface AttackLogResponse {
|
|
|
9215
9223
|
export interface TornBountiesResponse {
|
|
9216
9224
|
bounties: Bounty[];
|
|
9217
9225
|
bounties_timestamp: number;
|
|
9226
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
9227
|
+
bounties_delay?: number;
|
|
9218
9228
|
_metadata: RequestMetadataWithLinks;
|
|
9219
9229
|
}
|
|
9220
9230
|
|
|
@@ -12922,7 +12932,7 @@ export interface UserV2 extends BaseSchema {
|
|
|
12922
12932
|
};
|
|
12923
12933
|
trade: {
|
|
12924
12934
|
response: UserTradeResponse;
|
|
12925
|
-
params: "
|
|
12935
|
+
params: "tradeId" | "timestamp";
|
|
12926
12936
|
};
|
|
12927
12937
|
travel: {
|
|
12928
12938
|
response: UserTravelResponse;
|
|
@@ -12993,6 +13003,7 @@ export interface FactionV2 extends BaseSchema {
|
|
|
12993
13003
|
params:
|
|
12994
13004
|
| "cat"
|
|
12995
13005
|
| "filters"
|
|
13006
|
+
| "limit"
|
|
12996
13007
|
| "offset"
|
|
12997
13008
|
| "from"
|
|
12998
13009
|
| "to"
|
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.5.
|
|
6
|
+
"version": "5.5.4"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
"User"
|
|
337
337
|
],
|
|
338
338
|
"summary": "Get bounties placed on you",
|
|
339
|
-
"description": "Requires public access key. <br>",
|
|
339
|
+
"description": "<b>Globally cached selection.</b><br><br>Requires public access key. <br>",
|
|
340
340
|
"operationId": "getMyBounties",
|
|
341
341
|
"parameters": [
|
|
342
342
|
{
|
|
@@ -2858,7 +2858,7 @@
|
|
|
2858
2858
|
"User"
|
|
2859
2859
|
],
|
|
2860
2860
|
"summary": "Get your reports",
|
|
2861
|
-
"description": "Requires limited access key. <br>\
|
|
2861
|
+
"description": "Requires limited access key. <br>\nThe limit is set to 25 when requesting any category other than 'stats'.<br>\nWhen requesting the 'stats' category, limit can be increased up to 100.",
|
|
2862
2862
|
"operationId": "getMyReports",
|
|
2863
2863
|
"parameters": [
|
|
2864
2864
|
{
|
|
@@ -3180,7 +3180,7 @@
|
|
|
3180
3180
|
"operationId": "getMyDetailedTrade",
|
|
3181
3181
|
"parameters": [
|
|
3182
3182
|
{
|
|
3183
|
-
"name": "
|
|
3183
|
+
"name": "tradeId",
|
|
3184
3184
|
"in": "path",
|
|
3185
3185
|
"description": "Trade id",
|
|
3186
3186
|
"required": true,
|
|
@@ -4457,6 +4457,9 @@
|
|
|
4457
4457
|
]
|
|
4458
4458
|
}
|
|
4459
4459
|
},
|
|
4460
|
+
{
|
|
4461
|
+
"$ref": "#/components/parameters/ApiLimit100Default20"
|
|
4462
|
+
},
|
|
4460
4463
|
{
|
|
4461
4464
|
"$ref": "#/components/parameters/ApiOffset"
|
|
4462
4465
|
},
|
|
@@ -5192,7 +5195,7 @@
|
|
|
5192
5195
|
"Faction"
|
|
5193
5196
|
],
|
|
5194
5197
|
"summary": "Get faction reports",
|
|
5195
|
-
"description": "Requires limited access key. <br>\
|
|
5198
|
+
"description": "Requires limited access key. <br>\nThe limit is set to 25 when requesting any category other than 'stats'.<br>\nWhen requesting the 'stats' category, limit can be increased up to 100.",
|
|
5196
5199
|
"operationId": "getMyFactionReports",
|
|
5197
5200
|
"parameters": [
|
|
5198
5201
|
{
|
|
@@ -7152,7 +7155,7 @@
|
|
|
7152
7155
|
"Market"
|
|
7153
7156
|
],
|
|
7154
7157
|
"summary": "Get item market listings",
|
|
7155
|
-
"description": "Requires public access key. <br>",
|
|
7158
|
+
"description": "<b>Globally cached selection.</b><br><br>Requires public access key. <br>",
|
|
7156
7159
|
"operationId": "getMarketItemMarketItem",
|
|
7157
7160
|
"parameters": [
|
|
7158
7161
|
{
|
|
@@ -7215,7 +7218,7 @@
|
|
|
7215
7218
|
"Market"
|
|
7216
7219
|
],
|
|
7217
7220
|
"summary": "Get properties market listings",
|
|
7218
|
-
"description": "Requires public access key. <br>",
|
|
7221
|
+
"description": "<b>Globally cached selection.</b><br><br>Requires public access key. <br>",
|
|
7219
7222
|
"operationId": "getMarketProperties",
|
|
7220
7223
|
"parameters": [
|
|
7221
7224
|
{
|
|
@@ -7272,7 +7275,7 @@
|
|
|
7272
7275
|
"Market"
|
|
7273
7276
|
],
|
|
7274
7277
|
"summary": "Get properties rental listings",
|
|
7275
|
-
"description": "Requires public access key. <br>",
|
|
7278
|
+
"description": "<b>Globally cached selection.</b><br><br>Requires public access key. <br>",
|
|
7276
7279
|
"operationId": "getMarketPropertiesRental",
|
|
7277
7280
|
"parameters": [
|
|
7278
7281
|
{
|
|
@@ -8298,7 +8301,7 @@
|
|
|
8298
8301
|
"Torn"
|
|
8299
8302
|
],
|
|
8300
8303
|
"summary": "Get bounties",
|
|
8301
|
-
"description": "Requires public key. <br>",
|
|
8304
|
+
"description": "<b>Globally cached selection.</b><br><br>Requires public key. <br>",
|
|
8302
8305
|
"operationId": "getTornBounties",
|
|
8303
8306
|
"parameters": [
|
|
8304
8307
|
{
|
|
@@ -20946,6 +20949,11 @@
|
|
|
20946
20949
|
"bounties_timestamp": {
|
|
20947
20950
|
"type": "integer",
|
|
20948
20951
|
"format": "int32"
|
|
20952
|
+
},
|
|
20953
|
+
"bounties_delay": {
|
|
20954
|
+
"description": "The minimum amount of time needed before the cache timestamp can change.",
|
|
20955
|
+
"type": "integer",
|
|
20956
|
+
"format": "int32"
|
|
20949
20957
|
}
|
|
20950
20958
|
},
|
|
20951
20959
|
"type": "object"
|
|
@@ -26998,8 +27006,8 @@
|
|
|
26998
27006
|
},
|
|
26999
27007
|
"percentage": {
|
|
27000
27008
|
"description": "Total percentage split between all participants.",
|
|
27001
|
-
"type": "
|
|
27002
|
-
"format": "
|
|
27009
|
+
"type": "number",
|
|
27010
|
+
"format": "float"
|
|
27003
27011
|
},
|
|
27004
27012
|
"paid_by": {
|
|
27005
27013
|
"$ref": "#/components/schemas/UserId"
|
|
@@ -28607,6 +28615,11 @@
|
|
|
28607
28615
|
"type": "integer",
|
|
28608
28616
|
"format": "int32"
|
|
28609
28617
|
},
|
|
28618
|
+
"rentals_delay": {
|
|
28619
|
+
"description": "The minimum amount of time needed before the cache timestamp can change.",
|
|
28620
|
+
"type": "integer",
|
|
28621
|
+
"format": "int32"
|
|
28622
|
+
},
|
|
28610
28623
|
"_metadata": {
|
|
28611
28624
|
"$ref": "#/components/schemas/RequestMetadataWithLinks"
|
|
28612
28625
|
}
|
|
@@ -28676,6 +28689,11 @@
|
|
|
28676
28689
|
"type": "integer",
|
|
28677
28690
|
"format": "int32"
|
|
28678
28691
|
},
|
|
28692
|
+
"properties_delay": {
|
|
28693
|
+
"description": "The minimum amount of time needed before the cache timestamp can change.",
|
|
28694
|
+
"type": "integer",
|
|
28695
|
+
"format": "int32"
|
|
28696
|
+
},
|
|
28679
28697
|
"_metadata": {
|
|
28680
28698
|
"$ref": "#/components/schemas/RequestMetadataWithLinks"
|
|
28681
28699
|
}
|
|
@@ -29160,6 +29178,11 @@
|
|
|
29160
29178
|
"description": "Timestamp when the data was globally cached at.",
|
|
29161
29179
|
"type": "integer",
|
|
29162
29180
|
"format": "int32"
|
|
29181
|
+
},
|
|
29182
|
+
"cache_delay": {
|
|
29183
|
+
"description": "The minimum amount of time needed before the cache timestamp can change.",
|
|
29184
|
+
"type": "integer",
|
|
29185
|
+
"format": "int32"
|
|
29163
29186
|
}
|
|
29164
29187
|
},
|
|
29165
29188
|
"type": "object"
|
|
@@ -31661,6 +31684,11 @@
|
|
|
31661
31684
|
"type": "integer",
|
|
31662
31685
|
"format": "int32"
|
|
31663
31686
|
},
|
|
31687
|
+
"bounties_delay": {
|
|
31688
|
+
"description": "The minimum amount of time needed before the cache timestamp can change.",
|
|
31689
|
+
"type": "integer",
|
|
31690
|
+
"format": "int32"
|
|
31691
|
+
},
|
|
31664
31692
|
"_metadata": {
|
|
31665
31693
|
"$ref": "#/components/schemas/RequestMetadataWithLinks"
|
|
31666
31694
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.5.
|
|
4
|
+
"version": "5.5.4",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate-types": "tsc && node build/index.js"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@scalar/openapi-types": "^0.6.
|
|
9
|
+
"@scalar/openapi-types": "^0.6.1",
|
|
10
10
|
"@types/node": "^24.12.0",
|
|
11
11
|
"prettier": "^3.8.1",
|
|
12
12
|
"typeconv": "^2.3.1",
|
|
13
|
-
"typescript": "^
|
|
13
|
+
"typescript": "^6.0.2"
|
|
14
14
|
},
|
|
15
15
|
"main": "./dist/index.js",
|
|
16
16
|
"types": "./dist/index.d.ts",
|