tornapi-typescript 1.11.3 → 2.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 +48 -5
- package/dist/openapi.json +254 -32
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -4548,6 +4548,8 @@ export type FactionCrimeUserOutcome =
|
|
|
4548
4548
|
|
|
4549
4549
|
export type RaceId = number;
|
|
4550
4550
|
|
|
4551
|
+
export type OrganizedCrimeName = string;
|
|
4552
|
+
|
|
4551
4553
|
export type PropertyTypeId = number;
|
|
4552
4554
|
|
|
4553
4555
|
export type PropertyId = number;
|
|
@@ -6491,13 +6493,18 @@ export interface FactionTerritoryWarfare {
|
|
|
6491
6493
|
result: string;
|
|
6492
6494
|
}
|
|
6493
6495
|
|
|
6496
|
+
export interface FactionTerritoryWarFactionWallPlayers {
|
|
6497
|
+
id: UserId;
|
|
6498
|
+
name: string;
|
|
6499
|
+
}
|
|
6500
|
+
|
|
6494
6501
|
/** The fields 'chain' and 'players_on_wall' exist only for wars with the result 'in_progress'. */
|
|
6495
6502
|
export interface FactionTerritoryWarFaction {
|
|
6496
6503
|
id: FactionId;
|
|
6497
6504
|
name: string;
|
|
6498
6505
|
score: number;
|
|
6499
6506
|
chain?: number;
|
|
6500
|
-
players_on_wall?:
|
|
6507
|
+
players_on_wall?: FactionTerritoryWarFactionWallPlayers[];
|
|
6501
6508
|
}
|
|
6502
6509
|
|
|
6503
6510
|
export interface FactionTerritoryWarFinishedFaction {
|
|
@@ -6896,9 +6903,9 @@ export interface FactionApplication {
|
|
|
6896
6903
|
speed: number;
|
|
6897
6904
|
dexterity: number;
|
|
6898
6905
|
defense: number;
|
|
6899
|
-
};
|
|
6906
|
+
} | null;
|
|
6900
6907
|
};
|
|
6901
|
-
message: string;
|
|
6908
|
+
message: string | null;
|
|
6902
6909
|
valid_until: number;
|
|
6903
6910
|
status: FactionApplicationStatusEnum;
|
|
6904
6911
|
}
|
|
@@ -7058,7 +7065,7 @@ export interface FactionCrimeSlot {
|
|
|
7058
7065
|
export interface FactionCrime {
|
|
7059
7066
|
id: FactionCrimeId;
|
|
7060
7067
|
previous_crime_id: FactionCrimeId | null;
|
|
7061
|
-
name:
|
|
7068
|
+
name: OrganizedCrimeName;
|
|
7062
7069
|
difficulty: number;
|
|
7063
7070
|
status: FactionCrimeStatusEnum;
|
|
7064
7071
|
/** The timestamp at which the crime was created. */
|
|
@@ -7634,6 +7641,42 @@ export interface PropertyLookupResponse {
|
|
|
7634
7641
|
selections: PropertySelectionName[];
|
|
7635
7642
|
}
|
|
7636
7643
|
|
|
7644
|
+
export interface TornOrganizedCrimeResponse {
|
|
7645
|
+
organizedcrimes: TornOrganizedCrime[];
|
|
7646
|
+
}
|
|
7647
|
+
|
|
7648
|
+
export interface TornOrganizedCrime {
|
|
7649
|
+
name: OrganizedCrimeName;
|
|
7650
|
+
description: string;
|
|
7651
|
+
difficulty: number;
|
|
7652
|
+
spawn: TornOrganizedCrimeSpawn;
|
|
7653
|
+
scope: TornOrganizedCrimeScope;
|
|
7654
|
+
prerequisite: OrganizedCrimeName | null;
|
|
7655
|
+
slots: TornOrganizedCrimeSlot[];
|
|
7656
|
+
}
|
|
7657
|
+
|
|
7658
|
+
export interface TornOrganizedCrimeSpawn {
|
|
7659
|
+
level: number;
|
|
7660
|
+
name: string;
|
|
7661
|
+
}
|
|
7662
|
+
|
|
7663
|
+
export interface TornOrganizedCrimeScope {
|
|
7664
|
+
cost: number;
|
|
7665
|
+
return: number;
|
|
7666
|
+
}
|
|
7667
|
+
|
|
7668
|
+
export interface TornOrganizedCrimeSlot {
|
|
7669
|
+
id: string;
|
|
7670
|
+
name: string;
|
|
7671
|
+
required_item: TornOrganizedCrimeRequiredItem | null;
|
|
7672
|
+
}
|
|
7673
|
+
|
|
7674
|
+
export interface TornOrganizedCrimeRequiredItem {
|
|
7675
|
+
id: ItemId;
|
|
7676
|
+
name: string;
|
|
7677
|
+
is_used: boolean;
|
|
7678
|
+
}
|
|
7679
|
+
|
|
7637
7680
|
export interface TornProperties {
|
|
7638
7681
|
properties?: {
|
|
7639
7682
|
id: PropertyTypeId;
|
|
@@ -7757,7 +7800,7 @@ export interface TornHof {
|
|
|
7757
7800
|
position: number;
|
|
7758
7801
|
signed_up: number;
|
|
7759
7802
|
age_in_days: number;
|
|
7760
|
-
value:
|
|
7803
|
+
value: number | string | number;
|
|
7761
7804
|
rank: string;
|
|
7762
7805
|
}
|
|
7763
7806
|
|
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": "2.0.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -5393,9 +5393,6 @@
|
|
|
5393
5393
|
{
|
|
5394
5394
|
"$ref": "#/components/schemas/MarketPropertiesResponse"
|
|
5395
5395
|
},
|
|
5396
|
-
{
|
|
5397
|
-
"$ref": "#/components/schemas/MarketItemMarketResponse"
|
|
5398
|
-
},
|
|
5399
5396
|
{
|
|
5400
5397
|
"$ref": "#/components/schemas/MarketLookupResponse"
|
|
5401
5398
|
},
|
|
@@ -6052,7 +6049,7 @@
|
|
|
6052
6049
|
},
|
|
6053
6050
|
{
|
|
6054
6051
|
"name": "id",
|
|
6055
|
-
"in": "
|
|
6052
|
+
"in": "query",
|
|
6056
6053
|
"description": "Property id",
|
|
6057
6054
|
"required": true,
|
|
6058
6055
|
"schema": {
|
|
@@ -6776,6 +6773,45 @@
|
|
|
6776
6773
|
"x-stability": "Stable"
|
|
6777
6774
|
}
|
|
6778
6775
|
},
|
|
6776
|
+
"/torn/organizedcrimes": {
|
|
6777
|
+
"get": {
|
|
6778
|
+
"tags": [
|
|
6779
|
+
"Torn"
|
|
6780
|
+
],
|
|
6781
|
+
"summary": "Get organized crimes information",
|
|
6782
|
+
"description": "Requires public access key. <br> Return the details about released faction organized crimes.",
|
|
6783
|
+
"operationId": "b64b8cf22cd9e9c8916bc01439f6b069",
|
|
6784
|
+
"parameters": [
|
|
6785
|
+
{
|
|
6786
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
6787
|
+
},
|
|
6788
|
+
{
|
|
6789
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
6790
|
+
},
|
|
6791
|
+
{
|
|
6792
|
+
"$ref": "#/components/parameters/ApiKeyPublic"
|
|
6793
|
+
}
|
|
6794
|
+
],
|
|
6795
|
+
"responses": {
|
|
6796
|
+
"200": {
|
|
6797
|
+
"description": "Successful operation",
|
|
6798
|
+
"content": {
|
|
6799
|
+
"application/json": {
|
|
6800
|
+
"schema": {
|
|
6801
|
+
"$ref": "#/components/schemas/TornOrganizedCrimeResponse"
|
|
6802
|
+
}
|
|
6803
|
+
}
|
|
6804
|
+
}
|
|
6805
|
+
}
|
|
6806
|
+
},
|
|
6807
|
+
"security": [
|
|
6808
|
+
{
|
|
6809
|
+
"api_key": []
|
|
6810
|
+
}
|
|
6811
|
+
],
|
|
6812
|
+
"x-stability": "Unstable"
|
|
6813
|
+
}
|
|
6814
|
+
},
|
|
6779
6815
|
"/torn/properties": {
|
|
6780
6816
|
"get": {
|
|
6781
6817
|
"tags": [
|
|
@@ -11854,6 +11890,9 @@
|
|
|
11854
11890
|
"type": "integer",
|
|
11855
11891
|
"format": "int32"
|
|
11856
11892
|
},
|
|
11893
|
+
"OrganizedCrimeName": {
|
|
11894
|
+
"type": "string"
|
|
11895
|
+
},
|
|
11857
11896
|
"PropertyTypeId": {
|
|
11858
11897
|
"type": "integer",
|
|
11859
11898
|
"format": "int32"
|
|
@@ -18485,6 +18524,21 @@
|
|
|
18485
18524
|
},
|
|
18486
18525
|
"type": "object"
|
|
18487
18526
|
},
|
|
18527
|
+
"FactionTerritoryWarFactionWallPlayers": {
|
|
18528
|
+
"required": [
|
|
18529
|
+
"id",
|
|
18530
|
+
"name"
|
|
18531
|
+
],
|
|
18532
|
+
"properties": {
|
|
18533
|
+
"id": {
|
|
18534
|
+
"$ref": "#/components/schemas/UserId"
|
|
18535
|
+
},
|
|
18536
|
+
"name": {
|
|
18537
|
+
"type": "string"
|
|
18538
|
+
}
|
|
18539
|
+
},
|
|
18540
|
+
"type": "object"
|
|
18541
|
+
},
|
|
18488
18542
|
"FactionTerritoryWarFaction": {
|
|
18489
18543
|
"description": "The fields 'chain' and 'players_on_wall' exist only for wars with the result 'in_progress'.",
|
|
18490
18544
|
"required": [
|
|
@@ -18509,7 +18563,9 @@
|
|
|
18509
18563
|
},
|
|
18510
18564
|
"players_on_wall": {
|
|
18511
18565
|
"type": "array",
|
|
18512
|
-
"items": {
|
|
18566
|
+
"items": {
|
|
18567
|
+
"$ref": "#/components/schemas/FactionTerritoryWarFactionWallPlayers"
|
|
18568
|
+
}
|
|
18513
18569
|
}
|
|
18514
18570
|
},
|
|
18515
18571
|
"type": "object"
|
|
@@ -20061,37 +20117,51 @@
|
|
|
20061
20117
|
"format": "int32"
|
|
20062
20118
|
},
|
|
20063
20119
|
"stats": {
|
|
20064
|
-
"
|
|
20065
|
-
|
|
20066
|
-
|
|
20067
|
-
|
|
20068
|
-
|
|
20069
|
-
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
"
|
|
20073
|
-
|
|
20074
|
-
|
|
20075
|
-
|
|
20076
|
-
|
|
20077
|
-
|
|
20078
|
-
|
|
20079
|
-
|
|
20080
|
-
|
|
20081
|
-
|
|
20120
|
+
"oneOf": [
|
|
20121
|
+
{
|
|
20122
|
+
"required": [
|
|
20123
|
+
"strength",
|
|
20124
|
+
"speed",
|
|
20125
|
+
"dexterity",
|
|
20126
|
+
"defense"
|
|
20127
|
+
],
|
|
20128
|
+
"properties": {
|
|
20129
|
+
"strength": {
|
|
20130
|
+
"type": "integer",
|
|
20131
|
+
"format": "int64"
|
|
20132
|
+
},
|
|
20133
|
+
"speed": {
|
|
20134
|
+
"type": "integer",
|
|
20135
|
+
"format": "int64"
|
|
20136
|
+
},
|
|
20137
|
+
"dexterity": {
|
|
20138
|
+
"type": "integer",
|
|
20139
|
+
"format": "int64"
|
|
20140
|
+
},
|
|
20141
|
+
"defense": {
|
|
20142
|
+
"type": "integer",
|
|
20143
|
+
"format": "int64"
|
|
20144
|
+
}
|
|
20145
|
+
},
|
|
20146
|
+
"type": "object"
|
|
20082
20147
|
},
|
|
20083
|
-
|
|
20084
|
-
"type": "
|
|
20085
|
-
"format": "int64"
|
|
20148
|
+
{
|
|
20149
|
+
"type": "null"
|
|
20086
20150
|
}
|
|
20087
|
-
|
|
20088
|
-
"type": "object"
|
|
20151
|
+
]
|
|
20089
20152
|
}
|
|
20090
20153
|
},
|
|
20091
20154
|
"type": "object"
|
|
20092
20155
|
},
|
|
20093
20156
|
"message": {
|
|
20094
|
-
"
|
|
20157
|
+
"oneOf": [
|
|
20158
|
+
{
|
|
20159
|
+
"type": "string"
|
|
20160
|
+
},
|
|
20161
|
+
{
|
|
20162
|
+
"type": "null"
|
|
20163
|
+
}
|
|
20164
|
+
]
|
|
20095
20165
|
},
|
|
20096
20166
|
"valid_until": {
|
|
20097
20167
|
"type": "integer",
|
|
@@ -20738,7 +20808,7 @@
|
|
|
20738
20808
|
]
|
|
20739
20809
|
},
|
|
20740
20810
|
"name": {
|
|
20741
|
-
"
|
|
20811
|
+
"$ref": "#/components/schemas/OrganizedCrimeName"
|
|
20742
20812
|
},
|
|
20743
20813
|
"difficulty": {
|
|
20744
20814
|
"type": "integer",
|
|
@@ -23297,6 +23367,144 @@
|
|
|
23297
23367
|
},
|
|
23298
23368
|
"type": "object"
|
|
23299
23369
|
},
|
|
23370
|
+
"TornOrganizedCrimeResponse": {
|
|
23371
|
+
"required": [
|
|
23372
|
+
"organizedcrimes"
|
|
23373
|
+
],
|
|
23374
|
+
"properties": {
|
|
23375
|
+
"organizedcrimes": {
|
|
23376
|
+
"type": "array",
|
|
23377
|
+
"items": {
|
|
23378
|
+
"$ref": "#/components/schemas/TornOrganizedCrime"
|
|
23379
|
+
}
|
|
23380
|
+
}
|
|
23381
|
+
},
|
|
23382
|
+
"type": "object"
|
|
23383
|
+
},
|
|
23384
|
+
"TornOrganizedCrime": {
|
|
23385
|
+
"required": [
|
|
23386
|
+
"name",
|
|
23387
|
+
"description",
|
|
23388
|
+
"difficulty",
|
|
23389
|
+
"spawn",
|
|
23390
|
+
"scope",
|
|
23391
|
+
"slots",
|
|
23392
|
+
"prerequisite"
|
|
23393
|
+
],
|
|
23394
|
+
"properties": {
|
|
23395
|
+
"name": {
|
|
23396
|
+
"$ref": "#/components/schemas/OrganizedCrimeName"
|
|
23397
|
+
},
|
|
23398
|
+
"description": {
|
|
23399
|
+
"type": "string"
|
|
23400
|
+
},
|
|
23401
|
+
"difficulty": {
|
|
23402
|
+
"type": "integer",
|
|
23403
|
+
"format": "int32"
|
|
23404
|
+
},
|
|
23405
|
+
"spawn": {
|
|
23406
|
+
"$ref": "#/components/schemas/TornOrganizedCrimeSpawn"
|
|
23407
|
+
},
|
|
23408
|
+
"scope": {
|
|
23409
|
+
"$ref": "#/components/schemas/TornOrganizedCrimeScope"
|
|
23410
|
+
},
|
|
23411
|
+
"prerequisite": {
|
|
23412
|
+
"oneOf": [
|
|
23413
|
+
{
|
|
23414
|
+
"$ref": "#/components/schemas/OrganizedCrimeName"
|
|
23415
|
+
},
|
|
23416
|
+
{
|
|
23417
|
+
"type": "null"
|
|
23418
|
+
}
|
|
23419
|
+
]
|
|
23420
|
+
},
|
|
23421
|
+
"slots": {
|
|
23422
|
+
"type": "array",
|
|
23423
|
+
"items": {
|
|
23424
|
+
"$ref": "#/components/schemas/TornOrganizedCrimeSlot"
|
|
23425
|
+
}
|
|
23426
|
+
}
|
|
23427
|
+
},
|
|
23428
|
+
"type": "object"
|
|
23429
|
+
},
|
|
23430
|
+
"TornOrganizedCrimeSpawn": {
|
|
23431
|
+
"required": [
|
|
23432
|
+
"level",
|
|
23433
|
+
"name"
|
|
23434
|
+
],
|
|
23435
|
+
"properties": {
|
|
23436
|
+
"level": {
|
|
23437
|
+
"type": "integer",
|
|
23438
|
+
"format": "int32"
|
|
23439
|
+
},
|
|
23440
|
+
"name": {
|
|
23441
|
+
"type": "string"
|
|
23442
|
+
}
|
|
23443
|
+
},
|
|
23444
|
+
"type": "object"
|
|
23445
|
+
},
|
|
23446
|
+
"TornOrganizedCrimeScope": {
|
|
23447
|
+
"required": [
|
|
23448
|
+
"cost",
|
|
23449
|
+
"return"
|
|
23450
|
+
],
|
|
23451
|
+
"properties": {
|
|
23452
|
+
"cost": {
|
|
23453
|
+
"type": "integer",
|
|
23454
|
+
"format": "int32"
|
|
23455
|
+
},
|
|
23456
|
+
"return": {
|
|
23457
|
+
"type": "integer",
|
|
23458
|
+
"format": "int32"
|
|
23459
|
+
}
|
|
23460
|
+
},
|
|
23461
|
+
"type": "object"
|
|
23462
|
+
},
|
|
23463
|
+
"TornOrganizedCrimeSlot": {
|
|
23464
|
+
"required": [
|
|
23465
|
+
"id",
|
|
23466
|
+
"name",
|
|
23467
|
+
"required_item"
|
|
23468
|
+
],
|
|
23469
|
+
"properties": {
|
|
23470
|
+
"id": {
|
|
23471
|
+
"type": "string"
|
|
23472
|
+
},
|
|
23473
|
+
"name": {
|
|
23474
|
+
"type": "string"
|
|
23475
|
+
},
|
|
23476
|
+
"required_item": {
|
|
23477
|
+
"oneOf": [
|
|
23478
|
+
{
|
|
23479
|
+
"$ref": "#/components/schemas/TornOrganizedCrimeRequiredItem"
|
|
23480
|
+
},
|
|
23481
|
+
{
|
|
23482
|
+
"type": "null"
|
|
23483
|
+
}
|
|
23484
|
+
]
|
|
23485
|
+
}
|
|
23486
|
+
},
|
|
23487
|
+
"type": "object"
|
|
23488
|
+
},
|
|
23489
|
+
"TornOrganizedCrimeRequiredItem": {
|
|
23490
|
+
"required": [
|
|
23491
|
+
"id",
|
|
23492
|
+
"name",
|
|
23493
|
+
"is_used"
|
|
23494
|
+
],
|
|
23495
|
+
"properties": {
|
|
23496
|
+
"id": {
|
|
23497
|
+
"$ref": "#/components/schemas/ItemId"
|
|
23498
|
+
},
|
|
23499
|
+
"name": {
|
|
23500
|
+
"type": "string"
|
|
23501
|
+
},
|
|
23502
|
+
"is_used": {
|
|
23503
|
+
"type": "boolean"
|
|
23504
|
+
}
|
|
23505
|
+
},
|
|
23506
|
+
"type": "object"
|
|
23507
|
+
},
|
|
23300
23508
|
"TornProperties": {
|
|
23301
23509
|
"properties": {
|
|
23302
23510
|
"properties": {
|
|
@@ -23818,7 +24026,20 @@
|
|
|
23818
24026
|
"format": "int32"
|
|
23819
24027
|
},
|
|
23820
24028
|
"value": {
|
|
23821
|
-
"description": "Value representing the chosen category. Traveltime is shown in seconds. If the chosen category is 'rank', the value is of type string. If the chosen category is 'racingskill', the value is of type float. Otherwise it is an integer."
|
|
24029
|
+
"description": "Value representing the chosen category. Traveltime is shown in seconds. If the chosen category is 'rank', the value is of type string. If the chosen category is 'racingskill', the value is of type float. Otherwise it is an integer.",
|
|
24030
|
+
"oneOf": [
|
|
24031
|
+
{
|
|
24032
|
+
"type": "integer",
|
|
24033
|
+
"format": "int32"
|
|
24034
|
+
},
|
|
24035
|
+
{
|
|
24036
|
+
"type": "string"
|
|
24037
|
+
},
|
|
24038
|
+
{
|
|
24039
|
+
"type": "number",
|
|
24040
|
+
"format": "float"
|
|
24041
|
+
}
|
|
24042
|
+
]
|
|
23822
24043
|
},
|
|
23823
24044
|
"rank": {
|
|
23824
24045
|
"type": "string"
|
|
@@ -24786,6 +25007,7 @@
|
|
|
24786
25007
|
"logcategories",
|
|
24787
25008
|
"logtypes",
|
|
24788
25009
|
"lookup",
|
|
25010
|
+
"organizedcrimes",
|
|
24789
25011
|
"properties",
|
|
24790
25012
|
"subcrimes",
|
|
24791
25013
|
"territory",
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate-types": "tsc && node build/index.js"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@scalar/openapi-types": "^0.3.
|
|
10
|
-
"@types/node": "^22.
|
|
11
|
-
"prettier": "^3.
|
|
9
|
+
"@scalar/openapi-types": "^0.3.4",
|
|
10
|
+
"@types/node": "^22.16.0",
|
|
11
|
+
"prettier": "^3.6.2",
|
|
12
12
|
"typeconv": "^2.3.1",
|
|
13
13
|
"typescript": "^5.8.3"
|
|
14
14
|
},
|