@qite/tide-client 1.1.6 → 1.1.7

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,6 +54,7 @@ export * from "./package-search-request-room";
54
54
  export * from "./package-search-request";
55
55
  export * from "./package-search-result";
56
56
  export * from "./package-sub-option";
57
+ export * from "./page-result";
57
58
  export * from "./pax";
58
59
  export * from "./payment";
59
60
  export * from "./person-country-preference";
@@ -0,0 +1,5 @@
1
+ export interface PageResult<T> {
2
+ count: number;
3
+ items: T[];
4
+ nextPageLink: string;
5
+ }
@@ -1,5 +1,4 @@
1
- import { TideClientConfig } from "../types";
2
- import { CountryItem } from "../types/offer/country-item";
1
+ import { CountryItem, PageResult, TideClientConfig } from "../types";
3
2
  /**
4
3
  * api/search/countries
5
4
  * Gets all Countries
@@ -10,4 +9,4 @@ import { CountryItem } from "../types/offer/country-item";
10
9
  export declare const getCountries: (
11
10
  config: TideClientConfig,
12
11
  signal?: AbortSignal | undefined
13
- ) => Promise<[CountryItem]>;
12
+ ) => Promise<PageResult<CountryItem>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -54,6 +54,7 @@ export * from "./package-search-request-room";
54
54
  export * from "./package-search-request";
55
55
  export * from "./package-search-result";
56
56
  export * from "./package-sub-option";
57
+ export * from "./page-result";
57
58
  export * from "./pax";
58
59
  export * from "./payment";
59
60
  export * from "./person-country-preference";
@@ -0,0 +1,5 @@
1
+ export interface PageResult<T> {
2
+ count: number;
3
+ items: T[];
4
+ nextPageLink: string;
5
+ }
@@ -1,5 +1,4 @@
1
- import { TideClientConfig } from "../types";
2
- import { CountryItem } from "../types/offer/country-item";
1
+ import { CountryItem, PageResult, TideClientConfig } from "../types";
3
2
  import { get } from "./common-client";
4
3
 
5
4
  const ENDPOINT = "/api/web/search";
@@ -15,7 +14,7 @@ const ENDPOINT_COUNTRIES = `${ENDPOINT}/countries`;
15
14
  export const getCountries = (
16
15
  config: TideClientConfig,
17
16
  signal?: AbortSignal
18
- ): Promise<[CountryItem]> => {
17
+ ): Promise<PageResult<CountryItem>> => {
19
18
  const url = `${config.host}${ENDPOINT_COUNTRIES}`;
20
19
  const apiKey = config.apiKey;
21
20