tornapi-typescript 3.0.12 → 3.0.19
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 +12 -3
- package/dist/index.ts +16 -3
- package/dist/openapi.json +57 -6
- 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,17 +402,19 @@ 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
|
}
|
|
407
409
|
export interface UserJobResponse {
|
|
408
410
|
job: UserJob | UserCompany | null;
|
|
409
411
|
}
|
|
412
|
+
/** The property 'days_married' is not present if the status is 'Engaged' */
|
|
410
413
|
export interface ProfileSpouse {
|
|
411
414
|
id: UserId;
|
|
412
415
|
name: string;
|
|
413
416
|
status: UserMaritalStatusEnum;
|
|
414
|
-
days_married
|
|
417
|
+
days_married?: number;
|
|
415
418
|
}
|
|
416
419
|
export interface UserProfileResponse {
|
|
417
420
|
profile: {
|
|
@@ -420,6 +423,7 @@ export interface UserProfileResponse {
|
|
|
420
423
|
level: number;
|
|
421
424
|
rank: UserRankEnum;
|
|
422
425
|
title: UserTitleEnum;
|
|
426
|
+
donator_status: UserDonatorStatusEnum | null;
|
|
423
427
|
/** Age in days. */
|
|
424
428
|
age: number;
|
|
425
429
|
signed_up: number;
|
|
@@ -891,8 +895,12 @@ export interface UserFactionBalance {
|
|
|
891
895
|
export interface UserFactionBalanceResponse {
|
|
892
896
|
factionBalance: UserFactionBalance | null;
|
|
893
897
|
}
|
|
898
|
+
export interface UserOrganizedCrimeError {
|
|
899
|
+
code: 27;
|
|
900
|
+
error: string;
|
|
901
|
+
}
|
|
894
902
|
export interface UserOrganizedCrimeResponse {
|
|
895
|
-
organizedCrime: FactionCrime | null;
|
|
903
|
+
organizedCrime: FactionCrime | UserOrganizedCrimeError | null;
|
|
896
904
|
}
|
|
897
905
|
export interface UserList {
|
|
898
906
|
id: UserId;
|
|
@@ -1811,6 +1819,7 @@ export interface UserStatus {
|
|
|
1811
1819
|
description: string;
|
|
1812
1820
|
details: string | null;
|
|
1813
1821
|
state: string;
|
|
1822
|
+
color: string;
|
|
1814
1823
|
until: number | null;
|
|
1815
1824
|
/** This field is populated only if the state is 'Traveling'. */
|
|
1816
1825
|
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
|
}
|
|
@@ -5338,11 +5343,12 @@ export interface UserJobResponse {
|
|
|
5338
5343
|
job: UserJob | UserCompany | null;
|
|
5339
5344
|
}
|
|
5340
5345
|
|
|
5346
|
+
/** The property 'days_married' is not present if the status is 'Engaged' */
|
|
5341
5347
|
export interface ProfileSpouse {
|
|
5342
5348
|
id: UserId;
|
|
5343
5349
|
name: string;
|
|
5344
5350
|
status: UserMaritalStatusEnum;
|
|
5345
|
-
days_married
|
|
5351
|
+
days_married?: number;
|
|
5346
5352
|
}
|
|
5347
5353
|
|
|
5348
5354
|
export interface UserProfileResponse {
|
|
@@ -5352,6 +5358,7 @@ export interface UserProfileResponse {
|
|
|
5352
5358
|
level: number;
|
|
5353
5359
|
rank: UserRankEnum;
|
|
5354
5360
|
title: UserTitleEnum;
|
|
5361
|
+
donator_status: UserDonatorStatusEnum | null;
|
|
5355
5362
|
/** Age in days. */
|
|
5356
5363
|
age: number;
|
|
5357
5364
|
signed_up: number;
|
|
@@ -5910,8 +5917,13 @@ export interface UserFactionBalanceResponse {
|
|
|
5910
5917
|
factionBalance: UserFactionBalance | null;
|
|
5911
5918
|
}
|
|
5912
5919
|
|
|
5920
|
+
export interface UserOrganizedCrimeError {
|
|
5921
|
+
code: 27;
|
|
5922
|
+
error: string;
|
|
5923
|
+
}
|
|
5924
|
+
|
|
5913
5925
|
export interface UserOrganizedCrimeResponse {
|
|
5914
|
-
organizedCrime: FactionCrime | null;
|
|
5926
|
+
organizedCrime: FactionCrime | UserOrganizedCrimeError | null;
|
|
5915
5927
|
}
|
|
5916
5928
|
|
|
5917
5929
|
export interface UserList {
|
|
@@ -7228,6 +7240,7 @@ export interface UserStatus {
|
|
|
7228
7240
|
description: string;
|
|
7229
7241
|
details: string | null;
|
|
7230
7242
|
state: string;
|
|
7243
|
+
color: string;
|
|
7231
7244
|
until: number | null;
|
|
7232
7245
|
/** This field is populated only if the state is 'Traveling'. */
|
|
7233
7246
|
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.19"
|
|
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
|
},
|
|
@@ -15245,11 +15259,11 @@
|
|
|
15245
15259
|
"type": "object"
|
|
15246
15260
|
},
|
|
15247
15261
|
"ProfileSpouse": {
|
|
15262
|
+
"description": "The property 'days_married' is not present if the status is 'Engaged'",
|
|
15248
15263
|
"required": [
|
|
15249
15264
|
"id",
|
|
15250
15265
|
"name",
|
|
15251
|
-
"status"
|
|
15252
|
-
"days_married"
|
|
15266
|
+
"status"
|
|
15253
15267
|
],
|
|
15254
15268
|
"properties": {
|
|
15255
15269
|
"id": {
|
|
@@ -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
|
{
|