← back to Homesonspec
feat(specs): meritage specs capture — monthly payment, was-price, move-in, floorplan, incentive, tour, MLS
41335772cb28165a8dfb94b8cf45b51ea7d1dbea · 2026-08-03 07:06:54 -0700 · Steve Abrams
Verified vs a real Discover home object. Respects the feed's hide_monthly_payment
flag (suppresses monthly when set). previous_mhdc_price captured as was-price
(price-drop signal). Added the extra fields to the DiscoverHome interface. tsc clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M collectors/meritage-homes/src/index.ts
Diff
commit 41335772cb28165a8dfb94b8cf45b51ea7d1dbea
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Aug 3 07:06:54 2026 -0700
feat(specs): meritage specs capture — monthly payment, was-price, move-in, floorplan, incentive, tour, MLS
Verified vs a real Discover home object. Respects the feed's hide_monthly_payment
flag (suppresses monthly when set). previous_mhdc_price captured as was-price
(price-drop signal). Added the extra fields to the DiscoverHome interface. tsc clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
collectors/meritage-homes/src/index.ts | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/collectors/meritage-homes/src/index.ts b/collectors/meritage-homes/src/index.ts
index aecf5d35..4610c2f9 100644
--- a/collectors/meritage-homes/src/index.ts
+++ b/collectors/meritage-homes/src/index.ts
@@ -91,6 +91,14 @@ interface DiscoverHome {
construction_stage?: string;
completion_estimated?: number; // unix seconds
url?: string;
+ // extra specs (verified on the Discover home object)
+ monthly_payment?: number | string;
+ hide_monthly_payment?: boolean | number | string;
+ previous_mhdc_price?: number | string;
+ movein_timeframe?: string;
+ incentive_available?: boolean | number | string;
+ virtual_tour_url?: string;
+ mls_number?: string;
}
/** Build the content_grid POST body for a given offset. */
@@ -280,6 +288,22 @@ export const meritageHomesAdapter: SourceAdapter = {
},
});
+ // Long-tail specs verified on the Discover home object. monthly_payment is
+ // suppressed when the feed's hide_monthly_payment flag is set (respect the source).
+ const bool = (v: unknown): boolean | null =>
+ typeof v === "boolean" ? v : v === "true" || v === 1 ? true : v === "false" || v === 0 ? false : null;
+ const hideMonthly = bool(h.hide_monthly_payment) === true;
+ const specs: Record<string, unknown> = {
+ monthlyPayment: hideMonthly ? null : posNum(h.monthly_payment),
+ previousPrice: posNum(h.previous_mhdc_price), // was-price (price-drop signal)
+ moveInTimeframe: str(h.movein_timeframe),
+ floorplanName: str(h.floorplan_name),
+ incentiveAvailable: bool(h.incentive_available),
+ virtualTour: str(h.virtual_tour_url),
+ mlsNumber: str(h.mls_number),
+ };
+ for (const k of Object.keys(specs)) if (specs[k] == null || specs[k] === false) delete specs[k];
+
records.push({
entityType: "inventory_home",
canonicalHints: {
@@ -312,6 +336,12 @@ export const meritageHomesAdapter: SourceAdapter = {
planName: fv(plan, plan, url),
// facts-only: image_urls exist in the feed but are intentionally dropped.
images: fv<string[]>([], null, url),
+ specs: fv(
+ Object.keys(specs).length ? specs : null,
+ null,
+ url,
+ "meritage extra specs (monthly payment, was-price, move-in, floorplan, incentive, tour, MLS)",
+ ),
},
});
}
← 1fd7b60a feat(specs): pulte specs capture — discount-off-list, monthl
·
back to Homesonspec
·
feat(specs): perry specs capture — discounted price, promoti 674ccf86 →