tornapi-typescript 3.0.12 → 3.0.18
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 +10 -2
- package/dist/index.ts +14 -2
- package/dist/openapi.json +55 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* - {@link https://github.com/grantila/typeconv}
|
|
6
6
|
*/
|
|
7
7
|
export type RaceClassEnum = "A" | "B" | "C" | "D" | "E";
|
|
8
|
+
export type UserDonatorStatusEnum = "Donator" | "Subscriber";
|
|
8
9
|
export type JobTypeEnum = "Army" | "Casino" | "Education" | "Grocer" | "Law" | "Medical";
|
|
9
10
|
export type UserMaritalStatusEnum = "Engaged" | "Newlywed" | "Married";
|
|
10
11
|
export type UserRoleEnum = "Admin" | "Officer" | "Moderator" | "Helper" | "Tester" | "NPC" | "Committee" | "Reporter" | "Wiki Contributor" | "Wiki Editor" | "Civilian";
|
|
11
|
-
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";
|
|
12
|
+
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";
|
|
12
13
|
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";
|
|
13
14
|
export type UserRpsStatus = "scissors" | "rock" | "paper";
|
|
14
15
|
export type UserSkillSlugEnum = "hunting" | "racing" | "reviving" | "search_for_cash" | "bootlegging" | "graffiti" | "shoplifting" | "pickpocketing" | "card_skimming" | "burglary" | "hustling" | "disposal" | "cracking" | "forgery" | "scamming" | "arson";
|
|
@@ -401,6 +402,7 @@ export interface UserCompany {
|
|
|
401
402
|
id: CompanyId;
|
|
402
403
|
type_id: CompanyTypeId;
|
|
403
404
|
name: string;
|
|
405
|
+
rating: number;
|
|
404
406
|
position: string;
|
|
405
407
|
days_in_company: number;
|
|
406
408
|
}
|
|
@@ -420,6 +422,7 @@ export interface UserProfileResponse {
|
|
|
420
422
|
level: number;
|
|
421
423
|
rank: UserRankEnum;
|
|
422
424
|
title: UserTitleEnum;
|
|
425
|
+
donator_status: UserDonatorStatusEnum | null;
|
|
423
426
|
/** Age in days. */
|
|
424
427
|
age: number;
|
|
425
428
|
signed_up: number;
|
|
@@ -891,8 +894,12 @@ export interface UserFactionBalance {
|
|
|
891
894
|
export interface UserFactionBalanceResponse {
|
|
892
895
|
factionBalance: UserFactionBalance | null;
|
|
893
896
|
}
|
|
897
|
+
export interface UserOrganizedCrimeError {
|
|
898
|
+
code: 27;
|
|
899
|
+
error: string;
|
|
900
|
+
}
|
|
894
901
|
export interface UserOrganizedCrimeResponse {
|
|
895
|
-
organizedCrime: FactionCrime | null;
|
|
902
|
+
organizedCrime: FactionCrime | UserOrganizedCrimeError | null;
|
|
896
903
|
}
|
|
897
904
|
export interface UserList {
|
|
898
905
|
id: UserId;
|
|
@@ -1811,6 +1818,7 @@ export interface UserStatus {
|
|
|
1811
1818
|
description: string;
|
|
1812
1819
|
details: string | null;
|
|
1813
1820
|
state: string;
|
|
1821
|
+
color: string;
|
|
1814
1822
|
until: number | null;
|
|
1815
1823
|
/** This field is populated only if the state is 'Traveling'. */
|
|
1816
1824
|
travel_type?: string;
|
package/dist/index.ts
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
export type RaceClassEnum = "A" | "B" | "C" | "D" | "E";
|
|
11
11
|
|
|
12
|
+
export type UserDonatorStatusEnum = "Donator" | "Subscriber";
|
|
13
|
+
|
|
12
14
|
export type JobTypeEnum =
|
|
13
15
|
| "Army"
|
|
14
16
|
| "Casino"
|
|
@@ -78,7 +80,9 @@ export type UserTitleEnum =
|
|
|
78
80
|
| "Tourist"
|
|
79
81
|
| "Nudist"
|
|
80
82
|
| "Sage"
|
|
81
|
-
| "Coward"
|
|
83
|
+
| "Coward"
|
|
84
|
+
| "Newcomer"
|
|
85
|
+
| "Deserter";
|
|
82
86
|
|
|
83
87
|
export type UserRankEnum =
|
|
84
88
|
| "Absolute beginner"
|
|
@@ -5330,6 +5334,7 @@ export interface UserCompany {
|
|
|
5330
5334
|
id: CompanyId;
|
|
5331
5335
|
type_id: CompanyTypeId;
|
|
5332
5336
|
name: string;
|
|
5337
|
+
rating: number;
|
|
5333
5338
|
position: string;
|
|
5334
5339
|
days_in_company: number;
|
|
5335
5340
|
}
|
|
@@ -5352,6 +5357,7 @@ export interface UserProfileResponse {
|
|
|
5352
5357
|
level: number;
|
|
5353
5358
|
rank: UserRankEnum;
|
|
5354
5359
|
title: UserTitleEnum;
|
|
5360
|
+
donator_status: UserDonatorStatusEnum | null;
|
|
5355
5361
|
/** Age in days. */
|
|
5356
5362
|
age: number;
|
|
5357
5363
|
signed_up: number;
|
|
@@ -5910,8 +5916,13 @@ export interface UserFactionBalanceResponse {
|
|
|
5910
5916
|
factionBalance: UserFactionBalance | null;
|
|
5911
5917
|
}
|
|
5912
5918
|
|
|
5919
|
+
export interface UserOrganizedCrimeError {
|
|
5920
|
+
code: 27;
|
|
5921
|
+
error: string;
|
|
5922
|
+
}
|
|
5923
|
+
|
|
5913
5924
|
export interface UserOrganizedCrimeResponse {
|
|
5914
|
-
organizedCrime: FactionCrime | null;
|
|
5925
|
+
organizedCrime: FactionCrime | UserOrganizedCrimeError | null;
|
|
5915
5926
|
}
|
|
5916
5927
|
|
|
5917
5928
|
export interface UserList {
|
|
@@ -7228,6 +7239,7 @@ export interface UserStatus {
|
|
|
7228
7239
|
description: string;
|
|
7229
7240
|
details: string | null;
|
|
7230
7241
|
state: string;
|
|
7242
|
+
color: string;
|
|
7231
7243
|
until: number | null;
|
|
7232
7244
|
/** This field is populated only if the state is 'Traveling'. */
|
|
7233
7245
|
travel_type?: string;
|
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.0.18"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -8473,6 +8473,13 @@
|
|
|
8473
8473
|
"E"
|
|
8474
8474
|
]
|
|
8475
8475
|
},
|
|
8476
|
+
"UserDonatorStatusEnum": {
|
|
8477
|
+
"type": "string",
|
|
8478
|
+
"enum": [
|
|
8479
|
+
"Donator",
|
|
8480
|
+
"Subscriber"
|
|
8481
|
+
]
|
|
8482
|
+
},
|
|
8476
8483
|
"JobTypeEnum": {
|
|
8477
8484
|
"type": "string",
|
|
8478
8485
|
"enum": [
|
|
@@ -8556,7 +8563,9 @@
|
|
|
8556
8563
|
"Tourist",
|
|
8557
8564
|
"Nudist",
|
|
8558
8565
|
"Sage",
|
|
8559
|
-
"Coward"
|
|
8566
|
+
"Coward",
|
|
8567
|
+
"Newcomer",
|
|
8568
|
+
"Deserter"
|
|
8560
8569
|
]
|
|
8561
8570
|
},
|
|
8562
8571
|
"UserRankEnum": {
|
|
@@ -15194,6 +15203,7 @@
|
|
|
15194
15203
|
"id",
|
|
15195
15204
|
"type_id",
|
|
15196
15205
|
"name",
|
|
15206
|
+
"rating",
|
|
15197
15207
|
"position",
|
|
15198
15208
|
"days_in_company"
|
|
15199
15209
|
],
|
|
@@ -15213,6 +15223,10 @@
|
|
|
15213
15223
|
"name": {
|
|
15214
15224
|
"type": "string"
|
|
15215
15225
|
},
|
|
15226
|
+
"rating": {
|
|
15227
|
+
"type": "integer",
|
|
15228
|
+
"format": "int32"
|
|
15229
|
+
},
|
|
15216
15230
|
"position": {
|
|
15217
15231
|
"type": "string"
|
|
15218
15232
|
},
|
|
@@ -15297,7 +15311,8 @@
|
|
|
15297
15311
|
"forum_posts",
|
|
15298
15312
|
"karma",
|
|
15299
15313
|
"last_action",
|
|
15300
|
-
"life"
|
|
15314
|
+
"life",
|
|
15315
|
+
"donator_status"
|
|
15301
15316
|
],
|
|
15302
15317
|
"properties": {
|
|
15303
15318
|
"id": {
|
|
@@ -15316,6 +15331,16 @@
|
|
|
15316
15331
|
"title": {
|
|
15317
15332
|
"$ref": "#/components/schemas/UserTitleEnum"
|
|
15318
15333
|
},
|
|
15334
|
+
"donator_status": {
|
|
15335
|
+
"oneOf": [
|
|
15336
|
+
{
|
|
15337
|
+
"$ref": "#/components/schemas/UserDonatorStatusEnum"
|
|
15338
|
+
},
|
|
15339
|
+
{
|
|
15340
|
+
"type": "null"
|
|
15341
|
+
}
|
|
15342
|
+
]
|
|
15343
|
+
},
|
|
15319
15344
|
"age": {
|
|
15320
15345
|
"description": "Age in days.",
|
|
15321
15346
|
"type": "integer",
|
|
@@ -17561,6 +17586,25 @@
|
|
|
17561
17586
|
},
|
|
17562
17587
|
"type": "object"
|
|
17563
17588
|
},
|
|
17589
|
+
"UserOrganizedCrimeError": {
|
|
17590
|
+
"required": [
|
|
17591
|
+
"code",
|
|
17592
|
+
"error"
|
|
17593
|
+
],
|
|
17594
|
+
"properties": {
|
|
17595
|
+
"code": {
|
|
17596
|
+
"type": "integer",
|
|
17597
|
+
"format": "int32",
|
|
17598
|
+
"enum": [
|
|
17599
|
+
27
|
|
17600
|
+
]
|
|
17601
|
+
},
|
|
17602
|
+
"error": {
|
|
17603
|
+
"type": "string"
|
|
17604
|
+
}
|
|
17605
|
+
},
|
|
17606
|
+
"type": "object"
|
|
17607
|
+
},
|
|
17564
17608
|
"UserOrganizedCrimeResponse": {
|
|
17565
17609
|
"required": [
|
|
17566
17610
|
"organizedCrime"
|
|
@@ -17571,6 +17615,9 @@
|
|
|
17571
17615
|
{
|
|
17572
17616
|
"$ref": "#/components/schemas/FactionCrime"
|
|
17573
17617
|
},
|
|
17618
|
+
{
|
|
17619
|
+
"$ref": "#/components/schemas/UserOrganizedCrimeError"
|
|
17620
|
+
},
|
|
17574
17621
|
{
|
|
17575
17622
|
"type": "null"
|
|
17576
17623
|
}
|
|
@@ -22169,7 +22216,8 @@
|
|
|
22169
22216
|
"description",
|
|
22170
22217
|
"details",
|
|
22171
22218
|
"state",
|
|
22172
|
-
"until"
|
|
22219
|
+
"until",
|
|
22220
|
+
"color"
|
|
22173
22221
|
],
|
|
22174
22222
|
"properties": {
|
|
22175
22223
|
"description": {
|
|
@@ -22188,6 +22236,9 @@
|
|
|
22188
22236
|
"state": {
|
|
22189
22237
|
"type": "string"
|
|
22190
22238
|
},
|
|
22239
|
+
"color": {
|
|
22240
|
+
"type": "string"
|
|
22241
|
+
},
|
|
22191
22242
|
"until": {
|
|
22192
22243
|
"oneOf": [
|
|
22193
22244
|
{
|