whitelabel-db 1.0.61 → 1.1.1

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 CHANGED
@@ -7,6 +7,8 @@ export { User } from './models/User';
7
7
  export { Project } from './models/Project';
8
8
  export { Booking } from './models/Booking';
9
9
  export { Role } from './models/Role';
10
+ export { HotelTranslation } from './models/HotelTranslation';
11
+ export { Guest } from './models/Guest';
10
12
  export { LiteApiClient, HotelsRequest, AvailabilityResult, FullRateAvailabilityResult, RoomType, Rate, PrebookRateRequest, PrebookRate, CheckoutRequest, BookingInfo, CancelBooking, } from './libs/liteapi';
11
13
  export { LiteApiClientV3, HotelsRequestV3, AvailabilityResultV3, FullRateAvailabilityResultV3, RoomTypeV3, RateV3, PrebookRateRequestV3, PrebookRateV3, CheckoutRequestV3, BookingInfoV3, CancelBookingV3, BookedRoomV3, OccupancyV3, } from './libs/liteapiv3';
12
14
  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.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.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");
@@ -19,6 +19,10 @@ var Booking_1 = require("./models/Booking");
19
19
  Object.defineProperty(exports, "Booking", { enumerable: true, get: function () { return Booking_1.Booking; } });
20
20
  var Role_1 = require("./models/Role");
21
21
  Object.defineProperty(exports, "Role", { enumerable: true, get: function () { return Role_1.Role; } });
22
+ var HotelTranslation_1 = require("./models/HotelTranslation");
23
+ Object.defineProperty(exports, "HotelTranslation", { enumerable: true, get: function () { return HotelTranslation_1.HotelTranslation; } });
24
+ var Guest_1 = require("./models/Guest");
25
+ Object.defineProperty(exports, "Guest", { enumerable: true, get: function () { return Guest_1.Guest; } });
22
26
  var liteapi_1 = require("./libs/liteapi");
23
27
  Object.defineProperty(exports, "LiteApiClient", { enumerable: true, get: function () { return liteapi_1.LiteApiClient; } });
24
28
  var liteapiv3_1 = require("./libs/liteapiv3");
@@ -19,6 +19,8 @@ const City_1 = require("../models/City");
19
19
  const Country_1 = require("../models/Country");
20
20
  const Booking_1 = require("../models/Booking");
21
21
  const Role_1 = require("../models/Role");
