@garagem-ai/site-sdk 0.1.1 → 0.3.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 +149 -61
- package/dist/index.d.mts +347 -8
- package/dist/index.d.ts +347 -8
- package/dist/index.js +783 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +762 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -6
- package/src/applied-query.ts +42 -0
- package/src/client.ts +174 -29
- package/src/fetchers.ts +259 -16
- package/src/index.ts +61 -0
- package/src/internal/url.ts +4 -2
- package/src/listing-path.ts +19 -0
- package/src/loc-params.ts +36 -0
- package/src/path.ts +73 -0
- package/src/resolve-site-id.ts +55 -0
- package/src/types.ts +187 -4
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ interface ListingPropertySummary {
|
|
|
18
18
|
parkingSpaces: number;
|
|
19
19
|
totalArea: number;
|
|
20
20
|
usableArea: number;
|
|
21
|
+
/** Monthly condo fee in BRL when the listing has one. */
|
|
22
|
+
condoFee?: number;
|
|
21
23
|
}
|
|
22
24
|
/** Address breakdown returned with every listing. */
|
|
23
25
|
interface ListingLocation {
|
|
@@ -55,7 +57,16 @@ interface ListingMedia {
|
|
|
55
57
|
* promotional flows) don't get masked as "sob consulta".
|
|
56
58
|
*/
|
|
57
59
|
interface Listing {
|
|
60
|
+
/** Internal UUID — POST lead with this. Never put it in the URL. */
|
|
58
61
|
id: string;
|
|
62
|
+
/** Public identity for display (`#ABC`) and lookup. `null` if the row has no code. */
|
|
63
|
+
listingCode: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Canonical public href from the Sites API (`/imoveis/.../id-{listingCode}`).
|
|
66
|
+
* Prefer `listingPublicPath(listing)` so a missing `path` (CDN deploy
|
|
67
|
+
* window) still falls back to `/imoveis/id-{listingCode}`.
|
|
68
|
+
*/
|
|
69
|
+
path: string;
|
|
59
70
|
title: string;
|
|
60
71
|
description: string;
|
|
61
72
|
businessType: ListingBusinessType;
|
|
@@ -118,6 +129,122 @@ interface ListingsResult {
|
|
|
118
129
|
/** Echo of the `offset` query param actually applied. */
|
|
119
130
|
offset?: number;
|
|
120
131
|
}
|
|
132
|
+
type SearchUiOption = {
|
|
133
|
+
id: string;
|
|
134
|
+
slug: string;
|
|
135
|
+
label: string;
|
|
136
|
+
};
|
|
137
|
+
type SearchUiFilter = {
|
|
138
|
+
id: string;
|
|
139
|
+
label: string;
|
|
140
|
+
type: "enum" | "count" | "range";
|
|
141
|
+
options?: SearchUiOption[];
|
|
142
|
+
};
|
|
143
|
+
type SearchUiDictionary = {
|
|
144
|
+
listingTypes: SearchUiOption[];
|
|
145
|
+
propertyTypes: SearchUiOption[];
|
|
146
|
+
propertyFeatures: SearchUiOption[];
|
|
147
|
+
buildingAmenities: SearchUiOption[];
|
|
148
|
+
};
|
|
149
|
+
/** Geo leftovers on a default-V2 search path (`/imoveis/...`). */
|
|
150
|
+
type SearchPathLocation = {
|
|
151
|
+
state?: string;
|
|
152
|
+
city?: string;
|
|
153
|
+
neighborhood?: string;
|
|
154
|
+
street?: string;
|
|
155
|
+
};
|
|
156
|
+
/** Filters encoded in the public search pathname (not `?loc=`). */
|
|
157
|
+
type SearchPathFilters = {
|
|
158
|
+
listingType?: ListingBusinessType | string;
|
|
159
|
+
propertyType?: string | string[];
|
|
160
|
+
location?: SearchPathLocation;
|
|
161
|
+
bedrooms?: number | number[];
|
|
162
|
+
bathrooms?: number | number[];
|
|
163
|
+
suites?: number | number[];
|
|
164
|
+
parkingSpots?: number | number[];
|
|
165
|
+
price?: {
|
|
166
|
+
min?: number;
|
|
167
|
+
max?: number;
|
|
168
|
+
};
|
|
169
|
+
area?: {
|
|
170
|
+
min?: number;
|
|
171
|
+
max?: number;
|
|
172
|
+
};
|
|
173
|
+
propertyFeatures?: string[];
|
|
174
|
+
buildingAmenities?: string[];
|
|
175
|
+
};
|
|
176
|
+
/** Query-string state on a search URL (`page`, `ordenar`, `q`, `loc`). */
|
|
177
|
+
type AppliedSearchQuery = {
|
|
178
|
+
page?: number;
|
|
179
|
+
sort?: string | null;
|
|
180
|
+
query?: string;
|
|
181
|
+
loc?: string[];
|
|
182
|
+
};
|
|
183
|
+
type AppliedSearchChange = {
|
|
184
|
+
type: "sort";
|
|
185
|
+
sort: string | null;
|
|
186
|
+
} | {
|
|
187
|
+
type: "page";
|
|
188
|
+
page: number;
|
|
189
|
+
} | {
|
|
190
|
+
type: "query";
|
|
191
|
+
query: string;
|
|
192
|
+
} | {
|
|
193
|
+
type: "loc";
|
|
194
|
+
loc: string[];
|
|
195
|
+
} | {
|
|
196
|
+
type: "applyFilters";
|
|
197
|
+
};
|
|
198
|
+
/** Tenant search schema from `GET /search-ui`. */
|
|
199
|
+
interface SearchUi {
|
|
200
|
+
defaultLimit: number;
|
|
201
|
+
maxLimit: number;
|
|
202
|
+
sorts: Array<{
|
|
203
|
+
id: string;
|
|
204
|
+
label: string;
|
|
205
|
+
}>;
|
|
206
|
+
filters: SearchUiFilter[];
|
|
207
|
+
dictionary: SearchUiDictionary;
|
|
208
|
+
locationsPath: string;
|
|
209
|
+
}
|
|
210
|
+
type QueryListingsFilters = {
|
|
211
|
+
listing_type?: string | string[];
|
|
212
|
+
property_type?: string | string[];
|
|
213
|
+
property_bedrooms?: string | string[] | number | number[];
|
|
214
|
+
property_bathrooms?: string | string[] | number | number[];
|
|
215
|
+
property_suites?: string | string[] | number | number[];
|
|
216
|
+
property_parking_spots?: string | string[] | number | number[];
|
|
217
|
+
propertyFeatures?: string[];
|
|
218
|
+
buildingAmenities?: string[];
|
|
219
|
+
price?: {
|
|
220
|
+
min?: number;
|
|
221
|
+
max?: number;
|
|
222
|
+
};
|
|
223
|
+
property_area_total?: {
|
|
224
|
+
min?: number;
|
|
225
|
+
max?: number;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
type QueryListingsLocation = {
|
|
229
|
+
type: string;
|
|
230
|
+
value: string;
|
|
231
|
+
};
|
|
232
|
+
/** Friendly search body — Studio must not send Typesense `filter_by`. */
|
|
233
|
+
interface QueryListingsParams {
|
|
234
|
+
page?: number;
|
|
235
|
+
limit?: number;
|
|
236
|
+
sort?: string;
|
|
237
|
+
q?: string;
|
|
238
|
+
filters?: QueryListingsFilters;
|
|
239
|
+
location?: QueryListingsLocation | QueryListingsLocation[];
|
|
240
|
+
}
|
|
241
|
+
interface QueryListingsResult {
|
|
242
|
+
listings: Listing[];
|
|
243
|
+
page: number;
|
|
244
|
+
limit: number;
|
|
245
|
+
total: number;
|
|
246
|
+
totalPages: number;
|
|
247
|
+
}
|
|
121
248
|
/**
|
|
122
249
|
* Raw Typesense search parameters accepted by `searchListings`. Mirrors
|
|
123
250
|
* the same body the underlying `/api/sites/{siteId}/search` endpoint
|
|
@@ -125,10 +252,9 @@ interface ListingsResult {
|
|
|
125
252
|
* `per_page`, `page`, facets, etc.) — see the Typesense docs at
|
|
126
253
|
* https://typesense.org/docs/latest/api/search.html for the full list.
|
|
127
254
|
*
|
|
128
|
-
* This is the SDK's escape hatch when
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* field is `q`.
|
|
255
|
+
* This is the SDK's escape hatch when `queryListings` isn't expressive
|
|
256
|
+
* enough (faceted search, multi-field sort, custom grouping). It's an
|
|
257
|
+
* open dictionary on purpose; the only required field is `q`.
|
|
132
258
|
*/
|
|
133
259
|
interface SearchListingsParams {
|
|
134
260
|
q: string;
|
|
@@ -168,6 +294,59 @@ interface Site {
|
|
|
168
294
|
domain: string | null;
|
|
169
295
|
tenantId: string;
|
|
170
296
|
}
|
|
297
|
+
/** Wrapped response from `getSimilarListings`. */
|
|
298
|
+
interface SimilarListingsResult {
|
|
299
|
+
listings: Listing[];
|
|
300
|
+
total: number;
|
|
301
|
+
}
|
|
302
|
+
/** CMS field type mirrored from the public CMS worker. */
|
|
303
|
+
type CmsFieldType = "text" | "richText" | "image" | "date" | "select" | "number" | "url" | "entry-reference";
|
|
304
|
+
interface CmsFieldDefinition {
|
|
305
|
+
id: string;
|
|
306
|
+
label: string;
|
|
307
|
+
type: CmsFieldType;
|
|
308
|
+
required?: boolean;
|
|
309
|
+
placeholder?: string;
|
|
310
|
+
options?: string[];
|
|
311
|
+
targetCollection?: string;
|
|
312
|
+
displayField?: string;
|
|
313
|
+
inheritFields?: string[];
|
|
314
|
+
inheritLevelField?: boolean;
|
|
315
|
+
}
|
|
316
|
+
/** CMS collection schema. Returned by `getCmsCollections` / `getCmsCollection`. */
|
|
317
|
+
interface CmsCollection {
|
|
318
|
+
id: string;
|
|
319
|
+
name: string;
|
|
320
|
+
slug: string;
|
|
321
|
+
templatePageId: string | null;
|
|
322
|
+
fields: CmsFieldDefinition[];
|
|
323
|
+
createdAt: string;
|
|
324
|
+
updatedAt: string;
|
|
325
|
+
}
|
|
326
|
+
type CmsEntryStatus = "draft" | "ready" | "published";
|
|
327
|
+
interface CmsSeoData {
|
|
328
|
+
title?: string;
|
|
329
|
+
description?: string;
|
|
330
|
+
ogImage?: string;
|
|
331
|
+
}
|
|
332
|
+
/** Published CMS entry. Returned by `getCmsEntries` / `getCmsEntry`. */
|
|
333
|
+
interface CmsEntry {
|
|
334
|
+
id: string;
|
|
335
|
+
collectionId: string;
|
|
336
|
+
slug: string;
|
|
337
|
+
status: CmsEntryStatus;
|
|
338
|
+
fields: Record<string, unknown>;
|
|
339
|
+
seo: CmsSeoData | null;
|
|
340
|
+
publishedAt: string | null;
|
|
341
|
+
createdAt: string;
|
|
342
|
+
updatedAt: string;
|
|
343
|
+
}
|
|
344
|
+
interface CmsEntriesResult {
|
|
345
|
+
entries: CmsEntry[];
|
|
346
|
+
total: number;
|
|
347
|
+
limit: number;
|
|
348
|
+
offset: number;
|
|
349
|
+
}
|
|
171
350
|
/**
|
|
172
351
|
* App Router caching hints passed straight through to the underlying
|
|
173
352
|
* `fetch` call. See https://nextjs.org/docs/app/api-reference/functions/fetch.
|
|
@@ -211,6 +390,37 @@ interface SearchListingsOptions extends BaseOptions {
|
|
|
211
390
|
siteId: string;
|
|
212
391
|
params: SearchListingsParams;
|
|
213
392
|
}
|
|
393
|
+
interface GetSearchUiOptions extends BaseOptions {
|
|
394
|
+
siteId: string;
|
|
395
|
+
}
|
|
396
|
+
interface QueryListingsOptions extends BaseOptions {
|
|
397
|
+
siteId: string;
|
|
398
|
+
params?: QueryListingsParams;
|
|
399
|
+
}
|
|
400
|
+
interface GetSimilarListingsOptions extends BaseOptions {
|
|
401
|
+
siteId: string;
|
|
402
|
+
listingId: string;
|
|
403
|
+
/** Max similar cards to return (API default 6, cap 12). */
|
|
404
|
+
limit?: number;
|
|
405
|
+
}
|
|
406
|
+
interface GetCmsCollectionsOptions extends BaseOptions {
|
|
407
|
+
siteId: string;
|
|
408
|
+
}
|
|
409
|
+
interface GetCmsCollectionOptions extends BaseOptions {
|
|
410
|
+
siteId: string;
|
|
411
|
+
slug: string;
|
|
412
|
+
}
|
|
413
|
+
interface GetCmsEntriesOptions extends BaseOptions {
|
|
414
|
+
siteId: string;
|
|
415
|
+
collection: string;
|
|
416
|
+
limit?: number;
|
|
417
|
+
offset?: number;
|
|
418
|
+
}
|
|
419
|
+
interface GetCmsEntryOptions extends BaseOptions {
|
|
420
|
+
siteId: string;
|
|
421
|
+
collection: string;
|
|
422
|
+
slug: string;
|
|
423
|
+
}
|
|
214
424
|
/** Error thrown when a fetcher hits a non-2xx response. */
|
|
215
425
|
declare class GaragemSdkError extends Error {
|
|
216
426
|
readonly status: number;
|
|
@@ -233,6 +443,7 @@ declare class GaragemSdkError extends Error {
|
|
|
233
443
|
declare function getListings(options: GetListingsOptions): Promise<ListingsResult>;
|
|
234
444
|
/**
|
|
235
445
|
* Fetch a single listing's full detail (amenities, gallery, building).
|
|
446
|
+
* `listingId` accepts a code, UUID, or `id-{code}` URL segment.
|
|
236
447
|
*/
|
|
237
448
|
declare function getListing(options: GetListingOptions): Promise<ListingDetail>;
|
|
238
449
|
/**
|
|
@@ -249,8 +460,8 @@ declare function getSite(options: GetSiteOptions): Promise<Site | null>;
|
|
|
249
460
|
*
|
|
250
461
|
* Calls `POST /api/sites/{siteId}/search` directly and returns the raw
|
|
251
462
|
* Typesense response (`{ found, page, hits: [{ document, ... }], ... }`).
|
|
252
|
-
* Use when
|
|
253
|
-
*
|
|
463
|
+
* Use when `queryListings` isn't expressive enough — faceted search,
|
|
464
|
+
* multi-field sort, custom grouping, etc.
|
|
254
465
|
*
|
|
255
466
|
* @example
|
|
256
467
|
* const result = await searchListings({
|
|
@@ -270,6 +481,90 @@ declare function getSite(options: GetSiteOptions): Promise<Site | null>;
|
|
|
270
481
|
* }
|
|
271
482
|
*/
|
|
272
483
|
declare function searchListings<TDocument = Record<string, unknown>>(options: SearchListingsOptions): Promise<SearchListingsResult<TDocument>>;
|
|
484
|
+
/**
|
|
485
|
+
* Tenant search schema: filters, slugs, sort tokens, defaultLimit 12.
|
|
486
|
+
* Use this to render the search UI — do not hardcode property types.
|
|
487
|
+
*/
|
|
488
|
+
declare function getSearchUi(options: GetSearchUiOptions): Promise<SearchUi>;
|
|
489
|
+
/**
|
|
490
|
+
* Friendly catalog search (editor combinators). Prefer this over
|
|
491
|
+
* `searchListings` — that helper is a raw Typesense escape hatch.
|
|
492
|
+
*/
|
|
493
|
+
declare function queryListings(options: QueryListingsOptions): Promise<QueryListingsResult>;
|
|
494
|
+
/**
|
|
495
|
+
* Fetch similar listings for a detail page carousel.
|
|
496
|
+
* Returns an empty list when the reference listing is missing.
|
|
497
|
+
*/
|
|
498
|
+
declare function getSimilarListings(options: GetSimilarListingsOptions): Promise<SimilarListingsResult>;
|
|
499
|
+
/** List CMS collections for a site. */
|
|
500
|
+
declare function getCmsCollections(options: GetCmsCollectionsOptions): Promise<CmsCollection[]>;
|
|
501
|
+
/** Fetch one CMS collection schema by slug. */
|
|
502
|
+
declare function getCmsCollection(options: GetCmsCollectionOptions): Promise<CmsCollection>;
|
|
503
|
+
/** List published CMS entries for a collection. */
|
|
504
|
+
declare function getCmsEntries(options: GetCmsEntriesOptions): Promise<CmsEntriesResult>;
|
|
505
|
+
/** Fetch one published CMS entry by slug. */
|
|
506
|
+
declare function getCmsEntry(options: GetCmsEntryOptions): Promise<CmsEntry>;
|
|
507
|
+
|
|
508
|
+
/** Public listing URLs. Prefer `listing.path` from the API; fallback is `/imoveis/id-{listingCode}`. */
|
|
509
|
+
declare function listingLookupKey(raw: string): string;
|
|
510
|
+
declare function listingPublicPath(listing: {
|
|
511
|
+
path?: string | null;
|
|
512
|
+
listingCode?: string | null;
|
|
513
|
+
id?: string | null;
|
|
514
|
+
}): string;
|
|
515
|
+
|
|
516
|
+
declare function composeSearchPublicPath(filters: SearchPathFilters, dictionary?: SearchUiDictionary): string;
|
|
517
|
+
declare function parseSearchPublicPath(pathname: string, dictionary?: SearchUiDictionary): SearchPathFilters | null;
|
|
518
|
+
/**
|
|
519
|
+
* Convert `SearchPathFilters` (returned by `parseSearchPublicPath`) to
|
|
520
|
+
* `QueryListingsFilters` (accepted by `queryListings`).
|
|
521
|
+
*
|
|
522
|
+
* This maps path-based filter keys (`bedrooms`, `parkingSpots`, `area`)
|
|
523
|
+
* to the POST API keys (`property_bedrooms`, `property_parking_spots`,
|
|
524
|
+
* `property_area_total`).
|
|
525
|
+
*
|
|
526
|
+
* Location is **not** included — use `pathLocationToFilterInput` separately
|
|
527
|
+
* and pass the result as the `location` field in `QueryListingsParams`.
|
|
528
|
+
*/
|
|
529
|
+
declare function pathFiltersToQueryFilters(pathFilters: SearchPathFilters): QueryListingsFilters;
|
|
530
|
+
|
|
531
|
+
declare function parseAppliedSearchQuery(search: string | URLSearchParams): AppliedSearchQuery;
|
|
532
|
+
declare function serializeAppliedSearchQuery(query: AppliedSearchQuery): URLSearchParams;
|
|
533
|
+
declare function mergeAppliedSearchQueryIntoSearch(existing: string | URLSearchParams, query: AppliedSearchQuery): URLSearchParams;
|
|
534
|
+
declare function reduceAppliedSearchQuery(prev: AppliedSearchQuery, change: AppliedSearchChange): AppliedSearchQuery;
|
|
535
|
+
declare function composeSearchPublicHref(pathname: string, query: AppliedSearchQuery, existingSearch?: string | URLSearchParams): string;
|
|
536
|
+
|
|
537
|
+
type LocationFilterInput = {
|
|
538
|
+
type: string;
|
|
539
|
+
value: string;
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* Convert a SearchPathLocation (from parseSearchPublicPath) to the correct
|
|
543
|
+
* LocationFilterInput format for the friendly search API. This ensures that
|
|
544
|
+
* hierarchical location filters are ANDed correctly instead of ORed.
|
|
545
|
+
*/
|
|
546
|
+
declare function pathLocationToFilterInput(location: {
|
|
547
|
+
state?: string;
|
|
548
|
+
city?: string;
|
|
549
|
+
neighborhood?: string;
|
|
550
|
+
street?: string;
|
|
551
|
+
}): LocationFilterInput | null;
|
|
552
|
+
|
|
553
|
+
interface ResolvePublicSiteIdOptions {
|
|
554
|
+
/** Request host (`headers().get("host")`). Port is stripped. */
|
|
555
|
+
host?: string | null;
|
|
556
|
+
/** Preview hosts only (`localhost`, `.vusercontent.net`). Live misses throw. */
|
|
557
|
+
fallback?: string | null;
|
|
558
|
+
baseUrl?: string;
|
|
559
|
+
fetch?: FetchLike;
|
|
560
|
+
}
|
|
561
|
+
declare function isStudioPreviewHost(host: string): boolean;
|
|
562
|
+
/**
|
|
563
|
+
* Live Studio sites share one v0 project env (`GARAGEM_SITE_ID` = showcase).
|
|
564
|
+
* After claim, resolve the published site by hostname; preview keeps the
|
|
565
|
+
* fallback catalog id.
|
|
566
|
+
*/
|
|
567
|
+
declare function resolvePublicSiteId(options: ResolvePublicSiteIdOptions): Promise<string>;
|
|
273
568
|
|
|
274
569
|
interface CreateGaragemClientOptions {
|
|
275
570
|
/** Garagem API base URL. Defaults to `https://app.garagem.ai`. */
|
|
@@ -304,13 +599,57 @@ interface GaragemClient {
|
|
|
304
599
|
}): Promise<Site | null>;
|
|
305
600
|
/**
|
|
306
601
|
* Advanced search — raw Typesense parameters, raw response. Use when
|
|
307
|
-
*
|
|
602
|
+
* `queryListings` isn't expressive enough.
|
|
308
603
|
*/
|
|
309
604
|
searchListings<TDocument = Record<string, unknown>>(args: {
|
|
310
605
|
params: SearchListingsParams;
|
|
311
606
|
siteId?: string;
|
|
312
607
|
next?: RequestNextOptions;
|
|
313
608
|
}): Promise<SearchListingsResult<TDocument>>;
|
|
609
|
+
/** Tenant search schema (filters, slugs, defaultLimit). */
|
|
610
|
+
getSearchUi(args?: {
|
|
611
|
+
siteId?: string;
|
|
612
|
+
next?: RequestNextOptions;
|
|
613
|
+
}): Promise<SearchUi>;
|
|
614
|
+
/** Friendly catalog search — editor combinators, no Typesense `filter_by`. */
|
|
615
|
+
queryListings(args?: {
|
|
616
|
+
params?: QueryListingsParams;
|
|
617
|
+
siteId?: string;
|
|
618
|
+
next?: RequestNextOptions;
|
|
619
|
+
}): Promise<QueryListingsResult>;
|
|
620
|
+
/** Similar listings carousel for a detail page. */
|
|
621
|
+
getSimilarListings(args: {
|
|
622
|
+
listingId: string;
|
|
623
|
+
limit?: number;
|
|
624
|
+
siteId?: string;
|
|
625
|
+
next?: RequestNextOptions;
|
|
626
|
+
}): Promise<SimilarListingsResult>;
|
|
627
|
+
/** List CMS collections. */
|
|
628
|
+
getCmsCollections(args?: {
|
|
629
|
+
siteId?: string;
|
|
630
|
+
next?: RequestNextOptions;
|
|
631
|
+
}): Promise<CmsCollection[]>;
|
|
632
|
+
/** Fetch one CMS collection by slug. */
|
|
633
|
+
getCmsCollection(args: {
|
|
634
|
+
slug: string;
|
|
635
|
+
siteId?: string;
|
|
636
|
+
next?: RequestNextOptions;
|
|
637
|
+
}): Promise<CmsCollection>;
|
|
638
|
+
/** List published CMS entries. */
|
|
639
|
+
getCmsEntries(args: {
|
|
640
|
+
collection: string;
|
|
641
|
+
limit?: number;
|
|
642
|
+
offset?: number;
|
|
643
|
+
siteId?: string;
|
|
644
|
+
next?: RequestNextOptions;
|
|
645
|
+
}): Promise<CmsEntriesResult>;
|
|
646
|
+
/** Fetch one published CMS entry. */
|
|
647
|
+
getCmsEntry(args: {
|
|
648
|
+
collection: string;
|
|
649
|
+
slug: string;
|
|
650
|
+
siteId?: string;
|
|
651
|
+
next?: RequestNextOptions;
|
|
652
|
+
}): Promise<CmsEntry>;
|
|
314
653
|
}
|
|
315
654
|
/**
|
|
316
655
|
* Bind base URL, fetch and site to a single client object. Useful when
|
|
@@ -322,4 +661,4 @@ interface GaragemClient {
|
|
|
322
661
|
*/
|
|
323
662
|
declare function createGaragemClient(options?: CreateGaragemClientOptions): GaragemClient;
|
|
324
663
|
|
|
325
|
-
export { type CreateGaragemClientOptions, type FetchLike, type GaragemClient, GaragemSdkError, type GetListingOptions, type GetListingsOptions, type GetSiteOptions, type Listing, type ListingBusinessType, type ListingDetail, type ListingFilters, type ListingLocation, type ListingMedia, type ListingPriceVisibility, type ListingPropertySummary, type ListingsResult, type RequestNextOptions, type SearchListingsOptions, type SearchListingsParams, type SearchListingsResult, type Site, createGaragemClient, getListing, getListings, getSite, searchListings };
|
|
664
|
+
export { type AppliedSearchChange, type AppliedSearchQuery, type CmsCollection, type CmsEntriesResult, type CmsEntry, type CmsEntryStatus, type CmsFieldDefinition, type CmsFieldType, type CmsSeoData, type CreateGaragemClientOptions, type FetchLike, type GaragemClient, GaragemSdkError, type GetCmsCollectionOptions, type GetCmsCollectionsOptions, type GetCmsEntriesOptions, type GetCmsEntryOptions, type GetListingOptions, type GetListingsOptions, type GetSearchUiOptions, type GetSimilarListingsOptions, type GetSiteOptions, type Listing, type ListingBusinessType, type ListingDetail, type ListingFilters, type ListingLocation, type ListingMedia, type ListingPriceVisibility, type ListingPropertySummary, type ListingsResult, type LocationFilterInput, type QueryListingsFilters, type QueryListingsLocation, type QueryListingsOptions, type QueryListingsParams, type QueryListingsResult, type RequestNextOptions, type ResolvePublicSiteIdOptions, type SearchListingsOptions, type SearchListingsParams, type SearchListingsResult, type SearchPathFilters, type SearchPathLocation, type SearchUi, type SearchUiDictionary, type SearchUiFilter, type SearchUiOption, type SimilarListingsResult, type Site, composeSearchPublicHref, composeSearchPublicPath, createGaragemClient, getCmsCollection, getCmsCollections, getCmsEntries, getCmsEntry, getListing, getListings, getSearchUi, getSimilarListings, getSite, isStudioPreviewHost, listingLookupKey, listingPublicPath, mergeAppliedSearchQueryIntoSearch, parseAppliedSearchQuery, parseSearchPublicPath, pathFiltersToQueryFilters, pathLocationToFilterInput, queryListings, reduceAppliedSearchQuery, resolvePublicSiteId, searchListings, serializeAppliedSearchQuery };
|