tornapi-typescript 1.11.4 → 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 +41 -3
- package/dist/openapi.json +221 -26
- package/package.json +2 -2
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;
|
|
@@ -6901,9 +6903,9 @@ export interface FactionApplication {
|
|
|
6901
6903
|
speed: number;
|
|
6902
6904
|
dexterity: number;
|
|
6903
6905
|
defense: number;
|
|
6904
|
-
};
|
|
6906
|
+
} | null;
|
|
6905
6907
|
};
|
|
6906
|
-
message: string;
|
|
6908
|
+
message: string | null;
|
|
6907
6909
|
valid_until: number;
|
|
6908
6910
|
status: FactionApplicationStatusEnum;
|
|
6909
6911
|
}
|
|
@@ -7063,7 +7065,7 @@ export interface FactionCrimeSlot {
|
|
|
7063
7065
|
export interface FactionCrime {
|
|
7064
7066
|
id: FactionCrimeId;
|
|
7065
7067
|
previous_crime_id: FactionCrimeId | null;
|
|
7066
|
-
name:
|
|
7068
|
+
name: OrganizedCrimeName;
|
|
7067
7069
|
difficulty: number;
|
|
7068
7070
|
status: FactionCrimeStatusEnum;
|
|
7069
7071
|
/** The timestamp at which the crime was created. */
|
|
@@ -7639,6 +7641,42 @@ export interface PropertyLookupResponse {
|
|
|
7639
7641
|
selections: PropertySelectionName[];
|
|
7640
7642
|
}
|
|
7641
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
|
+
|
|
7642
7680
|
export interface TornProperties {
|
|
7643
7681
|
properties?: {
|
|
7644
7682
|
id: PropertyTypeId;
|
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
|
{
|
|
@@ -6773,6 +6773,45 @@
|
|
|
6773
6773
|
"x-stability": "Stable"
|
|
6774
6774
|
}
|
|
6775
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
|
+
},
|
|
6776
6815
|
"/torn/properties": {
|
|
6777
6816
|
"get": {
|
|
6778
6817
|
"tags": [
|
|
@@ -11851,6 +11890,9 @@
|
|
|
11851
11890
|
"type": "integer",
|
|
11852
11891
|
"format": "int32"
|
|
11853
11892
|
},
|
|
11893
|
+
"OrganizedCrimeName": {
|
|
11894
|
+
"type": "string"
|
|
11895
|
+
},
|
|
11854
11896
|
"PropertyTypeId": {
|
|
11855
11897
|
"type": "integer",
|
|
11856
11898
|
"format": "int32"
|
|
@@ -20075,37 +20117,51 @@
|
|
|
20075
20117
|
"format": "int32"
|
|
20076
20118
|
},
|
|
20077
20119
|
"stats": {
|
|
20078
|
-
"
|
|
20079
|
-
|
|
20080
|
-
|
|
20081
|
-
|
|
20082
|
-
|
|
20083
|
-
|
|
20084
|
-
|
|
20085
|
-
|
|
20086
|
-
"
|
|
20087
|
-
|
|
20088
|
-
|
|
20089
|
-
|
|
20090
|
-
|
|
20091
|
-
|
|
20092
|
-
|
|
20093
|
-
|
|
20094
|
-
|
|
20095
|
-
|
|
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"
|
|
20096
20147
|
},
|
|
20097
|
-
|
|
20098
|
-
"type": "
|
|
20099
|
-
"format": "int64"
|
|
20148
|
+
{
|
|
20149
|
+
"type": "null"
|
|
20100
20150
|
}
|
|
20101
|
-
|
|
20102
|
-
"type": "object"
|
|
20151
|
+
]
|
|
20103
20152
|
}
|
|
20104
20153
|
},
|
|
20105
20154
|
"type": "object"
|
|
20106
20155
|
},
|
|
20107
20156
|
"message": {
|
|
20108
|
-
"
|
|
20157
|
+
"oneOf": [
|
|
20158
|
+
{
|
|
20159
|
+
"type": "string"
|
|
20160
|
+
},
|
|
20161
|
+
{
|
|
20162
|
+
"type": "null"
|
|
20163
|
+
}
|
|
20164
|
+
]
|
|
20109
20165
|
},
|
|
20110
20166
|
"valid_until": {
|
|
20111
20167
|
"type": "integer",
|
|
@@ -20752,7 +20808,7 @@
|
|
|
20752
20808
|
]
|
|
20753
20809
|
},
|
|
20754
20810
|
"name": {
|
|
20755
|
-
"
|
|
20811
|
+
"$ref": "#/components/schemas/OrganizedCrimeName"
|
|
20756
20812
|
},
|
|
20757
20813
|
"difficulty": {
|
|
20758
20814
|
"type": "integer",
|
|
@@ -23311,6 +23367,144 @@
|
|
|
23311
23367
|
},
|
|
23312
23368
|
"type": "object"
|
|
23313
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
|
+
},
|
|
23314
23508
|
"TornProperties": {
|
|
23315
23509
|
"properties": {
|
|
23316
23510
|
"properties": {
|
|
@@ -24813,6 +25007,7 @@
|
|
|
24813
25007
|
"logcategories",
|
|
24814
25008
|
"logtypes",
|
|
24815
25009
|
"lookup",
|
|
25010
|
+
"organizedcrimes",
|
|
24816
25011
|
"properties",
|
|
24817
25012
|
"subcrimes",
|
|
24818
25013
|
"territory",
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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
9
|
"@scalar/openapi-types": "^0.3.4",
|
|
10
|
-
"@types/node": "^22.
|
|
10
|
+
"@types/node": "^22.16.0",
|
|
11
11
|
"prettier": "^3.6.2",
|
|
12
12
|
"typeconv": "^2.3.1",
|
|
13
13
|
"typescript": "^5.8.3"
|