tornapi-typescript 5.2.2 → 5.3.0

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
@@ -39,6 +39,7 @@ export type RaceStatusEnum = "open" | "in_progress" | "finished";
39
39
  export type TornHofCategory = "level" | "busts" | "rank" | "traveltime" | "workstats" | "networth" | "revives" | "defends" | "offences" | "attacks" | "awards" | "racingwins" | "racingpoints" | "racingskill";
40
40
  export type TornFactionHofCategory = "respect" | "chains" | "rank";
41
41
  export type TornOrganizedCrimePositionId = "P1" | "P2" | "P3" | "P4" | "P5" | "P6";
42
+ export type TornOrganizedCrimePositionIdDeprecated = TornOrganizedCrimePositionId;
42
43
  export type FactionTerritoryWarResultEnum = "success_assault" | "fail_assault" | "end_with_nap" | "end_with_destroy_attack" | "end_with_destroy_defense" | "end_with_peace_treaty";
43
44
  export type FactionAttackResult = "None" | "Attacked" | "Mugged" | "Hospitalized" | "Arrested" | "Looted" | "Lost" | "Stalemate" | "Assist" | "Escape" | "Timeout" | "Special" | "Bounty" | "Interrupted";
44
45
  export type RaceCarUpgradeCategory = "Aerodynamics" | "Brakes" | "Engine" | "Exhaust and Induction" | "Fuel" | "Safety" | "Suspension" | "Transmission" | "Weight Reduction" | "Wheels and Tyres";
@@ -483,6 +484,10 @@ export interface ErrorCategorySelectionUnavailableForInteractionLogs {
483
484
  error: string;
484
485
  }
485
486
  export type ApiError = ErrorUnknown | ErrorKeyEmpty | ErrorIncorrectKey | ErrorWrongType | ErrorWrongFields | ErrorTooManyRequests | ErrorIncorrectId | ErrorIncorrectIdEntityRelation | ErrorIpBlocked | ErrorApiDisabled | ErrorKeyOwnerInFederalJail | ErrorKeyChangeCooldown | ErrorKeyReadError | ErrorKeyTemporaryDisabled | ErrorDailyReadLimitReached | ErrorLogUnavailable | ErrorAccessLevelTooLow | ErrorBackendError | ErrorApiKeyPaused | ErrorMustMigrateToCrimesV2 | ErrorRaceNotFinished | ErrorIncorrectCategory | ErrorOnlyAvailableInApiV1 | ErrorOnlyAvailableInApiV2 | ErrorClosedTemporarily | ErrorInvalidStatRequested | ErrorOnlyCategoryOrStatsAllowed | ErrorMustMigrateToOrganizedCrimesV2 | ErrorIncorrectLogId | ErrorCategorySelectionUnavailableForInteractionLogs;
487
+ export interface UserOrganizedCrimesResponse {
488
+ organizedcrimes?: FactionCrime[];
489
+ _metadata: RequestMetadataWithLinks;
490
+ }
486
491
  export type UserEquipment = TornItemDetails & {
487
492
  slot: number;
488
493
  };
@@ -1170,6 +1175,7 @@ export interface UserCalendarResponse {
1170
1175
  }
1171
1176
  export interface UserBountiesResponse {
1172
1177
  bounties: Bounty[];
1178
+ bounties_timestamp: number;
1173
1179
  }
