tornapi-typescript 3.0.19 → 3.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 +7 -10
- package/dist/index.ts +12 -11
- package/dist/openapi.json +20 -78
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type RaceClassEnum = "A" | "B" | "C" | "D" | "E";
|
|
|
8
8
|
export type UserDonatorStatusEnum = "Donator" | "Subscriber";
|
|
9
9
|
export type JobTypeEnum = "Army" | "Casino" | "Education" | "Grocer" | "Law" | "Medical";
|
|
10
10
|
export type UserMaritalStatusEnum = "Engaged" | "Newlywed" | "Married";
|
|
11
|
+
export type UserPlaneImageTypeEnum = "private_jet" | "light_aircraft" | "airliner";
|
|
11
12
|
export type UserRoleEnum = "Admin" | "Officer" | "Moderator" | "Helper" | "Tester" | "NPC" | "Committee" | "Reporter" | "Wiki Contributor" | "Wiki Editor" | "Civilian";
|
|
12
13
|
export type UserTitleEnum = "Alcoholic" | "Sharpshooter" | "Accomplice" | "Loser" | "Silent Killer" | "Killer" | "Merchant" | "Medalist" | "Tycoon" | "Damage Dealer" | "Slayer" | "Hired Gun" | "Egotist" | "Outcast" | "Punchbag" | "Tank" | "Antagonist" | "Druggy" | "Scavenger" | "Boxer" | "Importer" | "Looter" | "Samaritan" | "Felon" | "Socialite" | "Mercenary" | "Investor" | "Thief" | "One Hit Killer" | "Mobster" | "Addict" | "Bonds Agent" | "Buster" | "Hoarder" | "Racer" | "Soldier" | "Avenger" | "Healer" | "Booster" | "Intimidator" | "Trader" | "Jobsworth" | "Tourist" | "Nudist" | "Sage" | "Coward" | "Newcomer" | "Deserter";
|
|
13
14
|
export type UserRankEnum = "Absolute beginner" | "Beginner" | "Inexperienced" | "Rookie" | "Novice" | "Below average" | "Average" | "Reasonable" | "Above average" | "Competent" | "Highly competent" | "Veteran" | "Distinguished" | "Highly distinguished" | "Professional" | "Star" | "Master" | "Outstanding" | "Celebrity" | "Supreme" | "Idolized" | "Champion" | "Heroic" | "Legendary" | "Elite" | "Invincible";
|
|
@@ -113,7 +114,7 @@ export interface RequestMetadataWithLinksAndTotal {
|
|
|
113
114
|
*/
|
|
114
115
|
export type ForumFeedTypeEnum = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
115
116
|
export type UserGenderEnum = "Male" | "Female" | "Enby";
|
|
116
|
-
export type HonorRarityEnum = "Extremely Rare" | "Very Rare" | "Rare" | "Limited" | "Uncommon" | "Common" | "Very Common" | "Unknown";
|
|
117
|
+
export type HonorRarityEnum = "Extremely Rare" | "Very Rare" | "Rare" | "Limited" | "Uncommon" | "Common" | "Very Common" | "Unknown" | "Unknown Rarity";
|
|
117
118
|
export type Parameters = string;
|
|
118
119
|
export type ReviveSetting = "Everyone" | "Friends & faction" | "No one" | "Unknown";
|
|
119
120
|
export type FactionWarfareTypeEnum = "ranked" | "territory" | "raid" | "chain" | "db";
|
|
@@ -1659,9 +1660,6 @@ export interface FactionTerritoryWarOngoing {
|
|
|
1659
1660
|
target: number;
|
|
1660
1661
|
factions: FactionTerritoryWarOngoingFaction[];
|
|
1661
1662
|
}
|
|
1662
|
-
export interface FactionTerritoryWarsResponse {
|
|
1663
|
-
territorywars: FactionTerritoryWarOngoing[] | FactionTerritoryWarFinished[];
|
|
1664
|
-
}
|
|
1665
1663
|
export interface FactionTerritoryWarsHistoryResponse {
|
|
1666
1664
|
territorywars: FactionTerritoryWarFinished[];
|
|
1667
1665
|
}
|
|
@@ -1821,8 +1819,9 @@ export interface UserStatus {
|
|
|
1821
1819
|
state: string;
|
|
1822
1820
|
color: string;
|
|
1823
1821
|
until: number | null;
|
|
1824
|
-
/** This field is
|
|
1822
|
+
/** This field is replaced by the 'plane_image_type' field and will be removed on October 1st 2025. */
|
|
1825
1823
|
travel_type?: string;
|
|
1824
|
+
plane_image_type?: UserPlaneImageTypeEnum;
|
|
1826
1825
|
}
|
|
1827
1826
|
export interface FactionMembersResponse {
|
|
1828
1827
|
members: FactionMember[];
|
|
@@ -2346,9 +2345,7 @@ export interface KeyInfoResponse {
|
|
|
2346
2345
|
level: number;
|
|
2347
2346
|
type: ApiKeyAccessTypeEnum;
|
|
2348
2347
|
faction: boolean;
|
|
2349
|
-
faction_id?: FactionId | null;
|
|
2350
2348
|
company: boolean;
|
|
2351
|
-
company_id?: CompanyId | null;
|
|
2352
2349
|
log: {
|
|
2353
2350
|
/** Shows if key has custom log permissions enabled. */
|
|
2354
2351
|
custom_permissions: boolean;
|
|
@@ -6498,7 +6495,7 @@ export interface FactionV2 extends BaseSchema {
|
|
|
6498
6495
|
};
|
|
6499
6496
|
rankedwars: {
|
|
6500
6497
|
response: FactionRankedWarResponse;
|
|
6501
|
-
params: "
|
|
6498
|
+
params: "from" | "to" | "sort" | "timestamp";
|
|
6502
6499
|
};
|
|
6503
6500
|
rankedwarreport: {
|
|
6504
6501
|
response: FactionRankedWarReportResponse;
|
|
@@ -6533,8 +6530,8 @@ export interface FactionV2 extends BaseSchema {
|
|
|
6533
6530
|
params: "offset" | "limit" | "timestamp";
|
|
6534
6531
|
};
|
|
6535
6532
|
territorywars: {
|
|
6536
|
-
response:
|
|
6537
|
-
params: "
|
|
6533
|
+
response: FactionTerritoryWarsHistoryResponse;
|
|
6534
|
+
params: "from" | "to" | "sort" | "limit" | "timestamp";
|
|
6538
6535
|
};
|
|
6539
6536
|
territorywarreport: {
|
|
6540
6537
|
response: FactionTerritoryWarReportResponse;
|
package/dist/index.ts
CHANGED
|
@@ -21,6 +21,11 @@ export type JobTypeEnum =
|
|
|
21
21
|
|
|
22
22
|
export type UserMaritalStatusEnum = "Engaged" | "Newlywed" | "Married";
|
|
23
23
|
|
|
24
|
+
export type UserPlaneImageTypeEnum =
|
|
25
|
+
| "private_jet"
|
|
26
|
+
| "light_aircraft"
|
|
27
|
+
| "airliner";
|
|
28
|
+
|
|
24
29
|
export type UserRoleEnum =
|
|
25
30
|
| "Admin"
|
|
26
31
|
| "Officer"
|
|
@@ -4795,7 +4800,8 @@ export type HonorRarityEnum =
|
|
|
4795
4800
|
| "Uncommon"
|
|
4796
4801
|
| "Common"
|
|
4797
4802
|
| "Very Common"
|
|
4798
|
-
| "Unknown"
|
|
4803
|
+
| "Unknown"
|
|
4804
|
+
| "Unknown Rarity";
|
|
4799
4805
|
|
|
4800
4806
|
export type Parameters = string;
|
|
4801
4807
|
|
|
@@ -7053,10 +7059,6 @@ export interface FactionTerritoryWarOngoing {
|
|
|
7053
7059
|
factions: FactionTerritoryWarOngoingFaction[];
|
|
7054
7060
|
}
|
|
7055
7061
|
|
|
7056
|
-
export interface FactionTerritoryWarsResponse {
|
|
7057
|
-
territorywars: FactionTerritoryWarOngoing[] | FactionTerritoryWarFinished[];
|
|
7058
|
-
}
|
|
7059
|
-
|
|
7060
7062
|
export interface FactionTerritoryWarsHistoryResponse {
|
|
7061
7063
|
territorywars: FactionTerritoryWarFinished[];
|
|
7062
7064
|
}
|
|
@@ -7242,8 +7244,9 @@ export interface UserStatus {
|
|
|
7242
7244
|
state: string;
|
|
7243
7245
|
color: string;
|
|
7244
7246
|
until: number | null;
|
|
7245
|
-
/** This field is
|
|
7247
|
+
/** This field is replaced by the 'plane_image_type' field and will be removed on October 1st 2025. */
|
|
7246
7248
|
travel_type?: string;
|
|
7249
|
+
plane_image_type?: UserPlaneImageTypeEnum;
|
|
7247
7250
|
}
|
|
7248
7251
|
|
|
7249
7252
|
export interface FactionMembersResponse {
|
|
@@ -7840,9 +7843,7 @@ export interface KeyInfoResponse {
|
|
|
7840
7843
|
level: number;
|
|
7841
7844
|
type: ApiKeyAccessTypeEnum;
|
|
7842
7845
|
faction: boolean;
|
|
7843
|
-
faction_id?: FactionId | null;
|
|
7844
7846
|
company: boolean;
|
|
7845
|
-
company_id?: CompanyId | null;
|
|
7846
7847
|
log: {
|
|
7847
7848
|
/** Shows if key has custom log permissions enabled. */
|
|
7848
7849
|
custom_permissions: boolean;
|
|
@@ -12201,7 +12202,7 @@ export interface FactionV2 extends BaseSchema {
|
|
|
12201
12202
|
};
|
|
12202
12203
|
rankedwars: {
|
|
12203
12204
|
response: FactionRankedWarResponse;
|
|
12204
|
-
params: "
|
|
12205
|
+
params: "from" | "to" | "sort" | "timestamp";
|
|
12205
12206
|
};
|
|
12206
12207
|
rankedwarreport: {
|
|
12207
12208
|
response: FactionRankedWarReportResponse;
|
|
@@ -12250,8 +12251,8 @@ export interface FactionV2 extends BaseSchema {
|
|
|
12250
12251
|
params: "offset" | "limit" | "timestamp";
|
|
12251
12252
|
};
|
|
12252
12253
|
territorywars: {
|
|
12253
|
-
response:
|
|
12254
|
-
params: "
|
|
12254
|
+
response: FactionTerritoryWarsHistoryResponse;
|
|
12255
|
+
params: "from" | "to" | "sort" | "limit" | "timestamp";
|
|
12255
12256
|
};
|
|
12256
12257
|
territorywarreport: {
|
|
12257
12258
|
response: FactionTerritoryWarReportResponse;
|
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": "3.0
|
|
6
|
+
"version": "3.1.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -1773,7 +1773,7 @@
|
|
|
1773
1773
|
"User"
|
|
1774
1774
|
],
|
|
1775
1775
|
"summary": "Get your personal stats",
|
|
1776
|
-
"description": "Requires public access key. <br>\n * UserPersonalStatsFull is returned only when this selection is requested with Limited, Full or Custom key access key.\n * UserPersonalStatsFullPublic is returned when the requested category is 'all'.\n * UserPersonalStatsPopular is returned when the requested category is 'popular'. Please try to use UserPersonalStatsPopular over UserPersonalStatsFullPublic wherever possible in order to reduce the server load.\n * Otherwise, UserPersonalStatsCategory is returned for the matched category.\n *
|
|
1776
|
+
"description": "Requires public access key. <br>\n * UserPersonalStatsFull is returned only when this selection is requested with Limited, Full or Custom key access key.\n * UserPersonalStatsFullPublic is returned when the requested category is 'all'.\n * UserPersonalStatsPopular is returned when the requested category is 'popular'. Please try to use UserPersonalStatsPopular over UserPersonalStatsFullPublic wherever possible in order to reduce the server load.\n * Otherwise, UserPersonalStatsCategory is returned for the matched category.\n * Historical stats can be fetched via 'stat' query parameter. It's only possible to pass up to 10 historical stats at once (the rest is trimmed). When requesting historical stats the response will be of type UserPersonalStatsHistoric.\n * Use 'timestamp' query parameter to get historical stats at the certain point in time. It's possible some historical stats didn't exist at the given timestamp, and for such stats you will not receive anything back.",
|
|
1777
1777
|
"operationId": "388e8008ae1c2645819af76d71ef92a5",
|
|
1778
1778
|
"parameters": [
|
|
1779
1779
|
{
|
|
@@ -4107,16 +4107,6 @@
|
|
|
4107
4107
|
"description": "Requires public access key. <br>",
|
|
4108
4108
|
"operationId": "4f5d624a86e2d389a7a738b6b3ce8c9e",
|
|
4109
4109
|
"parameters": [
|
|
4110
|
-
{
|
|
4111
|
-
"name": "cat",
|
|
4112
|
-
"in": "query",
|
|
4113
|
-
"description": "This parameter is deprecated. The ranked wars list can now instead be fetched via 'faction' -> 'warfare' endpoint. This functionality will be removed on 1st of September 2025.",
|
|
4114
|
-
"required": false,
|
|
4115
|
-
"deprecated": true,
|
|
4116
|
-
"schema": {
|
|
4117
|
-
"$ref": "#/components/schemas/FactionRankedWarsCategoryEnum"
|
|
4118
|
-
}
|
|
4119
|
-
},
|
|
4120
4110
|
{
|
|
4121
4111
|
"$ref": "#/components/parameters/ApiFrom"
|
|
4122
4112
|
},
|
|
@@ -4660,16 +4650,6 @@
|
|
|
4660
4650
|
"description": "Requires public access key. <br>",
|
|
4661
4651
|
"operationId": "0258963246159d1e3e54547c32aac7c8",
|
|
4662
4652
|
"parameters": [
|
|
4663
|
-
{
|
|
4664
|
-
"name": "cat",
|
|
4665
|
-
"in": "query",
|
|
4666
|
-
"description": "This parameter is deprecated. The territory wars list can now instead be fetched via 'faction' -> 'warfare' endpoint. This functionality will be removed on 1st of September 2025.",
|
|
4667
|
-
"required": false,
|
|
4668
|
-
"deprecated": true,
|
|
4669
|
-
"schema": {
|
|
4670
|
-
"$ref": "#/components/schemas/FactionTerritoryWarsCategoryEnum"
|
|
4671
|
-
}
|
|
4672
|
-
},
|
|
4673
4653
|
{
|
|
4674
4654
|
"$ref": "#/components/parameters/ApiFrom"
|
|
4675
4655
|
},
|
|
@@ -4698,7 +4678,7 @@
|
|
|
4698
4678
|
"content": {
|
|
4699
4679
|
"application/json": {
|
|
4700
4680
|
"schema": {
|
|
4701
|
-
"$ref": "#/components/schemas/
|
|
4681
|
+
"$ref": "#/components/schemas/FactionTerritoryWarsHistoryResponse"
|
|
4702
4682
|
}
|
|
4703
4683
|
}
|
|
4704
4684
|
}
|
|
@@ -5307,9 +5287,6 @@
|
|
|
5307
5287
|
{
|
|
5308
5288
|
"$ref": "#/components/schemas/FactionStatsResponse"
|
|
5309
5289
|
},
|
|
5310
|
-
{
|
|
5311
|
-
"$ref": "#/components/schemas/FactionTerritoryWarsResponse"
|
|
5312
|
-
},
|
|
5313
5290
|
{
|
|
5314
5291
|
"$ref": "#/components/schemas/FactionContributorsResponse"
|
|
5315
5292
|
},
|
|
@@ -8499,6 +8476,14 @@
|
|
|
8499
8476
|
"Married"
|
|
8500
8477
|
]
|
|
8501
8478
|
},
|
|
8479
|
+
"UserPlaneImageTypeEnum": {
|
|
8480
|
+
"type": "string",
|
|
8481
|
+
"enum": [
|
|
8482
|
+
"private_jet",
|
|
8483
|
+
"light_aircraft",
|
|
8484
|
+
"airliner"
|
|
8485
|
+
]
|
|
8486
|
+
},
|
|
8502
8487
|
"UserRoleEnum": {
|
|
8503
8488
|
"type": "string",
|
|
8504
8489
|
"enum": [
|
|
@@ -13559,7 +13544,8 @@
|
|
|
13559
13544
|
"Uncommon",
|
|
13560
13545
|
"Common",
|
|
13561
13546
|
"Very Common",
|
|
13562
|
-
"Unknown"
|
|
13547
|
+
"Unknown",
|
|
13548
|
+
"Unknown Rarity"
|
|
13563
13549
|
]
|
|
13564
13550
|
},
|
|
13565
13551
|
"Parameters": {
|
|
@@ -21520,31 +21506,6 @@
|
|
|
21520
21506
|
},
|
|
21521
21507
|
"type": "object"
|
|
21522
21508
|
},
|
|
21523
|
-
"FactionTerritoryWarsResponse": {
|
|
21524
|
-
"required": [
|
|
21525
|
-
"territorywars"
|
|
21526
|
-
],
|
|
21527
|
-
"properties": {
|
|
21528
|
-
"territorywars": {
|
|
21529
|
-
"description": "If the chosen category is 'ongoing' the response will be of 'FactionTerritoryWarOngoing' type, otherwise, the type will be 'FactionTerritoryWarFinished'.",
|
|
21530
|
-
"oneOf": [
|
|
21531
|
-
{
|
|
21532
|
-
"type": "array",
|
|
21533
|
-
"items": {
|
|
21534
|
-
"$ref": "#/components/schemas/FactionTerritoryWarOngoing"
|
|
21535
|
-
}
|
|
21536
|
-
},
|
|
21537
|
-
{
|
|
21538
|
-
"type": "array",
|
|
21539
|
-
"items": {
|
|
21540
|
-
"$ref": "#/components/schemas/FactionTerritoryWarFinished"
|
|
21541
|
-
}
|
|
21542
|
-
}
|
|
21543
|
-
]
|
|
21544
|
-
}
|
|
21545
|
-
},
|
|
21546
|
-
"type": "object"
|
|
21547
|
-
},
|
|
21548
21509
|
"FactionTerritoryWarsHistoryResponse": {
|
|
21549
21510
|
"required": [
|
|
21550
21511
|
"territorywars"
|
|
@@ -22251,8 +22212,13 @@
|
|
|
22251
22212
|
]
|
|
22252
22213
|
},
|
|
22253
22214
|
"travel_type": {
|
|
22254
|
-
"description": "This field is
|
|
22255
|
-
"type": "string"
|
|
22215
|
+
"description": "This field is replaced by the 'plane_image_type' field and will be removed on October 1st 2025.",
|
|
22216
|
+
"type": "string",
|
|
22217
|
+
"deprecated": true
|
|
22218
|
+
},
|
|
22219
|
+
"plane_image_type": {
|
|
22220
|
+
"$ref": "#/components/schemas/UserPlaneImageTypeEnum",
|
|
22221
|
+
"description": "This field is populated only if the state is 'Traveling'."
|
|
22256
22222
|
}
|
|
22257
22223
|
},
|
|
22258
22224
|
"type": "object"
|
|
@@ -24802,33 +24768,9 @@
|
|
|
24802
24768
|
"faction": {
|
|
24803
24769
|
"type": "boolean"
|
|
24804
24770
|
},
|
|
24805
|
-
"faction_id": {
|
|
24806
|
-
"description": "This field is replaced with 'user'.'faction_id' field and will be removed on 1st of September 2025. Populated only if 'faction' field is true.",
|
|
24807
|
-
"deprecated": true,
|
|
24808
|
-
"oneOf": [
|
|
24809
|
-
{
|
|
24810
|
-
"$ref": "#/components/schemas/FactionId"
|
|
24811
|
-
},
|
|
24812
|
-
{
|
|
24813
|
-
"type": "null"
|
|
24814
|
-
}
|
|
24815
|
-
]
|
|
24816
|
-
},
|
|
24817
24771
|
"company": {
|
|
24818
24772
|
"type": "boolean"
|
|
24819
24773
|
},
|
|
24820
|
-
"company_id": {
|
|
24821
|
-
"description": "This field is replaced with 'user'.'company_id' field and will be removed on 1st of September 2025. Populated only if 'company' field is true.",
|
|
24822
|
-
"deprecated": true,
|
|
24823
|
-
"oneOf": [
|
|
24824
|
-
{
|
|
24825
|
-
"$ref": "#/components/schemas/CompanyId"
|
|
24826
|
-
},
|
|
24827
|
-
{
|
|
24828
|
-
"type": "null"
|
|
24829
|
-
}
|
|
24830
|
-
]
|
|
24831
|
-
},
|
|
24832
24774
|
"log": {
|
|
24833
24775
|
"required": [
|
|
24834
24776
|
"custom_permissions",
|