@findhotel/sapi 0.23.14 → 0.24.2

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.
Files changed (29) hide show
  1. package/README.md +14 -1
  2. package/dist/index.js +1 -1
  3. package/dist/types/packages/core/src/app-config.d.ts +1 -7
  4. package/dist/types/packages/core/src/hotel.d.ts +2 -2
  5. package/dist/types/packages/core/src/offers.d.ts +3 -3
  6. package/dist/types/packages/core/src/override.d.ts +4 -0
  7. package/dist/types/packages/core/src/rooms.d.ts +2 -2
  8. package/dist/types/packages/core/src/sapi.d.ts +6 -10
  9. package/dist/types/packages/core/src/search.d.ts +23 -13
  10. package/dist/types/packages/core/src/types/config.d.ts +11 -0
  11. package/dist/types/packages/core/src/types/index.d.ts +1 -0
  12. package/dist/types/packages/core/src/types/rooms.d.ts +3 -0
  13. package/dist/types/packages/core/src/types/sapi-client.d.ts +1 -1
  14. package/dist/types/packages/core/src/types/types.d.ts +2 -0
  15. package/dist/types/packages/core/src/{algolia/utils.d.ts → utils/algolia.d.ts} +1 -17
  16. package/dist/types/packages/core/src/{algolia/configs.test.d.ts → utils/algolia.test.d.ts} +0 -0
  17. package/dist/types/packages/core/src/utils/dates.d.ts +1 -1
  18. package/dist/types/packages/core/src/utils/index.d.ts +1 -0
  19. package/dist/types/packages/core/src/utils/search-id.d.ts +2 -13
  20. package/package.json +1 -1
  21. package/dist/types/packages/core/src/algolia/configs.d.ts +0 -70
  22. package/dist/types/packages/core/src/algolia/geo-search.d.ts +0 -27
  23. package/dist/types/packages/core/src/algolia/get-anchor.d.ts +0 -26
  24. package/dist/types/packages/core/src/algolia/index.d.ts +0 -6
  25. package/dist/types/packages/core/src/algolia/load-suggests.d.ts +0 -10
  26. package/dist/types/packages/core/src/algolia/pricing.d.ts +0 -26
  27. package/dist/types/packages/core/src/algolia/utils.test.d.ts +0 -1
  28. package/dist/types/packages/core/src/backend-search.d.ts +0 -23
  29. package/dist/types/packages/core/src/backend-search.test.d.ts +0 -1
@@ -1,13 +1,6 @@
1
1
  import { ProfileKey, IndexVariation } from './types';
2
- /**
3
- * Fixed number of price bucket count
4
- */
5
- export declare const PRICE_BUCKET_COUNT = 31;
6
2
  export declare type Features = 'offers' | 'search' | 'suggests' | 'configs' | 'rooms' | 'get-hotel';
