tornapi-typescript 5.0.3 → 5.1.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/index.d.ts CHANGED
@@ -80,6 +80,7 @@ export type ItemUid = number;
80
80
  export type UserId = number;
81
81
  export type DiscordId = string;
82
82
  export type UserDiscordPathId = UserId | DiscordId;
83
+ export type EliminationTeamId = number;
83
84
  export type UserMessageId = number;
84
85
  export type UserEventId = string;
85
86
  export type UserIconId = number;
@@ -2806,6 +2807,38 @@ export type PropertySelectionName = string;
2806
2807
  export interface PropertyLookupResponse {
2807
2808
  selections: PropertySelectionName[];
2808
2809
  }
2810
+ export interface TornEliminationTeamLeader extends BasicUser {
2811
+ active: boolean;
2812
+ }
2813
+ export interface TornEliminationTeam {
2814
+ id: EliminationTeamId;
2815
+ name: string;
2816
+ participants: number;
2817
+ position: number;
2818
+ score: number;
2819
+ lives: number;
2820
+ wins: number;
2821
+ losses: number;
2822
+ eliminated: boolean;
2823
+ eliminated_timestamp: number | null;
2824
+ leaders: TornEliminationTeamLeader[];
2825
+ }
2826
+ export interface TornEliminationTeamsResponse {
2827
+ elimination: TornEliminationTeam[];
2828
+ }
2829
+ export interface TornEliminationTeamPlayer {
2830
+ id: UserId;
2831
+ name: string;
2832
+ level: number;
2833
+ last_action: UserLastAction;
2834
+ status: UserStatus;
2835
+ attacks: number;
2836
+ score: number;
2837
+ }
2838
+ export interface TornEliminationTeamPlayersResponse {
2839
+ eliminationteam: TornEliminationTeamPlayer[];
2840
+ _metadata: RequestMetadataWithLinks;
2841
+ }
2809
2842
  export interface TornItemDetails extends ItemMarketListingItemDetails {
2810
2843
  id: ItemId;
2811
2844
  name: string;
@@ -5757,7 +5790,7 @@ export interface TornV1 extends BaseSchema {
5757
5790
  circulation: number;
5758
5791
  image: string;
5759
5792
  tradeable: boolean;
5760
- coverage: {
5793
+ coverage?: {
5761
5794
  "Full Body Coverage": number;
5762
5795
  "Heart Coverage": number;
5763
5796
  "Stomach Coverage": number;
@@ -6974,6 +7007,14 @@ export interface TornV2 extends BaseSchema {
6974
7007
  response: TornEducationResponse;
6975
7008
  params: "timestamp";
6976
7009
  };
7010
+ elimination: {
7011
+ response: TornEliminationTeamsResponse;
7012
+ params: "timestamp";
7013
+ };
7014
+ eliminationteam: {
7015
+ response: TornEliminationTeamPlayersResponse;
7016
+ params: "id" | "limit" | "offset" | "timestamp";
7017
+ };
6977
7018
  factionhof: {
6978
7019
  response: TornFactionHofResponse;
6979
7020
  params: "limit" | "offset" | "cat" | "timestamp";
package/dist/index.ts CHANGED
@@ -4775,6 +4775,8 @@ export type DiscordId = string;
4775
4775
 
4776
4776
  export type UserDiscordPathId = UserId | DiscordId;
4777
4777
 
4778
+ export type EliminationTeamId = number;
4779
+
4778
4780
  export type UserMessageId = number;
4779
4781
 
4780
4782
  export type UserEventId = string;
@@ -8427,6 +8429,43 @@ export interface PropertyLookupResponse {
8427
8429
  selections: PropertySelectionName[];
8428
8430
  }
8429
8431
 
8432
+ export interface TornEliminationTeamLeader extends BasicUser {
8433
+ active: boolean;
8434
+ }
8435
+
8436
+ export interface TornEliminationTeam {
8437
+ id: EliminationTeamId;
8438
+ name: string;
8439
+ participants: number;
8440
+ position: number;
8441
+ score: number;
8442
+ lives: number;
8443
+ wins: number;
8444
+ losses: number;
8445
+ eliminated: boolean;
8446
+ eliminated_timestamp: number | null;
8447
+ leaders: TornEliminationTeamLeader[];
8448
+ }
8449
+
8450
+ export interface TornEliminationTeamsResponse {
8451
+ elimination: TornEliminationTeam[];
8452
+ }
8453
+
8454
+ export interface TornEliminationTeamPlayer {
8455
+ id: UserId;
8456
+ name: string;
8457
+ level: number;
8458
+ last_action: UserLastAction;
8459
+ status: UserStatus;
8460
+ attacks: number;
8461
+ score: number;
8462
+ }
8463
+
8464
+ export interface TornEliminationTeamPlayersResponse {
8465
+ eliminationteam: TornEliminationTeamPlayer[];
8466
+ _metadata: RequestMetadataWithLinks;
8467
+ }
8468
+
8430
8469
  export interface TornItemDetails extends ItemMarketListingItemDetails {
8431
8470
  id: ItemId;
8432
8471
  name: string;
@@ -11504,7 +11543,7 @@ export interface TornV1 extends BaseSchema {
11504
11543
  circulation: number;
11505
11544
  image: string;
11506
11545
  tradeable: boolean;
11507
- coverage: {
11546
+ coverage?: {
11508
11547
  "Full Body Coverage": number;
11509
11548
  "Heart Coverage": number;
11510
11549
  "Stomach Coverage": number;
@@ -12798,6 +12837,14 @@ export interface TornV2 extends BaseSchema {
12798
12837
  response: TornEducationResponse;
12799
12838
  params: "timestamp";
12800
12839
  };
12840
+ elimination: {
12841
+ response: TornEliminationTeamsResponse;
12842
+ params: "timestamp";
12843
+ };
12844
+ eliminationteam: {
12845
+ response: TornEliminationTeamPlayersResponse;
12846
+ params: "id" | "limit" | "offset" | "timestamp";
12847
+ };
12801
12848
  factionhof: {
12802
12849
  response: TornFactionHofResponse;
12803
12850
  params: "limit" | "offset" | "cat" | "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": "5.0.3"
6
+ "version": "5.1.1"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -8079,6 +8079,99 @@
8079
8079
  "x-stability": "Stable"
8080
8080
  }
8081
8081
  },
8082
+ "/torn/elimination": {
8083
+ "get": {
8084
+ "tags": [
8085
+ "Torn"
8086
+ ],
8087
+ "summary": "Get current standings for all elimination teams",
8088
+ "description": "Requires public key.",
8089
+ "operationId": "a6ce3192de2a723c7eedef7951eeb258",
8090
+ "parameters": [
8091
+ {
8092
+ "$ref": "#/components/parameters/ApiTimestamp"
8093
+ },
8094
+ {
8095
+ "$ref": "#/components/parameters/ApiComment"
8096
+ },
8097
+ {
8098
+ "$ref": "#/components/parameters/ApiKeyPublic"
8099
+ }
8100
+ ],
8101
+ "responses": {
8102
+ "200": {
8103
+ "description": "Successful operation",
8104
+ "content": {
8105
+ "application/json": {
8106
+ "schema": {
8107
+ "$ref": "#/components/schemas/TornEliminationTeamsResponse"
8108
+ }
8109
+ }
8110
+ }
8111
+ }
8112
+ },
8113
+ "security": [
8114
+ {
8115
+ "api_key": []
8116
+ }
8117
+ ],
8118
+ "x-stability": "Unstable"
8119
+ }
8120
+ },
8121
+ "/torn/{id}/eliminationteam": {
8122
+ "get": {
8123
+ "tags": [
8124
+ "Torn"
8125
+ ],
8126
+ "summary": "Get players in a specific elimination team",
8127
+ "description": "Requires public key.",
8128
+ "operationId": "ccc5b888a920b5c707d97c29b38d6e43",
8129
+ "parameters": [
8130
+ {
8131
+ "name": "id",
8132
+ "in": "path",
8133
+ "description": "Elimination team id",
8134
+ "required": true,
8135
+ "schema": {
8136
+ "$ref": "#/components/schemas/EliminationTeamId"
8137
+ }
8138
+ },
8139
+ {
8140
+ "$ref": "#/components/parameters/ApiLimit100"
8141
+ },
8142
+ {
8143
+ "$ref": "#/components/parameters/ApiOffsetNoDefault"
8144
+ },
8145
+ {
8146
+ "$ref": "#/components/parameters/ApiTimestamp"
8147
+ },
8148
+ {
8149
+ "$ref": "#/components/parameters/ApiComment"
8150
+ },
8151
+ {
8152
+ "$ref": "#/components/parameters/ApiKeyPublic"
8153
+ }
8154
+ ],
8155
+ "responses": {
8156
+ "200": {
8157
+ "description": "Successful operation",
8158
+ "content": {
8159
+ "application/json": {
8160
+ "schema": {
8161
+ "$ref": "#/components/schemas/TornEliminationTeamPlayersResponse"
8162
+ }
8163
+ }
8164
+ }
8165
+ }
8166
+ },
8167
+ "security": [
8168
+ {
8169
+ "api_key": []
8170
+ }
8171
+ ],
8172
+ "x-stability": "Unstable"
8173
+ }
8174
+ },
8082
8175
  "/torn/factionhof": {
8083
8176
  "get": {
8084
8177
  "tags": [
@@ -9116,6 +9209,9 @@
9116
9209
  {
9117
9210
  "$ref": "#/components/schemas/TornCrimeId"
9118
9211
  },
9212
+ {
9213
+ "$ref": "#/components/schemas/EliminationTeamId"
9214
+ },
9119
9215
  {
9120
9216
  "$ref": "#/components/schemas/ItemUid"
9121
9217
  },
@@ -9253,6 +9349,12 @@
9253
9349
  {
9254
9350
  "$ref": "#/components/schemas/TornItemDetailsResponse"
9255
9351
  },
9352
+ {
9353
+ "$ref": "#/components/schemas/TornEliminationTeamsResponse"
9354
+ },
9355
+ {
9356
+ "$ref": "#/components/schemas/TornEliminationTeamPlayersResponse"
9357
+ },
9256
9358
  {
9257
9359
  "$ref": "#/components/schemas/TornMedalsResponse"
9258
9360
  },
@@ -14330,6 +14432,10 @@
14330
14432
  }
14331
14433
  ]
14332
14434
  },
14435
+ "EliminationTeamId": {
14436
+ "type": "integer",
14437
+ "format": "int32"
14438
+ },
14333
14439
  "UserMessageId": {
14334
14440
  "type": "integer",
14335
14441
  "format": "int64"
@@ -28004,6 +28110,162 @@
28004
28110
  },
28005
28111
  "type": "object"
28006
28112
  },
28113
+ "TornEliminationTeamLeader": {
28114
+ "allOf": [
28115
+ {
28116
+ "$ref": "#/components/schemas/BasicUser"
28117
+ },
28118
+ {
28119
+ "required": [
28120
+ "active"
28121
+ ],
28122
+ "properties": {
28123
+ "active": {
28124
+ "type": "boolean"
28125
+ }
28126
+ },
28127
+ "type": "object"
28128
+ }
28129
+ ]
28130
+ },
28131
+ "TornEliminationTeam": {
28132
+ "required": [
28133
+ "id",
28134
+ "name",
28135
+ "participants",
28136
+ "position",
28137
+ "score",
28138
+ "lives",
28139
+ "wins",
28140
+ "losses",
28141
+ "eliminated",
28142
+ "eliminated_timestamp",
28143
+ "leaders"
28144
+ ],
28145
+ "properties": {
28146
+ "id": {
28147
+ "$ref": "#/components/schemas/EliminationTeamId"
28148
+ },
28149
+ "name": {
28150
+ "type": "string"
28151
+ },
28152
+ "participants": {
28153
+ "type": "integer",
28154
+ "format": "int32"
28155
+ },
28156
+ "position": {
28157
+ "type": "integer",
28158
+ "format": "int32"
28159
+ },
28160
+ "score": {
28161
+ "type": "integer",
28162
+ "format": "int32"
28163
+ },
28164
+ "lives": {
28165
+ "type": "integer",
28166
+ "format": "int32"
28167
+ },
28168
+ "wins": {
28169
+ "type": "integer",
28170
+ "format": "int32"
28171
+ },
28172
+ "losses": {
28173
+ "type": "integer",
28174
+ "format": "int32"
28175
+ },
28176
+ "eliminated": {
28177
+ "type": "boolean"
28178
+ },
28179
+ "eliminated_timestamp": {
28180
+ "oneOf": [
28181
+ {
28182
+ "type": "integer",
28183
+ "format": "int32"
28184
+ },
28185
+ {
28186
+ "type": "null"
28187
+ }
28188
+ ]
28189
+ },
28190
+ "leaders": {
28191
+ "type": "array",
28192
+ "items": {
28193
+ "$ref": "#/components/schemas/TornEliminationTeamLeader"
28194
+ }
28195
+ }
28196
+ },
28197
+ "type": "object"
28198
+ },
28199
+ "TornEliminationTeamsResponse": {
28200
+ "required": [
28201
+ "elimination"
28202
+ ],
28203
+ "properties": {
28204
+ "elimination": {
28205
+ "type": "array",
28206
+ "items": {
28207
+ "$ref": "#/components/schemas/TornEliminationTeam"
28208
+ }
28209
+ }
28210
+ },
28211
+ "type": "object"
28212
+ },
28213
+ "TornEliminationTeamPlayer": {
28214
+ "required": [
28215
+ "id",
28216
+ "name",
28217
+ "level",
28218
+ "last_action",
28219
+ "status",
28220
+ "attacks",
28221
+ "score"
28222
+ ],
28223
+ "properties": {
28224
+ "id": {
28225
+ "$ref": "#/components/schemas/UserId"
28226
+ },
28227
+ "name": {
28228
+ "type": "string"
28229
+ },
28230
+ "level": {
28231
+ "type": "integer",
28232
+ "format": "int32"
28233
+ },
28234
+ "last_action": {
28235
+ "$ref": "#/components/schemas/UserLastAction"
28236
+ },
28237
+ "status": {
28238
+ "$ref": "#/components/schemas/UserStatus"
28239
+ },
28240
+ "attacks": {
28241
+ "type": "integer",
28242
+ "format": "int32"
28243
+ },
28244
+ "score": {
28245
+ "type": "integer",
28246
+ "format": "int32"
28247
+ }
28248
+ },
28249
+ "type": "object"
28250
+ },
28251
+ "TornEliminationTeamPlayersResponse": {
28252
+ "required": [
28253
+ "eliminationteam",
28254
+ "_metadata"
28255
+ ],
28256
+ "properties": {
28257
+ "eliminationteam": {
28258
+ "type": "array",
28259
+ "items": {
28260
+ "$ref": "#/components/schemas/TornEliminationTeamPlayer"
28261
+ }
28262
+ },
28263
+ "_metadata": {
28264
+ "$ref": "#/components/schemas/RequestMetadataWithLinks"
28265
+ }
28266
+ },
28267
+ "type": "object"
28268
+ },
28007
28269
  "TornItemDetails": {
28008
28270
  "allOf": [
28009
28271
  {
@@ -29879,6 +30141,8 @@
29879
30141
  "calendar",
29880
30142
  "crimes",
29881
30143
  "education",
30144
+ "elimination",
30145
+ "eliminationteam",
29882
30146
  "factionhof",
29883
30147
  "factiontree",
29884
30148
  "hof",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "5.0.3",
4
+ "version": "5.1.1",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
- "@scalar/openapi-types": "^0.5.2",
10
- "@types/node": "^24.10.1",
9
+ "@scalar/openapi-types": "^0.5.3",
10
+ "@types/node": "^24.10.3",
11
11
  "prettier": "^3.7.4",
12
12
  "typeconv": "^2.3.1",
13
13
  "typescript": "^5.9.3"