@findhotel/sapi
Advanced tools
Comparing version 0.22.10 to 0.22.11
@@ -0,1 +1,6 @@ | ||
## [0.22.11](https://github.com/FindHotel/sapi/compare/v0.22.10...v0.22.11) (2021-12-09) | ||
### Changed | ||
- SAF search replaced with SAPI backend search | ||
## [0.22.10](https://github.com/FindHotel/sapi/compare/v0.22.9...v0.22.10) (2021-11-30) | ||
@@ -2,0 +7,0 @@ ### Added |
@@ -8,3 +8,2 @@ import { AlgoliaClient } from '..'; | ||
priceBucketWidth?: number; | ||
priceBucketsCount: number; | ||
exchangeRate: number; | ||
@@ -11,0 +10,0 @@ hsoFilter: HsoFilter; |
@@ -1,3 +0,23 @@ | ||
import { Profile, ProfileKey, SafConfig } from './types'; | ||
import { Profile, ProfileKey } from './types'; | ||
/** | ||
* Fixed number of price bucket count | ||
*/ | ||
export declare const PRICE_BUCKET_COUNT = 31; | ||
export declare const profiles: Record<ProfileKey, Profile>; | ||
export declare const safConfigs: Record<ProfileKey, SafConfig>; | ||
/** | ||
* SAF (Search Application Frontend) configuration | ||
*/ | ||
export interface SafConfig { | ||
baseUrl: string; | ||
baseCloudFrontUrl: string; | ||
endpoints: Record<string, string>; | ||
} | ||
export declare function getSafConfig(profileKey: ProfileKey): SafConfig; | ||
/** | ||
* SAPI backend configuration | ||
*/ | ||
export interface BackendConfig { | ||
baseUrl: string; | ||
endpoints: Record<string, string>; | ||
} | ||
export declare function getBackendConfig(profileKey: ProfileKey): BackendConfig; |
@@ -5,3 +5,4 @@ import { SearchClient } from 'algoliasearch'; | ||
import { Configs } from './algolia'; | ||
import { ProfileKey, ClientOptions, SapiClient, Profile, SafConfig, SapiFeature, Language, Logger } from './types'; | ||
import { SafConfig, BackendConfig } from './configs'; | ||
import { ProfileKey, ClientOptions, SapiClient, Profile, SapiFeature, Language, Logger } from './types'; | ||
export declare type AlgoliaClient = Pick<SearchClient, 'search'>; | ||
@@ -11,2 +12,4 @@ export interface Base { | ||
safConfig: SafConfig; | ||
/** SAPI backend config */ | ||
backendConfig: BackendConfig; | ||
/** Check if SAPI feature is enabled */ | ||
@@ -20,2 +23,4 @@ getFeatureEnabled: (feature: SapiFeature) => boolean; | ||
raaClient?: RaaClient; | ||
/** Profile key of specific client */ | ||
profileKey: ProfileKey; | ||
/** Options persistent within single SAPI instance */ | ||
@@ -26,6 +31,4 @@ options: Except<ClientOptions, 'variations' | 'logger'> & { | ||
pageSize: number; | ||
priceBucketsCount: number; | ||
languages: Language[]; | ||
}; | ||
/** Configs loaded from Algolia and local date configuration */ | ||
configs?: unknown; | ||
@@ -32,0 +35,0 @@ } |
@@ -47,4 +47,2 @@ import { AlgoliaSearchOptions } from 'algoliasearch'; | ||
algoliaClientOptions?: AlgoliaSearchOptions; | ||
/** Use or not SAP for SAPI init */ | ||
useSaf?: boolean; | ||
/** External profile to override internal client profile */ | ||
@@ -51,0 +49,0 @@ initWithProfile?: Partial<Profile>; |
import { DateString, Language } from './types'; | ||
export declare type SapiFeature = 'offers' | 'search' | 'rooms' | 'suggests' | 'configs'; | ||
export interface SafConfig { | ||
baseUrl: string; | ||
baseCloudFrontUrl: string; | ||
endpoints: Record<string, string>; | ||
} | ||
export interface IndexVariation { | ||
@@ -9,0 +4,0 @@ name: string; |
{ | ||
"name": "@findhotel/sapi", | ||
"version": "0.22.10", | ||
"version": "0.22.11", | ||
"description": "FindHotel Search API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -151,3 +151,2 @@ | ||
pageSize: 20, | ||
useSaf: false, | ||
initWithProfile: { | ||
@@ -154,0 +153,0 @@ features: ['search', 'configs'], |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
264529
2241
705