tornapi-typescript 6.4.0 → 6.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 CHANGED
@@ -504,6 +504,18 @@ 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 UserPerksResponse {
508
+ perks: {
509
+ faction: string[];
510
+ job: string[];
511
+ property: string[];
512
+ education: string[];
513
+ enhancer: string[];
514
+ book: string[];
515
+ stock: string[];
516
+ merit: string[];
517
+ };
518
+ }
507
519
  export interface UserNetworthResponse {
508
520
  networth: {
509
521
  money: {
@@ -3046,6 +3058,14 @@ export interface KeyInfoResponse {
3046
3058
  };
3047
3059
  }
3048
3060
  export type KeySelectionName = string;
3061
+ export interface PointsMarketResponse {
3062
+ pointsmarket: {
3063
+ id: number;
3064
+ quantity: number;
3065
+ cost: number;
3066
+ total_cost: number;
3067
+ }[];
3068
+ }
3049
3069
  export interface AuctionHouseStackableItem {
3050
3070
  id: ItemId;
3051
3071
  uid: ItemUid;
@@ -3202,7 +3222,6 @@ export interface MarketItemMarketResponse {
3202
3222
  itemmarket: ItemMarket;
3203
3223
  _metadata: RequestMetadataWithLinksAndTotal;
3204
3224
  }
3205
- /** The following selections will fallback to API v1 and may change at any time: 'pointsmarket'. */
3206
3225
  export type MarketSelectionName = string;
3207
3226
  export interface MarketLookupResponse {
3208
3227
  selections: MarketSelectionName[];
@@ -7274,6 +7293,10 @@ export interface UserV2 extends BaseSchema {
7274
7293
  response: UserOrganizedCrimesResponse;
7275
7294
  params: "timestamp";
7276
7295
  };
7296
+ perks: {
7297
+ response: UserPerksResponse;
7298
+ params: "timestamp";
7299
+ };
7277
7300
  personalstats: {
7278
7301
  response: UserPersonalStatsResponse;
7279
7302
  params: "cat" | "stat" | "timestamp";
@@ -7610,6 +7633,10 @@ export interface MarketV2 extends BaseSchema {
7610
7633
  response: MarketPropertiesResponse;
7611
7634
  params: "propertyTypeId" | "offset" | "limit" | "sort" | "timestamp";
7612
7635
  };
7636
+ pointsmarket: {
7637
+ response: PointsMarketResponse;
7638
+ params: "timestamp";
7639
+ };
7613
7640
  rentals: {
7614
7641
  response: MarketRentalsResponse;
7615
7642
  params: "propertyTypeId" | "offset" | "limit" | "sort" | "timestamp";
package/dist/index.ts CHANGED
@@ -5517,6 +5517,19 @@ export type ApiError =
5517
5517
  | ErrorCategorySelectionUnavailableForInteractionLogs
5518
5518
  | ErrorFileDoesNotExist;
5519
5519
 
5520
+ export interface UserPerksResponse {
5521
+ perks: {
5522
+ faction: string[];
5523
+ job: string[];
5524
+ property: string[];
5525
+ education: string[];
5526
+ enhancer: string[];
5527
+ book: string[];
5528
+ stock: string[];
5529
+ merit: string[];
5530
+ };
5531
+ }
5532
+
5520
5533
  export interface UserNetworthResponse {
5521
5534
  networth: {
5522
5535
  money: {
@@ -8734,6 +8747,15 @@ export interface KeyInfoResponse {
8734
8747
 
8735
8748
  export type KeySelectionName = string;
8736
8749
 
8750
+ export interface PointsMarketResponse {
8751
+ pointsmarket: {
8752
+ id: number;
8753
+ quantity: number;
8754
+ cost: number;
8755
+ total_cost: number;
8756
+ }[];
8757
+ }
8758
+
8737
8759
  export interface AuctionHouseStackableItem {
8738
8760
  id: ItemId;
8739
8761
  uid: ItemUid;
@@ -8920,7 +8942,6 @@ export interface MarketItemMarketResponse {
8920
8942
  _metadata: RequestMetadataWithLinksAndTotal;
8921
8943
  }
8922
8944
 
8923
- /** The following selections will fallback to API v1 and may change at any time: 'pointsmarket'. */
8924
8945
  export type MarketSelectionName = string;
8925
8946
 
8926
8947
  export interface MarketLookupResponse {
@@ -13169,6 +13190,10 @@ export interface UserV2 extends BaseSchema {
13169
13190
  response: UserOrganizedCrimesResponse;
13170
13191
  params: "timestamp";
13171
13192
  };
13193
+ perks: {
13194
+ response: UserPerksResponse;
13195
+ params: "timestamp";
13196
+ };
13172
13197
  personalstats: {
13173
13198
  response: UserPersonalStatsResponse;
13174
13199
  params: "cat" | "stat" | "timestamp";
@@ -13565,6 +13590,10 @@ export interface MarketV2 extends BaseSchema {
13565
13590
  params:
13566
13591
  "propertyTypeId" | "offset" | "limit" | "sort" | "timestamp";
13567
13592
  };
13593
+ pointsmarket: {
13594
+ response: PointsMarketResponse;
13595
+ params: "timestamp";
13596
+ };
13568
13597
  rentals: {
13569
13598
  response: MarketRentalsResponse;
13570
13599
  params:
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.4.0"
6
+ "version": "6.6.0"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -492,7 +492,7 @@
492
492
  "api_key": []
493
493
  }
494
494
  ],
495
- "x-stability": "Unstable"
495
+ "x-stability": "Stable"
496
496
  }
497
497
  },
498
498
  "/user/competition": {
@@ -2453,6 +2453,45 @@
2453
2453
  "x-stability": "Stable"
2454
2454
  }
2455
2455
  },
2456
+ "/user/perks": {
2457
+ "get": {
2458
+ "tags": [
2459
+ "User"
2460
+ ],
2461
+ "summary": "Get your current perks",
2462
+ "description": "Requires minimal access key. <br>",
2463
+ "operationId": "getMyPerks",
2464
+ "parameters": [
2465
+ {
2466
+ "$ref": "#/components/parameters/ApiTimestamp"
2467
+ },
2468
+ {
2469
+ "$ref": "#/components/parameters/ApiComment"
2470
+ },
2471
+ {
2472
+ "$ref": "#/components/parameters/ApiKeyPublic"
2473
+ }
2474
+ ],
2475
+ "responses": {
2476
+ "200": {
2477
+ "description": "Successful operation",
2478
+ "content": {
2479
+ "application/json": {
2480
+ "schema": {
2481
+ "$ref": "#/components/schemas/UserPerksResponse"
2482
+ }
2483
+ }
2484
+ }
2485
+ }
2486
+ },
2487
+ "security": [
2488
+ {
2489
+ "api_key": []
2490
+ }
2491
+ ],
2492
+ "x-stability": "Stable"
2493
+ }
2494
+ },
2456
2495
  "/user/personalstats": {
2457
2496
  "get": {
2458
2497
  "tags": [
@@ -3252,7 +3291,7 @@
3252
3291
  "operationId": "getUsersSnapshot",
3253
3292
  "parameters": [
3254
3293
  {
3255
- "$ref": "#/components/parameters/ApiTimestamp"
3294
+ "$ref": "#/components/parameters/ApiTimestampSpecificPointInTime"
3256
3295
  },
3257
3296
  {
3258
3297
  "$ref": "#/components/parameters/ApiComment"
@@ -3378,7 +3417,7 @@
3378
3417
  "api_key": []
3379
3418
  }
3380
3419
  ],
3381
- "x-stability": "Unstable"
3420
+ "x-stability": "Stable"
3382
3421
  }
3383
3422
  },
3384
3423
  "/user/{tradeId}/trade": {
@@ -3426,7 +3465,7 @@
3426
3465
  "api_key": []
3427
3466
  }
3428
3467
  ],
3429
- "x-stability": "Unstable"
3468
+ "x-stability": "Stable"
3430
3469
  }
3431
3470
  },
3432
3471
  "/user/travel": {
@@ -3934,6 +3973,9 @@
3934
3973
  {
3935
3974
  "$ref": "#/components/schemas/UserNotificationsResponse"
3936
3975
  },
3976
+ {
3977
+ "$ref": "#/components/schemas/UserPerksResponse"
3978
+ },
3937
3979
  {
3938
3980
  "$ref": "#/components/schemas/UserRefillsResponse"
3939
3981
  },
@@ -5656,7 +5698,7 @@
5656
5698
  "operationId": "getFactionsSnapshot",
5657
5699
  "parameters": [
5658
5700
  {
5659
- "$ref": "#/components/parameters/ApiTimestamp"
5701
+ "$ref": "#/components/parameters/ApiTimestampSpecificPointInTime"
5660
5702
  },
5661
5703
  {
5662
5704
  "$ref": "#/components/parameters/ApiComment"
@@ -6594,7 +6636,7 @@
6594
6636
  "api_key": []
6595
6637
  }
6596
6638
  ],
6597
- "x-stability": "Unstable"
6639
+ "x-stability": "Stable"
6598
6640
  }
6599
6641
  },
6600
6642
  "/company/employees": {
@@ -6636,7 +6678,7 @@
6636
6678
  "api_key": []
6637
6679
  }
6638
6680
  ],
6639
- "x-stability": "Unstable"
6681
+ "x-stability": "Stable"
6640
6682
  }
6641
6683
  },
6642
6684
  "/company/{id}/employees": {
@@ -6687,7 +6729,7 @@
6687
6729
  "api_key": []
6688
6730
  }
6689
6731
  ],
6690
- "x-stability": "Unstable"
6732
+ "x-stability": "Stable"
6691
6733
  }
6692
6734
  },
