tornapi-typescript 0.0.3 → 0.0.5
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/LICENSE +24 -24
- package/README.md +30 -30
- package/dist/index.d.ts +26 -5
- package/dist/openapi.json +201 -20
- package/package.json +5 -5
package/LICENSE
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
This is free and unencumbered software released into the public domain.
|
|
2
|
-
|
|
3
|
-
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
-
distribute this software, either in source code form or as a compiled
|
|
5
|
-
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
-
means.
|
|
7
|
-
|
|
8
|
-
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
-
of this software dedicate any and all copyright interest in the
|
|
10
|
-
software to the public domain. We make this dedication for the benefit
|
|
11
|
-
of the public at large and to the detriment of our heirs and
|
|
12
|
-
successors. We intend this dedication to be an overt act of
|
|
13
|
-
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
-
software under copyright law.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
-
|
|
24
|
-
For more information, please refer to <https://unlicense.org>
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <https://unlicense.org>
|
package/README.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# TornAPI Typescript
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/tornapi-typescript)
|
|
4
|
-
[](https://www.npmjs.com/package/tornapi-typescript)
|
|
5
|
-
|
|
6
|
-
Automatically generated type definition in Typescript for [torn.com](https://torn.com) API V2.
|
|
7
|
-
|
|
8
|
-
## Installation
|
|
9
|
-
|
|
10
|
-
`npm i -D tornapi-typescript`
|
|
11
|
-
|
|
12
|
-
## Generation
|
|
13
|
-
|
|
14
|
-
These types are generated in the following way:
|
|
15
|
-
|
|
16
|
-
* load [openapi specification](https://www.torn.com/swagger/openapi.json)
|
|
17
|
-
* clean the specification for better types
|
|
18
|
-
* remove `type` when `allOf` is present, otherwise the specification is not valid
|
|
19
|
-
* remove `type` when `oneOf` is present, for improved types
|
|
20
|
-
* mark all fields as required, for improved types
|
|
21
|
-
* convert the specification to Typescript definitions using [typeconv](https://github.com/grantila/typeconv)
|
|
22
|
-
* clean the type definitions
|
|
23
|
-
* remove all "[key: string]: any;", because typeconv adds it everywhere for some reason
|
|
24
|
-
* remove all empty objects (caused by the above cleaning)
|
|
25
|
-
* run through prettier to have it look decent
|
|
26
|
-
|
|
27
|
-
## Contact
|
|
28
|
-
|
|
29
|
-
You can join the community in [our Discord server](https://discord.gg/2wb7GKN). There you can discuss anything related
|
|
30
|
-
to the Torn API, or other tools related to Torn. Issues can also be reported there, or as GitHub issue.
|
|
1
|
+
# TornAPI Typescript
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/tornapi-typescript)
|
|
4
|
+
[](https://www.npmjs.com/package/tornapi-typescript)
|
|
5
|
+
|
|
6
|
+
Automatically generated type definition in Typescript for [torn.com](https://torn.com) API V2.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
`npm i -D tornapi-typescript`
|
|
11
|
+
|
|
12
|
+
## Generation
|
|
13
|
+
|
|
14
|
+
These types are generated in the following way:
|
|
15
|
+
|
|
16
|
+
* load [openapi specification](https://www.torn.com/swagger/openapi.json)
|
|
17
|
+
* clean the specification for better types
|
|
18
|
+
* remove `type` when `allOf` is present, otherwise the specification is not valid
|
|
19
|
+
* remove `type` when `oneOf` is present, for improved types
|
|
20
|
+
* mark all fields as required, for improved types
|
|
21
|
+
* convert the specification to Typescript definitions using [typeconv](https://github.com/grantila/typeconv)
|
|
22
|
+
* clean the type definitions
|
|
23
|
+
* remove all "[key: string]: any;", because typeconv adds it everywhere for some reason
|
|
24
|
+
* remove all empty objects (caused by the above cleaning)
|
|
25
|
+
* run through prettier to have it look decent
|
|
26
|
+
|
|
27
|
+
## Contact
|
|
28
|
+
|
|
29
|
+
You can join the community in [our Discord server](https://discord.gg/2wb7GKN). There you can discuss anything related
|
|
30
|
+
to the Torn API, or other tools related to Torn. Issues can also be reported there, or as GitHub issue.
|
package/dist/index.d.ts
CHANGED
|
@@ -178,6 +178,8 @@ export type WeaponBonusEnum =
|
|
|
178
178
|
| "Wind-up"
|
|
179
179
|
| "Wither";
|
|
180
180
|
|
|
181
|
+
export type UserListEnum = "Friends" | "Enemies" | "Targets";
|
|
182
|
+
|
|
181
183
|
export type JobPositionCasinoEnum =
|
|
182
184
|
| "Gaming Consultant"
|
|
183
185
|
| "Marketing Manager"
|
|
@@ -956,7 +958,9 @@ export interface FactionCrimeSlot {
|
|
|
956
958
|
} | null;
|
|
957
959
|
user_id: UserId;
|
|
958
960
|
user: FactionCrimeUser | null;
|
|
961
|
+
/** This field is replaced with 'crime_pass_rate' field and will be removed on 1st of May 2025. */
|
|
959
962
|
success_chance: number;
|
|
963
|
+
crime_pass_rate: number;
|
|
960
964
|
}
|
|
961
965
|
|
|
962
966
|
export interface FactionCrime {
|
|
@@ -966,9 +970,6 @@ export interface FactionCrime {
|
|
|
966
970
|
status: FactionCrimeStatusEnum;
|
|
967
971
|
/** The timestamp at which the crime was created. */
|
|
968
972
|
created_at: number;
|
|
969
|
-
initiated_at: /** Replaced by the 'planning_at' field (same value). This field will be removed in the future (1st Februrary 2025 or later). */
|
|
970
|
-
| number /** Replaced by the 'planning_at' field (same value). This field will be removed in the future (1st Februrary 2025 or later). */
|
|
971
|
-
| null;
|
|
972
973
|
planning_at: /** The timestamp at which the planning phase for the crime has begun. */
|
|
973
974
|
| number /** The timestamp at which the planning phase for the crime has begun. */
|
|
974
975
|
| null;
|
|
@@ -988,6 +989,10 @@ export interface FactionCrimesResponse {
|
|
|
988
989
|
_metadata: RequestMetadataWithLinks;
|
|
989
990
|
}
|
|
990
991
|
|
|
992
|
+
export interface FactionCrimeResponse {
|
|
993
|
+
crime: FactionCrime;
|
|
994
|
+
}
|
|
995
|
+
|
|
991
996
|
/** The following selections will fallback to API v1 and may change at any time: 'armor', 'boosters', 'caches', 'cesium', 'contributors', 'crimeexp', 'currency', 'donations', 'drugs', 'medical', 'positions', 'reports', 'stats', 'temporary', 'upgrades', 'weapons'. */
|
|
992
997
|
export type FactionSelectionName =
|
|
993
998
|
| "applications"
|
|
@@ -997,6 +1002,7 @@ export type FactionSelectionName =
|
|
|
997
1002
|
| "chain"
|
|
998
1003
|
| "chainreport"
|
|
999
1004
|
| "chains"
|
|
1005
|
+
| "crime"
|
|
1000
1006
|
| "crimes"
|
|
1001
1007
|
| "hof"
|
|
1002
1008
|
| "lookup"
|
|
@@ -1218,12 +1224,14 @@ export interface ItemMarketListingItemBonus {
|
|
|
1218
1224
|
id: number;
|
|
1219
1225
|
title: string;
|
|
1220
1226
|
description: string;
|
|
1227
|
+
value: number;
|
|
1221
1228
|
}
|
|
1222
1229
|
|
|
1223
1230
|
export interface ItemMarketListingItemStats {
|
|
1224
1231
|
damage: number | null;
|
|
1225
1232
|
accuracy: number | null;
|
|
1226
1233
|
armor: number | null;
|
|
1234
|
+
quality: number;
|
|
1227
1235
|
}
|
|
1228
1236
|
|
|
1229
1237
|
export interface ItemMarketItem {
|
|
@@ -1234,7 +1242,6 @@ export interface ItemMarketItem {
|
|
|
1234
1242
|
}
|
|
1235
1243
|
|
|
1236
1244
|
export interface ItemMarketListingStackable {
|
|
1237
|
-
id: number;
|
|
1238
1245
|
price: number;
|
|
1239
1246
|
amount: number;
|
|
1240
1247
|
}
|
|
@@ -1247,7 +1254,6 @@ export interface ItemMarketListingItemDetails {
|
|
|
1247
1254
|
}
|
|
1248
1255
|
|
|
1249
1256
|
export interface ItemMarketListingNonstackable {
|
|
1250
|
-
id: number;
|
|
1251
1257
|
price: number;
|
|
1252
1258
|
amount: number;
|
|
1253
1259
|
itemDetails: ItemMarketListingItemDetails;
|
|
@@ -2934,6 +2940,20 @@ export interface UserOrganizedCrimeResponse {
|
|
|
2934
2940
|
organizedCrime: FactionCrime | null;
|
|
2935
2941
|
}
|
|
2936
2942
|
|
|
2943
|
+
export interface UserList {
|
|
2944
|
+
id: UserId;
|
|
2945
|
+
name: string;
|
|
2946
|
+
level: number;
|
|
2947
|
+
faction_id: FactionId & (number | null);
|
|
2948
|
+
last_action: UserLastAction;
|
|
2949
|
+
status: UserStatus;
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2952
|
+
export interface UserListResponse {
|
|
2953
|
+
list: UserList[];
|
|
2954
|
+
_metadata: RequestMetadataWithLinks;
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2937
2957
|
/** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','basic','battlestats','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','jobpoints','log','medals','merits','messages','missions','money','networth','newevents','newmessages','notifications','perks','profile','properties','refills','reports','skills','stocks','travel','weaponexp','workstats'. */
|
|
2938
2958
|
export type UserSelectionName =
|
|
2939
2959
|
| "attacks"
|
|
@@ -2951,6 +2971,7 @@ export type UserSelectionName =
|
|
|
2951
2971
|
| "hof"
|
|
2952
2972
|
| "itemmarket"
|
|
2953
2973
|
| "jobranks"
|
|
2974
|
+
| "list"
|
|
2954
2975
|
| "lookup"
|
|
2955
2976
|
| "organizedcrime"
|
|
2956
2977
|
| "personalstats"
|
package/dist/openapi.json
CHANGED
|
@@ -795,12 +795,59 @@
|
|
|
795
795
|
]
|
|
796
796
|
}
|
|
797
797
|
},
|
|
798
|
-
"/user/
|
|
798
|
+
"/user/list": {
|
|
799
799
|
"get": {
|
|
800
800
|
"tags": [
|
|
801
801
|
"User",
|
|
802
802
|
"Unstable"
|
|
803
803
|
],
|
|
804
|
+
"summary": "Get your friends, enemies or targets list",
|
|
805
|
+
"description": "Requires limited access key. <br>",
|
|
806
|
+
"parameters": [
|
|
807
|
+
{
|
|
808
|
+
"name": "cat",
|
|
809
|
+
"in": "query",
|
|
810
|
+
"description": "Select list type",
|
|
811
|
+
"required": true,
|
|
812
|
+
"schema": {
|
|
813
|
+
"$ref": "#/components/schemas/UserListEnum"
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"$ref": "#/components/parameters/ApiLimit50"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"$ref": "#/components/parameters/ApiOffsetNoDefault"
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"$ref": "#/components/parameters/ApiSortAsc"
|
|
824
|
+
}
|
|
825
|
+
],
|
|
826
|
+
"responses": {
|
|
827
|
+
"200": {
|
|
828
|
+
"description": "Successful operation",
|
|
829
|
+
"content": {
|
|
830
|
+
"application/json": {
|
|
831
|
+
"schema": {
|
|
832
|
+
"$ref": "#/components/schemas/UserListResponse"
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
"security": [
|
|
839
|
+
{
|
|
840
|
+
"api_key": []
|
|
841
|
+
}
|
|
842
|
+
]
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
"/user/organizedcrime": {
|
|
846
|
+
"get": {
|
|
847
|
+
"tags": [
|
|
848
|
+
"User",
|
|
849
|
+
"Stable"
|
|
850
|
+
],
|
|
804
851
|
"summary": "Get your current ongoing organized crime",
|
|
805
852
|
"description": "Requires minimal access key. <br>",
|
|
806
853
|
"responses": {
|
|
@@ -1310,6 +1357,9 @@
|
|
|
1310
1357
|
{
|
|
1311
1358
|
"$ref": "#/components/schemas/UserItemMarketResponse"
|
|
1312
1359
|
},
|
|
1360
|
+
{
|
|
1361
|
+
"$ref": "#/components/schemas/UserListResponse"
|
|
1362
|
+
},
|
|
1313
1363
|
{
|
|
1314
1364
|
"$ref": "#/components/schemas/UserPersonalStatsResponse"
|
|
1315
1365
|
},
|
|
@@ -1740,7 +1790,7 @@
|
|
|
1740
1790
|
"get": {
|
|
1741
1791
|
"tags": [
|
|
1742
1792
|
"Faction",
|
|
1743
|
-
"
|
|
1793
|
+
"Stable"
|
|
1744
1794
|
],
|
|
1745
1795
|
"summary": "Get your faction's organized crimes",
|
|
1746
1796
|
"description": "Requires public minimal access key with faction API access permissions. <br> It's possible to get older entries either by timestamp range (from, to) or with offset.",
|
|
@@ -1818,6 +1868,44 @@
|
|
|
1818
1868
|
]
|
|
1819
1869
|
}
|
|
1820
1870
|
},
|
|
1871
|
+
"/faction/{id}/crime": {
|
|
1872
|
+
"get": {
|
|
1873
|
+
"tags": [
|
|
1874
|
+
"Faction",
|
|
1875
|
+
"Stable"
|
|
1876
|
+
],
|
|
1877
|
+
"summary": "Get a specific organized crime",
|
|
1878
|
+
"description": "Requires public minimal access key with faction API access permissions. <br>",
|
|
1879
|
+
"parameters": [
|
|
1880
|
+
{
|
|
1881
|
+
"name": "id",
|
|
1882
|
+
"in": "path",
|
|
1883
|
+
"description": "Crime id",
|
|
1884
|
+
"required": true,
|
|
1885
|
+
"schema": {
|
|
1886
|
+
"$ref": "#/components/schemas/ItemId"
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
],
|
|
1890
|
+
"responses": {
|
|
1891
|
+
"200": {
|
|
1892
|
+
"description": "Successful operation",
|
|
1893
|
+
"content": {
|
|
1894
|
+
"application/json": {
|
|
1895
|
+
"schema": {
|
|
1896
|
+
"$ref": "#/components/schemas/FactionCrimeResponse"
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
},
|
|
1902
|
+
"security": [
|
|
1903
|
+
{
|
|
1904
|
+
"api_key": []
|
|
1905
|
+
}
|
|
1906
|
+
]
|
|
1907
|
+
}
|
|
1908
|
+
},
|
|
1821
1909
|
"/faction/hof": {
|
|
1822
1910
|
"get": {
|
|
1823
1911
|
"tags": [
|
|
@@ -2463,6 +2551,9 @@
|
|
|
2463
2551
|
{
|
|
2464
2552
|
"$ref": "#/components/schemas/FactionCrimesResponse"
|
|
2465
2553
|
},
|
|
2554
|
+
{
|
|
2555
|
+
"$ref": "#/components/schemas/FactionCrimeResponse"
|
|
2556
|
+
},
|
|
2466
2557
|
{
|
|
2467
2558
|
"$ref": "#/components/schemas/FactionRankedWarReportResponse"
|
|
2468
2559
|
},
|
|
@@ -4453,6 +4544,14 @@
|
|
|
4453
4544
|
"Wither"
|
|
4454
4545
|
]
|
|
4455
4546
|
},
|
|
4547
|
+
"UserListEnum": {
|
|
4548
|
+
"type": "string",
|
|
4549
|
+
"enum": [
|
|
4550
|
+
"Friends",
|
|
4551
|
+
"Enemies",
|
|
4552
|
+
"Targets"
|
|
4553
|
+
]
|
|
4554
|
+
},
|
|
4456
4555
|
"JobPositionCasinoEnum": {
|
|
4457
4556
|
"type": "string",
|
|
4458
4557
|
"enum": [
|
|
@@ -6554,6 +6653,11 @@
|
|
|
6554
6653
|
]
|
|
6555
6654
|
},
|
|
6556
6655
|
"success_chance": {
|
|
6656
|
+
"description": "This field is replaced with 'crime_pass_rate' field and will be removed on 1st of May 2025.",
|
|
6657
|
+
"type": "integer",
|
|
6658
|
+
"deprecated": true
|
|
6659
|
+
},
|
|
6660
|
+
"crime_pass_rate": {
|
|
6557
6661
|
"type": "integer"
|
|
6558
6662
|
}
|
|
6559
6663
|
},
|
|
@@ -6563,7 +6667,8 @@
|
|
|
6563
6667
|
"item_requirement",
|
|
6564
6668
|
"user_id",
|
|
6565
6669
|
"user",
|
|
6566
|
-
"success_chance"
|
|
6670
|
+
"success_chance",
|
|
6671
|
+
"crime_pass_rate"
|
|
6567
6672
|
]
|
|
6568
6673
|
},
|
|
6569
6674
|
"FactionCrime": {
|
|
@@ -6584,12 +6689,6 @@
|
|
|
6584
6689
|
"description": "The timestamp at which the crime was created.",
|
|
6585
6690
|
"type": "integer"
|
|
6586
6691
|
},
|
|
6587
|
-
"initiated_at": {
|
|
6588
|
-
"description": "Replaced by the 'planning_at' field (same value). This field will be removed in the future (1st Februrary 2025 or later).",
|
|
6589
|
-
"type": "integer",
|
|
6590
|
-
"nullable": true,
|
|
6591
|
-
"deprecated": true
|
|
6592
|
-
},
|
|
6593
6692
|
"planning_at": {
|
|
6594
6693
|
"description": "The timestamp at which the planning phase for the crime has begun.",
|
|
6595
6694
|
"type": "integer",
|
|
@@ -6635,7 +6734,6 @@
|
|
|
6635
6734
|
"difficulty",
|
|
6636
6735
|
"status",
|
|
6637
6736
|
"created_at",
|
|
6638
|
-
"initiated_at",
|
|
6639
6737
|
"planning_at",
|
|
6640
6738
|
"ready_at",
|
|
6641
6739
|
"expired_at",
|
|
@@ -6662,6 +6760,17 @@
|
|
|
6662
6760
|
"_metadata"
|
|
6663
6761
|
]
|
|
6664
6762
|
},
|
|
6763
|
+
"FactionCrimeResponse": {
|
|
6764
|
+
"properties": {
|
|
6765
|
+
"crime": {
|
|
6766
|
+
"$ref": "#/components/schemas/FactionCrime"
|
|
6767
|
+
}
|
|
6768
|
+
},
|
|
6769
|
+
"type": "object",
|
|
6770
|
+
"required": [
|
|
6771
|
+
"crime"
|
|
6772
|
+
]
|
|
6773
|
+
},
|
|
6665
6774
|
"FactionSelectionName": {
|
|
6666
6775
|
"description": "The following selections will fallback to API v1 and may change at any time: 'armor', 'boosters', 'caches', 'cesium', 'contributors', 'crimeexp', 'currency', 'donations', 'drugs', 'medical', 'positions', 'reports', 'stats', 'temporary', 'upgrades', 'weapons'.",
|
|
6667
6776
|
"type": "string",
|
|
@@ -6673,6 +6782,7 @@
|
|
|
6673
6782
|
"chain",
|
|
6674
6783
|
"chainreport",
|
|
6675
6784
|
"chains",
|
|
6785
|
+
"crime",
|
|
6676
6786
|
"crimes",
|
|
6677
6787
|
"hof",
|
|
6678
6788
|
"lookup",
|
|
@@ -7327,13 +7437,17 @@
|
|
|
7327
7437
|
},
|
|
7328
7438
|
"description": {
|
|
7329
7439
|
"type": "string"
|
|
7440
|
+
},
|
|
7441
|
+
"value": {
|
|
7442
|
+
"type": "integer"
|
|
7330
7443
|
}
|
|
7331
7444
|
},
|
|
7332
7445
|
"type": "object",
|
|
7333
7446
|
"required": [
|
|
7334
7447
|
"id",
|
|
7335
7448
|
"title",
|
|
7336
|
-
"description"
|
|
7449
|
+
"description",
|
|
7450
|
+
"value"
|
|
7337
7451
|
]
|
|
7338
7452
|
},
|
|
7339
7453
|
"ItemMarketListingItemStats": {
|
|
@@ -7352,13 +7466,18 @@
|
|
|
7352
7466
|
"type": "number",
|
|
7353
7467
|
"format": "float",
|
|
7354
7468
|
"nullable": true
|
|
7469
|
+
},
|
|
7470
|
+
"quality": {
|
|
7471
|
+
"type": "number",
|
|
7472
|
+
"format": "float"
|
|
7355
7473
|
}
|
|
7356
7474
|
},
|
|
7357
7475
|
"type": "object",
|
|
7358
7476
|
"required": [
|
|
7359
7477
|
"damage",
|
|
7360
7478
|
"accuracy",
|
|
7361
|
-
"armor"
|
|
7479
|
+
"armor",
|
|
7480
|
+
"quality"
|
|
7362
7481
|
]
|
|
7363
7482
|
},
|
|
7364
7483
|
"ItemMarketItem": {
|
|
@@ -7386,9 +7505,6 @@
|
|
|
7386
7505
|
},
|
|
7387
7506
|
"ItemMarketListingStackable": {
|
|
7388
7507
|
"properties": {
|
|
7389
|
-
"id": {
|
|
7390
|
-
"type": "integer"
|
|
7391
|
-
},
|
|
7392
7508
|
"price": {
|
|
7393
7509
|
"type": "integer"
|
|
7394
7510
|
},
|
|
@@ -7398,7 +7514,6 @@
|
|
|
7398
7514
|
},
|
|
7399
7515
|
"type": "object",
|
|
7400
7516
|
"required": [
|
|
7401
|
-
"id",
|
|
7402
7517
|
"price",
|
|
7403
7518
|
"amount"
|
|
7404
7519
|
]
|
|
@@ -7437,9 +7552,6 @@
|
|
|
7437
7552
|
},
|
|
7438
7553
|
"ItemMarketListingNonstackable": {
|
|
7439
7554
|
"properties": {
|
|
7440
|
-
"id": {
|
|
7441
|
-
"type": "integer"
|
|
7442
|
-
},
|
|
7443
7555
|
"price": {
|
|
7444
7556
|
"type": "integer"
|
|
7445
7557
|
},
|
|
@@ -7452,7 +7564,6 @@
|
|
|
7452
7564
|
},
|
|
7453
7565
|
"type": "object",
|
|
7454
7566
|
"required": [
|
|
7455
|
-
"id",
|
|
7456
7567
|
"price",
|
|
7457
7568
|
"amount",
|
|
7458
7569
|
"itemDetails"
|
|
@@ -12795,6 +12906,64 @@
|
|
|
12795
12906
|
"organizedCrime"
|
|
12796
12907
|
]
|
|
12797
12908
|
},
|
|
12909
|
+
"UserList": {
|
|
12910
|
+
"properties": {
|
|
12911
|
+
"id": {
|
|
12912
|
+
"$ref": "#/components/schemas/UserId"
|
|
12913
|
+
},
|
|
12914
|
+
"name": {
|
|
12915
|
+
"type": "string"
|
|
12916
|
+
},
|
|
12917
|
+
"level": {
|
|
12918
|
+
"type": "integer"
|
|
12919
|
+
},
|
|
12920
|
+
"faction_id": {
|
|
12921
|
+
"nullable": true,
|
|
12922
|
+
"allOf": [
|
|
12923
|
+
{
|
|
12924
|
+
"$ref": "#/components/schemas/FactionId"
|
|
12925
|
+
},
|
|
12926
|
+
{
|
|
12927
|
+
"type": "integer",
|
|
12928
|
+
"nullable": true
|
|
12929
|
+
}
|
|
12930
|
+
]
|
|
12931
|
+
},
|
|
12932
|
+
"last_action": {
|
|
12933
|
+
"$ref": "#/components/schemas/UserLastAction"
|
|
12934
|
+
},
|
|
12935
|
+
"status": {
|
|
12936
|
+
"$ref": "#/components/schemas/UserStatus"
|
|
12937
|
+
}
|
|
12938
|
+
},
|
|
12939
|
+
"type": "object",
|
|
12940
|
+
"required": [
|
|
12941
|
+
"id",
|
|
12942
|
+
"name",
|
|
12943
|
+
"level",
|
|
12944
|
+
"faction_id",
|
|
12945
|
+
"last_action",
|
|
12946
|
+
"status"
|
|
12947
|
+
]
|
|
12948
|
+
},
|
|
12949
|
+
"UserListResponse": {
|
|
12950
|
+
"properties": {
|
|
12951
|
+
"list": {
|
|
12952
|
+
"type": "array",
|
|
12953
|
+
"items": {
|
|
12954
|
+
"$ref": "#/components/schemas/UserList"
|
|
12955
|
+
}
|
|
12956
|
+
},
|
|
12957
|
+
"_metadata": {
|
|
12958
|
+
"$ref": "#/components/schemas/RequestMetadataWithLinks"
|
|
12959
|
+
}
|
|
12960
|
+
},
|
|
12961
|
+
"type": "object",
|
|
12962
|
+
"required": [
|
|
12963
|
+
"list",
|
|
12964
|
+
"_metadata"
|
|
12965
|
+
]
|
|
12966
|
+
},
|
|
12798
12967
|
"UserSelectionName": {
|
|
12799
12968
|
"description": "The following selections will fallback to API v1 and may change at any time: 'ammo','bars','basic','battlestats','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','jobpoints','log','medals','merits','messages','missions','money','networth','newevents','newmessages','notifications','perks','profile','properties','refills','reports','skills','stocks','travel','weaponexp','workstats'.",
|
|
12800
12969
|
"type": "string",
|
|
@@ -12814,6 +12983,7 @@
|
|
|
12814
12983
|
"hof",
|
|
12815
12984
|
"itemmarket",
|
|
12816
12985
|
"jobranks",
|
|
12986
|
+
"list",
|
|
12817
12987
|
"lookup",
|
|
12818
12988
|
"organizedcrime",
|
|
12819
12989
|
"personalstats",
|
|
@@ -12903,6 +13073,17 @@
|
|
|
12903
13073
|
"type": "string"
|
|
12904
13074
|
}
|
|
12905
13075
|
},
|
|
13076
|
+
"ApiLimit50": {
|
|
13077
|
+
"name": "limit",
|
|
13078
|
+
"in": "query",
|
|
13079
|
+
"required": false,
|
|
13080
|
+
"schema": {
|
|
13081
|
+
"type": "integer",
|
|
13082
|
+
"default": 50,
|
|
13083
|
+
"maximum": 50,
|
|
13084
|
+
"minimum": 1
|
|
13085
|
+
}
|
|
13086
|
+
},
|
|
12906
13087
|
"ApiLimit100": {
|
|
12907
13088
|
"name": "limit",
|
|
12908
13089
|
"in": "query",
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate-types": "tsc && node build/index.js"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@scalar/openapi-types": "^0.1.
|
|
10
|
-
"@types/node": "^22.13.
|
|
11
|
-
"prettier": "^3.5.
|
|
9
|
+
"@scalar/openapi-types": "^0.1.9",
|
|
10
|
+
"@types/node": "^22.13.10",
|
|
11
|
+
"prettier": "^3.5.3",
|
|
12
12
|
"typeconv": "^2.3.1",
|
|
13
|
-
"typescript": "^5.
|
|
13
|
+
"typescript": "^5.8.2"
|
|
14
14
|
},
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"files": [
|