Websites v4 docs v5.2.5
    Preparing search index...

    Hierarchy

    Index

    Properties

    Accessors

    agencyBranchLabel agencyBranchName agencyExternalDomain agencyId agencyLogo agencyName annualGroundRent annualServiceCharge annualServiceChargeTooltipContent availableOn availableOnTooltipContent bathrooms bedrooms branchId brochures buildingName childProperties childPropertiesBathroomsRange childPropertiesBedroomsRange childPropertiesPriceRange childPropertyTypes commonholdDetailsTooltipContent contactTelephone councilTaxBand councilTaxBandTooltipContent councilTaxExempt county createdAt depositTooltipContent description displayAddress epcCharts epcClassification facets featured features floorplans formattedPrice furnished furnishingTooltipContent groundRentPercentageIncrease groundRentReviewDate groundRentReviewPeriodTooltipContent groundRentReviewPeriodYears groundRentTooltipContent hasChildProperties id imageOnlyBrochures isAvailable lat leaseLengthTooltipContent lettingsPriceTooltipContent links lng mainPhoto metaAddress2 metaAddress3 metaOpenHouseEvents minimumTerm minimumTermTooltipContent orderedFutureEvents partFurnished photos postcode price priceQualifier priceQualifierFull priceValue priceWithoutQualifier primaryChannel propertyType ratesPayableTooltipContent receptionRooms roadName roomDetails salesPriceTooltipContent searchableKeyword securityDeposit sharedOwnership sharedOwnershipPercentage sharedOwnershipPercentageTooltipContent sharedOwnershipRent sharedOwnershipRentFrequency sharedOwnershipRentTooltipContent shortDescription sizeTooltipContent squareFeet squareFeetInternal squareMeters squareMetersInternal status tags tenure tenureTooltipContent tenureUnexpiredYears town unfurnished urlLabel urlLabelWithKeyword useClassTooltipContent videos virtualInteractiveTours virtualTours virtualVideoTours

    Methods

    Properties

    pagination: Pagination | undefined
    serializer: (model: any) => any

    serializer is a pure function that takes a model instance and returns a plain object that describes how to convert the model to JSON

    Accessors

    • get childPropertiesBathroomsRange(): { max: number; min: number } | null

      Returns { max: number; min: number } | null

    • get childPropertiesBedroomsRange(): { max: number; min: number } | null

      Returns { max: number; min: number } | null

    • get childPropertiesPriceRange(): { max: number; min: number } | null

      Returns { max: number; min: number } | null

    • get formattedPrice(): string | null

      The price formatted as a curreny string, eg £350,000 without a qualifier

      Returns string | null

    • get metaOpenHouseEvents(): { end: string; start: string }[] | null

      Returns { end: string; start: string }[] | null

    • get price(): string | null

      The property price as a string, including currency symbol and qualifiers e.g '£950 pcm' or 'Guide price £350,000'

      Returns string | null

    • get primaryChannel(): "sales" | "lettings" | null

      The channel will be either 'sales' or 'lettings'.

      Returns "sales" | "lettings" | null

    Methods

    • Retrieves a value from raw API data. Prioritises DBAPI data if available

      Parameters

      • key: string

      Returns any

    • Perform a search to find recently sold properties near this property

      Parameters

      • __namedParameters: { limit: number }

      Returns Promise<
          | { errors: { message: string }[]; results?: undefined }
          | {
              errors: ModelError[] | { message: string }[] | null;
              results: Property[];
          },
      >

        const { results, errors } = await property.recentlySold({
      limit: 12,
      });
    • Perform a similar properties search on a passed property and search params

      Parameters

      Returns Promise<{ errors: ModelError[] | null; results: Property[] }>

        const similarPropertiesParams = {
      percentage: 50,
      minBedrooms: 2,
      maxBedrooms: 5,
      };

      const { results, errors } = await property.similarProperties({
      params: similarPropertiesParams,
      limit: 12,
      });
    • Special method to define behaviour of JSON.stringify() on model instance

      Returns any

    • Parameters

      • __namedParameters: {
            branchSlug: string;
            page?: string | number;
            pageSize?: string | number;
            search: any;
        }

      Returns Promise<
          {
              errors: ModelError[]
              | null;
              pagination: Pagination | null;
              results: Property[];
          },
      >

    • Find all properties matching given search params.

      Parameters

      Returns Promise<
          {
              errors: ModelError[]
              | null;
              pagination: Pagination | null;
              results: Property[];
          },
      >

      const { results, errors, pagination } = await Property.findAll({ minBeds: 3, maxPrice: 500000 });
      
    • Find a single property by ID.

      Parameters

      • id: string | number

      Returns Promise<{ errors: ModelError[] | null; result: Property | null }>

      const { result, errors } = await Property.findById(12345);
      
    • Find multiple properties based on an array of ids.

      Parameters

      • params: string[]

      Returns Promise<{ properties: Property[] }>

      const results = await Property.findByIds([123,456,789]);
      
    • Perform a full property search after retrieving location data when required.

      Parameters

      • __namedParameters: {
            branch?: string;
            county?: string;
            fields?: string[];
            globalConfig?: GlobalConfig;
            location?: string;
            page?: string | number;
            pageSize?: string | number;
            postcode?: string;
            search: any;
        }

      Returns Promise<
          | {
              errors: ModelError[]
              | null;
              pagination: Pagination | null;
              results: Property[];
          }
          | { errors: { message: string }[]; pagination: null; results: never[] },
      >

      const { results, errors, pagination } = await Property.search({ search, location: 'taunton', county: 'somerset' });