whitelabel-db 1.1.39 → 1.1.40
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.
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -3
- package/dist/libs/database.js +0 -2
- package/dist/models/Referral.d.ts +4 -3
- package/dist/models/Referral.js +14 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export { HotelTranslation } from './models/HotelTranslation';
|
|
|
11
11
|
export { Guest } from './models/Guest';
|
|
12
12
|
export { HotelAccessibility } from './models/HotelAccessibility';
|
|
13
13
|
export { Referral } from './models/Referral';
|
|
14
|
-
export { Voucher } from './models/Voucher';
|
|
15
14
|
export { LiteApiClient, HotelsRequest, AvailabilityResult, FullRateAvailabilityResult, RoomType, Rate, PrebookRateRequest, PrebookRate, CheckoutRequest, BookingInfo, CancelBooking, } from './libs/liteapi';
|
|
16
15
|
export { LiteApiClientV3, HotelsRequestV3, AvailabilityResultV3, FullRateAvailabilityResultV3, RoomTypeV3, RateV3, PrebookRateRequestV3, PrebookRateV3, CheckoutRequestV3, BookingInfoV3, CancelBookingV3, BookedRoomV3, OccupancyV3, GuestV3, GuestBookingV3, VoucherRequest, VoucherResponse, EsimplyPackage, Addon, AddonResponse, } from './libs/liteapiv3';
|
|
17
16
|
export { LiteApiUser, LiteApiUserRequest } from './libs/liteapiuser';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LiteApiUser = exports.LiteApiClientV3 = exports.LiteApiClient = exports.
|
|
3
|
+
exports.LiteApiUser = exports.LiteApiClientV3 = exports.LiteApiClient = exports.Referral = exports.HotelAccessibility = exports.Guest = exports.HotelTranslation = exports.Role = exports.Booking = exports.Project = exports.User = exports.Hotel = exports.Country = exports.City = exports.Agency = exports.connect = void 0;
|
|
4
4
|
var database_1 = require("./libs/database");
|
|
5
5
|
Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return database_1.connect; } });
|
|
6
6
|
var Agency_1 = require("./models/Agency");
|
|
@@ -27,8 +27,6 @@ var HotelAccessibility_1 = require("./models/HotelAccessibility");
|
|
|
27
27
|
Object.defineProperty(exports, "HotelAccessibility", { enumerable: true, get: function () { return HotelAccessibility_1.HotelAccessibility; } });
|
|
28
28
|
var Referral_1 = require("./models/Referral");
|
|
29
29
|
Object.defineProperty(exports, "Referral", { enumerable: true, get: function () { return Referral_1.Referral; } });
|
|
30
|
-
var Voucher_1 = require("./models/Voucher");
|
|
31
|
-
Object.defineProperty(exports, "Voucher", { enumerable: true, get: function () { return Voucher_1.Voucher; } });
|
|
32
30
|
var liteapi_1 = require("./libs/liteapi");
|
|
33
31
|
Object.defineProperty(exports, "LiteApiClient", { enumerable: true, get: function () { return liteapi_1.LiteApiClient; } });
|
|
34
32
|
var liteapiv3_1 = require("./libs/liteapiv3");
|
package/dist/libs/database.js
CHANGED
|
@@ -23,7 +23,6 @@ const HotelTranslation_1 = require("../models/HotelTranslation");
|
|
|
23
23
|
const Guest_1 = require("../models/Guest");
|
|
24
24
|
const HotelAccessibility_1 = require("../models/HotelAccessibility");
|
|
25
25
|
const Referral_1 = require("../models/Referral");
|
|
26
|
-
const Voucher_1 = require("../models/Voucher");
|
|
27
26
|
const connect = (connectionDetails) => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
27
|
const connection = new sequelize_typescript_1.Sequelize({
|
|
29
28
|
dialect: 'postgres',
|
|
@@ -45,7 +44,6 @@ const connect = (connectionDetails) => __awaiter(void 0, void 0, void 0, functio
|
|
|
45
44
|
Guest_1.Guest,
|
|
46
45
|
HotelAccessibility_1.HotelAccessibility,
|
|
47
46
|
Referral_1.Referral,
|
|
48
|
-
Voucher_1.Voucher,
|
|
49
47
|
],
|
|
50
48
|
});
|
|
51
49
|
return connection
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
2
|
import { Guest } from './Guest';
|
|
3
|
-
import {
|
|
3
|
+
import { Booking } from './Booking';
|
|
4
4
|
export declare class Referral extends Model<Partial<Referral>> {
|
|
5
5
|
id: string;
|
|
6
6
|
referrerGuestId: string;
|
|
@@ -11,6 +11,7 @@ export declare class Referral extends Model<Partial<Referral>> {
|
|
|
11
11
|
createdAt: Date;
|
|
12
12
|
updatedAt: Date;
|
|
13
13
|
referredTemporaryId: string;
|
|
14
|
-
referrerVoucherId:
|
|
15
|
-
|
|
14
|
+
referrerVoucherId: number;
|
|
15
|
+
bookingId?: string;
|
|
16
|
+
booking?: Booking;
|
|
16
17
|
}
|
package/dist/models/Referral.js
CHANGED
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.Referral = void 0;
|
|
13
13
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
14
|
const Guest_1 = require("./Guest");
|
|
15
|
-
const
|
|
15
|
+
const Booking_1 = require("./Booking");
|
|
16
16
|
let Referral = class Referral extends sequelize_typescript_1.Model {
|
|
17
17
|
};
|
|
18
18
|
exports.Referral = Referral;
|
|
@@ -84,18 +84,26 @@ __decorate([
|
|
|
84
84
|
__metadata("design:type", String)
|
|
85
85
|
], Referral.prototype, "referredTemporaryId", void 0);
|
|
86
86
|
__decorate([
|
|
87
|
-
|
|
87
|
+
sequelize_typescript_1.Unique,
|
|
88
|
+
(0, sequelize_typescript_1.Column)({
|
|
89
|
+
type: sequelize_typescript_1.DataType.INTEGER,
|
|
90
|
+
allowNull: true,
|
|
91
|
+
}),
|
|
92
|
+
__metadata("design:type", Number)
|
|
93
|
+
], Referral.prototype, "referrerVoucherId", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, sequelize_typescript_1.ForeignKey)(() => Booking_1.Booking),
|
|
88
96
|
sequelize_typescript_1.Unique,
|
|
89
97
|
(0, sequelize_typescript_1.Column)({
|
|
90
98
|
type: sequelize_typescript_1.DataType.UUID,
|
|
91
99
|
allowNull: true,
|
|
92
100
|
}),
|
|
93
101
|
__metadata("design:type", String)
|
|
94
|
-
], Referral.prototype, "
|
|
102
|
+
], Referral.prototype, "bookingId", void 0);
|
|
95
103
|
__decorate([
|
|
96
|
-
(0, sequelize_typescript_1.BelongsTo)(() =>
|
|
97
|
-
__metadata("design:type",
|
|
98
|
-
], Referral.prototype, "
|
|
104
|
+
(0, sequelize_typescript_1.BelongsTo)(() => Booking_1.Booking),
|
|
105
|
+
__metadata("design:type", Booking_1.Booking)
|
|
106
|
+
], Referral.prototype, "booking", void 0);
|
|
99
107
|
exports.Referral = Referral = __decorate([
|
|
100
108
|
(0, sequelize_typescript_1.Table)({
|
|
101
109
|
tableName: 'referrals',
|