@garagem-ai/site-sdk 0.4.8 → 0.4.10
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 +50 -6
- package/dist/index.d.ts +50 -6
- package/dist/index.js +355 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +350 -4
- 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-D4EZkNrQ.d.mts → search-engine-t3SBrLHS.d.mts} +12 -0
- package/dist/{search-engine-D4EZkNrQ.d.ts → search-engine-t3SBrLHS.d.ts} +12 -0
- package/package.json +1 -1
- package/src/amenity-labels.ts +400 -0
- package/src/index.ts +13 -0
- package/src/react/styles/search-chrome-css.generated.ts +1 -1
- package/src/studio-contract.ts +9 -3
- package/src/types.ts +12 -0
package/README.md
CHANGED
|
@@ -54,22 +54,23 @@ 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)
|
|
72
|
-
| `
|
|
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
|
+
| `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 })` |
|
|
73
74
|
|
|
74
75
|
### Advanced layer (when the friendly one isn't enough)
|
|
75
76
|
|
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 SearchPathFilters, k as SearchUiDictionary, l as QueryListingsFilters, A as AppliedSearchQuery, m as AppliedSearchChange } from './search-engine-
|
|
2
|
-
export { n as CmsEntryStatus, o as CmsFieldDefinition, p as CmsFieldType, q as CmsSeoData, F as FORBIDDEN_SEARCH_QUERY_KEYS, r as Listing, s as ListingBusinessType, t as ListingCardModel, u as ListingLocation, v as ListingMedia, 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-
|
|
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 SearchPathFilters, k as SearchUiDictionary, l as QueryListingsFilters, A as AppliedSearchQuery, m as AppliedSearchChange } from './search-engine-t3SBrLHS.mjs';
|
|
2
|
+
export { n as CmsEntryStatus, o as CmsFieldDefinition, p as CmsFieldType, q as CmsSeoData, F as FORBIDDEN_SEARCH_QUERY_KEYS, r as Listing, s as ListingBusinessType, t as ListingCardModel, u as ListingLocation, v as ListingMedia, 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-t3SBrLHS.mjs';
|
|
3
3
|
|
|
4
4
|
/** Custom fetch implementation. Defaults to the global `fetch`. */
|
|
5
5
|
type FetchLike = typeof fetch;
|
|
@@ -258,6 +258,48 @@ declare function getLeadUi(options: GetLeadUiOptions): Promise<LeadUi>;
|
|
|
258
258
|
declare function submitVisitLead(input: VisitLeadInput): Promise<LeadSubmitResult>;
|
|
259
259
|
declare function submitContactLead(input: ContactLeadInput): Promise<LeadSubmitResult>;
|
|
260
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Portuguese labels for listing amenity ids. Tenant search-ui dictionary
|
|
263
|
+
* wins; this map is the default-catalog fallback so generated Studio pages
|
|
264
|
+
* never print camelCase keys.
|
|
265
|
+
*/
|
|
266
|
+
declare const LISTING_AMENITY_TITLES: {
|
|
267
|
+
readonly unit: "Comodidades";
|
|
268
|
+
readonly building: "Comodidades do condomínio";
|
|
269
|
+
};
|
|
270
|
+
type AmenityLabelOption = {
|
|
271
|
+
id: string;
|
|
272
|
+
label: string;
|
|
273
|
+
};
|
|
274
|
+
type AmenityLabelDictionary = {
|
|
275
|
+
propertyFeatures?: AmenityLabelOption[];
|
|
276
|
+
buildingAmenities?: AmenityLabelOption[];
|
|
277
|
+
};
|
|
278
|
+
type ListingAmenityGroupKey = keyof typeof LISTING_AMENITY_TITLES;
|
|
279
|
+
type ListingAmenityGroup = {
|
|
280
|
+
key: ListingAmenityGroupKey;
|
|
281
|
+
title: string;
|
|
282
|
+
labels: string[];
|
|
283
|
+
};
|
|
284
|
+
type ListingAmenitySource = {
|
|
285
|
+
amenities?: string[] | null;
|
|
286
|
+
propertyFeatures?: string[] | null;
|
|
287
|
+
/** Condo amenity ids, even when `building` is null (no buildingId). */
|
|
288
|
+
buildingAmenities?: string[] | null;
|
|
289
|
+
building?: {
|
|
290
|
+
amenities?: string[] | null;
|
|
291
|
+
} | null;
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* Default tenant ids + canonical `has*` / `is*` keys seen on public listings.
|
|
295
|
+
* Aligned with DEFAULT_PROPERTY_FEATURES and DEFAULT_BUILDING_FEATURES from
|
|
296
|
+
* Foundation's field-definitions.ts so generated Studio pages never need a
|
|
297
|
+
* dictionary for standard amenities.
|
|
298
|
+
*/
|
|
299
|
+
declare const AMENITY_FALLBACK_LABELS: Record<string, string>;
|
|
300
|
+
declare function labelAmenities(ids: readonly string[] | null | undefined, dictionary?: AmenityLabelOption[]): string[];
|
|
301
|
+
declare function listingAmenityGroups(listing: ListingAmenitySource, dictionary?: AmenityLabelDictionary): ListingAmenityGroup[];
|
|
302
|
+
|
|
261
303
|
/** Public listing URLs. Prefer `listing.path` from the API; fallback is `/imoveis/id-{listingCode}`. */
|
|
262
304
|
declare function listingLookupKey(raw: string): string;
|
|
263
305
|
declare function listingPublicPath(listing: {
|
|
@@ -359,10 +401,10 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
359
401
|
/**
|
|
360
402
|
* Exact pin for generated Studio sites. Must be ≥ `selfInjectSince` so
|
|
361
403
|
* prompts that skip the layout chrome tag match the tarball v0 installs.
|
|
362
|
-
* 0.4.
|
|
363
|
-
*
|
|
404
|
+
* 0.4.9 adds `listingAmenityGroups` so listing detail never prints
|
|
405
|
+
* amenity ids.
|
|
364
406
|
*/
|
|
365
|
-
readonly minNpmVersion: "0.4.
|
|
407
|
+
readonly minNpmVersion: "0.4.9";
|
|
366
408
|
/** First release where ListingCard and ResultsSkeleton inject the sheet. */
|
|
367
409
|
readonly selfInjectSince: "0.4.2";
|
|
368
410
|
readonly chromeStrategy: "self-inject";
|
|
@@ -381,6 +423,7 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
381
423
|
readonly forbiddenImports: readonly ["@garagem-ai/site-sdk/react/search.css"];
|
|
382
424
|
readonly leadStrategy: "visit-default";
|
|
383
425
|
readonly leadExports: readonly ["getLeadUi", "submitVisitLead", "submitContactLead", "slotsForDate", "expandVisitSchedule", "expandVisitTimeSlots", "isVisitSlotAllowed", "STUDIO_DEFAULT_VISIT_SCHEDULE"];
|
|
426
|
+
readonly amenityExports: readonly ["listingAmenityGroups"];
|
|
384
427
|
};
|
|
385
428
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
386
429
|
/**
|
|
@@ -409,6 +452,7 @@ declare function parseReactSdkNamedImports(source: string): string[];
|
|
|
409
452
|
declare function unavailableReactImports(source: string, pin: string): string[];
|
|
410
453
|
declare function studioSdkPinInstruction(): string;
|
|
411
454
|
declare function studioLeadInstruction(): string;
|
|
455
|
+
declare function studioAmenityInstruction(): string;
|
|
412
456
|
declare function studioChromeInstruction(): string;
|
|
413
457
|
/**
|
|
414
458
|
* Tokens that must not appear in Studio codegen (prompts, recipes, repair).
|
|
@@ -524,4 +568,4 @@ interface GaragemClient {
|
|
|
524
568
|
*/
|
|
525
569
|
declare function createGaragemClient(options?: CreateGaragemClientOptions): GaragemClient;
|
|
526
570
|
|
|
527
|
-
export { 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, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, 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, listingBusinessLabel, listingLookupKey, listingPublicPath, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioSdkPinInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, unavailableReactImports };
|
|
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 };
|
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 SearchPathFilters, k as SearchUiDictionary, l as QueryListingsFilters, A as AppliedSearchQuery, m as AppliedSearchChange } from './search-engine-
|
|
2
|
-
export { n as CmsEntryStatus, o as CmsFieldDefinition, p as CmsFieldType, q as CmsSeoData, F as FORBIDDEN_SEARCH_QUERY_KEYS, r as Listing, s as ListingBusinessType, t as ListingCardModel, u as ListingLocation, v as ListingMedia, 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-
|
|
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 SearchPathFilters, k as SearchUiDictionary, l as QueryListingsFilters, A as AppliedSearchQuery, m as AppliedSearchChange } from './search-engine-t3SBrLHS.js';
|
|
2
|
+
export { n as CmsEntryStatus, o as CmsFieldDefinition, p as CmsFieldType, q as CmsSeoData, F as FORBIDDEN_SEARCH_QUERY_KEYS, r as Listing, s as ListingBusinessType, t as ListingCardModel, u as ListingLocation, v as ListingMedia, 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-t3SBrLHS.js';
|
|
3
3
|
|
|
4
4
|
/** Custom fetch implementation. Defaults to the global `fetch`. */
|
|
5
5
|
type FetchLike = typeof fetch;
|
|
@@ -258,6 +258,48 @@ declare function getLeadUi(options: GetLeadUiOptions): Promise<LeadUi>;
|
|
|
258
258
|
declare function submitVisitLead(input: VisitLeadInput): Promise<LeadSubmitResult>;
|
|
259
259
|
declare function submitContactLead(input: ContactLeadInput): Promise<LeadSubmitResult>;
|
|
260
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Portuguese labels for listing amenity ids. Tenant search-ui dictionary
|
|
263
|
+
* wins; this map is the default-catalog fallback so generated Studio pages
|
|
264
|
+
* never print camelCase keys.
|
|
265
|
+
*/
|
|
266
|
+
declare const LISTING_AMENITY_TITLES: {
|
|
267
|
+
readonly unit: "Comodidades";
|
|
268
|
+
readonly building: "Comodidades do condomínio";
|
|
269
|
+
};
|
|
270
|
+
type AmenityLabelOption = {
|
|
271
|
+
id: string;
|
|
272
|
+
label: string;
|
|
273
|
+
};
|
|
274
|
+
type AmenityLabelDictionary = {
|
|
275
|
+
propertyFeatures?: AmenityLabelOption[];
|
|
276
|
+
buildingAmenities?: AmenityLabelOption[];
|
|
277
|
+
};
|
|
278
|
+
type ListingAmenityGroupKey = keyof typeof LISTING_AMENITY_TITLES;
|
|
279
|
+
type ListingAmenityGroup = {
|
|
280
|
+
key: ListingAmenityGroupKey;
|
|
281
|
+
title: string;
|
|
282
|
+
labels: string[];
|
|
283
|
+
};
|
|
284
|
+
type ListingAmenitySource = {
|
|
285
|
+
amenities?: string[] | null;
|
|
286
|
+
propertyFeatures?: string[] | null;
|
|
287
|
+
/** Condo amenity ids, even when `building` is null (no buildingId). */
|
|
288
|
+
buildingAmenities?: string[] | null;
|
|
289
|
+
building?: {
|
|
290
|
+
amenities?: string[] | null;
|
|
291
|
+
} | null;
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* Default tenant ids + canonical `has*` / `is*` keys seen on public listings.
|
|
295
|
+
* Aligned with DEFAULT_PROPERTY_FEATURES and DEFAULT_BUILDING_FEATURES from
|
|
296
|
+
* Foundation's field-definitions.ts so generated Studio pages never need a
|
|
297
|
+
* dictionary for standard amenities.
|
|
298
|
+
*/
|
|
299
|
+
declare const AMENITY_FALLBACK_LABELS: Record<string, string>;
|
|
300
|
+
declare function labelAmenities(ids: readonly string[] | null | undefined, dictionary?: AmenityLabelOption[]): string[];
|
|
301
|
+
declare function listingAmenityGroups(listing: ListingAmenitySource, dictionary?: AmenityLabelDictionary): ListingAmenityGroup[];
|
|
302
|
+
|
|
261
303
|
/** Public listing URLs. Prefer `listing.path` from the API; fallback is `/imoveis/id-{listingCode}`. */
|
|
262
304
|
declare function listingLookupKey(raw: string): string;
|
|
263
305
|
declare function listingPublicPath(listing: {
|
|
@@ -359,10 +401,10 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
359
401
|
/**
|
|
360
402
|
* Exact pin for generated Studio sites. Must be ≥ `selfInjectSince` so
|
|
361
403
|
* prompts that skip the layout chrome tag match the tarball v0 installs.
|
|
362
|
-
* 0.4.
|
|
363
|
-
*
|
|
404
|
+
* 0.4.9 adds `listingAmenityGroups` so listing detail never prints
|
|
405
|
+
* amenity ids.
|
|
364
406
|
*/
|
|
365
|
-
readonly minNpmVersion: "0.4.
|
|
407
|
+
readonly minNpmVersion: "0.4.9";
|
|
366
408
|
/** First release where ListingCard and ResultsSkeleton inject the sheet. */
|
|
367
409
|
readonly selfInjectSince: "0.4.2";
|
|
368
410
|
readonly chromeStrategy: "self-inject";
|
|
@@ -381,6 +423,7 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
381
423
|
readonly forbiddenImports: readonly ["@garagem-ai/site-sdk/react/search.css"];
|
|
382
424
|
readonly leadStrategy: "visit-default";
|
|
383
425
|
readonly leadExports: readonly ["getLeadUi", "submitVisitLead", "submitContactLead", "slotsForDate", "expandVisitSchedule", "expandVisitTimeSlots", "isVisitSlotAllowed", "STUDIO_DEFAULT_VISIT_SCHEDULE"];
|
|
426
|
+
readonly amenityExports: readonly ["listingAmenityGroups"];
|
|
384
427
|
};
|
|
385
428
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
386
429
|
/**
|
|
@@ -409,6 +452,7 @@ declare function parseReactSdkNamedImports(source: string): string[];
|
|
|
409
452
|
declare function unavailableReactImports(source: string, pin: string): string[];
|
|
410
453
|
declare function studioSdkPinInstruction(): string;
|
|
411
454
|
declare function studioLeadInstruction(): string;
|
|
455
|
+
declare function studioAmenityInstruction(): string;
|
|
412
456
|
declare function studioChromeInstruction(): string;
|
|
413
457
|
/**
|
|
414
458
|
* Tokens that must not appear in Studio codegen (prompts, recipes, repair).
|
|
@@ -524,4 +568,4 @@ interface GaragemClient {
|
|
|
524
568
|
*/
|
|
525
569
|
declare function createGaragemClient(options?: CreateGaragemClientOptions): GaragemClient;
|
|
526
570
|
|
|
527
|
-
export { 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, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, 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, listingBusinessLabel, listingLookupKey, listingPublicPath, mergeAppliedSearchQueryIntoSearch, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery, slotsForDate, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioSdkPinInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, unavailableReactImports };
|
|
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 };
|