tornapi-typescript 5.1.1 → 5.1.3
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 +10 -7
- package/dist/index.ts +11 -7
- package/dist/openapi.json +31 -12
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -974,7 +974,7 @@ export interface UserCrime {
|
|
|
974
974
|
miscellaneous: UserCrimeDetailsBootlegging | UserCrimeDetailsGraffiti | UserCrimeDetailsShoplifting | UserCrimeDetailsCardSkimming | UserCrimeDetailsHustling | UserCrimeDetailsCracking | UserCrimeDetailsScamming | null;
|
|
975
975
|
}
|
|
976
976
|
export interface UserRacesResponse {
|
|
977
|
-
races:
|
|
977
|
+
races: UserRaceDetails[];
|
|
978
978
|
_metadata: RequestMetadataWithLinks;
|
|
979
979
|
}
|
|
980
980
|
export interface UserRaceCarDetails extends RaceCar {
|
|
@@ -2125,11 +2125,11 @@ export interface FactionRaidsResponse {
|
|
|
2125
2125
|
raids: FactionRaidWarfare[];
|
|
2126
2126
|
_metadata: RequestMetadataWithLinks;
|
|
2127
2127
|
}
|
|
2128
|
-
export interface
|
|
2128
|
+
export interface AttacksResponse {
|
|
2129
2129
|
attacks: Attack[];
|
|
2130
2130
|
_metadata: RequestMetadataWithLinks;
|
|
2131
2131
|
}
|
|
2132
|
-
export interface
|
|
2132
|
+
export interface AttacksFullResponse {
|
|
2133
2133
|
attacks: AttackSimplified[];
|
|
2134
2134
|
_metadata: RequestMetadataWithLinks;
|
|
2135
2135
|
}
|
|
@@ -2796,6 +2796,9 @@ export interface RacingRaceDetails extends Race {
|
|
|
2796
2796
|
results: RacerDetails[];
|
|
2797
2797
|
is_official: boolean;
|
|
2798
2798
|
}
|
|
2799
|
+
export type UserRaceDetails = RacingRaceDetails & {
|
|
2800
|
+
skill_gain: number;
|
|
2801
|
+
};
|
|
2799
2802
|
export interface RacingRaceDetailsResponse {
|
|
2800
2803
|
race: RacingRaceDetails;
|
|
2801
2804
|
}
|
|
@@ -6500,11 +6503,11 @@ export interface UserV2 extends BaseSchema {
|
|
|
6500
6503
|
params: "timestamp";
|
|
6501
6504
|
};
|
|
6502
6505
|
attacks: {
|
|
6503
|
-
response:
|
|
6506
|
+
response: AttacksResponse;
|
|
6504
6507
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
|
6505
6508
|
};
|
|
6506
6509
|
attacksfull: {
|
|
6507
|
-
response:
|
|
6510
|
+
response: AttacksFullResponse;
|
|
6508
6511
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
|
6509
6512
|
};
|
|
6510
6513
|
bars: {
|
|
@@ -6732,11 +6735,11 @@ export interface FactionV2 extends BaseSchema {
|
|
|
6732
6735
|
params: "timestamp";
|
|
6733
6736
|
};
|
|
6734
6737
|
attacks: {
|
|
6735
|
-
response:
|
|
6738
|
+
response: AttacksResponse;
|
|
6736
6739
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
|
6737
6740
|
};
|
|
6738
6741
|
attacksfull: {
|
|
6739
|
-
response:
|
|
6742
|
+
response: AttacksFullResponse;
|
|
6740
6743
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
|
6741
6744
|
};
|
|
6742
6745
|
balance: {
|
package/dist/index.ts
CHANGED
|
@@ -6053,7 +6053,7 @@ export interface UserCrime {
|
|
|
6053
6053
|
}
|
|
6054
6054
|
|
|
6055
6055
|
export interface UserRacesResponse {
|
|
6056
|
-
races:
|
|
6056
|
+
races: UserRaceDetails[];
|
|
6057
6057
|
_metadata: RequestMetadataWithLinks;
|
|
6058
6058
|
}
|
|
6059
6059
|
|
|
@@ -7643,12 +7643,12 @@ export interface FactionRaidsResponse {
|
|
|
7643
7643
|
_metadata: RequestMetadataWithLinks;
|
|
7644
7644
|
}
|
|
7645
7645
|
|
|
7646
|
-
export interface
|
|
7646
|
+
export interface AttacksResponse {
|
|
7647
7647
|
attacks: Attack[];
|
|
7648
7648
|
_metadata: RequestMetadataWithLinks;
|
|
7649
7649
|
}
|
|
7650
7650
|
|
|
7651
|
-
export interface
|
|
7651
|
+
export interface AttacksFullResponse {
|
|
7652
7652
|
attacks: AttackSimplified[];
|
|
7653
7653
|
_metadata: RequestMetadataWithLinks;
|
|
7654
7654
|
}
|
|
@@ -8413,6 +8413,10 @@ export interface RacingRaceDetails extends Race {
|
|
|
8413
8413
|
is_official: boolean;
|
|
8414
8414
|
}
|
|
8415
8415
|
|
|
8416
|
+
export type UserRaceDetails = RacingRaceDetails & {
|
|
8417
|
+
skill_gain: number;
|
|
8418
|
+
};
|
|
8419
|
+
|
|
8416
8420
|
export interface RacingRaceDetailsResponse {
|
|
8417
8421
|
race: RacingRaceDetails;
|
|
8418
8422
|
}
|
|
@@ -12252,11 +12256,11 @@ export interface UserV2 extends BaseSchema {
|
|
|
12252
12256
|
params: "timestamp";
|
|
12253
12257
|
};
|
|
12254
12258
|
attacks: {
|
|
12255
|
-
response:
|
|
12259
|
+
response: AttacksResponse;
|
|
12256
12260
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
|
12257
12261
|
};
|
|
12258
12262
|
attacksfull: {
|
|
12259
|
-
response:
|
|
12263
|
+
response: AttacksFullResponse;
|
|
12260
12264
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
|
12261
12265
|
};
|
|
12262
12266
|
bars: {
|
|
@@ -12517,11 +12521,11 @@ export interface FactionV2 extends BaseSchema {
|
|
|
12517
12521
|
params: "timestamp";
|
|
12518
12522
|
};
|
|
12519
12523
|
attacks: {
|
|
12520
|
-
response:
|
|
12524
|
+
response: AttacksResponse;
|
|
12521
12525
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
|
12522
12526
|
};
|
|
12523
12527
|
attacksfull: {
|
|
12524
|
-
response:
|
|
12528
|
+
response: AttacksFullResponse;
|
|
12525
12529
|
params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
|
|
12526
12530
|
};
|
|
12527
12531
|
balance: {
|
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": "5.1.
|
|
6
|
+
"version": "5.1.3"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"content": {
|
|
92
92
|
"application/json": {
|
|
93
93
|
"schema": {
|
|
94
|
-
"$ref": "#/components/schemas/
|
|
94
|
+
"$ref": "#/components/schemas/AttacksResponse"
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"content": {
|
|
146
146
|
"application/json": {
|
|
147
147
|
"schema": {
|
|
148
|
-
"$ref": "#/components/schemas/
|
|
148
|
+
"$ref": "#/components/schemas/AttacksFullResponse"
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}
|
|
@@ -3508,7 +3508,7 @@
|
|
|
3508
3508
|
"$ref": "#/components/schemas/UserOrganizedCrimeResponse"
|
|
3509
3509
|
},
|
|
3510
3510
|
{
|
|
3511
|
-
"$ref": "#/components/schemas/
|
|
3511
|
+
"$ref": "#/components/schemas/AttacksResponse"
|
|
3512
3512
|
},
|
|
3513
3513
|
{
|
|
3514
3514
|
"$ref": "#/components/schemas/UserBarsResponse"
|
|
@@ -3529,7 +3529,7 @@
|
|
|
3529
3529
|
"$ref": "#/components/schemas/UserVirusResponse"
|
|
3530
3530
|
},
|
|
3531
3531
|
{
|
|
3532
|
-
"$ref": "#/components/schemas/
|
|
3532
|
+
"$ref": "#/components/schemas/AttacksFullResponse"
|
|
3533
3533
|
},
|
|
3534
3534
|
{
|
|
3535
3535
|
"$ref": "#/components/schemas/UserMoneyResponse"
|
|
@@ -3657,7 +3657,7 @@
|
|
|
3657
3657
|
"content": {
|
|
3658
3658
|
"application/json": {
|
|
3659
3659
|
"schema": {
|
|
3660
|
-
"$ref": "#/components/schemas/
|
|
3660
|
+
"$ref": "#/components/schemas/AttacksResponse"
|
|
3661
3661
|
}
|
|
3662
3662
|
}
|
|
3663
3663
|
}
|
|
@@ -3711,7 +3711,7 @@
|
|
|
3711
3711
|
"content": {
|
|
3712
3712
|
"application/json": {
|
|
3713
3713
|
"schema": {
|
|
3714
|
-
"$ref": "#/components/schemas/
|
|
3714
|
+
"$ref": "#/components/schemas/AttacksFullResponse"
|
|
3715
3715
|
}
|
|
3716
3716
|
}
|
|
3717
3717
|
}
|
|
@@ -5994,7 +5994,7 @@
|
|
|
5994
5994
|
"$ref": "#/components/schemas/FactionTerritoryWarsHistoryResponse"
|
|
5995
5995
|
},
|
|
5996
5996
|
{
|
|
5997
|
-
"$ref": "#/components/schemas/
|
|
5997
|
+
"$ref": "#/components/schemas/AttacksResponse"
|
|
5998
5998
|
},
|
|
5999
5999
|
{
|
|
6000
6000
|
"$ref": "#/components/schemas/FactionBalanceResponse"
|
|
@@ -6012,7 +6012,7 @@
|
|
|
6012
6012
|
"$ref": "#/components/schemas/RevivesFullResponse"
|
|
6013
6013
|
},
|
|
6014
6014
|
{
|
|
6015
|
-
"$ref": "#/components/schemas/
|
|
6015
|
+
"$ref": "#/components/schemas/AttacksFullResponse"
|
|
6016
6016
|
},
|
|
6017
6017
|
{
|
|
6018
6018
|
"$ref": "#/components/schemas/FactionApplicationsResponse"
|
|
@@ -18976,7 +18976,7 @@
|
|
|
18976
18976
|
"races": {
|
|
18977
18977
|
"type": "array",
|
|
18978
18978
|
"items": {
|
|
18979
|
-
"$ref": "#/components/schemas/
|
|
18979
|
+
"$ref": "#/components/schemas/UserRaceDetails"
|
|
18980
18980
|
}
|
|
18981
18981
|
},
|
|
18982
18982
|
"_metadata": {
|
|
@@ -24674,7 +24674,7 @@
|
|
|
24674
24674
|
},
|
|
24675
24675
|
"type": "object"
|
|
24676
24676
|
},
|
|
24677
|
-
"
|
|
24677
|
+
"AttacksResponse": {
|
|
24678
24678
|
"required": [
|
|
24679
24679
|
"attacks",
|
|
24680
24680
|
"_metadata"
|
|
@@ -24692,7 +24692,7 @@
|
|
|
24692
24692
|
},
|
|
24693
24693
|
"type": "object"
|
|
24694
24694
|
},
|
|
24695
|
-
"
|
|
24695
|
+
"AttacksFullResponse": {
|
|
24696
24696
|
"required": [
|
|
24697
24697
|
"attacks",
|
|
24698
24698
|
"_metadata"
|
|
@@ -28036,6 +28036,25 @@
|
|
|
28036
28036
|
}
|
|
28037
28037
|
]
|
|
28038
28038
|
},
|
|
28039
|
+
"UserRaceDetails": {
|
|
28040
|
+
"allOf": [
|
|
28041
|
+
{
|
|
28042
|
+
"$ref": "#/components/schemas/RacingRaceDetails"
|
|
28043
|
+
},
|
|
28044
|
+
{
|
|
28045
|
+
"required": [
|
|
28046
|
+
"skill_gain"
|
|
28047
|
+
],
|
|
28048
|
+
"properties": {
|
|
28049
|
+
"skill_gain": {
|
|
28050
|
+
"type": "number",
|
|
28051
|
+
"format": "float"
|
|
28052
|
+
}
|
|
28053
|
+
},
|
|
28054
|
+
"type": "object"
|
|
28055
|
+
}
|
|
28056
|
+
]
|
|
28057
|
+
},
|
|
28039
28058
|
"RacingRaceDetailsResponse": {
|
|
28040
28059
|
"required": [
|
|
28041
28060
|
"race"
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.1.
|
|
4
|
+
"version": "5.1.3",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate-types": "tsc && node build/index.js"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@scalar/openapi-types": "^0.5.3",
|
|
10
|
-
"@types/node": "^24.10.
|
|
10
|
+
"@types/node": "^24.10.4",
|
|
11
11
|
"prettier": "^3.7.4",
|
|
12
12
|
"typeconv": "^2.3.1",
|
|
13
13
|
"typescript": "^5.9.3"
|