mirror of
https://github.com/Bunsly/HomeHarvest.git
synced 2026-03-04 19:44:29 -08:00
Add flexible listing_type support and last_update_date field
- Add support for str, list[str], and None as listing_type values - Single string: maintains backward compatibility (e.g., "for_sale") - List of strings: returns properties matching ANY status (OR logic) - None: returns all property types (omits status filter) - Expand ListingType enum with all GraphQL HomeStatus values - Add OFF_MARKET, NEW_COMMUNITY, OTHER, READY_TO_BUILD - Add last_update_date field support - Add to GraphQL query, Property model, and processors - Add to sort validation and datetime field sorting - Field description: "Last time the home was updated" - Update GraphQL query construction to support status arrays - Single type: status: for_sale - Multiple types: status: [for_sale, sold] - None: omit status parameter entirely - Update validation logic to handle new parameter types 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,10 @@ class ListingType(Enum):
|
||||
FOR_RENT = "FOR_RENT"
|
||||
PENDING = "PENDING"
|
||||
SOLD = "SOLD"
|
||||
OFF_MARKET = "OFF_MARKET"
|
||||
NEW_COMMUNITY = "NEW_COMMUNITY"
|
||||
OTHER = "OTHER"
|
||||
READY_TO_BUILD = "READY_TO_BUILD"
|
||||
|
||||
|
||||
class PropertyType(Enum):
|
||||
@@ -193,6 +197,7 @@ class Property(BaseModel):
|
||||
pending_date: datetime | None = Field(None, description="The date listing went into pending state")
|
||||
last_sold_date: datetime | None = Field(None, description="Last time the Home was sold")
|
||||
last_status_change_date: datetime | None = Field(None, description="Last time the status of the listing changed")
|
||||
last_update_date: datetime | None = Field(None, description="Last time the home was updated")
|
||||
prc_sqft: int | None = None
|
||||
new_construction: bool | None = Field(None, description="Search for new construction homes")
|
||||
hoa_fee: int | None = Field(None, description="Search for homes where HOA fee is known and falls within specified range")
|
||||
|
||||
Reference in New Issue
Block a user