tornapi-typescript 0.1.0 → 0.1.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/index.d.ts +148 -8
- package/dist/openapi.json +597 -18
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,52 @@
|
|
|
9
9
|
|
|
10
10
|
export type RaceClassEnum = "A" | "B" | "C" | "D" | "E";
|
|
11
11
|
|
|
12
|
+
export type FactionStatEnum =
|
|
13
|
+
| "medicalitemsused"
|
|
14
|
+
| "criminaloffences"
|
|
15
|
+
| "organisedcrimerespect"
|
|
16
|
+
| "organisedcrimemoney"
|
|
17
|
+
| "organisedcrimesuccess"
|
|
18
|
+
| "organisedcrimefail"
|
|
19
|
+
| "attackswon"
|
|
20
|
+
| "attackslost"
|
|
21
|
+
| "attackschain"
|
|
22
|
+
| "attacksleave"
|
|
23
|
+
| "attacksmug"
|
|
24
|
+
| "attackshosp"
|
|
25
|
+
| "bestchain"
|
|
26
|
+
| "busts"
|
|
27
|
+
| "revives"
|
|
28
|
+
| "jails"
|
|
29
|
+
| "hosps"
|
|
30
|
+
| "medicalitemrecovery"
|
|
31
|
+
| "medicalcooldownused"
|
|
32
|
+
| "gymtrains"
|
|
33
|
+
| "gymstrength"
|
|
34
|
+
| "gymspeed"
|
|
35
|
+
| "gymdefense"
|
|
36
|
+
| "gymdexterity"
|
|
37
|
+
| "candyused"
|
|
38
|
+
| "alcoholused"
|
|
39
|
+
| "energydrinkused"
|
|
40
|
+
| "drugsused"
|
|
41
|
+
| "drugoverdoses"
|
|
42
|
+
| "rehabs"
|
|
43
|
+
| "caymaninterest"
|
|
44
|
+
| "traveltimes"
|
|
45
|
+
| "traveltime"
|
|
46
|
+
| "hunting"
|
|
47
|
+
| "attacksdamagehits"
|
|
48
|
+
| "attacksdamage"
|
|
49
|
+
| "hosptimegiven"
|
|
50
|
+
| "hosptimereceived"
|
|
51
|
+
| "attacksdamaging"
|
|
52
|
+
| "attacksrunaway"
|
|
53
|
+
| "highestterritories"
|
|
54
|
+
| "territoryrespect";
|
|
55
|
+
|
|
56
|
+
export type FactionBranchStateEnum = "war" | "peace";
|
|
57
|
+
|
|
12
58
|
export type FactionOrganizedCrimePayoutType =
|
|
13
59
|
| "balance"
|
|
14
60
|
| "wallet"
|
|
@@ -318,6 +364,8 @@ export type LogCategoryId = number;
|
|
|
318
364
|
|
|
319
365
|
export type FactionId = number;
|
|
320
366
|
|
|
367
|
+
export type FactionBranchId = number;
|
|
368
|
+
|
|
321
369
|
export type FactionCrimeId = number;
|
|
322
370
|
|
|
323
371
|
export type ChainId = number;
|
|
@@ -622,6 +670,56 @@ export interface TimestampResponse {
|
|
|
622
670
|
timestamp: number;
|
|
623
671
|
}
|
|
624
672
|
|
|
673
|
+
export interface FactionUpgradeDetails {
|
|
674
|
+
id: FactionBranchId;
|
|
675
|
+
name: string;
|
|
676
|
+
ability: string;
|
|
677
|
+
level: number;
|
|
678
|
+
cost: number;
|
|
679
|
+
unlocked_at?: number;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export interface FactionBranchDetails {
|
|
683
|
+
name: string;
|
|
684
|
+
order: number;
|
|
685
|
+
/** Respect cost multiplier. */
|
|
686
|
+
multiplier: number;
|
|
687
|
+
upgrades: FactionUpgradeDetails[];
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
export interface FactionUpgrades {
|
|
691
|
+
core: {
|
|
692
|
+
upgrades?: FactionUpgradeDetails[];
|
|
693
|
+
};
|
|
694
|
+
peace: FactionBranchDetails[];
|
|
695
|
+
war: FactionBranchDetails[];
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
export interface FactionUpgradesResponse {
|
|
699
|
+
upgrades: FactionUpgrades;
|
|
700
|
+
state: FactionBranchStateEnum;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
export interface FactionStat {
|
|
704
|
+
name: FactionStatEnum;
|
|
705
|
+
value: number;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export interface FactionStatsResponse {
|
|
709
|
+
stats: FactionStat[];
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
export interface FactionContributor {
|
|
713
|
+
id: UserId;
|
|
714
|
+
username: string;
|
|
715
|
+
value: number;
|
|
716
|
+
in_faction: boolean;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export interface FactionContributorsResponse {
|
|
720
|
+
contributors: FactionContributor[];
|
|
721
|
+
}
|
|
722
|
+
|
|
625
723
|
export interface FactionHofStats {
|
|
626
724
|
rank: HofValueString;
|
|
627
725
|
respect: HofValue;
|
|
@@ -996,15 +1094,35 @@ export interface FactionCrimeResponse {
|
|
|
996
1094
|
crime: FactionCrime;
|
|
997
1095
|
}
|
|
998
1096
|
|
|
999
|
-
|
|
1097
|
+
export interface FactionBalance {
|
|
1098
|
+
faction: {
|
|
1099
|
+
money: number;
|
|
1100
|
+
points: number;
|
|
1101
|
+
scope: number;
|
|
1102
|
+
};
|
|
1103
|
+
members: {
|
|
1104
|
+
id: UserId;
|
|
1105
|
+
username: string;
|
|
1106
|
+
money: number;
|
|
1107
|
+
points: number;
|
|
1108
|
+
}[];
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
export interface FactionBalanceResponse {
|
|
1112
|
+
balance: FactionBalance;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
/** The following selections will fallback to API v1 and may change at any time: 'armor', 'boosters', 'caches', 'cesium', 'crimeexp', 'drugs', 'medical', 'positions', 'reports', 'temporary', 'weapons'. */
|
|
1000
1116
|
export type FactionSelectionName =
|
|
1001
1117
|
| "applications"
|
|
1002
1118
|
| "attacks"
|
|
1003
1119
|
| "attacksfull"
|
|
1120
|
+
| "balance"
|
|
1004
1121
|
| "basic"
|
|
1005
1122
|
| "chain"
|
|
1006
1123
|
| "chainreport"
|
|
1007
1124
|
| "chains"
|
|
1125
|
+
| "contributors"
|
|
1008
1126
|
| "crime"
|
|
1009
1127
|
| "crimes"
|
|
1010
1128
|
| "hof"
|
|
@@ -1015,24 +1133,21 @@ export type FactionSelectionName =
|
|
|
1015
1133
|
| "rankedwarreport"
|
|
1016
1134
|
| "revives"
|
|
1017
1135
|
| "revivesfull"
|
|
1136
|
+
| "stats"
|
|
1018
1137
|
| "timestamp"
|
|
1138
|
+
| "upgrades"
|
|
1019
1139
|
| "wars"
|
|
1020
1140
|
| "armor"
|
|
1021
1141
|
| "boosters"
|
|
1022
1142
|
| "caches"
|
|
1023
1143
|
| "cesium"
|
|
1024
|
-
| "contributors"
|
|
1025
1144
|
| "crimeexp"
|
|
1026
|
-
| "currency"
|
|
1027
|
-
| "donations"
|
|
1028
1145
|
| "drugs"
|
|
1029
1146
|
| "medical"
|
|
1030
1147
|
| "positions"
|
|
1031
1148
|
| "reports"
|
|
1032
|
-
| "stats"
|
|
1033
1149
|
| "temporary"
|
|
1034
1150
|
| "territory"
|
|
1035
|
-
| "upgrades"
|
|
1036
1151
|
| "weapons";
|
|
1037
1152
|
|
|
1038
1153
|
export interface FactionLookupResponse {
|
|
@@ -1653,13 +1768,39 @@ export interface TornItemsResponse {
|
|
|
1653
1768
|
items: TornItem[];
|
|
1654
1769
|
}
|
|
1655
1770
|
|
|
1656
|
-
|
|
1771
|
+
export interface TornFactionTreeBranch {
|
|
1772
|
+
id: FactionBranchId;
|
|
1773
|
+
name: string;
|
|
1774
|
+
upgrades: {
|
|
1775
|
+
name: string;
|
|
1776
|
+
level: number;
|
|
1777
|
+
ability: string;
|
|
1778
|
+
cost: number;
|
|
1779
|
+
challenge: {
|
|
1780
|
+
description: string;
|
|
1781
|
+
amount_required: number;
|
|
1782
|
+
stat: FactionStatEnum;
|
|
1783
|
+
} | null;
|
|
1784
|
+
}[];
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
export interface TornFactionTree {
|
|
1788
|
+
name: string;
|
|
1789
|
+
branches: TornFactionTreeBranch[];
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
export interface TornFactionTreeResponse {
|
|
1793
|
+
factionTree: TornFactionTree;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
/** The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','dirtybombs','education','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','properties','rackets','raidreport','raids','rockpaperscissors','searchforcash','shoplifting','stats','stocks','territory','territorynames','territorywarreport','territorywars'. */
|
|
1657
1797
|
export type TornSelectionName =
|
|
1658
1798
|
| "attacklog"
|
|
1659
1799
|
| "bounties"
|
|
1660
1800
|
| "calendar"
|
|
1661
1801
|
| "crimes"
|
|
1662
1802
|
| "factionHof"
|
|
1803
|
+
| "factiontree"
|
|
1663
1804
|
| "hof"
|
|
1664
1805
|
| "itemammo"
|
|
1665
1806
|
| "itemmods"
|
|
@@ -1676,7 +1817,6 @@ export type TornSelectionName =
|
|
|
1676
1817
|
| "competition"
|
|
1677
1818
|
| "dirtybombs"
|
|
1678
1819
|
| "education"
|
|
1679
|
-
| "factiontree"
|
|
1680
1820
|
| "gyms"
|
|
1681
1821
|
| "honors"
|
|
1682
1822
|
| "itemdetails"
|
package/dist/openapi.json
CHANGED
|
@@ -1333,6 +1333,33 @@
|
|
|
1333
1333
|
"x-stability": "Stable"
|
|
1334
1334
|
}
|
|
1335
1335
|
},
|
|
1336
|
+
"/faction/balance": {
|
|
1337
|
+
"get": {
|
|
1338
|
+
"tags": [
|
|
1339
|
+
"Faction"
|
|
1340
|
+
],
|
|
1341
|
+
"summary": "Get your faction's & member's balance details",
|
|
1342
|
+
"description": "Requires limited access key with faction API access permissions. <br>",
|
|
1343
|
+
"responses": {
|
|
1344
|
+
"200": {
|
|
1345
|
+
"description": "Successful operation",
|
|
1346
|
+
"content": {
|
|
1347
|
+
"application/json": {
|
|
1348
|
+
"schema": {
|
|
1349
|
+
"$ref": "#/components/schemas/FactionBalanceResponse"
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
"security": [
|
|
1356
|
+
{
|
|
1357
|
+
"api_key": []
|
|
1358
|
+
}
|
|
1359
|
+
],
|
|
1360
|
+
"x-stability": "Stable"
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1336
1363
|
"/faction/basic": {
|
|
1337
1364
|
"get": {
|
|
1338
1365
|
"tags": [
|
|
@@ -1619,13 +1646,64 @@
|
|
|
1619
1646
|
"x-stability": "Stable"
|
|
1620
1647
|
}
|
|
1621
1648
|
},
|
|
1649
|
+
"/faction/contributors": {
|
|
1650
|
+
"get": {
|
|
1651
|
+
"tags": [
|
|
1652
|
+
"Faction"
|
|
1653
|
+
],
|
|
1654
|
+
"summary": "Get your faction's challenge contributors",
|
|
1655
|
+
"description": "Requires limiteed access key with faction API access permissions. <br>",
|
|
1656
|
+
"parameters": [
|
|
1657
|
+
{
|
|
1658
|
+
"name": "stat",
|
|
1659
|
+
"in": "query",
|
|
1660
|
+
"description": "Get contributors for this field.",
|
|
1661
|
+
"required": true,
|
|
1662
|
+
"schema": {
|
|
1663
|
+
"$ref": "#/components/schemas/FactionStatEnum"
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
"name": "cat",
|
|
1668
|
+
"in": "query",
|
|
1669
|
+
"description": "By default, this selection will return only current faction's member contributions, and the option 'all' will return all contributors.",
|
|
1670
|
+
"required": false,
|
|
1671
|
+
"schema": {
|
|
1672
|
+
"type": "string",
|
|
1673
|
+
"enum": [
|
|
1674
|
+
"all",
|
|
1675
|
+
"current"
|
|
1676
|
+
]
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
],
|
|
1680
|
+
"responses": {
|
|
1681
|
+
"200": {
|
|
1682
|
+
"description": "Successful operation",
|
|
1683
|
+
"content": {
|
|
1684
|
+
"application/json": {
|
|
1685
|
+
"schema": {
|
|
1686
|
+
"$ref": "#/components/schemas/FactionContributorsResponse"
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1692
|
+
"security": [
|
|
1693
|
+
{
|
|
1694
|
+
"api_key": []
|
|
1695
|
+
}
|
|
1696
|
+
],
|
|
1697
|
+
"x-stability": "Unstable"
|
|
1698
|
+
}
|
|
1699
|
+
},
|
|
1622
1700
|
"/faction/crimes": {
|
|
1623
1701
|
"get": {
|
|
1624
1702
|
"tags": [
|
|
1625
1703
|
"Faction"
|
|
1626
1704
|
],
|
|
1627
1705
|
"summary": "Get your faction's organized crimes",
|
|
1628
|
-
"description": "Requires
|
|
1706
|
+
"description": "Requires 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.",
|
|
1629
1707
|
"parameters": [
|
|
1630
1708
|
{
|
|
1631
1709
|
"name": "cat",
|
|
@@ -1685,7 +1763,7 @@
|
|
|
1685
1763
|
"Faction"
|
|
1686
1764
|
],
|
|
1687
1765
|
"summary": "Get a specific organized crime",
|
|
1688
|
-
"description": "Requires
|
|
1766
|
+
"description": "Requires minimal access key with faction API access permissions. <br>",
|
|
1689
1767
|
"parameters": [
|
|
1690
1768
|
{
|
|
1691
1769
|
"name": "id",
|
|
@@ -2119,6 +2197,60 @@
|
|
|
2119
2197
|
"x-stability": "Stable"
|
|
2120
2198
|
}
|
|
2121
2199
|
},
|
|
2200
|
+
"/faction/stats": {
|
|
2201
|
+
"get": {
|
|
2202
|
+
"tags": [
|
|
2203
|
+
"Faction"
|
|
2204
|
+
],
|
|
2205
|
+
"summary": "Get your faction's challenges stats",
|
|
2206
|
+
"description": "Requires minimal access key with faction API access permissions. <br>",
|
|
2207
|
+
"responses": {
|
|
2208
|
+
"200": {
|
|
2209
|
+
"description": "Successful operation",
|
|
2210
|
+
"content": {
|
|
2211
|
+
"application/json": {
|
|
2212
|
+
"schema": {
|
|
2213
|
+
"$ref": "#/components/schemas/FactionStatsResponse"
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
},
|
|
2219
|
+
"security": [
|
|
2220
|
+
{
|
|
2221
|
+
"api_key": []
|
|
2222
|
+
}
|
|
2223
|
+
],
|
|
2224
|
+
"x-stability": "Unstable"
|
|
2225
|
+
}
|
|
2226
|
+
},
|
|
2227
|
+
"/faction/upgrades": {
|
|
2228
|
+
"get": {
|
|
2229
|
+
"tags": [
|
|
2230
|
+
"Faction"
|
|
2231
|
+
],
|
|
2232
|
+
"summary": "Get your faction's upgrades",
|
|
2233
|
+
"description": "Requires minimal access key with faction API access permissions. <br>",
|
|
2234
|
+
"responses": {
|
|
2235
|
+
"200": {
|
|
2236
|
+
"description": "Successful operation",
|
|
2237
|
+
"content": {
|
|
2238
|
+
"application/json": {
|
|
2239
|
+
"schema": {
|
|
2240
|
+
"$ref": "#/components/schemas/FactionUpgradesResponse"
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
},
|
|
2246
|
+
"security": [
|
|
2247
|
+
{
|
|
2248
|
+
"api_key": []
|
|
2249
|
+
}
|
|
2250
|
+
],
|
|
2251
|
+
"x-stability": "Unstable"
|
|
2252
|
+
}
|
|
2253
|
+
},
|
|
2122
2254
|
"/faction/wars": {
|
|
2123
2255
|
"get": {
|
|
2124
2256
|
"tags": [
|
|
@@ -2286,6 +2418,15 @@
|
|
|
2286
2418
|
"type": "string"
|
|
2287
2419
|
}
|
|
2288
2420
|
},
|
|
2421
|
+
{
|
|
2422
|
+
"name": "stat",
|
|
2423
|
+
"in": "query",
|
|
2424
|
+
"description": "Stat category",
|
|
2425
|
+
"required": false,
|
|
2426
|
+
"schema": {
|
|
2427
|
+
"type": "string"
|
|
2428
|
+
}
|
|
2429
|
+
},
|
|
2289
2430
|
{
|
|
2290
2431
|
"$ref": "#/components/parameters/ApiStripTags"
|
|
2291
2432
|
},
|
|
@@ -2345,6 +2486,15 @@
|
|
|
2345
2486
|
{
|
|
2346
2487
|
"$ref": "#/components/schemas/FactionRankedWarReportResponse"
|
|
2347
2488
|
},
|
|
2489
|
+
{
|
|
2490
|
+
"$ref": "#/components/schemas/FactionUpgradesResponse"
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
"$ref": "#/components/schemas/FactionStatsResponse"
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
"$ref": "#/components/schemas/FactionContributorsResponse"
|
|
2497
|
+
},
|
|
2348
2498
|
{
|
|
2349
2499
|
"$ref": "#/components/schemas/FactionLookupResponse"
|
|
2350
2500
|
},
|
|
@@ -3475,6 +3625,33 @@
|
|
|
3475
3625
|
"x-stability": "Stable"
|
|
3476
3626
|
}
|
|
3477
3627
|
},
|
|
3628
|
+
"/torn/factiontree": {
|
|
3629
|
+
"get": {
|
|
3630
|
+
"tags": [
|
|
3631
|
+
"Torn"
|
|
3632
|
+
],
|
|
3633
|
+
"summary": "Get full faction tree",
|
|
3634
|
+
"description": "Requires public access key. <br> ",
|
|
3635
|
+
"responses": {
|
|
3636
|
+
"200": {
|
|
3637
|
+
"description": "Successful operation",
|
|
3638
|
+
"content": {
|
|
3639
|
+
"application/json": {
|
|
3640
|
+
"schema": {
|
|
3641
|
+
"$ref": "#/components/schemas/TornFactionTreeResponse"
|
|
3642
|
+
}
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
}
|
|
3646
|
+
},
|
|
3647
|
+
"security": [
|
|
3648
|
+
{
|
|
3649
|
+
"api_key": []
|
|
3650
|
+
}
|
|
3651
|
+
],
|
|
3652
|
+
"x-stability": "Unstable"
|
|
3653
|
+
}
|
|
3654
|
+
},
|
|
3478
3655
|
"/torn/hof": {
|
|
3479
3656
|
"get": {
|
|
3480
3657
|
"tags": [
|
|
@@ -3956,6 +4133,9 @@
|
|
|
3956
4133
|
{
|
|
3957
4134
|
"$ref": "#/components/schemas/TornItemAmmoResponse"
|
|
3958
4135
|
},
|
|
4136
|
+
{
|
|
4137
|
+
"$ref": "#/components/schemas/TornFactionTreeResponse"
|
|
4138
|
+
},
|
|
3959
4139
|
{
|
|
3960
4140
|
"$ref": "#/components/schemas/TornItemModsResponse"
|
|
3961
4141
|
},
|
|
@@ -3992,6 +4172,60 @@
|
|
|
3992
4172
|
"E"
|
|
3993
4173
|
]
|
|
3994
4174
|
},
|
|
4175
|
+
"FactionStatEnum": {
|
|
4176
|
+
"type": "string",
|
|
4177
|
+
"enum": [
|
|
4178
|
+
"medicalitemsused",
|
|
4179
|
+
"criminaloffences",
|
|
4180
|
+
"organisedcrimerespect",
|
|
4181
|
+
"organisedcrimemoney",
|
|
4182
|
+
"organisedcrimesuccess",
|
|
4183
|
+
"organisedcrimefail",
|
|
4184
|
+
"attackswon",
|
|
4185
|
+
"attackslost",
|
|
4186
|
+
"attackschain",
|
|
4187
|
+
"attacksleave",
|
|
4188
|
+
"attacksmug",
|
|
4189
|
+
"attackshosp",
|
|
4190
|
+
"bestchain",
|
|
4191
|
+
"busts",
|
|
4192
|
+
"revives",
|
|
4193
|
+
"jails",
|
|
4194
|
+
"hosps",
|
|
4195
|
+
"medicalitemrecovery",
|
|
4196
|
+
"medicalcooldownused",
|
|
4197
|
+
"gymtrains",
|
|
4198
|
+
"gymstrength",
|
|
4199
|
+
"gymspeed",
|
|
4200
|
+
"gymdefense",
|
|
4201
|
+
"gymdexterity",
|
|
4202
|
+
"candyused",
|
|
4203
|
+
"alcoholused",
|
|
4204
|
+
"energydrinkused",
|
|
4205
|
+
"drugsused",
|
|
4206
|
+
"drugoverdoses",
|
|
4207
|
+
"rehabs",
|
|
4208
|
+
"caymaninterest",
|
|
4209
|
+
"traveltimes",
|
|
4210
|
+
"traveltime",
|
|
4211
|
+
"hunting",
|
|
4212
|
+
"attacksdamagehits",
|
|
4213
|
+
"attacksdamage",
|
|
4214
|
+
"hosptimegiven",
|
|
4215
|
+
"hosptimereceived",
|
|
4216
|
+
"attacksdamaging",
|
|
4217
|
+
"attacksrunaway",
|
|
4218
|
+
"highestterritories",
|
|
4219
|
+
"territoryrespect"
|
|
4220
|
+
]
|
|
4221
|
+
},
|
|
4222
|
+
"FactionBranchStateEnum": {
|
|
4223
|
+
"type": "string",
|
|
4224
|
+
"enum": [
|
|
4225
|
+
"war",
|
|
4226
|
+
"peace"
|
|
4227
|
+
]
|
|
4228
|
+
},
|
|
3995
4229
|
"FactionOrganizedCrimePayoutType": {
|
|
3996
4230
|
"type": "string",
|
|
3997
4231
|
"enum": [
|
|
@@ -4408,6 +4642,10 @@
|
|
|
4408
4642
|
"type": "integer",
|
|
4409
4643
|
"format": "int32"
|
|
4410
4644
|
},
|
|
4645
|
+
"FactionBranchId": {
|
|
4646
|
+
"type": "integer",
|
|
4647
|
+
"format": "int32"
|
|
4648
|
+
},
|
|
4411
4649
|
"FactionCrimeId": {
|
|
4412
4650
|
"type": "integer",
|
|
4413
4651
|
"format": "int64"
|
|
@@ -5192,6 +5430,185 @@
|
|
|
5192
5430
|
},
|
|
5193
5431
|
"type": "object"
|
|
5194
5432
|
},
|
|
5433
|
+
"FactionUpgradeDetails": {
|
|
5434
|
+
"required": [
|
|
5435
|
+
"id",
|
|
5436
|
+
"name",
|
|
5437
|
+
"ability",
|
|
5438
|
+
"level",
|
|
5439
|
+
"cost",
|
|
5440
|
+
"unlockedAt"
|
|
5441
|
+
],
|
|
5442
|
+
"properties": {
|
|
5443
|
+
"id": {
|
|
5444
|
+
"$ref": "#/components/schemas/FactionBranchId"
|
|
5445
|
+
},
|
|
5446
|
+
"name": {
|
|
5447
|
+
"type": "string"
|
|
5448
|
+
},
|
|
5449
|
+
"ability": {
|
|
5450
|
+
"type": "string"
|
|
5451
|
+
},
|
|
5452
|
+
"level": {
|
|
5453
|
+
"type": "integer",
|
|
5454
|
+
"format": "int32"
|
|
5455
|
+
},
|
|
5456
|
+
"cost": {
|
|
5457
|
+
"type": "integer",
|
|
5458
|
+
"format": "int32"
|
|
5459
|
+
},
|
|
5460
|
+
"unlocked_at": {
|
|
5461
|
+
"type": "integer",
|
|
5462
|
+
"format": "int32"
|
|
5463
|
+
}
|
|
5464
|
+
},
|
|
5465
|
+
"type": "object"
|
|
5466
|
+
},
|
|
5467
|
+
"FactionBranchDetails": {
|
|
5468
|
+
"required": [
|
|
5469
|
+
"name",
|
|
5470
|
+
"order",
|
|
5471
|
+
"multiplier",
|
|
5472
|
+
"upgrades"
|
|
5473
|
+
],
|
|
5474
|
+
"properties": {
|
|
5475
|
+
"name": {
|
|
5476
|
+
"type": "string"
|
|
5477
|
+
},
|
|
5478
|
+
"order": {
|
|
5479
|
+
"type": "integer",
|
|
5480
|
+
"format": "int32"
|
|
5481
|
+
},
|
|
5482
|
+
"multiplier": {
|
|
5483
|
+
"description": "Respect cost multiplier.",
|
|
5484
|
+
"type": "integer",
|
|
5485
|
+
"format": "int32"
|
|
5486
|
+
},
|
|
5487
|
+
"upgrades": {
|
|
5488
|
+
"type": "array",
|
|
5489
|
+
"items": {
|
|
5490
|
+
"$ref": "#/components/schemas/FactionUpgradeDetails"
|
|
5491
|
+
}
|
|
5492
|
+
}
|
|
5493
|
+
},
|
|
5494
|
+
"type": "object"
|
|
5495
|
+
},
|
|
5496
|
+
"FactionUpgrades": {
|
|
5497
|
+
"required": [
|
|
5498
|
+
"core",
|
|
5499
|
+
"peace",
|
|
5500
|
+
"war"
|
|
5501
|
+
],
|
|
5502
|
+
"properties": {
|
|
5503
|
+
"core": {
|
|
5504
|
+
"properties": {
|
|
5505
|
+
"upgrades": {
|
|
5506
|
+
"type": "array",
|
|
5507
|
+
"items": {
|
|
5508
|
+
"$ref": "#/components/schemas/FactionUpgradeDetails"
|
|
5509
|
+
}
|
|
5510
|
+
}
|
|
5511
|
+
},
|
|
5512
|
+
"type": "object"
|
|
5513
|
+
},
|
|
5514
|
+
"peace": {
|
|
5515
|
+
"type": "array",
|
|
5516
|
+
"items": {
|
|
5517
|
+
"$ref": "#/components/schemas/FactionBranchDetails"
|
|
5518
|
+
}
|
|
5519
|
+
},
|
|
5520
|
+
"war": {
|
|
5521
|
+
"type": "array",
|
|
5522
|
+
"items": {
|
|
5523
|
+
"$ref": "#/components/schemas/FactionBranchDetails"
|
|
5524
|
+
}
|
|
5525
|
+
}
|
|
5526
|
+
},
|
|
5527
|
+
"type": "object"
|
|
5528
|
+
},
|
|
5529
|
+
"FactionUpgradesResponse": {
|
|
5530
|
+
"required": [
|
|
5531
|
+
"upgrades",
|
|
5532
|
+
"state"
|
|
5533
|
+
],
|
|
5534
|
+
"properties": {
|
|
5535
|
+
"upgrades": {
|
|
5536
|
+
"$ref": "#/components/schemas/FactionUpgrades"
|
|
5537
|
+
},
|
|
5538
|
+
"state": {
|
|
5539
|
+
"$ref": "#/components/schemas/FactionBranchStateEnum"
|
|
5540
|
+
}
|
|
5541
|
+
},
|
|
5542
|
+
"type": "object"
|
|
5543
|
+
},
|
|
5544
|
+
"FactionStat": {
|
|
5545
|
+
"required": [
|
|
5546
|
+
"name",
|
|
5547
|
+
"value"
|
|
5548
|
+
],
|
|
5549
|
+
"properties": {
|
|
5550
|
+
"name": {
|
|
5551
|
+
"$ref": "#/components/schemas/FactionStatEnum"
|
|
5552
|
+
},
|
|
5553
|
+
"value": {
|
|
5554
|
+
"type": "integer",
|
|
5555
|
+
"format": "int64"
|
|
5556
|
+
}
|
|
5557
|
+
},
|
|
5558
|
+
"type": "object"
|
|
5559
|
+
},
|
|
5560
|
+
"FactionStatsResponse": {
|
|
5561
|
+
"required": [
|
|
5562
|
+
"stats"
|
|
5563
|
+
],
|
|
5564
|
+
"properties": {
|
|
5565
|
+
"stats": {
|
|
5566
|
+
"type": "array",
|
|
5567
|
+
"items": {
|
|
5568
|
+
"$ref": "#/components/schemas/FactionStat"
|
|
5569
|
+
}
|
|
5570
|
+
}
|
|
5571
|
+
},
|
|
5572
|
+
"type": "object"
|
|
5573
|
+
},
|
|
5574
|
+
"FactionContributor": {
|
|
5575
|
+
"required": [
|
|
5576
|
+
"id",
|
|
5577
|
+
"username",
|
|
5578
|
+
"value",
|
|
5579
|
+
"in_faction"
|
|
5580
|
+
],
|
|
5581
|
+
"properties": {
|
|
5582
|
+
"id": {
|
|
5583
|
+
"$ref": "#/components/schemas/UserId"
|
|
5584
|
+
},
|
|
5585
|
+
"username": {
|
|
5586
|
+
"type": "string"
|
|
5587
|
+
},
|
|
5588
|
+
"value": {
|
|
5589
|
+
"type": "integer",
|
|
5590
|
+
"format": "int64"
|
|
5591
|
+
},
|
|
5592
|
+
"in_faction": {
|
|
5593
|
+
"type": "boolean"
|
|
5594
|
+
}
|
|
5595
|
+
},
|
|
5596
|
+
"type": "object"
|
|
5597
|
+
},
|
|
5598
|
+
"FactionContributorsResponse": {
|
|
5599
|
+
"required": [
|
|
5600
|
+
"contributors"
|
|
5601
|
+
],
|
|
5602
|
+
"properties": {
|
|
5603
|
+
"contributors": {
|
|
5604
|
+
"type": "array",
|
|
5605
|
+
"items": {
|
|
5606
|
+
"$ref": "#/components/schemas/FactionContributor"
|
|
5607
|
+
}
|
|
5608
|
+
}
|
|
5609
|
+
},
|
|
5610
|
+
"type": "object"
|
|
5611
|
+
},
|
|
5195
5612
|
"FactionHofStats": {
|
|
5196
5613
|
"required": [
|
|
5197
5614
|
"rank",
|
|
@@ -6676,17 +7093,89 @@
|
|
|
6676
7093
|
},
|
|
6677
7094
|
"type": "object"
|
|
6678
7095
|
},
|
|
7096
|
+
"FactionBalance": {
|
|
7097
|
+
"required": [
|
|
7098
|
+
"faction",
|
|
7099
|
+
"members"
|
|
7100
|
+
],
|
|
7101
|
+
"properties": {
|
|
7102
|
+
"faction": {
|
|
7103
|
+
"required": [
|
|
7104
|
+
"money",
|
|
7105
|
+
"points",
|
|
7106
|
+
"scope"
|
|
7107
|
+
],
|
|
7108
|
+
"properties": {
|
|
7109
|
+
"money": {
|
|
7110
|
+
"type": "integer",
|
|
7111
|
+
"format": "int64"
|
|
7112
|
+
},
|
|
7113
|
+
"points": {
|
|
7114
|
+
"type": "integer",
|
|
7115
|
+
"format": "int64"
|
|
7116
|
+
},
|
|
7117
|
+
"scope": {
|
|
7118
|
+
"type": "integer",
|
|
7119
|
+
"format": "int32"
|
|
7120
|
+
}
|
|
7121
|
+
},
|
|
7122
|
+
"type": "object"
|
|
7123
|
+
},
|
|
7124
|
+
"members": {
|
|
7125
|
+
"type": "array",
|
|
7126
|
+
"items": {
|
|
7127
|
+
"required": [
|
|
7128
|
+
"id",
|
|
7129
|
+
"username",
|
|
7130
|
+
"money",
|
|
7131
|
+
"points"
|
|
7132
|
+
],
|
|
7133
|
+
"properties": {
|
|
7134
|
+
"id": {
|
|
7135
|
+
"$ref": "#/components/schemas/UserId"
|
|
7136
|
+
},
|
|
7137
|
+
"username": {
|
|
7138
|
+
"type": "string"
|
|
7139
|
+
},
|
|
7140
|
+
"money": {
|
|
7141
|
+
"type": "integer",
|
|
7142
|
+
"format": "int64"
|
|
7143
|
+
},
|
|
7144
|
+
"points": {
|
|
7145
|
+
"type": "integer",
|
|
7146
|
+
"format": "int64"
|
|
7147
|
+
}
|
|
7148
|
+
},
|
|
7149
|
+
"type": "object"
|
|
7150
|
+
}
|
|
7151
|
+
}
|
|
7152
|
+
},
|
|
7153
|
+
"type": "object"
|
|
7154
|
+
},
|
|
7155
|
+
"FactionBalanceResponse": {
|
|
7156
|
+
"required": [
|
|
7157
|
+
"balance"
|
|
7158
|
+
],
|
|
7159
|
+
"properties": {
|
|
7160
|
+
"balance": {
|
|
7161
|
+
"$ref": "#/components/schemas/FactionBalance"
|
|
7162
|
+
}
|
|
7163
|
+
},
|
|
7164
|
+
"type": "object"
|
|
7165
|
+
},
|
|
6679
7166
|
"FactionSelectionName": {
|
|
6680
|
-
"description": "The following selections will fallback to API v1 and may change at any time: 'armor', 'boosters', 'caches', 'cesium', '
|
|
7167
|
+
"description": "The following selections will fallback to API v1 and may change at any time: 'armor', 'boosters', 'caches', 'cesium', 'crimeexp', 'drugs', 'medical', 'positions', 'reports', 'temporary', 'weapons'.",
|
|
6681
7168
|
"type": "string",
|
|
6682
7169
|
"enum": [
|
|
6683
7170
|
"applications",
|
|
6684
7171
|
"attacks",
|
|
6685
7172
|
"attacksfull",
|
|
7173
|
+
"balance",
|
|
6686
7174
|
"basic",
|
|
6687
7175
|
"chain",
|
|
6688
7176
|
"chainreport",
|
|
6689
7177
|
"chains",
|
|
7178
|
+
"contributors",
|
|
6690
7179
|
"crime",
|
|
6691
7180
|
"crimes",
|
|
6692
7181
|
"hof",
|
|
@@ -6697,24 +7186,21 @@
|
|
|
6697
7186
|
"rankedwarreport",
|
|
6698
7187
|
"revives",
|
|
6699
7188
|
"revivesfull",
|
|
7189
|
+
"stats",
|
|
6700
7190
|
"timestamp",
|
|
7191
|
+
"upgrades",
|
|
6701
7192
|
"wars",
|
|
6702
7193
|
"armor",
|
|
6703
7194
|
"boosters",
|
|
6704
7195
|
"caches",
|
|
6705
7196
|
"cesium",
|
|
6706
|
-
"contributors",
|
|
6707
7197
|
"crimeexp",
|
|
6708
|
-
"currency",
|
|
6709
|
-
"donations",
|
|
6710
7198
|
"drugs",
|
|
6711
7199
|
"medical",
|
|
6712
7200
|
"positions",
|
|
6713
7201
|
"reports",
|
|
6714
|
-
"stats",
|
|
6715
7202
|
"temporary",
|
|
6716
7203
|
"territory",
|
|
6717
|
-
"upgrades",
|
|
6718
7204
|
"weapons"
|
|
6719
7205
|
]
|
|
6720
7206
|
},
|
|
@@ -9279,8 +9765,109 @@
|
|
|
9279
9765
|
},
|
|
9280
9766
|
"type": "object"
|
|
9281
9767
|
},
|
|
9768
|
+
"TornFactionTreeBranch": {
|
|
9769
|
+
"required": [
|
|
9770
|
+
"id",
|
|
9771
|
+
"name",
|
|
9772
|
+
"upgrades"
|
|
9773
|
+
],
|
|
9774
|
+
"properties": {
|
|
9775
|
+
"id": {
|
|
9776
|
+
"$ref": "#/components/schemas/FactionBranchId"
|
|
9777
|
+
},
|
|
9778
|
+
"name": {
|
|
9779
|
+
"type": "string"
|
|
9780
|
+
},
|
|
9781
|
+
"upgrades": {
|
|
9782
|
+
"type": "array",
|
|
9783
|
+
"items": {
|
|
9784
|
+
"required": [
|
|
9785
|
+
"name",
|
|
9786
|
+
"level",
|
|
9787
|
+
"ability",
|
|
9788
|
+
"challenge",
|
|
9789
|
+
"cost"
|
|
9790
|
+
],
|
|
9791
|
+
"properties": {
|
|
9792
|
+
"name": {
|
|
9793
|
+
"type": "string"
|
|
9794
|
+
},
|
|
9795
|
+
"level": {
|
|
9796
|
+
"type": "integer",
|
|
9797
|
+
"format": "int32"
|
|
9798
|
+
},
|
|
9799
|
+
"ability": {
|
|
9800
|
+
"type": "string"
|
|
9801
|
+
},
|
|
9802
|
+
"cost": {
|
|
9803
|
+
"type": "integer",
|
|
9804
|
+
"format": "int32"
|
|
9805
|
+
},
|
|
9806
|
+
"challenge": {
|
|
9807
|
+
"oneOf": [
|
|
9808
|
+
{
|
|
9809
|
+
"required": [
|
|
9810
|
+
"description",
|
|
9811
|
+
"amount_required",
|
|
9812
|
+
"stat"
|
|
9813
|
+
],
|
|
9814
|
+
"properties": {
|
|
9815
|
+
"description": {
|
|
9816
|
+
"type": "string"
|
|
9817
|
+
},
|
|
9818
|
+
"amount_required": {
|
|
9819
|
+
"type": "integer",
|
|
9820
|
+
"format": "int64"
|
|
9821
|
+
},
|
|
9822
|
+
"stat": {
|
|
9823
|
+
"$ref": "#/components/schemas/FactionStatEnum"
|
|
9824
|
+
}
|
|
9825
|
+
},
|
|
9826
|
+
"type": "object"
|
|
9827
|
+
},
|
|
9828
|
+
{
|
|
9829
|
+
"type": "null"
|
|
9830
|
+
}
|
|
9831
|
+
]
|
|
9832
|
+
}
|
|
9833
|
+
},
|
|
9834
|
+
"type": "object"
|
|
9835
|
+
}
|
|
9836
|
+
}
|
|
9837
|
+
},
|
|
9838
|
+
"type": "object"
|
|
9839
|
+
},
|
|
9840
|
+
"TornFactionTree": {
|
|
9841
|
+
"required": [
|
|
9842
|
+
"name",
|
|
9843
|
+
"branches"
|
|
9844
|
+
],
|
|
9845
|
+
"properties": {
|
|
9846
|
+
"name": {
|
|
9847
|
+
"type": "string"
|
|
9848
|
+
},
|
|
9849
|
+
"branches": {
|
|
9850
|
+
"type": "array",
|
|
9851
|
+
"items": {
|
|
9852
|
+
"$ref": "#/components/schemas/TornFactionTreeBranch"
|
|
9853
|
+
}
|
|
9854
|
+
}
|
|
9855
|
+
},
|
|
9856
|
+
"type": "object"
|
|
9857
|
+
},
|
|
9858
|
+
"TornFactionTreeResponse": {
|
|
9859
|
+
"required": [
|
|
9860
|
+
"factionTree"
|
|
9861
|
+
],
|
|
9862
|
+
"properties": {
|
|
9863
|
+
"factionTree": {
|
|
9864
|
+
"$ref": "#/components/schemas/TornFactionTree"
|
|
9865
|
+
}
|
|
9866
|
+
},
|
|
9867
|
+
"type": "object"
|
|
9868
|
+
},
|
|
9282
9869
|
"TornSelectionName": {
|
|
9283
|
-
"description": "The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','dirtybombs','education','
|
|
9870
|
+
"description": "The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','dirtybombs','education','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','properties','rackets','raidreport','raids','rockpaperscissors','searchforcash','shoplifting','stats','stocks','territory','territorynames','territorywarreport','territorywars'.",
|
|
9284
9871
|
"type": "string",
|
|
9285
9872
|
"enum": [
|
|
9286
9873
|
"attacklog",
|
|
@@ -9288,6 +9875,7 @@
|
|
|
9288
9875
|
"calendar",
|
|
9289
9876
|
"crimes",
|
|
9290
9877
|
"factionHof",
|
|
9878
|
+
"factiontree",
|
|
9291
9879
|
"hof",
|
|
9292
9880
|
"itemammo",
|
|
9293
9881
|
"itemmods",
|
|
@@ -9304,7 +9892,6 @@
|
|
|
9304
9892
|
"competition",
|
|
9305
9893
|
"dirtybombs",
|
|
9306
9894
|
"education",
|
|
9307
|
-
"factiontree",
|
|
9308
9895
|
"gyms",
|
|
9309
9896
|
"honors",
|
|
9310
9897
|
"itemdetails",
|
|
@@ -14007,14 +14594,6 @@
|
|
|
14007
14594
|
{
|
|
14008
14595
|
"name": "Torn",
|
|
14009
14596
|
"description": "Part of Torn section"
|
|
14010
|
-
},
|
|
14011
|
-
{
|
|
14012
|
-
"name": "Stable",
|
|
14013
|
-
"description": "Stable selections are not likely to undergo significant changes."
|
|
14014
|
-
},
|
|
14015
|
-
{
|
|
14016
|
-
"name": "Unstable",
|
|
14017
|
-
"description": "Future updates may result in sudden or significant changes."
|
|
14018
14597
|
}
|
|
14019
14598
|
]
|
|
14020
14599
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate-types": "tsc && node build/index.js"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@scalar/openapi-types": "^0.
|
|
10
|
-
"@types/node": "^22.
|
|
9
|
+
"@scalar/openapi-types": "^0.2.0",
|
|
10
|
+
"@types/node": "^22.14.0",
|
|
11
11
|
"prettier": "^3.5.3",
|
|
12
12
|
"typeconv": "^2.3.1",
|
|
13
|
-
"typescript": "^5.8.
|
|
13
|
+
"typescript": "^5.8.3"
|
|
14
14
|
},
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"files": [
|