@qite/tide-client 1.1.41 → 1.1.42

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.
@@ -33,6 +33,11 @@ export declare const search: (
33
33
  request: BookingPackageRequest<BookingPackageSearchRequest>,
34
34
  signal?: AbortSignal | undefined
35
35
  ) => Promise<BookingPackageItem[]>;
36
+ export declare const searchWithErrorMapping: (
37
+ config: TideClientConfig,
38
+ request: BookingPackageRequest<BookingPackageSearchRequest>,
39
+ signal?: AbortSignal | undefined
40
+ ) => Promise<TideResponse<BookingPackageItem[]>>;
36
41
  export declare const details: (
37
42
  config: TideClientConfig,
38
43
  request: BookingPackageRequest<BookingPackageDetailsRequest>,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "1.1.41",
3
+ "version": "1.1.42",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -29,6 +29,7 @@ import { get, post } from "./common-client";
29
29
  const ENDPOINT = "/api/web/booking/v2";
30
30
  const ENDPOINT_PACKAGE_SEARCH_LIST = `${ENDPOINT}/package-search-list`;
31
31
  const ENDPOINT_SEARCH = `${ENDPOINT}/search`;
32
+ const ENDPOINT_SEARCH_WITH_ERROR_MAPPING = `${ENDPOINT}/search-with-error-mapping`;
32
33
  const ENDPOINT_DETAILS = `${ENDPOINT}/details`;
33
34
  const ENDPOINT_VALIDATE_VOUCHER = `${ENDPOINT}/validate-voucher`;
34
35
  const ENDPOINT_ALTERNATE_HOTELS = `/alternate-hotels`;
@@ -67,6 +68,18 @@ export const search = (
67
68
  return post(url, apiKey, body, config.token, signal, true);
68
69
  };
69
70
 
71
+ export const searchWithErrorMapping = (
72
+ config: TideClientConfig,
73
+ request: BookingPackageRequest<BookingPackageSearchRequest>,
74
+ signal?: AbortSignal
75
+ ): Promise<TideResponse<BookingPackageItem[]>> => {
76
+ const url = `${config.host}${ENDPOINT_SEARCH_WITH_ERROR_MAPPING}`;
77
+ const apiKey = config.apiKey;
78
+ const body = JSON.stringify(request);
79
+
80
+ return post(url, apiKey, body, config.token, signal, true);
81
+ };
82
+
70
83
  export const details = (
71
84
  config: TideClientConfig,
72
85
  request: BookingPackageRequest<BookingPackageDetailsRequest>,