tornapi-typescript 0.2.9 → 1.10.2

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
@@ -4201,6 +4201,32 @@ export type FactionBranchStateEnum = "war" | "peace";
4201
4201
 
4202
4202
  export type RacingRaceTypeEnum = "official" | "custom";
4203
4203
 
4204
+ export type MarketSpecializedBazaarCategoryEnum =
4205
+ | "Alcohol"
4206
+ | "Artifact"
4207
+ | "Booster"
4208
+ | "Candy"
4209
+ | "Car"
4210
+ | "Clothing"
4211
+ | "Collectible"
4212
+ | "Defensive"
4213
+ | "Drug"
4214
+ | "Energy Drink"
4215
+ | "Enhancer"
4216
+ | "Flower"
4217
+ | "Jewelry"
4218
+ | "Material"
4219
+ | "Medical"
4220
+ | "Melee"
4221
+ | "Other"
4222
+ | "Plushie"
4223
+ | "Primary"
4224
+ | "Secondary"
4225
+ | "Special"
4226
+ | "Supply Pack"
4227
+ | "Temporary"
4228
+ | "Tool";
4229
+
4204
4230
  export type FactionPositionAbilityEnum =
4205
4231
  | "Medical Item Usage"
4206
4232
  | "Booster Item Usage"
@@ -4847,6 +4873,7 @@ export interface Revive {
4847
4873
  id: FactionId;
4848
4874
  name: string;
4849
4875
  } | null;
4876
+ skill: number | null;
4850
4877
  };
