@garagem-ai/site-sdk 0.14.1 → 0.15.1
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/dist/index.d.mts +46 -7
- package/dist/index.d.ts +46 -7
- package/dist/index.js +99 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -6
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/{types-photo-search--3fBk3Cs.d.mts → types-photo-search-BqKzj97S.d.mts} +27 -0
- package/dist/{types-photo-search--3fBk3Cs.d.ts → types-photo-search-BqKzj97S.d.ts} +27 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/listing-detail.ts +18 -1
- package/src/listing-development.ts +107 -0
- package/src/studio-contract.ts +34 -4
- package/src/types.ts +27 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as ListingDetail, F as FetchLike, R as RequestNextOptions, a as Listing, b as ListingLocation, c as ListingMedia, S as SearchPathFilters, d as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, e as AppliedSearchChange, f as ListingFilters, g as ListingsResult, h as Site, i as SearchListingsParams, j as SearchListingsResult, k as SearchUi, l as QueryListingsParams, m as QueryListingsResult, n as SimilarListingsResult, C as CmsCollection, o as CmsEntriesResult, p as CmsEntry, B as BoundaryCity, q as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, r as TravelTimeCache, s as MapsFetchOptions, t as BoundaryLayer, u as ListingWithLocation, v as StaticMapOptions, w as StreetViewAvailabilityOptions, x as StreetViewAvailability, y as StreetViewOptions, N as NeighborhoodBoundaryOptions, z as NeighborhoodBoundary, D as TravelDestination, E as TravelMode, G as TravelTimeOptions, H as TravelTime, I as TravelTimesOptions, J as TravelTimeElement, P as PhotoSearchParams, K as PhotoSearchResult, O as PhotoSearchItem, U as ListingWithMatchedPhoto, V as MatchedListingPhoto } from './types-photo-search
|
|
2
|
-
export { W as BoundaryFeature, X as BoundaryFeatureCollection, Y as BoundaryGeometry, Z as BoundaryLayerUrlKind, _ as BoundarySourceLayer, $ as CmsEntryStatus, a0 as CmsFieldDefinition, a1 as CmsFieldType, a2 as CmsSeoData, a3 as FORBIDDEN_SEARCH_QUERY_KEYS, a4 as GaragemSdkError, a5 as GetCmsCollectionOptions, a6 as GetCmsCollectionsOptions, a7 as GetCmsEntriesOptions, a8 as GetCmsEntryOptions, a9 as GetListingOptions, aa as GetListingsOptions, ab as GetSearchUiOptions, ac as GetSimilarListingsOptions, ad as GetSiteOptions, ae as ListingBusinessType, af as ListingCardModel, ag as ListingPriceVisibility, ah as ListingPropertySummary, ai as LocationNameTables, aj as MAP_POLYGON_MAX_VERTICES, ak as MAP_SEARCH_DEFAULT_PAGE_SIZE, al as MAP_SEARCH_MAX_PAGE_SIZE, am as MAP_VIEWPORT_DEBOUNCE_MS, an as MapBounds, ao as MapBoundsSearchOptions, ap as MapBucket, aq as MapPin, ar as MapPinCluster, as as MapPolygon, at as MapPolygonSearchOptions, au as MapSearchResult, av as MapsBaseOptions, aw as QueryListingsLocation, ax as QueryListingsOptions, ay as SEARCH_EMPTY_COPY, az as SEARCH_SORT_RELEVANCE, aA as SearchChromeModel, aB as SearchListingsOptions, aC as SearchPathLocation, aD as SearchUiFilter, aE as SearchUiOption, aF as StaticMapStyle, aG as TOOLBAR_PRIMARY_FILTER_IDS, aH as applyPathFilter, aI as buildQueryListingsParams, aJ as canonicalizeSearchHref, aK as capMapPage, aL as capMapPageSize, aM as clearStagedPathFilters, aN as clusterBuckets, aO as clusterPins, aP as countFacetChoices, aQ as countOptionLabel, aR as displayPathLocation, aS as getCmsCollection, aT as getCmsCollections, aU as getCmsEntries, aV as getCmsEntry, aW as getListing, aX as getListings, aY as getSearchUi, aZ as getSimilarListings, a_ as getSite, a$ as hrefForAppliedChange, b0 as hrefForPathFilters, b1 as hrefWithExplicitPage, b2 as isListingDetailPath, b3 as isMapBounds, b4 as isMapPolygon, b5 as listingLocationLabel, b6 as mapClusterCellDegrees, b7 as mapSearchPins, b8 as paginationPages, b9 as pathFilterHasOption, ba as pathFilterValue, bb as publicSearchHref, bc as queryListings, bd as rangeDraftFromPath, be as readPublicSearch, bf as searchChromeModel, bg as searchHrefUsesLegacyFilterQuery, bh as searchListings, bi as searchListingsInBounds, bj as searchListingsInPolygon, bk as searchResultsHeading, bl as searchSortOptions, bm as toListingCardModel, bn as toolbarFilterIds, bo as unknownSearchLocation, bp as visibleSearchFilters } from './types-photo-search
|
|
1
|
+
import { L as ListingDetail, F as FetchLike, R as RequestNextOptions, a as Listing, b as ListingLocation, c as ListingMedia, S as SearchPathFilters, d as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, e as AppliedSearchChange, f as ListingFilters, g as ListingsResult, h as Site, i as SearchListingsParams, j as SearchListingsResult, k as SearchUi, l as QueryListingsParams, m as QueryListingsResult, n as SimilarListingsResult, C as CmsCollection, o as CmsEntriesResult, p as CmsEntry, B as BoundaryCity, q as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, r as TravelTimeCache, s as MapsFetchOptions, t as BoundaryLayer, u as ListingWithLocation, v as StaticMapOptions, w as StreetViewAvailabilityOptions, x as StreetViewAvailability, y as StreetViewOptions, N as NeighborhoodBoundaryOptions, z as NeighborhoodBoundary, D as TravelDestination, E as TravelMode, G as TravelTimeOptions, H as TravelTime, I as TravelTimesOptions, J as TravelTimeElement, P as PhotoSearchParams, K as PhotoSearchResult, O as PhotoSearchItem, U as ListingWithMatchedPhoto, V as MatchedListingPhoto } from './types-photo-search-BqKzj97S.mjs';
|
|
2
|
+
export { W as BoundaryFeature, X as BoundaryFeatureCollection, Y as BoundaryGeometry, Z as BoundaryLayerUrlKind, _ as BoundarySourceLayer, $ as CmsEntryStatus, a0 as CmsFieldDefinition, a1 as CmsFieldType, a2 as CmsSeoData, a3 as FORBIDDEN_SEARCH_QUERY_KEYS, a4 as GaragemSdkError, a5 as GetCmsCollectionOptions, a6 as GetCmsCollectionsOptions, a7 as GetCmsEntriesOptions, a8 as GetCmsEntryOptions, a9 as GetListingOptions, aa as GetListingsOptions, ab as GetSearchUiOptions, ac as GetSimilarListingsOptions, ad as GetSiteOptions, ae as ListingBusinessType, af as ListingCardModel, ag as ListingPriceVisibility, ah as ListingPropertySummary, ai as LocationNameTables, aj as MAP_POLYGON_MAX_VERTICES, ak as MAP_SEARCH_DEFAULT_PAGE_SIZE, al as MAP_SEARCH_MAX_PAGE_SIZE, am as MAP_VIEWPORT_DEBOUNCE_MS, an as MapBounds, ao as MapBoundsSearchOptions, ap as MapBucket, aq as MapPin, ar as MapPinCluster, as as MapPolygon, at as MapPolygonSearchOptions, au as MapSearchResult, av as MapsBaseOptions, aw as QueryListingsLocation, ax as QueryListingsOptions, ay as SEARCH_EMPTY_COPY, az as SEARCH_SORT_RELEVANCE, aA as SearchChromeModel, aB as SearchListingsOptions, aC as SearchPathLocation, aD as SearchUiFilter, aE as SearchUiOption, aF as StaticMapStyle, aG as TOOLBAR_PRIMARY_FILTER_IDS, aH as applyPathFilter, aI as buildQueryListingsParams, aJ as canonicalizeSearchHref, aK as capMapPage, aL as capMapPageSize, aM as clearStagedPathFilters, aN as clusterBuckets, aO as clusterPins, aP as countFacetChoices, aQ as countOptionLabel, aR as displayPathLocation, aS as getCmsCollection, aT as getCmsCollections, aU as getCmsEntries, aV as getCmsEntry, aW as getListing, aX as getListings, aY as getSearchUi, aZ as getSimilarListings, a_ as getSite, a$ as hrefForAppliedChange, b0 as hrefForPathFilters, b1 as hrefWithExplicitPage, b2 as isListingDetailPath, b3 as isMapBounds, b4 as isMapPolygon, b5 as listingLocationLabel, b6 as mapClusterCellDegrees, b7 as mapSearchPins, b8 as paginationPages, b9 as pathFilterHasOption, ba as pathFilterValue, bb as publicSearchHref, bc as queryListings, bd as rangeDraftFromPath, be as readPublicSearch, bf as searchChromeModel, bg as searchHrefUsesLegacyFilterQuery, bh as searchListings, bi as searchListingsInBounds, bj as searchListingsInPolygon, bk as searchResultsHeading, bl as searchSortOptions, bm as toListingCardModel, bn as toolbarFilterIds, bo as unknownSearchLocation, bp as visibleSearchFilters } from './types-photo-search-BqKzj97S.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Types for the public Share Link API (`GET`/`POST /api/sites/share/{token}`).
|
|
@@ -436,6 +436,24 @@ declare function listingPublicPath(listing: {
|
|
|
436
436
|
id?: string | null;
|
|
437
437
|
}): string;
|
|
438
438
|
|
|
439
|
+
type ListingDevelopmentFact = {
|
|
440
|
+
label: string;
|
|
441
|
+
text: string;
|
|
442
|
+
};
|
|
443
|
+
type ListingDevelopmentTypologyModel = {
|
|
444
|
+
name: string;
|
|
445
|
+
code: string | null;
|
|
446
|
+
availableLabel: string | null;
|
|
447
|
+
specs: string | null;
|
|
448
|
+
priceLabel: string;
|
|
449
|
+
pricePerSqmLabel: string | null;
|
|
450
|
+
};
|
|
451
|
+
type ListingDevelopmentModel = {
|
|
452
|
+
name: string;
|
|
453
|
+
facts: ListingDevelopmentFact[];
|
|
454
|
+
typologies: ListingDevelopmentTypologyModel[];
|
|
455
|
+
};
|
|
456
|
+
|
|
439
457
|
declare const LISTING_DESCRIPTION_CLAMP = 280;
|
|
440
458
|
/** Visible listing fact. The number / area / floor is `text` — never omit it. */
|
|
441
459
|
type ListingFact = {
|
|
@@ -479,6 +497,12 @@ type ListingDetailModel = {
|
|
|
479
497
|
descriptionTruncated: boolean;
|
|
480
498
|
descriptionToggleLabel: string | null;
|
|
481
499
|
mediaOverlays: ListingMediaOverlay[];
|
|
500
|
+
/**
|
|
501
|
+
* Lançamento block. Null on a resale, including a condo that has
|
|
502
|
+
* `listing.building`. Search-card `listing.development` is a different
|
|
503
|
+
* field (collapsed unit count) and is not this object.
|
|
504
|
+
*/
|
|
505
|
+
development: ListingDevelopmentModel | null;
|
|
482
506
|
};
|
|
483
507
|
declare function listingValues(listing: {
|
|
484
508
|
price?: number | null;
|
|
@@ -514,7 +538,7 @@ declare function listingDescriptionPreview(description: string | null | undefine
|
|
|
514
538
|
declare function listingMediaOverlays(listing: {
|
|
515
539
|
media?: ListingMedia[] | null;
|
|
516
540
|
}): ListingMediaOverlay[];
|
|
517
|
-
declare function listingDetailModel(listing: Pick<ListingDetail, "id" | "listingCode" | "path" | "price" | "priceVisibility" | "description"> & {
|
|
541
|
+
declare function listingDetailModel(listing: Pick<ListingDetail, "id" | "listingCode" | "path" | "price" | "priceVisibility" | "description" | "developmentProfile"> & {
|
|
518
542
|
property?: ListingDetail["property"] | null;
|
|
519
543
|
location?: ListingLocation | null;
|
|
520
544
|
media?: ListingMedia[] | null;
|
|
@@ -696,11 +720,12 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
696
720
|
* and lead emitters) shipped in 0.13.0. `property_search` sends a city
|
|
697
721
|
* or neighborhood only when the site's location table knows it, as of
|
|
698
722
|
* 0.13.2. Development cards (`model.unitCount`, "A partir de" on a
|
|
699
|
-
* public price) shipped in 0.14.0.
|
|
723
|
+
* public price) shipped in 0.14.0. The listing-detail lançamento
|
|
724
|
+
* block (`model.development`) shipped in 0.15.0. Search filter helpers
|
|
700
725
|
* (`visibleSearchFilters` / `toolbarFilterIds`) shipped in 0.4.12 and
|
|
701
726
|
* remain on this pin.
|
|
702
727
|
*/
|
|
703
|
-
readonly minNpmVersion: "0.
|
|
728
|
+
readonly minNpmVersion: "0.15.0";
|
|
704
729
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
705
730
|
readonly selfInjectSince: "0.4.2";
|
|
706
731
|
readonly chromeStrategy: "app-owned";
|
|
@@ -847,6 +872,14 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
847
872
|
* `toListingCardModel` does not set it.
|
|
848
873
|
*/
|
|
849
874
|
readonly developmentCardSince: "0.14.0";
|
|
875
|
+
/**
|
|
876
|
+
* Listing-detail lançamento block (`model.development`). The API can
|
|
877
|
+
* return `developmentProfile` before this pin. Prompts must not name
|
|
878
|
+
* `model.development` until `minNpmVersion` reaches
|
|
879
|
+
* `developmentProfileSince` — an older `listingDetailModel` leaves it
|
|
880
|
+
* undefined and a generated page would render an empty section.
|
|
881
|
+
*/
|
|
882
|
+
readonly developmentProfileSince: "0.15.0";
|
|
850
883
|
};
|
|
851
884
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
852
885
|
/** Whether the pinned tarball carries the seller-lead surface. */
|
|
@@ -905,13 +938,19 @@ declare function studioPublishableKeyInstruction(): string;
|
|
|
905
938
|
declare function studioSdkPinInstruction(): string;
|
|
906
939
|
declare function studioLeadInstruction(): string;
|
|
907
940
|
declare function developmentCardPublished(pin?: string): boolean;
|
|
941
|
+
declare function developmentProfilePublished(pin?: string): boolean;
|
|
942
|
+
/**
|
|
943
|
+
* "Sobre o empreendimento" and "Tipologias disponíveis". Empty until the
|
|
944
|
+
* pin ships `listingDetailModel`'s `development` block.
|
|
945
|
+
*/
|
|
946
|
+
declare function studioDevelopmentProfileInstruction(pin?: string): string;
|
|
908
947
|
/**
|
|
909
948
|
* How a generated card renders a collapsed development. Empty until the
|
|
910
949
|
* pin ships `toListingCardModel`'s `unitCount`.
|
|
911
950
|
*/
|
|
912
951
|
declare function studioDevelopmentCardInstruction(pin?: string): string;
|
|
913
952
|
declare function studioListingCardInstruction(pin?: string): string;
|
|
914
|
-
declare function studioListingDetailInstruction(): string;
|
|
953
|
+
declare function studioListingDetailInstruction(pin?: string): string;
|
|
915
954
|
/**
|
|
916
955
|
* Listing-detail photo intelligence, gated on the published pin. The base
|
|
917
956
|
* sentence (caption-based `alt` / optional `caption` on gallery photos) is
|
|
@@ -1581,4 +1620,4 @@ declare function resolveMatchedCoverPhoto(photo: MatchedListingPhoto | null | un
|
|
|
1581
1620
|
*/
|
|
1582
1621
|
declare function applyMatchedPhotoCover<T extends Listing>(cards: ReadonlyArray<T>, photoResults: PhotoSearchResult | ReadonlyArray<PhotoSearchItem> | null | undefined, options?: ApplyMatchedPhotoCoverOptions): Array<T & ListingWithMatchedPhoto>;
|
|
1583
1622
|
|
|
1584
|
-
export { AMENITY_FALLBACK_LABELS, type AmenityLabelDictionary, type AmenityLabelOption, AppliedSearchChange, AppliedSearchQuery, type ApplyMatchedPhotoCoverOptions, BoundaryCity, BoundaryLayer, BoundaryLayerOptions, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, DEFAULT_MAPS_BASE_URL, DEFAULT_PHONE_COUNTRY_CODE, FetchLike, type GaragemClient, type GetLeadUiOptions, type GetListingMarketPositionOptions, type GetNeighborhoodSummaryOptions, type GetShareLinkOptions, type GetSimilarByPhotoOptions, type HHmm, LISTING_AMENITY_TITLES, LISTING_DESCRIPTION_CLAMP, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, Listing, type ListingAmenityGroup, type ListingAmenityGroupKey, type ListingAmenitySource, type ListingBreadcrumbCrumb, type ListingDescriptionPreview, ListingDetail, type ListingDetailFieldsModel, type ListingDetailFieldsSource, type ListingDetailModel, type ListingFact, ListingFilters, ListingLocation, type ListingLocationBlock, type ListingMarketPosition, ListingMedia, type ListingMediaOverlay, type ListingPhotoGroup, type ListingValue, type ListingVisualHighlightsOptions, ListingWithLocation, ListingWithMatchedPhoto, ListingsResult, type LocationFilterInput, MAPS_MAX_IMAGE_EDGE, MAPS_SITE_HEADER, MATCHED_PHOTO_COVER_MAX_DISTANCE, MAX_NATIONAL_PHONE_DIGITS, MapsCoordinates, MapsFetchOptions, type MarketListingType, type MarketPriceBand, type MarketPropertyType, type MarketUnavailableReason, MatchedListingPhoto, NeighborhoodBoundary, NeighborhoodBoundaryOptions, type NeighborhoodSummary, type NeighborhoodSummaryQuery, PHONE_COUNTRIES, PHOTO_GROUP_OTHER_KEY, PHOTO_GROUP_OTHER_LABEL, PHOTO_SEARCH_MIN_QUERY_LENGTH, type ParsedPhoneInput, type PhoneCountry, PhotoSearchItem, PhotoSearchParams, PhotoSearchResult, type PriceEstimate, type PriceEstimateConfidence, type PriceEstimateInput, QueryListingsFilters, QueryListingsParams, QueryListingsResult, RequestNextOptions, type RequestPriceEstimateOptions, type ResolvePublicSiteIdOptions, SELLER_LEAD_PHOTO_MAX_BYTES, SELLER_LEAD_PHOTO_MAX_COUNT, SELLER_LEAD_PHOTO_TYPES, SITE_ANALYTICS_EVENT, STUDIO_DEFAULT_PHOTO_SCHEDULE_CONFIG, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingPhotosOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, type SellerAddressErrors, type SellerAddressField, type SellerBusinessType, type SellerLeadAddress, type SellerLeadInput, type SellerLeadProperty, type SellerPhotoScheduleConfig, type ShareEntityType, type ShareLinkError, type ShareLinkErrorReason, type ShareLinkResult, type ShareLinkSuccess, type ShareLinkToken, type ShareListingEntity, type SimilarByPhotoItem, type SimilarByPhotoResult, SimilarListingsResult, type SimilarPhotoMatch, Site, StaticMapOptions, StreetViewAvailability, StreetViewAvailabilityOptions, StreetViewOptions, type StudioSdkContract, TravelDestination, TravelMode, TravelTime, TravelTimeCache, TravelTimeCacheOptions, TravelTimeElement, TravelTimeOptions, TravelTimesOptions, type UploadSellerLeadPhotoInput, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, analyticsDocumentGuardSource, applyMatchedPhotoCover, boundaryCitySlug, boundaryLayerId, boundaryLayerUrl, clearTravelTimeCache, coarsenCoordinates, coerceNpmVersion, collapseDuplicatedBrazilianMobileNine, compareSemver, composeSearchPublicHref, composeSearchPublicPath, coordinateDecimals, createClient, createGaragemClient, createTravelTimeCache, defaultPhoneCountry, developmentCardPublished, expandVisitSchedule, expandVisitTimeSlots, findPhoneCountry, formatAreaM2, formatGroupedInteger, formatListingPrice, formatPhoneNational, getBoundaryLayer, getLeadUi, getListingMarketPosition, getNeighborhoodSummary, getShareLink, getSimilarByPhoto, hasShowcaseLeadsPostUrl, isAnalyticsDocumentUrl, isAnalyticsOnPin, isPhotoSearchOnPin, isSellerLeadOnPin, isShareLinkOnPin, isStudioPreviewHost, isValidEmail, isValidName, isValidPhone, isVisitSlotAllowed, labelAmenities, listingAmenityGroups, listingBreadcrumb, listingBusinessLabel, listingCoordinates, listingDescriptionPreview, listingDetailFieldsModel, listingDetailModel, listingFacts, listingLocationBlock, listingLookupKey, listingMapsHref, listingMediaOverlays, listingPhotoGroups, listingPublicPath, listingStaticMapUrl, listingStreetViewAvailable, listingStreetViewMetadataUrl, listingStreetViewUrl, listingValues, listingVisualHighlights, mapsExportsPublished, marketExportsAvailableAt, marketPositionLabel, maxZoomForCoordinates, mergeAppliedSearchQueryIntoSearch, nationalPhoneDigits, neighborhoodBoundaryLayer, neighborhoodBoundaryUrl, normalizeMapsBaseUrl, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parsePhoneInput, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, phoneCountrySearchValue, photoRoomLabel, photoSearchUrl, priceBandLabel, reduceAppliedSearchQuery, remaskPhoneForCountry, requestPriceEstimate, resolveMatchedCoverPhoto, resolvePublicSiteId, resolveTravelDestination, searchListingPhotos, sellerAddressErrors, sellerPhotoSchedule, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioDevelopmentCardInstruction, studioLayoutInstruction, studioLeadInstruction, studioListingCardInstruction, studioListingDetailInstruction, studioListingViewInstruction, studioMapSearchInstruction, studioMapsInstruction, studioMarketInstruction, studioPhotoInstruction, studioPhotoInstructionFor, studioPhotoSearchInstruction, studioPublishableKeyInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSellerLeadSdkInstruction, studioShareLinkInstruction, studioSiteWidthCss, submitContactLead, submitSellerLead, submitVisitLead, toE164, trackListingView, travelTimeCacheKey, travelTimeFromListing, travelTimesFromListing, truncateNationalPhoneDigits, unavailableReactImports, uploadSellerLeadPhoto };
|
|
1623
|
+
export { AMENITY_FALLBACK_LABELS, type AmenityLabelDictionary, type AmenityLabelOption, AppliedSearchChange, AppliedSearchQuery, type ApplyMatchedPhotoCoverOptions, BoundaryCity, BoundaryLayer, BoundaryLayerOptions, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, DEFAULT_MAPS_BASE_URL, DEFAULT_PHONE_COUNTRY_CODE, FetchLike, type GaragemClient, type GetLeadUiOptions, type GetListingMarketPositionOptions, type GetNeighborhoodSummaryOptions, type GetShareLinkOptions, type GetSimilarByPhotoOptions, type HHmm, LISTING_AMENITY_TITLES, LISTING_DESCRIPTION_CLAMP, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, Listing, type ListingAmenityGroup, type ListingAmenityGroupKey, type ListingAmenitySource, type ListingBreadcrumbCrumb, type ListingDescriptionPreview, ListingDetail, type ListingDetailFieldsModel, type ListingDetailFieldsSource, type ListingDetailModel, type ListingFact, ListingFilters, ListingLocation, type ListingLocationBlock, type ListingMarketPosition, ListingMedia, type ListingMediaOverlay, type ListingPhotoGroup, type ListingValue, type ListingVisualHighlightsOptions, ListingWithLocation, ListingWithMatchedPhoto, ListingsResult, type LocationFilterInput, MAPS_MAX_IMAGE_EDGE, MAPS_SITE_HEADER, MATCHED_PHOTO_COVER_MAX_DISTANCE, MAX_NATIONAL_PHONE_DIGITS, MapsCoordinates, MapsFetchOptions, type MarketListingType, type MarketPriceBand, type MarketPropertyType, type MarketUnavailableReason, MatchedListingPhoto, NeighborhoodBoundary, NeighborhoodBoundaryOptions, type NeighborhoodSummary, type NeighborhoodSummaryQuery, PHONE_COUNTRIES, PHOTO_GROUP_OTHER_KEY, PHOTO_GROUP_OTHER_LABEL, PHOTO_SEARCH_MIN_QUERY_LENGTH, type ParsedPhoneInput, type PhoneCountry, PhotoSearchItem, PhotoSearchParams, PhotoSearchResult, type PriceEstimate, type PriceEstimateConfidence, type PriceEstimateInput, QueryListingsFilters, QueryListingsParams, QueryListingsResult, RequestNextOptions, type RequestPriceEstimateOptions, type ResolvePublicSiteIdOptions, SELLER_LEAD_PHOTO_MAX_BYTES, SELLER_LEAD_PHOTO_MAX_COUNT, SELLER_LEAD_PHOTO_TYPES, SITE_ANALYTICS_EVENT, STUDIO_DEFAULT_PHOTO_SCHEDULE_CONFIG, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingPhotosOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, type SellerAddressErrors, type SellerAddressField, type SellerBusinessType, type SellerLeadAddress, type SellerLeadInput, type SellerLeadProperty, type SellerPhotoScheduleConfig, type ShareEntityType, type ShareLinkError, type ShareLinkErrorReason, type ShareLinkResult, type ShareLinkSuccess, type ShareLinkToken, type ShareListingEntity, type SimilarByPhotoItem, type SimilarByPhotoResult, SimilarListingsResult, type SimilarPhotoMatch, Site, StaticMapOptions, StreetViewAvailability, StreetViewAvailabilityOptions, StreetViewOptions, type StudioSdkContract, TravelDestination, TravelMode, TravelTime, TravelTimeCache, TravelTimeCacheOptions, TravelTimeElement, TravelTimeOptions, TravelTimesOptions, type UploadSellerLeadPhotoInput, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, analyticsDocumentGuardSource, applyMatchedPhotoCover, boundaryCitySlug, boundaryLayerId, boundaryLayerUrl, clearTravelTimeCache, coarsenCoordinates, coerceNpmVersion, collapseDuplicatedBrazilianMobileNine, compareSemver, composeSearchPublicHref, composeSearchPublicPath, coordinateDecimals, createClient, createGaragemClient, createTravelTimeCache, defaultPhoneCountry, developmentCardPublished, developmentProfilePublished, expandVisitSchedule, expandVisitTimeSlots, findPhoneCountry, formatAreaM2, formatGroupedInteger, formatListingPrice, formatPhoneNational, getBoundaryLayer, getLeadUi, getListingMarketPosition, getNeighborhoodSummary, getShareLink, getSimilarByPhoto, hasShowcaseLeadsPostUrl, isAnalyticsDocumentUrl, isAnalyticsOnPin, isPhotoSearchOnPin, isSellerLeadOnPin, isShareLinkOnPin, isStudioPreviewHost, isValidEmail, isValidName, isValidPhone, isVisitSlotAllowed, labelAmenities, listingAmenityGroups, listingBreadcrumb, listingBusinessLabel, listingCoordinates, listingDescriptionPreview, listingDetailFieldsModel, listingDetailModel, listingFacts, listingLocationBlock, listingLookupKey, listingMapsHref, listingMediaOverlays, listingPhotoGroups, listingPublicPath, listingStaticMapUrl, listingStreetViewAvailable, listingStreetViewMetadataUrl, listingStreetViewUrl, listingValues, listingVisualHighlights, mapsExportsPublished, marketExportsAvailableAt, marketPositionLabel, maxZoomForCoordinates, mergeAppliedSearchQueryIntoSearch, nationalPhoneDigits, neighborhoodBoundaryLayer, neighborhoodBoundaryUrl, normalizeMapsBaseUrl, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parsePhoneInput, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, phoneCountrySearchValue, photoRoomLabel, photoSearchUrl, priceBandLabel, reduceAppliedSearchQuery, remaskPhoneForCountry, requestPriceEstimate, resolveMatchedCoverPhoto, resolvePublicSiteId, resolveTravelDestination, searchListingPhotos, sellerAddressErrors, sellerPhotoSchedule, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioDevelopmentCardInstruction, studioDevelopmentProfileInstruction, studioLayoutInstruction, studioLeadInstruction, studioListingCardInstruction, studioListingDetailInstruction, studioListingViewInstruction, studioMapSearchInstruction, studioMapsInstruction, studioMarketInstruction, studioPhotoInstruction, studioPhotoInstructionFor, studioPhotoSearchInstruction, studioPublishableKeyInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSellerLeadSdkInstruction, studioShareLinkInstruction, studioSiteWidthCss, submitContactLead, submitSellerLead, submitVisitLead, toE164, trackListingView, travelTimeCacheKey, travelTimeFromListing, travelTimesFromListing, truncateNationalPhoneDigits, unavailableReactImports, uploadSellerLeadPhoto };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as ListingDetail, F as FetchLike, R as RequestNextOptions, a as Listing, b as ListingLocation, c as ListingMedia, S as SearchPathFilters, d as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, e as AppliedSearchChange, f as ListingFilters, g as ListingsResult, h as Site, i as SearchListingsParams, j as SearchListingsResult, k as SearchUi, l as QueryListingsParams, m as QueryListingsResult, n as SimilarListingsResult, C as CmsCollection, o as CmsEntriesResult, p as CmsEntry, B as BoundaryCity, q as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, r as TravelTimeCache, s as MapsFetchOptions, t as BoundaryLayer, u as ListingWithLocation, v as StaticMapOptions, w as StreetViewAvailabilityOptions, x as StreetViewAvailability, y as StreetViewOptions, N as NeighborhoodBoundaryOptions, z as NeighborhoodBoundary, D as TravelDestination, E as TravelMode, G as TravelTimeOptions, H as TravelTime, I as TravelTimesOptions, J as TravelTimeElement, P as PhotoSearchParams, K as PhotoSearchResult, O as PhotoSearchItem, U as ListingWithMatchedPhoto, V as MatchedListingPhoto } from './types-photo-search
|
|
2
|
-
export { W as BoundaryFeature, X as BoundaryFeatureCollection, Y as BoundaryGeometry, Z as BoundaryLayerUrlKind, _ as BoundarySourceLayer, $ as CmsEntryStatus, a0 as CmsFieldDefinition, a1 as CmsFieldType, a2 as CmsSeoData, a3 as FORBIDDEN_SEARCH_QUERY_KEYS, a4 as GaragemSdkError, a5 as GetCmsCollectionOptions, a6 as GetCmsCollectionsOptions, a7 as GetCmsEntriesOptions, a8 as GetCmsEntryOptions, a9 as GetListingOptions, aa as GetListingsOptions, ab as GetSearchUiOptions, ac as GetSimilarListingsOptions, ad as GetSiteOptions, ae as ListingBusinessType, af as ListingCardModel, ag as ListingPriceVisibility, ah as ListingPropertySummary, ai as LocationNameTables, aj as MAP_POLYGON_MAX_VERTICES, ak as MAP_SEARCH_DEFAULT_PAGE_SIZE, al as MAP_SEARCH_MAX_PAGE_SIZE, am as MAP_VIEWPORT_DEBOUNCE_MS, an as MapBounds, ao as MapBoundsSearchOptions, ap as MapBucket, aq as MapPin, ar as MapPinCluster, as as MapPolygon, at as MapPolygonSearchOptions, au as MapSearchResult, av as MapsBaseOptions, aw as QueryListingsLocation, ax as QueryListingsOptions, ay as SEARCH_EMPTY_COPY, az as SEARCH_SORT_RELEVANCE, aA as SearchChromeModel, aB as SearchListingsOptions, aC as SearchPathLocation, aD as SearchUiFilter, aE as SearchUiOption, aF as StaticMapStyle, aG as TOOLBAR_PRIMARY_FILTER_IDS, aH as applyPathFilter, aI as buildQueryListingsParams, aJ as canonicalizeSearchHref, aK as capMapPage, aL as capMapPageSize, aM as clearStagedPathFilters, aN as clusterBuckets, aO as clusterPins, aP as countFacetChoices, aQ as countOptionLabel, aR as displayPathLocation, aS as getCmsCollection, aT as getCmsCollections, aU as getCmsEntries, aV as getCmsEntry, aW as getListing, aX as getListings, aY as getSearchUi, aZ as getSimilarListings, a_ as getSite, a$ as hrefForAppliedChange, b0 as hrefForPathFilters, b1 as hrefWithExplicitPage, b2 as isListingDetailPath, b3 as isMapBounds, b4 as isMapPolygon, b5 as listingLocationLabel, b6 as mapClusterCellDegrees, b7 as mapSearchPins, b8 as paginationPages, b9 as pathFilterHasOption, ba as pathFilterValue, bb as publicSearchHref, bc as queryListings, bd as rangeDraftFromPath, be as readPublicSearch, bf as searchChromeModel, bg as searchHrefUsesLegacyFilterQuery, bh as searchListings, bi as searchListingsInBounds, bj as searchListingsInPolygon, bk as searchResultsHeading, bl as searchSortOptions, bm as toListingCardModel, bn as toolbarFilterIds, bo as unknownSearchLocation, bp as visibleSearchFilters } from './types-photo-search
|
|
1
|
+
import { L as ListingDetail, F as FetchLike, R as RequestNextOptions, a as Listing, b as ListingLocation, c as ListingMedia, S as SearchPathFilters, d as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, e as AppliedSearchChange, f as ListingFilters, g as ListingsResult, h as Site, i as SearchListingsParams, j as SearchListingsResult, k as SearchUi, l as QueryListingsParams, m as QueryListingsResult, n as SimilarListingsResult, C as CmsCollection, o as CmsEntriesResult, p as CmsEntry, B as BoundaryCity, q as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, r as TravelTimeCache, s as MapsFetchOptions, t as BoundaryLayer, u as ListingWithLocation, v as StaticMapOptions, w as StreetViewAvailabilityOptions, x as StreetViewAvailability, y as StreetViewOptions, N as NeighborhoodBoundaryOptions, z as NeighborhoodBoundary, D as TravelDestination, E as TravelMode, G as TravelTimeOptions, H as TravelTime, I as TravelTimesOptions, J as TravelTimeElement, P as PhotoSearchParams, K as PhotoSearchResult, O as PhotoSearchItem, U as ListingWithMatchedPhoto, V as MatchedListingPhoto } from './types-photo-search-BqKzj97S.js';
|
|
2
|
+
export { W as BoundaryFeature, X as BoundaryFeatureCollection, Y as BoundaryGeometry, Z as BoundaryLayerUrlKind, _ as BoundarySourceLayer, $ as CmsEntryStatus, a0 as CmsFieldDefinition, a1 as CmsFieldType, a2 as CmsSeoData, a3 as FORBIDDEN_SEARCH_QUERY_KEYS, a4 as GaragemSdkError, a5 as GetCmsCollectionOptions, a6 as GetCmsCollectionsOptions, a7 as GetCmsEntriesOptions, a8 as GetCmsEntryOptions, a9 as GetListingOptions, aa as GetListingsOptions, ab as GetSearchUiOptions, ac as GetSimilarListingsOptions, ad as GetSiteOptions, ae as ListingBusinessType, af as ListingCardModel, ag as ListingPriceVisibility, ah as ListingPropertySummary, ai as LocationNameTables, aj as MAP_POLYGON_MAX_VERTICES, ak as MAP_SEARCH_DEFAULT_PAGE_SIZE, al as MAP_SEARCH_MAX_PAGE_SIZE, am as MAP_VIEWPORT_DEBOUNCE_MS, an as MapBounds, ao as MapBoundsSearchOptions, ap as MapBucket, aq as MapPin, ar as MapPinCluster, as as MapPolygon, at as MapPolygonSearchOptions, au as MapSearchResult, av as MapsBaseOptions, aw as QueryListingsLocation, ax as QueryListingsOptions, ay as SEARCH_EMPTY_COPY, az as SEARCH_SORT_RELEVANCE, aA as SearchChromeModel, aB as SearchListingsOptions, aC as SearchPathLocation, aD as SearchUiFilter, aE as SearchUiOption, aF as StaticMapStyle, aG as TOOLBAR_PRIMARY_FILTER_IDS, aH as applyPathFilter, aI as buildQueryListingsParams, aJ as canonicalizeSearchHref, aK as capMapPage, aL as capMapPageSize, aM as clearStagedPathFilters, aN as clusterBuckets, aO as clusterPins, aP as countFacetChoices, aQ as countOptionLabel, aR as displayPathLocation, aS as getCmsCollection, aT as getCmsCollections, aU as getCmsEntries, aV as getCmsEntry, aW as getListing, aX as getListings, aY as getSearchUi, aZ as getSimilarListings, a_ as getSite, a$ as hrefForAppliedChange, b0 as hrefForPathFilters, b1 as hrefWithExplicitPage, b2 as isListingDetailPath, b3 as isMapBounds, b4 as isMapPolygon, b5 as listingLocationLabel, b6 as mapClusterCellDegrees, b7 as mapSearchPins, b8 as paginationPages, b9 as pathFilterHasOption, ba as pathFilterValue, bb as publicSearchHref, bc as queryListings, bd as rangeDraftFromPath, be as readPublicSearch, bf as searchChromeModel, bg as searchHrefUsesLegacyFilterQuery, bh as searchListings, bi as searchListingsInBounds, bj as searchListingsInPolygon, bk as searchResultsHeading, bl as searchSortOptions, bm as toListingCardModel, bn as toolbarFilterIds, bo as unknownSearchLocation, bp as visibleSearchFilters } from './types-photo-search-BqKzj97S.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Types for the public Share Link API (`GET`/`POST /api/sites/share/{token}`).
|
|
@@ -436,6 +436,24 @@ declare function listingPublicPath(listing: {
|
|
|
436
436
|
id?: string | null;
|
|
437
437
|
}): string;
|
|
438
438
|
|
|
439
|
+
type ListingDevelopmentFact = {
|
|
440
|
+
label: string;
|
|
441
|
+
text: string;
|
|
442
|
+
};
|
|
443
|
+
type ListingDevelopmentTypologyModel = {
|
|
444
|
+
name: string;
|
|
445
|
+
code: string | null;
|
|
446
|
+
availableLabel: string | null;
|
|
447
|
+
specs: string | null;
|
|
448
|
+
priceLabel: string;
|
|
449
|
+
pricePerSqmLabel: string | null;
|
|
450
|
+
};
|
|
451
|
+
type ListingDevelopmentModel = {
|
|
452
|
+
name: string;
|
|
453
|
+
facts: ListingDevelopmentFact[];
|
|
454
|
+
typologies: ListingDevelopmentTypologyModel[];
|
|
455
|
+
};
|
|
456
|
+
|
|
439
457
|
declare const LISTING_DESCRIPTION_CLAMP = 280;
|
|
440
458
|
/** Visible listing fact. The number / area / floor is `text` — never omit it. */
|
|
441
459
|
type ListingFact = {
|
|
@@ -479,6 +497,12 @@ type ListingDetailModel = {
|
|
|
479
497
|
descriptionTruncated: boolean;
|
|
480
498
|
descriptionToggleLabel: string | null;
|
|
481
499
|
mediaOverlays: ListingMediaOverlay[];
|
|
500
|
+
/**
|
|
501
|
+
* Lançamento block. Null on a resale, including a condo that has
|
|
502
|
+
* `listing.building`. Search-card `listing.development` is a different
|
|
503
|
+
* field (collapsed unit count) and is not this object.
|
|
504
|
+
*/
|
|
505
|
+
development: ListingDevelopmentModel | null;
|
|
482
506
|
};
|
|
483
507
|
declare function listingValues(listing: {
|
|
484
508
|
price?: number | null;
|
|
@@ -514,7 +538,7 @@ declare function listingDescriptionPreview(description: string | null | undefine
|
|
|
514
538
|
declare function listingMediaOverlays(listing: {
|
|
515
539
|
media?: ListingMedia[] | null;
|
|
516
540
|
}): ListingMediaOverlay[];
|
|
517
|
-
declare function listingDetailModel(listing: Pick<ListingDetail, "id" | "listingCode" | "path" | "price" | "priceVisibility" | "description"> & {
|
|
541
|
+
declare function listingDetailModel(listing: Pick<ListingDetail, "id" | "listingCode" | "path" | "price" | "priceVisibility" | "description" | "developmentProfile"> & {
|
|
518
542
|
property?: ListingDetail["property"] | null;
|
|
519
543
|
location?: ListingLocation | null;
|
|
520
544
|
media?: ListingMedia[] | null;
|
|
@@ -696,11 +720,12 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
696
720
|
* and lead emitters) shipped in 0.13.0. `property_search` sends a city
|
|
697
721
|
* or neighborhood only when the site's location table knows it, as of
|
|
698
722
|
* 0.13.2. Development cards (`model.unitCount`, "A partir de" on a
|
|
699
|
-
* public price) shipped in 0.14.0.
|
|
723
|
+
* public price) shipped in 0.14.0. The listing-detail lançamento
|
|
724
|
+
* block (`model.development`) shipped in 0.15.0. Search filter helpers
|
|
700
725
|
* (`visibleSearchFilters` / `toolbarFilterIds`) shipped in 0.4.12 and
|
|
701
726
|
* remain on this pin.
|
|
702
727
|
*/
|
|
703
|
-
readonly minNpmVersion: "0.
|
|
728
|
+
readonly minNpmVersion: "0.15.0";
|
|
704
729
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
705
730
|
readonly selfInjectSince: "0.4.2";
|
|
706
731
|
readonly chromeStrategy: "app-owned";
|
|
@@ -847,6 +872,14 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
847
872
|
* `toListingCardModel` does not set it.
|
|
848
873
|
*/
|
|
849
874
|
readonly developmentCardSince: "0.14.0";
|
|
875
|
+
/**
|
|
876
|
+
* Listing-detail lançamento block (`model.development`). The API can
|
|
877
|
+
* return `developmentProfile` before this pin. Prompts must not name
|
|
878
|
+
* `model.development` until `minNpmVersion` reaches
|
|
879
|
+
* `developmentProfileSince` — an older `listingDetailModel` leaves it
|
|
880
|
+
* undefined and a generated page would render an empty section.
|
|
881
|
+
*/
|
|
882
|
+
readonly developmentProfileSince: "0.15.0";
|
|
850
883
|
};
|
|
851
884
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
852
885
|
/** Whether the pinned tarball carries the seller-lead surface. */
|
|
@@ -905,13 +938,19 @@ declare function studioPublishableKeyInstruction(): string;
|
|
|
905
938
|
declare function studioSdkPinInstruction(): string;
|
|
906
939
|
declare function studioLeadInstruction(): string;
|
|
907
940
|
declare function developmentCardPublished(pin?: string): boolean;
|
|
941
|
+
declare function developmentProfilePublished(pin?: string): boolean;
|
|
942
|
+
/**
|
|
943
|
+
* "Sobre o empreendimento" and "Tipologias disponíveis". Empty until the
|
|
944
|
+
* pin ships `listingDetailModel`'s `development` block.
|
|
945
|
+
*/
|
|
946
|
+
declare function studioDevelopmentProfileInstruction(pin?: string): string;
|
|
908
947
|
/**
|
|
909
948
|
* How a generated card renders a collapsed development. Empty until the
|
|
910
949
|
* pin ships `toListingCardModel`'s `unitCount`.
|
|
911
950
|
*/
|
|
912
951
|
declare function studioDevelopmentCardInstruction(pin?: string): string;
|
|
913
952
|
declare function studioListingCardInstruction(pin?: string): string;
|
|
914
|
-
declare function studioListingDetailInstruction(): string;
|
|
953
|
+
declare function studioListingDetailInstruction(pin?: string): string;
|
|
915
954
|
/**
|
|
916
955
|
* Listing-detail photo intelligence, gated on the published pin. The base
|
|
917
956
|
* sentence (caption-based `alt` / optional `caption` on gallery photos) is
|
|
@@ -1581,4 +1620,4 @@ declare function resolveMatchedCoverPhoto(photo: MatchedListingPhoto | null | un
|
|
|
1581
1620
|
*/
|
|
1582
1621
|
declare function applyMatchedPhotoCover<T extends Listing>(cards: ReadonlyArray<T>, photoResults: PhotoSearchResult | ReadonlyArray<PhotoSearchItem> | null | undefined, options?: ApplyMatchedPhotoCoverOptions): Array<T & ListingWithMatchedPhoto>;
|
|
1583
1622
|
|
|
1584
|
-
export { AMENITY_FALLBACK_LABELS, type AmenityLabelDictionary, type AmenityLabelOption, AppliedSearchChange, AppliedSearchQuery, type ApplyMatchedPhotoCoverOptions, BoundaryCity, BoundaryLayer, BoundaryLayerOptions, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, DEFAULT_MAPS_BASE_URL, DEFAULT_PHONE_COUNTRY_CODE, FetchLike, type GaragemClient, type GetLeadUiOptions, type GetListingMarketPositionOptions, type GetNeighborhoodSummaryOptions, type GetShareLinkOptions, type GetSimilarByPhotoOptions, type HHmm, LISTING_AMENITY_TITLES, LISTING_DESCRIPTION_CLAMP, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, Listing, type ListingAmenityGroup, type ListingAmenityGroupKey, type ListingAmenitySource, type ListingBreadcrumbCrumb, type ListingDescriptionPreview, ListingDetail, type ListingDetailFieldsModel, type ListingDetailFieldsSource, type ListingDetailModel, type ListingFact, ListingFilters, ListingLocation, type ListingLocationBlock, type ListingMarketPosition, ListingMedia, type ListingMediaOverlay, type ListingPhotoGroup, type ListingValue, type ListingVisualHighlightsOptions, ListingWithLocation, ListingWithMatchedPhoto, ListingsResult, type LocationFilterInput, MAPS_MAX_IMAGE_EDGE, MAPS_SITE_HEADER, MATCHED_PHOTO_COVER_MAX_DISTANCE, MAX_NATIONAL_PHONE_DIGITS, MapsCoordinates, MapsFetchOptions, type MarketListingType, type MarketPriceBand, type MarketPropertyType, type MarketUnavailableReason, MatchedListingPhoto, NeighborhoodBoundary, NeighborhoodBoundaryOptions, type NeighborhoodSummary, type NeighborhoodSummaryQuery, PHONE_COUNTRIES, PHOTO_GROUP_OTHER_KEY, PHOTO_GROUP_OTHER_LABEL, PHOTO_SEARCH_MIN_QUERY_LENGTH, type ParsedPhoneInput, type PhoneCountry, PhotoSearchItem, PhotoSearchParams, PhotoSearchResult, type PriceEstimate, type PriceEstimateConfidence, type PriceEstimateInput, QueryListingsFilters, QueryListingsParams, QueryListingsResult, RequestNextOptions, type RequestPriceEstimateOptions, type ResolvePublicSiteIdOptions, SELLER_LEAD_PHOTO_MAX_BYTES, SELLER_LEAD_PHOTO_MAX_COUNT, SELLER_LEAD_PHOTO_TYPES, SITE_ANALYTICS_EVENT, STUDIO_DEFAULT_PHOTO_SCHEDULE_CONFIG, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingPhotosOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, type SellerAddressErrors, type SellerAddressField, type SellerBusinessType, type SellerLeadAddress, type SellerLeadInput, type SellerLeadProperty, type SellerPhotoScheduleConfig, type ShareEntityType, type ShareLinkError, type ShareLinkErrorReason, type ShareLinkResult, type ShareLinkSuccess, type ShareLinkToken, type ShareListingEntity, type SimilarByPhotoItem, type SimilarByPhotoResult, SimilarListingsResult, type SimilarPhotoMatch, Site, StaticMapOptions, StreetViewAvailability, StreetViewAvailabilityOptions, StreetViewOptions, type StudioSdkContract, TravelDestination, TravelMode, TravelTime, TravelTimeCache, TravelTimeCacheOptions, TravelTimeElement, TravelTimeOptions, TravelTimesOptions, type UploadSellerLeadPhotoInput, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, analyticsDocumentGuardSource, applyMatchedPhotoCover, boundaryCitySlug, boundaryLayerId, boundaryLayerUrl, clearTravelTimeCache, coarsenCoordinates, coerceNpmVersion, collapseDuplicatedBrazilianMobileNine, compareSemver, composeSearchPublicHref, composeSearchPublicPath, coordinateDecimals, createClient, createGaragemClient, createTravelTimeCache, defaultPhoneCountry, developmentCardPublished, expandVisitSchedule, expandVisitTimeSlots, findPhoneCountry, formatAreaM2, formatGroupedInteger, formatListingPrice, formatPhoneNational, getBoundaryLayer, getLeadUi, getListingMarketPosition, getNeighborhoodSummary, getShareLink, getSimilarByPhoto, hasShowcaseLeadsPostUrl, isAnalyticsDocumentUrl, isAnalyticsOnPin, isPhotoSearchOnPin, isSellerLeadOnPin, isShareLinkOnPin, isStudioPreviewHost, isValidEmail, isValidName, isValidPhone, isVisitSlotAllowed, labelAmenities, listingAmenityGroups, listingBreadcrumb, listingBusinessLabel, listingCoordinates, listingDescriptionPreview, listingDetailFieldsModel, listingDetailModel, listingFacts, listingLocationBlock, listingLookupKey, listingMapsHref, listingMediaOverlays, listingPhotoGroups, listingPublicPath, listingStaticMapUrl, listingStreetViewAvailable, listingStreetViewMetadataUrl, listingStreetViewUrl, listingValues, listingVisualHighlights, mapsExportsPublished, marketExportsAvailableAt, marketPositionLabel, maxZoomForCoordinates, mergeAppliedSearchQueryIntoSearch, nationalPhoneDigits, neighborhoodBoundaryLayer, neighborhoodBoundaryUrl, normalizeMapsBaseUrl, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parsePhoneInput, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, phoneCountrySearchValue, photoRoomLabel, photoSearchUrl, priceBandLabel, reduceAppliedSearchQuery, remaskPhoneForCountry, requestPriceEstimate, resolveMatchedCoverPhoto, resolvePublicSiteId, resolveTravelDestination, searchListingPhotos, sellerAddressErrors, sellerPhotoSchedule, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioDevelopmentCardInstruction, studioLayoutInstruction, studioLeadInstruction, studioListingCardInstruction, studioListingDetailInstruction, studioListingViewInstruction, studioMapSearchInstruction, studioMapsInstruction, studioMarketInstruction, studioPhotoInstruction, studioPhotoInstructionFor, studioPhotoSearchInstruction, studioPublishableKeyInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSellerLeadSdkInstruction, studioShareLinkInstruction, studioSiteWidthCss, submitContactLead, submitSellerLead, submitVisitLead, toE164, trackListingView, travelTimeCacheKey, travelTimeFromListing, travelTimesFromListing, truncateNationalPhoneDigits, unavailableReactImports, uploadSellerLeadPhoto };
|
|
1623
|
+
export { AMENITY_FALLBACK_LABELS, type AmenityLabelDictionary, type AmenityLabelOption, AppliedSearchChange, AppliedSearchQuery, type ApplyMatchedPhotoCoverOptions, BoundaryCity, BoundaryLayer, BoundaryLayerOptions, CmsCollection, CmsEntriesResult, CmsEntry, type ContactLeadInput, type CreateGaragemClientOptions, DEFAULT_MAPS_BASE_URL, DEFAULT_PHONE_COUNTRY_CODE, FetchLike, type GaragemClient, type GetLeadUiOptions, type GetListingMarketPositionOptions, type GetNeighborhoodSummaryOptions, type GetShareLinkOptions, type GetSimilarByPhotoOptions, type HHmm, LISTING_AMENITY_TITLES, LISTING_DESCRIPTION_CLAMP, type LeadContact, type LeadField, type LeadFieldId, LeadSubmitError, type LeadSubmitErrorCode, type LeadSubmitResult, type LeadUi, Listing, type ListingAmenityGroup, type ListingAmenityGroupKey, type ListingAmenitySource, type ListingBreadcrumbCrumb, type ListingDescriptionPreview, ListingDetail, type ListingDetailFieldsModel, type ListingDetailFieldsSource, type ListingDetailModel, type ListingFact, ListingFilters, ListingLocation, type ListingLocationBlock, type ListingMarketPosition, ListingMedia, type ListingMediaOverlay, type ListingPhotoGroup, type ListingValue, type ListingVisualHighlightsOptions, ListingWithLocation, ListingWithMatchedPhoto, ListingsResult, type LocationFilterInput, MAPS_MAX_IMAGE_EDGE, MAPS_SITE_HEADER, MATCHED_PHOTO_COVER_MAX_DISTANCE, MAX_NATIONAL_PHONE_DIGITS, MapsCoordinates, MapsFetchOptions, type MarketListingType, type MarketPriceBand, type MarketPropertyType, type MarketUnavailableReason, MatchedListingPhoto, NeighborhoodBoundary, NeighborhoodBoundaryOptions, type NeighborhoodSummary, type NeighborhoodSummaryQuery, PHONE_COUNTRIES, PHOTO_GROUP_OTHER_KEY, PHOTO_GROUP_OTHER_LABEL, PHOTO_SEARCH_MIN_QUERY_LENGTH, type ParsedPhoneInput, type PhoneCountry, PhotoSearchItem, PhotoSearchParams, PhotoSearchResult, type PriceEstimate, type PriceEstimateConfidence, type PriceEstimateInput, QueryListingsFilters, QueryListingsParams, QueryListingsResult, RequestNextOptions, type RequestPriceEstimateOptions, type ResolvePublicSiteIdOptions, SELLER_LEAD_PHOTO_MAX_BYTES, SELLER_LEAD_PHOTO_MAX_COUNT, SELLER_LEAD_PHOTO_TYPES, SITE_ANALYTICS_EVENT, STUDIO_DEFAULT_PHOTO_SCHEDULE_CONFIG, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingPhotosOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, type SellerAddressErrors, type SellerAddressField, type SellerBusinessType, type SellerLeadAddress, type SellerLeadInput, type SellerLeadProperty, type SellerPhotoScheduleConfig, type ShareEntityType, type ShareLinkError, type ShareLinkErrorReason, type ShareLinkResult, type ShareLinkSuccess, type ShareLinkToken, type ShareListingEntity, type SimilarByPhotoItem, type SimilarByPhotoResult, SimilarListingsResult, type SimilarPhotoMatch, Site, StaticMapOptions, StreetViewAvailability, StreetViewAvailabilityOptions, StreetViewOptions, type StudioSdkContract, TravelDestination, TravelMode, TravelTime, TravelTimeCache, TravelTimeCacheOptions, TravelTimeElement, TravelTimeOptions, TravelTimesOptions, type UploadSellerLeadPhotoInput, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, analyticsDocumentGuardSource, applyMatchedPhotoCover, boundaryCitySlug, boundaryLayerId, boundaryLayerUrl, clearTravelTimeCache, coarsenCoordinates, coerceNpmVersion, collapseDuplicatedBrazilianMobileNine, compareSemver, composeSearchPublicHref, composeSearchPublicPath, coordinateDecimals, createClient, createGaragemClient, createTravelTimeCache, defaultPhoneCountry, developmentCardPublished, developmentProfilePublished, expandVisitSchedule, expandVisitTimeSlots, findPhoneCountry, formatAreaM2, formatGroupedInteger, formatListingPrice, formatPhoneNational, getBoundaryLayer, getLeadUi, getListingMarketPosition, getNeighborhoodSummary, getShareLink, getSimilarByPhoto, hasShowcaseLeadsPostUrl, isAnalyticsDocumentUrl, isAnalyticsOnPin, isPhotoSearchOnPin, isSellerLeadOnPin, isShareLinkOnPin, isStudioPreviewHost, isValidEmail, isValidName, isValidPhone, isVisitSlotAllowed, labelAmenities, listingAmenityGroups, listingBreadcrumb, listingBusinessLabel, listingCoordinates, listingDescriptionPreview, listingDetailFieldsModel, listingDetailModel, listingFacts, listingLocationBlock, listingLookupKey, listingMapsHref, listingMediaOverlays, listingPhotoGroups, listingPublicPath, listingStaticMapUrl, listingStreetViewAvailable, listingStreetViewMetadataUrl, listingStreetViewUrl, listingValues, listingVisualHighlights, mapsExportsPublished, marketExportsAvailableAt, marketPositionLabel, maxZoomForCoordinates, mergeAppliedSearchQueryIntoSearch, nationalPhoneDigits, neighborhoodBoundaryLayer, neighborhoodBoundaryUrl, normalizeMapsBaseUrl, normalizeVisitDate, normalizeVisitTime, parseAppliedSearchQuery, parseGroupedInteger, parsePhoneInput, parseReactSdkNamedImports, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, phoneCountrySearchValue, photoRoomLabel, photoSearchUrl, priceBandLabel, reduceAppliedSearchQuery, remaskPhoneForCountry, requestPriceEstimate, resolveMatchedCoverPhoto, resolvePublicSiteId, resolveTravelDestination, searchListingPhotos, sellerAddressErrors, sellerPhotoSchedule, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioDevelopmentCardInstruction, studioDevelopmentProfileInstruction, studioLayoutInstruction, studioLeadInstruction, studioListingCardInstruction, studioListingDetailInstruction, studioListingViewInstruction, studioMapSearchInstruction, studioMapsInstruction, studioMarketInstruction, studioPhotoInstruction, studioPhotoInstructionFor, studioPhotoSearchInstruction, studioPublishableKeyInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSellerLeadSdkInstruction, studioShareLinkInstruction, studioSiteWidthCss, submitContactLead, submitSellerLead, submitVisitLead, toE164, trackListingView, travelTimeCacheKey, travelTimeFromListing, travelTimesFromListing, truncateNationalPhoneDigits, unavailableReactImports, uploadSellerLeadPhoto };
|
package/dist/index.js
CHANGED
|
@@ -81,6 +81,7 @@ __export(src_exports, {
|
|
|
81
81
|
createTravelTimeCache: () => createTravelTimeCache,
|
|
82
82
|
defaultPhoneCountry: () => defaultPhoneCountry,
|
|
83
83
|
developmentCardPublished: () => developmentCardPublished,
|
|
84
|
+
developmentProfilePublished: () => developmentProfilePublished,
|
|
84
85
|
displayPathLocation: () => displayPathLocation,
|
|
85
86
|
expandVisitSchedule: () => expandVisitSchedule,
|
|
86
87
|
expandVisitTimeSlots: () => expandVisitTimeSlots,
|
|
@@ -197,6 +198,7 @@ __export(src_exports, {
|
|
|
197
198
|
studioCodegenContractViolations: () => studioCodegenContractViolations,
|
|
198
199
|
studioDefaultLeadUi: () => studioDefaultLeadUi,
|
|
199
200
|
studioDevelopmentCardInstruction: () => studioDevelopmentCardInstruction,
|
|
201
|
+
studioDevelopmentProfileInstruction: () => studioDevelopmentProfileInstruction,
|
|
200
202
|
studioLayoutInstruction: () => studioLayoutInstruction,
|
|
201
203
|
studioLeadInstruction: () => studioLeadInstruction,
|
|
202
204
|
studioListingCardInstruction: () => studioListingCardInstruction,
|
|
@@ -3135,6 +3137,76 @@ function listingAmenityGroups(listing, dictionary) {
|
|
|
3135
3137
|
return groups;
|
|
3136
3138
|
}
|
|
3137
3139
|
|
|
3140
|
+
// src/listing-development.ts
|
|
3141
|
+
function formatDateBR(iso) {
|
|
3142
|
+
const match = iso.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
3143
|
+
if (!match) return iso;
|
|
3144
|
+
return `${match[3]}/${match[2]}/${match[1]}`;
|
|
3145
|
+
}
|
|
3146
|
+
function countLabel(count, singular, plural) {
|
|
3147
|
+
return `${count} ${count === 1 ? singular : plural}`;
|
|
3148
|
+
}
|
|
3149
|
+
function typologySpecs(typology) {
|
|
3150
|
+
const parts = [];
|
|
3151
|
+
if (typology.bedrooms > 0) {
|
|
3152
|
+
parts.push(countLabel(typology.bedrooms, "quarto", "quartos"));
|
|
3153
|
+
}
|
|
3154
|
+
if (typology.bathrooms > 0) {
|
|
3155
|
+
parts.push(countLabel(typology.bathrooms, "banheiro", "banheiros"));
|
|
3156
|
+
}
|
|
3157
|
+
if (typology.area != null && typology.area > 0) {
|
|
3158
|
+
parts.push(`${Math.round(typology.area)} m\xB2`);
|
|
3159
|
+
}
|
|
3160
|
+
return parts.length > 0 ? parts.join(" \xB7 ") : null;
|
|
3161
|
+
}
|
|
3162
|
+
function typologyModel(typology) {
|
|
3163
|
+
const available = typology.availableUnits != null && typology.availableUnits > 0 ? typology.availableUnits : null;
|
|
3164
|
+
return {
|
|
3165
|
+
name: typology.name,
|
|
3166
|
+
code: typology.code?.trim() || null,
|
|
3167
|
+
availableLabel: available == null ? null : countLabel(available, "dispon\xEDvel", "dispon\xEDveis"),
|
|
3168
|
+
specs: typologySpecs(typology),
|
|
3169
|
+
priceLabel: formatListingPrice(typology.price),
|
|
3170
|
+
pricePerSqmLabel: typology.pricePerSqm == null ? null : `${formatListingPrice(typology.pricePerSqm)}/m\xB2`
|
|
3171
|
+
};
|
|
3172
|
+
}
|
|
3173
|
+
function developmentFacts(profile) {
|
|
3174
|
+
const facts = [];
|
|
3175
|
+
if (profile.developer) {
|
|
3176
|
+
facts.push({ label: "Construtora", text: profile.developer });
|
|
3177
|
+
}
|
|
3178
|
+
if (profile.deliveryDate) {
|
|
3179
|
+
facts.push({
|
|
3180
|
+
label: "Data de entrega",
|
|
3181
|
+
text: formatDateBR(profile.deliveryDate)
|
|
3182
|
+
});
|
|
3183
|
+
}
|
|
3184
|
+
if (profile.launchDate) {
|
|
3185
|
+
facts.push({ label: "Lan\xE7amento", text: formatDateBR(profile.launchDate) });
|
|
3186
|
+
}
|
|
3187
|
+
if (profile.towers != null && profile.towers > 0) {
|
|
3188
|
+
facts.push({ label: "Torres", text: String(profile.towers) });
|
|
3189
|
+
}
|
|
3190
|
+
if (profile.floors != null && profile.floors > 0) {
|
|
3191
|
+
facts.push({ label: "Total de andares", text: String(profile.floors) });
|
|
3192
|
+
}
|
|
3193
|
+
if (profile.totalUnits != null && profile.totalUnits > 0) {
|
|
3194
|
+
facts.push({
|
|
3195
|
+
label: "Total de unidades",
|
|
3196
|
+
text: String(profile.totalUnits)
|
|
3197
|
+
});
|
|
3198
|
+
}
|
|
3199
|
+
return facts;
|
|
3200
|
+
}
|
|
3201
|
+
function listingDevelopmentModel(profile) {
|
|
3202
|
+
if (!profile) return null;
|
|
3203
|
+
const name = profile.name.trim();
|
|
3204
|
+
const facts = developmentFacts(profile);
|
|
3205
|
+
const typologies = profile.typologies.map(typologyModel);
|
|
3206
|
+
if (!name && facts.length === 0 && typologies.length === 0) return null;
|
|
3207
|
+
return { name, facts, typologies };
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3138
3210
|
// src/listing-card-model.ts
|
|
3139
3211
|
function listingLocationLabel(location) {
|
|
3140
3212
|
return [location.neighborhood, location.city, location.state].map((part) => part ? String(part).trim() : "").filter(Boolean).join(", ");
|
|
@@ -3439,7 +3511,8 @@ function listingDetailModel(listing, options) {
|
|
|
3439
3511
|
description,
|
|
3440
3512
|
descriptionTruncated: truncated,
|
|
3441
3513
|
descriptionToggleLabel: truncated ? expanded ? "Ler menos" : "Ler mais" : null,
|
|
3442
|
-
mediaOverlays: listingMediaOverlays(listing)
|
|
3514
|
+
mediaOverlays: listingMediaOverlays(listing),
|
|
3515
|
+
development: listingDevelopmentModel(listing.developmentProfile)
|
|
3443
3516
|
};
|
|
3444
3517
|
}
|
|
3445
3518
|
|
|
@@ -3489,11 +3562,12 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
3489
3562
|
* and lead emitters) shipped in 0.13.0. `property_search` sends a city
|
|
3490
3563
|
* or neighborhood only when the site's location table knows it, as of
|
|
3491
3564
|
* 0.13.2. Development cards (`model.unitCount`, "A partir de" on a
|
|
3492
|
-
* public price) shipped in 0.14.0.
|
|
3565
|
+
* public price) shipped in 0.14.0. The listing-detail lançamento
|
|
3566
|
+
* block (`model.development`) shipped in 0.15.0. Search filter helpers
|
|
3493
3567
|
* (`visibleSearchFilters` / `toolbarFilterIds`) shipped in 0.4.12 and
|
|
3494
3568
|
* remain on this pin.
|
|
3495
3569
|
*/
|
|
3496
|
-
minNpmVersion: "0.
|
|
3570
|
+
minNpmVersion: "0.15.0",
|
|
3497
3571
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
3498
3572
|
selfInjectSince: "0.4.2",
|
|
3499
3573
|
chromeStrategy: "app-owned",
|
|
@@ -3721,7 +3795,15 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
3721
3795
|
* `developmentCardSince` — v0 copies the field and an older
|
|
3722
3796
|
* `toListingCardModel` does not set it.
|
|
3723
3797
|
*/
|
|
3724
|
-
developmentCardSince: "0.14.0"
|
|
3798
|
+
developmentCardSince: "0.14.0",
|
|
3799
|
+
/**
|
|
3800
|
+
* Listing-detail lançamento block (`model.development`). The API can
|
|
3801
|
+
* return `developmentProfile` before this pin. Prompts must not name
|
|
3802
|
+
* `model.development` until `minNpmVersion` reaches
|
|
3803
|
+
* `developmentProfileSince` — an older `listingDetailModel` leaves it
|
|
3804
|
+
* undefined and a generated page would render an empty section.
|
|
3805
|
+
*/
|
|
3806
|
+
developmentProfileSince: "0.15.0"
|
|
3725
3807
|
};
|
|
3726
3808
|
function isSellerLeadOnPin(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
3727
3809
|
return compareSemver(pin, STUDIO_SDK_CONTRACT.sellerLeadSince) >= 0;
|
|
@@ -3849,6 +3931,13 @@ function studioLeadInstruction() {
|
|
|
3849
3931
|
function developmentCardPublished(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
3850
3932
|
return compareSemver(pin, STUDIO_SDK_CONTRACT.developmentCardSince) >= 0;
|
|
3851
3933
|
}
|
|
3934
|
+
function developmentProfilePublished(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
3935
|
+
return compareSemver(pin, STUDIO_SDK_CONTRACT.developmentProfileSince) >= 0;
|
|
3936
|
+
}
|
|
3937
|
+
function studioDevelopmentProfileInstruction(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
3938
|
+
if (!developmentProfilePublished(pin)) return "";
|
|
3939
|
+
return `Primary-market detail: \`listingDetailModel\` sets \`model.development\` only for a lan\xE7amento. When \`model.development\` is null, render neither "Sobre o empreendimento" nor "Tipologias dispon\xEDveis" \u2014 \`listing.building\` on a resale condo is not a lan\xE7amento, and \`listing.development\` on a search card is only the collapsed unit count. When it is set, render "Sobre o empreendimento" with \`model.development.name\` when that string is non-empty, then each \`model.development.facts\` item as \`label\` and \`text\`. Render "Tipologias dispon\xEDveis" only when \`model.development.typologies.length\` is greater than 0. Each typology shows \`name\`, \`code\` when set, \`availableLabel\` when set, \`specs\` when set, \`priceLabel\`, and \`pricePerSqmLabel\` when set. Do not fetch typologies from another route.`;
|
|
3940
|
+
}
|
|
3852
3941
|
function studioDevelopmentCardInstruction(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
3853
3942
|
if (!developmentCardPublished(pin)) return "";
|
|
3854
3943
|
return `Development cards: \`toListingCardModel\` sets \`model.unitCount\` when several primary-market units were collapsed into one card, and \`model.priceLabel\` already starts with "A partir de". When \`model.unitCount\` is greater than 1, show it as "N unidades" and omit that line when it is null. Keep \`model.title\`, \`model.priceLabel\`, and \`model.href\`. Do not group listings in the page.`;
|
|
@@ -3861,9 +3950,11 @@ function studioListingCardInstruction(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
|
3861
3950
|
|
|
3862
3951
|
${development}` : base;
|
|
3863
3952
|
}
|
|
3864
|
-
function studioListingDetailInstruction() {
|
|
3953
|
+
function studioListingDetailInstruction(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
3865
3954
|
const names = STUDIO_SDK_CONTRACT.listingDetailExports.join(", ");
|
|
3866
|
-
|
|
3955
|
+
const base = `Listing detail: import ${names} from \`${STUDIO_SDK_PACKAGE}\`. Render \`listingDetailModel\` leaves: \`model.facts[].label\` / \`.text\`, \`model.values[].label\` / \`.text\`, \`model.location.label\` / \`model.location.mapsHref\`, breadcrumb \`.href\` (search prefixes of \`listing.path\`). The pre\xE7o / sob consulta entry is the primary value; condom\xEDnio and IPTU are secondary and omitted when missing. \`model.description\` is the complete string \u2014 do not slice. A collapsed disclosure uses a container (max-height or overflow), not a cut of the string. Never interpolate \`model.location\`, \`model.facts\`, \`model.values\`, \`model.breadcrumb\`, or \`model.mediaOverlays\` as a React child. Video/tour: \`model.mediaOverlays\` as hash links (\`#video\` / \`#tour\`); player src is \`embedSrc\`; fullscreen overlay closes with browser back; omit when that overlay is absent. Do not key the page on \`location.hash\`. Similar listings: \`getSimilarListings({ siteId, listingId, baseUrl })\` plus the site listing-card module; hide the section when empty. Do not invent a local recommendation loop.`;
|
|
3956
|
+
const development = studioDevelopmentProfileInstruction(pin);
|
|
3957
|
+
return development ? `${base} ${development}` : base;
|
|
3867
3958
|
}
|
|
3868
3959
|
function studioPhotoInstructionFor(published) {
|
|
3869
3960
|
const has = (name) => published.includes(name);
|
|
@@ -5408,6 +5499,7 @@ function applyMatchedPhotoCover(cards, photoResults, options = {}) {
|
|
|
5408
5499
|
createTravelTimeCache,
|
|
5409
5500
|
defaultPhoneCountry,
|
|
5410
5501
|
developmentCardPublished,
|
|
5502
|
+
developmentProfilePublished,
|
|
5411
5503
|
displayPathLocation,
|
|
5412
5504
|
expandVisitSchedule,
|
|
5413
5505
|
expandVisitTimeSlots,
|
|
@@ -5524,6 +5616,7 @@ function applyMatchedPhotoCover(cards, photoResults, options = {}) {
|
|
|
5524
5616
|
studioCodegenContractViolations,
|
|
5525
5617
|
studioDefaultLeadUi,
|
|
5526
5618
|
studioDevelopmentCardInstruction,
|
|
5619
|
+
studioDevelopmentProfileInstruction,
|
|
5527
5620
|
studioLayoutInstruction,
|
|
5528
5621
|
studioLeadInstruction,
|
|
5529
5622
|
studioListingCardInstruction,
|