tornapi-typescript 1.11.4 → 2.0.1

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/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.11.4"
6
+ "version": "2.0.1"
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"
@@ -13643,24 +13685,26 @@
13643
13685
  ],
13644
13686
  "properties": {
13645
13687
  "properties": {
13646
- "type": "object",
13647
- "oneOf": [
13648
- {
13649
- "$ref": "#/components/schemas/UserPropertyBasicDetails"
13650
- },
13651
- {
13652
- "$ref": "#/components/schemas/UserPropertyDetailsExtended"
13653
- },
13654
- {
13655
- "$ref": "#/components/schemas/UserPropertyDetailsExtendedRented"
13656
- },
13657
- {
13658
- "$ref": "#/components/schemas/UserPropertyDetailsExtendedForRent"
13659
- },
13660
- {
13661
- "$ref": "#/components/schemas/UserPropertyDetailsExtendedForSale"
13662
- }
13663
- ]
13688
+ "type": "array",
13689
+ "items": {
13690
+ "oneOf": [
13691
+ {
13692
+ "$ref": "#/components/schemas/UserPropertyBasicDetails"
13693
+ },
13694
+ {
13695
+ "$ref": "#/components/schemas/UserPropertyDetailsExtended"
13696
+ },
13697
+ {
13698
+ "$ref": "#/components/schemas/UserPropertyDetailsExtendedRented"
13699
+ },
13700
+ {
13701
+ "$ref": "#/components/schemas/UserPropertyDetailsExtendedForRent"
13702
+ },
13703
+ {
13704
+ "$ref": "#/components/schemas/UserPropertyDetailsExtendedForSale"
13705
+ }
13706
+ ]
13707
+ }
13664
13708
  },
13665
13709
  "_metadata": {
13666
13710
  "$ref": "#/components/schemas/RequestMetadataWithLinks"
@@ -14450,7 +14494,7 @@
14450
14494
  "races": {
14451
14495
  "type": "array",
14452
14496
  "items": {
14453
- "$ref": "#/components/schemas/RacingRaceDetailsResponse"
14497
+ "$ref": "#/components/schemas/RacingRaceDetails"
14454
14498
  }
14455
14499
  },
14456
14500
  "_metadata": {
@@ -18986,10 +19030,10 @@
18986
19030
  },
18987
19031
  "FactionTerritoriesOwnershipResponse": {
18988
19032
  "required": [
18989
- "territoryownership"
19033
+ "territoryOwnership"
18990
19034
  ],
18991
19035
  "properties": {
18992
- "territoryownership": {
19036
+ "territoryOwnership": {
18993
19037
  "type": "array",
18994
19038
  "items": {
18995
19039
  "$ref": "#/components/schemas/FactionTerritoryOwnership"
@@ -20075,37 +20119,51 @@
20075
20119
  "format": "int32"
20076
20120
  },
20077
20121
  "stats": {
20078
- "required": [
20079
- "strength",
20080
- "speed",
20081
- "dexterity",
20082
- "defense"
20083
- ],
20084
- "properties": {
20085
- "strength": {
20086
- "type": "integer",
20087
- "format": "int64"
20088
- },
20089
- "speed": {
20090
- "type": "integer",
20091
- "format": "int64"
20092
- },
20093
- "dexterity": {
20094
- "type": "integer",
20095
- "format": "int64"
20122
+ "oneOf": [
20123
+ {
20124
+ "required": [
20125
+ "strength",
20126
+ "speed",
20127
+ "dexterity",
20128
+ "defense"
20129
+ ],
20130
+ "properties": {
20131
+ "strength": {
20132
+ "type": "integer",
20133
+ "format": "int64"
20134
+ },
20135
+ "speed": {
20136
+ "type": "integer",
20137
+ "format": "int64"
20138
+ },
20139
+ "dexterity": {
20140
+ "type": "integer",
20141
+ "format": "int64"
20142
+ },
20143
+ "defense": {
20144
+ "type": "integer",
20145
+ "format": "int64"
20146
+ }
20147
+ },
20148
+ "type": "object"
20096
20149
  },
20097
- "defense": {
20098
- "type": "integer",
20099
- "format": "int64"
20150
+ {
20151
+ "type": "null"
20100
20152
  }
20101
- },
20102
- "type": "object"
20153
+ ]
20103
20154
  }
20104
20155
  },
20105
20156
  "type": "object"
20106
20157
  },
20107
20158
  "message": {
20108
- "type": "string"
20159
+ "oneOf": [
20160
+ {
20161
+ "type": "string"
20162
+ },
20163
+ {
20164
+ "type": "null"
20165
+ }
20166
+ ]
20109
20167
  },
20110
20168
  "valid_until": {
20111
20169
  "type": "integer",
@@ -20752,7 +20810,7 @@
20752
20810
  ]
20753
20811
  },
20754
20812
  "name": {
20755
- "type": "string"
20813
+ "$ref": "#/components/schemas/OrganizedCrimeName"
20756
20814
  },
20757
20815
  "difficulty": {
20758
20816
  "type": "integer",
@@ -23218,32 +23276,38 @@
23218
23276
  },
23219
23277
  "type": "object"
23220
23278
  },
23279
+ "RacingRaceDetails": {
23280
+ "allOf": [
23281
+ {
23282
+ "$ref": "#/components/schemas/Race"
23283
+ },
23284
+ {
23285
+ "required": [
23286
+ "is_official",
23287
+ "results"
23288
+ ],
23289
+ "properties": {
23290
+ "results": {
23291
+ "type": "array",
23292
+ "items": {
23293
+ "$ref": "#/components/schemas/RacerDetails"
23294
+ }
23295
+ },
23296
+ "is_official": {
23297
+ "type": "boolean"
23298
+ }
23299
+ },
23300
+ "type": "object"
23301
+ }
23302
+ ]
23303
+ },
23221
23304
  "RacingRaceDetailsResponse": {
23305
+ "required": [
23306
+ "race"
23307
+ ],
23222
23308
  "properties": {
23223
23309
  "race": {
23224
- "allOf": [
23225
- {
23226
- "$ref": "#/components/schemas/Race"
23227
- },
23228
- {
23229
- "required": [
23230
- "is_official",
23231
- "results"
23232
- ],
23233
- "properties": {
23234
- "results": {
23235
- "type": "array",
23236
- "items": {
23237
- "$ref": "#/components/schemas/RacerDetails"
23238
- }
23239
- },
23240
- "is_official": {
23241
- "type": "boolean"
23242
- }
23243
- },
23244
- "type": "object"
23245
- }
23246
- ]
23310
+ "$ref": "#/components/schemas/RacingRaceDetails"
23247
23311
  }
23248
23312
  },
23249
23313
  "type": "object"
@@ -23311,6 +23375,144 @@
23311
23375
  },
23312
23376
  "type": "object"
23313
23377
  },
23378
+ "TornOrganizedCrimeResponse": {
23379
+ "required": [
23380
+ "organizedcrimes"
23381
+ ],
23382
+ "properties": {
23383
+ "organizedcrimes": {
23384
+ "type": "array",
23385
+ "items": {
23386
+ "$ref": "#/components/schemas/TornOrganizedCrime"
23387
+ }
23388
+ }
23389
+ },
23390
+ "type": "object"
23391
+ },
23392
+ "TornOrganizedCrime": {
23393
+ "required": [
23394
+ "name",
23395
+ "description",
23396
+ "difficulty",
23397
+ "spawn",
23398
+ "scope",
23399
+ "slots",
23400
+ "prerequisite"
23401
+ ],
23402
+ "properties": {
23403
+ "name": {
23404
+ "$ref": "#/components/schemas/OrganizedCrimeName"
23405
+ },
23406
+ "description": {
23407
+ "type": "string"
23408
+ },
23409
+ "difficulty": {
23410
+ "type": "integer",
23411
+ "format": "int32"
23412
+ },
23413
+ "spawn": {
23414
+ "$ref": "#/components/schemas/TornOrganizedCrimeSpawn"
23415
+ },
23416
+ "scope": {
23417
+ "$ref": "#/components/schemas/TornOrganizedCrimeScope"
23418
+ },
23419
+ "prerequisite": {
23420
+ "oneOf": [
23421
+ {
23422
+ "$ref": "#/components/schemas/OrganizedCrimeName"
23423
+ },
23424
+ {
23425
+ "type": "null"
23426
+ }
23427
+ ]
23428
+ },
23429
+ "slots": {
23430
+ "type": "array",
23431
+ "items": {
23432
+ "$ref": "#/components/schemas/TornOrganizedCrimeSlot"
23433
+ }
23434
+ }
23435
+ },
23436
+ "type": "object"
23437
+ },
23438
+ "TornOrganizedCrimeSpawn": {
23439
+ "required": [
23440
+ "level",
23441
+ "name"
23442
+ ],
23443
+ "properties": {
23444
+ "level": {
23445
+ "type": "integer",
23446
+ "format": "int32"
23447
+ },
23448
+ "name": {
23449
+ "type": "string"
23450
+ }
23451
+ },
23452
+ "type": "object"
23453
+ },
23454
+ "TornOrganizedCrimeScope": {
23455
+ "required": [
23456
+ "cost",
23457
+ "return"
23458
+ ],
23459
+ "properties": {
23460
+ "cost": {
23461
+ "type": "integer",
23462
+ "format": "int32"
23463
+ },
23464
+ "return": {
23465
+ "type": "integer",
23466
+ "format": "int32"
23467
+ }
23468
+ },
23469
+ "type": "object"
23470
+ },
23471
+ "TornOrganizedCrimeSlot": {
23472
+ "required": [
23473
+ "id",
23474
+ "name",
23475
+ "required_item"
23476
+ ],
23477
+ "properties": {
23478
+ "id": {
23479
+ "type": "string"
23480
+ },
23481
+ "name": {
23482
+ "type": "string"
23483
+ },
23484
+ "required_item": {
23485
+ "oneOf": [
23486
+ {
23487
+ "$ref": "#/components/schemas/TornOrganizedCrimeRequiredItem"
23488
+ },
23489
+ {
23490
+ "type": "null"
23491
+ }
23492
+ ]
23493
+ }
23494
+ },
23495
+ "type": "object"
23496
+ },
23497
+ "TornOrganizedCrimeRequiredItem": {
23498
+ "required": [
23499
+ "id",
23500
+ "name",
23501
+ "is_used"
23502
+ ],
23503
+ "properties": {
23504
+ "id": {
23505
+ "$ref": "#/components/schemas/ItemId"
23506
+ },
23507
+ "name": {
23508
+ "type": "string"
23509
+ },
23510
+ "is_used": {
23511
+ "type": "boolean"
23512
+ }
23513
+ },
23514
+ "type": "object"
23515
+ },
23314
23516
  "TornProperties": {
23315
23517
  "properties": {
23316
23518
  "properties": {
@@ -24813,6 +25015,7 @@
24813
25015
  "logcategories",
24814
25016
  "logtypes",
24815
25017
  "lookup",
25018
+ "organizedcrimes",
24816
25019
  "properties",
24817
25020
  "subcrimes",
24818
25021
  "territory",
package/package.json CHANGED
@@ -1,19 +1,22 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "1.11.4",
4
+ "version": "2.0.1",
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.15.33",
10
+ "@types/node": "^22.16.0",
11
11
  "prettier": "^3.6.2",
12
12
  "typeconv": "^2.3.1",
13
13
  "typescript": "^5.8.3"
14
14
  },
15
+ "main": "./dist/index.js",
15
16
  "types": "./dist/index.d.ts",
16
17
  "files": [
18
+ "./dist/index.ts",
19
+ "./dist/index.js",
17
20
  "./dist/index.d.ts",
18
21
  "./dist/openapi.json"
19
22
  ]