@garagem-ai/site-sdk 0.4.10 → 0.4.11
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/README.md +17 -16
- package/dist/index.d.mts +86 -5
- package/dist/index.d.ts +86 -5
- package/dist/index.js +283 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +273 -2
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1 -1
- package/dist/react.mjs.map +1 -1
- package/dist/{search-engine-t3SBrLHS.d.mts → search-engine-B83s_fVd.d.mts} +9 -2
- package/dist/{search-engine-t3SBrLHS.d.ts → search-engine-B83s_fVd.d.ts} +9 -2
- package/package.json +1 -1
- package/src/index.ts +19 -0
- package/src/listing-detail.ts +357 -0
- package/src/react/styles/search-chrome-css.generated.ts +1 -1
- package/src/studio-contract.ts +9 -2
- package/src/types.ts +8 -1
package/README.md
CHANGED
|
@@ -54,23 +54,24 @@ raw escape hatch when you need full control.
|
|
|
54
54
|
|
|
55
55
|
### Friendly layer (recommended for most use cases)
|
|
56
56
|
|
|
57
|
-
| API | Description
|
|
58
|
-
| ------------------------------------------------------------- |
|
|
59
|
-
| `getListings({ siteId, filters?, next? })` | Paginated listings for a site, with simple `filters` (`city`, `businessType`, `propertyType`, `neighborhood`, `minPrice`, `maxPrice`, `limit`, `offset`)
|
|
60
|
-
| `getListing({ siteId, listingId, next? })` | Full detail of a single listing
|
|
61
|
-
| `getSimilarListings({ siteId, listingId, limit?, next? })` | Similar listings carousel (same card shape as `getListings`)
|
|
62
|
-
| `getSite({ siteId? \| domain?, next? })` | Public site profile (returns `null` if unknown)
|
|
63
|
-
| `getCmsCollections({ siteId })` | List CMS collections
|
|
64
|
-
| `getCmsCollection({ siteId, slug })` | One CMS collection schema
|
|
65
|
-
| `getCmsEntries({ siteId, collection, limit?, offset? })` | Published CMS entries only
|
|
66
|
-
| `getCmsEntry({ siteId, collection, slug })` | One published CMS entry
|
|
67
|
-
| `getSearchUi({ siteId, next? })` | Tenant search schema (filters, slugs)
|
|
68
|
-
| `getLeadUi({ siteId, next? })` | Visit-default lead dialog schema (weekday hours, Sat/Sun flags)
|
|
69
|
-
| `submitVisitLead({ siteId, listingId, … })` | POST a visit lead (`listing.id` UUID; civil `visitDate` or `Date`/ISO instant normalized in the schedule timezone)
|
|
70
|
-
| `submitContactLead({ siteId, listingId, … })` | POST a contact lead (no date/time)
|
|
71
|
-
| `slotsForDate` / `normalizeVisitDate` / `expandVisitSchedule` | Pure schedule helpers (`America/Sao_Paulo`, default Mon–Fri 06:00–22:00)
|
|
57
|
+
| API | Description |
|
|
58
|
+
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
+
| `getListings({ siteId, filters?, next? })` | Paginated listings for a site, with simple `filters` (`city`, `businessType`, `propertyType`, `neighborhood`, `minPrice`, `maxPrice`, `limit`, `offset`) |
|
|
60
|
+
| `getListing({ siteId, listingId, next? })` | Full detail of a single listing |
|
|
61
|
+
| `getSimilarListings({ siteId, listingId, limit?, next? })` | Similar listings carousel (same card shape as `getListings`) |
|
|
62
|
+
| `getSite({ siteId? \| domain?, next? })` | Public site profile (returns `null` if unknown) |
|
|
63
|
+
| `getCmsCollections({ siteId })` | List CMS collections |
|
|
64
|
+
| `getCmsCollection({ siteId, slug })` | One CMS collection schema |
|
|
65
|
+
| `getCmsEntries({ siteId, collection, limit?, offset? })` | Published CMS entries only |
|
|
66
|
+
| `getCmsEntry({ siteId, collection, slug })` | One published CMS entry |
|
|
67
|
+
| `getSearchUi({ siteId, next? })` | Tenant search schema (filters, slugs) |
|
|
68
|
+
| `getLeadUi({ siteId, next? })` | Visit-default lead dialog schema (weekday hours, Sat/Sun flags) |
|
|
69
|
+
| `submitVisitLead({ siteId, listingId, … })` | POST a visit lead (`listing.id` UUID; civil `visitDate` or `Date`/ISO instant normalized in the schedule timezone) |
|
|
70
|
+
| `submitContactLead({ siteId, listingId, … })` | POST a contact lead (no date/time) |
|
|
71
|
+
| `slotsForDate` / `normalizeVisitDate` / `expandVisitSchedule` | Pure schedule helpers (`America/Sao_Paulo`, default Mon–Fri 06:00–22:00) |
|
|
72
|
+
| `listingDetailModel(listing)` | Listing-detail blocks: breadcrumb, values (price / condo / IPTU), facts (skip empty zeros), location + Maps href, description clamp, video/tour overlays. |
|
|
72
73
|
| `listingAmenityGroups(listing, dictionary?)` | Unit / building amenity labels (`Comodidades`, `Comodidades do condomínio`). Reads `propertyFeatures` + `buildingAmenities` (works when `building` is null). Tenant `getSearchUi().dictionary` first, then the SDK fallback; unlabeled ids are dropped. |
|
|
73
|
-
| `resolvePublicSiteId({ host?, fallback? })` | Preview uses `fallback` (`GARAGEM_SITE_ID`); live hosts resolve via `getSite({ domain })`
|
|
74
|
+
| `resolvePublicSiteId({ host?, fallback? })` | Preview uses `fallback` (`GARAGEM_SITE_ID`); live hosts resolve via `getSite({ domain })` |
|
|
74
75
|
|
|
75
76
|
### Advanced layer (when the friendly one isn't enough)
|
|
76
77
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RequestNextOptions, L as ListingFilters, Q as QueryListingsParams, S as SearchListingsParams, C as CmsCollection, a as CmsEntriesResult, b as CmsEntry, c as ListingDetail, d as ListingsResult, e as SearchUi, f as SimilarListingsResult, g as Site, h as QueryListingsResult, i as SearchListingsResult, j as
|
|
2
|
-
export {
|
|
1
|
+
import { R as RequestNextOptions, L as ListingFilters, Q as QueryListingsParams, S as SearchListingsParams, C as CmsCollection, a as CmsEntriesResult, b as CmsEntry, c as ListingDetail, d as ListingsResult, e as SearchUi, f as SimilarListingsResult, g as Site, h as QueryListingsResult, i as SearchListingsResult, j as ListingLocation, k as ListingMedia, l as SearchPathFilters, m as SearchUiDictionary, n as QueryListingsFilters, A as AppliedSearchQuery, o as AppliedSearchChange } from './search-engine-B83s_fVd.mjs';
|
|
2
|
+
export { p as CmsEntryStatus, q as CmsFieldDefinition, r as CmsFieldType, s as CmsSeoData, F as FORBIDDEN_SEARCH_QUERY_KEYS, t as Listing, u as ListingBusinessType, v as ListingCardModel, w as ListingPriceVisibility, x as ListingPropertySummary, y as LocationNameTables, z as QueryListingsLocation, B as SEARCH_SORT_RELEVANCE, D as SearchPathLocation, E as SearchUiFilter, G as SearchUiOption, T as TOOLBAR_PRIMARY_FILTER_IDS, H as applyPathFilter, I as buildQueryListingsParams, J as canonicalizeSearchHref, K as clearStagedPathFilters, M as countFacetChoices, N as countOptionLabel, O as displayPathLocation, P as hrefForAppliedChange, U as hrefForPathFilters, V as hrefWithExplicitPage, W as isListingDetailPath, X as listingLocationLabel, Y as paginationPages, Z as pathFilterHasOption, _ as pathFilterValue, $ as publicSearchHref, a0 as readPublicSearch, a1 as searchHrefUsesLegacyFilterQuery, a2 as searchResultsHeading, a3 as searchSortOptions, a4 as toListingCardModel, a5 as toolbarFilterIds, a6 as visibleSearchFilters } from './search-engine-B83s_fVd.mjs';
|
|
3
3
|
|
|
4
4
|
/** Custom fetch implementation. Defaults to the global `fetch`. */
|
|
5
5
|
type FetchLike = typeof fetch;
|
|
@@ -308,6 +308,84 @@ declare function listingPublicPath(listing: {
|
|
|
308
308
|
id?: string | null;
|
|
309
309
|
}): string;
|
|
310
310
|
|
|
311
|
+
declare const LISTING_DESCRIPTION_CLAMP = 280;
|
|
312
|
+
type ListingFact = {
|
|
313
|
+
key: string;
|
|
314
|
+
label: string;
|
|
315
|
+
text: string;
|
|
316
|
+
};
|
|
317
|
+
type ListingValue = {
|
|
318
|
+
key: string;
|
|
319
|
+
label: string;
|
|
320
|
+
text: string;
|
|
321
|
+
};
|
|
322
|
+
type ListingBreadcrumbCrumb = {
|
|
323
|
+
label: string;
|
|
324
|
+
href: string;
|
|
325
|
+
};
|
|
326
|
+
type ListingLocationBlock = {
|
|
327
|
+
label: string;
|
|
328
|
+
mapsHref: string | null;
|
|
329
|
+
};
|
|
330
|
+
type ListingDescriptionPreview = {
|
|
331
|
+
text: string;
|
|
332
|
+
truncated: boolean;
|
|
333
|
+
toggleLabel: string | null;
|
|
334
|
+
};
|
|
335
|
+
type ListingMediaOverlay = {
|
|
336
|
+
key: "video" | "tour";
|
|
337
|
+
hash: "video" | "tour";
|
|
338
|
+
title: string;
|
|
339
|
+
href: string;
|
|
340
|
+
embedSrc: string;
|
|
341
|
+
};
|
|
342
|
+
declare function listingValues(listing: {
|
|
343
|
+
price?: number | null;
|
|
344
|
+
priceVisibility?: string | null;
|
|
345
|
+
property?: {
|
|
346
|
+
condoFee?: number | null;
|
|
347
|
+
propertyTax?: number | null;
|
|
348
|
+
} | null;
|
|
349
|
+
}): ListingValue[];
|
|
350
|
+
declare function listingFacts(listing: {
|
|
351
|
+
property?: {
|
|
352
|
+
totalArea?: number | null;
|
|
353
|
+
usableArea?: number | null;
|
|
354
|
+
bedrooms?: number | null;
|
|
355
|
+
suites?: number | null;
|
|
356
|
+
parkingSpaces?: number | null;
|
|
357
|
+
rooms?: number | null;
|
|
358
|
+
floor?: number | string | null;
|
|
359
|
+
} | null;
|
|
360
|
+
}): ListingFact[];
|
|
361
|
+
declare function listingMapsHref(location: ListingLocation | null | undefined): string | null;
|
|
362
|
+
declare function listingLocationBlock(listing: {
|
|
363
|
+
location?: ListingLocation | null;
|
|
364
|
+
} | null | undefined): ListingLocationBlock | null;
|
|
365
|
+
declare function listingBreadcrumb(listing: {
|
|
366
|
+
path?: string | null;
|
|
367
|
+
listingCode?: string | null;
|
|
368
|
+
id?: string | null;
|
|
369
|
+
}): ListingBreadcrumbCrumb[];
|
|
370
|
+
declare function listingDescriptionPreview(description: string | null | undefined, expanded?: boolean): ListingDescriptionPreview | null;
|
|
371
|
+
declare function listingMediaOverlays(listing: {
|
|
372
|
+
media?: ListingMedia[] | null;
|
|
373
|
+
}): ListingMediaOverlay[];
|
|
374
|
+
declare function listingDetailModel(listing: Pick<ListingDetail, "id" | "listingCode" | "path" | "price" | "priceVisibility" | "description"> & {
|
|
375
|
+
property?: ListingDetail["property"] | null;
|
|
376
|
+
location?: ListingLocation | null;
|
|
377
|
+
media?: ListingMedia[] | null;
|
|
378
|
+
}, options?: {
|
|
379
|
+
descriptionExpanded?: boolean;
|
|
380
|
+
}): {
|
|
381
|
+
breadcrumb: ListingBreadcrumbCrumb[];
|
|
382
|
+
values: ListingValue[];
|
|
383
|
+
facts: ListingFact[];
|
|
384
|
+
location: ListingLocationBlock | null;
|
|
385
|
+
description: ListingDescriptionPreview | null;
|
|
386
|
+
mediaOverlays: ListingMediaOverlay[];
|
|
387
|
+
};
|
|
388
|
+
|
|
311
389
|
/**
|
|
312
390
|
* Presentation helpers with no UI framework.
|
|
313
391
|
* React / React Native / Flutter adapters consume these formatters and
|
|
@@ -401,8 +479,9 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
401
479
|
/**
|
|
402
480
|
* Exact pin for generated Studio sites. Must be ≥ `selfInjectSince` so
|
|
403
481
|
* prompts that skip the layout chrome tag match the tarball v0 installs.
|
|
404
|
-
* 0.4.9 adds
|
|
405
|
-
*
|
|
482
|
+
* 0.4.9 adds listingDetailModel (values, facts, location, breadcrumb,
|
|
483
|
+
* description clamp, video/tour), getSimilarListings, and
|
|
484
|
+
* listingAmenityGroups so listing detail never prints amenity ids.
|
|
406
485
|
*/
|
|
407
486
|
readonly minNpmVersion: "0.4.9";
|
|
408
487
|
/** First release where ListingCard and ResultsSkeleton inject the sheet. */
|
|
@@ -423,6 +502,7 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
423
502
|
readonly forbiddenImports: readonly ["@garagem-ai/site-sdk/react/search.css"];
|
|
424
503
|
readonly leadStrategy: "visit-default";
|
|
425
504
|
readonly leadExports: readonly ["getLeadUi", "submitVisitLead", "submitContactLead", "slotsForDate", "expandVisitSchedule", "expandVisitTimeSlots", "isVisitSlotAllowed", "STUDIO_DEFAULT_VISIT_SCHEDULE"];
|
|
505
|
+
readonly listingDetailExports: readonly ["listingDetailModel", "getSimilarListings"];
|
|
426
506
|
readonly amenityExports: readonly ["listingAmenityGroups"];
|
|
427
507
|
};
|
|
428
508
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
@@ -452,6 +532,7 @@ declare function parseReactSdkNamedImports(source: string): string[];
|
|
|
452
532
|
declare function unavailableReactImports(source: string, pin: string): string[];
|
|
453
533
|
declare function studioSdkPinInstruction(): string;
|
|
454
534
|
declare function studioLeadInstruction(): string;
|
|
535
|
+
declare function studioListingDetailInstruction(): string;
|
|
455
536
|
declare function studioAmenityInstruction(): string;
|
|
456
537
|
declare function studioChromeInstruction(): string;
|
|
457
538
|
/**
|
|
@@ -568,4 +649,4 @@ interface GaragemClient {
|
|
|
568
649
|
*/
|
|
569
650
|
declare function createGaragemClient(options?: CreateGaragemClientOptions): GaragemClient;
|
|
570
651
|
|
|
571
|
-
export { AMENITY_FALLBACK_LABELS, type AmenityLabelDictionary, type AmenityLabelOption, AppliedSearchChange, AppliedSearchQuery, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, type FetchLike, type GaragemClient, GaragemSdkError, type GetCmsCollectionOptions, type GetCmsCollectionsOptions, type GetCmsEntriesOptions, type GetCmsEntryOptions, type GetLeadUiOptions, type GetListingOptions, type GetListingsOptions, type GetSearchUiOptions, type GetSimilarListingsOptions, type GetSiteOptions, type HHmm, LISTING_AMENITY_TITLES, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, type ListingAmenityGroup, type ListingAmenityGroupKey, type ListingAmenitySource, ListingDetail, ListingFilters, ListingsResult, type LocationFilterInput, QueryListingsFilters, type QueryListingsOptions, QueryListingsParams, QueryListingsResult, RequestNextOptions, type ResolvePublicSiteIdOptions, SEARCH_CSS_RECIPE, SEARCH_CSS_VARS, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingsOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, SimilarListingsResult, Site, type StudioSdkContract, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, coerceNpmVersion, compareSemver, composeSearchPublicHref, composeSearchPublicPath, createGaragemClient, expandVisitSchedule, expandVisitTimeSlots, formatAreaM2, formatGroupedInteger, formatListingPrice, getCmsCollection, getCmsCollections, getCmsEntries, getCmsEntry, getLeadUi, getListing, getListings, getSearchUi, getSimilarListings, getSite, hasShowcaseLeadsPostUrl, isStudioPreviewHost, isVisitSlotAllowed, labelAmenities, listingAmenityGroups, listingBusinessLabel, listingLookupKey, listingPublicPath, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioSdkPinInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, unavailableReactImports };
|
|
652
|
+
export { AMENITY_FALLBACK_LABELS, type AmenityLabelDictionary, type AmenityLabelOption, AppliedSearchChange, AppliedSearchQuery, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, type FetchLike, type GaragemClient, GaragemSdkError, type GetCmsCollectionOptions, type GetCmsCollectionsOptions, type GetCmsEntriesOptions, type GetCmsEntryOptions, type GetLeadUiOptions, type GetListingOptions, type GetListingsOptions, type GetSearchUiOptions, type GetSimilarListingsOptions, type GetSiteOptions, type HHmm, LISTING_AMENITY_TITLES, LISTING_DESCRIPTION_CLAMP, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, type ListingAmenityGroup, type ListingAmenityGroupKey, type ListingAmenitySource, type ListingBreadcrumbCrumb, type ListingDescriptionPreview, ListingDetail, type ListingFact, ListingFilters, ListingLocation, type ListingLocationBlock, ListingMedia, type ListingMediaOverlay, type ListingValue, ListingsResult, type LocationFilterInput, QueryListingsFilters, type QueryListingsOptions, QueryListingsParams, QueryListingsResult, RequestNextOptions, type ResolvePublicSiteIdOptions, SEARCH_CSS_RECIPE, SEARCH_CSS_VARS, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingsOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, SimilarListingsResult, Site, type StudioSdkContract, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, coerceNpmVersion, compareSemver, composeSearchPublicHref, composeSearchPublicPath, createGaragemClient, expandVisitSchedule, expandVisitTimeSlots, formatAreaM2, formatGroupedInteger, formatListingPrice, getCmsCollection, getCmsCollections, getCmsEntries, getCmsEntry, getLeadUi, getListing, getListings, getSearchUi, getSimilarListings, getSite, hasShowcaseLeadsPostUrl, isStudioPreviewHost, isVisitSlotAllowed, labelAmenities, listingAmenityGroups, listingBreadcrumb, listingBusinessLabel, listingDescriptionPreview, listingDetailModel, listingFacts, listingLocationBlock, listingLookupKey, listingMapsHref, listingMediaOverlays, listingPublicPath, listingValues, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioListingDetailInstruction, studioSdkPinInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, unavailableReactImports };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RequestNextOptions, L as ListingFilters, Q as QueryListingsParams, S as SearchListingsParams, C as CmsCollection, a as CmsEntriesResult, b as CmsEntry, c as ListingDetail, d as ListingsResult, e as SearchUi, f as SimilarListingsResult, g as Site, h as QueryListingsResult, i as SearchListingsResult, j as
|
|
2
|
-
export {
|
|
1
|
+
import { R as RequestNextOptions, L as ListingFilters, Q as QueryListingsParams, S as SearchListingsParams, C as CmsCollection, a as CmsEntriesResult, b as CmsEntry, c as ListingDetail, d as ListingsResult, e as SearchUi, f as SimilarListingsResult, g as Site, h as QueryListingsResult, i as SearchListingsResult, j as ListingLocation, k as ListingMedia, l as SearchPathFilters, m as SearchUiDictionary, n as QueryListingsFilters, A as AppliedSearchQuery, o as AppliedSearchChange } from './search-engine-B83s_fVd.js';
|
|
2
|
+
export { p as CmsEntryStatus, q as CmsFieldDefinition, r as CmsFieldType, s as CmsSeoData, F as FORBIDDEN_SEARCH_QUERY_KEYS, t as Listing, u as ListingBusinessType, v as ListingCardModel, w as ListingPriceVisibility, x as ListingPropertySummary, y as LocationNameTables, z as QueryListingsLocation, B as SEARCH_SORT_RELEVANCE, D as SearchPathLocation, E as SearchUiFilter, G as SearchUiOption, T as TOOLBAR_PRIMARY_FILTER_IDS, H as applyPathFilter, I as buildQueryListingsParams, J as canonicalizeSearchHref, K as clearStagedPathFilters, M as countFacetChoices, N as countOptionLabel, O as displayPathLocation, P as hrefForAppliedChange, U as hrefForPathFilters, V as hrefWithExplicitPage, W as isListingDetailPath, X as listingLocationLabel, Y as paginationPages, Z as pathFilterHasOption, _ as pathFilterValue, $ as publicSearchHref, a0 as readPublicSearch, a1 as searchHrefUsesLegacyFilterQuery, a2 as searchResultsHeading, a3 as searchSortOptions, a4 as toListingCardModel, a5 as toolbarFilterIds, a6 as visibleSearchFilters } from './search-engine-B83s_fVd.js';
|
|
3
3
|
|
|
4
4
|
/** Custom fetch implementation. Defaults to the global `fetch`. */
|
|
5
5
|
type FetchLike = typeof fetch;
|
|
@@ -308,6 +308,84 @@ declare function listingPublicPath(listing: {
|
|
|
308
308
|
id?: string | null;
|
|
309
309
|
}): string;
|
|
310
310
|
|
|
311
|
+
declare const LISTING_DESCRIPTION_CLAMP = 280;
|
|
312
|
+
type ListingFact = {
|
|
313
|
+
key: string;
|
|
314
|
+
label: string;
|
|
315
|
+
text: string;
|
|
316
|
+
};
|
|
317
|
+
type ListingValue = {
|
|
318
|
+
key: string;
|
|
319
|
+
label: string;
|
|
320
|
+
text: string;
|
|
321
|
+
};
|
|
322
|
+
type ListingBreadcrumbCrumb = {
|
|
323
|
+
label: string;
|
|
324
|
+
href: string;
|
|
325
|
+
};
|
|
326
|
+
type ListingLocationBlock = {
|
|
327
|
+
label: string;
|
|
328
|
+
mapsHref: string | null;
|
|
329
|
+
};
|
|
330
|
+
type ListingDescriptionPreview = {
|
|
331
|
+
text: string;
|
|
332
|
+
truncated: boolean;
|
|
333
|
+
toggleLabel: string | null;
|
|
334
|
+
};
|
|
335
|
+
type ListingMediaOverlay = {
|
|
336
|
+
key: "video" | "tour";
|
|
337
|
+
hash: "video" | "tour";
|
|
338
|
+
title: string;
|
|
339
|
+
href: string;
|
|
340
|
+
embedSrc: string;
|
|
341
|
+
};
|
|
342
|
+
declare function listingValues(listing: {
|
|
343
|
+
price?: number | null;
|
|
344
|
+
priceVisibility?: string | null;
|
|
345
|
+
property?: {
|
|
346
|
+
condoFee?: number | null;
|
|
347
|
+
propertyTax?: number | null;
|
|
348
|
+
} | null;
|
|
349
|
+
}): ListingValue[];
|
|
350
|
+
declare function listingFacts(listing: {
|
|
351
|
+
property?: {
|
|
352
|
+
totalArea?: number | null;
|
|
353
|
+
usableArea?: number | null;
|
|
354
|
+
bedrooms?: number | null;
|
|
355
|
+
suites?: number | null;
|
|
356
|
+
parkingSpaces?: number | null;
|
|
357
|
+
rooms?: number | null;
|
|
358
|
+
floor?: number | string | null;
|
|
359
|
+
} | null;
|
|
360
|
+
}): ListingFact[];
|
|
361
|
+
declare function listingMapsHref(location: ListingLocation | null | undefined): string | null;
|
|
362
|
+
declare function listingLocationBlock(listing: {
|
|
363
|
+
location?: ListingLocation | null;
|
|
364
|
+
} | null | undefined): ListingLocationBlock | null;
|
|
365
|
+
declare function listingBreadcrumb(listing: {
|
|
366
|
+
path?: string | null;
|
|
367
|
+
listingCode?: string | null;
|
|
368
|
+
id?: string | null;
|
|
369
|
+
}): ListingBreadcrumbCrumb[];
|
|
370
|
+
declare function listingDescriptionPreview(description: string | null | undefined, expanded?: boolean): ListingDescriptionPreview | null;
|
|
371
|
+
declare function listingMediaOverlays(listing: {
|
|
372
|
+
media?: ListingMedia[] | null;
|
|
373
|
+
}): ListingMediaOverlay[];
|
|
374
|
+
declare function listingDetailModel(listing: Pick<ListingDetail, "id" | "listingCode" | "path" | "price" | "priceVisibility" | "description"> & {
|
|
375
|
+
property?: ListingDetail["property"] | null;
|
|
376
|
+
location?: ListingLocation | null;
|
|
377
|
+
media?: ListingMedia[] | null;
|
|
378
|
+
}, options?: {
|
|
379
|
+
descriptionExpanded?: boolean;
|
|
380
|
+
}): {
|
|
381
|
+
breadcrumb: ListingBreadcrumbCrumb[];
|
|
382
|
+
values: ListingValue[];
|
|
383
|
+
facts: ListingFact[];
|
|
384
|
+
location: ListingLocationBlock | null;
|
|
385
|
+
description: ListingDescriptionPreview | null;
|
|
386
|
+
mediaOverlays: ListingMediaOverlay[];
|
|
387
|
+
};
|
|
388
|
+
|
|
311
389
|
/**
|
|
312
390
|
* Presentation helpers with no UI framework.
|
|
313
391
|
* React / React Native / Flutter adapters consume these formatters and
|
|
@@ -401,8 +479,9 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
401
479
|
/**
|
|
402
480
|
* Exact pin for generated Studio sites. Must be ≥ `selfInjectSince` so
|
|
403
481
|
* prompts that skip the layout chrome tag match the tarball v0 installs.
|
|
404
|
-
* 0.4.9 adds
|
|
405
|
-
*
|
|
482
|
+
* 0.4.9 adds listingDetailModel (values, facts, location, breadcrumb,
|
|
483
|
+
* description clamp, video/tour), getSimilarListings, and
|
|
484
|
+
* listingAmenityGroups so listing detail never prints amenity ids.
|
|
406
485
|
*/
|
|
407
486
|
readonly minNpmVersion: "0.4.9";
|
|
408
487
|
/** First release where ListingCard and ResultsSkeleton inject the sheet. */
|
|
@@ -423,6 +502,7 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
423
502
|
readonly forbiddenImports: readonly ["@garagem-ai/site-sdk/react/search.css"];
|
|
424
503
|
readonly leadStrategy: "visit-default";
|
|
425
504
|
readonly leadExports: readonly ["getLeadUi", "submitVisitLead", "submitContactLead", "slotsForDate", "expandVisitSchedule", "expandVisitTimeSlots", "isVisitSlotAllowed", "STUDIO_DEFAULT_VISIT_SCHEDULE"];
|
|
505
|
+
readonly listingDetailExports: readonly ["listingDetailModel", "getSimilarListings"];
|
|
426
506
|
readonly amenityExports: readonly ["listingAmenityGroups"];
|
|
427
507
|
};
|
|
428
508
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
@@ -452,6 +532,7 @@ declare function parseReactSdkNamedImports(source: string): string[];
|
|
|
452
532
|
declare function unavailableReactImports(source: string, pin: string): string[];
|
|
453
533
|
declare function studioSdkPinInstruction(): string;
|
|
454
534
|
declare function studioLeadInstruction(): string;
|
|
535
|
+
declare function studioListingDetailInstruction(): string;
|
|
455
536
|
declare function studioAmenityInstruction(): string;
|
|
456
537
|
declare function studioChromeInstruction(): string;
|
|
457
538
|
/**
|
|
@@ -568,4 +649,4 @@ interface GaragemClient {
|
|
|
568
649
|
*/
|
|
569
650
|
declare function createGaragemClient(options?: CreateGaragemClientOptions): GaragemClient;
|
|
570
651
|
|
|
571
|
-
export { AMENITY_FALLBACK_LABELS, type AmenityLabelDictionary, type AmenityLabelOption, AppliedSearchChange, AppliedSearchQuery, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, type FetchLike, type GaragemClient, GaragemSdkError, type GetCmsCollectionOptions, type GetCmsCollectionsOptions, type GetCmsEntriesOptions, type GetCmsEntryOptions, type GetLeadUiOptions, type GetListingOptions, type GetListingsOptions, type GetSearchUiOptions, type GetSimilarListingsOptions, type GetSiteOptions, type HHmm, LISTING_AMENITY_TITLES, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, type ListingAmenityGroup, type ListingAmenityGroupKey, type ListingAmenitySource, ListingDetail, ListingFilters, ListingsResult, type LocationFilterInput, QueryListingsFilters, type QueryListingsOptions, QueryListingsParams, QueryListingsResult, RequestNextOptions, type ResolvePublicSiteIdOptions, SEARCH_CSS_RECIPE, SEARCH_CSS_VARS, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingsOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, SimilarListingsResult, Site, type StudioSdkContract, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, coerceNpmVersion, compareSemver, composeSearchPublicHref, composeSearchPublicPath, createGaragemClient, expandVisitSchedule, expandVisitTimeSlots, formatAreaM2, formatGroupedInteger, formatListingPrice, getCmsCollection, getCmsCollections, getCmsEntries, getCmsEntry, getLeadUi, getListing, getListings, getSearchUi, getSimilarListings, getSite, hasShowcaseLeadsPostUrl, isStudioPreviewHost, isVisitSlotAllowed, labelAmenities, listingAmenityGroups, listingBusinessLabel, listingLookupKey, listingPublicPath, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioSdkPinInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, unavailableReactImports };
|
|
652
|
+
export { AMENITY_FALLBACK_LABELS, type AmenityLabelDictionary, type AmenityLabelOption, AppliedSearchChange, AppliedSearchQuery, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, type FetchLike, type GaragemClient, GaragemSdkError, type GetCmsCollectionOptions, type GetCmsCollectionsOptions, type GetCmsEntriesOptions, type GetCmsEntryOptions, type GetLeadUiOptions, type GetListingOptions, type GetListingsOptions, type GetSearchUiOptions, type GetSimilarListingsOptions, type GetSiteOptions, type HHmm, LISTING_AMENITY_TITLES, LISTING_DESCRIPTION_CLAMP, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, type ListingAmenityGroup, type ListingAmenityGroupKey, type ListingAmenitySource, type ListingBreadcrumbCrumb, type ListingDescriptionPreview, ListingDetail, type ListingFact, ListingFilters, ListingLocation, type ListingLocationBlock, ListingMedia, type ListingMediaOverlay, type ListingValue, ListingsResult, type LocationFilterInput, QueryListingsFilters, type QueryListingsOptions, QueryListingsParams, QueryListingsResult, RequestNextOptions, type ResolvePublicSiteIdOptions, SEARCH_CSS_RECIPE, SEARCH_CSS_VARS, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingsOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, SimilarListingsResult, Site, type StudioSdkContract, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, coerceNpmVersion, compareSemver, composeSearchPublicHref, composeSearchPublicPath, createGaragemClient, expandVisitSchedule, expandVisitTimeSlots, formatAreaM2, formatGroupedInteger, formatListingPrice, getCmsCollection, getCmsCollections, getCmsEntries, getCmsEntry, getLeadUi, getListing, getListings, getSearchUi, getSimilarListings, getSite, hasShowcaseLeadsPostUrl, isStudioPreviewHost, isVisitSlotAllowed, labelAmenities, listingAmenityGroups, listingBreadcrumb, listingBusinessLabel, listingDescriptionPreview, listingDetailModel, listingFacts, listingLocationBlock, listingLookupKey, listingMapsHref, listingMediaOverlays, listingPublicPath, listingValues, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioListingDetailInstruction, studioSdkPinInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, unavailableReactImports };
|