hh-contracts 0.0.94 → 0.0.96
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/build/common/constants/icon.constants.js +5 -4
- package/build/common/models/domain-name.schema.js +43 -0
- package/build/common/models/index.js +2 -0
- package/build/common/models/timestamp.schemas.js +4 -1
- package/build/common/models/timezone.schema.js +44 -0
- package/build/hotels/amenities/hotel-amenity.model.js +43 -0
- package/build/hotels/amenities/index.js +17 -0
- package/build/hotels/constants/hotel-amenity.constant.js +15 -0
- package/build/hotels/constants/hotel-contact-type.constant.js +9 -0
- package/build/hotels/constants/hotel-feature.constant.js +11 -0
- package/build/hotels/constants/hotel-integration-provider.constant.js +7 -0
- package/build/hotels/constants/hotel-policy-type.constant.js +11 -0
- package/build/hotels/constants/hotel-rating-source.constant.js +9 -0
- package/build/hotels/constants/index.js +22 -0
- package/build/hotels/contacts/hotel-contact.model.js +48 -0
- package/build/hotels/contacts/index.js +17 -0
- package/build/hotels/contracts/create-hotel.contract.js +19 -0
- package/build/hotels/contracts/delete-hotel.contract.js +46 -0
- package/build/hotels/contracts/find-hotel.contract.js +18 -0
- package/build/hotels/contracts/find-many-hotels.contract.js +67 -0
- package/build/hotels/contracts/index.js +4 -0
- package/build/hotels/contracts/update-hotel.contract.js +15 -0
- package/build/hotels/{hotel.model.js → features/hotel-feature.model.js} +8 -9
- package/build/hotels/features/index.js +17 -0
- package/build/hotels/hotel.models.js +79 -0
- package/build/hotels/hotels.api.js +10 -7
- package/build/hotels/index.js +10 -1
- package/build/hotels/integrations/hotel-integration.model.js +59 -0
- package/build/hotels/integrations/hotel-integrations.api.js +17 -0
- package/build/hotels/integrations/index.js +18 -0
- package/build/hotels/location/hotel-location.model.js +51 -0
- package/build/hotels/location/index.js +17 -0
- package/build/hotels/policies/hotel-policy.model.js +49 -0
- package/build/hotels/policies/index.js +17 -0
- package/build/hotels/ratings/hotel-rating.model.js +48 -0
- package/build/hotels/ratings/index.js +17 -0
- package/build/hotels/settings/contracts/find-hotel-domain-settings.contract.js +13 -0
- package/build/hotels/settings/contracts/index.js +18 -0
- package/build/hotels/settings/contracts/update-hotel-domain-settings.contract.js +14 -0
- package/build/hotels/settings/hotel-domain-settings.api.js +12 -0
- package/build/hotels/settings/hotel-domain-settings.schema.js +49 -0
- package/build/hotels/settings/index.js +19 -0
- package/build/hotels/sites/contracts/find-hotel-site-page-by-lang.contract.js +3 -3
- package/build/hotels/sites/hotel-pages.api.js +24 -0
- package/build/hotels/sites/index.js +1 -0
- package/build/hotels/themes/contracts/find-hotel-theme.contract.js +3 -3
- package/build/hotels/themes/hotel-themes.api.js +20 -0
- package/build/hotels/themes/index.js +1 -0
- package/build/permissions/contracts/delete-permission.contract.js +35 -2
- package/build/permissions/contracts/find-permission.contract.js +0 -7
- package/build/permissions/permission.models.js +2 -18
- package/build/roles/contracts/delete-role.contract.js +35 -2
- package/build/translate/contracts/translate-object.contract.js +3 -0
- package/common/constants/icon.constants.ts +5 -4
- package/common/models/domain-name.schema.ts +15 -0
- package/common/models/index.ts +2 -0
- package/common/models/timestamp.schemas.ts +4 -0
- package/common/models/timezone.schema.ts +11 -0
- package/hotels/amenities/hotel-amenity.model.ts +9 -0
- package/hotels/amenities/index.ts +1 -0
- package/hotels/constants/hotel-amenity.constant.ts +18 -0
- package/hotels/constants/hotel-contact-type.constant.ts +12 -0
- package/hotels/constants/hotel-feature.constant.ts +14 -0
- package/hotels/constants/hotel-integration-provider.constant.ts +11 -0
- package/hotels/constants/hotel-policy-type.constant.ts +15 -0
- package/hotels/constants/hotel-rating-source.constant.ts +12 -0
- package/hotels/constants/index.ts +6 -0
- package/hotels/contacts/hotel-contact.model.ts +15 -0
- package/hotels/contacts/index.ts +1 -0
- package/hotels/contracts/create-hotel.contract.ts +21 -0
- package/hotels/contracts/delete-hotel.contract.ts +12 -0
- package/hotels/contracts/find-hotel.contract.ts +22 -1
- package/hotels/contracts/find-many-hotels.contract.ts +43 -0
- package/hotels/contracts/index.ts +4 -0
- package/hotels/contracts/update-hotel.contract.ts +17 -0
- package/hotels/features/hotel-feature.model.ts +14 -0
- package/hotels/features/index.ts +1 -0
- package/hotels/hotel.models.ts +60 -0
- package/hotels/hotels.api.ts +9 -6
- package/hotels/index.ts +10 -1
- package/hotels/integrations/hotel-integration.model.ts +29 -0
- package/hotels/integrations/hotel-integrations.api.ts +16 -0
- package/hotels/integrations/index.ts +2 -0
- package/hotels/location/hotel-location.model.ts +17 -0
- package/hotels/location/index.ts +1 -0
- package/hotels/policies/hotel-policy.model.ts +16 -0
- package/hotels/policies/index.ts +1 -0
- package/hotels/ratings/hotel-rating.model.ts +15 -0
- package/hotels/ratings/index.ts +1 -0
- package/hotels/settings/contracts/find-hotel-domain-settings.contract.ts +13 -0
- package/hotels/settings/contracts/index.ts +2 -0
- package/hotels/settings/contracts/update-hotel-domain-settings.contract.ts +19 -0
- package/hotels/settings/hotel-domain-settings.api.ts +11 -0
- package/hotels/settings/hotel-domain-settings.schema.ts +24 -0
- package/hotels/settings/index.ts +3 -0
- package/hotels/sites/contracts/find-hotel-site-page-by-lang.contract.ts +3 -3
- package/hotels/sites/hotel-pages.api.ts +24 -0
- package/hotels/sites/index.ts +1 -0
- package/hotels/themes/contracts/find-hotel-theme.contract.ts +3 -3
- package/hotels/themes/hotel-themes.api.ts +20 -0
- package/hotels/themes/index.ts +1 -0
- package/package.json +1 -1
- package/permissions/contracts/delete-permission.contract.ts +1 -2
- package/permissions/contracts/find-permission.contract.ts +0 -8
- package/permissions/permission.models.ts +1 -19
- package/roles/contracts/delete-role.contract.ts +1 -2
- package/translate/contracts/translate-object.contract.ts +3 -0
- package/build/permissions/permission.response.schema.js +0 -8
- package/hotels/hotel.model.ts +0 -14
- package/permissions/permission.response.schema.ts +0 -8
|
@@ -8,16 +8,17 @@ exports.ICON_KEYS = {
|
|
|
8
8
|
chevronRight: 'chevronRight',
|
|
9
9
|
arrowDown: 'arrowDown',
|
|
10
10
|
arrowUp: 'arrowUp',
|
|
11
|
+
ellipsis: 'ellipsis',
|
|
12
|
+
plus: 'plus',
|
|
11
13
|
moon: 'moon',
|
|
12
14
|
sun: 'sun',
|
|
13
15
|
menu: 'menu',
|
|
14
|
-
ellipsis: 'ellipsis',
|
|
15
16
|
filter: 'filter',
|
|
16
17
|
resetFilter: 'resetFilter',
|
|
17
18
|
sorting: 'sorting',
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
circlePlus: 'circlePlus',
|
|
20
|
+
squarePen: 'squarePen',
|
|
21
|
+
trash: 'trash',
|
|
21
22
|
search: 'search',
|
|
22
23
|
language: 'language',
|
|
23
24
|
magic: 'magic',
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DomainNameSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const DOMAIN_NAME_REGEXP = /^(?!-)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/i;
|
|
39
|
+
exports.DomainNameSchema = z
|
|
40
|
+
.string()
|
|
41
|
+
.min(1)
|
|
42
|
+
.max(253)
|
|
43
|
+
.regex(DOMAIN_NAME_REGEXP, 'Domain must be a valid hostname like example.com or app.example.com');
|
|
@@ -23,6 +23,8 @@ __exportStar(require("./pagination.schema"), exports);
|
|
|
23
23
|
__exportStar(require("./search.schema"), exports);
|
|
24
24
|
__exportStar(require("./slug.schema"), exports);
|
|
25
25
|
__exportStar(require("./timestamp.schemas"), exports);
|
|
26
|
+
__exportStar(require("./timezone.schema"), exports);
|
|
26
27
|
__exportStar(require("./language-keys.schema"), exports);
|
|
27
28
|
__exportStar(require("./translations.schemas"), exports);
|
|
28
29
|
__exportStar(require("./uuid-array.schema"), exports);
|
|
30
|
+
__exportStar(require("./domain-name.schema"), exports);
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TimestampWithDeletedSchema = exports.TimestampSchema = void 0;
|
|
36
|
+
exports.IsoTimeSchema = exports.IsoDateSchema = exports.IsoDatetimeSchema = exports.TimestampWithDeletedSchema = exports.TimestampSchema = void 0;
|
|
37
37
|
const z = __importStar(require("zod"));
|
|
38
38
|
exports.TimestampSchema = z.object({
|
|
39
39
|
createdAt: z.date(),
|
|
@@ -42,3 +42,6 @@ exports.TimestampSchema = z.object({
|
|
|
42
42
|
exports.TimestampWithDeletedSchema = exports.TimestampSchema.extend({
|
|
43
43
|
deletedAt: z.date().nullable(),
|
|
44
44
|
});
|
|
45
|
+
exports.IsoDatetimeSchema = z.iso.datetime();
|
|
46
|
+
exports.IsoDateSchema = z.iso.date();
|
|
47
|
+
exports.IsoTimeSchema = z.iso.time();
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.TimezoneSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
exports.TimezoneSchema = z
|
|
39
|
+
.string()
|
|
40
|
+
.refine(value => /^[A-Za-z]+(?:[_-][A-Za-z]+)?\/[A-Za-z]+(?:[_-][A-Za-z]+)?$/.test(value), {
|
|
41
|
+
params: {
|
|
42
|
+
messageKey: 'z.timezone.invalidFormat',
|
|
43
|
+
},
|
|
44
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.HotelAmenitySchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const constants_1 = require("../constants");
|
|
39
|
+
exports.HotelAmenitySchema = z.object({
|
|
40
|
+
hotelId: z.uuid(),
|
|
41
|
+
amenityCode: z.enum(constants_1.HOTEL_AMENITY_VALUES),
|
|
42
|
+
isPrimary: z.boolean().default(false),
|
|
43
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./hotel-amenity.model"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTEL_AMENITY_VALUES = exports.HOTEL_AMENITIES = void 0;
|
|
4
|
+
exports.HOTEL_AMENITIES = {
|
|
5
|
+
wifi: 'wifi',
|
|
6
|
+
parking: 'parking',
|
|
7
|
+
pool: 'pool',
|
|
8
|
+
spa: 'spa',
|
|
9
|
+
gym: 'gym',
|
|
10
|
+
restaurant: 'restaurant',
|
|
11
|
+
bar: 'bar',
|
|
12
|
+
conferenceRoom: 'conferenceRoom',
|
|
13
|
+
businessCenter: 'businessCenter',
|
|
14
|
+
};
|
|
15
|
+
exports.HOTEL_AMENITY_VALUES = Object.values(exports.HOTEL_AMENITIES);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTEL_CONTACT_TYPE_VALUES = exports.HOTEL_CONTACT_TYPES = void 0;
|
|
4
|
+
exports.HOTEL_CONTACT_TYPES = {
|
|
5
|
+
mainPhone: 'mainPhone',
|
|
6
|
+
reservations: 'reservations',
|
|
7
|
+
sales: 'sales',
|
|
8
|
+
};
|
|
9
|
+
exports.HOTEL_CONTACT_TYPE_VALUES = Object.values(exports.HOTEL_CONTACT_TYPES);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTEL_FEATURE_VALUES = exports.HOTEL_FEATURES = void 0;
|
|
4
|
+
exports.HOTEL_FEATURES = {
|
|
5
|
+
site: 'site',
|
|
6
|
+
services: 'services',
|
|
7
|
+
digitalSignage: 'digitalSignage',
|
|
8
|
+
hskRoomStatus: 'hskRoomStatus',
|
|
9
|
+
fbBreakfastCheckin: 'fbBreakfastCheckin',
|
|
10
|
+
};
|
|
11
|
+
exports.HOTEL_FEATURE_VALUES = Object.values(exports.HOTEL_FEATURES);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTEL_INTEGRATION_PROVIDER_VALUES = exports.HOTEL_INTEGRATION_PROVIDERS = void 0;
|
|
4
|
+
exports.HOTEL_INTEGRATION_PROVIDERS = {
|
|
5
|
+
opera: 'opera',
|
|
6
|
+
};
|
|
7
|
+
exports.HOTEL_INTEGRATION_PROVIDER_VALUES = Object.values(exports.HOTEL_INTEGRATION_PROVIDERS);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTEL_POLICY_TYPE_VALUES = exports.HOTEL_POLICY_TYPES = void 0;
|
|
4
|
+
exports.HOTEL_POLICY_TYPES = {
|
|
5
|
+
cancellation: 'cancellation',
|
|
6
|
+
deposit: 'deposit',
|
|
7
|
+
meal: 'meal',
|
|
8
|
+
pet: 'pet',
|
|
9
|
+
smoking: 'smoking',
|
|
10
|
+
};
|
|
11
|
+
exports.HOTEL_POLICY_TYPE_VALUES = Object.values(exports.HOTEL_POLICY_TYPES);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTEL_RATING_SOURCE_VALUES = exports.HOTEL_RATING_SOURCES = void 0;
|
|
4
|
+
exports.HOTEL_RATING_SOURCES = {
|
|
5
|
+
google: 'google',
|
|
6
|
+
yandexMaps: 'yandexMaps',
|
|
7
|
+
ostrovok: 'ostrovok',
|
|
8
|
+
};
|
|
9
|
+
exports.HOTEL_RATING_SOURCE_VALUES = Object.values(exports.HOTEL_RATING_SOURCES);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./hotel-amenity.constant"), exports);
|
|
18
|
+
__exportStar(require("./hotel-contact-type.constant"), exports);
|
|
19
|
+
__exportStar(require("./hotel-feature.constant"), exports);
|
|
20
|
+
__exportStar(require("./hotel-integration-provider.constant"), exports);
|
|
21
|
+
__exportStar(require("./hotel-policy-type.constant"), exports);
|
|
22
|
+
__exportStar(require("./hotel-rating-source.constant"), exports);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.HotelContactSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const constants_1 = require("../constants");
|
|
39
|
+
const common_1 = require("../../common");
|
|
40
|
+
exports.HotelContactSchema = z
|
|
41
|
+
.object({
|
|
42
|
+
hotelId: z.uuid(),
|
|
43
|
+
contactType: z.enum(constants_1.HOTEL_CONTACT_TYPE_VALUES),
|
|
44
|
+
value: z.string().min(1),
|
|
45
|
+
isPublic: z.boolean().default(true),
|
|
46
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
47
|
+
})
|
|
48
|
+
.extend(common_1.TimestampSchema.shape);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./hotel-contact.model"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateHotelContract = void 0;
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
|
+
const hotels_api_1 = require("../hotels.api");
|
|
6
|
+
const hotel_models_1 = require("../hotel.models");
|
|
7
|
+
var CreateHotelContract;
|
|
8
|
+
(function (CreateHotelContract) {
|
|
9
|
+
CreateHotelContract.getUrl = hotels_api_1.HOTELS_API.create;
|
|
10
|
+
CreateHotelContract.endpoint = hotels_api_1.HOTELS_CONTROLLER.endpoints.create;
|
|
11
|
+
CreateHotelContract.httpMethod = common_1.HTTP_METHODS.post;
|
|
12
|
+
CreateHotelContract.RequestSchema = hotel_models_1.HotelWithTranslationsSchema.omit({
|
|
13
|
+
id: true,
|
|
14
|
+
version: true,
|
|
15
|
+
createdAt: true,
|
|
16
|
+
updatedAt: true,
|
|
17
|
+
});
|
|
18
|
+
CreateHotelContract.ResponseSchema = hotel_models_1.HotelWithTranslationsSchema;
|
|
19
|
+
})(CreateHotelContract || (exports.CreateHotelContract = CreateHotelContract = {}));
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DeleteHotelContract = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const common_1 = require("../../common");
|
|
39
|
+
const hotels_api_1 = require("../hotels.api");
|
|
40
|
+
var DeleteHotelContract;
|
|
41
|
+
(function (DeleteHotelContract) {
|
|
42
|
+
DeleteHotelContract.getUrl = hotels_api_1.HOTELS_API.deleteById;
|
|
43
|
+
DeleteHotelContract.endpoint = hotels_api_1.HOTELS_CONTROLLER.endpoints.deleteById;
|
|
44
|
+
DeleteHotelContract.httpMethod = common_1.HTTP_METHODS.delete;
|
|
45
|
+
DeleteHotelContract.ResponseSchema = z.void();
|
|
46
|
+
})(DeleteHotelContract || (exports.DeleteHotelContract = DeleteHotelContract = {}));
|
|
@@ -1,2 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindHotelBySlugContract = exports.FindHotelByIdContract = void 0;
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
|
+
const hotel_models_1 = require("../hotel.models");
|
|
6
|
+
const hotels_api_1 = require("../hotels.api");
|
|
7
|
+
var FindHotelByIdContract;
|
|
8
|
+
(function (FindHotelByIdContract) {
|
|
9
|
+
FindHotelByIdContract.getUrl = hotels_api_1.HOTELS_API.findById;
|
|
10
|
+
FindHotelByIdContract.endpoint = hotels_api_1.HOTELS_CONTROLLER.endpoints.findById;
|
|
11
|
+
FindHotelByIdContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
12
|
+
FindHotelByIdContract.ResponseSchema = hotel_models_1.HotelWithTranslationsSchema;
|
|
13
|
+
})(FindHotelByIdContract || (exports.FindHotelByIdContract = FindHotelByIdContract = {}));
|
|
14
|
+
var FindHotelBySlugContract;
|
|
15
|
+
(function (FindHotelBySlugContract) {
|
|
16
|
+
FindHotelBySlugContract.getUrl = hotels_api_1.HOTELS_API.findBySlug;
|
|
17
|
+
FindHotelBySlugContract.endpoint = hotels_api_1.HOTELS_CONTROLLER.endpoints.findBySlug;
|
|
18
|
+
FindHotelBySlugContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
19
|
+
FindHotelBySlugContract.ResponseSchema = hotel_models_1.HotelWithTranslationsSchema;
|
|
20
|
+
})(FindHotelBySlugContract || (exports.FindHotelBySlugContract = FindHotelBySlugContract = {}));
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.FindManyHotelsContract = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const common_1 = require("../../common");
|
|
39
|
+
const hotel_models_1 = require("../hotel.models");
|
|
40
|
+
const hotels_api_1 = require("../hotels.api");
|
|
41
|
+
const BaseQuerySchema = hotel_models_1.HotelListItemSchema.pick({
|
|
42
|
+
status: true,
|
|
43
|
+
category: true,
|
|
44
|
+
stars: true,
|
|
45
|
+
}).partial();
|
|
46
|
+
const OrderBySchema = hotel_models_1.HotelListItemSchema.omit({
|
|
47
|
+
id: true,
|
|
48
|
+
}).keyof();
|
|
49
|
+
const FindManyHotelsContractRequestSchema = BaseQuerySchema.extend({
|
|
50
|
+
...common_1.CommonQueryParamsSchema.shape,
|
|
51
|
+
orderBy: OrderBySchema.optional(),
|
|
52
|
+
});
|
|
53
|
+
const FindManyHotelsContractResponseSchema = z
|
|
54
|
+
.object({
|
|
55
|
+
hotels: z.array(hotel_models_1.HotelListItemSchema),
|
|
56
|
+
})
|
|
57
|
+
.extend(common_1.PaginationResponseSchema.shape);
|
|
58
|
+
var FindManyHotelsContract;
|
|
59
|
+
(function (FindManyHotelsContract) {
|
|
60
|
+
FindManyHotelsContract.getUrl = hotels_api_1.HOTELS_API.findMany;
|
|
61
|
+
FindManyHotelsContract.endpoint = hotels_api_1.HOTELS_CONTROLLER.endpoints.findMany;
|
|
62
|
+
FindManyHotelsContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
63
|
+
FindManyHotelsContract.BaseFilterSchema = BaseQuerySchema;
|
|
64
|
+
FindManyHotelsContract.SORTING_KEYS = OrderBySchema.options;
|
|
65
|
+
FindManyHotelsContract.RequestSchema = FindManyHotelsContractRequestSchema;
|
|
66
|
+
FindManyHotelsContract.ResponseSchema = FindManyHotelsContractResponseSchema;
|
|
67
|
+
})(FindManyHotelsContract || (exports.FindManyHotelsContract = FindManyHotelsContract = {}));
|
|
@@ -15,3 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./find-hotel.contract"), exports);
|
|
18
|
+
__exportStar(require("./find-many-hotels.contract"), exports);
|
|
19
|
+
__exportStar(require("./update-hotel.contract"), exports);
|
|
20
|
+
__exportStar(require("./delete-hotel.contract"), exports);
|
|
21
|
+
__exportStar(require("./create-hotel.contract"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateHotelContract = void 0;
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
|
+
const hotels_api_1 = require("../hotels.api");
|
|
6
|
+
const hotel_models_1 = require("../hotel.models");
|
|
7
|
+
const create_hotel_contract_1 = require("./create-hotel.contract");
|
|
8
|
+
var UpdateHotelContract;
|
|
9
|
+
(function (UpdateHotelContract) {
|
|
10
|
+
UpdateHotelContract.getUrl = hotels_api_1.HOTELS_API.updateById;
|
|
11
|
+
UpdateHotelContract.endpoint = hotels_api_1.HOTELS_CONTROLLER.endpoints.updateById;
|
|
12
|
+
UpdateHotelContract.httpMethod = common_1.HTTP_METHODS.put;
|
|
13
|
+
UpdateHotelContract.RequestSchema = create_hotel_contract_1.CreateHotelContract.RequestSchema;
|
|
14
|
+
UpdateHotelContract.ResponseSchema = hotel_models_1.HotelWithTranslationsSchema;
|
|
15
|
+
})(UpdateHotelContract || (exports.UpdateHotelContract = UpdateHotelContract = {}));
|
|
@@ -33,16 +33,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
36
|
+
exports.HotelFeatureSchema = void 0;
|
|
37
37
|
const z = __importStar(require("zod"));
|
|
38
|
-
const common_1 = require("
|
|
39
|
-
|
|
38
|
+
const common_1 = require("../../common");
|
|
39
|
+
const constants_1 = require("../constants");
|
|
40
|
+
exports.HotelFeatureSchema = z
|
|
40
41
|
.object({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
defaultLang: z.enum(common_1.LANGUAGE_KEYS),
|
|
46
|
-
availableLangs: z.array(z.enum(common_1.LANGUAGE_KEYS)),
|
|
42
|
+
hotelId: z.uuid(),
|
|
43
|
+
feature: z.enum(constants_1.HOTEL_FEATURE_VALUES),
|
|
44
|
+
enabled: z.boolean(),
|
|
45
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
47
46
|
})
|
|
48
47
|
.extend(common_1.TimestampSchema.shape);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./hotel-feature.model"), exports);
|