@garagem-ai/site-sdk 0.13.6 → 0.14.0
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 +18 -4
- package/dist/index.d.ts +18 -4
- package/dist/index.js +46 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -5
- 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 +20 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +20 -2
- package/dist/react.mjs.map +1 -1
- package/dist/{types-photo-search-CVPyF9zC.d.mts → types-photo-search-CokmqLjn.d.mts} +13 -0
- package/dist/{types-photo-search-CVPyF9zC.d.ts → types-photo-search-CokmqLjn.d.ts} +13 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/listing-card-model.ts +28 -3
- package/src/studio-contract.ts +31 -2
- package/src/types.ts +8 -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-CokmqLjn.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-CokmqLjn.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Types for the public Share Link API (`GET`/`POST /api/sites/share/{token}`).
|
|
@@ -831,6 +831,14 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
831
831
|
*/
|
|
832
832
|
readonly analyticsExports: readonly ["trackListingView"];
|
|
833
833
|
readonly analyticsSince: "0.13.0";
|
|
834
|
+
/**
|
|
835
|
+
* Development cards (`model.unitCount`, "A partir de" on `priceLabel`).
|
|
836
|
+
* The search API can return `listing.development` before this pin.
|
|
837
|
+
* Prompts must not name `unitCount` until `minNpmVersion` reaches
|
|
838
|
+
* `developmentCardSince` — v0 copies the field and an older
|
|
839
|
+
* `toListingCardModel` does not set it.
|
|
840
|
+
*/
|
|
841
|
+
readonly developmentCardSince: "0.14.0";
|
|
834
842
|
};
|
|
835
843
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
836
844
|
/** Whether the pinned tarball carries the seller-lead surface. */
|
|
@@ -888,7 +896,13 @@ declare function unavailableReactImports(source: string, pin: string): string[];
|
|
|
888
896
|
declare function studioPublishableKeyInstruction(): string;
|
|
889
897
|
declare function studioSdkPinInstruction(): string;
|
|
890
898
|
declare function studioLeadInstruction(): string;
|
|
891
|
-
declare function
|
|
899
|
+
declare function developmentCardPublished(pin?: string): boolean;
|
|
900
|
+
/**
|
|
901
|
+
* How a generated card renders a collapsed development. Empty until the
|
|
902
|
+
* pin ships `toListingCardModel`'s `unitCount`.
|
|
903
|
+
*/
|
|
904
|
+
declare function studioDevelopmentCardInstruction(pin?: string): string;
|
|
905
|
+
declare function studioListingCardInstruction(pin?: string): string;
|
|
892
906
|
declare function studioListingDetailInstruction(): string;
|
|
893
907
|
/**
|
|
894
908
|
* Listing-detail photo intelligence, gated on the published pin. The base
|
|
@@ -1559,4 +1573,4 @@ declare function resolveMatchedCoverPhoto(photo: MatchedListingPhoto | null | un
|
|
|
1559
1573
|
*/
|
|
1560
1574
|
declare function applyMatchedPhotoCover<T extends Listing>(cards: ReadonlyArray<T>, photoResults: PhotoSearchResult | ReadonlyArray<PhotoSearchItem> | null | undefined, options?: ApplyMatchedPhotoCoverOptions): Array<T & ListingWithMatchedPhoto>;
|
|
1561
1575
|
|
|
1562
|
-
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, 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, 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 };
|
|
1576
|
+
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 };
|
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-CokmqLjn.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-CokmqLjn.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Types for the public Share Link API (`GET`/`POST /api/sites/share/{token}`).
|
|
@@ -831,6 +831,14 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
831
831
|
*/
|
|
832
832
|
readonly analyticsExports: readonly ["trackListingView"];
|
|
833
833
|
readonly analyticsSince: "0.13.0";
|
|
834
|
+
/**
|
|
835
|
+
* Development cards (`model.unitCount`, "A partir de" on `priceLabel`).
|
|
836
|
+
* The search API can return `listing.development` before this pin.
|
|
837
|
+
* Prompts must not name `unitCount` until `minNpmVersion` reaches
|
|
838
|
+
* `developmentCardSince` — v0 copies the field and an older
|
|
839
|
+
* `toListingCardModel` does not set it.
|
|
840
|
+
*/
|
|
841
|
+
readonly developmentCardSince: "0.14.0";
|
|
834
842
|
};
|
|
835
843
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
836
844
|
/** Whether the pinned tarball carries the seller-lead surface. */
|
|
@@ -888,7 +896,13 @@ declare function unavailableReactImports(source: string, pin: string): string[];
|
|
|
888
896
|
declare function studioPublishableKeyInstruction(): string;
|
|
889
897
|
declare function studioSdkPinInstruction(): string;
|
|
890
898
|
declare function studioLeadInstruction(): string;
|
|
891
|
-
declare function
|
|
899
|
+
declare function developmentCardPublished(pin?: string): boolean;
|
|
900
|
+
/**
|
|
901
|
+
* How a generated card renders a collapsed development. Empty until the
|
|
902
|
+
* pin ships `toListingCardModel`'s `unitCount`.
|
|
903
|
+
*/
|
|
904
|
+
declare function studioDevelopmentCardInstruction(pin?: string): string;
|
|
905
|
+
declare function studioListingCardInstruction(pin?: string): string;
|
|
892
906
|
declare function studioListingDetailInstruction(): string;
|
|
893
907
|
/**
|
|
894
908
|
* Listing-detail photo intelligence, gated on the published pin. The base
|
|
@@ -1559,4 +1573,4 @@ declare function resolveMatchedCoverPhoto(photo: MatchedListingPhoto | null | un
|
|
|
1559
1573
|
*/
|
|
1560
1574
|
declare function applyMatchedPhotoCover<T extends Listing>(cards: ReadonlyArray<T>, photoResults: PhotoSearchResult | ReadonlyArray<PhotoSearchItem> | null | undefined, options?: ApplyMatchedPhotoCoverOptions): Array<T & ListingWithMatchedPhoto>;
|
|
1561
1575
|
|
|
1562
|
-
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, 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, 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 };
|
|
1576
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -80,6 +80,7 @@ __export(src_exports, {
|
|
|
80
80
|
createGaragemClient: () => createGaragemClient,
|
|
81
81
|
createTravelTimeCache: () => createTravelTimeCache,
|
|
82
82
|
defaultPhoneCountry: () => defaultPhoneCountry,
|
|
83
|
+
developmentCardPublished: () => developmentCardPublished,
|
|
83
84
|
displayPathLocation: () => displayPathLocation,
|
|
84
85
|
expandVisitSchedule: () => expandVisitSchedule,
|
|
85
86
|
expandVisitTimeSlots: () => expandVisitTimeSlots,
|
|
@@ -195,6 +196,7 @@ __export(src_exports, {
|
|
|
195
196
|
studioChromeInstruction: () => studioChromeInstruction,
|
|
196
197
|
studioCodegenContractViolations: () => studioCodegenContractViolations,
|
|
197
198
|
studioDefaultLeadUi: () => studioDefaultLeadUi,
|
|
199
|
+
studioDevelopmentCardInstruction: () => studioDevelopmentCardInstruction,
|
|
198
200
|
studioLayoutInstruction: () => studioLayoutInstruction,
|
|
199
201
|
studioLeadInstruction: () => studioLeadInstruction,
|
|
200
202
|
studioListingCardInstruction: () => studioListingCardInstruction,
|
|
@@ -3137,9 +3139,21 @@ function listingAmenityGroups(listing, dictionary) {
|
|
|
3137
3139
|
function listingLocationLabel(location) {
|
|
3138
3140
|
return [location.neighborhood, location.city, location.state].map((part) => part ? String(part).trim() : "").filter(Boolean).join(", ");
|
|
3139
3141
|
}
|
|
3142
|
+
function cardPriceLabel(isPrivate, collapsed, price, formattedPrice) {
|
|
3143
|
+
if (isPrivate) return "Sob consulta";
|
|
3144
|
+
if (collapsed && price != null) return `A partir de ${formattedPrice}`;
|
|
3145
|
+
return formattedPrice;
|
|
3146
|
+
}
|
|
3140
3147
|
function toListingCardModel(listing) {
|
|
3141
3148
|
const isPrivate = listing.priceVisibility === "private";
|
|
3142
3149
|
const area = listing.property?.usableArea ?? listing.property?.totalArea;
|
|
3150
|
+
const unitCount = listing.development?.unitCount;
|
|
3151
|
+
const collapsed = typeof unitCount === "number" && unitCount > 1;
|
|
3152
|
+
const formattedPrice = formatListingPrice(
|
|
3153
|
+
listing.price,
|
|
3154
|
+
"pt-BR",
|
|
3155
|
+
listing.currency ?? "BRL"
|
|
3156
|
+
);
|
|
3143
3157
|
return {
|
|
3144
3158
|
href: listingPublicPath(listing),
|
|
3145
3159
|
title: listing.title,
|
|
@@ -3147,7 +3161,12 @@ function toListingCardModel(listing) {
|
|
|
3147
3161
|
businessLabel: listingBusinessLabel(listing.businessType),
|
|
3148
3162
|
priceVisibility: listing.priceVisibility,
|
|
3149
3163
|
price: listing.price,
|
|
3150
|
-
priceLabel:
|
|
3164
|
+
priceLabel: cardPriceLabel(
|
|
3165
|
+
isPrivate,
|
|
3166
|
+
collapsed,
|
|
3167
|
+
listing.price,
|
|
3168
|
+
formattedPrice
|
|
3169
|
+
),
|
|
3151
3170
|
pricePeriod: listing.businessType === "rental" && !isPrivate && listing.price != null ? "/m\xEAs" : null,
|
|
3152
3171
|
locationLabel: listingLocationLabel(listing.location || {}),
|
|
3153
3172
|
propertyType: listing.property?.type ?? null,
|
|
@@ -3156,7 +3175,8 @@ function toListingCardModel(listing) {
|
|
|
3156
3175
|
bedrooms: listing.property?.bedrooms ?? null,
|
|
3157
3176
|
bathrooms: listing.property?.bathrooms ?? null,
|
|
3158
3177
|
parkingSpaces: listing.property?.parkingSpaces ?? null,
|
|
3159
|
-
areaM2: area ?? null
|
|
3178
|
+
areaM2: area ?? null,
|
|
3179
|
+
unitCount: collapsed && typeof unitCount === "number" ? unitCount : null
|
|
3160
3180
|
};
|
|
3161
3181
|
}
|
|
3162
3182
|
|
|
@@ -3690,7 +3710,15 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
3690
3710
|
* `studioCodegenContractViolations` flags `trackListingView`.
|
|
3691
3711
|
*/
|
|
3692
3712
|
analyticsExports: ["trackListingView"],
|
|
3693
|
-
analyticsSince: "0.13.0"
|
|
3713
|
+
analyticsSince: "0.13.0",
|
|
3714
|
+
/**
|
|
3715
|
+
* Development cards (`model.unitCount`, "A partir de" on `priceLabel`).
|
|
3716
|
+
* The search API can return `listing.development` before this pin.
|
|
3717
|
+
* Prompts must not name `unitCount` until `minNpmVersion` reaches
|
|
3718
|
+
* `developmentCardSince` — v0 copies the field and an older
|
|
3719
|
+
* `toListingCardModel` does not set it.
|
|
3720
|
+
*/
|
|
3721
|
+
developmentCardSince: "0.14.0"
|
|
3694
3722
|
};
|
|
3695
3723
|
function isSellerLeadOnPin(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
3696
3724
|
return compareSemver(pin, STUDIO_SDK_CONTRACT.sellerLeadSince) >= 0;
|
|
@@ -3815,9 +3843,20 @@ function studioLeadInstruction() {
|
|
|
3815
3843
|
const phone = STUDIO_SDK_CONTRACT.phoneExports.join(", ");
|
|
3816
3844
|
return `Listing-detail visit/contact leads: import ${names} from \`${STUDIO_SDK_PACKAGE}\` (the main package, not \`/react\`). Call \`submitVisitLead\` / \`submitContactLead\` \u2014 never concatenate a leads webhook URL and never POST the Showcase demo leads route. Phone fields: import ${phone} from the same package. Display draft is \`formatPhoneNational\` (default country \`BR\`); changing country calls \`remaskPhoneForCountry\`; submit \`toE164\` and require \`isValidPhone\`. Do not invent a second mask and do not import \`@garagem/ui\` PhoneInput.`;
|
|
3817
3845
|
}
|
|
3818
|
-
function
|
|
3846
|
+
function developmentCardPublished(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
3847
|
+
return compareSemver(pin, STUDIO_SDK_CONTRACT.developmentCardSince) >= 0;
|
|
3848
|
+
}
|
|
3849
|
+
function studioDevelopmentCardInstruction(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
3850
|
+
if (!developmentCardPublished(pin)) return "";
|
|
3851
|
+
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.`;
|
|
3852
|
+
}
|
|
3853
|
+
function studioListingCardInstruction(pin = STUDIO_SDK_CONTRACT.minNpmVersion) {
|
|
3819
3854
|
const names = STUDIO_SDK_CONTRACT.listingCardExports.join(", ");
|
|
3820
|
-
|
|
3855
|
+
const base = `Listing card (site-wide). WRITE \`components/garagem/listing-card.tsx\` \u2014 one module for home, search results, and similar listings. Do not invent a second card. From \`${STUDIO_SDK_PACKAGE}\` import ${names}. \`const model = toListingCardModel(listing)\`. href is \`model.href\` / \`listingPublicPath(listing)\` \u2014 never \`listing.id\` or \`property.id\`. Skip the card or omit the link when href is empty (no \`href=""\`, no \`href="#"\`). Must show title (\`model.title\`) and price (\`model.priceLabel\` \u2014 \u201CSob consulta\u201D when private; \`model.pricePeriod\` \u201C/m\xEAs\u201D when present, omit when null). Photo: \`model.coverSrc\` as img \`src\`, alt \`model.coverAlt\`; skip the img when cover is missing; an empty-photo block is allowed; never Unsplash, \`/placeholder.svg\`, or invented \`?query=\` images. Show when present, omit the line when missing: \`locationLabel\` (else \`propertyType\`), \`listingBusinessLabel\` / \`model.businessLabel\`, bedrooms, bathrooms, parkingSpaces, area via \`formatAreaM2\`. Never interpolate the listing object as a React child. Design is free (grid vs carousel vs mosaic; radius is site \`--radius\`). WRITE \`components/garagem/listing-card-skeleton.tsx\` only for a slot whose content is still unknown \u2014 never as a \`<Suspense>\` fallback that replaces the catalog, and never the text \u201CCarregando im\xF3veis\u2026\u201D. Do not \`if (search.loading) return\` that skeleton inside the search client.`;
|
|
3856
|
+
const development = studioDevelopmentCardInstruction(pin);
|
|
3857
|
+
return development ? `${base}
|
|
3858
|
+
|
|
3859
|
+
${development}` : base;
|
|
3821
3860
|
}
|
|
3822
3861
|
function studioListingDetailInstruction() {
|
|
3823
3862
|
const names = STUDIO_SDK_CONTRACT.listingDetailExports.join(", ");
|
|
@@ -5365,6 +5404,7 @@ function applyMatchedPhotoCover(cards, photoResults, options = {}) {
|
|
|
5365
5404
|
createGaragemClient,
|
|
5366
5405
|
createTravelTimeCache,
|
|
5367
5406
|
defaultPhoneCountry,
|
|
5407
|
+
developmentCardPublished,
|
|
5368
5408
|
displayPathLocation,
|
|
5369
5409
|
expandVisitSchedule,
|
|
5370
5410
|
expandVisitTimeSlots,
|
|
@@ -5480,6 +5520,7 @@ function applyMatchedPhotoCover(cards, photoResults, options = {}) {
|
|
|
5480
5520
|
studioChromeInstruction,
|
|
5481
5521
|
studioCodegenContractViolations,
|
|
5482
5522
|
studioDefaultLeadUi,
|
|
5523
|
+
studioDevelopmentCardInstruction,
|
|
5483
5524
|
studioLayoutInstruction,
|
|
5484
5525
|
studioLeadInstruction,
|
|
5485
5526
|
studioListingCardInstruction,
|