tornapi-typescript 6.4.0 → 6.5.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: {
@@ -7274,6 +7286,10 @@ export interface UserV2 extends BaseSchema {
7274
7286
  response: UserOrganizedCrimesResponse;
7275
7287
  params: "timestamp";
7276
7288
  };
7289
+ perks: {
7290
+ response: UserPerksResponse;
7291
+ params: "timestamp";
7292
+ };
7277
7293
  personalstats: {
7278
7294
  response: UserPersonalStatsResponse;
7279
7295
  params: "cat" | "stat" | "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: {
@@ -13169,6 +13182,10 @@ export interface UserV2 extends BaseSchema {
13169
13182
  response: UserOrganizedCrimesResponse;
13170
13183
  params: "timestamp";
13171
13184
  };
13185
+ perks: {
13186
+ response: UserPerksResponse;
13187
+ params: "timestamp";
13188
+ };
13172
13189
  personalstats: {
13173
13190
  response: UserPersonalStatsResponse;
13174
13191
  params: "cat" | "stat" | "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.4.0"
6
+ "version": "6.5.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": {
@@ -10272,7 +10314,7 @@
10272
10314
  "api_key": []
10273
10315
  }
10274
10316
  ],
10275
- "x-stability": "Unstable"
10317
+ "x-stability": "Stable"
10276
10318
  }
10277
10319
  },
10278
10320
  "/torn/organizedcrimes": {
@@ -18266,6 +18308,77 @@
18266
18308
  }
18267
18309
  ]
18268
18310
  },
18311
+ "UserPerksResponse": {
18312
+ "required": [
18313
+ "perks"
18314
+ ],
18315
+ "properties": {
18316
+ "perks": {
18317
+ "required": [
18318
+ "faction",
18319
+ "job",
18320
+ "property",
18321
+ "education",
18322
+ "enhancer",
18323
+ "book",
18324
+ "stock",
18325
+ "merit"
18326
+ ],
18327
+ "properties": {
18328
+ "faction": {
18329
+ "type": "array",
18330
+ "items": {
18331
+ "type": "string"
18332
+ }
18333
+ },
18334
+ "job": {
18335
+ "type": "array",
18336
+ "items": {
18337
+ "type": "string"
18338
+ }
18339
+ },
18340
+ "property": {
18341
+ "type": "array",
18342
+ "items": {
18343
+ "type": "string"
18344
+ }
18345
+ },
18346
+ "education": {
18347
+ "type": "array",
18348
+ "items": {
18349
+ "type": "string"
18350
+ }
18351
+ },
18352
+ "enhancer": {
18353
+ "type": "array",
18354
+ "items": {
18355
+ "type": "string"
18356
+ }
18357
+ },
18358
+ "book": {
18359
+ "type": "array",
18360
+ "items": {
18361
+ "type": "string"
18362
+ }
18363
+ },
18364
+ "stock": {
18365
+ "type": "array",
18366
+ "items": {
18367
+ "type": "string"
18368
+ }
18369
+ },
18370
+ "merit": {
18371
+ "type": "array",
18372
+ "items": {
18373
+ "type": "string"
18374
+ }
18375
+ }
18376
+ },
18377
+ "type": "object"
18378
+ }
18379
+ },
18380
+ "type": "object"
18381
+ },
18269
18382
  "UserNetworthResponse": {
18270
18383
  "required": [
18271
18384
  "networth"
@@ -34693,7 +34806,24 @@
34693
34806
  "ApiTimestamp": {
34694
34807
  "name": "timestamp",
34695
34808
  "in": "query",
34696
- "description": "Timestamp to bypass cache or get the data in specific point in time",
34809
+ "description": "Timestamp to bypass cache",
34810
+ "required": false,
34811
+ "schema": {
34812
+ "oneOf": [
34813
+ {
34814
+ "type": "integer",
34815
+ "format": "int32"
34816
+ },
34817
+ {
34818
+ "type": "string"
34819
+ }
34820
+ ]
34821
+ }
34822
+ },
34823
+ "ApiTimestampSpecificPointInTime": {
34824
+ "name": "timestamp",
34825
+ "in": "query",
34826
+ "description": "Timestamp to get the data in specific point in time",
34697
34827
  "required": false,
34698
34828
  "schema": {
34699
34829
  "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.5.0",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/Torn-Playground/tornapi-typescript.git"
7
7
  },