@findhotel/sapi 0.23.7 → 0.23.10
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.js +1 -1
- package/dist/types/packages/core/src/app-config.d.ts +1 -0
- package/dist/types/packages/core/src/backend-search.d.ts +11 -2
- package/dist/types/packages/core/src/hotel.d.ts +4 -1
- package/dist/types/packages/core/src/offers.d.ts +1 -0
- package/dist/types/packages/core/src/sapi.d.ts +1 -1
- package/dist/types/packages/core/src/types/types.d.ts +6 -0
- package/package.json +2 -2
|
@@ -2,13 +2,22 @@ import { Base, ProfileKey } from '.';
|
|
|
2
2
|
import { SearchResults, SearchHandler, SearchFnParameters } from './search';
|
|
3
3
|
import { SearchParameters } from './types';
|
|
4
4
|
declare type AttributesToRetrieve = keyof SearchResults;
|
|
5
|
-
interface
|
|
5
|
+
interface SearchRequestParameters {
|
|
6
|
+
searchId: string;
|
|
6
7
|
profileKey: ProfileKey;
|
|
7
8
|
searchParameters: SearchParameters;
|
|
8
9
|
options: Base['options'];
|
|
9
10
|
offset: number;
|
|
10
11
|
attributes?: AttributesToRetrieve[];
|
|
11
12
|
}
|
|
12
|
-
export declare function
|
|
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;
|
|
13
22
|
export declare function backendSearch({ getFeatureEnabled, profileKey, appConfig, offersClient, options }: SearchFnParameters): SearchHandler;
|
|
14
23
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseWithConfig } from '.';
|
|
2
|
-
import { Language, HotelId, TranslatedString, GuestRating, GuestType, Location, TranslatedArray, Pricing, ContentHotel, LOVItem } from './types';
|
|
2
|
+
import { Language, HotelId, TranslatedString, GuestRating, GuestType, Location, TranslatedArray, Pricing, ContentHotel, LOVItem, Currency } from './types';
|
|
3
3
|
export interface SafHotel {
|
|
4
4
|
objectID: HotelId;
|
|
5
5
|
_geoloc: Location;
|
|
@@ -8,6 +8,7 @@ export interface SafHotel {
|
|
|
8
8
|
guestType: GuestType;
|
|
9
9
|
guestRating: GuestRating;
|
|
10
10
|
address?: TranslatedString;
|
|
11
|
+
country?: string;
|
|
11
12
|
isDeleted?: boolean;
|
|
12
13
|
updatedAt?: number;
|
|
13
14
|
propertyTypeId?: number;
|
|
@@ -23,6 +24,7 @@ export interface SafHotel {
|
|
|
23
24
|
checkInMinAge?: number;
|
|
24
25
|
reviewCount?: number;
|
|
25
26
|
chainID?: string;
|
|
27
|
+
parentChainID?: string;
|
|
26
28
|
checkInEnd?: string;
|
|
27
29
|
lastBooked?: number;
|
|
28
30
|
checkOutTime?: string;
|
|
@@ -35,6 +37,7 @@ export interface SafHotel {
|
|
|
35
37
|
themes?: LOVItem[];
|
|
36
38
|
propertyType?: LOVItem;
|
|
37
39
|
sentiments?: LOVItem[];
|
|
40
|
+
currency?: Currency;
|
|
38
41
|
}
|
|
39
42
|
export declare type HotelHandler = (hotelId: HotelId) => Promise<ContentHotel>;
|
|
40
43
|
export declare function safToSapiHotel(safHotel: SafHotel, languages: Language[]): ContentHotel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SearchClient } from 'algoliasearch';
|
|
2
2
|
import { Except } from 'type-fest';
|
|
3
|
-
import { OffersClient } from './
|
|
3
|
+
import { OffersClient } from './offers';
|
|
4
4
|
import { Configs } from './algolia';
|
|
5
5
|
import { AppConfig, Features } from './app-config';
|
|
6
6
|
import { ProfileKey, ClientOptions, SapiClient, Language, Logger } from './types';
|
|
@@ -164,6 +164,8 @@ export interface Hit {
|
|
|
164
164
|
starRating: number;
|
|
165
165
|
themeIds: number[];
|
|
166
166
|
_geoloc: Partial<Location>;
|
|
167
|
+
chainID?: string;
|
|
168
|
+
parentChainID?: string;
|
|
167
169
|
}
|
|
168
170
|
/**
|
|
169
171
|
* Product
|
|
@@ -193,6 +195,7 @@ export interface ContentHotel {
|
|
|
193
195
|
imageURIs: string[];
|
|
194
196
|
guestType: GuestType;
|
|
195
197
|
guestRating: GuestRating;
|
|
198
|
+
country?: string;
|
|
196
199
|
isDeleted?: boolean;
|
|
197
200
|
propertyTypeId?: number;
|
|
198
201
|
starRating?: number;
|
|
@@ -205,6 +208,7 @@ export interface ContentHotel {
|
|
|
205
208
|
checkInMinAge?: number;
|
|
206
209
|
reviewCount?: number;
|
|
207
210
|
chainID?: string;
|
|
211
|
+
parentChainID?: string;
|
|
208
212
|
checkInEnd?: string;
|
|
209
213
|
lastBooked?: number;
|
|
210
214
|
checkOutTime?: string;
|
|
@@ -218,6 +222,7 @@ export interface ContentHotel {
|
|
|
218
222
|
themes?: TranslatedLOVItem[];
|
|
219
223
|
propertyType?: TranslatedLOVItem;
|
|
220
224
|
sentiments?: TranslatedLOVItem[];
|
|
225
|
+
currency?: Currency;
|
|
221
226
|
}
|
|
222
227
|
export interface HotelAnchor extends Omit<HotelAnchorHit, 'hotelName' | 'placeADN' | 'placeDN'> {
|
|
223
228
|
placeDisplayName: string;
|
|
@@ -264,6 +269,7 @@ export declare type Meals = 'allInclusive' | 'breakfast' | 'partialBreakfast' |
|
|
|
264
269
|
export interface Offer {
|
|
265
270
|
additionalProviderParams: {
|
|
266
271
|
feedId: string;
|
|
272
|
+
rateType?: string;
|
|
267
273
|
};
|
|
268
274
|
id: string;
|
|
269
275
|
bookURI: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@findhotel/sapi",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.10",
|
|
4
4
|
"description": "FindHotel Search API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/types/packages/core/src",
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"type-fest": "^0.20.2",
|
|
63
63
|
"typedoc": "^0.22.13",
|
|
64
64
|
"typescript": "^4.1.2",
|
|
65
|
-
"xo": "^0.
|
|
65
|
+
"xo": "^0.39.1"
|
|
66
66
|
}
|
|
67
67
|
}
|