@garagem-ai/site-sdk 0.9.0 → 0.10.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 +135 -13
- package/dist/index.d.ts +135 -13
- package/dist/index.js +436 -69
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +423 -69
- 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 +4 -4
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +4 -4
- package/dist/react.mjs.map +1 -1
- package/dist/{types-photo-search-D88oevZv.d.mts → types-photo-search-DIoV75SN.d.mts} +1 -1
- package/dist/{types-photo-search-D88oevZv.d.ts → types-photo-search-DIoV75SN.d.ts} +1 -1
- package/package.json +2 -2
- package/src/index.ts +24 -0
- package/src/leads.ts +47 -3
- package/src/map-search.ts +9 -5
- package/src/seller-lead.ts +428 -0
- package/src/studio-contract.ts +71 -11
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FetchLike, R as RequestNextOptions, L as ListingDetail, a as ListingLocation, b as ListingMedia, S as SearchPathFilters, c as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, d as AppliedSearchChange, e as ListingFilters, f as ListingsResult, g as Site, h as SearchListingsParams, i as SearchListingsResult, j as SearchUi, k as QueryListingsParams, l as QueryListingsResult, m as SimilarListingsResult, C as CmsCollection, n as CmsEntriesResult, o as CmsEntry, B as BoundaryCity, p as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, q as TravelTimeCache, r as MapsFetchOptions, s as BoundaryLayer, t as ListingWithLocation, u as StaticMapOptions, v as StreetViewAvailabilityOptions, w as StreetViewAvailability, x as StreetViewOptions, N as NeighborhoodBoundaryOptions, y as NeighborhoodBoundary, z as TravelDestination, D as TravelMode, E as TravelTimeOptions, G as TravelTime, H as TravelTimesOptions, I as TravelTimeElement, J as Listing, 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 MapPin, aq as MapPinCluster, ar as MapPolygon, as as MapPolygonSearchOptions, at as MapSearchResult, au as MapsBaseOptions, av as QueryListingsLocation, aw as QueryListingsOptions, ax as SEARCH_EMPTY_COPY, ay as SEARCH_SORT_RELEVANCE, az as SearchChromeModel, aA as SearchListingsOptions, aB as SearchPathLocation, aC as SearchUiFilter, aD as SearchUiOption, aE as StaticMapStyle, aF as TOOLBAR_PRIMARY_FILTER_IDS, aG as applyPathFilter, aH as buildQueryListingsParams, aI as canonicalizeSearchHref, aJ as capMapPage, aK as capMapPageSize, aL as clearStagedPathFilters, aM as clusterPins, aN as countFacetChoices, aO as countOptionLabel, aP as displayPathLocation, aQ as getCmsCollection, aR as getCmsCollections, aS as getCmsEntries, aT as getCmsEntry, aU as getListing, aV as getListings, aW as getSearchUi, aX as getSimilarListings, aY as getSite, aZ as hrefForAppliedChange, a_ as hrefForPathFilters, a$ as hrefWithExplicitPage, b0 as isListingDetailPath, b1 as isMapBounds, b2 as isMapPolygon, b3 as listingLocationLabel, b4 as mapClusterCellDegrees, b5 as mapSearchPins, b6 as paginationPages, b7 as pathFilterHasOption, b8 as pathFilterValue, b9 as publicSearchHref, ba as queryListings, bb as rangeDraftFromPath, bc as readPublicSearch, bd as searchChromeModel, be as searchHrefUsesLegacyFilterQuery, bf as searchListings, bg as searchListingsInBounds, bh as searchListingsInPolygon, bi as searchResultsHeading, bj as searchSortOptions, bk as toListingCardModel, bl as toolbarFilterIds, bm as visibleSearchFilters } from './types-photo-search-
|
|
1
|
+
import { F as FetchLike, R as RequestNextOptions, L as ListingDetail, a as ListingLocation, b as ListingMedia, S as SearchPathFilters, c as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, d as AppliedSearchChange, e as ListingFilters, f as ListingsResult, g as Site, h as SearchListingsParams, i as SearchListingsResult, j as SearchUi, k as QueryListingsParams, l as QueryListingsResult, m as SimilarListingsResult, C as CmsCollection, n as CmsEntriesResult, o as CmsEntry, B as BoundaryCity, p as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, q as TravelTimeCache, r as MapsFetchOptions, s as BoundaryLayer, t as ListingWithLocation, u as StaticMapOptions, v as StreetViewAvailabilityOptions, w as StreetViewAvailability, x as StreetViewOptions, N as NeighborhoodBoundaryOptions, y as NeighborhoodBoundary, z as TravelDestination, D as TravelMode, E as TravelTimeOptions, G as TravelTime, H as TravelTimesOptions, I as TravelTimeElement, J as Listing, P as PhotoSearchParams, K as PhotoSearchResult, O as PhotoSearchItem, U as ListingWithMatchedPhoto, V as MatchedListingPhoto } from './types-photo-search-DIoV75SN.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 MapPin, aq as MapPinCluster, ar as MapPolygon, as as MapPolygonSearchOptions, at as MapSearchResult, au as MapsBaseOptions, av as QueryListingsLocation, aw as QueryListingsOptions, ax as SEARCH_EMPTY_COPY, ay as SEARCH_SORT_RELEVANCE, az as SearchChromeModel, aA as SearchListingsOptions, aB as SearchPathLocation, aC as SearchUiFilter, aD as SearchUiOption, aE as StaticMapStyle, aF as TOOLBAR_PRIMARY_FILTER_IDS, aG as applyPathFilter, aH as buildQueryListingsParams, aI as canonicalizeSearchHref, aJ as capMapPage, aK as capMapPageSize, aL as clearStagedPathFilters, aM as clusterPins, aN as countFacetChoices, aO as countOptionLabel, aP as displayPathLocation, aQ as getCmsCollection, aR as getCmsCollections, aS as getCmsEntries, aT as getCmsEntry, aU as getListing, aV as getListings, aW as getSearchUi, aX as getSimilarListings, aY as getSite, aZ as hrefForAppliedChange, a_ as hrefForPathFilters, a$ as hrefWithExplicitPage, b0 as isListingDetailPath, b1 as isMapBounds, b2 as isMapPolygon, b3 as listingLocationLabel, b4 as mapClusterCellDegrees, b5 as mapSearchPins, b6 as paginationPages, b7 as pathFilterHasOption, b8 as pathFilterValue, b9 as publicSearchHref, ba as queryListings, bb as rangeDraftFromPath, bc as readPublicSearch, bd as searchChromeModel, be as searchHrefUsesLegacyFilterQuery, bf as searchListings, bg as searchListingsInBounds, bh as searchListingsInPolygon, bi as searchResultsHeading, bj as searchSortOptions, bk as toListingCardModel, bl as toolbarFilterIds, bm as visibleSearchFilters } from './types-photo-search-DIoV75SN.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Visit-lead schedule: hours in, slots out. Pure — no fetch, no React.
|
|
@@ -106,7 +106,7 @@ type LeadSubmitResult = {
|
|
|
106
106
|
status: 202;
|
|
107
107
|
id: string;
|
|
108
108
|
};
|
|
109
|
-
type LeadSubmitErrorCode = "invalid_listing_id" | "invalid_contact" | "invalid_slot" | "unauthorized" | "rate_limited" | "not_found" | "http" | "network";
|
|
109
|
+
type LeadSubmitErrorCode = "invalid_listing_id" | "invalid_contact" | "invalid_slot" | "invalid_address" | "invalid_property" | "invalid_photo" | "duplicate_property" | "unauthorized" | "rate_limited" | "not_found" | "http" | "network";
|
|
110
110
|
declare class LeadSubmitError extends Error {
|
|
111
111
|
readonly code: LeadSubmitErrorCode;
|
|
112
112
|
readonly status?: number;
|
|
@@ -119,12 +119,108 @@ declare class LeadSubmitError extends Error {
|
|
|
119
119
|
retryAfterSeconds?: number;
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
+
/** Same email rule the webhook applies. */
|
|
123
|
+
declare function isValidEmail(value: string): boolean;
|
|
124
|
+
/** At least two leading non-digit characters, as the editor form requires. */
|
|
125
|
+
declare function isValidName(value: string): boolean;
|
|
122
126
|
/** Fallback when GET /leads/ui fails — same default the API publishes. */
|
|
123
127
|
declare function studioDefaultLeadUi(): LeadUi;
|
|
124
128
|
declare function getLeadUi(options: GetLeadUiOptions): Promise<LeadUi>;
|
|
125
129
|
declare function submitVisitLead(input: VisitLeadInput): Promise<LeadSubmitResult>;
|
|
126
130
|
declare function submitContactLead(input: ContactLeadInput): Promise<LeadSubmitResult>;
|
|
127
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Headless seller lead (property registration). The site draws the form;
|
|
134
|
+
* the SDK owns validation, photo upload and the webhook contract.
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/** Shape of the address search value (Google Places + complement flags). */
|
|
138
|
+
type SellerLeadAddress = {
|
|
139
|
+
fullAddress: string;
|
|
140
|
+
street: string;
|
|
141
|
+
number?: string;
|
|
142
|
+
neighborhood: string;
|
|
143
|
+
city: string;
|
|
144
|
+
state: string;
|
|
145
|
+
postalCode: string;
|
|
146
|
+
country?: string;
|
|
147
|
+
latitude?: number | null;
|
|
148
|
+
longitude?: number | null;
|
|
149
|
+
blocoTorre?: string;
|
|
150
|
+
unidade?: string;
|
|
151
|
+
noNumber?: boolean;
|
|
152
|
+
noBlocoTorre?: boolean;
|
|
153
|
+
noUnidade?: boolean;
|
|
154
|
+
};
|
|
155
|
+
type SellerAddressField = "fullAddress" | "number" | "blocoTorre" | "unidade" | "postalCode";
|
|
156
|
+
type SellerAddressErrors = Partial<Record<SellerAddressField, string>>;
|
|
157
|
+
/**
|
|
158
|
+
* pt-BR messages keyed by field; `{}` when the address can be submitted.
|
|
159
|
+
* A missing geocode reports on `fullAddress`: pick a suggestion again.
|
|
160
|
+
*/
|
|
161
|
+
declare function sellerAddressErrors(address: Partial<SellerLeadAddress> | null | undefined): SellerAddressErrors;
|
|
162
|
+
declare const SELLER_LEAD_PHOTO_MAX_BYTES: number;
|
|
163
|
+
declare const SELLER_LEAD_PHOTO_MAX_COUNT = 30;
|
|
164
|
+
declare const SELLER_LEAD_PHOTO_TYPES: readonly ["image/jpeg", "image/png", "image/webp"];
|
|
165
|
+
type SellerLeadTransport = {
|
|
166
|
+
siteId?: string | Promise<string>;
|
|
167
|
+
baseUrl?: string;
|
|
168
|
+
fetch?: FetchLike;
|
|
169
|
+
/** Site publishable key (`pk_live_…`). Not a secret. */
|
|
170
|
+
publishableKey?: string;
|
|
171
|
+
};
|
|
172
|
+
type UploadSellerLeadPhotoInput = SellerLeadTransport & {
|
|
173
|
+
file: Blob & {
|
|
174
|
+
name?: string;
|
|
175
|
+
type: string;
|
|
176
|
+
size: number;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
/** Uploads one photo and returns its public URL for `submitSellerLead`. */
|
|
180
|
+
declare function uploadSellerLeadPhoto(input: UploadSellerLeadPhotoInput): Promise<string>;
|
|
181
|
+
/** Studio "Cadastro de imóvel" photo-session grid. */
|
|
182
|
+
type SellerPhotoScheduleConfig = {
|
|
183
|
+
disabledDays: number[];
|
|
184
|
+
weekdayTimeSlots: HHmm[];
|
|
185
|
+
weekendTimeSlots: HHmm[];
|
|
186
|
+
};
|
|
187
|
+
declare const STUDIO_DEFAULT_PHOTO_SCHEDULE_CONFIG: SellerPhotoScheduleConfig;
|
|
188
|
+
/** Feed the result to `slotsForDate` / `isVisitSlotAllowed`. */
|
|
189
|
+
declare function sellerPhotoSchedule(config?: SellerPhotoScheduleConfig): VisitSchedule;
|
|
190
|
+
type SellerBusinessType = "sale" | "rent" | "both";
|
|
191
|
+
type SellerLeadProperty = {
|
|
192
|
+
businessType: SellerBusinessType;
|
|
193
|
+
saleValue?: number;
|
|
194
|
+
rentValue?: number;
|
|
195
|
+
condoFee?: number;
|
|
196
|
+
totalArea?: number;
|
|
197
|
+
bedrooms?: number;
|
|
198
|
+
bathrooms?: number;
|
|
199
|
+
suites?: number;
|
|
200
|
+
parkingSpaces?: number;
|
|
201
|
+
};
|
|
202
|
+
type SellerLeadInput = SellerLeadTransport & {
|
|
203
|
+
owner: {
|
|
204
|
+
name: string;
|
|
205
|
+
email: string;
|
|
206
|
+
phone: string;
|
|
207
|
+
};
|
|
208
|
+
address: SellerLeadAddress;
|
|
209
|
+
property: SellerLeadProperty;
|
|
210
|
+
/** URLs returned by `uploadSellerLeadPhoto`. */
|
|
211
|
+
photos?: string[];
|
|
212
|
+
/** Photo session slot when the owner chose "Agendar". */
|
|
213
|
+
photoSession?: {
|
|
214
|
+
date: Date | string;
|
|
215
|
+
time: HHmm;
|
|
216
|
+
};
|
|
217
|
+
photoSchedule?: VisitSchedule;
|
|
218
|
+
visitorId?: string;
|
|
219
|
+
brokerRef?: string;
|
|
220
|
+
referrer?: string;
|
|
221
|
+
};
|
|
222
|
+
declare function submitSellerLead(input: SellerLeadInput): Promise<LeadSubmitResult>;
|
|
223
|
+
|
|
128
224
|
/**
|
|
129
225
|
* Portuguese labels for listing amenity ids. Tenant search-ui dictionary
|
|
130
226
|
* wins; this map is the default-catalog fallback so generated Studio pages
|
|
@@ -428,11 +524,13 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
428
524
|
* this and move that release's names from `optionalReactExports` /
|
|
429
525
|
* `unpublishedSearchExports` / `unpublishedPhoneExports` into the
|
|
430
526
|
* prompt-safe lists. Do not bump here until that tarball is on npm.
|
|
431
|
-
* Phone mask helpers shipped in 0.6.0.
|
|
527
|
+
* Phone mask helpers shipped in 0.6.0. Map search
|
|
528
|
+
* (`useMapSearch`, `searchListingsInBounds`) shipped in 0.9.0 — 0.7.0
|
|
529
|
+
* does not export them. Search filter helpers
|
|
432
530
|
* (`visibleSearchFilters` / `toolbarFilterIds`) shipped in 0.4.12 and
|
|
433
531
|
* remain on this pin.
|
|
434
532
|
*/
|
|
435
|
-
readonly minNpmVersion: "0.
|
|
533
|
+
readonly minNpmVersion: "0.9.0";
|
|
436
534
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
437
535
|
readonly selfInjectSince: "0.4.2";
|
|
438
536
|
readonly chromeStrategy: "app-owned";
|
|
@@ -504,14 +602,15 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
504
602
|
readonly unpublishedSearchExports: readonly ["searchChromeModel", "rangeDraftFromPath"];
|
|
505
603
|
/**
|
|
506
604
|
* maps.fndn.ai helpers (static map, street view, boundaries, travel
|
|
507
|
-
* time) plus friendly map search. They ship in `mapsSince
|
|
508
|
-
* `studioMapsInstruction()`
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
*
|
|
605
|
+
* time) plus friendly map search. They ship in npm 0.9.0 (`mapsSince`).
|
|
606
|
+
* Listing-detail map guidance stays empty: `studioMapsInstruction()`
|
|
607
|
+
* keeps the listing contract for a later task and Studio does not
|
|
608
|
+
* inject it. Map search is `studioMapSearchInstruction()`, and only
|
|
609
|
+
* the site that opted into list-and-map may include that text.
|
|
610
|
+
* `useMapSearch` is a `/react` hook in `optionalReactExports`; the
|
|
611
|
+
* pin sentence does not name it.
|
|
513
612
|
*/
|
|
514
|
-
readonly mapsSince: "0.
|
|
613
|
+
readonly mapsSince: "0.9.0";
|
|
515
614
|
readonly mapsExports: readonly ["listingStaticMapUrl", "listingStreetViewUrl", "listingStreetViewAvailable", "neighborhoodBoundaryLayer", "boundaryLayerUrl", "travelTimeFromListing", "searchListingsInBounds", "searchListingsInPolygon", "clusterPins"];
|
|
516
615
|
/**
|
|
517
616
|
* Market-data helpers (neighborhood price summary, listing market
|
|
@@ -536,8 +635,24 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
536
635
|
*/
|
|
537
636
|
readonly photoSearchExports: readonly ["searchListingPhotos", "applyMatchedPhotoCover"];
|
|
538
637
|
readonly photoSearchSince: "0.7.0";
|
|
638
|
+
/**
|
|
639
|
+
* Seller lead (property registration on `/anunciar-imovel`). Prompt-safe
|
|
640
|
+
* only once `minNpmVersion` reaches `sellerLeadSince`; below it
|
|
641
|
+
* `studioSellerLeadSdkInstruction` prints nothing and
|
|
642
|
+
* `studioCodegenContractViolations` flags the names.
|
|
643
|
+
*/
|
|
644
|
+
readonly sellerLeadExports: readonly ["submitSellerLead", "uploadSellerLeadPhoto", "sellerAddressErrors", "sellerPhotoSchedule", "isValidEmail", "isValidName"];
|
|
645
|
+
readonly sellerLeadSince: "0.10.0";
|
|
539
646
|
};
|
|
540
647
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
648
|
+
/** Whether the pinned tarball carries the seller-lead surface. */
|
|
649
|
+
declare function isSellerLeadOnPin(pin?: string): boolean;
|
|
650
|
+
/**
|
|
651
|
+
* Fixed SDK half of the property-registration page. The configured fields
|
|
652
|
+
* and photo options come from the Studio onboarding block. Empty below
|
|
653
|
+
* `sellerLeadSince`, so no prompt names an identifier v0 cannot import.
|
|
654
|
+
*/
|
|
655
|
+
declare function studioSellerLeadSdkInstruction(pin?: string): string;
|
|
541
656
|
/** Whether the pinned tarball carries the photo-search surface. */
|
|
542
657
|
declare function isPhotoSearchOnPin(pin?: string): boolean;
|
|
543
658
|
/**
|
|
@@ -596,6 +711,13 @@ declare function mapsExportsPublished(pin?: string): boolean;
|
|
|
596
711
|
declare function studioMapsInstruction(options?: {
|
|
597
712
|
pin?: string;
|
|
598
713
|
}): string;
|
|
714
|
+
/**
|
|
715
|
+
* Search-page map mode. Empty below `mapsSince`. Studio injects this only
|
|
716
|
+
* when the site chose list and map. Listing-detail helpers stay out of it.
|
|
717
|
+
*/
|
|
718
|
+
declare function studioMapSearchInstruction(options?: {
|
|
719
|
+
pin?: string;
|
|
720
|
+
}): string;
|
|
599
721
|
/** True when the pinned tarball ships the market-data helpers. */
|
|
600
722
|
declare function marketExportsAvailableAt(pin: string): boolean;
|
|
601
723
|
/**
|
|
@@ -1234,4 +1356,4 @@ declare function resolveMatchedCoverPhoto(photo: MatchedListingPhoto | null | un
|
|
|
1234
1356
|
*/
|
|
1235
1357
|
declare function applyMatchedPhotoCover<T extends Listing>(cards: ReadonlyArray<T>, photoResults: PhotoSearchResult | ReadonlyArray<PhotoSearchItem> | null | undefined, options?: ApplyMatchedPhotoCoverOptions): Array<T & ListingWithMatchedPhoto>;
|
|
1236
1358
|
|
|
1237
|
-
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 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, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingPhotosOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, type SimilarByPhotoItem, type SimilarByPhotoResult, SimilarListingsResult, type SimilarPhotoMatch, Site, StaticMapOptions, StreetViewAvailability, StreetViewAvailabilityOptions, StreetViewOptions, type StudioSdkContract, TravelDestination, TravelMode, TravelTime, TravelTimeCache, TravelTimeCacheOptions, TravelTimeElement, TravelTimeOptions, TravelTimesOptions, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, 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, getSimilarByPhoto, hasShowcaseLeadsPostUrl, isPhotoSearchOnPin, isStudioPreviewHost, 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, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioListingCardInstruction, studioListingDetailInstruction, studioMapsInstruction, studioMarketInstruction, studioPhotoInstruction, studioPhotoInstructionFor, studioPhotoSearchInstruction, studioPublishableKeyInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, toE164, travelTimeCacheKey, travelTimeFromListing, travelTimesFromListing, truncateNationalPhoneDigits, unavailableReactImports };
|
|
1359
|
+
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 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, 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 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, 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, getSimilarByPhoto, hasShowcaseLeadsPostUrl, isPhotoSearchOnPin, isSellerLeadOnPin, 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, studioMapSearchInstruction, studioMapsInstruction, studioMarketInstruction, studioPhotoInstruction, studioPhotoInstructionFor, studioPhotoSearchInstruction, studioPublishableKeyInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSellerLeadSdkInstruction, studioSiteWidthCss, submitContactLead, submitSellerLead, submitVisitLead, toE164, travelTimeCacheKey, travelTimeFromListing, travelTimesFromListing, truncateNationalPhoneDigits, unavailableReactImports, uploadSellerLeadPhoto };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FetchLike, R as RequestNextOptions, L as ListingDetail, a as ListingLocation, b as ListingMedia, S as SearchPathFilters, c as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, d as AppliedSearchChange, e as ListingFilters, f as ListingsResult, g as Site, h as SearchListingsParams, i as SearchListingsResult, j as SearchUi, k as QueryListingsParams, l as QueryListingsResult, m as SimilarListingsResult, C as CmsCollection, n as CmsEntriesResult, o as CmsEntry, B as BoundaryCity, p as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, q as TravelTimeCache, r as MapsFetchOptions, s as BoundaryLayer, t as ListingWithLocation, u as StaticMapOptions, v as StreetViewAvailabilityOptions, w as StreetViewAvailability, x as StreetViewOptions, N as NeighborhoodBoundaryOptions, y as NeighborhoodBoundary, z as TravelDestination, D as TravelMode, E as TravelTimeOptions, G as TravelTime, H as TravelTimesOptions, I as TravelTimeElement, J as Listing, 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 MapPin, aq as MapPinCluster, ar as MapPolygon, as as MapPolygonSearchOptions, at as MapSearchResult, au as MapsBaseOptions, av as QueryListingsLocation, aw as QueryListingsOptions, ax as SEARCH_EMPTY_COPY, ay as SEARCH_SORT_RELEVANCE, az as SearchChromeModel, aA as SearchListingsOptions, aB as SearchPathLocation, aC as SearchUiFilter, aD as SearchUiOption, aE as StaticMapStyle, aF as TOOLBAR_PRIMARY_FILTER_IDS, aG as applyPathFilter, aH as buildQueryListingsParams, aI as canonicalizeSearchHref, aJ as capMapPage, aK as capMapPageSize, aL as clearStagedPathFilters, aM as clusterPins, aN as countFacetChoices, aO as countOptionLabel, aP as displayPathLocation, aQ as getCmsCollection, aR as getCmsCollections, aS as getCmsEntries, aT as getCmsEntry, aU as getListing, aV as getListings, aW as getSearchUi, aX as getSimilarListings, aY as getSite, aZ as hrefForAppliedChange, a_ as hrefForPathFilters, a$ as hrefWithExplicitPage, b0 as isListingDetailPath, b1 as isMapBounds, b2 as isMapPolygon, b3 as listingLocationLabel, b4 as mapClusterCellDegrees, b5 as mapSearchPins, b6 as paginationPages, b7 as pathFilterHasOption, b8 as pathFilterValue, b9 as publicSearchHref, ba as queryListings, bb as rangeDraftFromPath, bc as readPublicSearch, bd as searchChromeModel, be as searchHrefUsesLegacyFilterQuery, bf as searchListings, bg as searchListingsInBounds, bh as searchListingsInPolygon, bi as searchResultsHeading, bj as searchSortOptions, bk as toListingCardModel, bl as toolbarFilterIds, bm as visibleSearchFilters } from './types-photo-search-
|
|
1
|
+
import { F as FetchLike, R as RequestNextOptions, L as ListingDetail, a as ListingLocation, b as ListingMedia, S as SearchPathFilters, c as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, d as AppliedSearchChange, e as ListingFilters, f as ListingsResult, g as Site, h as SearchListingsParams, i as SearchListingsResult, j as SearchUi, k as QueryListingsParams, l as QueryListingsResult, m as SimilarListingsResult, C as CmsCollection, n as CmsEntriesResult, o as CmsEntry, B as BoundaryCity, p as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, q as TravelTimeCache, r as MapsFetchOptions, s as BoundaryLayer, t as ListingWithLocation, u as StaticMapOptions, v as StreetViewAvailabilityOptions, w as StreetViewAvailability, x as StreetViewOptions, N as NeighborhoodBoundaryOptions, y as NeighborhoodBoundary, z as TravelDestination, D as TravelMode, E as TravelTimeOptions, G as TravelTime, H as TravelTimesOptions, I as TravelTimeElement, J as Listing, P as PhotoSearchParams, K as PhotoSearchResult, O as PhotoSearchItem, U as ListingWithMatchedPhoto, V as MatchedListingPhoto } from './types-photo-search-DIoV75SN.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 MapPin, aq as MapPinCluster, ar as MapPolygon, as as MapPolygonSearchOptions, at as MapSearchResult, au as MapsBaseOptions, av as QueryListingsLocation, aw as QueryListingsOptions, ax as SEARCH_EMPTY_COPY, ay as SEARCH_SORT_RELEVANCE, az as SearchChromeModel, aA as SearchListingsOptions, aB as SearchPathLocation, aC as SearchUiFilter, aD as SearchUiOption, aE as StaticMapStyle, aF as TOOLBAR_PRIMARY_FILTER_IDS, aG as applyPathFilter, aH as buildQueryListingsParams, aI as canonicalizeSearchHref, aJ as capMapPage, aK as capMapPageSize, aL as clearStagedPathFilters, aM as clusterPins, aN as countFacetChoices, aO as countOptionLabel, aP as displayPathLocation, aQ as getCmsCollection, aR as getCmsCollections, aS as getCmsEntries, aT as getCmsEntry, aU as getListing, aV as getListings, aW as getSearchUi, aX as getSimilarListings, aY as getSite, aZ as hrefForAppliedChange, a_ as hrefForPathFilters, a$ as hrefWithExplicitPage, b0 as isListingDetailPath, b1 as isMapBounds, b2 as isMapPolygon, b3 as listingLocationLabel, b4 as mapClusterCellDegrees, b5 as mapSearchPins, b6 as paginationPages, b7 as pathFilterHasOption, b8 as pathFilterValue, b9 as publicSearchHref, ba as queryListings, bb as rangeDraftFromPath, bc as readPublicSearch, bd as searchChromeModel, be as searchHrefUsesLegacyFilterQuery, bf as searchListings, bg as searchListingsInBounds, bh as searchListingsInPolygon, bi as searchResultsHeading, bj as searchSortOptions, bk as toListingCardModel, bl as toolbarFilterIds, bm as visibleSearchFilters } from './types-photo-search-DIoV75SN.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Visit-lead schedule: hours in, slots out. Pure — no fetch, no React.
|
|
@@ -106,7 +106,7 @@ type LeadSubmitResult = {
|
|
|
106
106
|
status: 202;
|
|
107
107
|
id: string;
|
|
108
108
|
};
|
|
109
|
-
type LeadSubmitErrorCode = "invalid_listing_id" | "invalid_contact" | "invalid_slot" | "unauthorized" | "rate_limited" | "not_found" | "http" | "network";
|
|
109
|
+
type LeadSubmitErrorCode = "invalid_listing_id" | "invalid_contact" | "invalid_slot" | "invalid_address" | "invalid_property" | "invalid_photo" | "duplicate_property" | "unauthorized" | "rate_limited" | "not_found" | "http" | "network";
|
|
110
110
|
declare class LeadSubmitError extends Error {
|
|
111
111
|
readonly code: LeadSubmitErrorCode;
|
|
112
112
|
readonly status?: number;
|
|
@@ -119,12 +119,108 @@ declare class LeadSubmitError extends Error {
|
|
|
119
119
|
retryAfterSeconds?: number;
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
+
/** Same email rule the webhook applies. */
|
|
123
|
+
declare function isValidEmail(value: string): boolean;
|
|
124
|
+
/** At least two leading non-digit characters, as the editor form requires. */
|
|
125
|
+
declare function isValidName(value: string): boolean;
|
|
122
126
|
/** Fallback when GET /leads/ui fails — same default the API publishes. */
|
|
123
127
|
declare function studioDefaultLeadUi(): LeadUi;
|
|
124
128
|
declare function getLeadUi(options: GetLeadUiOptions): Promise<LeadUi>;
|
|
125
129
|
declare function submitVisitLead(input: VisitLeadInput): Promise<LeadSubmitResult>;
|
|
126
130
|
declare function submitContactLead(input: ContactLeadInput): Promise<LeadSubmitResult>;
|
|
127
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Headless seller lead (property registration). The site draws the form;
|
|
134
|
+
* the SDK owns validation, photo upload and the webhook contract.
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/** Shape of the address search value (Google Places + complement flags). */
|
|
138
|
+
type SellerLeadAddress = {
|
|
139
|
+
fullAddress: string;
|
|
140
|
+
street: string;
|
|
141
|
+
number?: string;
|
|
142
|
+
neighborhood: string;
|
|
143
|
+
city: string;
|
|
144
|
+
state: string;
|
|
145
|
+
postalCode: string;
|
|
146
|
+
country?: string;
|
|
147
|
+
latitude?: number | null;
|
|
148
|
+
longitude?: number | null;
|
|
149
|
+
blocoTorre?: string;
|
|
150
|
+
unidade?: string;
|
|
151
|
+
noNumber?: boolean;
|
|
152
|
+
noBlocoTorre?: boolean;
|
|
153
|
+
noUnidade?: boolean;
|
|
154
|
+
};
|
|
155
|
+
type SellerAddressField = "fullAddress" | "number" | "blocoTorre" | "unidade" | "postalCode";
|
|
156
|
+
type SellerAddressErrors = Partial<Record<SellerAddressField, string>>;
|
|
157
|
+
/**
|
|
158
|
+
* pt-BR messages keyed by field; `{}` when the address can be submitted.
|
|
159
|
+
* A missing geocode reports on `fullAddress`: pick a suggestion again.
|
|
160
|
+
*/
|
|
161
|
+
declare function sellerAddressErrors(address: Partial<SellerLeadAddress> | null | undefined): SellerAddressErrors;
|
|
162
|
+
declare const SELLER_LEAD_PHOTO_MAX_BYTES: number;
|
|
163
|
+
declare const SELLER_LEAD_PHOTO_MAX_COUNT = 30;
|
|
164
|
+
declare const SELLER_LEAD_PHOTO_TYPES: readonly ["image/jpeg", "image/png", "image/webp"];
|
|
165
|
+
type SellerLeadTransport = {
|
|
166
|
+
siteId?: string | Promise<string>;
|
|
167
|
+
baseUrl?: string;
|
|
168
|
+
fetch?: FetchLike;
|
|
169
|
+
/** Site publishable key (`pk_live_…`). Not a secret. */
|
|
170
|
+
publishableKey?: string;
|
|
171
|
+
};
|
|
172
|
+
type UploadSellerLeadPhotoInput = SellerLeadTransport & {
|
|
173
|
+
file: Blob & {
|
|
174
|
+
name?: string;
|
|
175
|
+
type: string;
|
|
176
|
+
size: number;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
/** Uploads one photo and returns its public URL for `submitSellerLead`. */
|
|
180
|
+
declare function uploadSellerLeadPhoto(input: UploadSellerLeadPhotoInput): Promise<string>;
|
|
181
|
+
/** Studio "Cadastro de imóvel" photo-session grid. */
|
|
182
|
+
type SellerPhotoScheduleConfig = {
|
|
183
|
+
disabledDays: number[];
|
|
184
|
+
weekdayTimeSlots: HHmm[];
|
|
185
|
+
weekendTimeSlots: HHmm[];
|
|
186
|
+
};
|
|
187
|
+
declare const STUDIO_DEFAULT_PHOTO_SCHEDULE_CONFIG: SellerPhotoScheduleConfig;
|
|
188
|
+
/** Feed the result to `slotsForDate` / `isVisitSlotAllowed`. */
|
|
189
|
+
declare function sellerPhotoSchedule(config?: SellerPhotoScheduleConfig): VisitSchedule;
|
|
190
|
+
type SellerBusinessType = "sale" | "rent" | "both";
|
|
191
|
+
type SellerLeadProperty = {
|
|
192
|
+
businessType: SellerBusinessType;
|
|
193
|
+
saleValue?: number;
|
|
194
|
+
rentValue?: number;
|
|
195
|
+
condoFee?: number;
|
|
196
|
+
totalArea?: number;
|
|
197
|
+
bedrooms?: number;
|
|
198
|
+
bathrooms?: number;
|
|
199
|
+
suites?: number;
|
|
200
|
+
parkingSpaces?: number;
|
|
201
|
+
};
|
|
202
|
+
type SellerLeadInput = SellerLeadTransport & {
|
|
203
|
+
owner: {
|
|
204
|
+
name: string;
|
|
205
|
+
email: string;
|
|
206
|
+
phone: string;
|
|
207
|
+
};
|
|
208
|
+
address: SellerLeadAddress;
|
|
209
|
+
property: SellerLeadProperty;
|
|
210
|
+
/** URLs returned by `uploadSellerLeadPhoto`. */
|
|
211
|
+
photos?: string[];
|
|
212
|
+
/** Photo session slot when the owner chose "Agendar". */
|
|
213
|
+
photoSession?: {
|
|
214
|
+
date: Date | string;
|
|
215
|
+
time: HHmm;
|
|
216
|
+
};
|
|
217
|
+
photoSchedule?: VisitSchedule;
|
|
218
|
+
visitorId?: string;
|
|
219
|
+
brokerRef?: string;
|
|
220
|
+
referrer?: string;
|
|
221
|
+
};
|
|
222
|
+
declare function submitSellerLead(input: SellerLeadInput): Promise<LeadSubmitResult>;
|
|
223
|
+
|
|
128
224
|
/**
|
|
129
225
|
* Portuguese labels for listing amenity ids. Tenant search-ui dictionary
|
|
130
226
|
* wins; this map is the default-catalog fallback so generated Studio pages
|
|
@@ -428,11 +524,13 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
428
524
|
* this and move that release's names from `optionalReactExports` /
|
|
429
525
|
* `unpublishedSearchExports` / `unpublishedPhoneExports` into the
|
|
430
526
|
* prompt-safe lists. Do not bump here until that tarball is on npm.
|
|
431
|
-
* Phone mask helpers shipped in 0.6.0.
|
|
527
|
+
* Phone mask helpers shipped in 0.6.0. Map search
|
|
528
|
+
* (`useMapSearch`, `searchListingsInBounds`) shipped in 0.9.0 — 0.7.0
|
|
529
|
+
* does not export them. Search filter helpers
|
|
432
530
|
* (`visibleSearchFilters` / `toolbarFilterIds`) shipped in 0.4.12 and
|
|
433
531
|
* remain on this pin.
|
|
434
532
|
*/
|
|
435
|
-
readonly minNpmVersion: "0.
|
|
533
|
+
readonly minNpmVersion: "0.9.0";
|
|
436
534
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
437
535
|
readonly selfInjectSince: "0.4.2";
|
|
438
536
|
readonly chromeStrategy: "app-owned";
|
|
@@ -504,14 +602,15 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
504
602
|
readonly unpublishedSearchExports: readonly ["searchChromeModel", "rangeDraftFromPath"];
|
|
505
603
|
/**
|
|
506
604
|
* maps.fndn.ai helpers (static map, street view, boundaries, travel
|
|
507
|
-
* time) plus friendly map search. They ship in `mapsSince
|
|
508
|
-
* `studioMapsInstruction()`
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
*
|
|
605
|
+
* time) plus friendly map search. They ship in npm 0.9.0 (`mapsSince`).
|
|
606
|
+
* Listing-detail map guidance stays empty: `studioMapsInstruction()`
|
|
607
|
+
* keeps the listing contract for a later task and Studio does not
|
|
608
|
+
* inject it. Map search is `studioMapSearchInstruction()`, and only
|
|
609
|
+
* the site that opted into list-and-map may include that text.
|
|
610
|
+
* `useMapSearch` is a `/react` hook in `optionalReactExports`; the
|
|
611
|
+
* pin sentence does not name it.
|
|
513
612
|
*/
|
|
514
|
-
readonly mapsSince: "0.
|
|
613
|
+
readonly mapsSince: "0.9.0";
|
|
515
614
|
readonly mapsExports: readonly ["listingStaticMapUrl", "listingStreetViewUrl", "listingStreetViewAvailable", "neighborhoodBoundaryLayer", "boundaryLayerUrl", "travelTimeFromListing", "searchListingsInBounds", "searchListingsInPolygon", "clusterPins"];
|
|
516
615
|
/**
|
|
517
616
|
* Market-data helpers (neighborhood price summary, listing market
|
|
@@ -536,8 +635,24 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
536
635
|
*/
|
|
537
636
|
readonly photoSearchExports: readonly ["searchListingPhotos", "applyMatchedPhotoCover"];
|
|
538
637
|
readonly photoSearchSince: "0.7.0";
|
|
638
|
+
/**
|
|
639
|
+
* Seller lead (property registration on `/anunciar-imovel`). Prompt-safe
|
|
640
|
+
* only once `minNpmVersion` reaches `sellerLeadSince`; below it
|
|
641
|
+
* `studioSellerLeadSdkInstruction` prints nothing and
|
|
642
|
+
* `studioCodegenContractViolations` flags the names.
|
|
643
|
+
*/
|
|
644
|
+
readonly sellerLeadExports: readonly ["submitSellerLead", "uploadSellerLeadPhoto", "sellerAddressErrors", "sellerPhotoSchedule", "isValidEmail", "isValidName"];
|
|
645
|
+
readonly sellerLeadSince: "0.10.0";
|
|
539
646
|
};
|
|
540
647
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
648
|
+
/** Whether the pinned tarball carries the seller-lead surface. */
|
|
649
|
+
declare function isSellerLeadOnPin(pin?: string): boolean;
|
|
650
|
+
/**
|
|
651
|
+
* Fixed SDK half of the property-registration page. The configured fields
|
|
652
|
+
* and photo options come from the Studio onboarding block. Empty below
|
|
653
|
+
* `sellerLeadSince`, so no prompt names an identifier v0 cannot import.
|
|
654
|
+
*/
|
|
655
|
+
declare function studioSellerLeadSdkInstruction(pin?: string): string;
|
|
541
656
|
/** Whether the pinned tarball carries the photo-search surface. */
|
|
542
657
|
declare function isPhotoSearchOnPin(pin?: string): boolean;
|
|
543
658
|
/**
|
|
@@ -596,6 +711,13 @@ declare function mapsExportsPublished(pin?: string): boolean;
|
|
|
596
711
|
declare function studioMapsInstruction(options?: {
|
|
597
712
|
pin?: string;
|
|
598
713
|
}): string;
|
|
714
|
+
/**
|
|
715
|
+
* Search-page map mode. Empty below `mapsSince`. Studio injects this only
|
|
716
|
+
* when the site chose list and map. Listing-detail helpers stay out of it.
|
|
717
|
+
*/
|
|
718
|
+
declare function studioMapSearchInstruction(options?: {
|
|
719
|
+
pin?: string;
|
|
720
|
+
}): string;
|
|
599
721
|
/** True when the pinned tarball ships the market-data helpers. */
|
|
600
722
|
declare function marketExportsAvailableAt(pin: string): boolean;
|
|
601
723
|
/**
|
|
@@ -1234,4 +1356,4 @@ declare function resolveMatchedCoverPhoto(photo: MatchedListingPhoto | null | un
|
|
|
1234
1356
|
*/
|
|
1235
1357
|
declare function applyMatchedPhotoCover<T extends Listing>(cards: ReadonlyArray<T>, photoResults: PhotoSearchResult | ReadonlyArray<PhotoSearchItem> | null | undefined, options?: ApplyMatchedPhotoCoverOptions): Array<T & ListingWithMatchedPhoto>;
|
|
1236
1358
|
|
|
1237
|
-
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 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, STUDIO_DEFAULT_VISIT_SCHEDULE, STUDIO_SDK_CONTRACT, STUDIO_SDK_PACKAGE, STUDIO_SITE_LAYOUT, type SearchListingPhotosOptions, SearchListingsParams, SearchListingsResult, SearchPathFilters, SearchUi, SearchUiDictionary, type SimilarByPhotoItem, type SimilarByPhotoResult, SimilarListingsResult, type SimilarPhotoMatch, Site, StaticMapOptions, StreetViewAvailability, StreetViewAvailabilityOptions, StreetViewOptions, type StudioSdkContract, TravelDestination, TravelMode, TravelTime, TravelTimeCache, TravelTimeCacheOptions, TravelTimeElement, TravelTimeOptions, TravelTimesOptions, VISIT_TIME_ZONE, type VisitHours, type VisitLeadInput, type VisitSchedule, type VisitScheduleConfig, 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, getSimilarByPhoto, hasShowcaseLeadsPostUrl, isPhotoSearchOnPin, isStudioPreviewHost, 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, serializeAppliedSearchQuery, slotsForDate, studioAmenityInstruction, studioChromeInstruction, studioCodegenContractViolations, studioDefaultLeadUi, studioLayoutInstruction, studioLeadInstruction, studioListingCardInstruction, studioListingDetailInstruction, studioMapsInstruction, studioMarketInstruction, studioPhotoInstruction, studioPhotoInstructionFor, studioPhotoSearchInstruction, studioPublishableKeyInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSiteWidthCss, submitContactLead, submitVisitLead, toE164, travelTimeCacheKey, travelTimeFromListing, travelTimesFromListing, truncateNationalPhoneDigits, unavailableReactImports };
|
|
1359
|
+
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 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, 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 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, 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, getSimilarByPhoto, hasShowcaseLeadsPostUrl, isPhotoSearchOnPin, isSellerLeadOnPin, 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, studioMapSearchInstruction, studioMapsInstruction, studioMarketInstruction, studioPhotoInstruction, studioPhotoInstructionFor, studioPhotoSearchInstruction, studioPublishableKeyInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSellerLeadSdkInstruction, studioSiteWidthCss, submitContactLead, submitSellerLead, submitVisitLead, toE164, travelTimeCacheKey, travelTimeFromListing, travelTimesFromListing, truncateNationalPhoneDigits, unavailableReactImports, uploadSellerLeadPhoto };
|