tornapi-typescript 6.3.1 → 6.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 +36 -0
- package/dist/index.ts +37 -0
- package/dist/openapi.json +194 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -504,6 +504,38 @@ export interface ErrorFileDoesNotExist {
|
|
|
504
504
|
error: string;
|
|
505
505
|
}
|
|
506
506
|
export type ApiError = ErrorUnknown | ErrorKeyEmpty | ErrorIncorrectKey | ErrorWrongType | ErrorWrongFields | ErrorTooManyRequests | ErrorIncorrectId | ErrorIncorrectIdEntityRelation | ErrorIpBlocked | ErrorApiDisabled | ErrorKeyOwnerInFederalJail | ErrorKeyChangeCooldown | ErrorKeyReadError | ErrorKeyTemporaryDisabled | ErrorDailyReadLimitReached | ErrorLogUnavailable | ErrorAccessLevelTooLow | ErrorBackendError | ErrorApiKeyPaused | ErrorMustMigrateToCrimesV2 | ErrorRaceNotFinished | ErrorIncorrectCategory | ErrorOnlyAvailableInApiV1 | ErrorOnlyAvailableInApiV2 | ErrorClosedTemporarily | ErrorInvalidStatRequested | ErrorOnlyCategoryOrStatsAllowed | ErrorMustMigrateToOrganizedCrimesV2 | ErrorIncorrectLogId | ErrorCategorySelectionUnavailableForInteractionLogs | ErrorFileDoesNotExist;
|
|
507
|
+
export interface UserNetworthResponse {
|
|
508
|
+
networth: {
|
|
509
|
+
money: {
|
|
510
|
+
pending: number;
|
|
511
|
+
wallet: number;
|
|
512
|
+
vault: number;
|
|
513
|
+
bookie: number;
|
|
514
|
+
city_bank: number;
|
|
515
|
+
cayman_bank: number;
|
|
516
|
+
piggy_bank: number;
|
|
517
|
+
loans: number;
|
|
518
|
+
unpaid_fees: number;
|
|
519
|
+
};
|
|
520
|
+
items: {
|
|
521
|
+
inventory: number;
|
|
522
|
+
display_case: number;
|
|
523
|
+
bazaar: number;
|
|
524
|
+
trades: number;
|
|
525
|
+
item_market: number;
|
|
526
|
+
auction_house: number;
|
|
527
|
+
enlisted_cars: number;
|
|
528
|
+
};
|
|
529
|
+
assets: {
|
|
530
|
+
property: number;
|
|
531
|
+
stock_market: number;
|
|
532
|
+
company: number;
|
|
533
|
+
};
|
|
534
|
+
points: number;
|
|
535
|
+
total: number;
|
|
536
|
+
timestamp: number;
|
|
537
|
+
};
|
|
538
|
+
}
|
|
507
539
|
export interface UserItemMod {
|
|
508
540
|
id: ItemModId;
|
|
509
541
|
title: string;
|
|
@@ -7222,6 +7254,10 @@ export interface UserV2 extends BaseSchema {
|
|
|
7222
7254
|
response: UserNewEventsResponse;
|
|
7223
7255
|
params: "striptags" | "timestamp";
|
|
7224
7256
|
};
|
|
7257
|
+
networth: {
|
|
7258
|
+
response: UserNetworthResponse;
|
|
7259
|
+
params: "timestamp";
|
|
7260
|
+
};
|
|
7225
7261
|
newmessages: {
|
|
7226
7262
|
response: UserNewMessagesResponse;
|
|
7227
7263
|
params: "timestamp";
|
package/dist/index.ts
CHANGED
|
@@ -5517,6 +5517,39 @@ export type ApiError =
|
|
|
5517
5517
|
| ErrorCategorySelectionUnavailableForInteractionLogs
|
|
5518
5518
|
| ErrorFileDoesNotExist;
|
|
5519
5519
|
|
|
5520
|
+
export interface UserNetworthResponse {
|
|
5521
|
+
networth: {
|
|
5522
|
+
money: {
|
|
5523
|
+
pending: number;
|
|
5524
|
+
wallet: number;
|
|
5525
|
+
vault: number;
|
|
5526
|
+
bookie: number;
|
|
5527
|
+
city_bank: number;
|
|
5528
|
+
cayman_bank: number;
|
|
5529
|
+
piggy_bank: number;
|
|
5530
|
+
loans: number;
|
|
5531
|
+
unpaid_fees: number;
|
|
5532
|
+
};
|
|
5533
|
+
items: {
|
|
5534
|
+
inventory: number;
|
|
5535
|
+
display_case: number;
|
|
5536
|
+
bazaar: number;
|
|
5537
|
+
trades: number;
|
|
5538
|
+
item_market: number;
|
|
5539
|
+
auction_house: number;
|
|
5540
|
+
enlisted_cars: number;
|
|
5541
|
+
};
|
|
5542
|
+
assets: {
|
|
5543
|
+
property: number;
|
|
5544
|
+
stock_market: number;
|
|
5545
|
+
company: number;
|
|
5546
|
+
};
|
|
5547
|
+
points: number;
|
|
5548
|
+
total: number;
|
|
5549
|
+
timestamp: number;
|
|
5550
|
+
};
|
|
5551
|
+
}
|
|
5552
|
+
|
|
5520
5553
|
export interface UserItemMod {
|
|
5521
5554
|
id: ItemModId;
|
|
5522
5555
|
title: string;
|
|
@@ -13116,6 +13149,10 @@ export interface UserV2 extends BaseSchema {
|
|
|
13116
13149
|
response: UserNewEventsResponse;
|
|
13117
13150
|
params: "striptags" | "timestamp";
|
|
13118
13151
|
};
|
|
13152
|
+
networth: {
|
|
13153
|
+
response: UserNetworthResponse;
|
|
13154
|
+
params: "timestamp";
|
|
13155
|
+
};
|
|
13119
13156
|
newmessages: {
|
|
13120
13157
|
response: UserNewMessagesResponse;
|
|
13121
13158
|
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.
|
|
6
|
+
"version": "6.4.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -2258,13 +2258,52 @@
|
|
|
2258
2258
|
"x-stability": "Stable"
|
|
2259
2259
|
}
|
|
2260
2260
|
},
|
|
2261
|
+
"/user/networth": {
|
|
2262
|
+
"get": {
|
|
2263
|
+
"tags": [
|
|
2264
|
+
"User"
|
|
2265
|
+
],
|
|
2266
|
+
"summary": "Get your networth",
|
|
2267
|
+
"description": "Requires limited access key. <br>",
|
|
2268
|
+
"operationId": "getMyNetworth",
|
|
2269
|
+
"parameters": [
|
|
2270
|
+
{
|
|
2271
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
"$ref": "#/components/parameters/ApiKeyLimited"
|
|
2278
|
+
}
|
|
2279
|
+
],
|
|
2280
|
+
"responses": {
|
|
2281
|
+
"200": {
|
|
2282
|
+
"description": "Successful operation",
|
|
2283
|
+
"content": {
|
|
2284
|
+
"application/json": {
|
|
2285
|
+
"schema": {
|
|
2286
|
+
"$ref": "#/components/schemas/UserNetworthResponse"
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
},
|
|
2292
|
+
"security": [
|
|
2293
|
+
{
|
|
2294
|
+
"api_key": []
|
|
2295
|
+
}
|
|
2296
|
+
],
|
|
2297
|
+
"x-stability": "Unstable"
|
|
2298
|
+
}
|
|
2299
|
+
},
|
|
2261
2300
|
"/user/newmessages": {
|
|
2262
2301
|
"get": {
|
|
2263
2302
|
"tags": [
|
|
2264
2303
|
"User"
|
|
2265
2304
|
],
|
|
2266
2305
|
"summary": "Get your unseen messages",
|
|
2267
|
-
"description": "Requires limited access key. <br>",
|
|
2306
|
+
"description": "Requires limited access key. <br>This selection is cached for 1 hour.",
|
|
2268
2307
|
"operationId": "getMyNewMessages",
|
|
2269
2308
|
"parameters": [
|
|
2270
2309
|
{
|
|
@@ -3910,6 +3949,9 @@
|
|
|
3910
3949
|
{
|
|
3911
3950
|
"$ref": "#/components/schemas/UserCasinoResponse"
|
|
3912
3951
|
},
|
|
3952
|
+
{
|
|
3953
|
+
"$ref": "#/components/schemas/UserNetworthResponse"
|
|
3954
|
+
},
|
|
3913
3955
|
{
|
|
3914
3956
|
"$ref": "#/components/schemas/UserMoneyResponse"
|
|
3915
3957
|
},
|
|
@@ -18224,6 +18266,155 @@
|
|
|
18224
18266
|
}
|
|
18225
18267
|
]
|
|
18226
18268
|
},
|
|
18269
|
+
"UserNetworthResponse": {
|
|
18270
|
+
"required": [
|
|
18271
|
+
"networth"
|
|
18272
|
+
],
|
|
18273
|
+
"properties": {
|
|
18274
|
+
"networth": {
|
|
18275
|
+
"required": [
|
|
18276
|
+
"money",
|
|
18277
|
+
"items",
|
|
18278
|
+
"assets",
|
|
18279
|
+
"points",
|
|
18280
|
+
"total",
|
|
18281
|
+
"timestamp"
|
|
18282
|
+
],
|
|
18283
|
+
"properties": {
|
|
18284
|
+
"money": {
|
|
18285
|
+
"required": [
|
|
18286
|
+
"pending",
|
|
18287
|
+
"wallet",
|
|
18288
|
+
"vault",
|
|
18289
|
+
"bookie",
|
|
18290
|
+
"city_bank",
|
|
18291
|
+
"cayman_bank",
|
|
18292
|
+
"piggy_bank",
|
|
18293
|
+
"loans",
|
|
18294
|
+
"unpaid_fees"
|
|
18295
|
+
],
|
|
18296
|
+
"properties": {
|
|
18297
|
+
"pending": {
|
|
18298
|
+
"type": "integer",
|
|
18299
|
+
"format": "int64"
|
|
18300
|
+
},
|
|
18301
|
+
"wallet": {
|
|
18302
|
+
"type": "integer",
|
|
18303
|
+
"format": "int64"
|
|
18304
|
+
},
|
|
18305
|
+
"vault": {
|
|
18306
|
+
"type": "integer",
|
|
18307
|
+
"format": "int64"
|
|
18308
|
+
},
|
|
18309
|
+
"bookie": {
|
|
18310
|
+
"type": "integer",
|
|
18311
|
+
"format": "int64"
|
|
18312
|
+
},
|
|
18313
|
+
"city_bank": {
|
|
18314
|
+
"type": "integer",
|
|
18315
|
+
"format": "int64"
|
|
18316
|
+
},
|
|
18317
|
+
"cayman_bank": {
|
|
18318
|
+
"type": "integer",
|
|
18319
|
+
"format": "int64"
|
|
18320
|
+
},
|
|
18321
|
+
"piggy_bank": {
|
|
18322
|
+
"type": "integer",
|
|
18323
|
+
"format": "int64"
|
|
18324
|
+
},
|
|
18325
|
+
"loans": {
|
|
18326
|
+
"type": "integer",
|
|
18327
|
+
"format": "int64"
|
|
18328
|
+
},
|
|
18329
|
+
"unpaid_fees": {
|
|
18330
|
+
"type": "integer",
|
|
18331
|
+
"format": "int64"
|
|
18332
|
+
}
|
|
18333
|
+
},
|
|
18334
|
+
"type": "object"
|
|
18335
|
+
},
|
|
18336
|
+
"items": {
|
|
18337
|
+
"required": [
|
|
18338
|
+
"inventory",
|
|
18339
|
+
"display_case",
|
|
18340
|
+
"bazaar",
|
|
18341
|
+
"trades",
|
|
18342
|
+
"item_market",
|
|
18343
|
+
"auction_house",
|
|
18344
|
+
"enlisted_cars"
|
|
18345
|
+
],
|
|
18346
|
+
"properties": {
|
|
18347
|
+
"inventory": {
|
|
18348
|
+
"type": "integer",
|
|
18349
|
+
"format": "int64"
|
|
18350
|
+
},
|
|
18351
|
+
"display_case": {
|
|
18352
|
+
"type": "integer",
|
|
18353
|
+
"format": "int64"
|
|
18354
|
+
},
|
|
18355
|
+
"bazaar": {
|
|
18356
|
+
"type": "integer",
|
|
18357
|
+
"format": "int64"
|
|
18358
|
+
},
|
|
18359
|
+
"trades": {
|
|
18360
|
+
"type": "integer",
|
|
18361
|
+
"format": "int64"
|
|
18362
|
+
},
|
|
18363
|
+
"item_market": {
|
|
18364
|
+
"type": "integer",
|
|
18365
|
+
"format": "int64"
|
|
18366
|
+
},
|
|
18367
|
+
"auction_house": {
|
|
18368
|
+
"type": "integer",
|
|
18369
|
+
"format": "int64"
|
|
18370
|
+
},
|
|
18371
|
+
"enlisted_cars": {
|
|
18372
|
+
"type": "integer",
|
|
18373
|
+
"format": "int64"
|
|
18374
|
+
}
|
|
18375
|
+
},
|
|
18376
|
+
"type": "object"
|
|
18377
|
+
},
|
|
18378
|
+
"assets": {
|
|
18379
|
+
"required": [
|
|
18380
|
+
"property",
|
|
18381
|
+
"stock_market",
|
|
18382
|
+
"company"
|
|
18383
|
+
],
|
|
18384
|
+
"properties": {
|
|
18385
|
+
"property": {
|
|
18386
|
+
"type": "integer",
|
|
18387
|
+
"format": "int64"
|
|
18388
|
+
},
|
|
18389
|
+
"stock_market": {
|
|
18390
|
+
"type": "integer",
|
|
18391
|
+
"format": "int64"
|
|
18392
|
+
},
|
|
18393
|
+
"company": {
|
|
18394
|
+
"type": "integer",
|
|
18395
|
+
"format": "int64"
|
|
18396
|
+
}
|
|
18397
|
+
},
|
|
18398
|
+
"type": "object"
|
|
18399
|
+
},
|
|
18400
|
+
"points": {
|
|
18401
|
+
"type": "integer",
|
|
18402
|
+
"format": "int64"
|
|
18403
|
+
},
|
|
18404
|
+
"total": {
|
|
18405
|
+
"type": "integer",
|
|
18406
|
+
"format": "int64"
|
|
18407
|
+
},
|
|
18408
|
+
"timestamp": {
|
|
18409
|
+
"type": "integer",
|
|
18410
|
+
"format": "int32"
|
|
18411
|
+
}
|
|
18412
|
+
},
|
|
18413
|
+
"type": "object"
|
|
18414
|
+
}
|
|
18415
|
+
},
|
|
18416
|
+
"type": "object"
|
|
18417
|
+
},
|
|
18227
18418
|
"UserItemMod": {
|
|
18228
18419
|
"required": [
|
|
18229
18420
|
"id",
|
|
@@ -22636,6 +22827,7 @@
|
|
|
22636
22827
|
"messages",
|
|
22637
22828
|
"missions",
|
|
22638
22829
|
"money",
|
|
22830
|
+
"networth",
|
|
22639
22831
|
"newevents",
|
|
22640
22832
|
"newmessages",
|
|
22641
22833
|
"notifications",
|
|
@@ -22664,7 +22856,6 @@
|
|
|
22664
22856
|
"display",
|
|
22665
22857
|
"education",
|
|
22666
22858
|
"gym",
|
|
22667
|
-
"networth",
|
|
22668
22859
|
"perks"
|
|
22669
22860
|
]
|
|
22670
22861
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.4.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.4",
|
|
13
13
|
"@types/node": "^25.9.5",
|
|
14
14
|
"prettier": "^3.9.6",
|
|
15
15
|
"typeconv": "^2.3.1",
|