@garagem-ai/site-sdk 0.11.0 → 0.12.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/README.md +1 -0
- package/dist/index.d.mts +166 -5
- package/dist/index.d.ts +166 -5
- package/dist/index.js +88 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +85 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +14 -0
- package/src/share.ts +114 -0
- package/src/studio-contract.ts +62 -8
- package/src/types-share.ts +122 -0
package/README.md
CHANGED
|
@@ -67,6 +67,7 @@ raw escape hatch when you need full control.
|
|
|
67
67
|
| `getCmsEntries({ siteId, collection, limit?, offset? })` | Published CMS entries only |
|
|
68
68
|
| `getCmsEntry({ siteId, collection, slug })` | One published CMS entry |
|
|
69
69
|
| `getSearchUi({ siteId, next? })` | Tenant search schema (filters, slugs) |
|
|
70
|
+
| `getShareLink({ token, password?, next? })` | Resolve a `/p/{token}` share link. Returns `{ ok: false, reason }` (not a throw) for `not_found` / `inactive` / `expired` / `password_required` / `password_invalid` so you can render a password form or an unavailable state. |
|
|
70
71
|
| `getLeadUi({ siteId, next? })` | Visit-default lead dialog schema (weekday hours, Sat/Sun flags) |
|
|
71
72
|
| `submitVisitLead({ siteId, listingId, … })` | POST a visit lead (`listing.id` UUID; civil `visitDate` or `Date`/ISO instant normalized in the schedule timezone) |
|
|
72
73
|
| `submitContactLead({ siteId, listingId, … })` | POST a contact lead (no date/time) |
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,151 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as ListingDetail, F as FetchLike, R as RequestNextOptions, 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-Bmf1f1-Y.mjs';
|
|
2
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 visibleSearchFilters } from './types-photo-search-Bmf1f1-Y.mjs';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Types for the public Share Link API (`GET`/`POST /api/sites/share/{token}`).
|
|
6
|
+
*
|
|
7
|
+
* This mirrors `resolveShareToken()` in Foundation
|
|
8
|
+
* (`apps/foundation/os/domain/sites/public/share-token.ts`) — treat it as a
|
|
9
|
+
* public contract (additive changes only), but note it is **today's raw
|
|
10
|
+
* shape**, not the friendly `Listing`/`ListingDetail` contract `getListing`
|
|
11
|
+
* returns. Field-visibility masking (price/address/agent redaction per the
|
|
12
|
+
* tenant's sharing config) is already applied server-side before you see
|
|
13
|
+
* this payload — do not try to "fix" a hidden price or address.
|
|
14
|
+
*
|
|
15
|
+
* For `entityType === "listing"`, `listing` is the same shape `getListing`
|
|
16
|
+
* returns. Render that. `entity` stays the raw Foundation payload.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/** Entity kinds a share token can point at. Only `"listing"` is typed in
|
|
20
|
+
* detail today; the rest pass through as raw records pending follow-up
|
|
21
|
+
* work. */
|
|
22
|
+
type ShareEntityType = "listing" | "shortlist" | "seller_report" | "visit_itinerary" | "pricing_tool" | "visit_survey" | "form" | (string & {});
|
|
23
|
+
/** Why `getShareLink` failed. Maps 1:1 to `resolveShareToken`'s reasons. */
|
|
24
|
+
type ShareLinkErrorReason = "not_found" | "inactive" | "expired" | "password_required" | "password_invalid" | (string & {});
|
|
25
|
+
/** Raw listing + property fields for a `listing`-type share token.
|
|
26
|
+
* Foundation-internal column names — distinct from the public `Listing`
|
|
27
|
+
* type's field names (e.g. `parkingSpots` here vs. `parkingSpaces` there).
|
|
28
|
+
* See the module doc: a normalized, `ListingDetail`-shaped field is
|
|
29
|
+
* planned as an additive follow-up. */
|
|
30
|
+
interface ShareListingEntity {
|
|
31
|
+
listing: {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
description: string | null;
|
|
35
|
+
price: number | null;
|
|
36
|
+
currency: string | null;
|
|
37
|
+
priceVisibility: string | null;
|
|
38
|
+
listingType: string | null;
|
|
39
|
+
listingCode: string | null;
|
|
40
|
+
stage: string | null;
|
|
41
|
+
status: string | null;
|
|
42
|
+
visibility: string | null;
|
|
43
|
+
createdAt: string | null;
|
|
44
|
+
publishedAt: string | null;
|
|
45
|
+
propertyId: string | null;
|
|
46
|
+
isPrimaryMarket: boolean | null;
|
|
47
|
+
typologyId: string | null;
|
|
48
|
+
};
|
|
49
|
+
property: Record<string, unknown> | null;
|
|
50
|
+
media: Array<{
|
|
51
|
+
id: string;
|
|
52
|
+
src: string;
|
|
53
|
+
alt?: string;
|
|
54
|
+
type: "image" | "video" | "tour";
|
|
55
|
+
category?: string;
|
|
56
|
+
order?: number;
|
|
57
|
+
isPrimary?: boolean;
|
|
58
|
+
entityType?: string;
|
|
59
|
+
}>;
|
|
60
|
+
[key: string]: unknown;
|
|
61
|
+
}
|
|
62
|
+
/** Share-token metadata echoed back on a successful resolve. */
|
|
63
|
+
interface ShareLinkToken {
|
|
64
|
+
entityType: ShareEntityType;
|
|
65
|
+
entityId: string;
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
}
|
|
68
|
+
/** Successful `getShareLink` result. */
|
|
69
|
+
interface ShareLinkSuccess {
|
|
70
|
+
ok: true;
|
|
71
|
+
/** `entity` is typed for `entityType === "listing"`; narrow with a type
|
|
72
|
+
* guard (`result.token.entityType === "listing"`) before reading
|
|
73
|
+
* listing-specific fields on other entity types. */
|
|
74
|
+
token: ShareLinkToken;
|
|
75
|
+
entity: ShareListingEntity | Record<string, unknown>;
|
|
76
|
+
branding?: Record<string, unknown>;
|
|
77
|
+
agentInfo?: Record<string, unknown>;
|
|
78
|
+
tenantConfig?: Record<string, unknown>;
|
|
79
|
+
site?: Record<string, unknown>;
|
|
80
|
+
shareDisplayConfig?: Record<string, unknown>;
|
|
81
|
+
requestConfig?: Record<string, unknown>;
|
|
82
|
+
offerForm?: Record<string, unknown>;
|
|
83
|
+
tenantId: string;
|
|
84
|
+
/**
|
|
85
|
+
* Present for `entityType === "listing"` once Foundation attaches the
|
|
86
|
+
* public `getListing` shape. Render this with the same listing-detail
|
|
87
|
+
* module as `/imoveis`. Absent on older payloads and on other entity types.
|
|
88
|
+
*/
|
|
89
|
+
listing?: ListingDetail;
|
|
90
|
+
}
|
|
91
|
+
/** Failed `getShareLink` result. Branch UI on `reason`, not just `status`.
|
|
92
|
+
* `listingCode` / `site` are present on some errors (e.g. `password_required`
|
|
93
|
+
* for a listing share) so a password gate can still show which listing it's
|
|
94
|
+
* for. */
|
|
95
|
+
interface ShareLinkError {
|
|
96
|
+
ok: false;
|
|
97
|
+
status: number;
|
|
98
|
+
reason: ShareLinkErrorReason | null;
|
|
99
|
+
message: string;
|
|
100
|
+
listingCode?: string;
|
|
101
|
+
site?: Record<string, unknown>;
|
|
102
|
+
}
|
|
103
|
+
type ShareLinkResult = ShareLinkSuccess | ShareLinkError;
|
|
104
|
+
|
|
105
|
+
interface GetShareLinkOptions {
|
|
106
|
+
/** The `{token}` from a `/p/{token}` (or `/s`, `/i`, `/r`, `/c`) URL. */
|
|
107
|
+
token: string;
|
|
108
|
+
/** Password for a password-protected share. Sends a POST when present,
|
|
109
|
+
* a GET otherwise — matches the Foundation route's contract. */
|
|
110
|
+
password?: string;
|
|
111
|
+
/** Garagem API base URL. Defaults to `https://app.garagem.ai`. */
|
|
112
|
+
baseUrl?: string;
|
|
113
|
+
/** Override the fetch implementation (testing, edge runtimes, retries). */
|
|
114
|
+
fetch?: FetchLike;
|
|
115
|
+
/** Next.js App Router caching hints. Ignored on runtimes that don't
|
|
116
|
+
* understand them. Share links are per-visitor and often
|
|
117
|
+
* password/expiry-gated — avoid caching this call in production unless
|
|
118
|
+
* you know the token is long-lived and public. */
|
|
119
|
+
next?: RequestNextOptions;
|
|
120
|
+
/**
|
|
121
|
+
* Site publishable key (`pk_live_…`) from Configurações → Sites → API
|
|
122
|
+
* pública. Not a secret. Omit it and the request stays anonymous.
|
|
123
|
+
*/
|
|
124
|
+
publishableKey?: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Resolve a share-link token (`/p/{token}` and friends) against Foundation's
|
|
128
|
+
* public share-link API.
|
|
129
|
+
*
|
|
130
|
+
* Unlike {@link import("./fetchers").getListing}, this does **not** throw on
|
|
131
|
+
* a 401/403/404/410 — those are expected, UI-relevant outcomes for a share
|
|
132
|
+
* page (password gate, expired link, not found), returned as
|
|
133
|
+
* `{ ok: false, reason, ... }` so the caller can branch instead of catching.
|
|
134
|
+
* Genuine transport/5xx failures still throw {@link GaragemSdkError}.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* const result = await getShareLink({ token });
|
|
138
|
+
* if (!result.ok && result.reason === "password_required") {
|
|
139
|
+
* // render a password form, then retry with `password`
|
|
140
|
+
* }
|
|
141
|
+
* if (!result.ok) {
|
|
142
|
+
* // "not_found" | "inactive" | "expired" | other -> not-available state
|
|
143
|
+
* }
|
|
144
|
+
* // result.ok === true: result.entity (today's raw shape — see
|
|
145
|
+
* // types-share.ts doc for the planned normalized `listing` field)
|
|
146
|
+
*/
|
|
147
|
+
declare function getShareLink(options: GetShareLinkOptions): Promise<ShareLinkResult>;
|
|
148
|
+
|
|
4
149
|
/**
|
|
5
150
|
* Visit-lead schedule: hours in, slots out. Pure — no fetch, no React.
|
|
6
151
|
* Calendar dates are civil dates in `timeZone` (America/Sao_Paulo), never
|
|
@@ -527,10 +672,11 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
527
672
|
* Phone mask helpers shipped in 0.6.0. Map search
|
|
528
673
|
* (`useMapSearch`, `searchListingsInBounds`) shipped in 0.9.0 — 0.7.0
|
|
529
674
|
* does not export them. Property registration shipped in 0.10.0.
|
|
530
|
-
*
|
|
531
|
-
*
|
|
675
|
+
* Weighted map buckets (`map.buckets`, clustered by the hook) shipped
|
|
676
|
+
* in 0.11.0. Search filter helpers (`visibleSearchFilters` /
|
|
677
|
+
* `toolbarFilterIds`) shipped in 0.4.12 and remain on this pin.
|
|
532
678
|
*/
|
|
533
|
-
readonly minNpmVersion: "0.
|
|
679
|
+
readonly minNpmVersion: "0.11.0";
|
|
534
680
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
535
681
|
readonly selfInjectSince: "0.4.2";
|
|
536
682
|
readonly chromeStrategy: "app-owned";
|
|
@@ -649,10 +795,25 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
649
795
|
*/
|
|
650
796
|
readonly sellerLeadExports: readonly ["submitSellerLead", "uploadSellerLeadPhoto", "sellerAddressErrors", "sellerPhotoSchedule", "isValidEmail", "isValidName"];
|
|
651
797
|
readonly sellerLeadSince: "0.10.0";
|
|
798
|
+
/**
|
|
799
|
+
* Share-link page (`/p/[token]`). Prompt-safe only once `minNpmVersion`
|
|
800
|
+
* reaches `shareLinkSince`. Below it `studioShareLinkInstruction` prints
|
|
801
|
+
* nothing and `studioCodegenContractViolations` flags `getShareLink` —
|
|
802
|
+
* v0 installs the pin and copies any identifier it sees.
|
|
803
|
+
*/
|
|
804
|
+
readonly shareExports: readonly ["getShareLink"];
|
|
805
|
+
readonly shareLinkSince: "0.12.0";
|
|
652
806
|
};
|
|
653
807
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
654
808
|
/** Whether the pinned tarball carries the seller-lead surface. */
|
|
655
809
|
declare function isSellerLeadOnPin(pin?: string): boolean;
|
|
810
|
+
/** Whether the pinned tarball exports `getShareLink`. */
|
|
811
|
+
declare function isShareLinkOnPin(pin?: string): boolean;
|
|
812
|
+
/**
|
|
813
|
+
* Native `/p/[token]` page. Empty below `shareLinkSince`, so the current
|
|
814
|
+
* Studio prompt does not mention `getShareLink`.
|
|
815
|
+
*/
|
|
816
|
+
declare function studioShareLinkInstruction(pin?: string): string;
|
|
656
817
|
/**
|
|
657
818
|
* Fixed SDK half of the property-registration page. The configured fields
|
|
658
819
|
* and photo options come from the Studio onboarding block. Empty below
|
|
@@ -1366,4 +1527,4 @@ declare function resolveMatchedCoverPhoto(photo: MatchedListingPhoto | null | un
|
|
|
1366
1527
|
*/
|
|
1367
1528
|
declare function applyMatchedPhotoCover<T extends Listing>(cards: ReadonlyArray<T>, photoResults: PhotoSearchResult | ReadonlyArray<PhotoSearchItem> | null | undefined, options?: ApplyMatchedPhotoCoverOptions): Array<T & ListingWithMatchedPhoto>;
|
|
1368
1529
|
|
|
1369
|
-
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 };
|
|
1530
|
+
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, 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, 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, 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, studioMapSearchInstruction, studioMapsInstruction, studioMarketInstruction, studioPhotoInstruction, studioPhotoInstructionFor, studioPhotoSearchInstruction, studioPublishableKeyInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSellerLeadSdkInstruction, studioShareLinkInstruction, studioSiteWidthCss, submitContactLead, submitSellerLead, submitVisitLead, toE164, travelTimeCacheKey, travelTimeFromListing, travelTimesFromListing, truncateNationalPhoneDigits, unavailableReactImports, uploadSellerLeadPhoto };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,151 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as ListingDetail, F as FetchLike, R as RequestNextOptions, 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-Bmf1f1-Y.js';
|
|
2
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 visibleSearchFilters } from './types-photo-search-Bmf1f1-Y.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Types for the public Share Link API (`GET`/`POST /api/sites/share/{token}`).
|
|
6
|
+
*
|
|
7
|
+
* This mirrors `resolveShareToken()` in Foundation
|
|
8
|
+
* (`apps/foundation/os/domain/sites/public/share-token.ts`) — treat it as a
|
|
9
|
+
* public contract (additive changes only), but note it is **today's raw
|
|
10
|
+
* shape**, not the friendly `Listing`/`ListingDetail` contract `getListing`
|
|
11
|
+
* returns. Field-visibility masking (price/address/agent redaction per the
|
|
12
|
+
* tenant's sharing config) is already applied server-side before you see
|
|
13
|
+
* this payload — do not try to "fix" a hidden price or address.
|
|
14
|
+
*
|
|
15
|
+
* For `entityType === "listing"`, `listing` is the same shape `getListing`
|
|
16
|
+
* returns. Render that. `entity` stays the raw Foundation payload.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/** Entity kinds a share token can point at. Only `"listing"` is typed in
|
|
20
|
+
* detail today; the rest pass through as raw records pending follow-up
|
|
21
|
+
* work. */
|
|
22
|
+
type ShareEntityType = "listing" | "shortlist" | "seller_report" | "visit_itinerary" | "pricing_tool" | "visit_survey" | "form" | (string & {});
|
|
23
|
+
/** Why `getShareLink` failed. Maps 1:1 to `resolveShareToken`'s reasons. */
|
|
24
|
+
type ShareLinkErrorReason = "not_found" | "inactive" | "expired" | "password_required" | "password_invalid" | (string & {});
|
|
25
|
+
/** Raw listing + property fields for a `listing`-type share token.
|
|
26
|
+
* Foundation-internal column names — distinct from the public `Listing`
|
|
27
|
+
* type's field names (e.g. `parkingSpots` here vs. `parkingSpaces` there).
|
|
28
|
+
* See the module doc: a normalized, `ListingDetail`-shaped field is
|
|
29
|
+
* planned as an additive follow-up. */
|
|
30
|
+
interface ShareListingEntity {
|
|
31
|
+
listing: {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
description: string | null;
|
|
35
|
+
price: number | null;
|
|
36
|
+
currency: string | null;
|
|
37
|
+
priceVisibility: string | null;
|
|
38
|
+
listingType: string | null;
|
|
39
|
+
listingCode: string | null;
|
|
40
|
+
stage: string | null;
|
|
41
|
+
status: string | null;
|
|
42
|
+
visibility: string | null;
|
|
43
|
+
createdAt: string | null;
|
|
44
|
+
publishedAt: string | null;
|
|
45
|
+
propertyId: string | null;
|
|
46
|
+
isPrimaryMarket: boolean | null;
|
|
47
|
+
typologyId: string | null;
|
|
48
|
+
};
|
|
49
|
+
property: Record<string, unknown> | null;
|
|
50
|
+
media: Array<{
|
|
51
|
+
id: string;
|
|
52
|
+
src: string;
|
|
53
|
+
alt?: string;
|
|
54
|
+
type: "image" | "video" | "tour";
|
|
55
|
+
category?: string;
|
|
56
|
+
order?: number;
|
|
57
|
+
isPrimary?: boolean;
|
|
58
|
+
entityType?: string;
|
|
59
|
+
}>;
|
|
60
|
+
[key: string]: unknown;
|
|
61
|
+
}
|
|
62
|
+
/** Share-token metadata echoed back on a successful resolve. */
|
|
63
|
+
interface ShareLinkToken {
|
|
64
|
+
entityType: ShareEntityType;
|
|
65
|
+
entityId: string;
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
}
|
|
68
|
+
/** Successful `getShareLink` result. */
|
|
69
|
+
interface ShareLinkSuccess {
|
|
70
|
+
ok: true;
|
|
71
|
+
/** `entity` is typed for `entityType === "listing"`; narrow with a type
|
|
72
|
+
* guard (`result.token.entityType === "listing"`) before reading
|
|
73
|
+
* listing-specific fields on other entity types. */
|
|
74
|
+
token: ShareLinkToken;
|
|
75
|
+
entity: ShareListingEntity | Record<string, unknown>;
|
|
76
|
+
branding?: Record<string, unknown>;
|
|
77
|
+
agentInfo?: Record<string, unknown>;
|
|
78
|
+
tenantConfig?: Record<string, unknown>;
|
|
79
|
+
site?: Record<string, unknown>;
|
|
80
|
+
shareDisplayConfig?: Record<string, unknown>;
|
|
81
|
+
requestConfig?: Record<string, unknown>;
|
|
82
|
+
offerForm?: Record<string, unknown>;
|
|
83
|
+
tenantId: string;
|
|
84
|
+
/**
|
|
85
|
+
* Present for `entityType === "listing"` once Foundation attaches the
|
|
86
|
+
* public `getListing` shape. Render this with the same listing-detail
|
|
87
|
+
* module as `/imoveis`. Absent on older payloads and on other entity types.
|
|
88
|
+
*/
|
|
89
|
+
listing?: ListingDetail;
|
|
90
|
+
}
|
|
91
|
+
/** Failed `getShareLink` result. Branch UI on `reason`, not just `status`.
|
|
92
|
+
* `listingCode` / `site` are present on some errors (e.g. `password_required`
|
|
93
|
+
* for a listing share) so a password gate can still show which listing it's
|
|
94
|
+
* for. */
|
|
95
|
+
interface ShareLinkError {
|
|
96
|
+
ok: false;
|
|
97
|
+
status: number;
|
|
98
|
+
reason: ShareLinkErrorReason | null;
|
|
99
|
+
message: string;
|
|
100
|
+
listingCode?: string;
|
|
101
|
+
site?: Record<string, unknown>;
|
|
102
|
+
}
|
|
103
|
+
type ShareLinkResult = ShareLinkSuccess | ShareLinkError;
|
|
104
|
+
|
|
105
|
+
interface GetShareLinkOptions {
|
|
106
|
+
/** The `{token}` from a `/p/{token}` (or `/s`, `/i`, `/r`, `/c`) URL. */
|
|
107
|
+
token: string;
|
|
108
|
+
/** Password for a password-protected share. Sends a POST when present,
|
|
109
|
+
* a GET otherwise — matches the Foundation route's contract. */
|
|
110
|
+
password?: string;
|
|
111
|
+
/** Garagem API base URL. Defaults to `https://app.garagem.ai`. */
|
|
112
|
+
baseUrl?: string;
|
|
113
|
+
/** Override the fetch implementation (testing, edge runtimes, retries). */
|
|
114
|
+
fetch?: FetchLike;
|
|
115
|
+
/** Next.js App Router caching hints. Ignored on runtimes that don't
|
|
116
|
+
* understand them. Share links are per-visitor and often
|
|
117
|
+
* password/expiry-gated — avoid caching this call in production unless
|
|
118
|
+
* you know the token is long-lived and public. */
|
|
119
|
+
next?: RequestNextOptions;
|
|
120
|
+
/**
|
|
121
|
+
* Site publishable key (`pk_live_…`) from Configurações → Sites → API
|
|
122
|
+
* pública. Not a secret. Omit it and the request stays anonymous.
|
|
123
|
+
*/
|
|
124
|
+
publishableKey?: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Resolve a share-link token (`/p/{token}` and friends) against Foundation's
|
|
128
|
+
* public share-link API.
|
|
129
|
+
*
|
|
130
|
+
* Unlike {@link import("./fetchers").getListing}, this does **not** throw on
|
|
131
|
+
* a 401/403/404/410 — those are expected, UI-relevant outcomes for a share
|
|
132
|
+
* page (password gate, expired link, not found), returned as
|
|
133
|
+
* `{ ok: false, reason, ... }` so the caller can branch instead of catching.
|
|
134
|
+
* Genuine transport/5xx failures still throw {@link GaragemSdkError}.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* const result = await getShareLink({ token });
|
|
138
|
+
* if (!result.ok && result.reason === "password_required") {
|
|
139
|
+
* // render a password form, then retry with `password`
|
|
140
|
+
* }
|
|
141
|
+
* if (!result.ok) {
|
|
142
|
+
* // "not_found" | "inactive" | "expired" | other -> not-available state
|
|
143
|
+
* }
|
|
144
|
+
* // result.ok === true: result.entity (today's raw shape — see
|
|
145
|
+
* // types-share.ts doc for the planned normalized `listing` field)
|
|
146
|
+
*/
|
|
147
|
+
declare function getShareLink(options: GetShareLinkOptions): Promise<ShareLinkResult>;
|
|
148
|
+
|
|
4
149
|
/**
|
|
5
150
|
* Visit-lead schedule: hours in, slots out. Pure — no fetch, no React.
|
|
6
151
|
* Calendar dates are civil dates in `timeZone` (America/Sao_Paulo), never
|
|
@@ -527,10 +672,11 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
527
672
|
* Phone mask helpers shipped in 0.6.0. Map search
|
|
528
673
|
* (`useMapSearch`, `searchListingsInBounds`) shipped in 0.9.0 — 0.7.0
|
|
529
674
|
* does not export them. Property registration shipped in 0.10.0.
|
|
530
|
-
*
|
|
531
|
-
*
|
|
675
|
+
* Weighted map buckets (`map.buckets`, clustered by the hook) shipped
|
|
676
|
+
* in 0.11.0. Search filter helpers (`visibleSearchFilters` /
|
|
677
|
+
* `toolbarFilterIds`) shipped in 0.4.12 and remain on this pin.
|
|
532
678
|
*/
|
|
533
|
-
readonly minNpmVersion: "0.
|
|
679
|
+
readonly minNpmVersion: "0.11.0";
|
|
534
680
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
535
681
|
readonly selfInjectSince: "0.4.2";
|
|
536
682
|
readonly chromeStrategy: "app-owned";
|
|
@@ -649,10 +795,25 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
649
795
|
*/
|
|
650
796
|
readonly sellerLeadExports: readonly ["submitSellerLead", "uploadSellerLeadPhoto", "sellerAddressErrors", "sellerPhotoSchedule", "isValidEmail", "isValidName"];
|
|
651
797
|
readonly sellerLeadSince: "0.10.0";
|
|
798
|
+
/**
|
|
799
|
+
* Share-link page (`/p/[token]`). Prompt-safe only once `minNpmVersion`
|
|
800
|
+
* reaches `shareLinkSince`. Below it `studioShareLinkInstruction` prints
|
|
801
|
+
* nothing and `studioCodegenContractViolations` flags `getShareLink` —
|
|
802
|
+
* v0 installs the pin and copies any identifier it sees.
|
|
803
|
+
*/
|
|
804
|
+
readonly shareExports: readonly ["getShareLink"];
|
|
805
|
+
readonly shareLinkSince: "0.12.0";
|
|
652
806
|
};
|
|
653
807
|
type StudioSdkContract = typeof STUDIO_SDK_CONTRACT;
|
|
654
808
|
/** Whether the pinned tarball carries the seller-lead surface. */
|
|
655
809
|
declare function isSellerLeadOnPin(pin?: string): boolean;
|
|
810
|
+
/** Whether the pinned tarball exports `getShareLink`. */
|
|
811
|
+
declare function isShareLinkOnPin(pin?: string): boolean;
|
|
812
|
+
/**
|
|
813
|
+
* Native `/p/[token]` page. Empty below `shareLinkSince`, so the current
|
|
814
|
+
* Studio prompt does not mention `getShareLink`.
|
|
815
|
+
*/
|
|
816
|
+
declare function studioShareLinkInstruction(pin?: string): string;
|
|
656
817
|
/**
|
|
657
818
|
* Fixed SDK half of the property-registration page. The configured fields
|
|
658
819
|
* and photo options come from the Studio onboarding block. Empty below
|
|
@@ -1366,4 +1527,4 @@ declare function resolveMatchedCoverPhoto(photo: MatchedListingPhoto | null | un
|
|
|
1366
1527
|
*/
|
|
1367
1528
|
declare function applyMatchedPhotoCover<T extends Listing>(cards: ReadonlyArray<T>, photoResults: PhotoSearchResult | ReadonlyArray<PhotoSearchItem> | null | undefined, options?: ApplyMatchedPhotoCoverOptions): Array<T & ListingWithMatchedPhoto>;
|
|
1368
1529
|
|
|
1369
|
-
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 };
|
|
1530
|
+
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, 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, 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, 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, studioMapSearchInstruction, studioMapsInstruction, studioMarketInstruction, studioPhotoInstruction, studioPhotoInstructionFor, studioPhotoSearchInstruction, studioPublishableKeyInstruction, studioSdkPinInstruction, studioSearchInstruction, studioSearchLandmarkInstruction, studioSellerLeadSdkInstruction, studioShareLinkInstruction, studioSiteWidthCss, submitContactLead, submitSellerLead, submitVisitLead, toE164, travelTimeCacheKey, travelTimeFromListing, travelTimesFromListing, truncateNationalPhoneDigits, unavailableReactImports, uploadSellerLeadPhoto };
|