tornapi-typescript 1.11.2 → 1.11.3

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
@@ -5486,7 +5486,7 @@ export interface UserListResponse {
5486
5486
  _metadata: RequestMetadataWithLinks;
5487
5487
  }
5488
5488
 
5489
- /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','basic','battlestats','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','jobpoints','log','medals','merits','messages','missions','money','networth','newevents','newmessages','notifications','perks','profile','properties','refills','reports','skills','stocks','travel','weaponexp','workstats'. */
5489
+ /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','basic','battlestats','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','jobpoints','log','medals','merits','messages','missions','money','networth','newevents','newmessages','notifications','perks','profile','refills','reports','skills','stocks','travel','weaponexp','workstats'. */
5490
5490
  export type UserSelectionName = string;
5491
5491
 
5492
5492
  export interface UserLookupResponse {
@@ -7489,6 +7489,20 @@ export interface MarketLookupResponse {
7489
7489
  selections: MarketSelectionName[];
7490
7490
  }
7491
7491
 
7492
+ export interface UserRacingRecordsResponse {
7493
+ racingrecords: {
7494
+ track: {
7495
+ id: RaceTrackId;
7496
+ name: string;
7497
+ };
7498
+ records: {
7499
+ car_id: ItemId;
7500
+ car_name: string;
7501
+ lap_time: number;
7502
+ }[];
7503
+ }[];
7504
+ }
7505
+
7492
7506
  export interface RacingCarsResponse {
7493
7507
  cars: RaceCar[];
7494
7508
  }
@@ -7573,6 +7587,7 @@ export interface Race {
7573
7587
  requires_password: boolean;
7574
7588
  join_fee: number;
7575
7589
  };
7590
+ is_official: boolean;
7576
7591
  }
7577
7592
 
