tornapi-typescript 1.10.2 → 1.11.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
@@ -4173,6 +4173,7 @@ export type FactionStatEnum =
4173
4173
  | "gymtrains"
4174
4174
  | "gymstrength"
4175
4175
  | "gymspeed"
4176
+ | "gymenergy"
4176
4177
  | "gymdefense"
4177
4178
  | "gymdexterity"
4178
4179
  | "candyused"
@@ -4547,6 +4548,10 @@ export type FactionCrimeUserOutcome =
4547
4548
 
4548
4549
  export type RaceId = number;
4549
4550
 
4551
+ export type PropertyTypeId = number;
4552
+
4553
+ export type PropertyId = number;
4554
+
4550
4555
  export type DirtyBombId = number;
4551
4556
 
4552
4557
  export type RaceTrackId = number;
@@ -4646,6 +4651,31 @@ export type FactionWarfareTypeEnum =
4646
4651
  | "chain"
4647
4652
  | "db";
4648
4653
 
4654
+ export type PropertyModificationEnum =
4655
+ | "Hot Tub"
4656
+ | "Sauna"
4657
+ | "Open Bar"
4658
+ | "Small Pool"
4659
+ | "Medium Pool"
4660
+ | "Large Pool"
4661
+ | "Small Vault"
4662
+ | "Medium Vault"
4663
+ | "Large Vault"
4664
+ | "Extra Large Vault"
4665
+ | "Medical Facility"
4666
+ | "Advanced Shooting Range"
4667
+ | "Airstrip"
4668
+ | "Private Yacht"
4669
+ | "Sufficient Interior Modification"
4670
+ | "Superior Interior Modification";
4671
+
4672
+ export type PropertyStaffEnum =
4673
+ | "Maid"
4674
+ | "Guard"
4675
+ | "Doctor"
4676
+ | "Pilot"
4677
+ | "Butler";
4678
+
4649
4679
  export type FactionCrimeStatusEnum =
4650
4680
  | "Recruiting"
4651
4681
  | "Planning"
@@ -5038,6 +5068,79 @@ export type SelectionCategoryEnum =
5038
5068
  | PersonalStatsCategoryEnum
5039
5069
  | RacingRaceTypeEnum;
5040
5070
 
5071
+ export interface BasicUser {
5072
+ id: UserId;
5073
+ name: string;
5074
+ }
5075
+
5076
+ export interface UserPropertyBasicDetails {
5077
+ id: PropertyId;
5078
+ owner: BasicUser;
5079
+ property: BasicProperty;
5080
+ happy: number;
5081
+ upkeep: {
5082
+ property: number;
5083
+ staff: number;
5084
+ };
5085
+ market_price: number;
5086
+ modifications: PropertyModificationEnum[];
5087
+ staff: {
5088
+ type: PropertyStaffEnum;
5089
+ amount: number;
5090
+ }[];
5091
+ }
5092
+
5093
+ export interface UserPropertyDetailsExtended extends UserPropertyBasicDetails {
5094
+ used_by: BasicUser[];
5095
+ status: "none" | "in_use";
5096
+ }
5097
+
5098
+ export interface UserPropertyDetails extends UserPropertyBasicDetails {
5099
+ used_by: BasicUser[];
5100
+ }
5101
+
5102
+ export interface UserPropertyDetailsExtendedRented
5103
+ extends UserPropertyBasicDetails {
5104
+ used_by: BasicUser[];
5105
+ status: "rented";
5106
+ cost: number;
5107
+ cost_per_day: number;
5108
+ rental_period: number;
5109
+ rental_period_remaining: number;
5110
+ }
5111
+
5112
+ export interface UserPropertyDetailsExtendedForRent
5113
+ extends UserPropertyBasicDetails {
5114
+ used_by: BasicUser[];
5115
+ status: "for_rent";
5116
+ cost: number;
5117
+ cost_per_day: number;
5118
+ rental_period: number;
5119
+ renter_asked?: BasicUser;
5120
+ }
5121
+
5122
+ export interface UserPropertyDetailsExtendedForSale
5123
+ extends UserPropertyBasicDetails {
5124
+ used_by: BasicUser[];
5125
+ status: "for_sale";
5126
+ cost: number;
5127
+ }
5128
+
5129
+ export interface UserPropertiesResponse {
5130
+ properties: {} & (
5131
+ | UserPropertyBasicDetails
5132
+ | UserPropertyDetailsExtended
5133
+ | UserPropertyDetailsExtendedRented
5134
+ | UserPropertyDetailsExtendedForRent
5135
+ | UserPropertyDetailsExtendedForSale
5136
+ );
5137
+ _metadata: RequestMetadataWithLinks;
5138
+ }
5139
+
5140
+ export interface UserPropertyResponse {
5141
+ property: UserPropertyDetails;
5142
+ }
5143
+
5041
5144
  export interface UserCurrentEducation {
5042
5145
  id: EducationId;
5043
5146
  until: number;
@@ -7228,6 +7331,45 @@ export interface KeyInfoResponse {
7228
7331
 
7229
7332
  export type KeySelectionName = string;
7230
7333
 
7334
+ export interface BasicProperty {
7335
+ id: PropertyTypeId;
7336
+ name: string;
7337
+ }
7338
+
7339
+ export interface MarketRentalDetails {
7340
+ listings: {
7341
+ happy: number;
7342
+ cost: number;
7343
+ cost_per_day: number;
7344
+ rental_period: number;
7345
+ market_price: number;
7346
+ upkeep: number;
7347
+ modifications: PropertyModificationEnum[];
7348
+ }[];
7349
+ property: BasicProperty;
7350
+ }
7351
+
7352
+ export interface MarketRentalsResponse {
7353
+ properties: MarketRentalDetails;
7354
+ _metadata: RequestMetadataWithLinks;
7355
+ }
7356
+
7357
+ export interface MarketPropertyDetails {
7358
+ listings: {
7359
+ happy: number;
7360
+ cost: number;
7361
+ market_price: number;
7362
+ upkeep: number;
7363
+ modifications: PropertyModificationEnum[];
7364
+ }[];
7365
+ property: BasicProperty;
7366
+ }
7367
+
7368
+ export interface MarketPropertiesResponse {
7369
+ properties: MarketPropertyDetails;
7370
+ _metadata: RequestMetadataWithLinks;
7371
+ }
7372
+
7231
7373
  export interface BazaarWeekly {
7232
7374
  busiest: BazaarWeeklyCustomers[];
7233
7375
  most_popular: BazaarTotalFavorites[];
@@ -7471,6 +7613,18 @@ export interface RacingLookupResponse {
7471
7613
  selections: RacingSelectionName[];
7472
7614
  }
7473
7615
 
7616
+ export interface TornProperties {
7617
+ properties?: {
7618
+ id: PropertyTypeId;
7619
+ name: string;
7620
+ cost: number;
7621
+ happy: number;
7622
+ upkeep: number;
7623
+ modifications: PropertyModificationEnum[];
7624
+ staff: PropertyStaffEnum[];
7625
+ }[];
7626
+ }
7627
+
7474
7628
  export interface TornEducationRewards {
7475
7629
  working_stats: {
7476
7630
  manual_labor: number | null;
@@ -7805,7 +7959,7 @@ export interface TornFactionTreeResponse {
7805
7959
  }
7806
7960
 
7807
7961
  /**
7808
- * The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','properties','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.
7962
+ * The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.
7809
7963
  * * The following selections are not available in API v2: 'dirtybombs','raidreport','raids', 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.
7810
7964
  */
7811
7965
  export type TornSelectionName = string;