6693
6735
  "/company/news": {
@@ -6750,7 +6792,7 @@
6750
6792
  "api_key": []
6751
6793
  }
6752
6794
  ],
6753
- "x-stability": "Unstable"
6795
+ "x-stability": "Stable"
6754
6796
  }
6755
6797
  },
6756
6798
  "/company/{typeId}/companies": {
@@ -6807,7 +6849,7 @@
6807
6849
  "api_key": []
6808
6850
  }
6809
6851
  ],
6810
- "x-stability": "Unstable"
6852
+ "x-stability": "Stable"
6811
6853
  }
6812
6854
  },
6813
6855
  "/company/profile": {
@@ -6849,7 +6891,7 @@
6849
6891
  "api_key": []
6850
6892
  }
6851
6893
  ],
6852
- "x-stability": "Unstable"
6894
+ "x-stability": "Stable"
6853
6895
  }
6854
6896
  },
6855
6897
  "/company/{id}/profile": {
@@ -6900,7 +6942,7 @@
6900
6942
  "api_key": []
6901
6943
  }
6902
6944
  ],
6903
- "x-stability": "Unstable"
6945
+ "x-stability": "Stable"
6904
6946
  }
6905
6947
  },
6906
6948
  "/company/search": {
@@ -6951,7 +6993,7 @@
6951
6993
  "api_key": []
6952
6994
  }