7578
7593
  export interface RacingTrackRecordsResponse {
@@ -7613,6 +7628,12 @@ export interface RacingLookupResponse {
7613
7628
  selections: RacingSelectionName[];
7614
7629
  }
7615
7630
 
7631
+ export type PropertySelectionName = string;
7632
+
7633
+ export interface PropertyLookupResponse {
7634
+ selections: PropertySelectionName[];
7635
+ }
7636
+
7616
7637
  export interface TornProperties {
7617
7638
  properties?: {
7618
7639
  id: PropertyTypeId;
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": "1.11.2"
6
+ "version": "1.11.3"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -1407,6 +1407,45 @@
1407
1407
  "x-stability": "Stable"
1408
1408
  }
1409
1409
  },
1410
+ "/user/racingrecords": {
1411
+ "get": {
1412
+ "tags": [
1413
+ "User"
1414
+ ],
1415
+ "summary": "Get your current racing records",
1416
+ "description": "Requires minimal access key. <br>",
1417
+ "operationId": "e1b2c1039ea41f7607b9c94660fc72cb",
1418
+ "parameters": [
1419
+ {
1420
+ "$ref": "#/components/parameters/ApiTimestamp"
1421
+ },
1422
+ {
1423
+ "$ref": "#/components/parameters/ApiComment"
1424
+ },
1425
+ {
1426
+ "$ref": "#/components/parameters/ApiKeyMinimal"
1427
+ }
1428
+ ],
1429
+ "responses": {
1430
+ "200": {
1431
+ "description": "Successful operation",
1432
+ "content": {
1433
+ "application/json": {
1434
+ "schema": {
1435
+ "$ref": "#/components/schemas/UserRacingRecordsResponse"
1436
+ }
1437
+ }
1438
+ }
1439
+ }
1440
+ },
1441
+ "security": [
1442
+ {
1443
+ "api_key": []
1444
+ }
1445
+ ],
1446
+ "x-stability": "Unstable"
1447
+ }
1448
+ },
1410
1449
  "/user/reports": {
1411
1450
  "get": {
1412
1451
  "tags": [
@@ -1799,6 +1838,9 @@
1799
1838
  {
1800
1839
  "$ref": "#/components/schemas/UserCalendarResponse"
1801
1840
  },
1841
+ {
1842
+ "$ref": "#/components/schemas/UserRacingRecordsResponse"
1843
+ },
1802
1844
  {
1803
1845
  "$ref": "#/components/schemas/UserEducationResponse"
1804
1846
  },
@@ -5566,7 +5608,7 @@
5566
5608
  "Racing"
5567
5609
  ],
5568
5610
  "summary": "Get track records",
5569
- "description": "Requires public access key. <br>Returns a list of 10 best lap records for the chosen track and car class. Results are cached globally 1 hour.",
5611
+ "description": "Requires public access key. <br>Returns a list of 5 best lap records for the chosen track and car class.",
5570
5612
  "operationId": "5fbc62db3b9380b155d7e33100620da7",
5571
5613
  "parameters": [
5572
5614
  {
@@ -5907,6 +5949,156 @@
5907
5949
  "x-stability": "Unstable"
5908
5950
  }
5909
5951
  },
5952
+ "/property/lookup": {
5953
+ "get": {
5954
+ "tags": [
5955
+ "Property"
5956
+ ],
5957
+ "summary": "Get all available property selections",
5958
+ "description": "Requires public access key. <br>",
5959
+ "operationId": "87fe6e3a7ec186e108922fed781c8d6d",
5960
+ "parameters": [
5961
+ {
5962
+ "$ref": "#/components/parameters/ApiTimestamp"
5963
+ },
5964
+ {
5965
+ "$ref": "#/components/parameters/ApiComment"
5966
+ },
5967
+ {
5968
+ "$ref": "#/components/parameters/ApiKeyPublic"
5969
+ }
5970
+ ],
5971
+ "responses": {
5972
+ "200": {
5973
+ "description": "Successful operation",
5974
+ "content": {
5975
+ "application/json": {
5976
+ "schema": {
5977
+ "$ref": "#/components/schemas/PropertyLookupResponse"
5978
+ }
5979
+ }
5980
+ }
5981
+ }
5982
+ },
5983
+ "security": [
5984
+ {
5985
+ "api_key": []
5986
+ }
5987
+ ],
5988
+ "x-stability": "Stable"
5989
+ }
5990
+ },
5991
+ "/property/timestamp": {
5992
+ "get": {
5993
+ "tags": [
5994
+ "Property"
5995
+ ],
5996
+ "summary": "Get current server time",
5997
+ "description": "Requires public access key. <br>",
5998
+ "operationId": "423c130a5cdf6bc801c42537c07fddec",
5999
+ "parameters": [
6000
+ {
6001
+ "$ref": "#/components/parameters/ApiTimestamp"
6002
+ },
6003
+ {
6004
+ "$ref": "#/components/parameters/ApiComment"
6005
+ },
6006
+ {
6007
+ "$ref": "#/components/parameters/ApiKeyPublic"
6008
+ }
6009
+ ],
6010
+ "responses": {
6011
+ "200": {
6012
+ "description": "Successful operation",
6013
+ "content": {
6014
+ "application/json": {
6015
+ "schema": {
6016
+ "$ref": "#/components/schemas/TimestampResponse"
6017
+ }
6018
+ }
6019
+ }
6020
+ }
6021
+ },
6022
+ "security": [
6023
+ {
6024
+ "api_key": []
6025
+ }
6026
+ ],
6027
+ "x-stability": "Stable"
6028
+ }
6029
+ },
6030
+ "/property": {
6031
+ "get": {
6032
+ "tags": [
6033
+ "Property"
6034
+ ],
6035
+ "summary": "Get any property selection",
6036
+ "description": "Requires public access key. <br>Choose one or more selections (comma separated).",
6037
+ "operationId": "2a45b6d9d77224d9a1e13d0b698f6c4b",
6038
+ "parameters": [
6039
+ {
6040
+ "name": "selections",
6041
+ "in": "query",
6042
+ "description": "Selection names",
6043
+ "required": false,
6044
+ "style": "form",
6045
+ "explode": false,
6046
+ "schema": {
6047
+ "type": "array",
6048
+ "items": {
6049
+ "$ref": "#/components/schemas/PropertySelectionName"
6050
+ }
6051
+ }
6052
+ },
6053
+ {
6054
+ "name": "id",
6055
+ "in": "path",
6056
+ "description": "Property id",
6057
+ "required": true,
6058
+ "schema": {
6059
+ "$ref": "#/components/schemas/PropertyId"
6060
+ }
6061
+ },
6062
+ {
6063
+ "$ref": "#/components/parameters/ApiTimestamp"
6064
+ },
6065
+ {
6066
+ "$ref": "#/components/parameters/ApiComment"
6067
+ },
6068
+ {
6069
+ "$ref": "#/components/parameters/ApiKeyPublic"
6070
+ }
6071
+ ],
6072
+ "responses": {
6073
+ "200": {
6074
+ "description": "Successful operation",
6075
+ "content": {
6076
+ "application/json": {
6077
+ "schema": {
6078
+ "anyOf": [
6079
+ {
6080
+ "$ref": "#/components/schemas/UserPropertyResponse"
6081
+ },
6082
+ {
6083
+ "$ref": "#/components/schemas/PropertyLookupResponse"
6084
+ },
6085
+ {
6086
+ "$ref": "#/components/schemas/TimestampResponse"
6087
+ }
6088
+ ]
6089
+ }
6090
+ }
6091
+ }
6092
+ }
6093
+ },
6094
+ "security": [
6095
+ {
6096
+ "api_key": []
6097
+ }
6098
+ ],
6099
+ "x-stability": "Stable"
6100
+ }
6101
+ },
5910
6102
  "/torn/attacklog": {
5911
6103
  "get": {
5912
6104
  "tags": [
@@ -14881,7 +15073,7 @@
14881
15073
  "UserSelectionName": {
14882
15074
  "oneOf": [
14883
15075
  {
14884
- "description": "The following selections will fallback to API v1 and may change at any time: 'ammo','bars','basic','battlestats','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','jobpoints','log','medals','merits','messages','missions','money','networth','newevents','newmessages','notifications','perks','profile','properties','refills','reports','skills','stocks','travel','weaponexp','workstats'.",
15076
+ "description": "The following selections will fallback to API v1 and may change at any time: 'ammo','bars','basic','battlestats','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','jobpoints','log','medals','merits','messages','missions','money','networth','newevents','newmessages','notifications','perks','profile','refills','reports','skills','stocks','travel','weaponexp','workstats'.",
14885
15077
  "type": "string",
14886
15078
  "enum": [
14887
15079
  "attacks",
@@ -14903,7 +15095,10 @@
14903
15095
  "lookup",
14904
15096
  "organizedcrime",
14905
15097
  "personalstats",
15098
+ "properties",
15099
+ "property",
14906
15100
  "races",
15101
+ "racingrecords",
14907
15102
  "revives",
14908
15103
  "revivesfull",
14909
15104
  "timestamp",
@@ -14936,7 +15131,6 @@
14936
15131
  "notifications",
14937
15132
  "perks",
14938
15133
  "profile",
14939
- "properties",
14940
15134
  "refills",
14941
15135
  "reports",
14942
15136
  "skills",
@@ -22425,6 +22619,8 @@
22425
22619
  "enum": [
22426
22620
  "bazaar",
22427
22621
  "itemmarket",
22622
+ "properties",
22623
+ "rentals",
22428
22624
  "lookup",
22429
22625
  "timestamp",
22430
22626
  "pointsmarket"
@@ -22449,6 +22645,64 @@
22449
22645
  },
22450
22646
  "type": "object"
22451
22647
  },
22648
+ "UserRacingRecordsResponse": {
22649
+ "required": [
22650
+ "racingrecords"
22651
+ ],
22652
+ "properties": {
22653
+ "racingrecords": {
22654
+ "type": "array",
22655
+ "items": {
22656
+ "required": [
22657
+ "track",
22658
+ "records"
22659
+ ],
22660
+ "properties": {
22661
+ "track": {
22662
+ "required": [
22663
+ "id",
22664
+ "name"
22665
+ ],
22666
+ "properties": {
22667
+ "id": {
22668
+ "$ref": "#/components/schemas/RaceTrackId"
22669
+ },
22670
+ "name": {
22671
+ "type": "string"
22672
+ }
22673
+ },
22674
+ "type": "object"
22675
+ },
22676
+ "records": {
22677
+ "type": "array",
22678
+ "items": {
22679
+ "required": [
22680
+ "car_id",
22681
+ "car_name",
22682
+ "lap_time"
22683
+ ],
22684
+ "properties": {
22685
+ "car_id": {
22686
+ "$ref": "#/components/schemas/ItemId"
22687
+ },
22688
+ "car_name": {
22689
+ "type": "string"
22690
+ },
22691
+ "lap_time": {
22692
+ "type": "integer",
22693
+ "format": "int32"
22694
+ }
22695
+ },
22696
+ "type": "object"
22697
+ }
22698
+ }
22699
+ },
22700
+ "type": "object"
22701
+ }
22702
+ }
22703
+ },
22704
+ "type": "object"
22705
+ },
22452
22706
  "RacingCarsResponse": {
22453
22707
  "required": [
22454
22708
  "cars"
@@ -22684,7 +22938,8 @@
22684
22938
  "laps",
22685
22939
  "participants",
22686
22940
  "schedule",
22687
- "requirements"
22941
+ "requirements",
22942
+ "is_official"
22688
22943
  ],
22689
22944
  "properties": {
22690
22945
  "id": {
@@ -22814,6 +23069,9 @@
22814
23069
  }
22815
23070
  },
22816
23071
  "type": "object"
23072
+ },
23073
+ "is_official": {
23074
+ "type": "boolean"
22817
23075
  }
22818
23076
  },
22819
23077
  "type": "object"
@@ -23010,6 +23268,35 @@
23010
23268
  },
23011
23269
  "type": "object"
23012
23270
  },
23271
+ "PropertySelectionName": {
23272
+ "oneOf": [
23273
+ {
23274
+ "type": "string",
23275
+ "enum": [
23276
+ "property",
23277
+ "lookup",
23278
+ "timestamp"
23279
+ ]
23280
+ },
23281
+ {
23282
+ "type": "string"
23283
+ }
23284
+ ]
23285
+ },
23286
+ "PropertyLookupResponse": {
23287
+ "required": [
23288
+ "selections"
23289
+ ],
23290
+ "properties": {
23291
+ "selections": {
23292
+ "type": "array",
23293
+ "items": {
23294
+ "$ref": "#/components/schemas/PropertySelectionName"
23295
+ }
23296
+ }
23297
+ },
23298
+ "type": "object"
23299
+ },
23013
23300
  "TornProperties": {
23014
23301
  "properties": {
23015
23302
  "properties": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "1.11.2",
4
+ "version": "1.11.3",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },