@mapfirst.ai/core 0.0.11 → 0.0.12
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 +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.global.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -348,22 +348,25 @@ type ApiFiltersResponse = Pick<FilterSchema, "amenities" | "hotelStyle" | "price
|
|
|
348
348
|
*/
|
|
349
349
|
declare function processApiFilters(apiFilters: ApiFiltersResponse): SmartFilter[];
|
|
350
350
|
/**
|
|
351
|
-
* Converts
|
|
351
|
+
* Converts filter objects (SmartFilter or React Filter) back to API-compatible filter format.
|
|
352
352
|
* This is the inverse operation of processApiFilters.
|
|
353
|
+
* Accepts filters with label as string or ReactNode and normalizes them.
|
|
353
354
|
*
|
|
354
|
-
* @param
|
|
355
|
-
* @returns API-compatible
|
|
355
|
+
* @param filters - Array of filter objects (SmartFilter or React Filter with ReactNode labels)
|
|
356
|
+
* @returns API-compatible SmartFilter array
|
|
356
357
|
*
|
|
357
358
|
* @example
|
|
358
359
|
* ```typescript
|
|
359
|
-
* const filters
|
|
360
|
+
* const filters = [
|
|
360
361
|
* { id: "amenity-pool", label: "Pool", type: "amenity", value: "Pool" }
|
|
361
362
|
* ];
|
|
362
363
|
* const apiFilters = convertToApiFilters(filters);
|
|
363
|
-
* // apiFilters will contain
|
|
364
|
+
* // apiFilters will contain normalized SmartFilter objects
|
|
364
365
|
* ```
|
|
365
366
|
*/
|
|
366
|
-
declare function convertToApiFilters(
|
|
367
|
+
declare function convertToApiFilters(filters: Array<Omit<SmartFilter, "label"> & {
|
|
368
|
+
label: string | React.ReactNode | any;
|
|
369
|
+
}>): SmartFilter[];
|
|
367
370
|
|
|
368
371
|
type Environment = "prod" | "test";
|
|
369
372
|
declare class PropertiesFetchError extends Error {
|
package/dist/index.d.ts
CHANGED
|
@@ -348,22 +348,25 @@ type ApiFiltersResponse = Pick<FilterSchema, "amenities" | "hotelStyle" | "price
|
|
|
348
348
|
*/
|
|
349
349
|
declare function processApiFilters(apiFilters: ApiFiltersResponse): SmartFilter[];
|
|
350
350
|
/**
|
|
351
|
-
* Converts
|
|
351
|
+
* Converts filter objects (SmartFilter or React Filter) back to API-compatible filter format.
|
|
352
352
|
* This is the inverse operation of processApiFilters.
|
|
353
|
+
* Accepts filters with label as string or ReactNode and normalizes them.
|
|
353
354
|
*
|
|
354
|
-
* @param
|
|
355
|
-
* @returns API-compatible
|
|
355
|
+
* @param filters - Array of filter objects (SmartFilter or React Filter with ReactNode labels)
|
|
356
|
+
* @returns API-compatible SmartFilter array
|
|
356
357
|
*
|
|
357
358
|
* @example
|
|
358
359
|
* ```typescript
|
|
359
|
-
* const filters
|
|
360
|
+
* const filters = [
|
|
360
361
|
* { id: "amenity-pool", label: "Pool", type: "amenity", value: "Pool" }
|
|
361
362
|
* ];
|
|
362
363
|
* const apiFilters = convertToApiFilters(filters);
|
|
363
|
-
* // apiFilters will contain
|
|
364
|
+
* // apiFilters will contain normalized SmartFilter objects
|
|
364
365
|
* ```
|
|
365
366
|
*/
|
|
366
|
-
declare function convertToApiFilters(
|
|
367
|
+
declare function convertToApiFilters(filters: Array<Omit<SmartFilter, "label"> & {
|
|
368
|
+
label: string | React.ReactNode | any;
|
|
369
|
+
}>): SmartFilter[];
|
|
367
370
|
|
|
368
371
|
type Environment = "prod" | "test";
|
|
369
372
|
declare class PropertiesFetchError extends Error {
|