6953
6995
  ],
6954
- "x-stability": "Unstable"
6996
+ "x-stability": "Stable"
6955
6997
  }
6956
6998
  },
6957
6999
  "/company/snapshot": {
@@ -6964,7 +7006,7 @@
6964
7006
  "operationId": "getCompaniesSnapshot",
6965
7007
  "parameters": [
6966
7008
  {
6967
- "$ref": "#/components/parameters/ApiTimestamp"
7009
+ "$ref": "#/components/parameters/ApiTimestampSpecificPointInTime"
6968
7010
  },
6969
7011
  {
6970
7012
  "$ref": "#/components/parameters/ApiComment"
@@ -6991,7 +7033,7 @@
6991
7033
  "api_key": []
6992
7034
  }
6993
7035
  ],
6994
- "x-stability": "Unstable"
7036
+ "x-stability": "Stable"
6995
7037
  }
6996
7038
  },
6997
7039
  "/company/stock": {
@@ -7030,7 +7072,7 @@
7030
7072
  "api_key": []
7031
7073
  }
7032
7074
  ],
7033
- "x-stability": "Unstable"
7075
+ "x-stability": "Stable"
7034
7076
  }
7035
7077
  },
7036
7078
  "/company/lookup": {
@@ -8217,6 +8259,45 @@
8217
8259
  "x-stability": "Stable"
8218
8260
  }