4851
4878
  target: {
4852
4879
  id: UserId;
@@ -7201,6 +7228,67 @@ export interface KeyInfoResponse {
7201
7228
 
7202
7229
  export type KeySelectionName = string;
7203
7230
 
7231
+ export interface BazaarWeekly {
7232
+ busiest: BazaarWeeklyCustomers[];
7233
+ most_popular: BazaarTotalFavorites[];
7234
+ trending: BazaarRecentFavorites[];
7235
+ top_grossing: BazaarWeeklyIncome[];
7236
+ bulk: BazaarBulkSales[];
7237
+ advanced_item: BazaarAdvancedItemSales[];
7238
+ bargain: BazaarBargainSales[];
7239
+ dollar_sale: BazaarDollarSales[];
7240
+ }
7241
+
7242
+ export interface BazaarSpecialized {
7243
+ specialized: BazaarWeeklyCustomers[];
7244
+ }
7245
+
7246
+ export interface BazaarResponse {
7247
+ bazaar: BazaarWeekly | BazaarSpecialized;
7248
+ }
7249
+
7250
+ export interface BazaarResponseSpecialized {
7251
+ bazaar: BazaarSpecialized;
7252
+ }
7253
+
7254
+ export interface Bazaar {
7255
+ id: UserId;
7256
+ name: string;
7257
+ is_open: boolean;
7258
+ }
7259
+
7260
+ export interface BazaarWeeklyCustomers extends Bazaar {
7261
+ weekly_customers: number;
7262
+ }
7263
+
7264
+ export interface BazaarTotalFavorites extends Bazaar {
7265
+ total_favorites: number;
7266
+ }
7267
+
7268
+ export interface BazaarRecentFavorites extends Bazaar {
7269
+ recent_favorites: number;
7270
+ }
7271
+
7272
+ export interface BazaarWeeklyIncome extends Bazaar {
7273
+ weekly_income: number;
7274
+ }
7275
+
7276
+ export interface BazaarBulkSales extends Bazaar {
7277
+ bulk_sales: number;
7278
+ }
7279
+
7280
+ export interface BazaarAdvancedItemSales extends Bazaar {
7281
+ advanced_item_sales: number;
7282
+ }
7283
+
7284
+ export interface BazaarBargainSales extends Bazaar {
7285
+ bargain_sales: number;
7286
+ }
7287
+
7288
+ export interface BazaarDollarSales extends Bazaar {
7289
+ dollar_sales: number;
7290
+ }
7291
+
7204
7292
  export interface ItemMarketListingItemBonus {
7205
7293
  id: number;
7206
7294
  title: string;
@@ -7373,6 +7461,7 @@ export interface RacerDetails {
7373
7461
  export interface RacingRaceDetailsResponse {
7374
7462
  race?: Race & {
7375
7463
  results: RacerDetails[];
7464
+ is_official: boolean;
7376
7465
  };
7377
7466
  }
7378
7467
 
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.9.0"
6
+ "version": "1.10.2"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -4677,6 +4677,102 @@
4677
4677
  "x-stability": "Stable"
4678
4678
  }
4679
4679
  },
4680
+ "/market/bazaar": {
4681
+ "get": {
4682
+ "tags": [
4683
+ "Market"
4684
+ ],
4685
+ "summary": "Get bazaar directory",
4686
+ "description": "Requires public access key. <br> The default response is of type 'BazaarWeekly', but if a category is chosen, the response will be of type 'BazaarSpecialized'.",
4687
+ "operationId": "422876deda064e2f3a2cc3c4bf6d73a9",
4688
+ "parameters": [
4689
+ {
4690
+ "name": "cat",
4691
+ "in": "query",
4692
+ "description": "Category of specialized bazaars returned",
4693
+ "required": false,
4694
+ "schema": {
4695
+ "$ref": "#/components/schemas/MarketSpecializedBazaarCategoryEnum"
4696
+ }
4697
+ },
4698
+ {
4699
+ "$ref": "#/components/parameters/ApiTimestamp"
4700
+ },
4701
+ {
4702
+ "$ref": "#/components/parameters/ApiComment"
4703
+ },
4704
+ {
4705
+ "$ref": "#/components/parameters/ApiKeyPublic"
4706
+ }
4707
+ ],
4708
+ "responses": {
4709
+ "200": {
4710
+ "description": "Successful operation",
4711
+ "content": {
4712
+ "application/json": {
4713
+ "schema": {
4714
+ "$ref": "#/components/schemas/BazaarResponse"
4715
+ }
4716
+ }
4717
+ }
4718
+ }
4719
+ },
4720
+ "security": [
4721
+ {
4722
+ "api_key": []
4723
+ }
4724
+ ],
4725
+ "x-stability": "Unstable"
4726
+ }
4727
+ },
4728
+ "/market/{id}/bazaar": {
4729
+ "get": {
4730
+ "tags": [
4731
+ "Market"
4732
+ ],
4733
+ "summary": "Get item specialized bazaar directory",
4734
+ "description": "Requires public access key. <br>",
4735
+ "operationId": "8254489388603bf1b21740e6f71bef06",
4736
+ "parameters": [
4737
+ {
4738
+ "name": "id",
4739
+ "in": "path",
4740
+ "description": "Item id",
4741
+ "required": true,
4742
+ "schema": {
4743
+ "$ref": "#/components/schemas/ItemId"
4744
+ }
4745
+ },
4746
+ {
4747
+ "$ref": "#/components/parameters/ApiTimestamp"
4748
+ },
4749
+ {
4750
+ "$ref": "#/components/parameters/ApiComment"
4751
+ },
4752
+ {
4753
+ "$ref": "#/components/parameters/ApiKeyPublic"
4754
+ }
4755
+ ],
4756
+ "responses": {
4757
+ "200": {
4758
+ "description": "Successful operation",
4759
+ "content": {
4760
+ "application/json": {
4761
+ "schema": {
4762
+ "$ref": "#/components/schemas/BazaarResponseSpecialized"
4763
+ }
4764
+ }
4765
+ }
4766
+ }
4767
+ },
4768
+ "security": [
4769
+ {
4770
+ "api_key": []
4771
+ }
4772
+ ],
4773
+ "x-stability": "Unstable"
4774
+ }
4775
+ },
4680
4776
  "/market/{id}/itemmarket": {
4681
4777
  "get": {
4682
4778
  "tags": [
@@ -4847,6 +4943,15 @@
4847
4943
  "$ref": "#/components/schemas/ItemId"
4848
4944
  }
4849
4945
  },
4946
+ {
4947
+ "name": "cat",
4948
+ "in": "query",
4949
+ "description": "Category of specialized bazaars returned",
4950
+ "required": false,
4951
+ "schema": {
4952
+ "$ref": "#/components/schemas/MarketSpecializedBazaarCategoryEnum"
4953
+ }
4954
+ },
4850
4955
  {
4851
4956
  "name": "bonus",
4852
4957
  "in": "query",
@@ -4889,6 +4994,12 @@
4889
4994
  "application/json": {
4890
4995
  "schema": {
4891
4996
  "anyOf": [
4997
+ {
4998
+ "$ref": "#/components/schemas/BazaarResponse"
4999
+ },
5000
+ {
5001
+ "$ref": "#/components/schemas/BazaarResponseSpecialized"
5002
+ },
4892
5003
  {
4893
5004
  "$ref": "#/components/schemas/MarketItemMarketResponse"
4894
5005
  },
@@ -10662,6 +10773,35 @@
10662
10773
  "custom"
10663
10774
  ]
10664
10775
  },
10776
+ "MarketSpecializedBazaarCategoryEnum": {
10777
+ "type": "string",
10778
+ "enum": [
10779
+ "Alcohol",
10780
+ "Artifact",
10781
+ "Booster",
10782
+ "Candy",
10783
+ "Car",
10784
+ "Clothing",
10785
+ "Collectible",
10786
+ "Defensive",
10787
+ "Drug",
10788
+ "Energy Drink",
10789
+ "Enhancer",
10790
+ "Flower",
10791
+ "Jewelry",
10792
+ "Material",
10793
+ "Medical",
10794
+ "Melee",
10795
+ "Other",
10796
+ "Plushie",
10797
+ "Primary",
10798
+ "Secondary",
10799
+ "Special",
10800
+ "Supply Pack",
10801
+ "Temporary",
10802
+ "Tool"
10803
+ ]
10804
+ },
10665
10805
  "FactionPositionAbilityEnum": {
10666
10806
  "type": "string",
10667
10807
  "enum": [
@@ -11835,7 +11975,8 @@
11835
11975
  "required": [
11836
11976
  "id",
11837
11977
  "name",
11838
- "faction"
11978
+ "faction",
11979
+ "skill"
11839
11980
  ],
11840
11981
  "properties": {
11841
11982
  "id": {
@@ -11865,6 +12006,18 @@
11865
12006
  "type": "null"
11866
12007
  }
11867
12008
  ]
12009
+ },
12010
+ "skill": {
12011
+ "description": "Entries before 16/06/2025 will have this field set as null.",
12012
+ "oneOf": [
12013
+ {
12014
+ "type": "number",
12015
+ "format": "float"
12016
+ },
12017
+ {
12018
+ "type": "null"
12019
+ }
12020
+ ]
11868
12021
  }
11869
12022
  },
11870
12023
  "type": "object"
@@ -20824,6 +20977,284 @@
20824
20977
  }
20825
20978
  ]
20826
20979
  },
20980
+ "BazaarWeekly": {
20981
+ "required": [
20982
+ "busiest",
20983
+ "most_popular",
20984
+ "trending",
20985
+ "top_grossing",
20986
+ "bulk",
20987
+ "advanced_item",
20988
+ "bargain",
20989
+ "dollar_sale"
20990
+ ],
20991
+ "properties": {
20992
+ "busiest": {
20993
+ "type": "array",
20994
+ "items": {
20995
+ "$ref": "#/components/schemas/BazaarWeeklyCustomers"
20996
+ }
20997
+ },
20998
+ "most_popular": {
20999
+ "type": "array",
21000
+ "items": {
21001
+ "$ref": "#/components/schemas/BazaarTotalFavorites"
21002
+ }
21003
+ },
21004
+ "trending": {
21005
+ "type": "array",
21006
+ "items": {
21007
+ "$ref": "#/components/schemas/BazaarRecentFavorites"
21008
+ }
21009
+ },
21010
+ "top_grossing": {
21011
+ "type": "array",
21012
+ "items": {
21013
+ "$ref": "#/components/schemas/BazaarWeeklyIncome"
21014
+ }
21015
+ },
21016
+ "bulk": {
21017
+ "type": "array",
21018
+ "items": {
21019
+ "$ref": "#/components/schemas/BazaarBulkSales"
21020
+ }
21021
+ },
21022
+ "advanced_item": {
21023
+ "type": "array",
21024
+ "items": {
21025
+ "$ref": "#/components/schemas/BazaarAdvancedItemSales"
21026
+ }
21027
+ },
21028
+ "bargain": {
21029
+ "type": "array",
21030
+ "items": {
21031
+ "$ref": "#/components/schemas/BazaarBargainSales"
21032
+ }
21033
+ },
21034
+ "dollar_sale": {
21035
+ "type": "array",
21036
+ "items": {
21037
+ "$ref": "#/components/schemas/BazaarDollarSales"
21038
+ }
21039
+ }
21040
+ },
21041
+ "type": "object"
21042
+ },
21043
+ "BazaarSpecialized": {
21044
+ "required": [
21045
+ "specialized"
21046
+ ],
21047
+ "properties": {
21048
+ "specialized": {
21049
+ "type": "array",
21050
+ "items": {
21051
+ "$ref": "#/components/schemas/BazaarWeeklyCustomers"
21052
+ }
21053
+ }
21054
+ },
21055
+ "type": "object"
21056
+ },
21057
+ "BazaarResponse": {
21058
+ "required": [
21059
+ "bazaar"
21060
+ ],
21061
+ "properties": {
21062
+ "bazaar": {
21063
+ "description": "If there's a specific item ID passed or a category chosen, the response will be of type 'BazaarSpecialized', otherwise it will be 'BazaarWeekly'.",
21064
+ "oneOf": [
21065
+ {
21066
+ "$ref": "#/components/schemas/BazaarWeekly"
21067
+ },
21068
+ {
21069
+ "$ref": "#/components/schemas/BazaarSpecialized"
21070
+ }
21071
+ ]
21072
+ }
21073
+ },
21074
+ "type": "object"
21075
+ },
21076
+ "BazaarResponseSpecialized": {
21077
+ "required": [
21078
+ "bazaar"
21079
+ ],
21080
+ "properties": {
21081
+ "bazaar": {
21082
+ "$ref": "#/components/schemas/BazaarSpecialized"
21083
+ }
21084
+ },
21085
+ "type": "object"
21086
+ },
21087
+ "Bazaar": {
21088
+ "required": [
21089
+ "id",
21090
+ "name",
21091
+ "is_open"
21092
+ ],
21093
+ "properties": {
21094
+ "id": {
21095
+ "$ref": "#/components/schemas/UserId"
21096
+ },
21097
+ "name": {
21098
+ "type": "string"
21099
+ },
21100
+ "is_open": {
21101
+ "type": "boolean"
21102
+ }
21103
+ },
21104
+ "type": "object"
21105
+ },
21106
+ "BazaarWeeklyCustomers": {
21107
+ "allOf": [
21108
+ {
21109
+ "$ref": "#/components/schemas/Bazaar"
21110
+ },
21111
+ {
21112
+ "required": [
21113
+ "weekly_customers"
21114
+ ],
21115
+ "properties": {
21116
+ "weekly_customers": {
21117
+ "type": "integer",
21118
+ "format": "int32"
21119
+ }
21120
+ },
21121
+ "type": "object"
21122
+ }
21123
+ ]
21124
+ },
21125
+ "BazaarTotalFavorites": {
21126
+ "allOf": [
21127
+ {
21128
+ "$ref": "#/components/schemas/Bazaar"
21129
+ },
21130
+ {
21131
+ "required": [
21132
+ "total_favorites"
21133
+ ],
21134
+ "properties": {
21135
+ "total_favorites": {
21136
+ "type": "integer",
21137
+ "format": "int32"
21138
+ }
21139
+ },
21140
+ "type": "object"
21141
+ }
21142
+ ]
21143
+ },
21144
+ "BazaarRecentFavorites": {
21145
+ "allOf": [
21146
+ {
21147
+ "$ref": "#/components/schemas/Bazaar"
21148
+ },
21149
+ {
21150
+ "required": [
21151
+ "recent_favorites"
21152
+ ],
21153
+ "properties": {
21154
+ "recent_favorites": {
21155
+ "type": "integer",
21156
+ "format": "int32"
21157
+ }
21158
+ },
21159
+ "type": "object"
21160
+ }
21161
+ ]
21162
+ },
21163
+ "BazaarWeeklyIncome": {
21164
+ "allOf": [
21165
+ {
21166
+ "$ref": "#/components/schemas/Bazaar"
21167
+ },
21168
+ {
21169
+ "required": [
21170
+ "weekly_income"
21171
+ ],
21172
+ "properties": {
21173
+ "weekly_income": {
21174
+ "type": "integer",
21175
+ "format": "int64"
21176
+ }
21177
+ },
21178
+ "type": "object"
21179
+ }
21180
+ ]
21181
+ },
21182
+ "BazaarBulkSales": {
21183
+ "allOf": [
21184
+ {
21185
+ "$ref": "#/components/schemas/Bazaar"
21186
+ },
21187
+ {
21188
+ "required": [
21189
+ "bulk_sales"
21190
+ ],
21191
+ "properties": {
21192
+ "bulk_sales": {
21193
+ "type": "integer",
21194
+ "format": "int32"
21195
+ }
21196
+ },
21197
+ "type": "object"
21198
+ }
21199
+ ]
21200
+ },
21201
+ "BazaarAdvancedItemSales": {
21202
+ "allOf": [
21203
+ {
21204
+ "$ref": "#/components/schemas/Bazaar"
21205
+ },
21206
+ {
21207
+ "required": [
21208
+ "advanced_item_sales"
21209
+ ],
21210
+ "properties": {
21211
+ "advanced_item_sales": {
21212
+ "type": "integer",
21213
+ "format": "int32"
21214
+ }
21215
+ },
21216
+ "type": "object"
21217
+ }
21218
+ ]
21219
+ },
21220
+ "BazaarBargainSales": {
21221
+ "allOf": [
21222
+ {
21223
+ "$ref": "#/components/schemas/Bazaar"
21224
+ },
21225
+ {
21226
+ "required": [
21227
+ "bargain_sales"
21228
+ ],
21229
+ "properties": {
21230
+ "bargain_sales": {
21231
+ "type": "integer",
21232
+ "format": "int32"
21233
+ }
21234
+ },
21235
+ "type": "object"
21236
+ }
21237
+ ]
21238
+ },
21239
+ "BazaarDollarSales": {
21240
+ "allOf": [
21241
+ {
21242
+ "$ref": "#/components/schemas/Bazaar"
21243
+ },
21244
+ {
21245
+ "required": [
21246
+ "dollar_sales"
21247
+ ],
21248
+ "properties": {
21249
+ "dollar_sales": {
21250
+ "type": "integer",
21251
+ "format": "int32"
21252
+ }
21253
+ },
21254
+ "type": "object"
21255
+ }
21256
+ ]
21257
+ },
20827
21258
  "ItemMarketListingItemBonus": {
20828
21259
  "required": [
20829
21260
  "id",
@@ -21049,11 +21480,11 @@
21049
21480
  "description": "The following selections will fallback to API v1 and may change at any time: 'pointsmarket'.",
21050
21481
  "type": "string",
21051
21482
  "enum": [
21483
+ "bazaar",
21052
21484
  "itemmarket",
21053
21485
  "lookup",
21054
21486
  "timestamp",
21055
- "pointsmarket",
21056
- "bazaar"
21487
+ "pointsmarket"
21057
21488
  ]
21058
21489
  },
21059
21490
  {
@@ -21581,6 +22012,7 @@
21581
22012
  },
21582
22013
  {
21583
22014
  "required": [
22015
+ "is_official",
21584
22016
  "results"
21585
22017
  ],
21586
22018
  "properties": {
@@ -21589,6 +22021,9 @@
21589
22021
  "items": {
21590
22022
  "$ref": "#/components/schemas/RacerDetails"
21591
22023
  }
22024
+ },
22025
+ "is_official": {
22026
+ "type": "boolean"
21592
22027
  }
21593
22028
  },
21594
22029
  "type": "object"
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "0.2.9",
4
+ "version": "1.10.2",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
- "@scalar/openapi-types": "^0.3.1",
10
- "@types/node": "^22.15.29",
9
+ "@scalar/openapi-types": "^0.3.3",
10
+ "@types/node": "^22.15.31",
11
11
  "prettier": "^3.5.3",
12
12
  "typeconv": "^2.3.1",
13
13
  "typescript": "^5.8.3"
@@ -17,4 +17,4 @@
17
17
  "./dist/index.d.ts",
18
18
  "./dist/openapi.json"
19
19
  ]
20
- }
20
+ }