tornapi-typescript 5.1.0 → 5.1.2

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 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: RacingRaceDetails[];
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 FactionAttacksResponse {
2128
+ export interface AttacksResponse {
2129
2129
  attacks: Attack[];
2130
2130
  _metadata: RequestMetadataWithLinks;
2131
2131
  }
2132
- export interface FactionAttacksFullResponse {
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: any;
2801
+ };
2799
2802
  export interface RacingRaceDetailsResponse {
2800
2803
  race: RacingRaceDetails;
2801
2804
  }
@@ -2807,6 +2810,9 @@ export type PropertySelectionName = string;
2807
2810
  export interface PropertyLookupResponse {
2808
2811
  selections: PropertySelectionName[];
2809
2812
  }
2813
+ export interface TornEliminationTeamLeader extends BasicUser {
2814
+ active: boolean;
2815
+ }
2810
2816
  export interface TornEliminationTeam {
2811
2817
  id: EliminationTeamId;
2812
2818
  name: string;
@@ -2818,7 +2824,7 @@ export interface TornEliminationTeam {
2818
2824
  losses: number;
2819
2825
  eliminated: boolean;
2820
2826
  eliminated_timestamp: number | null;
2821
- leaders: BasicUser[];
2827
+ leaders: TornEliminationTeamLeader[];
2822
2828
  }
2823
2829
  export interface TornEliminationTeamsResponse {
2824
2830
  elimination: TornEliminationTeam[];
@@ -6497,11 +6503,11 @@ export interface UserV2 extends BaseSchema {
6497
6503
  params: "timestamp";
6498
6504
  };
6499
6505
  attacks: {
6500
- response: FactionAttacksResponse;
6506
+ response: AttacksResponse;
6501
6507
  params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
6502
6508
  };
6503
6509
  attacksfull: {
6504
- response: FactionAttacksFullResponse;
6510
+ response: AttacksFullResponse;
6505
6511
  params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
6506
6512
  };
6507
6513
  bars: {
@@ -6729,11 +6735,11 @@ export interface FactionV2 extends BaseSchema {
6729
6735
  params: "timestamp";
6730
6736
  };
6731
6737
  attacks: {
6732
- response: FactionAttacksResponse;
6738
+ response: AttacksResponse;
6733
6739
  params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
6734
6740
  };
6735
6741
  attacksfull: {
6736
- response: FactionAttacksFullResponse;
6742
+ response: AttacksFullResponse;
6737
6743
  params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
6738
6744
  };
6739
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: RacingRaceDetails[];
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 FactionAttacksResponse {
7646
+ export interface AttacksResponse {
7647
7647
  attacks: Attack[];
7648
7648
  _metadata: RequestMetadataWithLinks;
7649
7649
  }
7650
7650
 
7651
- export interface FactionAttacksFullResponse {
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: any;
8418
+ };
8419
+
8416
8420
  export interface RacingRaceDetailsResponse {
8417
8421
  race: RacingRaceDetails;
8418
8422
  }
@@ -8429,6 +8433,10 @@ export interface PropertyLookupResponse {
8429
8433
  selections: PropertySelectionName[];
8430
8434
  }
8431
8435
 
8436
+ export interface TornEliminationTeamLeader extends BasicUser {
8437
+ active: boolean;
8438
+ }
8439
+
8432
8440
  export interface TornEliminationTeam {
8433
8441
  id: EliminationTeamId;
8434
8442
  name: string;
@@ -8440,7 +8448,7 @@ export interface TornEliminationTeam {
8440
8448
  losses: number;
8441
8449
  eliminated: boolean;
8442
8450
  eliminated_timestamp: number | null;
8443
- leaders: BasicUser[];
8451
+ leaders: TornEliminationTeamLeader[];
8444
8452
  }
8445
8453
 
8446
8454
  export interface TornEliminationTeamsResponse {
@@ -12248,11 +12256,11 @@ export interface UserV2 extends BaseSchema {
12248
12256
  params: "timestamp";
12249
12257
  };
12250
12258
  attacks: {
12251
- response: FactionAttacksResponse;
12259
+ response: AttacksResponse;
12252
12260
  params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
12253
12261
  };
12254
12262
  attacksfull: {
12255
- response: FactionAttacksFullResponse;
12263
+ response: AttacksFullResponse;
12256
12264
  params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
12257
12265
  };
12258
12266
  bars: {
@@ -12513,11 +12521,11 @@ export interface FactionV2 extends BaseSchema {
12513
12521
  params: "timestamp";
12514
12522
  };
12515
12523
  attacks: {
12516
- response: FactionAttacksResponse;
12524
+ response: AttacksResponse;
12517
12525
  params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
12518
12526
  };
12519
12527
  attacksfull: {
12520
- response: FactionAttacksFullResponse;
12528
+ response: AttacksFullResponse;
12521
12529
  params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
12522
12530
  };
12523
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.0"
6
+ "version": "5.1.2"
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/FactionAttacksResponse"
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/FactionAttacksFullResponse"
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/FactionAttacksResponse"
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/FactionAttacksFullResponse"
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/FactionAttacksResponse"
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/FactionAttacksFullResponse"
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/FactionAttacksResponse"
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/FactionAttacksFullResponse"
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/RacingRaceDetails"
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
- "FactionAttacksResponse": {
24677
+ "AttacksResponse": {
24678
24678
  "required": [
24679
24679
  "attacks",
24680
24680
  "_metadata"
@@ -24692,7 +24692,7 @@
24692
24692
  },
24693
24693
  "type": "object"
24694
24694
  },
24695
- "FactionAttacksFullResponse": {
24695
+ "AttacksFullResponse": {
24696
24696
  "required": [
24697
24697
  "attacks",
24698
24698
  "_metadata"
@@ -28036,6 +28036,22 @@
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
+ },
28051
+ "type": "object"
28052
+ }
28053
+ ]
28054
+ },
28039
28055
  "RacingRaceDetailsResponse": {
28040
28056
  "required": [
28041
28057
  "race"
@@ -28110,6 +28126,24 @@
28110
28126
  },
28111
28127
  "type": "object"
28112
28128
  },
28129
+ "TornEliminationTeamLeader": {
28130
+ "allOf": [
28131
+ {
28132
+ "$ref": "#/components/schemas/BasicUser"
28133
+ },
28134
+ {
28135
+ "required": [
28136
+ "active"
28137
+ ],
28138
+ "properties": {
28139
+ "active": {
28140
+ "type": "boolean"
28141
+ }
28142
+ },
28143
+ "type": "object"
28144
+ }
28145
+ ]
28146
+ },
28113
28147
  "TornEliminationTeam": {
28114
28148
  "required": [
28115
28149
  "id",
@@ -28172,7 +28206,7 @@
28172
28206
  "leaders": {
28173
28207
  "type": "array",
28174
28208
  "items": {
28175
- "$ref": "#/components/schemas/BasicUser"
28209
+ "$ref": "#/components/schemas/TornEliminationTeamLeader"
28176
28210
  }
28177
28211
  }
28178
28212
  },
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "5.1.0",
4
+ "version": "5.1.2",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
- "@scalar/openapi-types": "^0.5.2",
10
- "@types/node": "^24.10.2",
9
+ "@scalar/openapi-types": "^0.5.3",
10
+ "@types/node": "^24.10.4",
11
11
  "prettier": "^3.7.4",
12
12
  "typeconv": "^2.3.1",
13
13
  "typescript": "^5.9.3"