1174
1180
  export interface UserJobRanks {
1175
1181
  army: JobPositionArmyEnum;
@@ -1854,6 +1860,11 @@ export interface FactionRaidReport {
1854
1860
  aggressor: FactionRaidReportFaction;
1855
1861
  defender: FactionRaidReportFaction;
1856
1862
  }
1863
+ export interface FactionSlotPositionInfo {
1864
+ id: TornOrganizedCrimePositionId;
1865
+ label: string;
1866
+ number: number;
1867
+ }
1857
1868
  export interface FactionRaidReportFaction {
1858
1869
  id: FactionId;
1859
1870
  name: string;
@@ -2405,8 +2416,10 @@ export interface FactionCrimeReward {
2405
2416
  }
2406
2417
  export interface FactionCrimeSlot {
2407
2418
  position: string;
2408
- position_id: TornOrganizedCrimePositionId;
2409
- position_number: number;
2419
+ position_info: FactionSlotPositionInfo;
2420
+ position_id?: TornOrganizedCrimePositionIdDeprecated;
2421
+ /** This field is now available in 'position_info' object as 'number' field.<br>This field will be removed on 1st of June 2026. */
2422
+ position_number?: number;
2410
2423
  item_requirement: {
2411
2424
  id: ItemId;
2412
2425
  /** Shows if the item is reusable or consumed during the crime.<br><b>Important note: There may be alternative paths which won't consume the item, even if the item is non-reusable.</b> */
@@ -2709,6 +2722,7 @@ export interface MarketRentalDetails {
2709
2722
  }
2710
2723
  export interface MarketRentalsResponse {
2711
2724
  rentals: MarketRentalDetails;
2725
+ rentals_timestamp: number;
2712
2726
  _metadata: RequestMetadataWithLinks;
2713
2727
  }
2714
2728
  export interface MarketPropertyDetails {
@@ -2723,6 +2737,7 @@ export interface MarketPropertyDetails {
2723
2737
  }
2724
2738
  export interface MarketPropertiesResponse {
2725
2739
  properties: MarketPropertyDetails;
2740
+ properties_timestamp: number;
2726
2741
  _metadata: RequestMetadataWithLinks;
2727
2742
  }
2728
2743
  export interface BazaarWeekly {
@@ -3055,7 +3070,8 @@ export interface TornOrganizedCrimeScope {
3055
3070
  return: number;
3056
3071
  }
3057
3072
  export interface TornOrganizedCrimeSlot {
3058
- id: TornOrganizedCrimePositionId;
3073
+ id?: TornOrganizedCrimePositionIdDeprecated;
3074
+ position_info: FactionSlotPositionInfo;
3059
3075
  name: string;
3060
3076
  required_item: TornOrganizedCrimeRequiredItem | null;
3061
3077
  }
@@ -3267,6 +3283,7 @@ export interface AttackLogResponse {
3267
3283
  }
3268
3284
  export interface TornBountiesResponse {
3269
3285
  bounties: Bounty[];
3286
+ bounties_timestamp: number;
3270
3287
  _metadata: RequestMetadataWithLinks;
3271
3288
  }
3272
3289
  export interface TornItemAmmo {
@@ -6801,6 +6818,10 @@ export interface UserV2 extends BaseSchema {
6801
6818
  response: UserOrganizedCrimeResponse;
6802
6819
  params: "timestamp";
6803
6820
  };
6821
+ organizedcrimes: {
6822
+ response: UserOrganizedCrimesResponse;
6823
+ params: "timestamp";
6824
+ };
6804
6825
  personalstats: {
6805
6826
  response: UserPersonalStatsResponse;
6806
6827
  params: "cat" | "stat" | "timestamp";
@@ -7278,7 +7299,12 @@ export declare enum TornApiError {
7278
7299
  INCORRECT_CATEGORY = 21,
7279
7300
  SELECTION_ONLY_AVAILABLE_API_V1 = 22,
7280
7301
  SELECTION_ONLY_AVAILABLE_API_V2 = 23,
7281
- CLOSED_TEMPORARILY = 24
7302
+ CLOSED_TEMPORARILY = 24,
7303
+ INVALID_STAT_REQUESTED = 25,
7304
+ ONLY_CATEGORY_OR_STATS_CAN = 26,
7305
+ MUST_BE_MIGRATED_TO_ORGANIZED = 27,
7306
+ INCORRECT_LOG_ID = 28,
7307
+ CATEGORY_SELECTION_NOT_AVAILABLE_FOR = 29
7282
7308
  }
7283
7309
  export type SectionV1 = keyof SectionsV1Map;
7284
7310
  export type SectionV2 = keyof SectionsV2Map;
package/dist/index.js CHANGED
@@ -33,6 +33,11 @@ export var TornApiError;
33
33
  TornApiError[TornApiError["SELECTION_ONLY_AVAILABLE_API_V1"] = 22] = "SELECTION_ONLY_AVAILABLE_API_V1";
34
34
  TornApiError[TornApiError["SELECTION_ONLY_AVAILABLE_API_V2"] = 23] = "SELECTION_ONLY_AVAILABLE_API_V2";
35
35
  TornApiError[TornApiError["CLOSED_TEMPORARILY"] = 24] = "CLOSED_TEMPORARILY";
36
+ TornApiError[TornApiError["INVALID_STAT_REQUESTED"] = 25] = "INVALID_STAT_REQUESTED";
37
+ TornApiError[TornApiError["ONLY_CATEGORY_OR_STATS_CAN"] = 26] = "ONLY_CATEGORY_OR_STATS_CAN";
38
+ TornApiError[TornApiError["MUST_BE_MIGRATED_TO_ORGANIZED"] = 27] = "MUST_BE_MIGRATED_TO_ORGANIZED";
39
+ TornApiError[TornApiError["INCORRECT_LOG_ID"] = 28] = "INCORRECT_LOG_ID";
40
+ TornApiError[TornApiError["CATEGORY_SELECTION_NOT_AVAILABLE_FOR"] = 29] = "CATEGORY_SELECTION_NOT_AVAILABLE_FOR";
36
41
  })(TornApiError || (TornApiError = {}));
37
42
  export class HTTPClient {
38
43
  canAbort() {
package/dist/index.ts CHANGED
@@ -4484,6 +4484,9 @@ export type TornOrganizedCrimePositionId =
4484
4484
  | "P5"
4485
4485
  | "P6";
4486
4486
 
4487
+ export type TornOrganizedCrimePositionIdDeprecated =
4488
+ TornOrganizedCrimePositionId;
4489
+
4487
4490
  export type FactionTerritoryWarResultEnum =
4488
4491
  | "success_assault"
4489
4492
  | "fail_assault"
@@ -5509,6 +5512,11 @@ export type ApiError =
5509
5512
  | ErrorIncorrectLogId
5510
5513
  | ErrorCategorySelectionUnavailableForInteractionLogs;
5511
5514
 
5515
+ export interface UserOrganizedCrimesResponse {
5516
+ organizedcrimes?: FactionCrime[];
5517
+ _metadata: RequestMetadataWithLinks;
5518
+ }
5519
+
5512
5520
  export type UserEquipment = TornItemDetails & {
5513
5521
  slot: number;
5514
5522
  };
@@ -6326,6 +6334,7 @@ export interface UserCalendarResponse {
6326
6334
 
6327
6335
  export interface UserBountiesResponse {
6328
6336
  bounties: Bounty[];
6337
+ bounties_timestamp: number;
6329
6338
  }
6330
6339
 
6331
6340
  export interface UserJobRanks {
@@ -7372,6 +7381,12 @@ export interface FactionRaidReport {
7372
7381
  defender: FactionRaidReportFaction;
7373
7382
  }
7374
7383
 
7384
+ export interface FactionSlotPositionInfo {
7385
+ id: TornOrganizedCrimePositionId;
7386
+ label: string;
7387
+ number: number;
7388
+ }
7389
+
7375
7390
  export interface FactionRaidReportFaction {
7376
7391
  id: FactionId;
7377
7392
  name: string;
@@ -8006,8 +8021,10 @@ export interface FactionCrimeReward {
8006
8021
 
8007
8022
  export interface FactionCrimeSlot {
8008
8023
  position: string;
8009
- position_id: TornOrganizedCrimePositionId;
8010
- position_number: number;
8024
+ position_info: FactionSlotPositionInfo;
8025
+ position_id?: TornOrganizedCrimePositionIdDeprecated;
8026
+ /** This field is now available in 'position_info' object as 'number' field.<br>This field will be removed on 1st of June 2026. */
8027
+ position_number?: number;
8011
8028
  item_requirement: {
8012
8029
  id: ItemId;
8013
8030
  /** Shows if the item is reusable or consumed during the crime.<br><b>Important note: There may be alternative paths which won't consume the item, even if the item is non-reusable.</b> */
@@ -8352,6 +8369,7 @@ export interface MarketRentalDetails {
8352
8369
 
8353
8370
  export interface MarketRentalsResponse {
8354
8371
  rentals: MarketRentalDetails;
8372
+ rentals_timestamp: number;
8355
8373
  _metadata: RequestMetadataWithLinks;
8356
8374
  }
8357
8375
 
@@ -8368,6 +8386,7 @@ export interface MarketPropertyDetails {
8368
8386
 
8369
8387
  export interface MarketPropertiesResponse {
8370
8388
  properties: MarketPropertyDetails;
8389
+ properties_timestamp: number;
8371
8390
  _metadata: RequestMetadataWithLinks;
8372
8391
  }
8373
8392
 
@@ -8760,7 +8779,8 @@ export interface TornOrganizedCrimeScope {
8760
8779
  }
8761
8780
 
8762
8781
  export interface TornOrganizedCrimeSlot {
8763
- id: TornOrganizedCrimePositionId;
8782
+ id?: TornOrganizedCrimePositionIdDeprecated;
8783
+ position_info: FactionSlotPositionInfo;
8764
8784
  name: string;
8765
8785
  required_item: TornOrganizedCrimeRequiredItem | null;
8766
8786
  }
@@ -9009,6 +9029,7 @@ export interface AttackLogResponse {
9009
9029
 
9010
9030
  export interface TornBountiesResponse {
9011
9031
  bounties: Bounty[];
9032
+ bounties_timestamp: number;
9012
9033
  _metadata: RequestMetadataWithLinks;
9013
9034
  }
9014
9035
 
@@ -12638,6 +12659,10 @@ export interface UserV2 extends BaseSchema {
12638
12659
  response: UserOrganizedCrimeResponse;
12639
12660
  params: "timestamp";
12640
12661
  };
12662
+ organizedcrimes: {
12663
+ response: UserOrganizedCrimesResponse;
12664
+ params: "timestamp";
12665
+ };
12641
12666
  personalstats: {
12642
12667
  response: UserPersonalStatsResponse;
12643
12668
  params: "cat" | "stat" | "timestamp";
@@ -13187,6 +13212,11 @@ export enum TornApiError {
13187
13212
  SELECTION_ONLY_AVAILABLE_API_V1 = 22,
13188
13213
  SELECTION_ONLY_AVAILABLE_API_V2 = 23,
13189
13214
  CLOSED_TEMPORARILY = 24,
13215
+ INVALID_STAT_REQUESTED = 25,
13216
+ ONLY_CATEGORY_OR_STATS_CAN = 26,
13217
+ MUST_BE_MIGRATED_TO_ORGANIZED = 27,
13218
+ INCORRECT_LOG_ID = 28,
13219
+ CATEGORY_SELECTION_NOT_AVAILABLE_FOR = 29,
13190
13220
  }
13191
13221
 
13192
13222
  export type SectionV1 = keyof SectionsV1Map;