tornapi-typescript 3.1.0 → 4.0.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 +3 -2
- package/dist/index.ts +14 -2
- package/dist/openapi.json +25 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,9 @@ 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
11
|
export type UserPlaneImageTypeEnum = "private_jet" | "light_aircraft" | "airliner";
|
|
12
|
+
export type UserStatusStateEnum = "Abroad" | "Awoken" | "Dormant" | "Fallen" | "Federal" | "Hospital" | "Jail" | "Okay" | "Traveling";
|
|
12
13
|
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";
|
|
14
|
+
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
15
|
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
16
|
export type UserRpsStatus = "scissors" | "rock" | "paper";
|
|
16
17
|
export type UserSkillSlugEnum = "hunting" | "racing" | "reviving" | "search_for_cash" | "bootlegging" | "graffiti" | "shoplifting" | "pickpocketing" | "card_skimming" | "burglary" | "hustling" | "disposal" | "cracking" | "forgery" | "scamming" | "arson";
|
|
@@ -1816,7 +1817,7 @@ export interface UserLastAction {
|
|
|
1816
1817
|
export interface UserStatus {
|
|
1817
1818
|
description: string;
|
|
1818
1819
|
details: string | null;
|
|
1819
|
-
state: string;
|
|
1820
|
+
state: UserStatusStateEnum | string;
|
|
1820
1821
|
color: string;
|
|
1821
1822
|
until: number | null;
|
|
1822
1823
|
/** This field is replaced by the 'plane_image_type' field and will be removed on October 1st 2025. */
|
package/dist/index.ts
CHANGED
|
@@ -26,6 +26,17 @@ export type UserPlaneImageTypeEnum =
|
|
|
26
26
|
| "light_aircraft"
|
|
27
27
|
| "airliner";
|
|
28
28
|
|
|
29
|
+
export type UserStatusStateEnum =
|
|
30
|
+
| "Abroad"
|
|
31
|
+
| "Awoken"
|
|
32
|
+
| "Dormant"
|
|
33
|
+
| "Fallen"
|
|
34
|
+
| "Federal"
|
|
35
|
+
| "Hospital"
|
|
36
|
+
| "Jail"
|
|
37
|
+
| "Okay"
|
|
38
|
+
| "Traveling";
|
|
39
|
+
|
|
29
40
|
export type UserRoleEnum =
|
|
30
41
|
| "Admin"
|
|
31
42
|
| "Officer"
|
|
@@ -87,7 +98,8 @@ export type UserTitleEnum =
|
|
|
87
98
|
| "Sage"
|
|
88
99
|
| "Coward"
|
|
89
100
|
| "Newcomer"
|
|
90
|
-
| "Deserter"
|
|
101
|
+
| "Deserter"
|
|
102
|
+
| "Citizen";
|
|
91
103
|
|
|
92
104
|
export type UserRankEnum =
|
|
93
105
|
| "Absolute beginner"
|
|
@@ -7241,7 +7253,7 @@ export interface UserLastAction {
|
|
|
7241
7253
|
export interface UserStatus {
|
|
7242
7254
|
description: string;
|
|
7243
7255
|
details: string | null;
|
|
7244
|
-
state: string;
|
|
7256
|
+
state: UserStatusStateEnum | string;
|
|
7245
7257
|
color: string;
|
|
7246
7258
|
until: number | null;
|
|
7247
7259
|
/** This field is replaced by the 'plane_image_type' field and will be removed on October 1st 2025. */
|
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.0.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -8484,6 +8484,20 @@
|
|
|
8484
8484
|
"airliner"
|
|
8485
8485
|
]
|
|
8486
8486
|
},
|
|
8487
|
+
"UserStatusStateEnum": {
|
|
8488
|
+
"type": "string",
|
|
8489
|
+
"enum": [
|
|
8490
|
+
"Abroad",
|
|
8491
|
+
"Awoken",
|
|
8492
|
+
"Dormant",
|
|
8493
|
+
"Fallen",
|
|
8494
|
+
"Federal",
|
|
8495
|
+
"Hospital",
|
|
8496
|
+
"Jail",
|
|
8497
|
+
"Okay",
|
|
8498
|
+
"Traveling"
|
|
8499
|
+
]
|
|
8500
|
+
},
|
|
8487
8501
|
"UserRoleEnum": {
|
|
8488
8502
|
"type": "string",
|
|
8489
8503
|
"enum": [
|
|
@@ -8550,7 +8564,8 @@
|
|
|
8550
8564
|
"Sage",
|
|
8551
8565
|
"Coward",
|
|
8552
8566
|
"Newcomer",
|
|
8553
|
-
"Deserter"
|
|
8567
|
+
"Deserter",
|
|
8568
|
+
"Citizen"
|
|
8554
8569
|
]
|
|
8555
8570
|
},
|
|
8556
8571
|
"UserRankEnum": {
|
|
@@ -22195,7 +22210,14 @@
|
|
|
22195
22210
|
]
|
|
22196
22211
|
},
|
|
22197
22212
|
"state": {
|
|
22198
|
-
"
|
|
22213
|
+
"oneOf": [
|
|
22214
|
+
{
|
|
22215
|
+
"$ref": "#/components/schemas/UserStatusStateEnum"
|
|
22216
|
+
},
|
|
22217
|
+
{
|
|
22218
|
+
"type": "string"
|
|
22219
|
+
}
|
|
22220
|
+
]
|
|
22199
22221
|
},
|
|
22200
22222
|
"color": {
|
|
22201
22223
|
"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.0.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"
|