@qite/tide-client 1.1.30 → 1.1.32

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.
Files changed (59) hide show
  1. package/build/index.js +94 -58
  2. package/build/index.js.map +1 -1
  3. package/build/types/company/agent/agent-invoice-item.d.ts +9 -0
  4. package/build/types/company/agent/entry-totals.d.ts +7 -0
  5. package/build/types/company/agent/index.d.ts +2 -0
  6. package/build/types/company/index.d.ts +1 -0
  7. package/build/types/enums/data-type.d.ts +1 -0
  8. package/build/types/offer/booking-v2/request/booking-package-book-request.d.ts +4 -0
  9. package/build/types/offer/booking-v2/request/booking-package-customer-request.d.ts +4 -0
  10. package/build/types/offer/booking-v2/request/index.d.ts +2 -1
  11. package/build/types/offer/booking-v2/response/booking-price-details.d.ts +4 -0
  12. package/build/types/offer/booking-v2/response/booking-room-status-option.d.ts +5 -0
  13. package/build/types/offer/booking-v2/response/booking-room-status.d.ts +5 -0
  14. package/build/types/offer/booking-v2/response/booking-validity-line.d.ts +4 -0
  15. package/build/types/offer/booking-v2/response/index.d.ts +1 -0
  16. package/build/types/offer/booking-v2/shared/airline-booking-package-option.d.ts +2 -0
  17. package/build/types/offer/booking-v2/shared/airport-booking-package-option.d.ts +2 -0
  18. package/build/types/offer/booking-v2/shared/booking-airline-group.d.ts +6 -0
  19. package/build/types/offer/booking-v2/shared/booking-airport-group.d.ts +6 -0
  20. package/build/types/offer/booking-v2/shared/booking-option-pax.d.ts +6 -0
  21. package/build/types/offer/booking-v2/shared/booking-option-unit.d.ts +6 -0
  22. package/build/types/offer/booking-v2/shared/booking-package-availability.d.ts +1 -0
  23. package/build/types/offer/booking-v2/shared/booking-package-option.d.ts +7 -0
  24. package/build/types/offer/booking-v2/shared/index.d.ts +8 -4
  25. package/build/types/tide-client-config.d.ts +1 -0
  26. package/build/utils/api.d.ts +4 -4
  27. package/build/utils/common-client.d.ts +3 -2
  28. package/build/utils/web-agent-client.d.ts +13 -3
  29. package/package.json +6 -2
  30. package/src/services/odata.service.ts +14 -3
  31. package/src/types/company/agent/agent-invoice-item.ts +9 -0
  32. package/src/types/company/agent/entry-totals.ts +7 -0
  33. package/src/types/company/agent/index.ts +2 -0
  34. package/src/types/company/index.ts +1 -0
  35. package/src/types/enums/data-type.ts +1 -0
  36. package/src/types/offer/booking-v2/request/booking-package-book-request.ts +4 -0
  37. package/src/types/offer/booking-v2/request/booking-package-customer-request.ts +4 -0
  38. package/src/types/offer/booking-v2/request/index.ts +2 -1
  39. package/src/types/offer/booking-v2/shared/airline-booking-package-option.ts +3 -0
  40. package/src/types/offer/booking-v2/shared/airport-booking-package-option.ts +3 -0
  41. package/src/types/offer/booking-v2/shared/booking-airline-group.ts +7 -0
  42. package/src/types/offer/booking-v2/shared/booking-airport-group.ts +7 -0
  43. package/src/types/offer/booking-v2/shared/booking-option-pax.ts +6 -0
  44. package/src/types/offer/booking-v2/shared/booking-option-unit.ts +6 -0
  45. package/src/types/offer/booking-v2/shared/booking-package-availability.ts +1 -0
  46. package/src/types/offer/booking-v2/shared/booking-package-option.ts +7 -0
  47. package/src/types/offer/booking-v2/shared/index.ts +8 -4
  48. package/src/types/tide-client-config.ts +1 -0
  49. package/src/utils/api.ts +6 -6
  50. package/src/utils/booking-client.ts +13 -13
  51. package/src/utils/booking-v2-client.ts +14 -14
  52. package/src/utils/common-client.ts +12 -4
  53. package/src/utils/member-client.ts +5 -5
  54. package/src/utils/mollie-client.ts +1 -1
  55. package/src/utils/search-client.ts +1 -1
  56. package/src/utils/web-agent-client.ts +47 -11
  57. package/src/utils/web-client.ts +2 -2
  58. package/src/utils/web-contact-client.ts +2 -2
  59. package/src/utils/web-file.ts +1 -1
