whitelabel-db 1.0.41 → 1.0.43

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.
@@ -11,6 +11,7 @@ export interface HotelsRequestV3 {
11
11
  checkout: string;
12
12
  currency: string;
13
13
  guestNationality: string;
14
+ rm?: boolean;
14
15
  }
15
16
  export interface AvailabilityResultV3 {
16
17
  hotelId: string;
@@ -43,9 +43,10 @@ class LiteApiClientV3 {
43
43
  }
44
44
  getHotelsFullRate(options) {
45
45
  return __awaiter(this, void 0, void 0, function* () {
46
+ const query = options.rm ? `rm=${options.rm}` : ``;
46
47
  return (yield (0, axios_1.default)({
47
48
  method: 'post',
48
- url: `${baseUrl}/v3.0/hotels/rates`,
49
+ url: `${baseUrl}/v3.0/hotels/rates?${query}`,
49
50
  data: options,
50
51
  headers: {
51
52
  'X-API-Key': this.apiKey,
@@ -1,5 +1,6 @@
1
1
  import { Model } from 'sequelize-typescript';
2
2
  import { Project } from './Project';
3
+ import { OccupancyV3 } from '../libs/liteapiv3';
3
4
  export declare class Booking extends Model<Partial<Booking>> {
4
5
  id: string;
5
6
  prebookId: string;
@@ -13,4 +14,5 @@ export declare class Booking extends Model<Partial<Booking>> {
13
14
  paymentStatus?: string;
14
15
  bookingStatus?: string;
15
16
  liteApiVersion?: string;
17
+ occupancies?: OccupancyV3[];
16
18
  }
@@ -111,6 +111,14 @@ __decorate([
111
111
  }),
112
112
  __metadata("design:type", String)
113
113
  ], Booking.prototype, "liteApiVersion", void 0);
114
+ __decorate([
115
+ (0, sequelize_typescript_1.Column)({
116
+ type: sequelize_typescript_1.DataType.ARRAY(sequelize_typescript_1.DataType.JSONB),
117
+ allowNull: false,
118
+ defaultValue: [],
119
+ }),
120
+ __metadata("design:type", Array)
121
+ ], Booking.prototype, "occupancies", void 0);
114
122
  exports.Booking = Booking = __decorate([
115
123
  (0, sequelize_typescript_1.Table)({
116
124
  tableName: 'bookings',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whitelabel-db",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",