8219
8261
  },
8262
+ "/market/pointsmarket": {
8263
+ "get": {
8264
+ "tags": [
8265
+ "Market"
8266
+ ],
8267
+ "summary": "Get points market listings",
8268
+ "description": "Requires public access key. <br>",
8269
+ "operationId": "getMarketPoints",
8270
+ "parameters": [
8271
+ {
8272
+ "$ref": "#/components/parameters/ApiTimestamp"
8273
+ },
8274
+ {
8275
+ "$ref": "#/components/parameters/ApiComment"
8276
+ },
8277
+ {
8278
+ "$ref": "#/components/parameters/ApiKeyPublic"
8279
+ }
8280
+ ],
8281
+ "responses": {
8282
+ "200": {
8283
+ "description": "Successful operation",
8284
+ "content": {
8285
+ "application/json": {
8286
+ "schema": {
8287
+ "$ref": "#/components/schemas/PointsMarketResponse"
8288
+ }
8289
+ }
8290
+ }
8291
+ }
8292
+ },
8293
+ "security": [
8294
+ {
8295
+ "api_key": []
8296
+ }
8297
+ ],
8298
+ "x-stability": "Unstable"
8299
+ }
8300
+ },
8220
8301
  "/market/{propertyTypeId}/rentals": {
8221
8302
  "get": {
8222
8303
  "tags": [
@@ -8480,6 +8561,9 @@
8480
8561
  {
8481
8562
  "$ref": "#/components/schemas/AuctionHouseListingResponse"
8482
8563
  },
8564
+ {
8565
+ "$ref": "#/components/schemas/PointsMarketResponse"
8566
+ },
8483
8567
  {
8484
8568
  "$ref": "#/components/schemas/MarketPropertiesResponse"
8485
8569
  },
@@ -10272,7 +10356,7 @@
10272
10356
  "api_key": []
10273
10357
  }
10274
10358
  ],
10275
- "x-stability": "Unstable"
10359
+ "x-stability": "Stable"
10276
10360
  }
10277
10361
  },
10278
10362
  "/torn/organizedcrimes": {
@@ -18266,6 +18350,77 @@
18266
18350
  }
18267
18351
  ]
18268
18352
  },
18353
+ "UserPerksResponse": {
18354
+ "required": [
18355
+ "perks"
18356
+ ],
18357
+ "properties": {
18358
+ "perks": {
18359
+ "required": [
18360
+ "faction",
18361
+ "job",
18362
+ "property",
18363
+ "education",
18364
+ "enhancer",
18365
+ "book",
18366
+ "stock",
18367
+ "merit"
18368
+ ],
18369
+ "properties": {
18370
+ "faction": {
18371
+ "type": "array",
18372
+ "items": {
18373
+ "type": "string"
18374
+ }
18375
+ },
18376
+ "job": {
18377
+ "type": "array",
18378
+ "items": {
18379
+ "type": "string"
18380
+ }
18381
+ },
18382
+ "property": {
18383
+ "type": "array",
18384
+ "items": {
18385
+ "type": "string"
18386
+ }
18387
+ },
18388
+ "education": {
18389
+ "type": "array",
18390
+ "items": {
18391
+ "type": "string"
18392
+ }
18393
+ },
18394
+ "enhancer": {
18395
+ "type": "array",
18396
+ "items": {
18397
+ "type": "string"
18398
+ }
18399
+ },
18400
+ "book": {
18401
+ "type": "array",
18402
+ "items": {
18403
+ "type": "string"
18404
+ }
18405
+ },
18406
+ "stock": {
18407
+ "type": "array",
18408
+ "items": {
18409
+ "type": "string"
18410
+ }
18411
+ },
18412
+ "merit": {
18413
+ "type": "array",
18414
+ "items": {
18415
+ "type": "string"
18416
+ }
18417
+ }
18418
+ },
18419
+ "type": "object"
18420
+ }
18421
+ },
18422
+ "type": "object"
18423
+ },
18269
18424
  "UserNetworthResponse": {
18270
18425
  "required": [
18271
18426
  "networth"
@@ -30757,6 +30912,44 @@
30757
30912
  }
30758
30913
  ]