7
3
  export interface AppConfig {
8
- daedalus: {
9
- raaEndpoint: string | undefined;
10
- };
11
4
  sapiBackend: {
12
5
  baseUrl: string;
13
6
  endpoints: {
@@ -25,6 +18,7 @@ export interface AppConfig {
25
18
  };
26
19
  };
27
20
  algolia: {
21
+ appId: string;
28
22
  apiKey: string;
29
23
  hotelIndex: string;
30
24
  autocompleteIndex: string;
@@ -1,4 +1,4 @@
1
- import { BaseWithConfig } from '.';
1
+ import { Base } from '.';
2
2
  import { Language, HotelId, TranslatedString, GuestRating, GuestType, Location, TranslatedArray, Pricing, ContentHotel, LOVItem, Currency } from './types';
3
3
  export interface SafHotel {
4
4
  objectID: HotelId;
@@ -57,4 +57,4 @@ export declare function createRequestString(hotelId: HotelId, languages: Languag
57
57
  *
58
58
  * @returns function that asynchronously returns hotel's content by hotelId
59
59
  */
60
- export declare function hotel({ appConfig, options }: Pick<BaseWithConfig, 'options' | 'appConfig'>): HotelHandler;
60
+ export declare function hotel({ appConfig, options }: Pick<Base, 'options' | 'appConfig'>): HotelHandler;
@@ -1,4 +1,4 @@
1
- import { BaseWithConfig } from '.';
1
+ import { Base } from '.';
2
2
  import { GetOffersParameters } from './offers-client';
3
3
  import { HotelId, HotelOfferEntity, CugDeals } from './types';
4
4
  import { AppConfig } from './app-config';
@@ -22,7 +22,7 @@ interface Callbacks {
22
22
  onComplete?: (response: HotelOfferEntity | undefined) => void;
23
23
  }
24
24
  export declare type OffersHandler = (parameters: OffersParameters, callbacks: Callbacks) => Promise<HotelOfferEntity | undefined>;
25
- export declare function getOffersParameters(parameters: OffersParameters, options: BaseWithConfig['options'], appConfig: AppConfig): GetOffersParameters;
25
+ export declare function getOffersParameters(parameters: OffersParameters, options: Base['options'], appConfig: AppConfig): GetOffersParameters;
26
26
  /**
27
27
  * Creates offers function with configuration object
28
28
  *
@@ -30,5 +30,5 @@ export declare function getOffersParameters(parameters: OffersParameters, option
30
30
  *
31
31
  * @returns function for fetching offers
32
32
  */
33
- export declare function offers({ offersClient, options, appConfig }: Pick<BaseWithConfig, 'offersClient' | 'options' | 'appConfig'>): OffersHandler;
33
+ export declare function offers({ offersClient, options, appConfig }: Pick<Base, 'offersClient' | 'options' | 'appConfig'>): OffersHandler;
34
34
  export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Get sapi override parameter directly from the URL. Used only for debugging purposes.
3
+ */
4
+ export declare function getSapiOverrideParameter(): string | null | undefined;
@@ -1,4 +1,4 @@
1
- import { BaseWithConfig } from '.';
1
+ import { Base } from '.';
2
2
  import { RoomsRequestParameters, RoomsRequestOptions, RoomsResults } from './types';
3
3
  export declare type RoomsHandler = (parameters: RoomsRequestParameters) => Promise<RoomsResults>;
4
4
  /**
@@ -38,4 +38,4 @@ export declare function createRequestString(parameters: RoomsRequestParameters,
38
38
  *
39
39
  * @returns rooms search function
40
40
  */
41
- export declare function rooms({ appConfig, options }: Pick<BaseWithConfig, 'options' | 'appConfig'>): RoomsHandler;
41
+ export declare function rooms({ appConfig, options }: Pick<Base, 'options' | 'appConfig'>): RoomsHandler;
@@ -1,17 +1,12 @@
1
- import { SearchClient } from 'algoliasearch';
2
1
  import { Except } from 'type-fest';
3
2
  import { OffersClient } from './offers-client';
4
- import { Configs } from './algolia';
5
3
  import { AppConfig, Features } from './app-config';
6
4
  import { ProfileKey, ClientOptions, SapiClient, Language, Logger } from './types';
7
- export declare type AlgoliaClient = Pick<SearchClient, 'search'>;
8
5
  export interface Base {
9
6
  /** SAPI client application config */
10
7
  appConfig: AppConfig;
11
8
  /** Check if SAPI feature is enabled */
12
9
  getFeatureEnabled: (feature: Features) => boolean;
13
- /** Instance of Algolia Client */
14
- algoliaClient: AlgoliaClient;
15
10
  /** Instance of Offers Client */
16
11
  offersClient?: OffersClient;
17
12
  /** Profile key of specific client */
@@ -23,12 +18,13 @@ export interface Base {
23
18
  pageSize: number;
24
19
  languages: Language[];
25
20
  };
26
- configs?: unknown;
27
- }
28
- export interface BaseWithConfig extends Base {
29
- /** Configs loaded from Algolia and local date configuration */
30
- configs: Configs;
31
21
  }
22
+ /**
23
+ * Converts map of A/B tests variations to array of string
24
+ *
25
+ * @param variations - variations map
26
+ */
27
+ export declare function variationsToArray(variations?: Record<string, string>): string[];
32
28
  /**
33
29
  * SAPI constructor
34
30
  *
@@ -1,8 +1,8 @@
1
1
  import { Except } from 'type-fest';
2
- import { BaseWithConfig } from '.';
3
- import { AnchorObject, AnchorType, Facets } from './algolia';
2
+ import { Base, ProfileKey } from '.';
4
3
  import { DealScores, DatesConfig } from './utils';
5
- import { Anchor, ApiSearchParameters, Hotel, HotelOfferEntity, AnonymousId, SearchParameters, HotelId } from './types';
4
+ import { SearchParameters, HotelId, Hotel, Anchor, ApiSearchParameters, HotelOfferEntity, AnchorType, Facets } from './types';
5
+ export declare type SearchFnParameters = Pick<Base, 'profileKey' | 'options' | 'appConfig' | 'offersClient' | 'getFeatureEnabled'>;
6
6
  export interface SearchResults {
7
7
  anchor: Anchor;
8
8
  anchorHotelId?: HotelId;
@@ -18,19 +18,13 @@ export interface SearchResults {
18
18
  resultsCountTotal: number;
19
19
  offset: number;
20
20
  dealScores: DealScores;
21
+ hasMoreResults: boolean;
21
22
  }
22
23
  declare type OnStart = (response: Pick<SearchResults, 'searchId' | 'searchParameters'>) => void;
23
24
  declare type OnAnchorReceived = (response: Pick<SearchResults, 'searchId' | 'searchParameters' | 'anchor' | 'anchorHotelId' | 'anchorType'>) => void;
24
25
  declare type OnHotelsReceived = (response: Except<SearchResults, 'hotelOfferEntities'>) => void;
25
26
  declare type OnOffersReceived = (response: SearchResults) => void;
26
27
  declare type OnComplete = (response: SearchResults) => void;
27
- interface Options {
28
- anonymousId: AnonymousId;
29
- language: string;
30
- currency: string;
31
- countryCode: string;
32
- pageSize: number;
33
- }
34
28
  export declare type SearchHandler = (parameters: ApiSearchParameters, callbacks?: {
35
29
  onStart?: OnStart;
36
30
  onAnchorReceived?: OnAnchorReceived;
@@ -42,7 +36,23 @@ export declare type SearchHandler = (parameters: ApiSearchParameters, callbacks?
42
36
  loadMore: () => Promise<SearchResults>;
43
37
  }>;
44
38
  export declare function prepareSearchParameters(parameters: ApiSearchParameters, dates: DatesConfig): SearchParameters;
45
- export declare function getRequestSize(anchorObject: AnchorObject, parameters: SearchParameters, options: Options): number;
46
- export declare type SearchFnParameters = Pick<BaseWithConfig, 'profileKey' | 'options' | 'appConfig' | 'algoliaClient' | 'offersClient' | 'configs' | 'getFeatureEnabled'>;
47
- export declare function search({ getFeatureEnabled, appConfig, algoliaClient, offersClient, options, configs }: SearchFnParameters): SearchHandler;
39
+ declare type AttributesToRetrieve = keyof SearchResults;
40
+ interface SearchRequestParameters {
41
+ searchId: string;
42
+ profileKey: ProfileKey;
43
+ searchParameters: SearchParameters;
44
+ options: Base['options'];
45
+ offset: number;
46
+ attributes?: AttributesToRetrieve[];
47
+ }
48
+ export declare function createSearchRequestString({ profileKey, searchId, searchParameters, options, offset, attributes }: SearchRequestParameters): string;
49
+ interface AnchorRequestParameters {
50
+ searchId: string;
51
+ profileKey: ProfileKey;
52
+ searchParameters: SearchParameters;
53
+ options: Base['options'];
54
+ attributes?: AttributesToRetrieve[];
55
+ }
56
+ export declare function createAnchorRequestString({ profileKey, searchId, searchParameters, options, attributes }: AnchorRequestParameters): string;
57
+ export declare function search({ getFeatureEnabled, profileKey, appConfig, offersClient, options }: SearchFnParameters): SearchHandler;
48
58
  export {};
@@ -0,0 +1,11 @@
1
+ export declare type ExchangeRates = Record<string, number>;
2
+ export interface ListOfValuesItem {
3
+ id: number;
4
+ categoryID?: number;
5
+ objectID: string;
6
+ value: Record<string, string | number>;
7
+ }
8
+ export declare type Configs = {
9
+ lov: ListOfValuesItem[];
10
+ exchangeRates: ExchangeRates;
11
+ };
@@ -1,3 +1,4 @@
1
1
  export * from './types';
2
2
  export * from './rooms';
3
3
  export * from './sapi-client';
4
+ export * from './config';
@@ -56,6 +56,8 @@ export interface RoomOffer {
56
56
  refundable: boolean;
57
57
  canPayLater: boolean;
58
58
  services: string[];
59
+ isClicked?: boolean;
60
+ matchType?: 'exact' | 'partial';
59
61
  }
60
62
  export interface RoomImage {
61
63
  url: string;
@@ -74,6 +76,7 @@ export interface Room {
74
76
  description: string;
75
77
  images: RoomImage[];
76
78
  offers: RoomOffer[];
79
+ hasClickedOffer?: boolean;
77
80
  }
78
81
  export interface RoomsResults {
79
82
  hotelId: HotelId;
@@ -1,11 +1,11 @@
1
1
  import { AlgoliaSearchOptions } from 'algoliasearch';
2
2
  import { AnonymousId, Language, Currency, Country, DeviceType, Brand } from './types';
3
+ import { Configs } from './config';
3
4
  import { AppConfig } from '../app-config';
4
5
  import { SearchHandler } from '../search';
5
6
  import { RoomsHandler } from '../rooms';
6
7
  import { HotelHandler } from '../hotel';
7
8
  import { SuggestHandler } from '../suggest';
8
- import { Configs } from '../algolia';
9
9
  import { OffersHandler } from '../offers';
10
10
  export declare type ProfileKey = 'findhotel-website' | 'findhotel-website-e2e' | 'findhotel-website-stg' | 'findhotel-website-ci' | 'findhotel-website-dev' | 'findhotel-checkout' | 'findhotel-checkout-e2e' | 'findhotel-checkout-stg';
11
11
  interface Event {
@@ -74,6 +74,7 @@ export declare type SearchParameters = ApiSearchParameters & {
74
74
  checkOut: string;
75
75
  rooms: string;
76
76
  };
77
+ export declare type Facets = Record<string, Record<string, number>>;
77
78
  /**
78
79
  * Algolia types
79
80
  */
@@ -106,6 +107,7 @@ interface BasicAnchorHit {
106
107
  priceBucketWidth?: number;
107
108
  _geoloc: Location;
108
109
  }
110
+ export declare type AnchorType = 'hotel' | 'place';
109
111
  export interface HotelAnchorHit extends BasicAnchorHit {
110
112
  hotelName: TranslatedString;
111
113
  objectType: 'hotel';
@@ -1,18 +1,6 @@
1
- import { AnchorHit, HotelAnchorHit, PlaceAnchorHit, HotelAnchor, PlaceAnchor, Hit, Hotel, TranslatedString, TranslatedArray, TranslatedHighlightResult, Language, HotelSuggestHit, PlaceSuggestHit, SuggestHit, Suggestion, PlaceTypeName, IndexVariation } from '../types';
1
+ import { AnchorHit, Hit, TranslatedString, TranslatedArray, TranslatedHighlightResult, Language, HotelSuggestHit, PlaceSuggestHit, SuggestHit, Suggestion, PlaceTypeName } from '../types';
2
2
  declare type AnchorSuggestOrHit = AnchorHit | Hit | SuggestHit;
3
3
  declare type TranslatedAttribute = TranslatedString | TranslatedArray;
4
- /**
5
- * Format checkIn + length of stay
6
- *
7
- * @returns a string `YYMMDD-lengthOfStay`
8
- */
9
- export declare function getCheckInNights(checkIn: string, checkOut: string): string;
10
- /**
11
- * Create tags' facet filter
12
- *
13
- * Array with single tags definition.
14
- */
15
- export declare function getTagsFilter(checkIn: string, checkOut: string): string[];
16
4
  /**
17
5
  * Returns whether input string is empty or consists of only whitespace
18
6
  *
@@ -42,10 +30,6 @@ export declare function validateHit(hit: AnchorSuggestOrHit | undefined, require
42
30
  * @param {number} placeType
43
31
  */
44
32
  export declare function placeTypeToPlaceTypeName(placeTypeId?: number): PlaceTypeName;
45
- export declare function hitToHotel(algoliaHit: Hit, languages: Language[]): Hotel;
46
- export declare function hitToHotelTypeAnchor(anchorHit: HotelAnchorHit, languages: Language[]): HotelAnchor;
47
- export declare function hitToPlaceTypeAnchor(anchorHit: PlaceAnchorHit, languages: Language[]): PlaceAnchor;
48
33
  export declare function hitToHotelSuggest(suggestHit: HotelSuggestHit, languages: Language[]): Suggestion;
49
34
  export declare function hitToPlaceSuggest(suggestHit: PlaceSuggestHit, languages: Language[]): Suggestion;
50
- export declare function pickIndexVariation(choices: IndexVariation[], variations: string[]): IndexVariation;
51
35
  export {};
@@ -2,7 +2,7 @@ export interface DatesConfig {
2
2
  daysFromNow: number;
3
3
  blockedDefaultDates: string[];
4
4
  }
5
- interface GetDatesParameters {
5
+ export interface GetDatesParameters {
6
6
  checkIn?: string;
7
7
  checkOut?: string;
8
8
  dayDistance?: number;
@@ -9,3 +9,4 @@ export * from './regular-price';
9
9
  export * from './remove-empty';
10
10
  export * from './sorting-boosts';
11
11
  export * from './build-offers-response';
12
+ export * from './algolia';
@@ -1,15 +1,4 @@
1
- import { AnonymousId, ApiSearchParameters, Country, Currency, Language } from '../types';
2
- interface SearchIdOptions {
3
- anonymousId: AnonymousId;
4
- language: Language;
5
- currency: Currency;
6
- countryCode: Country;
7
- }
8
1
  /**
9
- * Generates a deterministic hash of a combination of ApiSearchParameters and SAPI options.
10
- *
11
- * @param parameters all relevant search parameters to generate an id
12
- * @param options SAPI options used to generate an id
2
+ * Generates a random searchId string
13
3
  */
14
- export declare function generateSearchId(parameters: ApiSearchParameters, options: SearchIdOptions): string;
15
- export {};
4
+ export declare function generateSearchId(): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findhotel/sapi",
3
- "version": "0.23.14",
3
+ "version": "0.24.2",
4
4
  "description": "FindHotel Search API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/packages/core/src",
@@ -1,70 +0,0 @@
1
- import { AlgoliaClient } from '..';
2
- import { IndexVariation } from '../types';
3
- declare type HsoConfigContext = Record<string, unknown>;
4
- export declare type HsoConfigType = 'place_search' | 'hotel_search';
5
- interface HsoConfig {
6
- criteria: string;
7
- description?: string;
8
- value: string[];
9
- }
10
- export declare type HsoConfigs = Record<HsoConfigType, HsoConfig[]>;
11
- export interface HsoHit {
12
- description: string;
13
- hso: HsoConfigs;
14
- objectID: string;
15
- }
16
- export declare type HsoFilter = string[];
17
- interface ExchangeRateHit {
18
- objectID: string;
19
- rate: number;
20
- }
21
- export declare type ExchangeRates = Record<string, number>;
22
- export interface ListOfValuesItem {
23
- id: number;
24
- categoryID?: number;
25
- objectID: string;
26
- value: Record<string, string | number>;
27
- }
28
- export declare type Configs = {
29
- hso: HsoConfigs;
30
- lov: ListOfValuesItem[];
31
- exchangeRates: ExchangeRates;
32
- };
33
- export declare type LoadConfig = () => Promise<Configs>;
34
- interface PreloadedConfig {
35
- hso: HsoConfigs;
36
- lov: ListOfValuesItem[];
37
- curr: ExchangeRateHit[];
38
- }
39
- interface LoadConfigOptions {
40
- languages: string[];
41
- currencies: string[];
42
- preloadedConfig?: PreloadedConfig;
43
- variations: string[];
44
- }
45
- /**
46
- * Evaluate hso config
47
- *
48
- * @param config
49
- * @param context
50
- */
51
- export declare function evaluateHsoConfigs(context: HsoConfigContext, configs?: HsoConfig[]): HsoFilter;
52
- /**
53
- * Generate exchange rates object from response
54
- *
55
- * @param hits
56
- */
57
- export declare function exchangeRatesFromResponse(hits: ExchangeRateHit[]): ExchangeRates;
58
- /**
59
- * Get LOV attributes to retrieve with Translated attributes
60
- *
61
- * @param languages
62
- */
63
- export declare function getLovAttributesToRetrieve(languages: string[]): string[];
64
- interface IndicesConfiguration {
65
- hsoIndex: IndexVariation[];
66
- lovIndex: string;
67
- currencyIndex: string;
68
- }
69
- export declare function loadConfigs({ search }: AlgoliaClient, { hsoIndex, lovIndex, currencyIndex }: IndicesConfiguration, options: LoadConfigOptions): Promise<Configs>;
70
- export {};
@@ -1,27 +0,0 @@
1
- import { AlgoliaClient } from '..';
2
- import { HsoFilter } from './configs';
3
- import { OptionalSearchParameters, Hotel, Location } from '../types';
4
- interface Options {
5
- languages: string[];
6
- requestSize: number;
7
- priceBucketWidth?: number;
8
- exchangeRate: number;
9
- hsoFilter: HsoFilter;
10
- }
11
- export declare type Facets = Record<string, Record<string, number>>;
12
- export interface GeoSearchParameters extends OptionalSearchParameters {
13
- geolocation?: Location;
14
- anchorHotelId?: string;
15
- }
16
- interface IndicesConfiguration {
17
- hotelIndex: string;
18
- }
19
- export declare function geoSearch({ search }: AlgoliaClient, { hotelIndex }: IndicesConfiguration, options: Options): (parameters: GeoSearchParameters) => Promise<{
20
- hotelIds: string[];
21
- hotelEntities: Record<string, Hotel>;
22
- resultsCount: number;
23
- resultsCountTotal: number;
24
- offset: number;
25
- facets: Record<string, Record<string, number>>;
26
- }>;
27
- export {};
@@ -1,26 +0,0 @@
1
- import { AlgoliaClient } from '..';
2
- import { Anchor, Hotel, Location } from '../types';
3
- interface GetAnchorParameters {
4
- hotelId?: string;
5
- placeId?: string;
6
- query?: string;
7
- geolocation?: Location;
8
- }
9
- export declare type AnchorType = 'hotel' | 'place';
10
- export declare type AnchorObject = {
11
- anchorType: AnchorType;
12
- anchor: Anchor;
13
- anchorHotel: Hotel | undefined;
14
- };
15
- interface IndicesConfiguration {
16
- autocompleteIndex: string;
17
- hotelIndex: string;
18
- }
19
- export declare function getAnchor({ search }: AlgoliaClient, { autocompleteIndex, hotelIndex }: IndicesConfiguration, { languages }: {
20
- languages: string[];
21
- }): (parameters: GetAnchorParameters) => Promise<{
22
- anchor: import("..").HotelAnchor | import("..").PlaceAnchor;
23
- anchorHotel: Hotel | undefined;
24
- anchorType: "hotel" | "place";
25
- }>;
26
- export {};
@@ -1,6 +0,0 @@
1
- export * from './get-anchor';
2
- export * from './geo-search';
3
- export * from './utils';
4
- export * from './pricing';
5
- export * from './load-suggests';
6
- export * from './configs';
@@ -1,10 +0,0 @@
1
- import { AlgoliaClient } from '..';
2
- interface Options {
3
- languages: string[];
4
- suggestsCount?: number;
5
- }
6
- interface IndicesConfiguration {
7
- autocompleteIndex: string;
8
- }
9
- export declare function loadSuggests({ search }: AlgoliaClient, { autocompleteIndex }: IndicesConfiguration, { languages, suggestsCount }: Options): (query: string) => Promise<import("..").Suggestion[]>;
10
- export {};
@@ -1,26 +0,0 @@
1
- interface PriceFilterParameters {
2
- checkIn?: string;
3
- checkOut?: string;
4
- margin?: number;
5
- priceBucketWidth?: number;
6
- priceBucketsCount: number;
7
- priceMax?: number;
8
- priceMin?: number;
9
- }
10
- /**
11
- * Generates sort by price optional filter
12
- *
13
- * @param priceBucketsCount number of price buckets
14
- *
15
- * @returns array of strings
16
- */
17
- export declare function generateSortByPriceFilter(priceBucketsCount: number): string[];
18
- /**
19
- * Generates price filter based on Alglolia's optional filters
20
- *
21
- * @param PriceFilterParameters parameterd for generating the filter
22
- *
23
- * @returns array of strings
24
- */
25
- export declare function generatePriceFilter({ priceMin, priceMax, priceBucketWidth, priceBucketsCount, checkIn, checkOut, margin }: PriceFilterParameters): string[];
26
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,23 +0,0 @@
1
- import { Base, ProfileKey } from '.';
2
- import { SearchResults, SearchHandler, SearchFnParameters } from './search';
3
- import { SearchParameters } from './types';
4
- declare type AttributesToRetrieve = keyof SearchResults;
5
- interface SearchRequestParameters {
6
- searchId: string;
7
- profileKey: ProfileKey;
8
- searchParameters: SearchParameters;
9
- options: Base['options'];
10
- offset: number;
11
- attributes?: AttributesToRetrieve[];
12
- }
13
- export declare function createSearchRequestString({ profileKey, searchId, searchParameters, options, offset, attributes }: SearchRequestParameters): string;
14
- interface AnchorRequestParameters {
15
- searchId: string;
16
- profileKey: ProfileKey;
17
- searchParameters: SearchParameters;
18
- options: Base['options'];
19
- attributes?: AttributesToRetrieve[];
20
- }
21
- export declare function createAnchorRequestString({ profileKey, searchId, searchParameters, options, attributes }: AnchorRequestParameters): string;
22
- export declare function backendSearch({ getFeatureEnabled, profileKey, appConfig, offersClient, options }: SearchFnParameters): SearchHandler;
23
- export {};
@@ -1 +0,0 @@
1
- export {};