tornapi-typescript 5.5.4 → 5.6.1

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/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.4"
6
+ "version": "5.6.1"
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
  }
@@ -14369,12 +14429,12 @@
14369
14429
  "FactionPositionAbilityEnum": {
14370
14430
  "type": "string",
14371
14431
  "enum": [
14372
- "Medical Item Usage",
14373
- "Booster Item Usage",
14374
- "Drug Item Usage",
14432
+ "Medical Usage",
14433
+ "Booster Usage",
14434
+ "Drug Usage",
14375
14435
  "Energy Refill Usage",
14376
14436
  "Nerve Refill Usage",
14377
- "Temporary Item Loaning",
14437
+ "Temporary Loaning",
14378
14438
  "Weapon & Armor Loaning",
14379
14439
  "Item Retrieving",
14380
14440
  "Organised Crimes",
@@ -14391,8 +14451,12 @@
14391
14451
  "Newsletter Sending",
14392
14452
  "Announcement Changes",
14393
14453
  "Description Changes",
14394
- "Utility Item Loaning",
14395
- "Consumable Item Usage"
14454
+ "Utility Loaning",
14455
+ "Consumable Usage",
14456
+ "Medical Loaning",
14457
+ "Consumable Loaning",
14458
+ "Drug Loaning",
14459
+ "Booster Loaning"
14396
14460
  ]
14397
14461
  },
14398
14462
  "FactionOrganizedCrimePayoutType": {
@@ -15372,6 +15436,36 @@
15372
15436
  "Weapon"
15373
15437
  ]
15374
15438
  },
15439
+ "TornInventoryItemType": {
15440
+ "type": "string",
15441
+ "enum": [
15442
+ "Collectible",
15443
+ "Clothing",
15444
+ "Other",
15445
+ "Tool",
15446
+ "Melee",
15447
+ "Defensive",
15448
+ "Material",
15449
+ "Car",
15450
+ "Primary",
15451
+ "Secondary",
15452
+ "Book",
15453
+ "Special",
15454
+ "Supply Pack",
15455
+ "Temporary",
15456
+ "Enhancer",
15457
+ "Artifact",
15458
+ "Flower",
15459
+ "Booster",
15460
+ "Medical",
15461
+ "Candy",
15462
+ "Jewelry",
15463
+ "Alcohol",
15464
+ "Plushie",
15465
+ "Drug",
15466
+ "Energy Drink"
15467
+ ]
15468
+ },
15375
15469
  "TornItemArmorCoveragePartEnum": {
15376
15470
  "type": "string",
15377
15471
  "enum": [
@@ -17169,6 +17263,79 @@
17169
17263
  },
17170
17264
  "type": "object"
17171
17265
  },
17266
+ "UserInventoryItem": {
17267
+ "required": [
17268
+ "id",
17269
+ "amount",
17270
+ "equipped",
17271
+ "name",
17272
+ "faction_owned",
17273
+ "uid"
17274
+ ],
17275
+ "properties": {
17276
+ "id": {
17277
+ "$ref": "#/components/schemas/ItemId"
17278
+ },
17279
+ "amount": {
17280
+ "type": "integer",
17281
+ "format": "int64"
17282
+ },
17283
+ "equipped": {
17284
+ "type": "boolean"
17285
+ },
17286
+ "name": {
17287
+ "type": "string"
17288
+ },
17289
+ "faction_owned": {
17290
+ "type": "boolean"
17291
+ },
17292
+ "uid": {
17293
+ "oneOf": [
17294
+ {
17295
+ "$ref": "#/components/schemas/ItemUid"
17296
+ },
17297
+ {
17298
+ "type": "null"
17299
+ }
17300
+ ]
17301
+ }
17302
+ },
17303
+ "type": "object"
17304
+ },
17305
+ "UserInventory": {
17306
+ "required": [
17307
+ "items",
17308
+ "timestamp"
17309
+ ],
17310
+ "properties": {
17311
+ "items": {
17312
+ "type": "array",
17313
+ "items": {
17314
+ "$ref": "#/components/schemas/UserInventoryItem"
17315
+ }
17316
+ },
17317
+ "timestamp": {
17318
+ "type": "integer",
17319
+ "format": "int32"
17320
+ }
17321
+ },
17322
+ "type": "object"
17323
+ },
17324
+ "UserInventoryResponse": {
17325
+ "required": [
17326
+ "inventory",
17327
+ "_metadata"
17328
+ ],
17329
+ "properties": {
17330
+ "inventory": {
17331
+ "$ref": "#/components/schemas/UserInventory"
17332
+ },
17333
+ "_metadata": {
17334
+ "$ref": "#/components/schemas/RequestMetadataWithLinksAndTotal"
17335
+ }
17336
+ },
17337
+ "type": "object"
17338
+ },
17172
17339
  "UserTradeResponse": {
17173
17340
  "required": [
17174
17341
  "trade"
@@ -21259,7 +21426,7 @@
21259
21426
  "UserSelectionName": {
21260
21427
  "oneOf": [
21261
21428
  {
21262
- "description": "The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','display','gym','inventory','networth','perks'.",
21429
+ "description": "The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','display','gym','networth','perks'.",
21263
21430
  "type": "string",
21264
21431
  "enum": [
21265
21432
  "ammo",
@@ -21287,6 +21454,7 @@
21287
21454
  "hof",
21288
21455
  "honors",
21289
21456
  "icons",
21457
+ "inventory",
21290
21458
  "itemmarket",
21291
21459
  "job",
21292
21460
  "jobpoints",
@@ -21326,7 +21494,6 @@
21326
21494
  "display",
21327
21495
  "education",
21328
21496
  "gym",
21329
- "inventory",
21330
21497
  "networth",
21331
21498
  "perks"
21332
21499
  ]
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "5.5.4",
4
+ "version": "5.6.1",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
- "@scalar/openapi-types": "^0.6.1",
10
- "@types/node": "^24.12.0",
11
- "prettier": "^3.8.1",
9
+ "@scalar/openapi-types": "^0.7.0",
10
+ "@types/node": "^24.12.2",
11
+ "prettier": "^3.8.3",
12
12
  "typeconv": "^2.3.1",
13
13
  "typescript": "^6.0.2"
14
14
  },