30759
30914
  },
30915
+ "PointsMarketResponse": {
30916
+ "required": [
30917
+ "pointsmarket"
30918
+ ],
30919
+ "properties": {
30920
+ "pointsmarket": {
30921
+ "type": "array",
30922
+ "items": {
30923
+ "required": [
30924
+ "id",
30925
+ "quantity",
30926
+ "cost",
30927
+ "total_cost"
30928
+ ],
30929
+ "properties": {
30930
+ "id": {
30931
+ "type": "integer",
30932
+ "format": "int32"
30933
+ },
30934
+ "quantity": {
30935
+ "type": "integer",
30936
+ "format": "int32"
30937
+ },
30938
+ "cost": {
30939
+ "type": "integer",
30940
+ "format": "int32"
30941
+ },
30942
+ "total_cost": {
30943
+ "type": "integer",
30944
+ "format": "int64"
30945
+ }
30946
+ },
30947
+ "type": "object"
30948
+ }
30949
+ }
30950
+ },
30951
+ "type": "object"
30952
+ },
30760
30953
  "AuctionHouseStackableItem": {
30761
30954
  "required": [
30762
30955
  "id",
@@ -31533,18 +31726,17 @@
31533
31726
  "MarketSelectionName": {
31534
31727
  "oneOf": [
31535
31728
  {
31536
- "description": "The following selections will fallback to API v1 and may change at any time: 'pointsmarket'.",
31537
31729
  "type": "string",
31538
31730
  "enum": [
31731
+ "auctionhouse",
31732
+ "auctionhouselisting",
31539
31733
  "bazaar",
31540
31734
  "itemmarket",
31735
+ "pointsmarket",
31541
31736
  "properties",
31542
31737
  "rentals",
31543
31738
  "lookup",
31544
- "timestamp",
31545
- "pointsmarket",
31546
- "auctionhouse",
31547
- "auctionhouselisting"
31739
+ "timestamp"
31548
31740
  ]
31549
31741
  },
31550
31742
  {
@@ -34693,7 +34885,24 @@
34693
34885
  "ApiTimestamp": {
34694
34886
  "name": "timestamp",
34695
34887
  "in": "query",
34696
- "description": "Timestamp to bypass cache or get the data in specific point in time",
34888
+ "description": "Timestamp to bypass cache",
34889
+ "required": false,
34890
+ "schema": {
34891
+ "oneOf": [
34892
+ {
34893
+ "type": "integer",
34894
+ "format": "int32"
34895
+ },
34896
+ {
34897
+ "type": "string"
34898
+ }
34899
+ ]
34900
+ }
34901
+ },
34902
+ "ApiTimestampSpecificPointInTime": {
34903
+ "name": "timestamp",
34904
+ "in": "query",
34905
+ "description": "Timestamp to get the data in specific point in time",
34697
34906
  "required": false,
34698
34907
  "schema": {
34699
34908
  "oneOf": [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "6.4.0",
4
+ "version": "6.6.0",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/Torn-Playground/tornapi-typescript.git"
7
7
  },