@hyper.software/visitor-integrations-client 1.2.37 → 1.2.38

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.
Binary file
package/.yarnrc.yml CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,6 @@
1
1
  import { PAYMENT_METHOD, ROOM_TYPE_BREAKFAST_INFORMATION_TYPE } from '@hyper.software/common-models/lib/interfaces';
2
2
  import { BOOKING_SOURCE } from '@hyper.software/visitor-main-api-client';
3
+ import { ChannelManagerType } from '.';
3
4
  export interface IInboundBooking {
4
5
  data: {
5
6
  account_id: string;
@@ -10,9 +11,18 @@ export interface IInboundBooking {
10
11
  export interface IAcceptRejectBooking {
11
12
  channelId?: string;
12
13
  code?: string;
14
+ channelType?: ChannelManagerType;
15
+ revisionId?: string;
16
+ }
17
+ export declare enum EXTERNAL_BOOKING_STATUS {
18
+ CREATED = "CREATED",
19
+ NEW = "NEW",
20
+ MODIFIED = "MODIFIED",
21
+ CANCELED = "CANCELED",
22
+ CANCELLED = "CANCELLED"
13
23
  }
14
24
  export interface IExternalBooking {
15
- status?: 'CREATED' | 'CANCELED';
25
+ status?: EXTERNAL_BOOKING_STATUS | null;
16
26
  companyId: string;
17
27
  code: string;
18
28
  roomTypeId: string;
@@ -23,25 +33,54 @@ export interface IExternalBooking {
23
33
  lastName: string;
24
34
  email: string;
25
35
  phoneNumber?: string;
36
+ address?: string;
37
+ city?: string;
38
+ country?: string;
39
+ postalCode?: string;
40
+ companyName?: string;
26
41
  numberOfAdults?: number;
27
42
  numberOfChildren?: number;
28
43
  numberOfRooms?: number;
29
44
  isFetched?: boolean;
30
45
  bookingSource: BOOKING_SOURCE;
31
- extra: {
32
- details?: string;
33
- isPaid?: boolean;
34
- otaComission?: number;
35
- otaBookingId?: string;
36
- arrivalTime?: string;
37
- breakfastType?: ROOM_TYPE_BREAKFAST_INFORMATION_TYPE;
38
- breakfastIncluded?: boolean;
39
- breakfastCost?: number;
40
- excludedFees?: number;
41
- childrenAges?: Array<{
42
- age: number | null | undefined;
43
- }>;
44
- paymentMethod?: PAYMENT_METHOD;
45
- };
46
+ channelType?: ChannelManagerType;
47
+ extra: IBookingExtra;
46
48
  isSynced?: boolean;
47
49
  }
50
+ export interface IBookingExtra {
51
+ isPaid?: boolean;
52
+ otaComission?: number;
53
+ arrivalTime?: string;
54
+ details?: string;
55
+ otaBookingId?: string;
56
+ childrenAges?: Array<{
57
+ age: number | null | undefined;
58
+ }>;
59
+ paymentMethod?: PAYMENT_METHOD;
60
+ currency?: string;
61
+ excludedFees?: number;
62
+ breakfastType?: ROOM_TYPE_BREAKFAST_INFORMATION_TYPE;
63
+ breakfastIncluded?: boolean;
64
+ breakfastCost?: number;
65
+ revisionId?: string;
66
+ insertedAt?: string;
67
+ isModification?: boolean;
68
+ originalBookingId?: string;
69
+ dailyRates?: Array<{
70
+ date: string;
71
+ rate: number;
72
+ currency: string;
73
+ }>;
74
+ mealPlan?: string;
75
+ policies?: {
76
+ cancellation?: string;
77
+ guarantee?: string;
78
+ };
79
+ guarantee?: {
80
+ cardNumber?: string;
81
+ cardType?: string;
82
+ cardholderName?: string;
83
+ expirationDate?: string;
84
+ isVirtual?: boolean;
85
+ };
86
+ }
@@ -1,3 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EXTERNAL_BOOKING_STATUS = void 0;
4
+ var EXTERNAL_BOOKING_STATUS;
5
+ (function (EXTERNAL_BOOKING_STATUS) {
6
+ EXTERNAL_BOOKING_STATUS["CREATED"] = "CREATED";
7
+ EXTERNAL_BOOKING_STATUS["NEW"] = "NEW";
8
+ EXTERNAL_BOOKING_STATUS["MODIFIED"] = "MODIFIED";
9
+ EXTERNAL_BOOKING_STATUS["CANCELED"] = "CANCELED";
10
+ EXTERNAL_BOOKING_STATUS["CANCELLED"] = "CANCELLED"; // This is for channex
11
+ })(EXTERNAL_BOOKING_STATUS || (exports.EXTERNAL_BOOKING_STATUS = EXTERNAL_BOOKING_STATUS = {}));
3
12
  //# sourceMappingURL=bookings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bookings.js","sourceRoot":"","sources":["../../../../src/interfaces/bookings.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"bookings.js","sourceRoot":"","sources":["../../../../src/interfaces/bookings.ts"],"names":[],"mappings":";;;AAoBA,IAAY,uBAMX;AAND,WAAY,uBAAuB;IACjC,8CAAmB,CAAA;IACnB,sCAAW,CAAA;IACX,gDAAqB,CAAA;IACrB,gDAAqB,CAAA;IACrB,kDAAuB,CAAA,CAAC,sBAAsB;AAChD,CAAC,EANW,uBAAuB,uCAAvB,uBAAuB,QAMlC"}
@@ -13,3 +13,15 @@ export interface ISyncChannelData {
13
13
  otaPlanId: string;
14
14
  }[];
15
15
  }
16
+ export interface ITestConnection {
17
+ channel: string;
18
+ settings: {
19
+ hotel_id: string;
20
+ };
21
+ }
22
+ export interface IGetMappingDetails {
23
+ channel: string;
24
+ settings: {
25
+ hotel_id: string;
26
+ };
27
+ }
File without changes
File without changes
@@ -50,7 +50,7 @@ export interface ICompany extends ITimestamps {
50
50
  currency?: CURRENCY;
51
51
  email?: string;
52
52
  integrations?: {
53
- channelManagerType?: 'BNOVO' | 'CHANNEX';
53
+ channelManagerType?: ChannelManagerType;
54
54
  bnovo?: {
55
55
  id?: string;
56
56
  isEnabled?: boolean;
@@ -76,7 +76,7 @@ export interface IRoomType extends ITimestamps {
76
76
  integrations?: IRoomTypeIntegrations;
77
77
  }
78
78
  export interface IRoomTypeIntegrations {
79
- channelManagerType?: 'BNOVO' | 'CHANNEX';
79
+ channelManagerType?: ChannelManagerType;
80
80
  bnovo?: {
81
81
  id?: string;
82
82
  isEnabled?: boolean;
@@ -103,7 +103,7 @@ export type IUpdatePricingPayload = {
103
103
  };
104
104
  };
105
105
  integrations?: {
106
- channelManagerType?: 'BNOVO' | 'CHANNEX';
106
+ channelManagerType?: ChannelManagerType;
107
107
  channex?: {
108
108
  id?: string;
109
109
  };
@@ -148,15 +148,21 @@ export interface IFile {
148
148
  type?: string;
149
149
  name?: string;
150
150
  }
151
+ export type ChannelManagerType = 'BNOVO' | 'CHANNEX';
151
152
  export interface IChannel {
152
153
  id?: string;
153
154
  type?: CHANNEL_TYPE;
154
155
  credentials?: any;
155
156
  integrations?: {
157
+ channelManagerType?: ChannelManagerType;
156
158
  bnovo?: {
157
159
  id?: string;
158
160
  isEnabled?: boolean;
159
161
  };
162
+ channex?: {
163
+ id?: string;
164
+ isEnabled?: boolean;
165
+ };
160
166
  };
161
167
  }
162
168
  export interface IInboundMappedChannel extends IChannel {
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAGA,2EAAkF;AAAzE,sGAAA,QAAQ,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAuJ3B,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AA+ED,6CAA2B;AAC3B,6CAA2B;AAC3B,+EAA6D"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAGA,2EAAkF;AAAzE,sGAAA,QAAQ,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAuJ3B,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAsFD,6CAA2B;AAC3B,6CAA2B;AAC3B,+EAA6D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyper.software/visitor-integrations-client",
3
- "version": "1.2.37",
3
+ "version": "1.2.38",
4
4
  "main": "./lib/client/src/index.js",
5
5
  "types": "./lib/client/src/index.d.ts",
6
6
  "author": "Raul Tomescu <tomescu.raul+hyper@gmail.com>",
package/src/config.ts CHANGED
File without changes
package/src/index.ts CHANGED
File without changes
package/src/interfaces.ts CHANGED
File without changes
File without changes
package/src/service.ts CHANGED
File without changes