tornapi-typescript 3.1.0 → 4.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 +51 -3
- package/dist/index.ts +75 -3
- package/dist/openapi.json +418 -9
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export type RaceClassEnum = "A" | "B" | "C" | "D" | "E";
|
|
8
8
|
export type UserDonatorStatusEnum = "Donator" | "Subscriber";
|
|
9
|
+
export type UserMessageTypeEnum = "Company newsletter" | "Faction newsletter" | "Warning" | "User message";
|
|
9
10
|
export type JobTypeEnum = "Army" | "Casino" | "Education" | "Grocer" | "Law" | "Medical";
|
|
10
11
|
export type UserMaritalStatusEnum = "Engaged" | "Newlywed" | "Married";
|
|
11
12
|
export type UserPlaneImageTypeEnum = "private_jet" | "light_aircraft" | "airliner";
|
|
13
|
+
export type UserStatusStateEnum = "Abroad" | "Awoken" | "Dormant" | "Fallen" | "Federal" | "Hospital" | "Jail" | "Okay" | "Traveling";
|
|
12
14
|
export type UserRoleEnum = "Admin" | "Officer" | "Moderator" | "Helper" | "Tester" | "NPC" | "Committee" | "Reporter" | "Wiki Contributor" | "Wiki Editor" | "Civilian";
|
|
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";
|
|
15
|
+
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" | "Citizen";
|
|
14
16
|
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";
|
|
15
17
|
export type UserRpsStatus = "scissors" | "rock" | "paper";
|
|
16
18
|
export type UserSkillSlugEnum = "hunting" | "racing" | "reviving" | "search_for_cash" | "bootlegging" | "graffiti" | "shoplifting" | "pickpocketing" | "card_skimming" | "burglary" | "hustling" | "disposal" | "cracking" | "forgery" | "scamming" | "arson";
|
|
@@ -70,6 +72,8 @@ export type TerritoryWarId = number;
|
|
|
70
72
|
export type RaidWarId = number;
|
|
71
73
|
export type ItemUid = number;
|
|
72
74
|
export type UserId = number;
|
|
75
|
+
export type UserMessageId = number;
|
|
76
|
+
export type UserEventId = string;
|
|
73
77
|
export type UserIconId = number;
|
|
74
78
|
export type ReviveId = number;
|
|
75
79
|
export type LogId = number;
|
|
@@ -347,6 +351,34 @@ export interface ReportsResponse {
|
|
|
347
351
|
_metadata: RequestMetadataWithLinks;
|
|
348
352
|
}
|
|
349
353
|
export type SelectionCategoryEnum = ReportTypeEnum | UserListEnum | PersonalStatsCategoryEnum | RacingRaceTypeEnum;
|
|
354
|
+
export interface UserNewEventsResponse {
|
|
355
|
+
events: UserEvent[];
|
|
356
|
+
}
|
|
357
|
+
export interface UserEventsResponse {
|
|
358
|
+
events: UserEvent[];
|
|
359
|
+
_metadata: RequestMetadataWithLinks;
|
|
360
|
+
}
|
|
361
|
+
export interface UserEvent {
|
|
362
|
+
id: UserEventId;
|
|
363
|
+
timestamp: number;
|
|
364
|
+
event: string;
|
|
365
|
+
}
|
|
366
|
+
export interface UserMessagesResponse {
|
|
367
|
+
messages: UserMessage[];
|
|
368
|
+
_metadata: RequestMetadataWithLinks;
|
|
369
|
+
}
|
|
370
|
+
export interface UserNewMessagesResponse {
|
|
371
|
+
messages: UserMessage[];
|
|
372
|
+
}
|
|
373
|
+
export interface UserMessage {
|
|
374
|
+
id: UserMessageId;
|
|
375
|
+
sender: BasicUser;
|
|
376
|
+
timestamp: number;
|
|
377
|
+
topic: string;
|
|
378
|
+
type: UserMessageTypeEnum;
|
|
379
|
+
seen: boolean;
|
|
380
|
+
read: boolean;
|
|
381
|
+
}
|
|
350
382
|
export interface UserIconPublic {
|
|
351
383
|
id: UserIconId;
|
|
352
384
|
title: string;
|
|
@@ -915,7 +947,7 @@ export interface UserListResponse {
|
|
|
915
947
|
list: UserList[];
|
|
916
948
|
_metadata: RequestMetadataWithLinks;
|
|
917
949
|
}
|
|
918
|
-
/** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','
|
|
950
|
+
/** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','gym','inventory','missions','networth','notifications','perks','refills','stocks','travel','weaponexp'. */
|
|
919
951
|
export type UserSelectionName = string;
|
|
920
952
|
export interface UserLookupResponse {
|
|
921
953
|
selections: UserSelectionName[];
|
|
@@ -1816,7 +1848,7 @@ export interface UserLastAction {
|
|
|
1816
1848
|
export interface UserStatus {
|
|
1817
1849
|
description: string;
|
|
1818
1850
|
details: string | null;
|
|
1819
|
-
state: string;
|
|
1851
|
+
state: UserStatusStateEnum | string;
|
|
1820
1852
|
color: string;
|
|
1821
1853
|
until: number | null;
|
|
1822
1854
|
/** This field is replaced by the 'plane_image_type' field and will be removed on October 1st 2025. */
|
|
@@ -6285,6 +6317,10 @@ export interface UserV2 extends BaseSchema {
|
|
|
6285
6317
|
response: UserEnlistedCarsResponse;
|
|
6286
6318
|
params: "timestamp";
|
|
6287
6319
|
};
|
|
6320
|
+
events: {
|
|
6321
|
+
response: UserEventsResponse;
|
|
6322
|
+
params: "striptags" | "limit" | "from" | "to" | "timestamp";
|
|
6323
|
+
};
|
|
6288
6324
|
faction: {
|
|
6289
6325
|
response: UserFactionResponse;
|
|
6290
6326
|
params: "timestamp";
|
|
@@ -6357,10 +6393,22 @@ export interface UserV2 extends BaseSchema {
|
|
|
6357
6393
|
response: UserMeritsResponse;
|
|
6358
6394
|
params: "timestamp";
|
|
6359
6395
|
};
|
|
6396
|
+
messages: {
|
|
6397
|
+
response: UserMessagesResponse;
|
|
6398
|
+
params: "limit" | "from" | "to" | "sort" | "timestamp";
|
|
6399
|
+
};
|
|
6360
6400
|
money: {
|
|
6361
6401
|
response: UserMoneyResponse;
|
|
6362
6402
|
params: "timestamp";
|
|
6363
6403
|
};
|
|
6404
|
+
newevents: {
|
|
6405
|
+
response: UserNewEventsResponse;
|
|
6406
|
+
params: "striptags" | "timestamp";
|
|
6407
|
+
};
|
|
6408
|
+
newmessages: {
|
|
6409
|
+
response: UserNewMessagesResponse;
|
|
6410
|
+
params: "timestamp";
|
|
6411
|
+
};
|
|
6364
6412
|
organizedcrime: {
|
|
6365
6413
|
response: UserOrganizedCrimeResponse;
|
|
6366
6414
|
params: "timestamp";
|
package/dist/index.ts
CHANGED
|
@@ -11,6 +11,12 @@ export type RaceClassEnum = "A" | "B" | "C" | "D" | "E";
|
|
|
11
11
|
|
|
12
12
|
export type UserDonatorStatusEnum = "Donator" | "Subscriber";
|
|
13
13
|
|
|
14
|
+
export type UserMessageTypeEnum =
|
|
15
|
+
| "Company newsletter"
|
|
16
|
+
| "Faction newsletter"
|
|
17
|
+
| "Warning"
|
|
18
|
+
| "User message";
|
|
19
|
+
|
|
14
20
|
export type JobTypeEnum =
|
|
15
21
|
| "Army"
|
|
16
22
|
| "Casino"
|
|
@@ -26,6 +32,17 @@ export type UserPlaneImageTypeEnum =
|
|
|
26
32
|
| "light_aircraft"
|
|
27
33
|
| "airliner";
|
|
28
34
|
|
|
35
|
+
export type UserStatusStateEnum =
|
|
36
|
+
| "Abroad"
|
|
37
|
+
| "Awoken"
|
|
38
|
+
| "Dormant"
|
|
39
|
+
| "Fallen"
|
|
40
|
+
| "Federal"
|
|
41
|
+
| "Hospital"
|
|
42
|
+
| "Jail"
|
|
43
|
+
| "Okay"
|
|
44
|
+
| "Traveling";
|
|
45
|
+
|
|
29
46
|
export type UserRoleEnum =
|
|
30
47
|
| "Admin"
|
|
31
48
|
| "Officer"
|
|
@@ -87,7 +104,8 @@ export type UserTitleEnum =
|
|
|
87
104
|
| "Sage"
|
|
88
105
|
| "Coward"
|
|
89
106
|
| "Newcomer"
|
|
90
|
-
| "Deserter"
|
|
107
|
+
| "Deserter"
|
|
108
|
+
| "Citizen";
|
|
91
109
|
|
|
92
110
|
export type UserRankEnum =
|
|
93
111
|
| "Absolute beginner"
|
|
@@ -4724,6 +4742,10 @@ export type ItemUid = number;
|
|
|
4724
4742
|
|
|
4725
4743
|
export type UserId = number;
|
|
4726
4744
|
|
|
4745
|
+
export type UserMessageId = number;
|
|
4746
|
+
|
|
4747
|
+
export type UserEventId = string;
|
|
4748
|
+
|
|
4727
4749
|
export type UserIconId = number;
|
|
4728
4750
|
|
|
4729
4751
|
export type ReviveId = number;
|
|
@@ -5265,6 +5287,40 @@ export type SelectionCategoryEnum =
|
|
|
5265
5287
|
| PersonalStatsCategoryEnum
|
|
5266
5288
|
| RacingRaceTypeEnum;
|
|
5267
5289
|
|
|
5290
|
+
export interface UserNewEventsResponse {
|
|
5291
|
+
events: UserEvent[];
|
|
5292
|
+
}
|
|
5293
|
+
|
|
5294
|
+
export interface UserEventsResponse {
|
|
5295
|
+
events: UserEvent[];
|
|
5296
|
+
_metadata: RequestMetadataWithLinks;
|
|
5297
|
+
}
|
|
5298
|
+
|
|
5299
|
+
export interface UserEvent {
|
|
5300
|
+
id: UserEventId;
|
|
5301
|
+
timestamp: number;
|
|
5302
|
+
event: string;
|
|
5303
|
+
}
|
|
5304
|
+
|
|
5305
|
+
export interface UserMessagesResponse {
|
|
5306
|
+
messages: UserMessage[];
|
|
5307
|
+
_metadata: RequestMetadataWithLinks;
|
|
5308
|
+
}
|
|
5309
|
+
|
|
5310
|
+
export interface UserNewMessagesResponse {
|
|
5311
|
+
messages: UserMessage[];
|
|
5312
|
+
}
|
|
5313
|
+
|
|
5314
|
+
export interface UserMessage {
|
|
5315
|
+
id: UserMessageId;
|
|
5316
|
+
sender: BasicUser;
|
|
5317
|
+
timestamp: number;
|
|
5318
|
+
topic: string;
|
|
5319
|
+
type: UserMessageTypeEnum;
|
|
5320
|
+
seen: boolean;
|
|
5321
|
+
read: boolean;
|
|
5322
|
+
}
|
|
5323
|
+
|
|
5268
5324
|
export interface UserIconPublic {
|
|
5269
5325
|
id: UserIconId;
|
|
5270
5326
|
title: string;
|
|
@@ -5946,7 +6002,7 @@ export interface UserListResponse {
|
|
|
5946
6002
|
_metadata: RequestMetadataWithLinks;
|
|
5947
6003
|
}
|
|
5948
6004
|
|
|
5949
|
-
/** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','
|
|
6005
|
+
/** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','gym','inventory','missions','networth','notifications','perks','refills','stocks','travel','weaponexp'. */
|
|
5950
6006
|
export type UserSelectionName = string;
|
|
5951
6007
|
|
|
5952
6008
|
export interface UserLookupResponse {
|
|
@@ -7241,7 +7297,7 @@ export interface UserLastAction {
|
|
|
7241
7297
|
export interface UserStatus {
|
|
7242
7298
|
description: string;
|
|
7243
7299
|
details: string | null;
|
|
7244
|
-
state: string;
|
|
7300
|
+
state: UserStatusStateEnum | string;
|
|
7245
7301
|
color: string;
|
|
7246
7302
|
until: number | null;
|
|
7247
7303
|
/** This field is replaced by the 'plane_image_type' field and will be removed on October 1st 2025. */
|
|
@@ -11958,6 +12014,10 @@ export interface UserV2 extends BaseSchema {
|
|
|
11958
12014
|
response: UserEnlistedCarsResponse;
|
|
11959
12015
|
params: "timestamp";
|
|
11960
12016
|
};
|
|
12017
|
+
events: {
|
|
12018
|
+
response: UserEventsResponse;
|
|
12019
|
+
params: "striptags" | "limit" | "from" | "to" | "timestamp";
|
|
12020
|
+
};
|
|
11961
12021
|
faction: {
|
|
11962
12022
|
response: UserFactionResponse;
|
|
11963
12023
|
params: "timestamp";
|
|
@@ -12036,10 +12096,22 @@ export interface UserV2 extends BaseSchema {
|
|
|
12036
12096
|
response: UserMeritsResponse;
|
|
12037
12097
|
params: "timestamp";
|
|
12038
12098
|
};
|
|
12099
|
+
messages: {
|
|
12100
|
+
response: UserMessagesResponse;
|
|
12101
|
+
params: "limit" | "from" | "to" | "sort" | "timestamp";
|
|
12102
|
+
};
|
|
12039
12103
|
money: {
|
|
12040
12104
|
response: UserMoneyResponse;
|
|
12041
12105
|
params: "timestamp";
|
|
12042
12106
|
};
|
|
12107
|
+
newevents: {
|
|
12108
|
+
response: UserNewEventsResponse;
|
|
12109
|
+
params: "striptags" | "timestamp";
|
|
12110
|
+
};
|
|
12111
|
+
newmessages: {
|
|
12112
|
+
response: UserNewMessagesResponse;
|
|
12113
|
+
params: "timestamp";
|
|
12114
|
+
};
|
|
12043
12115
|
organizedcrime: {
|
|
12044
12116
|
response: UserOrganizedCrimeResponse;
|
|
12045
12117
|
params: "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": "
|
|
6
|
+
"version": "4.1.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -557,7 +557,7 @@
|
|
|
557
557
|
"tags": [
|
|
558
558
|
"User"
|
|
559
559
|
],
|
|
560
|
-
"summary": "Get
|
|
560
|
+
"summary": "Get your enlisted cars",
|
|
561
561
|
"description": "Requires minimal access key. <br>Returns a list of all user enlisted cars.",
|
|
562
562
|
"operationId": "dc3deee7629610931240be337c47a8ee",
|
|
563
563
|
"parameters": [
|
|
@@ -591,6 +591,57 @@
|
|
|
591
591
|
"x-stability": "Stable"
|
|
592
592
|
}
|
|
593
593
|
},
|
|
594
|
+
"/user/events": {
|
|
595
|
+
"get": {
|
|
596
|
+
"tags": [
|
|
597
|
+
"User"
|
|
598
|
+
],
|
|
599
|
+
"summary": "Get your events",
|
|
600
|
+
"description": "Requires limited access key. <br> Unfortunately, the 'sort' parameter is not available for this selection.",
|
|
601
|
+
"operationId": "10a22547e0c48046ade435e0b63dfe55",
|
|
602
|
+
"parameters": [
|
|
603
|
+
{
|
|
604
|
+
"$ref": "#/components/parameters/ApiStripTagsFalse"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"$ref": "#/components/parameters/ApiLimit100Default20"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"$ref": "#/components/parameters/ApiFrom"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"$ref": "#/components/parameters/ApiTo"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"$ref": "#/components/parameters/ApiKeyLimited"
|
|
623
|
+
}
|
|
624
|
+
],
|
|
625
|
+
"responses": {
|
|
626
|
+
"200": {
|
|
627
|
+
"description": "Successful operation",
|
|
628
|
+
"content": {
|
|
629
|
+
"application/json": {
|
|
630
|
+
"schema": {
|
|
631
|
+
"$ref": "#/components/schemas/UserEventsResponse"
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
"security": [
|
|
638
|
+
{
|
|
639
|
+
"api_key": []
|
|
640
|
+
}
|
|
641
|
+
],
|
|
642
|
+
"x-stability": "Unstable"
|
|
643
|
+
}
|
|
644
|
+
},
|
|
594
645
|
"/user/faction": {
|
|
595
646
|
"get": {
|
|
596
647
|
"tags": [
|
|
@@ -1689,6 +1740,57 @@
|
|
|
1689
1740
|
"x-stability": "Stable"
|
|
1690
1741
|
}
|
|
1691
1742
|
},
|
|
1743
|
+
"/user/messages": {
|
|
1744
|
+
"get": {
|
|
1745
|
+
"tags": [
|
|
1746
|
+
"User"
|
|
1747
|
+
],
|
|
1748
|
+
"summary": "Get your messages",
|
|
1749
|
+
"description": "Requires limited access key. <br>",
|
|
1750
|
+
"operationId": "20c7b7a3f7395c2afa73597327f401a3",
|
|
1751
|
+
"parameters": [
|
|
1752
|
+
{
|
|
1753
|
+
"$ref": "#/components/parameters/ApiLimit100Default20"
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"$ref": "#/components/parameters/ApiFrom"
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"$ref": "#/components/parameters/ApiTo"
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
"$ref": "#/components/parameters/ApiSort"
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
1766
|
+
},
|
|
1767
|
+
{
|
|
1768
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
1769
|
+
},
|
|
1770
|
+
{
|
|
1771
|
+
"$ref": "#/components/parameters/ApiKeyLimited"
|
|
1772
|
+
}
|
|
1773
|
+
],
|
|
1774
|
+
"responses": {
|
|
1775
|
+
"200": {
|
|
1776
|
+
"description": "Successful operation",
|
|
1777
|
+
"content": {
|
|
1778
|
+
"application/json": {
|
|
1779
|
+
"schema": {
|
|
1780
|
+
"$ref": "#/components/schemas/UserMessagesResponse"
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
},
|
|
1786
|
+
"security": [
|
|
1787
|
+
{
|
|
1788
|
+
"api_key": []
|
|
1789
|
+
}
|
|
1790
|
+
],
|
|
1791
|
+
"x-stability": "Unstable"
|
|
1792
|
+
}
|
|
1793
|
+
},
|
|
1692
1794
|
"/user/money": {
|
|
1693
1795
|
"get": {
|
|
1694
1796
|
"tags": [
|
|
@@ -1728,6 +1830,87 @@
|
|
|
1728
1830
|
"x-stability": "Unstable"
|
|
1729
1831
|
}
|
|
1730
1832
|
},
|
|
1833
|
+
"/user/newevents": {
|
|
1834
|
+
"get": {
|
|
1835
|
+
"tags": [
|
|
1836
|
+
"User"
|
|
1837
|
+
],
|
|
1838
|
+
"summary": "Get your unseen events",
|
|
1839
|
+
"description": "Requires limited access key. <br>",
|
|
1840
|
+
"operationId": "945b8ac03944ca79eb0ae8a640aeab3b",
|
|
1841
|
+
"parameters": [
|
|
1842
|
+
{
|
|
1843
|
+
"$ref": "#/components/parameters/ApiStripTagsFalse"
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
1847
|
+
},
|
|
1848
|
+
{
|
|
1849
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
"$ref": "#/components/parameters/ApiKeyLimited"
|
|
1853
|
+
}
|
|
1854
|
+
],
|
|
1855
|
+
"responses": {
|
|
1856
|
+
"200": {
|
|
1857
|
+
"description": "Successful operation",
|
|
1858
|
+
"content": {
|
|
1859
|
+
"application/json": {
|
|
1860
|
+
"schema": {
|
|
1861
|
+
"$ref": "#/components/schemas/UserNewEventsResponse"
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
},
|
|
1867
|
+
"security": [
|
|
1868
|
+
{
|
|
1869
|
+
"api_key": []
|
|
1870
|
+
}
|
|
1871
|
+
],
|
|
1872
|
+
"x-stability": "Unstable"
|
|
1873
|
+
}
|
|
1874
|
+
},
|
|
1875
|
+
"/user/newmessages": {
|
|
1876
|
+
"get": {
|
|
1877
|
+
"tags": [
|
|
1878
|
+
"User"
|
|
1879
|
+
],
|
|
1880
|
+
"summary": "Get your unseen messages",
|
|
1881
|
+
"description": "Requires limited access key. <br>",
|
|
1882
|
+
"operationId": "8859066800e0652740bfb17f8ecd15a2",
|
|
1883
|
+
"parameters": [
|
|
1884
|
+
{
|
|
1885
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
1886
|
+
},
|
|
1887
|
+
{
|
|
1888
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
"$ref": "#/components/parameters/ApiKeyLimited"
|
|
1892
|
+
}
|
|
1893
|
+
],
|
|
1894
|
+
"responses": {
|
|
1895
|
+
"200": {
|
|
1896
|
+
"description": "Successful operation",
|
|
1897
|
+
"content": {
|
|
1898
|
+
"application/json": {
|
|
1899
|
+
"schema": {
|
|
1900
|
+
"$ref": "#/components/schemas/UserNewMessagesResponse"
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
},
|
|
1906
|
+
"security": [
|
|
1907
|
+
{
|
|
1908
|
+
"api_key": []
|
|
1909
|
+
}
|
|
1910
|
+
],
|
|
1911
|
+
"x-stability": "Unstable"
|
|
1912
|
+
}
|
|
1913
|
+
},
|
|
1731
1914
|
"/user/organizedcrime": {
|
|
1732
1915
|
"get": {
|
|
1733
1916
|
"tags": [
|
|
@@ -2673,6 +2856,20 @@
|
|
|
2673
2856
|
]
|
|
2674
2857
|
}
|
|
2675
2858
|
},
|
|
2859
|
+
{
|
|
2860
|
+
"name": "legacy",
|
|
2861
|
+
"in": "query",
|
|
2862
|
+
"description": "Legacy selection names for which you want or expect API v1 response",
|
|
2863
|
+
"required": false,
|
|
2864
|
+
"style": "form",
|
|
2865
|
+
"explode": false,
|
|
2866
|
+
"schema": {
|
|
2867
|
+
"type": "array",
|
|
2868
|
+
"items": {
|
|
2869
|
+
"$ref": "#/components/schemas/UserSelectionName"
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
},
|
|
2676
2873
|
{
|
|
2677
2874
|
"$ref": "#/components/parameters/ApiLimit"
|
|
2678
2875
|
},
|
|
@@ -2861,6 +3058,18 @@
|
|
|
2861
3058
|
{
|
|
2862
3059
|
"$ref": "#/components/schemas/UserBattleStatsResponse"
|
|
2863
3060
|
},
|
|
3061
|
+
{
|
|
3062
|
+
"$ref": "#/components/schemas/UserNewEventsResponse"
|
|
3063
|
+
},
|
|
3064
|
+
{
|
|
3065
|
+
"$ref": "#/components/schemas/UserEventsResponse"
|
|
3066
|
+
},
|
|
3067
|
+
{
|
|
3068
|
+
"$ref": "#/components/schemas/UserMessagesResponse"
|
|
3069
|
+
},
|
|
3070
|
+
{
|
|
3071
|
+
"$ref": "#/components/schemas/UserNewMessagesResponse"
|
|
3072
|
+
},
|
|
2864
3073
|
{
|
|
2865
3074
|
"$ref": "#/components/schemas/UserLookupResponse"
|
|
2866
3075
|
},
|
|
@@ -5101,6 +5310,20 @@
|
|
|
5101
5310
|
]
|
|
5102
5311
|
}
|
|
5103
5312
|
},
|
|
5313
|
+
{
|
|
5314
|
+
"name": "legacy",
|
|
5315
|
+
"in": "query",
|
|
5316
|
+
"description": "Legacy selection names for which you want or expect API v1 response",
|
|
5317
|
+
"required": false,
|
|
5318
|
+
"style": "form",
|
|
5319
|
+
"explode": false,
|
|
5320
|
+
"schema": {
|
|
5321
|
+
"type": "array",
|
|
5322
|
+
"items": {
|
|
5323
|
+
"$ref": "#/components/schemas/FactionSelectionName"
|
|
5324
|
+
}
|
|
5325
|
+
}
|
|
5326
|
+
},
|
|
5104
5327
|
{
|
|
5105
5328
|
"$ref": "#/components/parameters/ApiLimit"
|
|
5106
5329
|
},
|
|
@@ -6305,6 +6528,20 @@
|
|
|
6305
6528
|
]
|
|
6306
6529
|
}
|
|
6307
6530
|
},
|
|
6531
|
+
{
|
|
6532
|
+
"name": "legacy",
|
|
6533
|
+
"in": "query",
|
|
6534
|
+
"description": "Legacy selection names for which you want or expect API v1 response",
|
|
6535
|
+
"required": false,
|
|
6536
|
+
"style": "form",
|
|
6537
|
+
"explode": false,
|
|
6538
|
+
"schema": {
|
|
6539
|
+
"type": "array",
|
|
6540
|
+
"items": {
|
|
6541
|
+
"$ref": "#/components/schemas/MarketSelectionName"
|
|
6542
|
+
}
|
|
6543
|
+
}
|
|
6544
|
+
},
|
|
6308
6545
|
{
|
|
6309
6546
|
"name": "cat",
|
|
6310
6547
|
"in": "query",
|
|
@@ -8303,6 +8540,20 @@
|
|
|
8303
8540
|
]
|
|
8304
8541
|
}
|
|
8305
8542
|
},
|
|
8543
|
+
{
|
|
8544
|
+
"name": "legacy",
|
|
8545
|
+
"in": "query",
|
|
8546
|
+
"description": "Legacy selection names for which you want or expect API v1 response",
|
|
8547
|
+
"required": false,
|
|
8548
|
+
"style": "form",
|
|
8549
|
+
"explode": false,
|
|
8550
|
+
"schema": {
|
|
8551
|
+
"type": "array",
|
|
8552
|
+
"items": {
|
|
8553
|
+
"$ref": "#/components/schemas/TornSelectionName"
|
|
8554
|
+
}
|
|
8555
|
+
}
|
|
8556
|
+
},
|
|
8306
8557
|
{
|
|
8307
8558
|
"$ref": "#/components/parameters/ApiStripTags"
|
|
8308
8559
|
},
|
|
@@ -8457,6 +8708,15 @@
|
|
|
8457
8708
|
"Subscriber"
|
|
8458
8709
|
]
|
|
8459
8710
|
},
|
|
8711
|
+
"UserMessageTypeEnum": {
|
|
8712
|
+
"type": "string",
|
|
8713
|
+
"enum": [
|
|
8714
|
+
"Company newsletter",
|
|
8715
|
+
"Faction newsletter",
|
|
8716
|
+
"Warning",
|
|
8717
|
+
"User message"
|
|
8718
|
+
]
|
|
8719
|
+
},
|
|
8460
8720
|
"JobTypeEnum": {
|
|
8461
8721
|
"type": "string",
|
|
8462
8722
|
"enum": [
|
|
@@ -8484,6 +8744,20 @@
|
|
|
8484
8744
|
"airliner"
|
|
8485
8745
|
]
|
|
8486
8746
|
},
|
|
8747
|
+
"UserStatusStateEnum": {
|
|
8748
|
+
"type": "string",
|
|
8749
|
+
"enum": [
|
|
8750
|
+
"Abroad",
|
|
8751
|
+
"Awoken",
|
|
8752
|
+
"Dormant",
|
|
8753
|
+
"Fallen",
|
|
8754
|
+
"Federal",
|
|
8755
|
+
"Hospital",
|
|
8756
|
+
"Jail",
|
|
8757
|
+
"Okay",
|
|
8758
|
+
"Traveling"
|
|
8759
|
+
]
|
|
8760
|
+
},
|
|
8487
8761
|
"UserRoleEnum": {
|
|
8488
8762
|
"type": "string",
|
|
8489
8763
|
"enum": [
|
|
@@ -8550,7 +8824,8 @@
|
|
|
8550
8824
|
"Sage",
|
|
8551
8825
|
"Coward",
|
|
8552
8826
|
"Newcomer",
|
|
8553
|
-
"Deserter"
|
|
8827
|
+
"Deserter",
|
|
8828
|
+
"Citizen"
|
|
8554
8829
|
]
|
|
8555
8830
|
},
|
|
8556
8831
|
"UserRankEnum": {
|
|
@@ -13374,6 +13649,13 @@
|
|
|
13374
13649
|
"type": "integer",
|
|
13375
13650
|
"format": "int32"
|
|
13376
13651
|
},
|
|
13652
|
+
"UserMessageId": {
|
|
13653
|
+
"type": "integer",
|
|
13654
|
+
"format": "int64"
|
|
13655
|
+
},
|
|
13656
|
+
"UserEventId": {
|
|
13657
|
+
"type": "string"
|
|
13658
|
+
},
|
|
13377
13659
|
"UserIconId": {
|
|
13378
13660
|
"type": "integer",
|
|
13379
13661
|
"format": "int32"
|
|
@@ -14906,6 +15188,126 @@
|
|
|
14906
15188
|
}
|
|
14907
15189
|
]
|
|
14908
15190
|
},
|
|
15191
|
+
"UserNewEventsResponse": {
|
|
15192
|
+
"required": [
|
|
15193
|
+
"events"
|
|
15194
|
+
],
|
|
15195
|
+
"properties": {
|
|
15196
|
+
"events": {
|
|
15197
|
+
"type": "array",
|
|
15198
|
+
"items": {
|
|
15199
|
+
"$ref": "#/components/schemas/UserEvent"
|
|
15200
|
+
}
|
|
15201
|
+
}
|
|
15202
|
+
},
|
|
15203
|
+
"type": "object"
|
|
15204
|
+
},
|
|
15205
|
+
"UserEventsResponse": {
|
|
15206
|
+
"required": [
|
|
15207
|
+
"events",
|
|
15208
|
+
"_metadata"
|
|
15209
|
+
],
|
|
15210
|
+
"properties": {
|
|
15211
|
+
"events": {
|
|
15212
|
+
"type": "array",
|
|
15213
|
+
"items": {
|
|
15214
|
+
"$ref": "#/components/schemas/UserEvent"
|
|
15215
|
+
}
|
|
15216
|
+
},
|
|
15217
|
+
"_metadata": {
|
|
15218
|
+
"$ref": "#/components/schemas/RequestMetadataWithLinks"
|
|
15219
|
+
}
|
|
15220
|
+
},
|
|
15221
|
+
"type": "object"
|
|
15222
|
+
},
|
|
15223
|
+
"UserEvent": {
|
|
15224
|
+
"required": [
|
|
15225
|
+
"id",
|
|
15226
|
+
"timestamp",
|
|
15227
|
+
"event"
|
|
15228
|
+
],
|
|
15229
|
+
"properties": {
|
|
15230
|
+
"id": {
|
|
15231
|
+
"$ref": "#/components/schemas/UserEventId"
|
|
15232
|
+
},
|
|
15233
|
+
"timestamp": {
|
|
15234
|
+
"type": "integer",
|
|
15235
|
+
"format": "int32"
|
|
15236
|
+
},
|
|
15237
|
+
"event": {
|
|
15238
|
+
"type": "string"
|
|
15239
|
+
}
|
|
15240
|
+
},
|
|
15241
|
+
"type": "object"
|
|
15242
|
+
},
|
|
15243
|
+
"UserMessagesResponse": {
|
|
15244
|
+
"required": [
|
|
15245
|
+
"messages",
|
|
15246
|
+
"_metadata"
|
|
15247
|
+
],
|
|
15248
|
+
"properties": {
|
|
15249
|
+
"messages": {
|
|
15250
|
+
"type": "array",
|
|
15251
|
+
"items": {
|
|
15252
|
+
"$ref": "#/components/schemas/UserMessage"
|
|
15253
|
+
}
|
|
15254
|
+
},
|
|
15255
|
+
"_metadata": {
|
|
15256
|
+
"$ref": "#/components/schemas/RequestMetadataWithLinks"
|
|
15257
|
+
}
|
|
15258
|
+
},
|
|
15259
|
+
"type": "object"
|
|
15260
|
+
},
|
|
15261
|
+
"UserNewMessagesResponse": {
|
|
15262
|
+
"required": [
|
|
15263
|
+
"messages"
|
|
15264
|
+
],
|
|
15265
|
+
"properties": {
|
|
15266
|
+
"messages": {
|
|
15267
|
+
"type": "array",
|
|
15268
|
+
"items": {
|
|
15269
|
+
"$ref": "#/components/schemas/UserMessage"
|
|
15270
|
+
}
|
|
15271
|
+
}
|
|
15272
|
+
},
|
|
15273
|
+
"type": "object"
|
|
15274
|
+
},
|
|
15275
|
+
"UserMessage": {
|
|
15276
|
+
"required": [
|
|
15277
|
+
"id",
|
|
15278
|
+
"sender",
|
|
15279
|
+
"timestamp",
|
|
15280
|
+
"topic",
|
|
15281
|
+
"type",
|
|
15282
|
+
"seen",
|
|
15283
|
+
"read"
|
|
15284
|
+
],
|
|
15285
|
+
"properties": {
|
|
15286
|
+
"id": {
|
|
15287
|
+
"$ref": "#/components/schemas/UserMessageId"
|
|
15288
|
+
},
|
|
15289
|
+
"sender": {
|
|
15290
|
+
"$ref": "#/components/schemas/BasicUser"
|
|
15291
|
+
},
|
|
15292
|
+
"timestamp": {
|
|
15293
|
+
"type": "integer",
|
|
15294
|
+
"format": "int32"
|
|
15295
|
+
},
|
|
15296
|
+
"topic": {
|
|
15297
|
+
"type": "string"
|
|
15298
|
+
},
|
|
15299
|
+
"type": {
|
|
15300
|
+
"$ref": "#/components/schemas/UserMessageTypeEnum"
|
|
15301
|
+
},
|
|
15302
|
+
"seen": {
|
|
15303
|
+
"type": "boolean"
|
|
15304
|
+
},
|
|
15305
|
+
"read": {
|
|
15306
|
+
"type": "boolean"
|
|
15307
|
+
}
|
|
15308
|
+
},
|
|
15309
|
+
"type": "object"
|
|
15310
|
+
},
|
|
14909
15311
|
"UserIconPublic": {
|
|
14910
15312
|
"required": [
|
|
14911
15313
|
"id",
|
|
@@ -17672,7 +18074,7 @@
|
|
|
17672
18074
|
"UserSelectionName": {
|
|
17673
18075
|
"oneOf": [
|
|
17674
18076
|
{
|
|
17675
|
-
"description": "The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','
|
|
18077
|
+
"description": "The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','gym','inventory','missions','networth','notifications','perks','refills','stocks','travel','weaponexp'.",
|
|
17676
18078
|
"type": "string",
|
|
17677
18079
|
"enum": [
|
|
17678
18080
|
"attacks",
|
|
@@ -17684,6 +18086,7 @@
|
|
|
17684
18086
|
"competition",
|
|
17685
18087
|
"crimes",
|
|
17686
18088
|
"enlistedcars",
|
|
18089
|
+
"events",
|
|
17687
18090
|
"faction",
|
|
17688
18091
|
"factionbalance",
|
|
17689
18092
|
"forumfeed",
|
|
@@ -17703,7 +18106,10 @@
|
|
|
17703
18106
|
"lookup",
|
|
17704
18107
|
"medals",
|
|
17705
18108
|
"merits",
|
|
18109
|
+
"messages",
|
|
17706
18110
|
"money",
|
|
18111
|
+
"newevents",
|
|
18112
|
+
"newmessages",
|
|
17707
18113
|
"organizedcrime",
|
|
17708
18114
|
"personalstats",
|
|
17709
18115
|
"profile",
|
|
@@ -17726,14 +18132,10 @@
|
|
|
17726
18132
|
"display",
|
|
17727
18133
|
"education",
|
|
17728
18134
|
"equipment",
|
|
17729
|
-
"events",
|
|
17730
18135
|
"gym",
|
|
17731
18136
|
"inventory",
|
|
17732
|
-
"messages",
|
|
17733
18137
|
"missions",
|
|
17734
18138
|
"networth",
|
|
17735
|
-
"newevents",
|
|
17736
|
-
"newmessages",
|
|
17737
18139
|
"notifications",
|
|
17738
18140
|
"perks",
|
|
17739
18141
|
"refills",
|
|
@@ -22195,7 +22597,14 @@
|
|
|
22195
22597
|
]
|
|
22196
22598
|
},
|
|
22197
22599
|
"state": {
|
|
22198
|
-
"
|
|
22600
|
+
"oneOf": [
|
|
22601
|
+
{
|
|
22602
|
+
"$ref": "#/components/schemas/UserStatusStateEnum"
|
|
22603
|
+
},
|
|
22604
|
+
{
|
|
22605
|
+
"type": "string"
|
|
22606
|
+
}
|
|
22607
|
+
]
|
|
22199
22608
|
},
|
|
22200
22609
|
"color": {
|
|
22201
22610
|
"type": "string"
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate-types": "tsc && node build/index.js"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@scalar/openapi-types": "^0.3.7",
|
|
10
|
-
"@types/node": "^22.18.
|
|
10
|
+
"@types/node": "^22.18.3",
|
|
11
11
|
"prettier": "^3.6.2",
|
|
12
12
|
"typeconv": "^2.3.1",
|
|
13
13
|
"typescript": "^5.9.2"
|