whitelabel-db 1.0.28 → 1.0.30
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/libs/liteapi.d.ts
CHANGED
|
@@ -48,6 +48,12 @@ export interface Rate {
|
|
|
48
48
|
policies: {
|
|
49
49
|
message: string;
|
|
50
50
|
highlight: boolean;
|
|
51
|
+
cancelTimeFrame: {
|
|
52
|
+
start: string;
|
|
53
|
+
end: string;
|
|
54
|
+
amount: number;
|
|
55
|
+
type?: string;
|
|
56
|
+
};
|
|
51
57
|
}[];
|
|
52
58
|
hasFreeCancellation: boolean;
|
|
53
59
|
};
|
|
@@ -138,6 +144,10 @@ export interface BookingInfo {
|
|
|
138
144
|
msp: number;
|
|
139
145
|
commission: number;
|
|
140
146
|
currency: string;
|
|
147
|
+
cancelledAmountWhenRequested: {
|
|
148
|
+
amount: number;
|
|
149
|
+
type: string;
|
|
150
|
+
};
|
|
141
151
|
}
|
|
142
152
|
export interface BookingConfirmation {
|
|
143
153
|
prebookId: string;
|
package/dist/models/Booking.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Project } from './Project';
|
|
2
3
|
export declare class Booking extends Model<Partial<Booking>> {
|
|
3
4
|
id: string;
|
|
4
5
|
prebookId: string;
|
|
@@ -6,5 +7,9 @@ export declare class Booking extends Model<Partial<Booking>> {
|
|
|
6
7
|
liteApiBookingData?: object;
|
|
7
8
|
bookingInputData?: object;
|
|
8
9
|
projectId?: string;
|
|
10
|
+
project?: Project;
|
|
9
11
|
hasAcceptedTerms?: boolean;
|
|
12
|
+
liteApiCancelBookingData?: object;
|
|
13
|
+
paymentStatus?: string;
|
|
14
|
+
bookingStatus?: string;
|
|
10
15
|
}
|
package/dist/models/Booking.js
CHANGED
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Booking = void 0;
|
|
13
13
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
const Project_1 = require("./Project");
|
|
14
15
|
let Booking = class Booking extends sequelize_typescript_1.Model {
|
|
15
16
|
};
|
|
16
17
|
exports.Booking = Booking;
|
|
@@ -58,12 +59,18 @@ __decorate([
|
|
|
58
59
|
__metadata("design:type", Object)
|
|
59
60
|
], Booking.prototype, "bookingInputData", void 0);
|
|
60
61
|
__decorate([
|
|
62
|
+
(0, sequelize_typescript_1.ForeignKey)(() => Project_1.Project),
|
|
63
|
+
sequelize_typescript_1.Index,
|
|
61
64
|
(0, sequelize_typescript_1.Column)({
|
|
62
65
|
type: sequelize_typescript_1.DataType.UUID,
|
|
63
66
|
allowNull: false,
|
|
64
67
|
}),
|
|
65
68
|
__metadata("design:type", String)
|
|
66
69
|
], Booking.prototype, "projectId", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, sequelize_typescript_1.BelongsTo)(() => Project_1.Project),
|
|
72
|
+
__metadata("design:type", Project_1.Project)
|
|
73
|
+
], Booking.prototype, "project", void 0);
|
|
67
74
|
__decorate([
|
|
68
75
|
(0, sequelize_typescript_1.Column)({
|
|
69
76
|
type: sequelize_typescript_1.DataType.BOOLEAN,
|
|
@@ -72,6 +79,30 @@ __decorate([
|
|
|
72
79
|
}),
|
|
73
80
|
__metadata("design:type", Boolean)
|
|
74
81
|
], Booking.prototype, "hasAcceptedTerms", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, sequelize_typescript_1.Column)({
|
|
84
|
+
type: sequelize_typescript_1.DataType.JSONB,
|
|
85
|
+
allowNull: false,
|
|
86
|
+
defaultValue: {},
|
|
87
|
+
}),
|
|
88
|
+
__metadata("design:type", Object)
|
|
89
|
+
], Booking.prototype, "liteApiCancelBookingData", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, sequelize_typescript_1.Column)({
|
|
92
|
+
type: sequelize_typescript_1.DataType.STRING,
|
|
93
|
+
allowNull: false,
|
|
94
|
+
defaultValue: '',
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], Booking.prototype, "paymentStatus", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, sequelize_typescript_1.Column)({
|
|
100
|
+
type: sequelize_typescript_1.DataType.STRING,
|
|
101
|
+
allowNull: false,
|
|
102
|
+
defaultValue: '',
|
|
103
|
+
}),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], Booking.prototype, "bookingStatus", void 0);
|
|
75
106
|
exports.Booking = Booking = __decorate([
|
|
76
107
|
(0, sequelize_typescript_1.Table)({
|
|
77
108
|
tableName: 'bookings',
|
package/dist/models/Project.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
2
|
import { Agency } from './Agency';
|
|
3
3
|
import { LiteApiClient } from '../libs/liteapi';
|
|
4
|
+
import { Booking } from './Booking';
|
|
4
5
|
export declare class Project extends Model<Partial<Project>> {
|
|
5
6
|
id: string;
|
|
6
7
|
name: string;
|
|
@@ -9,6 +10,7 @@ export declare class Project extends Model<Partial<Project>> {
|
|
|
9
10
|
settings?: object;
|
|
10
11
|
agencyId?: string;
|
|
11
12
|
agency?: Agency;
|
|
13
|
+
bookings?: Booking[];
|
|
12
14
|
generateSession(secret: string): string;
|
|
13
15
|
getLiteApiClient(): LiteApiClient;
|
|
14
16
|
}
|
package/dist/models/Project.js
CHANGED
|
@@ -17,6 +17,7 @@ const sequelize_typescript_1 = require("sequelize-typescript");
|
|
|
17
17
|
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
18
18
|
const Agency_1 = require("./Agency");
|
|
19
19
|
const liteapi_1 = require("../libs/liteapi");
|
|
20
|
+
const Booking_1 = require("./Booking");
|
|
20
21
|
const clients = {};
|
|
21
22
|
let Project = class Project extends sequelize_typescript_1.Model {
|
|
22
23
|
generateSession(secret) {
|
|
@@ -96,6 +97,10 @@ __decorate([
|
|
|
96
97
|
(0, sequelize_typescript_1.BelongsTo)(() => Agency_1.Agency),
|
|
97
98
|
__metadata("design:type", Agency_1.Agency)
|
|
98
99
|
], Project.prototype, "agency", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, sequelize_typescript_1.HasMany)(() => Booking_1.Booking),
|
|
102
|
+
__metadata("design:type", Array)
|
|
103
|
+
], Project.prototype, "bookings", void 0);
|
|
99
104
|
exports.Project = Project = __decorate([
|
|
100
105
|
(0, sequelize_typescript_1.Table)({
|
|
101
106
|
tableName: 'projects',
|
package/package.json
CHANGED
package/dist/models/Search.d.ts
DELETED
package/dist/models/Search.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
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.Search = void 0;
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
let Search = class Search extends sequelize_typescript_1.Model {
|
|
15
|
-
};
|
|
16
|
-
exports.Search = Search;
|
|
17
|
-
__decorate([
|
|
18
|
-
sequelize_typescript_1.PrimaryKey,
|
|
19
|
-
sequelize_typescript_1.Index,
|
|
20
|
-
(0, sequelize_typescript_1.Column)({
|
|
21
|
-
type: sequelize_typescript_1.DataType.STRING(32),
|
|
22
|
-
}),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], Search.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, sequelize_typescript_1.Column)({
|
|
27
|
-
type: sequelize_typescript_1.DataType.INTEGER,
|
|
28
|
-
allowNull: false,
|
|
29
|
-
defaultValue: 0,
|
|
30
|
-
}),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], Search.prototype, "hits", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
sequelize_typescript_1.Unique,
|
|
35
|
-
sequelize_typescript_1.Index,
|
|
36
|
-
(0, sequelize_typescript_1.Column)({
|
|
37
|
-
type: sequelize_typescript_1.DataType.DATE,
|
|
38
|
-
}),
|
|
39
|
-
__metadata("design:type", Date)
|
|
40
|
-
], Search.prototype, "cacheUpdatedAt", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
sequelize_typescript_1.Unique,
|
|
43
|
-
sequelize_typescript_1.Index,
|
|
44
|
-
(0, sequelize_typescript_1.Column)({
|
|
45
|
-
type: sequelize_typescript_1.DataType.DATE,
|
|
46
|
-
}),
|
|
47
|
-
__metadata("design:type", Date)
|
|
48
|
-
], Search.prototype, "cacheQueuedAt", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, sequelize_typescript_1.Column)({
|
|
51
|
-
type: sequelize_typescript_1.DataType.JSONB,
|
|
52
|
-
allowNull: false,
|
|
53
|
-
defaultValue: {},
|
|
54
|
-
}),
|
|
55
|
-
__metadata("design:type", Object)
|
|
56
|
-
], Search.prototype, "data", void 0);
|
|
57
|
-
exports.Search = Search = __decorate([
|
|
58
|
-
(0, sequelize_typescript_1.Table)({
|
|
59
|
-
tableName: 'searches',
|
|
60
|
-
})
|
|
61
|
-
], Search);
|