whitelabel-db 1.1.36 → 1.1.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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/libs/database.js +2 -0
- package/dist/libs/liteapiv3.d.ts +7 -7
- package/dist/models/Hotel.d.ts +3 -3
- package/dist/models/Referral.d.ts +12 -0
- package/dist/models/Referral.js +81 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { Role } from './models/Role';
|
|
|
10
10
|
export { HotelTranslation } from './models/HotelTranslation';
|
|
11
11
|
export { Guest } from './models/Guest';
|
|
12
12
|
export { HotelAccessibility } from './models/HotelAccessibility';
|
|
13
|
+
export { Referral } from './models/Referral';
|
|
13
14
|
export { LiteApiClient, HotelsRequest, AvailabilityResult, FullRateAvailabilityResult, RoomType, Rate, PrebookRateRequest, PrebookRate, CheckoutRequest, BookingInfo, CancelBooking, } from './libs/liteapi';
|
|
14
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';
|
|
15
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.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;
|
|
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");
|
|
@@ -25,6 +25,8 @@ var Guest_1 = require("./models/Guest");
|
|
|
25
25
|
Object.defineProperty(exports, "Guest", { enumerable: true, get: function () { return Guest_1.Guest; } });
|
|
26
26
|
var HotelAccessibility_1 = require("./models/HotelAccessibility");
|
|
27
27
|
Object.defineProperty(exports, "HotelAccessibility", { enumerable: true, get: function () { return HotelAccessibility_1.HotelAccessibility; } });
|
|
28
|
+
var Referral_1 = require("./models/Referral");
|
|
29
|
+
Object.defineProperty(exports, "Referral", { enumerable: true, get: function () { return Referral_1.Referral; } });
|
|
28
30
|
var liteapi_1 = require("./libs/liteapi");
|
|
29
31
|
Object.defineProperty(exports, "LiteApiClient", { enumerable: true, get: function () { return liteapi_1.LiteApiClient; } });
|
|
30
32
|
var liteapiv3_1 = require("./libs/liteapiv3");
|
package/dist/libs/database.js
CHANGED
|
@@ -22,6 +22,7 @@ const Role_1 = require("../models/Role");
|
|
|
22
22
|
const HotelTranslation_1 = require("../models/HotelTranslation");
|
|
23
23
|
const Guest_1 = require("../models/Guest");
|
|
24
24
|
const HotelAccessibility_1 = require("../models/HotelAccessibility");
|
|
25
|
+
const Referral_1 = require("../models/Referral");
|
|
25
26
|
const connect = (connectionDetails) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
27
|
const connection = new sequelize_typescript_1.Sequelize({
|
|
27
28
|
dialect: 'postgres',
|
|
@@ -42,6 +43,7 @@ const connect = (connectionDetails) => __awaiter(void 0, void 0, void 0, functio
|
|
|
42
43
|
HotelTranslation_1.HotelTranslation,
|
|
43
44
|
Guest_1.Guest,
|
|
44
45
|
HotelAccessibility_1.HotelAccessibility,
|
|
46
|
+
Referral_1.Referral,
|
|
45
47
|
],
|
|
46
48
|
});
|
|
47
49
|
return connection
|
package/dist/libs/liteapiv3.d.ts
CHANGED
|
@@ -233,13 +233,13 @@ export interface BookingInfoV3 {
|
|
|
233
233
|
}
|
|
234
234
|
export interface AddonResponse {
|
|
235
235
|
addon: string;
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
originalValue: number;
|
|
237
|
+
originalCurrency: string;
|
|
238
|
+
addonVoucherCode: string;
|
|
239
|
+
addonVoucherId: number;
|
|
240
240
|
value: number;
|
|
241
241
|
currency: string;
|
|
242
|
-
|
|
242
|
+
expiryDate: string;
|
|
243
243
|
status: string;
|
|
244
244
|
message: string;
|
|
245
245
|
addonDetails?: {
|
|
@@ -344,8 +344,8 @@ export interface EsimplyPackage {
|
|
|
344
344
|
calculated_price: number;
|
|
345
345
|
rn: number;
|
|
346
346
|
currency: string;
|
|
347
|
-
|
|
348
|
-
|
|
347
|
+
originalAmount: number;
|
|
348
|
+
originalCurrency: string;
|
|
349
349
|
}
|
|
350
350
|
export declare class LiteApiClientV3 {
|
|
351
351
|
private apiKey;
|
package/dist/models/Hotel.d.ts
CHANGED
|
@@ -71,9 +71,9 @@ export declare class Hotel extends Model<Partial<Hotel>> {
|
|
|
71
71
|
latitude: string;
|
|
72
72
|
longitude: string;
|
|
73
73
|
address: string;
|
|
74
|
-
addressSuburb
|
|
75
|
-
addressQuarter
|
|
76
|
-
addressDistrict
|
|
74
|
+
addressSuburb?: string;
|
|
75
|
+
addressQuarter?: string;
|
|
76
|
+
addressDistrict?: string;
|
|
77
77
|
zip: string;
|
|
78
78
|
main_photo: string;
|
|
79
79
|
thumbnail: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Guest } from './Guest';
|
|
3
|
+
export declare class Referral extends Model<Partial<Referral>> {
|
|
4
|
+
id: string;
|
|
5
|
+
referrerGuestId: string;
|
|
6
|
+
referredGuestId: string;
|
|
7
|
+
status: string;
|
|
8
|
+
referrerGuest?: Guest;
|
|
9
|
+
referredGuest?: Guest;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Referral = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const Guest_1 = require("./Guest");
|
|
15
|
+
let Referral = class Referral extends sequelize_typescript_1.Model {
|
|
16
|
+
};
|
|
17
|
+
exports.Referral = Referral;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, sequelize_typescript_1.IsUUID)(4),
|
|
20
|
+
sequelize_typescript_1.PrimaryKey,
|
|
21
|
+
(0, sequelize_typescript_1.Column)({
|
|
22
|
+
type: sequelize_typescript_1.DataType.UUID,
|
|
23
|
+
defaultValue: sequelize_typescript_1.DataType.UUIDV4,
|
|
24
|
+
}),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Referral.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, sequelize_typescript_1.ForeignKey)(() => Guest_1.Guest),
|
|
29
|
+
sequelize_typescript_1.Index,
|
|
30
|
+
(0, sequelize_typescript_1.Column)({
|
|
31
|
+
type: sequelize_typescript_1.DataType.UUID,
|
|
32
|
+
allowNull: false,
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Referral.prototype, "referrerGuestId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, sequelize_typescript_1.ForeignKey)(() => Guest_1.Guest),
|
|
38
|
+
sequelize_typescript_1.Unique,
|
|
39
|
+
(0, sequelize_typescript_1.Column)({
|
|
40
|
+
type: sequelize_typescript_1.DataType.UUID,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Referral.prototype, "referredGuestId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, sequelize_typescript_1.Column)({
|
|
47
|
+
type: sequelize_typescript_1.DataType.STRING,
|
|
48
|
+
allowNull: false,
|
|
49
|
+
defaultValue: 'pending',
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], Referral.prototype, "status", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, sequelize_typescript_1.BelongsTo)(() => Guest_1.Guest, 'referrerGuestId'),
|
|
55
|
+
__metadata("design:type", Guest_1.Guest)
|
|
56
|
+
], Referral.prototype, "referrerGuest", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, sequelize_typescript_1.BelongsTo)(() => Guest_1.Guest, 'referredGuestId'),
|
|
59
|
+
__metadata("design:type", Guest_1.Guest)
|
|
60
|
+
], Referral.prototype, "referredGuest", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, sequelize_typescript_1.Column)({
|
|
63
|
+
type: sequelize_typescript_1.DataType.DATE,
|
|
64
|
+
allowNull: false,
|
|
65
|
+
defaultValue: new Date(),
|
|
66
|
+
}),
|
|
67
|
+
__metadata("design:type", Date)
|
|
68
|
+
], Referral.prototype, "createdAt", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, sequelize_typescript_1.Column)({
|
|
71
|
+
type: sequelize_typescript_1.DataType.DATE,
|
|
72
|
+
allowNull: false,
|
|
73
|
+
defaultValue: new Date(),
|
|
74
|
+
}),
|
|
75
|
+
__metadata("design:type", Date)
|
|
76
|
+
], Referral.prototype, "updatedAt", void 0);
|
|
77
|
+
exports.Referral = Referral = __decorate([
|
|
78
|
+
(0, sequelize_typescript_1.Table)({
|
|
79
|
+
tableName: 'referrals',
|
|
80
|
+
})
|
|
81
|
+
], Referral);
|