@findhotel/sapi 0.23.5 → 0.23.8

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.
@@ -54,7 +54,7 @@ export declare function evaluateHsoConfigs(context: HsoConfigContext, configs?:
54
54
  *
55
55
  * @param hits
56
56
  */
57
- export declare function exchangeRatesFromResponse(hits: ExchangeRateHit[]): Record<string, number>;
57
+ export declare function exchangeRatesFromResponse(hits: ExchangeRateHit[]): ExchangeRates;
58
58
  /**
59
59
  * Get LOV attributes to retrieve with Translated attributes
60
60
  *
@@ -19,8 +19,8 @@ interface IndicesConfiguration {
19
19
  export declare function getAnchor({ search }: AlgoliaClient, { autocompleteIndex, hotelIndex }: IndicesConfiguration, { languages }: {
20
20
  languages: string[];
21
21
  }): (parameters: GetAnchorParameters) => Promise<{
22
- anchor: Anchor;
22
+ anchor: import("..").HotelAnchor | import("..").PlaceAnchor;
23
23
  anchorHotel: Hotel | undefined;
24
- anchorType: AnchorType;
24
+ anchorType: "hotel" | "place";
25
25
  }>;
26
26
  export {};
@@ -3,7 +3,7 @@ import { ProfileKey, IndexVariation } from './types';
3
3
  * Fixed number of price bucket count
4
4
  */
5
5
  export declare const PRICE_BUCKET_COUNT = 31;
6
- declare type Features = 'offers' | 'search' | 'suggests' | 'configs' | 'rooms';
6
+ export declare type Features = 'offers' | 'search' | 'suggests' | 'configs' | 'rooms' | 'get-hotel';
7
7
  export interface AppConfig {
8
8
  daedalus: {
9
9
  raaEndpoint: string | undefined;
@@ -20,6 +20,7 @@ export interface AppConfig {
20
20
  endpoints: {
21
21
  offersRooms: string;
22
22
  search: string;
23
+ hotel: string;
23
24
  };
24
25
  };
25
26
  algolia: {
@@ -38,4 +39,3 @@ export interface AppConfig {
38
39
  };
39
40
  }
40
41
  export declare function getAppConfig(profileKey: ProfileKey, initWithAppConfig?: Partial<AppConfig>): AppConfig;
41
- export {};
@@ -1,5 +1,5 @@
1
1
  import { Base, ProfileKey } from '.';
2
- import { SearchResults, SearchFn, SearchFnParameters } from './search';
2
+ import { SearchResults, SearchHandler, SearchFnParameters } from './search';
3
3
  import { SearchParameters } from './types';
4
4
  declare type AttributesToRetrieve = keyof SearchResults;
5
5
  interface RequestParameters {
@@ -10,5 +10,5 @@ interface RequestParameters {
10
10
  attributes?: AttributesToRetrieve[];
11
11
  }
12
12
  export declare function createRequestString({ profileKey, searchParameters, options, offset, attributes }: RequestParameters): string;
13
- export declare function backendSearch({ getFeatureEnabled, profileKey, appConfig, offersClient, options }: SearchFnParameters): SearchFn;
13
+ export declare function backendSearch({ getFeatureEnabled, profileKey, appConfig, offersClient, options }: SearchFnParameters): SearchHandler;
14
14
  export {};
@@ -0,0 +1,57 @@
1
+ import { BaseWithConfig } from '.';
2
+ import { Language, HotelId, TranslatedString, GuestRating, GuestType, Location, TranslatedArray, Pricing, ContentHotel, LOVItem } from './types';
3
+ export interface SafHotel {
4
+ objectID: HotelId;
5
+ _geoloc: Location;
6
+ hotelName: TranslatedString;
7
+ imageURIs: string[];
8
+ guestType: GuestType;
9
+ guestRating: GuestRating;
10
+ address?: TranslatedString;
11
+ isDeleted?: boolean;
12
+ updatedAt?: number;
13
+ propertyTypeId?: number;
14
+ starRating?: number;
15
+ feesOpt?: TranslatedString;
16
+ placeADName?: TranslatedArray;
17
+ checkInSpInst?: TranslatedString;
18
+ policies?: TranslatedString;
19
+ phone?: string;
20
+ checkInTime?: string;
21
+ placeDN?: TranslatedArray;
22
+ checkInInst?: TranslatedString;
23
+ checkInMinAge?: number;
24
+ reviewCount?: number;
25
+ chainID?: string;
26
+ checkInEnd?: string;
27
+ lastBooked?: number;
28
+ checkOutTime?: string;
29
+ themeIds?: number[];
30
+ feesMnd?: TranslatedString;
31
+ reviewCountBkt?: number;
32
+ placeID?: string;
33
+ pricing?: Pricing;
34
+ facilities?: LOVItem[];
35
+ themes?: LOVItem[];
36
+ propertyType?: LOVItem;
37
+ sentiments?: LOVItem[];
38
+ }
39
+ export declare type HotelHandler = (hotelId: HotelId) => Promise<ContentHotel>;
40
+ export declare function safToSapiHotel(safHotel: SafHotel, languages: Language[]): ContentHotel;
41
+ /**
42
+ * Creates hotel request string
43
+ *
44
+ * @param hotelId - Requested hotel id
45
+ * @param languages - list of languages with fallback
46
+ *
47
+ * @returns request string
48
+ */
49
+ export declare function createRequestString(hotelId: HotelId, languages: Language[]): string;
50
+ /**
51
+ * Creates hotel function with binded in configuration object
52
+ *
53
+ * @param configuration - Configuration for hotel function initialisation
54
+ *
55
+ * @returns function that asynchronously returns hotel's content by hotelId
56
+ */
57
+ export declare function hotel({ appConfig, options }: Pick<BaseWithConfig, 'options' | 'appConfig'>): HotelHandler;
@@ -0,0 +1 @@
1
+ export {};
@@ -23,6 +23,7 @@ interface SapiResponseOffer {
23
23
  intermediaryProvider: string;
24
24
  metadata: {
25
25
  feedID: string;
26
+ providerRateType?: string;
26
27
  };
27
28
  occupancy: string | number | null;
28
29
  package: {
@@ -1,11 +1,11 @@
1
1
  import { BaseWithConfig } from '.';
2
2
  import { RoomsRequestParameters, RoomsRequestOptions, RoomsResults } from './types';
3
- export declare type RoomsFn = (parameters: RoomsRequestParameters) => Promise<RoomsResults>;
3
+ export declare type RoomsHandler = (parameters: RoomsRequestParameters) => Promise<RoomsResults>;
4
4
  /**
5
5
  * Creates rooms request string.
6
6
  *
7
7
  * @param parameters - Rooms request parameters - dynamic parameters that change search
8
- * @param options - Rooms request options - persistent within single SAPI instance
8
+ * @param options - Rooms request options - persistent within single SAPI instance
9
9
  *
10
10
  * @returns request string
11
11
  *
@@ -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'>): RoomsFn;
41
+ export declare function rooms({ appConfig, options }: Pick<BaseWithConfig, 'options' | 'appConfig'>): RoomsHandler;
@@ -2,14 +2,14 @@ import { SearchClient } from 'algoliasearch';
2
2
  import { Except } from 'type-fest';
3
3
  import { OffersClient } from './raa';
4
4
  import { Configs } from './algolia';
5
- import { AppConfig } from './app-config';
6
- import { ProfileKey, ClientOptions, SapiClient, SapiFeature, Language, Logger } from './types';
5
+ import { AppConfig, Features } from './app-config';
6
+ import { ProfileKey, ClientOptions, SapiClient, Language, Logger } from './types';
7
7
  export declare type AlgoliaClient = Pick<SearchClient, 'search'>;
8
8
  export interface Base {
9
9
  /** SAPI client application config */
10
10
  appConfig: AppConfig;
11
11
  /** Check if SAPI feature is enabled */
12
- getFeatureEnabled: (feature: SapiFeature) => boolean;
12
+ getFeatureEnabled: (feature: Features) => boolean;
13
13
  /** Instance of Algolia Client */
14
14
  algoliaClient: AlgoliaClient;
15
15
  /** Instance of Offers Client */
@@ -31,7 +31,7 @@ interface Options {
31
31
  countryCode: string;
32
32
  pageSize: number;
33
33
  }
34
- export declare type SearchFn = (parameters: ApiSearchParameters, callbacks?: {
34
+ export declare type SearchHandler = (parameters: ApiSearchParameters, callbacks?: {
35
35
  onStart?: OnStart;
36
36
  onAnchorReceived?: OnAnchorReceived;
37
37
  onHotelsReceived?: OnHotelsReceived;
@@ -44,5 +44,5 @@ export declare type SearchFn = (parameters: ApiSearchParameters, callbacks?: {
44
44
  export declare function prepareSearchParameters(parameters: ApiSearchParameters, dates: DatesConfig): SearchParameters;
45
45
  export declare function getRequestSize(anchorObject: AnchorObject, parameters: SearchParameters, options: Options): number;
46
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): SearchFn;
47
+ export declare function search({ getFeatureEnabled, appConfig, algoliaClient, offersClient, options, configs }: SearchFnParameters): SearchHandler;
48
48
  export {};
@@ -1,4 +1,4 @@
1
1
  import { Base } from '.';
2
2
  import { Suggestion } from './types';
3
- export declare type SuggestFn = (query: string, suggestsCount?: number) => Promise<Suggestion[]>;
4
- export declare function suggest(base: Base): SuggestFn;
3
+ export declare type SuggestHandler = (query: string, suggestsCount?: number) => Promise<Suggestion[]>;
4
+ export declare function suggest(base: Base): SuggestHandler;
@@ -1,4 +1,3 @@
1
1
  export * from './types';
2
2
  export * from './rooms';
3
3
  export * from './sapi-client';
4
- export * from './sapi-configs';
@@ -1,9 +1,10 @@
1
1
  import { AlgoliaSearchOptions } from 'algoliasearch';
2
2
  import { AnonymousId, Language, Currency, Country, DeviceType, Brand } from './types';
3
3
  import { AppConfig } from '../app-config';
4
- import { SearchFn } from '../search';
5
- import { RoomsFn } from '../rooms';
6
- import { SuggestFn } from '../suggest';
4
+ import { SearchHandler } from '../search';
5
+ import { RoomsHandler } from '../rooms';
6
+ import { HotelHandler } from '../hotel';
7
+ import { SuggestHandler } from '../suggest';
7
8
  import { Configs } from '../algolia';
8
9
  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';
9
10
  interface Event {
@@ -14,9 +15,10 @@ export interface Logger {
14
15
  log: (event: Event) => void;
15
16
  }
16
17
  export interface SapiClient {
17
- rooms: RoomsFn;
18
- search: SearchFn;
19
- suggest: SuggestFn;
18
+ rooms: RoomsHandler;
19
+ search: SearchHandler;
20
+ suggest: SuggestHandler;
21
+ hotel: HotelHandler;
20
22
  }
21
23
  /** Options for initializing the Search API client. Persistent within single SAPI instance but may vary for different users */
22
24
  export interface ClientOptions {
@@ -1,3 +1,8 @@
1
+ export interface IndexVariation {
2
+ name: string;
3
+ objectID?: string;
4
+ variationID?: string;
5
+ }
1
6
  /**
2
7
  * Unique ID identifying users
3
8
  *
@@ -136,7 +141,7 @@ export interface HotelSuggestHit extends BasicSuggestHit {
136
141
  };
137
142
  }
138
143
  export declare type SuggestHit = HotelSuggestHit | PlaceSuggestHit;
139
- /** Hit */
144
+ /** Search Hit */
140
145
  export interface Hit {
141
146
  address: TranslatedString;
142
147
  checkInTime: string;
@@ -163,12 +168,57 @@ export interface Hit {
163
168
  /**
164
169
  * Product
165
170
  */
171
+ export interface LOVItem {
172
+ importance?: number;
173
+ categoryID?: number;
174
+ id: number;
175
+ value: TranslatedString;
176
+ }
177
+ export interface TranslatedLOVItem {
178
+ importance?: number;
179
+ categoryID?: number;
180
+ id: number;
181
+ value: string;
182
+ }
166
183
  export interface Hotel extends Omit<Hit, 'hotelName' | 'address' | 'placeDN' | 'placeADName'> {
167
184
  displayAddress: string;
168
185
  hotelName: string;
169
186
  placeDisplayName: string;
170
187
  regularPriceRange?: [number, number];
171
188
  }
189
+ export interface ContentHotel {
190
+ objectID: HotelId;
191
+ _geoloc: Location;
192
+ hotelName: string;
193
+ imageURIs: string[];
194
+ guestType: GuestType;
195
+ guestRating: GuestRating;
196
+ isDeleted?: boolean;
197
+ propertyTypeId?: number;
198
+ starRating?: number;
199
+ feesOpt?: string;
200
+ checkInSpInst?: string;
201
+ policies?: string;
202
+ phone?: string;
203
+ checkInTime?: string;
204
+ checkInInst?: string;
205
+ checkInMinAge?: number;
206
+ reviewCount?: number;
207
+ chainID?: string;
208
+ checkInEnd?: string;
209
+ lastBooked?: number;
210
+ checkOutTime?: string;
211
+ feesMnd?: string;
212
+ reviewCountBkt?: number;
213
+ placeID?: string;
214
+ pricing?: Pricing;
215
+ placeDisplayName?: string;
216
+ displayAddress?: string;
217
+ facilities?: TranslatedLOVItem[];
218
+ themes?: TranslatedLOVItem[];
219
+ propertyType?: TranslatedLOVItem;
220
+ sentiments?: TranslatedLOVItem[];
221
+ }
172
222
  export interface HotelAnchor extends Omit<HotelAnchorHit, 'hotelName' | 'placeADN' | 'placeDN'> {
173
223
  placeDisplayName: string;
174
224
  hotelName: string;
@@ -214,6 +264,7 @@ export declare type Meals = 'allInclusive' | 'breakfast' | 'partialBreakfast' |
214
264
  export interface Offer {
215
265
  additionalProviderParams: {
216
266
  feedId: string;
267
+ rateType?: string;
217
268
  };
218
269
  id: string;
219
270
  bookURI: string;
@@ -1,3 +1,4 @@
1
+ import { Except } from 'type-fest';
1
2
  /**
2
3
  * Removes specified `keys` from `object`
3
4
  *
@@ -6,4 +7,4 @@
6
7
  * @param keys keys of the properties to remove from `object`
7
8
  * @param object target object to emit `properties` from
8
9
  */
9
- export declare function omit<O, K extends keyof O>(keys: readonly K[], object: O): Pick<O, Exclude<keyof O, K>>;
10
+ export declare function omit<O, K extends keyof O>(keys: readonly K[], object: O): Except<O, K>;
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@findhotel/sapi",
3
- "version": "0.23.5",
3
+ "version": "0.23.8",
4
4
  "description": "FindHotel Search API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/packages/core/src",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
10
+ "engines": {
11
+ "node": ">=16.0.0",
12
+ "npm": ">=7.10.0"
13
+ },
10
14
  "scripts": {
11
15
  "clean:dist": "rm -rf dist",
12
16
  "build": "rollup -c && tsc --outDir dist/lib --declarationDir dist/types --declaration true --emitDeclarationOnly",
@@ -47,17 +51,17 @@
47
51
  "eslint-plugin-react-hooks": "^4.2.0",
48
52
  "husky": "^5.0.6",
49
53
  "jest": "^26.6.3",
50
- "lerna": "^3.15.0",
54
+ "lerna": "^4.0.0",
51
55
  "rollup": "^2.33.3",
52
56
  "rollup-plugin-cleanup": "^3.2.1",
53
57
  "rollup-plugin-terser": "^7.0.2",
54
58
  "rollup-plugin-visualizer": "^5.5.0",
55
- "shipjs": "0.23.3",
59
+ "shipjs": "^0.24.3",
56
60
  "ts-jest": "^26.4.4",
57
- "tslib": "^2.0.3",
61
+ "tslib": "^2.3.1",
58
62
  "type-fest": "^0.20.2",
59
- "typedoc": "^0.19.2",
63
+ "typedoc": "^0.22.13",
60
64
  "typescript": "^4.1.2",
61
- "xo": "^0.35.0"
65
+ "xo": "^0.48.0"
62
66
  }
63
67
  }
package/CHANGELOG.md DELETED
@@ -1,212 +0,0 @@
1
- ## [0.23.5](https://github.com/FindHotel/sapi/compare/v0.23.4...v0.23.5) (2022-03-04)
2
- ### Added
3
- - SAF domain for STG environment
4
-
5
-
6
- ## [0.23.4](https://github.com/FindHotel/sapi/compare/v0.23.3...v0.23.4) (2022-02-28)
7
- ### Changed
8
- - SAF domain for E2E environment
9
-
10
-
11
- ## [0.23.3](https://github.com/FindHotel/sapi/compare/v0.23.2...v0.23.3) (2022-02-22)
12
- ### Added
13
- - Log WS errors and re-connects
14
-
15
-
16
- ## [0.23.2](https://github.com/FindHotel/sapi/compare/v0.23.1...v0.23.2) (2022-02-16)
17
- ### Changed
18
- - Change logic of free cancelation calculation
19
- - Empty daedalus raa endpoint for e2e profile
20
-
21
-
22
- ## [0.23.1](https://github.com/FindHotel/sapi/compare/v0.23.0...v0.23.1) (2022-02-09)
23
- ### Added
24
- - SAPI backend offers support.
25
- - RAA V3 migration
26
-
27
-
28
- ## [0.23.0](https://github.com/FindHotel/sapi/compare/v0.22.16...v0.23.0) (2022-02-09)
29
- ### Changed
30
- - Skipped
31
-
32
-
33
- ## [0.22.16](https://github.com/FindHotel/sapi/compare/v0.22.15...v0.22.16) (2022-01-04)
34
- ### Added
35
- - Added missing fields to Offer type
36
- ### Changed
37
- - Clean-up of room-limit test
38
-
39
- ## [0.22.15](https://github.com/FindHotel/sapi/compare/v0.22.14...v0.22.15) (2021-12-27)
40
- ### Added
41
- - Forward `anonymousId` to SAPI/search() backend endpoint
42
-
43
-
44
- ## [0.22.14](https://github.com/FindHotel/sapi/compare/v0.22.13...v0.22.14) (2021-12-17)
45
- ### Added
46
- - `isDeleted` filter for autosuggest module
47
-
48
-
49
- ## [0.22.13](https://github.com/FindHotel/sapi/compare/v0.22.12...v0.22.13) (2021-12-15)
50
- ### Added
51
- - Send A/B test variations to SAF/offers-rooms endpoint
52
-
53
- ## [0.22.12](https://github.com/FindHotel/sapi/compare/v0.22.11...v0.22.12) (2021-12-13)
54
- ### Changed
55
- - `roomLimit` for anchor hotel has been set to 2 and for similar hotels to 1
56
-
57
-
58
- ## [0.22.11](https://github.com/FindHotel/sapi/compare/v0.22.10...v0.22.11) (2021-12-09)
59
- ### Changed
60
- - SAF search replaced with SAPI backend search
61
-
62
-
63
- ## [0.22.10](https://github.com/FindHotel/sapi/compare/v0.22.9...v0.22.10) (2021-11-30)
64
- ### Added
65
- - `boundingBox` parameter to SAF-search request
66
-
67
- ## [0.22.9](https://github.com/FindHotel/sapi/compare/v0.22.8...v0.22.9) (2021-11-24)
68
- ### Added
69
- - Added missing field to suggest method
70
-
71
-
72
- ## [0.22.8](https://github.com/FindHotel/sapi/compare/v0.22.7...v0.22.8) (2021-11-16)
73
- ### Added
74
- - `roomLimit` parameter for RAA requests
75
-
76
-
77
- ## [0.22.7](https://github.com/FindHotel/sapi/compare/v0.22.6...v0.22.7) (2021-11-09)
78
- ### Added
79
- - clientRequestId for each individual WS request to RAA
80
-
81
-
82
- ## [0.22.6](https://github.com/FindHotel/sapi/compare/v0.22.5...v0.22.6) (2021-10-26)
83
- ### Fixed
84
- - Rooms being undefined in SAPI.rooms() method
85
- ### Changed
86
- - Bumped Immer to v9.0.6
87
-
88
-
89
- ## [0.22.5](https://github.com/FindHotel/sapi/compare/v0.22.4...v0.22.5) (2021-10-25)
90
- ### Added
91
- - Forward `cugDeals` parameter to SAF/offers-rooms endpoint
92
-
93
-
94
- ## [0.22.4](https://github.com/FindHotel/sapi/compare/v0.22.3...v0.22.4) (2021-10-22)
95
- ### Added
96
- - Forward `providerCode` parameter to SAF/offers-rooms endpoint
97
-
98
-
99
- ## [0.22.3](https://github.com/FindHotel/sapi/compare/v0.22.2...v0.22.3) (2021-10-11)
100
- - Fetch missing anchorHotelId attribute for subsequent searches
101
-
102
-
103
- ## [0.22.2](https://github.com/FindHotel/sapi/compare/v0.22.1...v0.22.2) (2021-10-11)
104
- ### Fixed
105
- - Fetch missing anchorHotelId attribute for subsequent searches
106
-
107
-
108
- ## [0.22.1](https://github.com/FindHotel/sapi/compare/v0.22.0...v0.22.1) (2021-10-06)
109
- ### Fixed
110
- - Fetch missing attributes onload more hotels
111
-
112
-
113
- ## [0.22.0](https://github.com/FindHotel/sapi/compare/v0.21.2...v0.22.0) (2021-10-04)
114
- ### Added
115
- - Support for SAF/search endpoint
116
- ### Changed
117
- - sapi.getConfig() method replaced with onConfigReceived callback in SAPI client
118
-
119
-
120
- ## [0.21.2](https://github.com/FindHotel/sapi/compare/v0.21.1...v0.21.2) (2021-09-03)
121
- ### Changed
122
- - Cloudfront url instead of CloudFlare for sapi-init
123
-
124
-
125
- ## [0.21.1](https://github.com/FindHotel/sapi/compare/v0.21.0...v0.21.1) (2021-08-31)
126
- ### Changed
127
- - SAF custom domain
128
-
129
-
130
- ## [0.21.0](https://github.com/FindHotel/sapi/compare/v0.20.4...v0.21.0) (2021-08-26)
131
- ### Changed
132
- - Use new Algolia index with separate HSO records for A/B test instead of switching HSO indices
133
-
134
-
135
- ## [0.20.4](https://github.com/FindHotel/sapi/compare/v0.20.3...v0.20.4) (2021-08-20)
136
- ### Added
137
- - Basic logger implementation
138
-
139
-
140
- ## [0.20.3](https://github.com/FindHotel/sapi/compare/v0.20.2...v0.20.3) (2021-08-17)
141
- ### Changed
142
- - Better error handling for fetch requests
143
-
144
-
145
- ## [0.20.2](https://github.com/FindHotel/sapi/compare/v0.20.1...v0.20.2) (2021-08-16)
146
- ### Changed
147
- - Use first offer instead of cheapest to calculate deal score
148
- ### Fixed
149
- - `regularPriceRange` being `[null, null]` changed to `undefined` in case of missing `priceBucketWidth`
150
-
151
-
152
- ## [0.20.1](https://github.com/FindHotel/sapi/compare/v0.19.3...v0.20.1) (2021-08-10)
153
- ### Changed
154
- - SAPI initialisation requires only `profileKey` from now
155
-
156
- ### Added
157
- - Added fallback for RAA WS endpoint in case it's empty in e2e environment
158
-
159
- ### Removed
160
- - `clientId` and `clientKey` from sapi initialisation
161
-
162
-
163
- ## [0.19.3](https://github.com/FindHotel/sapi/compare/v0.19.1...v0.19.3) (2021-08-09)
164
- ### Fixed
165
- - Docs generation
166
-
167
-
168
- ## [0.19.2](https://github.com/FindHotel/sapi/compare/v0.19.1...v0.19.2) (2021-08-09)
169
- ### Fixed
170
- - Docs generation has been fixed
171
-
172
- ## [0.19.1](https://github.com/FindHotel/sapi/compare/v0.18.2...v0.19.1) (2021-08-05)
173
- ### Changed
174
- - Disabled docs generation temporary
175
-
176
-
177
- ## [0.19.0](https://github.com/FindHotel/sapi/compare/v0.18.2...v0.19.0) (2021-08-05)
178
- ### Added
179
- - Support for SAF (Search Application Frontend) init
180
-
181
- ### Changed
182
- - Use internal profiles instead of external dependency
183
- - `initWithConfig` renamed to `initWithProfile`
184
- - Removed support of `variationIds` option
185
-
186
-
187
- ## [0.18.2](https://github.com/FindHotel/sapi/compare/v0.18.1...v0.18.2) (2021-06-29)
188
-
189
- ### Changed
190
- - Change types path
191
-
192
-
193
- ## [0.18.1](https://github.com/FindHotel/sapi/compare/v0.18.0...v0.18.1) (2021-06-29)
194
-
195
- ### Changed
196
- - Move `dependencies` to `devDependencies`
197
-
198
- ## [0.18.0](https://github.com/FindHotel/sapi/compare/v0.17.1...v0.18.0) (2021-06-29)
199
-
200
- ### Changed
201
- - Rename `locale` to `language` when using SAF/offers-rooms
202
- - Replace `merchantOfRecord` with `canPayLater`
203
- - Stop sending `_rankingInfo`
204
-
205
-
206
- ## [0.17.1](https://github.com/FindHotel/sapi/compare/v0.16.1...v0.17.1) (2021-06-29)
207
-
208
- ### Added
209
- - Use ShipJs for releases
210
-
211
-
212
-
@@ -1,27 +0,0 @@
1
- import { DateString, Language } from './types';
2
- export declare type SapiFeature = 'offers' | 'search' | 'rooms' | 'suggests' | 'configs';
3
- export interface IndexVariation {
4
- name: string;
5
- objectID?: string;
6
- variationID?: string;
7
- }
8
- export interface Profile {
9
- features: SapiFeature[];
10
- blockedDefaultDates: DateString[];
11
- daysFromNow: number;
12
- fallbackLanguages: Record<Language, Language[]>;
13
- hotelIndex: string;
14
- autocompleteIndex: string;
15
- lovIndex: string;
16
- currencyIndex: string;
17
- hsoIndex: IndexVariation[];
18
- raa: {
19
- endpoint?: string;
20
- };
21
- offers: {
22
- endpoint: string;
23
- };
24
- algolia: {
25
- apiKey: string;
26
- };
27
- }