@@ -0,0 +1,9 @@
1
+ export interface AgentInvoiceItem {
2
+ id: number;
3
+ number: string;
4
+ dossierNumber: string;
5
+ type: number;
6
+ total: number;
7
+ paidTotal: number;
8
+ dateCreated: string;
9
+ }
@@ -0,0 +1,7 @@
1
+ export interface EntryTotals {
2
+ totalPrice: number;
3
+ revenue: number;
4
+ commission: number;
5
+ margin: number;
6
+ profit: number;
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./agent-invoice-item";
2
+ export * from "./entry-totals";
@@ -1,3 +1,4 @@
1
+ export * from "./agent";
1
2
  export * from "./agent-print-action";
2
3
  export * from "./agent-print-action-request";
3
4
  export * from "./custom-entry-status-item";
@@ -7,6 +7,7 @@ export declare const DataType: {
7
7
  enum: string;
8
8
  date: string;
9
9
  dateTime: string;
10
+ dateFrom: string;
10
11
  html: string;
11
12
  list: string;
12
13
  template: string;
@@ -2,6 +2,7 @@ import { BookingProductNotification } from "../response";
2
2
  import { BookingPackage } from "../shared";
3
3
  import { BookingPackagePax } from "../shared/booking-package-pax";
4
4
  import { BookingPackageAddress } from "./booking-package-address";
5
+ import { BookingPackageCustomerRequest } from "./booking-package-customer-request";
5
6
  export interface BookingPackageBookRequest {
6
7
  saleType?: number;
7
8
  status: number;
@@ -13,6 +14,9 @@ export interface BookingPackageBookRequest {
13
14
  tagIds?: number[];
14
15
  voucherCodes?: string[];
15
16
  remarks?: string;
17
+ customerRequests: BookingPackageCustomerRequest[];
18
+ travellerAddressName?: string;
19
+ agencyAddressName?: string;
16
20
  address?: BookingPackageAddress;
17
21
  pax: BookingPackagePax[];
18
22
  nonTravelPax: BookingPackagePax[];
@@ -0,0 +1,4 @@
1
+ export interface BookingPackageCustomerRequest {
2
+ title: string;
3
+ message: string;
4
+ }
@@ -1,13 +1,14 @@
1
1
  export * from "./bookable-dates-request";
2
2
  export * from "./booking-package-address";
3
3
  export * from "./booking-package-book-request";
4
+ export * from "./booking-package-customer-request";
4
5
  export * from "./booking-package-destination";
5
6
  export * from "./booking-package-details-request";
6
7
  export * from "./booking-package-flight-pool-request";
7
8
  export * from "./booking-package-request";
8
9
  export * from "./booking-package-search-request";
10
+ export * from "./booking-package-update-request";
9
11
  export * from "./booking-package-voucher-request";
10
12
  export * from "./selected-flight";
11
13
  export * from "./selected-hotel";
12
14
  export * from "./tour-codes.request";
13
- export * from "./booking-package-update-request";
@@ -1,9 +1,13 @@
1
1
  import { BookingPriceDetail } from "./booking-price-detail";
2
2
  import { BookingProductNotification } from "./booking-product-notification";
3
+ import { BookingRoomStatus } from "./booking-room-status";
4
+ import { BookingValidityLine } from "./booking-validity-line";
3
5
  import { ChangedLine } from "./changed-line";
4
6
  export interface BookingPriceDetails {
5
7
  details: BookingPriceDetail[];
6
8
  changedLines: ChangedLine[];
9
+ validityLines: BookingValidityLine[];
7
10
  notifications: BookingProductNotification[];
11
+ roomStatusses: BookingRoomStatus[];
8
12
  deposit?: number;
9
13
  }
@@ -0,0 +1,5 @@
1
+ export interface BookingRoomStatusOption {
2
+ code: string;
3
+ isLocked: boolean;
4
+ isOnRequest: boolean;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { BookingRoomStatusOption } from "./booking-room-status-option";
2
+ export interface BookingRoomStatus {
3
+ index: number;
4
+ options: BookingRoomStatusOption[];
5
+ }
@@ -0,0 +1,4 @@
1
+ export interface BookingValidityLine {
2
+ guids: string[];
3
+ isValid: boolean;
4
+ }
@@ -13,3 +13,4 @@ export * from "./booking-voucher-result";
13
13
  export * from "./changed-line";
14
14
  export * from "./tide-response";
15
15
  export * from "./tour-codes-response";
16
+ export * from "./booking-validity-line";
@@ -0,0 +1,2 @@
1
+ import { PerPackageOption } from "./per-package-option";
2
+ export interface AirlineBookingPackageOption extends PerPackageOption {}
@@ -0,0 +1,2 @@
1
+ import { PerPackageOption } from "./per-package-option";
2
+ export interface AirportBookingPackageOption extends PerPackageOption {}
@@ -0,0 +1,6 @@
1
+ import { BookingOptionGroup } from "./booking-option-group";
2
+ export interface BookingAirlineGroup<T> {
3
+ label: string;
4
+ flightIds: string[];
5
+ groups: BookingOptionGroup<T>[];
6
+ }
@@ -0,0 +1,6 @@
1
+ import { BookingOptionGroup } from "./booking-option-group";
2
+ export interface BookingAirportGroup<T> {
3
+ label: string;
4
+ flightIds: string[];
5
+ groups: BookingOptionGroup<T>[];
6
+ }
@@ -1,7 +1,13 @@
1
+ import { AirlineBookingPackageOption } from "./airline-booking-package-option";
2
+ import { AirportBookingPackageOption } from "./airport-booking-package-option";
3
+ import { BookingAirlineGroup } from "./booking-airline-group";
4
+ import { BookingAirportGroup } from "./booking-airport-group";
1
5
  import { BookingOptionGroup } from "./booking-option-group";
2
6
  import { PerPaxPackageOption } from "./per-pax-package-option";
3
7
  export interface BookingOptionPax {
4
8
  id: number;
5
9
  paxName: string;
6
10
  groups: BookingOptionGroup<PerPaxPackageOption>[];
11
+ airlineGroups: BookingAirlineGroup<AirlineBookingPackageOption>[];
12
+ airportGroups: BookingAirportGroup<AirportBookingPackageOption>[];
7
13
  }
@@ -1,6 +1,12 @@
1
+ import { AirlineBookingPackageOption } from "./airline-booking-package-option";
2
+ import { AirportBookingPackageOption } from "./airport-booking-package-option";
3
+ import { BookingAirlineGroup } from "./booking-airline-group";
4
+ import { BookingAirportGroup } from "./booking-airport-group";
1
5
  import { BookingOptionGroup } from "./booking-option-group";
2
6
  import { PerUnitPackageOption } from "./per-unit-package-option";
3
7
  export interface BookingOptionUnit {
4
8
  index: number;
5
9
  groups: BookingOptionGroup<PerUnitPackageOption>[];
10
+ airlineGroups: BookingAirlineGroup<AirlineBookingPackageOption>[];
11
+ airportGroups: BookingAirportGroup<AirportBookingPackageOption>[];
6
12
  }
@@ -4,4 +4,5 @@ export interface BookingPackageAvailability {
4
4
  fromDate: string;
5
5
  toDate: string;
6
6
  tourCode: string;
7
+ isExternal: boolean;
7
8
  }
@@ -1,3 +1,7 @@
1
+ import { AirlineBookingPackageOption } from "./airline-booking-package-option";
2
+ import { AirportBookingPackageOption } from "./airport-booking-package-option";
3
+ import { BookingAirlineGroup } from "./booking-airline-group";
4
+ import { BookingAirportGroup } from "./booking-airport-group";
1
5
  import { BookingOptionGroup } from "./booking-option-group";
2
6
  import { BookingOptionPax } from "./booking-option-pax";
3
7
  import { BookingOptionUnit } from "./booking-option-unit";
@@ -17,6 +21,7 @@ export interface BookingPackageOption {
17
21
  tagIds: number[];
18
22
  includedServiceTypes: number[];
19
23
  isOnRequest: boolean;
24
+ provider: string;
20
25
  countryName: string;
21
26
  regionName: string;
22
27
  oordName: string;
@@ -34,6 +39,8 @@ export interface BookingPackageOption {
34
39
  allotmentTagIds: number[];
35
40
  availabilities: BookingPackageAvailability[];
36
41
  rooms: BookingPackageRoom[];
42
+ airlineGroups: BookingAirlineGroup<AirlineBookingPackageOption>[];
43
+ airportGroups: BookingAirportGroup<AirportBookingPackageOption>[];
37
44
  groups: BookingOptionGroup<PerBookingPackageOption>[];
38
45
  optionUnits: BookingOptionUnit[];
39
46
  optionPax: BookingOptionPax[];
@@ -1,18 +1,22 @@
1
+ export * from "./airline-booking-package-option";
2
+ export * from "./airport-booking-package-option";
3
+ export * from "./booking-airline-group";
4
+ export * from "./booking-airport-group";
1
5
  export * from "./booking-option-group";
2
6
  export * from "./booking-option-pax";
3
7
  export * from "./booking-option-unit";
8
+ export * from "./booking-package";
9
+ export * from "./booking-package-flight";
4
10
  export * from "./booking-package-flight-meta-data";
5
11
  export * from "./booking-package-flight-meta-data-line";
6
- export * from "./booking-package-flight";
12
+ export * from "./booking-package-hotel";
7
13
  export * from "./booking-package-hotel-option";
8
14
  export * from "./booking-package-hotel-room";
9
- export * from "./booking-package-hotel";
10
15
  export * from "./booking-package-line";
11
16
  export * from "./booking-package-pax";
12
17
  export * from "./booking-package-request-room";
13
- export * from "./booking-package-room-option";
14
18
  export * from "./booking-package-room";
15
- export * from "./booking-package";
19
+ export * from "./booking-package-room-option";
16
20
  export * from "./per-booking-package-option";
17
21
  export * from "./per-package-option";
18
22
  export * from "./per-pax-package-option";
@@ -1,4 +1,5 @@
1
1
  export interface TideClientConfig {
2
2
  host: string;
3
3
  apiKey: string;
4
+ token?: string;
4
5
  }
@@ -2,13 +2,13 @@ export declare const post: (
2
2
  url: string,
3
3
  apiKey: string,
4
4
  body: string,
5
+ token?: string | undefined,
5
6
  signal?: AbortSignal | undefined,
6
- languageCode?: string | undefined,
7
- token?: string | undefined
7
+ languageCode?: string | undefined
8
8
  ) => Promise<Response>;
9
9
  export declare const get: (
10
10
  url: string,
11
11
  apiKey: string,
12
- signal?: AbortSignal | undefined,
13
- token?: string | undefined
12
+ token?: string | undefined,
13
+ signal?: AbortSignal | undefined
14
14
  ) => Promise<Response>;
@@ -2,6 +2,7 @@ export declare const post: <T>(
2
2
  url: string,
3
3
  apiKey: string,
4
4
  body: string,
5
+ token?: string | undefined,
5
6
  signal?: AbortSignal | undefined,
6
7
  skipReviver?: boolean | undefined,
7
8
  languageCode?: string | undefined
@@ -9,7 +10,7 @@ export declare const post: <T>(
9
10
  export declare const get: <T>(
10
11
  url: string,
11
12
  apiKey: string,
13
+ token?: string | undefined,
12
14
  signal?: AbortSignal | undefined,
13
- skipReviver?: boolean | undefined,
14
- token?: string | undefined
15
+ skipReviver?: boolean | undefined
15
16
  ) => Promise<T>;
@@ -1,8 +1,10 @@
1
1
  import {
2
+ AgentInvoiceItem,
2
3
  AgentPrintAction,
3
4
  AgentPrintActionRequest,
4
5
  CustomEntryStatusItem,
5
6
  DossierViewResult,
7
+ EntryTotals,
6
8
  FilterItem,
7
9
  NumberStringPair,
8
10
  PageResult,
@@ -31,15 +33,23 @@ export declare const getPrintActions: (
31
33
  export declare const print: (
32
34
  config: TideClientConfig,
33
35
  request: AgentPrintActionRequest,
34
- signal?: AbortSignal | undefined,
35
- token?: string | undefined
36
+ signal?: AbortSignal | undefined
36
37
  ) => Promise<Response>;
37
38
  export declare const getEntryList: (
38
39
  config: TideClientConfig,
39
40
  filterItem: FilterItem,
40
- token?: string | undefined,
41
41
  signal?: AbortSignal | undefined
42
42
  ) => Promise<PageResult<DossierViewResult>>;
43
+ export declare const getEntryTotals: (
44
+ config: TideClientConfig,
45
+ filterItem: FilterItem,
46
+ signal?: AbortSignal | undefined
47
+ ) => Promise<EntryTotals>;
48
+ export declare const getInvoiceList: (
49
+ config: TideClientConfig,
50
+ filterItem: FilterItem,
51
+ signal?: AbortSignal | undefined
52
+ ) => Promise<PageResult<AgentInvoiceItem>>;
43
53
  export declare const getCustomEntryStatus: (
44
54
  config: TideClientConfig,
45
55
  signal?: AbortSignal | undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "1.1.30",
3
+ "version": "1.1.32",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -18,7 +18,11 @@
18
18
  "tide",
19
19
  "client"
20
20
  ],
21
- "author": "Kristof Colpaert <kristof.colpaert@qite.be>",
21
+ "maintainers": [
22
+ "Loris Decoster <loris@qite.be>",
23
+ "Bram De Cuyper <bram.de.cuyper@qite.be>",
24
+ "Maarten Brysbaert <maarten.brysbaert@qite.be>"
25
+ ],
22
26
  "license": "OBSD",
23
27
  "homepage": "https://bitbucket.org/qitegeneral/tide-client#readme",
24
28
  "devDependencies": {
@@ -91,7 +91,7 @@ const getColumnFilter = (
91
91
 
92
92
  case DataType.date:
93
93
  case DataType.dateTime:
94
- const fromDate = new Date(
94
+ const startDate = new Date(
95
95
  columnValue.year,
96
96
  columnValue.month - 1,
97
97
  columnValue.day
@@ -102,8 +102,19 @@ const getColumnFilter = (
102
102
  columnValue.day + 1
103
103
  );
104
104
 
105
- if (isValidDate(fromDate) && isValidDate(tillDate)) {
106
- return `${columnName} ge ${fromDate.toISOString()} and ${columnName} le ${tillDate.toISOString()}`;
105
+ if (isValidDate(startDate) && isValidDate(tillDate)) {
106
+ return `${columnName} ge ${startDate.toISOString()} and ${columnName} le ${tillDate.toISOString()}`;
107
+ }
108
+ return "";
109
+ case DataType.dateFrom:
110
+ const fromDate = new Date(
111
+ columnValue.year,
112
+ columnValue.month - 1,
113
+ columnValue.day
114
+ );
115
+
116
+ if (isValidDate(fromDate)) {
117
+ return `${columnName} ge ${fromDate.toISOString()}`;
107
118
  }
108
119
  return "";
109
120
  case DataType.list:
@@ -0,0 +1,9 @@
1
+ export interface AgentInvoiceItem {
2
+ id: number;
3
+ number: string;
4
+ dossierNumber: string;
5
+ type: number;
6
+ total: number;
7
+ paidTotal: number;
8
+ dateCreated: string;
9
+ }
@@ -0,0 +1,7 @@
1
+ export interface EntryTotals {
2
+ totalPrice: number;
3
+ revenue: number;
4
+ commission: number;
5
+ margin: number;
6
+ profit: number;
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./agent-invoice-item";
2
+ export * from "./entry-totals";
@@ -1,3 +1,4 @@
1
+ export * from "./agent";
1
2
  export * from "./agent-print-action";
2
3
  export * from "./agent-print-action-request";
3
4
  export * from "./custom-entry-status-item";
@@ -7,6 +7,7 @@ export const DataType = {
7
7
  enum: "enum",
8
8
  date: "date",
9
9
  dateTime: "datetime",
10
+ dateFrom: "dateFrom",
10
11
  html: "html",
11
12
  list: "list",
12
13
  template: "template",
@@ -2,6 +2,7 @@ import { BookingProductNotification } from "../response";
2
2
  import { BookingPackage } from "../shared";
3
3
  import { BookingPackagePax } from "../shared/booking-package-pax";
4
4
  import { BookingPackageAddress } from "./booking-package-address";
5
+ import { BookingPackageCustomerRequest } from "./booking-package-customer-request";
5
6
 
6
7
  export interface BookingPackageBookRequest {
7
8
  saleType?: number;
@@ -14,7 +15,10 @@ export interface BookingPackageBookRequest {
14
15
  tagIds?: number[];
15
16
  voucherCodes?: string[];
16
17
  remarks?: string;
18
+ customerRequests: BookingPackageCustomerRequest[];
17
19
 
20
+ travellerAddressName?: string;
21
+ agencyAddressName?: string;
18
22
  address?: BookingPackageAddress;
19
23
  pax: BookingPackagePax[];
20
24
  nonTravelPax: BookingPackagePax[];
@@ -0,0 +1,4 @@
1
+ export interface BookingPackageCustomerRequest {
2
+ title: string;
3
+ message: string;
4
+ }
@@ -1,13 +1,14 @@
1
1
  export * from "./bookable-dates-request";
2
2
  export * from "./booking-package-address";
3
3
  export * from "./booking-package-book-request";
4
+ export * from "./booking-package-customer-request";
4
5
  export * from "./booking-package-destination";
5
6
  export * from "./booking-package-details-request";
6
7
  export * from "./booking-package-flight-pool-request";
7
8
  export * from "./booking-package-request";
8
9
  export * from "./booking-package-search-request";
10
+ export * from "./booking-package-update-request";
9
11
  export * from "./booking-package-voucher-request";
10
12
  export * from "./selected-flight";
11
13
  export * from "./selected-hotel";
12
14
  export * from "./tour-codes.request";
13
- export * from "./booking-package-update-request";
@@ -0,0 +1,3 @@
1
+ import { PerPackageOption } from "./per-package-option";
2
+
3
+ export interface AirlineBookingPackageOption extends PerPackageOption {}
@@ -0,0 +1,3 @@
1
+ import { PerPackageOption } from "./per-package-option";
2
+
3
+ export interface AirportBookingPackageOption extends PerPackageOption {}
@@ -0,0 +1,7 @@
1
+ import { BookingOptionGroup } from "./booking-option-group";
2
+
3
+ export interface BookingAirlineGroup<T> {
4
+ label: string;
5
+ flightIds: string[];
6
+ groups: BookingOptionGroup<T>[];
7
+ }
@@ -0,0 +1,7 @@
1
+ import { BookingOptionGroup } from "./booking-option-group";
2
+
3
+ export interface BookingAirportGroup<T> {
4
+ label: string;
5
+ flightIds: string[];
6
+ groups: BookingOptionGroup<T>[];
7
+ }
@@ -1,3 +1,7 @@
1
+ import { AirlineBookingPackageOption } from "./airline-booking-package-option";
2
+ import { AirportBookingPackageOption } from "./airport-booking-package-option";
3
+ import { BookingAirlineGroup } from "./booking-airline-group";
4
+ import { BookingAirportGroup } from "./booking-airport-group";
1
5
  import { BookingOptionGroup } from "./booking-option-group";
2
6
  import { PerPaxPackageOption } from "./per-pax-package-option";
3
7
 
@@ -5,4 +9,6 @@ export interface BookingOptionPax {
5
9
  id: number;
6
10
  paxName: string;
7
11
  groups: BookingOptionGroup<PerPaxPackageOption>[];
12
+ airlineGroups: BookingAirlineGroup<AirlineBookingPackageOption>[];
13
+ airportGroups: BookingAirportGroup<AirportBookingPackageOption>[];
8
14
  }
@@ -1,7 +1,13 @@
1
+ import { AirlineBookingPackageOption } from "./airline-booking-package-option";
2
+ import { AirportBookingPackageOption } from "./airport-booking-package-option";
3
+ import { BookingAirlineGroup } from "./booking-airline-group";
4
+ import { BookingAirportGroup } from "./booking-airport-group";
1
5
  import { BookingOptionGroup } from "./booking-option-group";
2
6
  import { PerUnitPackageOption } from "./per-unit-package-option";
3
7
 
4
8
  export interface BookingOptionUnit {
5
9
  index: number;
6
10
  groups: BookingOptionGroup<PerUnitPackageOption>[];
11
+ airlineGroups: BookingAirlineGroup<AirlineBookingPackageOption>[];
12
+ airportGroups: BookingAirportGroup<AirportBookingPackageOption>[];
7
13
  }
@@ -4,4 +4,5 @@ export interface BookingPackageAvailability {
4
4
  fromDate: string;
5
5
  toDate: string;
6
6
  tourCode: string;
7
+ isExternal: boolean;
7
8
  }
@@ -1,3 +1,7 @@
1
+ import { AirlineBookingPackageOption } from "./airline-booking-package-option";
2
+ import { AirportBookingPackageOption } from "./airport-booking-package-option";
3
+ import { BookingAirlineGroup } from "./booking-airline-group";
4
+ import { BookingAirportGroup } from "./booking-airport-group";
1
5
  import { BookingOptionGroup } from "./booking-option-group";
2
6
  import { BookingOptionPax } from "./booking-option-pax";
3
7
  import { BookingOptionUnit } from "./booking-option-unit";
@@ -19,6 +23,7 @@ export interface BookingPackageOption {
19
23
  tagIds: number[];
20
24
  includedServiceTypes: number[];
21
25
  isOnRequest: boolean;
26
+ provider: string;
22
27
 
23
28
  countryName: string;
24
29
  regionName: string;
@@ -42,6 +47,8 @@ export interface BookingPackageOption {
42
47
 
43
48
  availabilities: BookingPackageAvailability[];
44
49
  rooms: BookingPackageRoom[];
50
+ airlineGroups: BookingAirlineGroup<AirlineBookingPackageOption>[];
51
+ airportGroups: BookingAirportGroup<AirportBookingPackageOption>[];
45
52
  groups: BookingOptionGroup<PerBookingPackageOption>[];
46
53
  optionUnits: BookingOptionUnit[];
47
54
  optionPax: BookingOptionPax[];
@@ -1,18 +1,22 @@
1
+ export * from "./airline-booking-package-option";
2
+ export * from "./airport-booking-package-option";
3
+ export * from "./booking-airline-group";
4
+ export * from "./booking-airport-group";
1
5
  export * from "./booking-option-group";
2
6
  export * from "./booking-option-pax";
3
7
  export * from "./booking-option-unit";
8
+ export * from "./booking-package";
9
+ export * from "./booking-package-flight";
4
10
  export * from "./booking-package-flight-meta-data";
5
11
  export * from "./booking-package-flight-meta-data-line";
6
- export * from "./booking-package-flight";
12
+ export * from "./booking-package-hotel";
7
13
  export * from "./booking-package-hotel-option";
8
14
  export * from "./booking-package-hotel-room";
9
- export * from "./booking-package-hotel";
10
15
  export * from "./booking-package-line";
11
16
  export * from "./booking-package-pax";
12
17
  export * from "./booking-package-request-room";
13
- export * from "./booking-package-room-option";
14
18
  export * from "./booking-package-room";
15
- export * from "./booking-package";
19
+ export * from "./booking-package-room-option";
16
20
  export * from "./per-booking-package-option";
17
21
  export * from "./per-package-option";
18
22
  export * from "./per-pax-package-option";
@@ -1,4 +1,5 @@
1
1
  export interface TideClientConfig {
2
2
  host: string;
3
3
  apiKey: string;
4
+ token?: string;
4
5
  }
package/src/utils/api.ts CHANGED
@@ -2,9 +2,9 @@ export const post = async (
2
2
  url: string,
3
3
  apiKey: string,
4
4
  body: string,
5
+ token?: string,
5
6
  signal?: AbortSignal,
6
- languageCode?: string,
7
- token?: string
7
+ languageCode?: string
8
8
  ): Promise<Response> => {
9
9
  const response = await fetch(url, {
10
10
  method: "POST",
@@ -12,7 +12,7 @@ export const post = async (
12
12
  "Content-Type": "application/json",
13
13
  "Api-Key": apiKey,
14
14
  Language: languageCode || "nl-BE",
15
- Authorization: !token ? `Bearer ${token}` : "",
15
+ Authorization: token ? `Bearer ${token}` : "",
16
16
  },
17
17
  credentials: "include",
18
18
  body,
@@ -29,15 +29,15 @@ export const post = async (
29
29
  export const get = async (
30
30
  url: string,
31
31
  apiKey: string,
32
- signal?: AbortSignal,
33
- token?: string
32
+ token?: string,
33
+ signal?: AbortSignal
34
34
  ): Promise<Response> => {
35
35
  const response = await fetch(url, {
36
36
  method: "GET",
37
37
  headers: {
38
38
  "Content-Type": "application/json",
39
39
  "Api-Key": apiKey,
40
- Authorization: !token ? `Bearer ${token}` : "",
40
+ Authorization: token ? `Bearer ${token}` : "",
41
41
  },
42
42
  credentials: "include",
43
43
  signal,