tornapi-typescript 5.5.4 → 5.6.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 +283 -262
- package/dist/index.ts +392 -323
- package/dist/openapi.json +166 -3
- package/package.json +4 -4
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.6.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -1530,6 +1530,60 @@
|
|
|
1530
1530
|
"x-stability": "Stable"
|
|
1531
1531
|
}
|
|
1532
1532
|
},
|
|
1533
|
+
"/user/inventory": {
|
|
1534
|
+
"get": {
|
|
1535
|
+
"tags": [
|
|
1536
|
+
"User"
|
|
1537
|
+
],
|
|
1538
|
+
"summary": "Get your inventory",
|
|
1539
|
+
"description": "<b>Cached selection (1 hour per category).</b><br><br>Requires limited access key. <br>",
|
|
1540
|
+
"operationId": "getMyInventory",
|
|
1541
|
+
"parameters": [
|
|
1542
|
+
{
|
|
1543
|
+
"name": "cat",
|
|
1544
|
+
"in": "query",
|
|
1545
|
+
"description": "Items category",
|
|
1546
|
+
"required": false,
|
|
1547
|
+
"schema": {
|
|
1548
|
+
"$ref": "#/components/schemas/TornInventoryItemType"
|
|
1549
|
+
}
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"$ref": "#/components/parameters/ApiOffset"
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
"$ref": "#/components/parameters/ApiLimit250Default20"
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
"$ref": "#/components/parameters/ApiKeyLimited"
|
|
1565
|
+
}
|
|
1566
|
+
],
|
|
1567
|
+
"responses": {
|
|
1568
|
+
"200": {
|
|
1569
|
+
"description": "Successful operation",
|
|
1570
|
+
"content": {
|
|
1571
|
+
"application/json": {
|
|
1572
|
+
"schema": {
|
|
1573
|
+
"$ref": "#/components/schemas/UserInventoryResponse"
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
},
|
|
1579
|
+
"security": [
|
|
1580
|
+
{
|
|
1581
|
+
"api_key": []
|
|
1582
|
+
}
|
|
1583
|
+
],
|
|
1584
|
+
"x-stability": "Stable"
|
|
1585
|
+
}
|
|
1586
|
+
},
|
|
1533
1587
|
"/user/itemmarket": {
|
|
1534
1588
|
"get": {
|
|
1535
1589
|
"tags": [
|
|
@@ -3542,6 +3596,9 @@
|
|
|
3542
3596
|
{
|
|
3543
3597
|
"$ref": "#/components/schemas/RacingRaceTypeEnum"
|
|
3544
3598
|
},
|
|
3599
|
+
{
|
|
3600
|
+
"$ref": "#/components/schemas/TornInventoryItemType"
|
|
3601
|
+
},
|
|
3545
3602
|
{
|
|
3546
3603
|
"$ref": "#/components/schemas/TradeCategoryEnum"
|
|
3547
3604
|
}
|
|
@@ -3765,6 +3822,9 @@
|
|
|
3765
3822
|
{
|
|
3766
3823
|
"$ref": "#/components/schemas/UserLookupResponse"
|
|
3767
3824
|
},
|
|
3825
|
+
{
|
|
3826
|
+
"$ref": "#/components/schemas/UserInventoryResponse"
|
|
3827
|
+
},
|
|
3768
3828
|
{
|
|
3769
3829
|
"$ref": "#/components/schemas/TimestampResponse"
|
|
3770
3830
|
}
|
|
@@ -15372,6 +15432,36 @@
|
|
|
15372
15432
|
"Weapon"
|
|
15373
15433
|
]
|
|
15374
15434
|
},
|
|
15435
|
+
"TornInventoryItemType": {
|
|
15436
|
+
"type": "string",
|
|
15437
|
+
"enum": [
|
|
15438
|
+
"Collectible",
|
|
15439
|
+
"Clothing",
|
|
15440
|
+
"Other",
|
|
15441
|
+
"Tool",
|
|
15442
|
+
"Melee",
|
|
15443
|
+
"Defensive",
|
|
15444
|
+
"Material",
|
|
15445
|
+
"Car",
|
|
15446
|
+
"Primary",
|
|
15447
|
+
"Secondary",
|
|
15448
|
+
"Book",
|
|
15449
|
+
"Special",
|
|
15450
|
+
"Supply Pack",
|
|
15451
|
+
"Temporary",
|
|
15452
|
+
"Enhancer",
|
|
15453
|
+
"Artifact",
|
|
15454
|
+
"Flower",
|
|
15455
|
+
"Booster",
|
|
15456
|
+
"Medical",
|
|
15457
|
+
"Candy",
|
|
15458
|
+
"Jewelry",
|
|
15459
|
+
"Alcohol",
|
|
15460
|
+
"Plushie",
|
|
15461
|
+
"Drug",
|
|
15462
|
+
"Energy Drink"
|
|
15463
|
+
]
|
|
15464
|
+
},
|
|
15375
15465
|
"TornItemArmorCoveragePartEnum": {
|
|
15376
15466
|
"type": "string",
|
|
15377
15467
|
"enum": [
|
|
@@ -17169,6 +17259,79 @@
|
|
|
17169
17259
|
},
|
|
17170
17260
|
"type": "object"
|
|
17171
17261
|
},
|
|
17262
|
+
"UserInventoryItem": {
|
|
17263
|
+
"required": [
|
|
17264
|
+
"id",
|
|
17265
|
+
"amount",
|
|
17266
|
+
"equipped",
|
|
17267
|
+
"name",
|
|
17268
|
+
"faction_owned",
|
|
17269
|
+
"uid"
|
|
17270
|
+
],
|
|
17271
|
+
"properties": {
|
|
17272
|
+
"id": {
|
|
17273
|
+
"$ref": "#/components/schemas/ItemId"
|
|
17274
|
+
},
|
|
17275
|
+
"amount": {
|
|
17276
|
+
"type": "integer",
|
|
17277
|
+
"format": "int64"
|
|
17278
|
+
},
|
|
17279
|
+
"equipped": {
|
|
17280
|
+
"type": "boolean"
|
|
17281
|
+
},
|
|
17282
|
+
"name": {
|
|
17283
|
+
"type": "string"
|
|
17284
|
+
},
|
|
17285
|
+
"faction_owned": {
|
|
17286
|
+
"type": "boolean"
|
|
17287
|
+
},
|
|
17288
|
+
"uid": {
|
|
17289
|
+
"oneOf": [
|
|
17290
|
+
{
|
|
17291
|
+
"$ref": "#/components/schemas/ItemUid"
|
|
17292
|
+
},
|
|
17293
|
+
{
|
|
17294
|
+
"type": "null"
|
|
17295
|
+
}
|
|
17296
|
+
]
|
|
17297
|
+
}
|
|
17298
|
+
},
|
|
17299
|
+
"type": "object"
|
|
17300
|
+
},
|
|
17301
|
+
"UserInventory": {
|
|
17302
|
+
"required": [
|
|
17303
|
+
"items",
|
|
17304
|
+
"timestamp"
|
|
17305
|
+
],
|
|
17306
|
+
"properties": {
|
|
17307
|
+
"items": {
|
|
17308
|
+
"type": "array",
|
|
17309
|
+
"items": {
|
|
17310
|
+
"$ref": "#/components/schemas/UserInventoryItem"
|
|
17311
|
+
}
|
|
17312
|
+
},
|
|
17313
|
+
"timestamp": {
|
|
17314
|
+
"type": "integer",
|
|
17315
|
+
"format": "int32"
|
|
17316
|
+
}
|
|
17317
|
+
},
|
|
17318
|
+
"type": "object"
|
|
17319
|
+
},
|
|
17320
|
+
"UserInventoryResponse": {
|
|
17321
|
+
"required": [
|
|
17322
|
+
"inventory",
|
|
17323
|
+
"_metadata"
|
|
17324
|
+
],
|
|
17325
|
+
"properties": {
|
|
17326
|
+
"inventory": {
|
|
17327
|
+
"$ref": "#/components/schemas/UserInventory"
|
|
17328
|
+
},
|
|
17329
|
+
"_metadata": {
|
|
17330
|
+
"$ref": "#/components/schemas/RequestMetadataWithLinksAndTotal"
|
|
17331
|
+
}
|
|
17332
|
+
},
|
|
17333
|
+
"type": "object"
|
|
17334
|
+
},
|
|
17172
17335
|
"UserTradeResponse": {
|
|
17173
17336
|
"required": [
|
|
17174
17337
|
"trade"
|
|
@@ -21259,7 +21422,7 @@
|
|
|
21259
21422
|
"UserSelectionName": {
|
|
21260
21423
|
"oneOf": [
|
|
21261
21424
|
{
|
|
21262
|
-
"description": "The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','display','gym','
|
|
21425
|
+
"description": "The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','display','gym','networth','perks'.",
|
|
21263
21426
|
"type": "string",
|
|
21264
21427
|
"enum": [
|
|
21265
21428
|
"ammo",
|
|
@@ -21287,6 +21450,7 @@
|
|
|
21287
21450
|
"hof",
|
|
21288
21451
|
"honors",
|
|
21289
21452
|
"icons",
|
|
21453
|
+
"inventory",
|
|
21290
21454
|
"itemmarket",
|
|
21291
21455
|
"job",
|
|
21292
21456
|
"jobpoints",
|
|
@@ -21326,7 +21490,6 @@
|
|
|
21326
21490
|
"display",
|
|
21327
21491
|
"education",
|
|
21328
21492
|
"gym",
|
|
21329
|
-
"inventory",
|
|
21330
21493
|
"networth",
|
|
21331
21494
|
"perks"
|
|
21332
21495
|
]
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.6.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate-types": "tsc && node build/index.js"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@scalar/openapi-types": "^0.
|
|
10
|
-
"@types/node": "^24.12.
|
|
11
|
-
"prettier": "^3.8.
|
|
9
|
+
"@scalar/openapi-types": "^0.7.0",
|
|
10
|
+
"@types/node": "^24.12.2",
|
|
11
|
+
"prettier": "^3.8.2",
|
|
12
12
|
"typeconv": "^2.3.1",
|
|
13
13
|
"typescript": "^6.0.2"
|
|
14
14
|
},
|