22
+ const HotelTranslation_1 = require("../models/HotelTranslation");
23
+ const Guest_1 = require("../models/Guest");
22
24
  const connect = (connectionDetails) => __awaiter(void 0, void 0, void 0, function* () {
23
25
  const connection = new sequelize_typescript_1.Sequelize({
24
26
  dialect: 'postgres',
@@ -27,7 +29,18 @@ const connect = (connectionDetails) => __awaiter(void 0, void 0, void 0, functio
27
29
  password: connectionDetails.password,
28
30
  database: connectionDetails.dbname,
29
31
  logging: false,
30
- models: [User_1.User, Agency_1.Agency, Project_1.Project, Hotel_1.Hotel, City_1.City, Country_1.Country, Booking_1.Booking, Role_1.Role],
32
+ models: [
33
+ User_1.User,
34
+ Agency_1.Agency,
35
+ Project_1.Project,
36
+ Hotel_1.Hotel,
37
+ City_1.City,
38
+ Country_1.Country,
39
+ Booking_1.Booking,
40
+ Role_1.Role,
41
+ HotelTranslation_1.HotelTranslation,
42
+ Guest_1.Guest,
43
+ ],
31
44
  });
32
45
  return connection
33
46
  .authenticate()
@@ -0,0 +1,16 @@
1
+ import { Model } from 'sequelize-typescript';
2
+ import { Project } from './Project';
3
+ export declare class Guest extends Model<Partial<Guest>> {
4
+ id: string;
5
+ firstName: string;
6
+ lastName: string;
7
+ email: string;
8
+ password: string;
9
+ projectId?: string;
10
+ liteApiGuestId: string;
11
+ socialId: string;
12
+ socialProvider: string;
13
+ project?: Project;
14
+ static checkEmail(email: string): Promise<void>;
15
+ generateSession(secret: string): string;
16
+ }
@@ -0,0 +1,121 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
23
+ var Guest_1;
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.Guest = void 0;
26
+ const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
27
+ const sequelize_typescript_1 = require("sequelize-typescript");
28
+ const Project_1 = require("./Project");
29
+ let Guest = Guest_1 = class Guest extends sequelize_typescript_1.Model {
30
+ static checkEmail(email) {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ if (yield Guest_1.findOne({ where: { email } })) {
33
+ throw new Error('This email is already registered to another account.');
34
+ }
35
+ });
36
+ }
37
+ generateSession(secret) {
38
+ return jsonwebtoken_1.default.sign({ id: this.id, projectId: this.projectId }, secret, {
39
+ algorithm: 'HS256',
40
+ expiresIn: 86400, // 24 hours
41
+ });
42
+ }
43
+ };
44
+ exports.Guest = Guest;
45
+ __decorate([
46
+ (0, sequelize_typescript_1.IsUUID)(4),
47
+ sequelize_typescript_1.PrimaryKey,
48
+ (0, sequelize_typescript_1.Column)({
49
+ type: sequelize_typescript_1.DataType.UUID,
50
+ defaultValue: sequelize_typescript_1.DataType.UUIDV4,
51
+ }),
52
+ __metadata("design:type", String)
53
+ ], Guest.prototype, "id", void 0);
54
+ __decorate([
55
+ (0, sequelize_typescript_1.Column)({
56
+ type: sequelize_typescript_1.DataType.STRING,
57
+ allowNull: false,
58
+ }),
59
+ __metadata("design:type", String)
60
+ ], Guest.prototype, "firstName", void 0);
61
+ __decorate([
62
+ (0, sequelize_typescript_1.Column)({
63
+ type: sequelize_typescript_1.DataType.STRING,
64
+ allowNull: false,
65
+ }),
66
+ __metadata("design:type", String)
67
+ ], Guest.prototype, "lastName", void 0);
68
+ __decorate([
69
+ sequelize_typescript_1.Index,
70
+ sequelize_typescript_1.Unique,
71
+ (0, sequelize_typescript_1.Column)({
72
+ type: sequelize_typescript_1.DataType.STRING,
73
+ allowNull: false,
74
+ }),
75
+ __metadata("design:type", String)
76
+ ], Guest.prototype, "email", void 0);
77
+ __decorate([
78
+ (0, sequelize_typescript_1.Column)({
79
+ type: sequelize_typescript_1.DataType.STRING,
80
+ allowNull: true,
81
+ }),
82
+ __metadata("design:type", String)
83
+ ], Guest.prototype, "password", void 0);
84
+ __decorate([
85
+ (0, sequelize_typescript_1.ForeignKey)(() => Project_1.Project),
86
+ sequelize_typescript_1.Index,
87
+ (0, sequelize_typescript_1.Column)({
88
+ type: sequelize_typescript_1.DataType.UUID,
89
+ }),
90
+ __metadata("design:type", String)
91
+ ], Guest.prototype, "projectId", void 0);
92
+ __decorate([
93
+ (0, sequelize_typescript_1.Column)({
94
+ type: sequelize_typescript_1.DataType.STRING,
95
+ allowNull: true,
96
+ }),
97
+ __metadata("design:type", String)
98
+ ], Guest.prototype, "liteApiGuestId", void 0);
99
+ __decorate([
100
+ (0, sequelize_typescript_1.Column)({
101
+ type: sequelize_typescript_1.DataType.STRING,
102
+ allowNull: true,
103
+ }),
104
+ __metadata("design:type", String)
105
+ ], Guest.prototype, "socialId", void 0);
106
+ __decorate([
107
+ (0, sequelize_typescript_1.Column)({
108
+ type: sequelize_typescript_1.DataType.STRING,
109
+ allowNull: true,
110
+ }),
111
+ __metadata("design:type", String)
112
+ ], Guest.prototype, "socialProvider", void 0);
113
+ __decorate([
114
+ (0, sequelize_typescript_1.BelongsTo)(() => Project_1.Project),
115
+ __metadata("design:type", Project_1.Project)
116
+ ], Guest.prototype, "project", void 0);
117
+ exports.Guest = Guest = Guest_1 = __decorate([
118
+ (0, sequelize_typescript_1.Table)({
119
+ tableName: 'guests',
120
+ })
121
+ ], Guest);
@@ -11,6 +11,45 @@ export type CheckinCheckoutTimes = {
11
11
  checkout: string;
12
12
  checkin: string;
13
13
  };
14
+ export interface RoomPhoto {
15
+ url: string;
16
+ caption?: string;
17
+ main_photo: boolean;
18
+ }
19
+ export interface RoomAmenity {
20
+ id: number;
21
+ name: string;
22
+ }
23
+ export interface Room {
24
+ id: number;
25
+ name: string;
26
+ description: string;
27
+ size: number;
28
+ adults: number;
29
+ children: number;
30
+ occupancy: number;
31
+ photos: RoomPhoto[];
32
+ room_amenities: RoomAmenity[];
33
+ }
34
+ export interface Review {
35
+ average_score: number;
36
+ name: string;
37
+ date: string;
38
+ headline: string;
39
+ language: string;
40
+ country: string;
41
+ pros: string;
42
+ cons: string;
43
+ }
44
+ export interface Facility {
45
+ id: number;
46
+ name: string;
47
+ }
48
+ export interface Policy {
49
+ type: string;
50
+ name: string;
51
+ description: string;
52
+ }
14
53
  export declare class Hotel extends Model<Partial<Hotel>> {
15
54
  id: string;
16
55
  name: string;
@@ -36,44 +75,11 @@ export declare class Hotel extends Model<Partial<Hotel>> {
36
75
  rate: AvailabilityResult;
37
76
  phone: string;
38
77
  rating: number;
39
- facilities: {
40
- id: number;
41
- name: string;
42
- }[];
43
- policies: {
44
- type: string;
45
- name: string;
46
- description: string;
47
- }[];
48
- rooms: {
49
- id: number;
50
- name: string;
51
- description: string;
52
- size: number;
53
- adults: number;
54
- children: number;
55
- occupancy: number;
56
- photos: {
57
- url: string;
58
- caption?: string;
59
- main_photo: boolean;
60
- }[];
61
- room_amenities: {
62
- id: number;
63
- name: string;
64
- }[];
65
- }[];
78
+ facilities: Facility[];
79
+ policies: Policy[];
80
+ rooms: Room[];
66
81
  ranking: number;
67
82
  reviewsCount: number;
68
- reviews: {
69
- average_score: number;
70
- name: string;
71
- date: string;
72
- headline: string;
73
- language: string;
74
- country: string;
75
- pros: string;
76
- cons: string;
77
- }[];
83
+ reviews: Review[];
78
84
  bestSeller: boolean;
79
85
  }
@@ -106,6 +106,7 @@ __decorate([
106
106
  __metadata("design:type", String)
107
107
  ], Hotel.prototype, "thumbnail", void 0);
108
108
  __decorate([
109
+ sequelize_typescript_1.Index,
109
110
  (0, sequelize_typescript_1.Column)({
110
111
  type: sequelize_typescript_1.DataType.INTEGER,
111
112
  allowNull: false,
@@ -113,6 +114,7 @@ __decorate([
113
114
  __metadata("design:type", Number)
114
115
  ], Hotel.prototype, "hotelTypeId", void 0);
115
116
  __decorate([
117
+ sequelize_typescript_1.Index,
116
118
  (0, sequelize_typescript_1.Column)({
117
119
  type: sequelize_typescript_1.DataType.INTEGER,
118
120
  allowNull: false,
@@ -0,0 +1,18 @@
1
+ import { Model } from 'sequelize-typescript';
2
+ import { Room, Policy, Facility, Review } from './Hotel';
3
+ export declare class HotelTranslation extends Model<Partial<HotelTranslation>> {
4
+ id: string;
5
+ hotelId: string;
6
+ language: string;
7
+ name: string;
8
+ hotelDescription: string;
9
+ markdownDescription: string;
10
+ importantInfo: string;
11
+ country: string;
12
+ city: string;
13
+ address: string;
14
+ facilities: Facility[];
15
+ policies: Policy[];
16
+ rooms: Room[];
17
+ reviews: Review[];
18
+ }
@@ -0,0 +1,130 @@
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.HotelTranslation = void 0;
13
+ const sequelize_typescript_1 = require("sequelize-typescript");
14
+ const Hotel_1 = require("./Hotel");
15
+ let HotelTranslation = class HotelTranslation extends sequelize_typescript_1.Model {
16
+ };
17
+ exports.HotelTranslation = HotelTranslation;
18
+ __decorate([
19
+ sequelize_typescript_1.Index,
20
+ sequelize_typescript_1.PrimaryKey,
21
+ (0, sequelize_typescript_1.Column)({
22
+ type: sequelize_typescript_1.DataType.UUID,
23
+ allowNull: false,
24
+ }),
25
+ __metadata("design:type", String)
26
+ ], HotelTranslation.prototype, "id", void 0);
27
+ __decorate([
28
+ sequelize_typescript_1.Index,
29
+ (0, sequelize_typescript_1.ForeignKey)(() => Hotel_1.Hotel),
30
+ (0, sequelize_typescript_1.Unique)('hotel_language_unique'),
31
+ (0, sequelize_typescript_1.Index)('hotel_language_index'),
32
+ (0, sequelize_typescript_1.Column)({
33
+ type: sequelize_typescript_1.DataType.STRING,
34
+ allowNull: false,
35
+ }),
36
+ __metadata("design:type", String)
37
+ ], HotelTranslation.prototype, "hotelId", void 0);
38
+ __decorate([
39
+ (0, sequelize_typescript_1.Unique)('hotel_language_unique'),
40
+ (0, sequelize_typescript_1.Index)('hotel_language_index'),
41
+ (0, sequelize_typescript_1.Column)({
42
+ type: sequelize_typescript_1.DataType.STRING(12),
43
+ allowNull: false,
44
+ }),
45
+ __metadata("design:type", String)
46
+ ], HotelTranslation.prototype, "language", void 0);
47
+ __decorate([
48
+ (0, sequelize_typescript_1.Column)({
49
+ type: sequelize_typescript_1.DataType.STRING(512),
50
+ allowNull: false,
51
+ }),
52
+ __metadata("design:type", String)
53
+ ], HotelTranslation.prototype, "name", void 0);
54
+ __decorate([
55
+ (0, sequelize_typescript_1.Column)({
56
+ type: sequelize_typescript_1.DataType.TEXT,
57
+ allowNull: false,
58
+ }),
59
+ __metadata("design:type", String)
60
+ ], HotelTranslation.prototype, "hotelDescription", void 0);
61
+ __decorate([
62
+ (0, sequelize_typescript_1.Column)({
63
+ type: sequelize_typescript_1.DataType.TEXT,
64
+ allowNull: false,
65
+ }),
66
+ __metadata("design:type", String)
67
+ ], HotelTranslation.prototype, "markdownDescription", void 0);
68
+ __decorate([
69
+ (0, sequelize_typescript_1.Column)({
70
+ type: sequelize_typescript_1.DataType.TEXT,
71
+ allowNull: false,
72
+ }),
73
+ __metadata("design:type", String)
74
+ ], HotelTranslation.prototype, "importantInfo", void 0);
75
+ __decorate([
76
+ sequelize_typescript_1.Index,
77
+ (0, sequelize_typescript_1.Column)({
78
+ type: sequelize_typescript_1.DataType.STRING,
79
+ allowNull: false,
80
+ }),
81
+ __metadata("design:type", String)
82
+ ], HotelTranslation.prototype, "country", void 0);
83
+ __decorate([
84
+ sequelize_typescript_1.Index,
85
+ (0, sequelize_typescript_1.Column)({
86
+ type: sequelize_typescript_1.DataType.STRING,
87
+ allowNull: false,
88
+ }),
89
+ __metadata("design:type", String)
90
+ ], HotelTranslation.prototype, "city", void 0);
91
+ __decorate([
92
+ (0, sequelize_typescript_1.Column)({
93
+ type: sequelize_typescript_1.DataType.STRING,
94
+ allowNull: false,
95
+ }),
96
+ __metadata("design:type", String)
97
+ ], HotelTranslation.prototype, "address", void 0);
98
+ __decorate([
99
+ (0, sequelize_typescript_1.Column)({
100
+ type: sequelize_typescript_1.DataType.ARRAY(sequelize_typescript_1.DataType.JSONB),
101
+ allowNull: true,
102
+ }),
103
+ __metadata("design:type", Array)
104
+ ], HotelTranslation.prototype, "facilities", void 0);
105
+ __decorate([
106
+ (0, sequelize_typescript_1.Column)({
107
+ type: sequelize_typescript_1.DataType.ARRAY(sequelize_typescript_1.DataType.JSONB),
108
+ allowNull: true,
109
+ }),
110
+ __metadata("design:type", Array)
111
+ ], HotelTranslation.prototype, "policies", void 0);
112
+ __decorate([
113
+ (0, sequelize_typescript_1.Column)({
114
+ type: sequelize_typescript_1.DataType.ARRAY(sequelize_typescript_1.DataType.JSONB),
115
+ allowNull: true,
116
+ }),
117
+ __metadata("design:type", Array)
118
+ ], HotelTranslation.prototype, "rooms", void 0);
119
+ __decorate([
120
+ (0, sequelize_typescript_1.Column)({
121
+ type: sequelize_typescript_1.DataType.ARRAY(sequelize_typescript_1.DataType.JSONB),
122
+ allowNull: true,
123
+ }),
124
+ __metadata("design:type", Array)
125
+ ], HotelTranslation.prototype, "reviews", void 0);
126
+ exports.HotelTranslation = HotelTranslation = __decorate([
127
+ (0, sequelize_typescript_1.Table)({
128
+ tableName: 'static_hotels_translations',
129
+ })
130
+ ], HotelTranslation);
@@ -0,0 +1,6 @@
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
+ }
@@ -9,53 +9,38 @@ 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.Search = void 0;
12
+ exports.UserRole = void 0;
13
+ const sequelize_1 = require("sequelize");
13
14
  const sequelize_typescript_1 = require("sequelize-typescript");
14
- let Search = class Search extends sequelize_typescript_1.Model {
15
+ let UserRole = class UserRole extends sequelize_typescript_1.Model {
15
16
  };
16
- exports.Search = Search;
17
+ exports.UserRole = UserRole;
17
18
  __decorate([
18
19
  sequelize_typescript_1.PrimaryKey,
19
- sequelize_typescript_1.Index,
20
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,
21
+ type: sequelize_1.NUMBER,
28
22
  allowNull: false,
29
- defaultValue: 0,
23
+ autoIncrement: true,
30
24
  }),
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);
25
+ __metadata("design:type", String)
26
+ ], UserRole.prototype, "id", void 0);
41
27
  __decorate([
42
28
  sequelize_typescript_1.Unique,
43
- sequelize_typescript_1.Index,
44
29
  (0, sequelize_typescript_1.Column)({
45
- type: sequelize_typescript_1.DataType.DATE,
30
+ type: sequelize_typescript_1.DataType.STRING,
31
+ allowNull: false,
46
32
  }),
47
- __metadata("design:type", Date)
48
- ], Search.prototype, "cacheQueuedAt", void 0);
33
+ __metadata("design:type", String)
34
+ ], UserRole.prototype, "name", void 0);
49
35
  __decorate([
50
36
  (0, sequelize_typescript_1.Column)({
51
- type: sequelize_typescript_1.DataType.JSONB,
52
- allowNull: false,
53
- defaultValue: {},
37
+ type: sequelize_typescript_1.DataType.STRING,
38
+ allowNull: true,
54
39
  }),
55
- __metadata("design:type", Object)
56
- ], Search.prototype, "data", void 0);
57
- exports.Search = Search = __decorate([
40
+ __metadata("design:type", String)
41
+ ], UserRole.prototype, "description", void 0);
42
+ exports.UserRole = UserRole = __decorate([
58
43
  (0, sequelize_typescript_1.Table)({
59
- tableName: 'searches',
44
+ tableName: 'user_roles',
60
45
  })
61
- ], Search);
46
+ ], UserRole);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whitelabel-db",
3
- "version": "1.0.61",
3
+ "version": "1.1.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,8 +0,0 @@
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
- }