tornapi-typescript 5.0.2 → 5.1.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 +41 -3
- package/dist/index.ts +46 -3
- package/dist/openapi.json +249 -2
- package/package.json +4 -4
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;
|
|
@@ -543,8 +544,8 @@ export interface UserCompetitionEasterEggs {
|
|
|
543
544
|
export interface UserCompetitionElimination {
|
|
544
545
|
name: "Elimination";
|
|
545
546
|
score: number;
|
|
546
|
-
team
|
|
547
|
-
attacks
|
|
547
|
+
team: string;
|
|
548
|
+
attacks: number;
|
|
548
549
|
}
|
|
549
550
|
export interface UserCompetitionRps {
|
|
550
551
|
name: "Rock, Paper, Scissors";
|
|
@@ -2806,6 +2807,35 @@ export type PropertySelectionName = string;
|
|
|
2806
2807
|
export interface PropertyLookupResponse {
|
|
2807
2808
|
selections: PropertySelectionName[];
|
|
2808
2809
|
}
|
|
2810
|
+
export interface TornEliminationTeam {
|
|
2811
|
+
id: EliminationTeamId;
|
|
2812
|
+
name: string;
|
|
2813
|
+
participants: number;
|
|
2814
|
+
position: number;
|
|
2815
|
+
score: number;
|
|
2816
|
+
lives: number;
|
|
2817
|
+
wins: number;
|
|
2818
|
+
losses: number;
|
|
2819
|
+
eliminated: boolean;
|
|
2820
|
+
eliminated_timestamp: number | null;
|
|
2821
|
+
leaders: BasicUser[];
|
|
2822
|
+
}
|
|
2823
|
+
export interface TornEliminationTeamsResponse {
|
|
2824
|
+
elimination: TornEliminationTeam[];
|
|
2825
|
+
}
|
|
2826
|
+
export interface TornEliminationTeamPlayer {
|
|
2827
|
+
id: UserId;
|
|
2828
|
+
name: string;
|
|
2829
|
+
level: number;
|
|
2830
|
+
last_action: UserLastAction;
|
|
2831
|
+
status: UserStatus;
|
|
2832
|
+
attacks: number;
|
|
2833
|
+
score: number;
|
|
2834
|
+
}
|
|
2835
|
+
export interface TornEliminationTeamPlayersResponse {
|
|
2836
|
+
eliminationteam: TornEliminationTeamPlayer[];
|
|
2837
|
+
_metadata: RequestMetadataWithLinks;
|
|
2838
|
+
}
|
|
2809
2839
|
export interface TornItemDetails extends ItemMarketListingItemDetails {
|
|
2810
2840
|
id: ItemId;
|
|
2811
2841
|
name: string;
|
|
@@ -5757,7 +5787,7 @@ export interface TornV1 extends BaseSchema {
|
|
|
5757
5787
|
circulation: number;
|
|
5758
5788
|
image: string;
|
|
5759
5789
|
tradeable: boolean;
|
|
5760
|
-
coverage
|
|
5790
|
+
coverage?: {
|
|
5761
5791
|
"Full Body Coverage": number;
|
|
5762
5792
|
"Heart Coverage": number;
|
|
5763
5793
|
"Stomach Coverage": number;
|
|
@@ -6974,6 +7004,14 @@ export interface TornV2 extends BaseSchema {
|
|
|
6974
7004
|
response: TornEducationResponse;
|
|
6975
7005
|
params: "timestamp";
|
|
6976
7006
|
};
|
|
7007
|
+
elimination: {
|
|
7008
|
+
response: TornEliminationTeamsResponse;
|
|
7009
|
+
params: "timestamp";
|
|
7010
|
+
};
|
|
7011
|
+
eliminationteam: {
|
|
7012
|
+
response: TornEliminationTeamPlayersResponse;
|
|
7013
|
+
params: "id" | "limit" | "offset" | "timestamp";
|
|
7014
|
+
};
|
|
6977
7015
|
factionhof: {
|
|
6978
7016
|
response: TornFactionHofResponse;
|
|
6979
7017
|
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;
|
|
@@ -5539,8 +5541,8 @@ export interface UserCompetitionEasterEggs {
|
|
|
5539
5541
|
export interface UserCompetitionElimination {
|
|
5540
5542
|
name: "Elimination";
|
|
5541
5543
|
score: number;
|
|
5542
|
-
team
|
|
5543
|
-
attacks
|
|
5544
|
+
team: string;
|
|
5545
|
+
attacks: number;
|
|
5544
5546
|
}
|
|
5545
5547
|
|
|
5546
5548
|
export interface UserCompetitionRps {
|
|
@@ -8427,6 +8429,39 @@ export interface PropertyLookupResponse {
|
|
|
8427
8429
|
selections: PropertySelectionName[];
|
|
8428
8430
|
}
|
|
8429
8431
|
|
|
8432
|
+
export interface TornEliminationTeam {
|
|
8433
|
+
id: EliminationTeamId;
|
|
8434
|
+
name: string;
|
|
8435
|
+
participants: number;
|
|
8436
|
+
position: number;
|
|
8437
|
+
score: number;
|
|
8438
|
+
lives: number;
|
|
8439
|
+
wins: number;
|
|
8440
|
+
losses: number;
|
|
8441
|
+
eliminated: boolean;
|
|
8442
|
+
eliminated_timestamp: number | null;
|
|
8443
|
+
leaders: BasicUser[];
|
|
8444
|
+
}
|
|
8445
|
+
|
|
8446
|
+
export interface TornEliminationTeamsResponse {
|
|
8447
|
+
elimination: TornEliminationTeam[];
|
|
8448
|
+
}
|
|
8449
|
+
|
|
8450
|
+
export interface TornEliminationTeamPlayer {
|
|
8451
|
+
id: UserId;
|
|
8452
|
+
name: string;
|
|
8453
|
+
level: number;
|
|
8454
|
+
last_action: UserLastAction;
|
|
8455
|
+
status: UserStatus;
|
|
8456
|
+
attacks: number;
|
|
8457
|
+
score: number;
|
|
8458
|
+
}
|
|
8459
|
+
|
|
8460
|
+
export interface TornEliminationTeamPlayersResponse {
|
|
8461
|
+
eliminationteam: TornEliminationTeamPlayer[];
|
|
8462
|
+
_metadata: RequestMetadataWithLinks;
|
|
8463
|
+
}
|
|
8464
|
+
|
|
8430
8465
|
export interface TornItemDetails extends ItemMarketListingItemDetails {
|
|
8431
8466
|
id: ItemId;
|
|
8432
8467
|
name: string;
|
|
@@ -11504,7 +11539,7 @@ export interface TornV1 extends BaseSchema {
|
|
|
11504
11539
|
circulation: number;
|
|
11505
11540
|
image: string;
|
|
11506
11541
|
tradeable: boolean;
|
|
11507
|
-
coverage
|
|
11542
|
+
coverage?: {
|
|
11508
11543
|
"Full Body Coverage": number;
|
|
11509
11544
|
"Heart Coverage": number;
|
|
11510
11545
|
"Stomach Coverage": number;
|
|
@@ -12798,6 +12833,14 @@ export interface TornV2 extends BaseSchema {
|
|
|
12798
12833
|
response: TornEducationResponse;
|
|
12799
12834
|
params: "timestamp";
|
|
12800
12835
|
};
|
|
12836
|
+
elimination: {
|
|
12837
|
+
response: TornEliminationTeamsResponse;
|
|
12838
|
+
params: "timestamp";
|
|
12839
|
+
};
|
|
12840
|
+
eliminationteam: {
|
|
12841
|
+
response: TornEliminationTeamPlayersResponse;
|
|
12842
|
+
params: "id" | "limit" | "offset" | "timestamp";
|
|
12843
|
+
};
|
|
12801
12844
|
factionhof: {
|
|
12802
12845
|
response: TornFactionHofResponse;
|
|
12803
12846
|
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
|
|
6
|
+
"version": "5.1.0"
|
|
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"
|
|
@@ -16759,7 +16865,8 @@
|
|
|
16759
16865
|
"required": [
|
|
16760
16866
|
"name",
|
|
16761
16867
|
"score",
|
|
16762
|
-
"
|
|
16868
|
+
"attacks",
|
|
16869
|
+
"team"
|
|
16763
16870
|
],
|
|
16764
16871
|
"properties": {
|
|
16765
16872
|
"name": {
|
|
@@ -28003,6 +28110,144 @@
|
|
|
28003
28110
|
},
|
|
28004
28111
|
"type": "object"
|
|
28005
28112
|
},
|
|
28113
|
+
"TornEliminationTeam": {
|
|
28114
|
+
"required": [
|
|
28115
|
+
"id",
|
|
28116
|
+
"name",
|
|
28117
|
+
"participants",
|
|
28118
|
+
"position",
|
|
28119
|
+
"score",
|
|
28120
|
+
"lives",
|
|
28121
|
+
"wins",
|
|
28122
|
+
"losses",
|
|
28123
|
+
"eliminated",
|
|
28124
|
+
"eliminated_timestamp",
|
|
28125
|
+
"leaders"
|
|
28126
|
+
],
|
|
28127
|
+
"properties": {
|
|
28128
|
+
"id": {
|
|
28129
|
+
"$ref": "#/components/schemas/EliminationTeamId"
|
|
28130
|
+
},
|
|
28131
|
+
"name": {
|
|
28132
|
+
"type": "string"
|
|
28133
|
+
},
|
|
28134
|
+
"participants": {
|
|
28135
|
+
"type": "integer",
|
|
28136
|
+
"format": "int32"
|
|
28137
|
+
},
|
|
28138
|
+
"position": {
|
|
28139
|
+
"type": "integer",
|
|
28140
|
+
"format": "int32"
|
|
28141
|
+
},
|
|
28142
|
+
"score": {
|
|
28143
|
+
"type": "integer",
|
|
28144
|
+
"format": "int32"
|
|
28145
|
+
},
|
|
28146
|
+
"lives": {
|
|
28147
|
+
"type": "integer",
|
|
28148
|
+
"format": "int32"
|
|
28149
|
+
},
|
|
28150
|
+
"wins": {
|
|
28151
|
+
"type": "integer",
|
|
28152
|
+
"format": "int32"
|
|
28153
|
+
},
|
|
28154
|
+
"losses": {
|
|
28155
|
+
"type": "integer",
|
|
28156
|
+
"format": "int32"
|
|
28157
|
+
},
|
|
28158
|
+
"eliminated": {
|
|
28159
|
+
"type": "boolean"
|
|
28160
|
+
},
|
|
28161
|
+
"eliminated_timestamp": {
|
|
28162
|
+
"oneOf": [
|
|
28163
|
+
{
|
|
28164
|
+
"type": "integer",
|
|
28165
|
+
"format": "int32"
|
|
28166
|
+
},
|
|
28167
|
+
{
|
|
28168
|
+
"type": "null"
|
|
28169
|
+
}
|
|
28170
|
+
]
|
|
28171
|
+
},
|
|
28172
|
+
"leaders": {
|
|
28173
|
+
"type": "array",
|
|
28174
|
+
"items": {
|
|
28175
|
+
"$ref": "#/components/schemas/BasicUser"
|
|
28176
|
+
}
|
|
28177
|
+
}
|
|
28178
|
+
},
|
|
28179
|
+
"type": "object"
|
|
28180
|
+
},
|
|
28181
|
+
"TornEliminationTeamsResponse": {
|
|
28182
|
+
"required": [
|
|
28183
|
+
"elimination"
|
|
28184
|
+
],
|
|
28185
|
+
"properties": {
|
|
28186
|
+
"elimination": {
|
|
28187
|
+
"type": "array",
|
|
28188
|
+
"items": {
|
|
28189
|
+
"$ref": "#/components/schemas/TornEliminationTeam"
|
|
28190
|
+
}
|
|
28191
|
+
}
|
|
28192
|
+
},
|
|
28193
|
+
"type": "object"
|
|
28194
|
+
},
|
|
28195
|
+
"TornEliminationTeamPlayer": {
|
|
28196
|
+
"required": [
|
|
28197
|
+
"id",
|
|
28198
|
+
"name",
|
|
28199
|
+
"level",
|
|
28200
|
+
"last_action",
|
|
28201
|
+
"status",
|
|
28202
|
+
"attacks",
|
|
28203
|
+
"score"
|
|
28204
|
+
],
|
|
28205
|
+
"properties": {
|
|
28206
|
+
"id": {
|
|
28207
|
+
"$ref": "#/components/schemas/UserId"
|
|
28208
|
+
},
|
|
28209
|
+
"name": {
|
|
28210
|
+
"type": "string"
|
|
28211
|
+
},
|
|
28212
|
+
"level": {
|
|
28213
|
+
"type": "integer",
|
|
28214
|
+
"format": "int32"
|
|
28215
|
+
},
|
|
28216
|
+
"last_action": {
|
|
28217
|
+
"$ref": "#/components/schemas/UserLastAction"
|
|
28218
|
+
},
|
|
28219
|
+
"status": {
|
|
28220
|
+
"$ref": "#/components/schemas/UserStatus"
|
|
28221
|
+
},
|
|
28222
|
+
"attacks": {
|
|
28223
|
+
"type": "integer",
|
|
28224
|
+
"format": "int32"
|
|
28225
|
+
},
|
|
28226
|
+
"score": {
|
|
28227
|
+
"type": "integer",
|
|
28228
|
+
"format": "int32"
|
|
28229
|
+
}
|
|
28230
|
+
},
|
|
28231
|
+
"type": "object"
|
|
28232
|
+
},
|
|
28233
|
+
"TornEliminationTeamPlayersResponse": {
|
|
28234
|
+
"required": [
|
|
28235
|
+
"eliminationteam",
|
|
28236
|
+
"_metadata"
|
|
28237
|
+
],
|
|
28238
|
+
"properties": {
|
|
28239
|
+
"eliminationteam": {
|
|
28240
|
+
"type": "array",
|
|
28241
|
+
"items": {
|
|
28242
|
+
"$ref": "#/components/schemas/TornEliminationTeamPlayer"
|
|
28243
|
+
}
|
|
28244
|
+
},
|
|
28245
|
+
"_metadata": {
|
|
28246
|
+
"$ref": "#/components/schemas/RequestMetadataWithLinks"
|
|
28247
|
+
}
|
|
28248
|
+
},
|
|
28249
|
+
"type": "object"
|
|
28250
|
+
},
|
|
28006
28251
|
"TornItemDetails": {
|
|
28007
28252
|
"allOf": [
|
|
28008
28253
|
{
|
|
@@ -29878,6 +30123,8 @@
|
|
|
29878
30123
|
"calendar",
|
|
29879
30124
|
"crimes",
|
|
29880
30125
|
"education",
|
|
30126
|
+
"elimination",
|
|
30127
|
+
"eliminationteam",
|
|
29881
30128
|
"factionhof",
|
|
29882
30129
|
"factiontree",
|
|
29883
30130
|
"hof",
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0
|
|
4
|
+
"version": "5.1.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate-types": "tsc && node build/index.js"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@scalar/openapi-types": "^0.5.
|
|
10
|
-
"@types/node": "^24.10.
|
|
11
|
-
"prettier": "^3.7.
|
|
9
|
+
"@scalar/openapi-types": "^0.5.2",
|
|
10
|
+
"@types/node": "^24.10.2",
|
|
11
|
+
"prettier": "^3.7.4",
|
|
12
12
|
"typeconv": "^2.3.1",
|
|
13
13
|
"typescript": "^5.9.3"
|
|
14
14
|
},
|