@findhotel/sapi 1.0.0-beta.0 → 1.0.1-beta.0

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/README.md CHANGED
@@ -258,7 +258,7 @@ const sapiClient = await sapi(profileKey, {
258
258
  log('Config received', config)
259
259
  }
260
260
  },
261
- totalRateFormula: (rate) => {
261
+ getTotalRate: (rate) => {
262
262
  let totalRate = rate.base
263
263
  if (includeTaxes) totalRate += rate.taxes
264
264
  if (includeHotelFees) totalRate += rate.hotelFees
@@ -271,19 +271,19 @@ const sapiClient = await sapi(profileKey, {
271
271
  ### Supported options
272
272
  <a id="client-options"></a>
273
273
 
274
- | name | required | type | default | description | example |
275
- | ---------------------- | -------- | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
276
- | `anonymousId` | yes | `string` | | Unique ID identifying users | `2d360284-577b-4a53-8b91-68f72b9227fa` |
277
- | `language` | no | `string` | `en` | 2-char language code | `en` |
278
- | `currency` | no | `string` | `USD` | 3-char uppercased ISO currency code | `USD` |
279
- | `countryCode` | no | `string` | `US` | 2-char uppercased ISO country code | `US` |
280
- | `deviceType` | yes | `string` | | `desktop` or `mobile` | `desktop` |
281
- | `pageSize` | no | `number` | `20` | Displayed page size | `20` |
282
- | `initWithAppConfig` | no | `AppConfig` | | External app config to override internal one | |
283
- | `algoliaClientOptions` | no | `AlgoliaSearchOptions` | | Algolia client options used for debugging and setting additional options like timeouts etc. | |
284
- | `variations` | no | `Record<string, string>` | | A/B test variations | `{'pp000004-tags2': 'b', 'pp000004-tags3': '1'}` |
285
- | `callbacks` | no | `Record<string, fnc>` | | Client callbasks | |
286
- | `totalRateFormula` | no | `function` | Total rate including taxes and fees | Formula to calculate total display rate based on tax display logic. Used for price filter and sort by price functionalities. | |
274
+ | name | required | type | default | description | example |
275
+ | ---------------------- | -------- | ------------------------ | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
276
+ | `anonymousId` | yes | `string` | | Unique ID identifying users | `2d360284-577b-4a53-8b91-68f72b9227fa` |
277
+ | `language` | no | `string` | `en` | 2-char language code | `en` |
278
+ | `currency` | no | `string` | `USD` | 3-char uppercased ISO currency code | `USD` |
279
+ | `countryCode` | no | `string` | `US` | 2-char uppercased ISO country code | `US` |
280
+ | `deviceType` | yes | `string` | | `desktop` or `mobile` | `desktop` |
281
+ | `pageSize` | no | `number` | `20` | Displayed page size | `20` |
282
+ | `initWithAppConfig` | no | `AppConfig` | | External app config to override internal one | |
283
+ | `algoliaClientOptions` | no | `AlgoliaSearchOptions` | | Algolia client options used for debugging and setting additional options like timeouts etc. | |
284
+ | `variations` | no | `Record<string, string>` | | A/B test variations | `{'pp000004-tags2': 'b', 'pp000004-tags3': '1'}` |
285
+ | `callbacks` | no | `Record<string, fnc>` | | Client callbasks | |
286
+ | `getTotalRate` | no | `function` | Total rate including taxes and fees | Function to calculate total display rate based on tax display logic. Used for price filter and sort by price functionalities. | |
287
287
 
288
288
  ### Available client callbacks
289
289
  <a id="client-callbacks"></a>