docs
    re-site-kit: Types
    v0.6.0.md

    Types

    Every type the package exports, with its fields. Data types come from the package root; each component's props type is exported next to the component.

    import type {
      RealEstateListing,
      SearchListingsOptions,
      ListingSearchResult,
      ListingPaginationInfo,
    } from '@sonordev/re-site-kit'
    import type { ListingGalleryProps } from '@sonordev/re-site-kit/client'
    import type { RealEstateMcpOptions } from '@sonordev/re-site-kit/mcp'

    RealEstateListing

    One listing, in the same shape whichever serve mode your project uses. Most fields are nullable: feeds don't fill everything, and listings entered by hand fill only some of it.

    Identity

    FieldTypeWhat it is
    idstringSonor's id for the listing. Stable, so use it as a React key.
    sitestringThe sub-site host on a multi-site project.
    sourcestringWhere the listing came from: the MLS feed, or entered by hand.
    source_listing_idstring | nullThe MLS number.
    source_urlstring | nullThe listing's page at its source.
    slugstring | nullThe listing's URL slug on your site.

    Status

    FieldTypeWhat it is
    statusListingStatusactive, pending, sold, expired or withdrawn.
    typeListingTypesale, rent or lease.
    listing_datestring | nullWhen it was listed.
    days_on_marketnumber | nullDays on market.
    featuredbooleanMarked as featured.
    tagsstring[] | nullTags.

    Location

    FieldType
    addressstring
    unit_numberstring | null
    city, state, zip, county, countrystring | null
    neighborhoodstring | null
    building_namestring | null
    latitude, longitudenumber | null
    buildingListingBuildingRef | null (optional): the building Sonor matched it to. See Buildings.

    The property

    FieldType
    property_typePropertyType | null
    year_builtnumber | null
    square_feet, lot_size_sqftnumber | null
    bedrooms, bathrooms, full_bathrooms, half_bathroomsnumber | null
    garage_spaces, stories, floor_levelnumber | null
    featuresstring[] | null

    Price and fees

    FieldTypeWhat it is
    pricenumber | nullList price.
    price_displaystring | nullThe feed's own formatted price, when it has one. formatPrice prefers it.
    price_per_sqftnumber | nullPrice per square foot.
    currencystring | nullCurrency code. Treated as USD when missing.
    hoa_feenumber | nullHOA fee, per hoa_frequency.
    hoa_frequencystring | nullHow often the fee is due, e.g. "Monthly" or "Quarterly". See monthlyHoa.
    hoa_includesstring[] | nullWhat the HOA fee covers.
    building_amenitiesstring[] | nullShared amenities.
    pets_allowedboolean | nullWhether pets are allowed, when the listing says.
    pet_restrictionsstring | nullPet rules.

    Media and copy

    FieldType
    imagesstring[] | null
    virtual_tour_url, video_url, floor_plan_urlstring | null
    description, remarks_publicstring | null
    seo_title, seo_descriptionstring | null (used by listingMetadata when set)

    Listing agent and brokerage

    FieldType
    listing_agent_name, listing_agent_email, listing_agent_phonestring | null
    listing_office_namestring | null (the listing brokerage, for IDX credit)

    Other

    FieldTypeWhat it is
    open_housesListingOpenHouse[] | null (optional)Upcoming open houses. Present on a single listing from a project in live serve mode.
    created_at, updated_atstringISO 8601 timestamps. IdxAttribution shows updated_at.

    Small types

    type ListingStatus = 'active' | 'pending' | 'sold' | 'expired' | 'withdrawn'
    type ListingType = 'sale' | 'rent' | 'lease'
    type PropertyType =
      | 'single_family'
      | 'condo'
      | 'townhouse'
      | 'multi_family'
      | 'land'
      | 'commercial'
      | 'other'
    
    interface ListingOpenHouse {
      date: string | null
      start_time: string | null
      end_time: string | null
      comments: string | null
    }
    
    interface ListingBuildingRef {
      slug: string
      name: string
      url: string | null
    }
    TypeWhat it is
    SearchListingsOptionssearchListings' options: site, status, type, city, zip, neighborhood, minPrice, maxPrice, bedsMin, bathsMin, propertyType, building, q, sort ('price_asc' | 'price_desc' | 'newest' | 'updated'), page, limit. All optional. See Search and filters.
    ListingSearchResult{ listings: RealEstateListing[]; pagination: ListingPaginationInfo }
    ListingPaginationInfo{ page: number; page_size: number; total: number | null; total_pages: number | null }. It's named ListingPagination in the source; the root export renames it so it doesn't clash with the ListingPagination component.
    GetListingsOptionsgetListings' options: site, status, type, limit, offset. All optional.

    Hot properties

    TypeWhat it is
    GetHotListingsOptions{ site?: string; window?: string; limit?: number }
    HotListingEntry{ listing: RealEstateListing; views: number; unique_viewers: number; prior_views: number; trend_pct: number | null; last_viewed_at: string | null }
    HotListingsResult{ window_hours: number; listings: HotListingEntry[] }, the API's raw response. getHotListings returns just the listings array.

    See Hot properties.

    Buildings and stats

    TypeWhat it is
    BuildingRegistryEntryOne building in your registry: slug and name required; id, aliases, addresses, city, state, zip, latitude, longitude, radius_m, url optional. See the registry.
    BuildingSummary{ slug: string; name: string; url: string | null; external_id: string | null; active_count: number; price_min: number | null; price_max: number | null }
    ListingStatsWhat summarizeListings returns: count, priceMin, priceMax, medianPrice, medianPricePerSqft, medianSqft, medianMonthlyHoa, medianDaysOnMarket, bedsMin, bedsMax, petFriendlyShare. See Market snapshot.

    JSON-LD

    TypeWhat it is
    ListingJsonLdOptions{ url?: string; siteName?: string }, for buildListingJsonLd and ListingSchema.

    Component props

    TypeImport fromComponent
    ListingCardProps@sonordev/re-site-kitListingCard
    ListingGridProps@sonordev/re-site-kitListingGrid
    ListingDetailProps@sonordev/re-site-kitListingDetail
    ListingSchemaProps@sonordev/re-site-kitListingSchema
    IdxAttributionProps@sonordev/re-site-kitIdxAttribution
    ListingFiltersProps@sonordev/re-site-kitListingFilters
    ListingPaginationProps@sonordev/re-site-kitListingPagination
    ListingGalleryProps@sonordev/re-site-kit/clientListingGallery
    ListingInquiryFormProps@sonordev/re-site-kit/clientListingInquiryForm
    ListingViewTrackerProps@sonordev/re-site-kit/clientListingViewTracker

    MCP

    TypeImport fromWhat it is
    RealEstateMcpOptions@sonordev/re-site-kit/mcpThe options for realEstateMcpTools and realEstateMcpServerInfo. See MCP tools.