whitelabel-db 1.0.43 → 1.0.45

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.
@@ -68,6 +68,7 @@ export interface RateV3 {
68
68
  }
69
69
  export interface RoomTypeV3 {
70
70
  roomTypeId: string;
71
+ offerId: string;
71
72
  rates: RateV3[];
72
73
  supplier: string;
73
74
  supplierId: number;
@@ -79,17 +80,13 @@ export interface FullRateAvailabilityResultV3 {
79
80
  roomTypes: RoomTypeV3[];
80
81
  }
81
82
  export interface PrebookRateRequestV3 {
82
- rateIds: string[];
83
- hotelId: string;
84
- occupancies: OccupancyV3[];
85
- currency: string;
86
- guestNationality: string;
87
- checkin: string;
88
- checkout: string;
83
+ offerId: string;
89
84
  payWithStripe?: boolean;
85
+ usePaymentSdk?: boolean;
90
86
  }
91
87
  export interface PrebookRateV3 {
92
88
  prebookId: string;
89
+ offerId: string;
93
90
  hotelId: string;
94
91
  currency: string;
95
92
  termsAndConditions: string;
@@ -112,24 +109,26 @@ export interface GuestInfoV3 {
112
109
  guestEmail: string;
113
110
  }
114
111
  export interface PaymentInfoV3 {
115
- method: string;
116
- transactionId?: string;
112
+ method?: string;
113
+ transactionId: string;
117
114
  }
118
115
  export interface UserV3 {
119
116
  firstName: string;
120
117
  lastName: string;
121
118
  email: string;
122
119
  }
123
- export interface RateRequestV3 {
124
- rateId: string;
120
+ export interface GuestsRequestV3 {
121
+ occupancyNumber: number;
125
122
  remarks: string;
126
- guest: UserV3[];
123
+ firstName: string;
124
+ lastName: string;
125
+ email: string;
127
126
  }
128
127
  export interface CheckoutRequestV3 {
129
128
  payment: PaymentInfoV3;
130
129
  prebookId: string;
131
130
  holder: UserV3;
132
- rates: RateRequestV3[];
131
+ guests: GuestsRequestV3[];
133
132
  }
134
133
  export interface BookedRoomV3 {
135
134
  roomType: {
@@ -6,4 +6,5 @@ export declare class Agency extends Model<Partial<Agency>> {
6
6
  name: string;
7
7
  users?: User[];
8
8
  projects?: Project[];
9
+ parentAgencyId?: string;
9
10
  }
@@ -40,6 +40,14 @@ __decorate([
40
40
  (0, sequelize_typescript_1.HasMany)(() => Project_1.Project),
41
41
  __metadata("design:type", Array)
42
42
  ], Agency.prototype, "projects", void 0);
43
+ __decorate([
44
+ (0, sequelize_typescript_1.IsUUID)(4),
45
+ (0, sequelize_typescript_1.Column)({
46
+ type: sequelize_typescript_1.DataType.UUID,
47
+ defaultValue: sequelize_typescript_1.DataType.UUIDV4,
48
+ }),
49
+ __metadata("design:type", String)
50
+ ], Agency.prototype, "parentAgencyId", void 0);
43
51
  exports.Agency = Agency = __decorate([
44
52
  (0, sequelize_typescript_1.Table)({
45
53
  tableName: 'agencies',
@@ -0,0 +1,8 @@
1
+ import { Model } from 'sequelize-typescript';
2
+ export declare class Search extends Model<Partial<Search>> {
3
+ id: string;
4
+ hits: number;
5
+ cacheUpdatedAt?: Date;
6
+ cacheQueuedAt?: Date;
7
+ data?: object;
8
+ }
@@ -9,38 +9,53 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.UserRole = void 0;
13
- const sequelize_1 = require("sequelize");
12
+ exports.Search = void 0;
14
13
  const sequelize_typescript_1 = require("sequelize-typescript");
15
- let UserRole = class UserRole extends sequelize_typescript_1.Model {
14
+ let Search = class Search extends sequelize_typescript_1.Model {
16
15
  };
17
- exports.UserRole = UserRole;
16
+ exports.Search = Search;
18
17
  __decorate([
19
18
  sequelize_typescript_1.PrimaryKey,
19
+ sequelize_typescript_1.Index,
20
20
  (0, sequelize_typescript_1.Column)({
21
- type: sequelize_1.NUMBER,
22
- allowNull: false,
23
- autoIncrement: true,
21
+ type: sequelize_typescript_1.DataType.STRING(32),
24
22
  }),
25
23
  __metadata("design:type", String)
26
- ], UserRole.prototype, "id", void 0);
24
+ ], Search.prototype, "id", void 0);
27
25
  __decorate([
28
- sequelize_typescript_1.Unique,
29
26
  (0, sequelize_typescript_1.Column)({
30
- type: sequelize_typescript_1.DataType.STRING,
27
+ type: sequelize_typescript_1.DataType.INTEGER,
31
28
  allowNull: false,
29
+ defaultValue: 0,
32
30
  }),
33
- __metadata("design:type", String)
34
- ], UserRole.prototype, "name", void 0);
31
+ __metadata("design:type", Number)
32
+ ], Search.prototype, "hits", void 0);
35
33
  __decorate([
34
+ sequelize_typescript_1.Unique,
35
+ sequelize_typescript_1.Index,
36
36
  (0, sequelize_typescript_1.Column)({
37
- type: sequelize_typescript_1.DataType.STRING,
38
- allowNull: true,
37
+ type: sequelize_typescript_1.DataType.DATE,
39
38
  }),
40
- __metadata("design:type", String)
41
- ], UserRole.prototype, "description", void 0);
42
- exports.UserRole = UserRole = __decorate([
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([
43
58
  (0, sequelize_typescript_1.Table)({
44
- tableName: 'user_roles',
59
+ tableName: 'searches',
45
60
  })
46
- ], UserRole);
61
+ ], Search);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whitelabel-db",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +0,0 @@
1
- import { Model } from 'sequelize-typescript';
2
- export declare class UserRole extends Model<Partial<UserRole>> {
3
- id: string;
4
- name: string;
5
- description?: string;
6
- }