tornapi-typescript 0.2.1 → 0.2.3
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 +22 -15
- package/dist/openapi.json +83 -56
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4521,6 +4521,8 @@ export type LogCategoryId = number;
|
|
|
4521
4521
|
|
|
4522
4522
|
export type FactionId = number;
|
|
4523
4523
|
|
|
4524
|
+
export type CompanyId = number;
|
|
4525
|
+
|
|
4524
4526
|
export type EducationId = number;
|
|
4525
4527
|
|
|
4526
4528
|
export type FactionBranchId = number;
|
|
@@ -4554,6 +4556,11 @@ export interface RequestMetadataWithLinks {
|
|
|
4554
4556
|
links: RequestLinks;
|
|
4555
4557
|
}
|
|
4556
4558
|
|
|
4559
|
+
export interface RequestMetadataWithLinksAndTotal {
|
|
4560
|
+
links: RequestLinks;
|
|
4561
|
+
total?: number;
|
|
4562
|
+
}
|
|
4563
|
+
|
|
4557
4564
|
/**
|
|
4558
4565
|
* This represents the type of the activity. Values range from 1 to 8 where:
|
|
4559
4566
|
* * 1 = 'X posted on a thread',
|
|
@@ -5038,7 +5045,6 @@ export interface FactionMember {
|
|
|
5038
5045
|
has_early_discharge: boolean;
|
|
5039
5046
|
last_action: UserLastAction;
|
|
5040
5047
|
status: UserStatus;
|
|
5041
|
-
life?: UserLife;
|
|
5042
5048
|
revive_setting: ReviveSetting;
|
|
5043
5049
|
}
|
|
5044
5050
|
|
|
@@ -5049,12 +5055,6 @@ export interface UserLastAction {
|
|
|
5049
5055
|
relative: string;
|
|
5050
5056
|
}
|
|
5051
5057
|
|
|
5052
|
-
/** Unfortunately, current life value is often shown incorrectly, and the calculation for each member is very resource heavy, so this field is deprecated and will be removed on 1st of May, 2025. */
|
|
5053
|
-
export interface UserLife {
|
|
5054
|
-
current?: number;
|
|
5055
|
-
maximum?: number;
|
|
5056
|
-
}
|
|
5057
|
-
|
|
5058
5058
|
/** Details about a user's status. */
|
|
5059
5059
|
export interface UserStatus {
|
|
5060
5060
|
description: string;
|
|
@@ -5258,7 +5258,7 @@ export interface FactionChainReport {
|
|
|
5258
5258
|
details: FactionChainReportDetails;
|
|
5259
5259
|
bonuses: FactionChainReportBonus[];
|
|
5260
5260
|
attackers: FactionChainReportAttacker[];
|
|
5261
|
-
/** This is replaced with '
|
|
5261
|
+
/** This is replaced with 'non_attackers' field and will be removed on 1st June 2025. */
|
|
5262
5262
|
"non-attackers"?: UserId[];
|
|
5263
5263
|
non_attackers: UserId[];
|
|
5264
5264
|
}
|
|
@@ -5354,12 +5354,7 @@ export interface FactionCrimeSlot {
|
|
|
5354
5354
|
/** Shows if user has the required item. */
|
|
5355
5355
|
is_available: boolean;
|
|
5356
5356
|
} | null;
|
|
5357
|
-
user_id?: UserId | null;
|
|
5358
5357
|
user: FactionCrimeUser | null;
|
|
5359
|
-
/** This field is replaced with 'checkpoint_pass_rate' field and will be removed on 1st of May 2025. */
|
|
5360
|
-
success_chance?: number;
|
|
5361
|
-
/** This field is replaced with 'checkpoint_pass_rate' field and will be removed on 1st of May 2025. */
|
|
5362
|
-
crime_pass_rate?: number;
|
|
5363
5358
|
/** Returns CPR for the player who joined the slot. If the slot is empty (availalbe), it shows your CPR for that slot. This value is 0 for expired crimes. */
|
|
5364
5359
|
checkpoint_pass_rate: number;
|
|
5365
5360
|
}
|
|
@@ -5653,6 +5648,7 @@ export interface KeyLogResponse {
|
|
|
5653
5648
|
type: string;
|
|
5654
5649
|
selections: string;
|
|
5655
5650
|
id: number | null;
|
|
5651
|
+
comment?: string | null;
|
|
5656
5652
|
ip: string;
|
|
5657
5653
|
}[];
|
|
5658
5654
|
}
|
|
@@ -5674,7 +5670,9 @@ export interface KeyInfoResponse {
|
|
|
5674
5670
|
level: number;
|
|
5675
5671
|
type: ApiKeyAccessTypeEnum;
|
|
5676
5672
|
faction: boolean;
|
|
5673
|
+
faction_id?: FactionId | null;
|
|
5677
5674
|
company: boolean;
|
|
5675
|
+
company_id?: CompanyId | null;
|
|
5678
5676
|
};
|
|
5679
5677
|
};
|
|
5680
5678
|
}
|
|
@@ -5717,7 +5715,6 @@ export interface ItemMarketListingItemDetails {
|
|
|
5717
5715
|
export interface ItemMarketListingNonstackable {
|
|
5718
5716
|
price: number;
|
|
5719
5717
|
amount: number;
|
|
5720
|
-
itemDetails?: ItemMarketListingItemDetails;
|
|
5721
5718
|
item_details: ItemMarketListingItemDetails;
|
|
5722
5719
|
}
|
|
5723
5720
|
|
|
@@ -6623,6 +6620,12 @@ export interface PersonalStatsTrading {
|
|
|
6623
6620
|
sales: number;
|
|
6624
6621
|
profit: number;
|
|
6625
6622
|
};
|
|
6623
|
+
item_market?: {
|
|
6624
|
+
customers: number;
|
|
6625
|
+
sales: number;
|
|
6626
|
+
revenue: number;
|
|
6627
|
+
fees: number;
|
|
6628
|
+
};
|
|
6626
6629
|
};
|
|
6627
6630
|
}
|
|
6628
6631
|
|
|
@@ -6949,7 +6952,11 @@ export type PersonalStatsCategoryEnum =
|
|
|
6949
6952
|
| "missions"
|
|
6950
6953
|
| "racing"
|
|
6951
6954
|
| "networth"
|
|
6952
|
-
| "other"
|
|
6955
|
+
| "other"
|
|
6956
|
+
| "itemmarketcustomers"
|
|
6957
|
+
| "itemmarketsales"
|
|
6958
|
+
| "itemmarketrevenue"
|
|
6959
|
+
| "itemmarketfees";
|
|
6953
6960
|
|
|
6954
6961
|
export type PersonalStatsStatName =
|
|
6955
6962
|
| "attackswon"
|
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": "1.
|
|
6
|
+
"version": "1.6.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -10517,6 +10517,10 @@
|
|
|
10517
10517
|
"type": "integer",
|
|
10518
10518
|
"format": "int32"
|
|
10519
10519
|
},
|
|
10520
|
+
"CompanyId": {
|
|
10521
|
+
"type": "integer",
|
|
10522
|
+
"format": "int32"
|
|
10523
|
+
},
|
|
10520
10524
|
"EducationId": {
|
|
10521
10525
|
"type": "integer",
|
|
10522
10526
|
"format": "int32"
|
|
@@ -10609,6 +10613,21 @@
|
|
|
10609
10613
|
},
|
|
10610
10614
|
"type": "object"
|
|
10611
10615
|
},
|
|
10616
|
+
"RequestMetadataWithLinksAndTotal": {
|
|
10617
|
+
"required": [
|
|
10618
|
+
"links"
|
|
10619
|
+
],
|
|
10620
|
+
"properties": {
|
|
10621
|
+
"links": {
|
|
10622
|
+
"$ref": "#/components/schemas/RequestLinks"
|
|
10623
|
+
},
|
|
10624
|
+
"total": {
|
|
10625
|
+
"type": "integer",
|
|
10626
|
+
"format": "int64"
|
|
10627
|
+
}
|
|
10628
|
+
},
|
|
10629
|
+
"type": "object"
|
|
10630
|
+
},
|
|
10612
10631
|
"ForumFeedTypeEnum": {
|
|
10613
10632
|
"description": "This represents the type of the activity. Values range from 1 to 8 where:\n * 1 = 'X posted on a thread',\n * 2 = 'X created a thread',\n * 3 = 'X liked your thread',\n * 4 = 'X disliked your thread',\n * 5 = 'X liked your post',\n * 6 = 'X disliked your post',\n * 7 = 'X quoted your post'.",
|
|
10614
10633
|
"type": "integer",
|
|
@@ -12113,9 +12132,6 @@
|
|
|
12113
12132
|
"status": {
|
|
12114
12133
|
"$ref": "#/components/schemas/UserStatus"
|
|
12115
12134
|
},
|
|
12116
|
-
"life": {
|
|
12117
|
-
"$ref": "#/components/schemas/UserLife"
|
|
12118
|
-
},
|
|
12119
12135
|
"revive_setting": {
|
|
12120
12136
|
"$ref": "#/components/schemas/ReviveSetting"
|
|
12121
12137
|
}
|
|
@@ -12143,23 +12159,6 @@
|
|
|
12143
12159
|
},
|
|
12144
12160
|
"type": "object"
|
|
12145
12161
|
},
|
|
12146
|
-
"UserLife": {
|
|
12147
|
-
"description": "Unfortunately, current life value is often shown incorrectly, and the calculation for each member is very resource heavy, so this field is deprecated and will be removed on 1st of May, 2025.",
|
|
12148
|
-
"properties": {
|
|
12149
|
-
"current": {
|
|
12150
|
-
"type": "integer",
|
|
12151
|
-
"format": "int32",
|
|
12152
|
-
"deprecated": true
|
|
12153
|
-
},
|
|
12154
|
-
"maximum": {
|
|
12155
|
-
"type": "integer",
|
|
12156
|
-
"format": "int32",
|
|
12157
|
-
"deprecated": true
|
|
12158
|
-
}
|
|
12159
|
-
},
|
|
12160
|
-
"type": "object",
|
|
12161
|
-
"deprecated": true
|
|
12162
|
-
},
|
|
12163
12162
|
"UserStatus": {
|
|
12164
12163
|
"description": "Details about a user's status.",
|
|
12165
12164
|
"required": [
|
|
@@ -12966,7 +12965,7 @@
|
|
|
12966
12965
|
}
|
|
12967
12966
|
},
|
|
12968
12967
|
"non-attackers": {
|
|
12969
|
-
"description": "This is replaced with '
|
|
12968
|
+
"description": "This is replaced with 'non_attackers' field and will be removed on 1st June 2025.",
|
|
12970
12969
|
"type": "array",
|
|
12971
12970
|
"items": {
|
|
12972
12971
|
"$ref": "#/components/schemas/UserId"
|
|
@@ -13355,18 +13354,6 @@
|
|
|
13355
13354
|
}
|
|
13356
13355
|
]
|
|
13357
13356
|
},
|
|
13358
|
-
"user_id": {
|
|
13359
|
-
"description": "This field is replaced with the 'user.id' and will be removed on the 1st of May 2025.",
|
|
13360
|
-
"deprecated": true,
|
|
13361
|
-
"oneOf": [
|
|
13362
|
-
{
|
|
13363
|
-
"$ref": "#/components/schemas/UserId"
|
|
13364
|
-
},
|
|
13365
|
-
{
|
|
13366
|
-
"type": "null"
|
|
13367
|
-
}
|
|
13368
|
-
]
|
|
13369
|
-
},
|
|
13370
13357
|
"user": {
|
|
13371
13358
|
"description": "Details about the user joined the slot, if any.",
|
|
13372
13359
|
"oneOf": [
|
|
@@ -13378,18 +13365,6 @@
|
|
|
13378
13365
|
}
|
|
13379
13366
|
]
|
|
13380
13367
|
},
|
|
13381
|
-
"success_chance": {
|
|
13382
|
-
"description": "This field is replaced with 'checkpoint_pass_rate' field and will be removed on 1st of May 2025.",
|
|
13383
|
-
"type": "integer",
|
|
13384
|
-
"format": "int32",
|
|
13385
|
-
"deprecated": true
|
|
13386
|
-
},
|
|
13387
|
-
"crime_pass_rate": {
|
|
13388
|
-
"description": "This field is replaced with 'checkpoint_pass_rate' field and will be removed on 1st of May 2025.",
|
|
13389
|
-
"type": "integer",
|
|
13390
|
-
"format": "int32",
|
|
13391
|
-
"deprecated": true
|
|
13392
|
-
},
|
|
13393
13368
|
"checkpoint_pass_rate": {
|
|
13394
13369
|
"description": "Returns CPR for the player who joined the slot. If the slot is empty (availalbe), it shows your CPR for that slot. This value is 0 for expired crimes.",
|
|
13395
13370
|
"type": "integer",
|
|
@@ -14428,6 +14403,16 @@
|
|
|
14428
14403
|
}
|
|
14429
14404
|
]
|
|
14430
14405
|
},
|
|
14406
|
+
"comment": {
|
|
14407
|
+
"oneOf": [
|
|
14408
|
+
{
|
|
14409
|
+
"type": "string"
|
|
14410
|
+
},
|
|
14411
|
+
{
|
|
14412
|
+
"type": "null"
|
|
14413
|
+
}
|
|
14414
|
+
]
|
|
14415
|
+
},
|
|
14431
14416
|
"ip": {
|
|
14432
14417
|
"type": "string"
|
|
14433
14418
|
}
|
|
@@ -14537,8 +14522,28 @@
|
|
|
14537
14522
|
"faction": {
|
|
14538
14523
|
"type": "boolean"
|
|
14539
14524
|
},
|
|
14525
|
+
"faction_id": {
|
|
14526
|
+
"oneOf": [
|
|
14527
|
+
{
|
|
14528
|
+
"$ref": "#/components/schemas/FactionId"
|
|
14529
|
+
},
|
|
14530
|
+
{
|
|
14531
|
+
"type": "null"
|
|
14532
|
+
}
|
|
14533
|
+
]
|
|
14534
|
+
},
|
|
14540
14535
|
"company": {
|
|
14541
14536
|
"type": "boolean"
|
|
14537
|
+
},
|
|
14538
|
+
"company_id": {
|
|
14539
|
+
"oneOf": [
|
|
14540
|
+
{
|
|
14541
|
+
"$ref": "#/components/schemas/CompanyId"
|
|
14542
|
+
},
|
|
14543
|
+
{
|
|
14544
|
+
"type": "null"
|
|
14545
|
+
}
|
|
14546
|
+
]
|
|
14542
14547
|
}
|
|
14543
14548
|
},
|
|
14544
14549
|
"type": "object"
|
|
@@ -14723,15 +14728,6 @@
|
|
|
14723
14728
|
"type": "integer",
|
|
14724
14729
|
"format": "int32"
|
|
14725
14730
|
},
|
|
14726
|
-
"itemDetails": {
|
|
14727
|
-
"description": "This field used camelCase instead of snake_case by accident and is replaced with 'item_details' field. This will be removed on 1st of May 2025.",
|
|
14728
|
-
"deprecated": true,
|
|
14729
|
-
"allOf": [
|
|
14730
|
-
{
|
|
14731
|
-
"$ref": "#/components/schemas/ItemMarketListingItemDetails"
|
|
14732
|
-
}
|
|
14733
|
-
]
|
|
14734
|
-
},
|
|
14735
14731
|
"item_details": {
|
|
14736
14732
|
"$ref": "#/components/schemas/ItemMarketListingItemDetails"
|
|
14737
14733
|
}
|
|
@@ -18362,6 +18358,33 @@
|
|
|
18362
18358
|
}
|
|
18363
18359
|
},
|
|
18364
18360
|
"type": "object"
|
|
18361
|
+
},
|
|
18362
|
+
"item_market": {
|
|
18363
|
+
"required": [
|
|
18364
|
+
"customers",
|
|
18365
|
+
"sales",
|
|
18366
|
+
"revenue",
|
|
18367
|
+
"fees"
|
|
18368
|
+
],
|
|
18369
|
+
"properties": {
|
|
18370
|
+
"customers": {
|
|
18371
|
+
"type": "integer",
|
|
18372
|
+
"format": "int32"
|
|
18373
|
+
},
|
|
18374
|
+
"sales": {
|
|
18375
|
+
"type": "integer",
|
|
18376
|
+
"format": "int32"
|
|
18377
|
+
},
|
|
18378
|
+
"revenue": {
|
|
18379
|
+
"type": "integer",
|
|
18380
|
+
"format": "int64"
|
|
18381
|
+
},
|
|
18382
|
+
"fees": {
|
|
18383
|
+
"type": "integer",
|
|
18384
|
+
"format": "int64"
|
|
18385
|
+
}
|
|
18386
|
+
},
|
|
18387
|
+
"type": "object"
|
|
18365
18388
|
}
|
|
18366
18389
|
},
|
|
18367
18390
|
"type": "object"
|
|
@@ -19602,7 +19625,11 @@
|
|
|
19602
19625
|
"missions",
|
|
19603
19626
|
"racing",
|
|
19604
19627
|
"networth",
|
|
19605
|
-
"other"
|
|
19628
|
+
"other",
|
|
19629
|
+
"itemmarketcustomers",
|
|
19630
|
+
"itemmarketsales",
|
|
19631
|
+
"itemmarketrevenue",
|
|
19632
|
+
"itemmarketfees"
|
|
19606
19633
|
]
|
|
19607
19634
|
},
|
|
19608
19635
|
"PersonalStatsStatName": {
|