hh-contracts 0.0.95 → 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/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/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
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.HOTELS_API = exports.HOTELS_CONTROLLER = void 0;
|
|
4
4
|
const utils_1 = require("../common/utils");
|
|
5
|
-
exports.
|
|
6
|
-
prefix: 'hotels
|
|
5
|
+
exports.HOTELS_CONTROLLER = {
|
|
6
|
+
prefix: 'hotels',
|
|
7
7
|
endpoints: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
create: '',
|
|
9
|
+
findMany: '',
|
|
10
|
+
findById: 'by-id/:hotelId',
|
|
11
|
+
updateById: 'by-id/:hotelId',
|
|
12
|
+
deleteById: 'by-id/:hotelId',
|
|
13
|
+
findBySlug: 'by-slug/:hotelSlug',
|
|
11
14
|
},
|
|
12
15
|
};
|
|
13
|
-
exports.
|
|
16
|
+
exports.HOTELS_API = (0, utils_1.createApi)(exports.HOTELS_CONTROLLER);
|
package/build/hotels/index.js
CHANGED
|
@@ -15,7 +15,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./contracts"), exports);
|
|
18
|
+
__exportStar(require("./constants"), exports);
|
|
19
|
+
__exportStar(require("./amenities"), exports);
|
|
20
|
+
__exportStar(require("./contacts"), exports);
|
|
21
|
+
__exportStar(require("./features"), exports);
|
|
22
|
+
__exportStar(require("./integrations"), exports);
|
|
23
|
+
__exportStar(require("./location"), exports);
|
|
24
|
+
__exportStar(require("./policies"), exports);
|
|
25
|
+
__exportStar(require("./ratings"), exports);
|
|
18
26
|
__exportStar(require("./sites"), exports);
|
|
27
|
+
__exportStar(require("./settings"), exports);
|
|
19
28
|
__exportStar(require("./themes"), exports);
|
|
20
|
-
__exportStar(require("./hotel.
|
|
29
|
+
__exportStar(require("./hotel.models"), exports);
|
|
21
30
|
__exportStar(require("./hotels.api"), exports);
|
|
@@ -0,0 +1,59 @@
|
|
|
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.HotelIntegrationCredentialSchema = exports.HotelIntegrationSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const common_1 = require("../../common");
|
|
39
|
+
const constants_1 = require("../constants");
|
|
40
|
+
exports.HotelIntegrationSchema = z
|
|
41
|
+
.object({
|
|
42
|
+
hotelId: z.uuid(),
|
|
43
|
+
provider: z.enum(constants_1.HOTEL_INTEGRATION_PROVIDER_VALUES),
|
|
44
|
+
externalHotelId: z.string().min(1),
|
|
45
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
46
|
+
credentialId: z.uuid().optional(),
|
|
47
|
+
})
|
|
48
|
+
.extend(common_1.TimestampSchema.shape);
|
|
49
|
+
exports.HotelIntegrationCredentialSchema = z
|
|
50
|
+
.object({
|
|
51
|
+
id: z.uuid(),
|
|
52
|
+
provider: z.enum(constants_1.HOTEL_INTEGRATION_PROVIDER_VALUES),
|
|
53
|
+
login: z.string().min(1),
|
|
54
|
+
encryptedSecret: z.string().min(1),
|
|
55
|
+
encryptionVersion: z.string().min(1),
|
|
56
|
+
meta: z.record(z.string(), z.unknown()).optional(),
|
|
57
|
+
rotatedAt: z.date().nullable(),
|
|
58
|
+
})
|
|
59
|
+
.extend(common_1.TimestampSchema.shape);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTEL_INTEGRATIONS_API = exports.HOTEL_INTEGRATIONS_CONTROLLER = void 0;
|
|
4
|
+
const utils_1 = require("../../common/utils");
|
|
5
|
+
exports.HOTEL_INTEGRATIONS_CONTROLLER = {
|
|
6
|
+
prefix: 'hotels/by-id/:hotelId/integrations',
|
|
7
|
+
endpoints: {
|
|
8
|
+
findMany: '',
|
|
9
|
+
findOne: ':integrationId',
|
|
10
|
+
create: '',
|
|
11
|
+
update: ':integrationId',
|
|
12
|
+
delete: ':integrationId',
|
|
13
|
+
enable: ':integrationId/enable',
|
|
14
|
+
disable: ':integrationId/disable',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
exports.HOTEL_INTEGRATIONS_API = (0, utils_1.createApi)(exports.HOTEL_INTEGRATIONS_CONTROLLER);
|
|
@@ -0,0 +1,18 @@
|
|
|
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-integration.model"), exports);
|
|
18
|
+
__exportStar(require("./hotel-integrations.api"), exports);
|
|
@@ -0,0 +1,51 @@
|
|
|
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.HotelLocationSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const common_1 = require("../../common");
|
|
39
|
+
exports.HotelLocationSchema = z
|
|
40
|
+
.object({
|
|
41
|
+
hotelId: z.uuid(),
|
|
42
|
+
countryCode: z.string().length(2),
|
|
43
|
+
regionCode: z.string().max(32).optional(),
|
|
44
|
+
city: z.string().min(1).max(128),
|
|
45
|
+
addressLine1: z.string().min(1).max(256),
|
|
46
|
+
addressLine2: z.string().max(256).optional(),
|
|
47
|
+
postalCode: z.string().max(16).optional(),
|
|
48
|
+
latitude: z.number().min(-90).max(90),
|
|
49
|
+
longitude: z.number().min(-180).max(180),
|
|
50
|
+
})
|
|
51
|
+
.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-location.model"), exports);
|
|
@@ -0,0 +1,49 @@
|
|
|
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.HotelPolicySchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const common_1 = require("../../common");
|
|
39
|
+
const constants_1 = require("../constants");
|
|
40
|
+
exports.HotelPolicySchema = z
|
|
41
|
+
.object({
|
|
42
|
+
hotelId: z.uuid(),
|
|
43
|
+
policyType: z.enum(constants_1.HOTEL_POLICY_TYPE_VALUES),
|
|
44
|
+
valueKey: z.string().min(1).optional(),
|
|
45
|
+
valueJson: z.record(z.string(), z.unknown()).optional(),
|
|
46
|
+
effectiveFrom: z.date().optional(),
|
|
47
|
+
effectiveTo: z.date().optional(),
|
|
48
|
+
})
|
|
49
|
+
.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-policy.model"), 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.HotelRatingSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const common_1 = require("../../common");
|
|
39
|
+
const constants_1 = require("../constants");
|
|
40
|
+
exports.HotelRatingSchema = z
|
|
41
|
+
.object({
|
|
42
|
+
hotelId: z.uuid(),
|
|
43
|
+
source: z.enum(constants_1.HOTEL_RATING_SOURCE_VALUES),
|
|
44
|
+
value: z.number().min(0).max(10),
|
|
45
|
+
reviewsCount: z.number().int().nonnegative().optional(),
|
|
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-rating.model"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindHotelDomainSettingsContract = void 0;
|
|
4
|
+
const common_1 = require("../../../common");
|
|
5
|
+
const hotel_domain_settings_api_1 = require("../hotel-domain-settings.api");
|
|
6
|
+
const hotel_domain_settings_schema_1 = require("../hotel-domain-settings.schema");
|
|
7
|
+
var FindHotelDomainSettingsContract;
|
|
8
|
+
(function (FindHotelDomainSettingsContract) {
|
|
9
|
+
FindHotelDomainSettingsContract.getUrl = hotel_domain_settings_api_1.HOTEL_DOMAIN_SETTINGS_API.find;
|
|
10
|
+
FindHotelDomainSettingsContract.endpoint = hotel_domain_settings_api_1.HOTEL_DOMAIN_SETTINGS_CONTROLLER.endpoints.find;
|
|
11
|
+
FindHotelDomainSettingsContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
12
|
+
FindHotelDomainSettingsContract.ResponseSchema = hotel_domain_settings_schema_1.HotelDomainSettingsListSchema;
|
|
13
|
+
})(FindHotelDomainSettingsContract || (exports.FindHotelDomainSettingsContract = FindHotelDomainSettingsContract = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./find-hotel-domain-settings.contract"), exports);
|
|
18
|
+
__exportStar(require("./update-hotel-domain-settings.contract"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateHotelDomainSettingsContract = void 0;
|
|
4
|
+
const common_1 = require("../../../common");
|
|
5
|
+
const hotel_domain_settings_api_1 = require("../hotel-domain-settings.api");
|
|
6
|
+
const hotel_domain_settings_schema_1 = require("../hotel-domain-settings.schema");
|
|
7
|
+
var UpdateHotelDomainSettingsContract;
|
|
8
|
+
(function (UpdateHotelDomainSettingsContract) {
|
|
9
|
+
UpdateHotelDomainSettingsContract.getUrl = hotel_domain_settings_api_1.HOTEL_DOMAIN_SETTINGS_API.update;
|
|
10
|
+
UpdateHotelDomainSettingsContract.endpoint = hotel_domain_settings_api_1.HOTEL_DOMAIN_SETTINGS_CONTROLLER.endpoints.update;
|
|
11
|
+
UpdateHotelDomainSettingsContract.httpMethod = common_1.HTTP_METHODS.put;
|
|
12
|
+
UpdateHotelDomainSettingsContract.RequestSchema = hotel_domain_settings_schema_1.HotelDomainSettingsSchema;
|
|
13
|
+
UpdateHotelDomainSettingsContract.ResponseSchema = hotel_domain_settings_schema_1.HotelDomainSettingsPersistedSchema;
|
|
14
|
+
})(UpdateHotelDomainSettingsContract || (exports.UpdateHotelDomainSettingsContract = UpdateHotelDomainSettingsContract = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTEL_DOMAIN_SETTINGS_API = exports.HOTEL_DOMAIN_SETTINGS_CONTROLLER = void 0;
|
|
4
|
+
const utils_1 = require("../../common/utils");
|
|
5
|
+
exports.HOTEL_DOMAIN_SETTINGS_CONTROLLER = {
|
|
6
|
+
prefix: 'hotels/by-id/:hotelId/settings/domains',
|
|
7
|
+
endpoints: {
|
|
8
|
+
find: '',
|
|
9
|
+
update: '',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
exports.HOTEL_DOMAIN_SETTINGS_API = (0, utils_1.createApi)(exports.HOTEL_DOMAIN_SETTINGS_CONTROLLER);
|
|
@@ -0,0 +1,49 @@
|
|
|
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.HotelDomainSettingsListSchema = exports.HotelDomainSettingsPersistedSchema = exports.HotelDomainSettingsSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const common_1 = require("../../common");
|
|
39
|
+
exports.HotelDomainSettingsSchema = z.object({
|
|
40
|
+
kindOfApp: z.enum(common_1.KIND_OF_APP_VALUES),
|
|
41
|
+
customDomain: common_1.DomainNameSchema.optional(),
|
|
42
|
+
isCustomDomainVerified: z.boolean().default(false),
|
|
43
|
+
customDomainVerifiedAt: common_1.IsoDatetimeSchema.optional(),
|
|
44
|
+
});
|
|
45
|
+
exports.HotelDomainSettingsPersistedSchema = exports.HotelDomainSettingsSchema.extend({
|
|
46
|
+
id: z.uuid(),
|
|
47
|
+
hotelId: z.uuid(),
|
|
48
|
+
}).extend(common_1.TimestampSchema.shape);
|
|
49
|
+
exports.HotelDomainSettingsListSchema = z.array(exports.HotelDomainSettingsPersistedSchema);
|
|
@@ -0,0 +1,19 @@
|
|
|
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-domain-settings.schema"), exports);
|
|
18
|
+
__exportStar(require("./hotel-domain-settings.api"), exports);
|
|
19
|
+
__exportStar(require("./contracts"), exports);
|
|
@@ -36,7 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.FindHotelSitePageByLangContract = void 0;
|
|
37
37
|
const z = __importStar(require("zod"));
|
|
38
38
|
const common_1 = require("../../../common");
|
|
39
|
-
const
|
|
39
|
+
const hotel_pages_api_1 = require("../hotel-pages.api");
|
|
40
40
|
const pages_1 = require("../../../pages");
|
|
41
41
|
const FindHotelSitePageByLangContractRequestSchema = z.object({
|
|
42
42
|
lang: common_1.LanguageKeysSchema,
|
|
@@ -48,8 +48,8 @@ const FindHotelSitePageByLangContractResponseSchema = pages_1.PageSchema.omit({
|
|
|
48
48
|
});
|
|
49
49
|
var FindHotelSitePageByLangContract;
|
|
50
50
|
(function (FindHotelSitePageByLangContract) {
|
|
51
|
-
FindHotelSitePageByLangContract.getUrl =
|
|
52
|
-
FindHotelSitePageByLangContract.endpoint =
|
|
51
|
+
FindHotelSitePageByLangContract.getUrl = hotel_pages_api_1.HOTEL_PAGES_PUBLIC_API.findBySlugAndLang;
|
|
52
|
+
FindHotelSitePageByLangContract.endpoint = hotel_pages_api_1.HOTEL_PAGES_PUBLIC_CONTROLLER.endpoints.findBySlugAndLang;
|
|
53
53
|
FindHotelSitePageByLangContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
54
54
|
FindHotelSitePageByLangContract.RequestSchema = FindHotelSitePageByLangContractRequestSchema;
|
|
55
55
|
FindHotelSitePageByLangContract.ResponseSchema = FindHotelSitePageByLangContractResponseSchema;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTEL_PAGES_PUBLIC_API = exports.HOTEL_PAGES_API = exports.HOTEL_PAGES_PUBLIC_CONTROLLER = exports.HOTEL_PAGES_CONTROLLER = void 0;
|
|
4
|
+
const utils_1 = require("../../common/utils");
|
|
5
|
+
exports.HOTEL_PAGES_CONTROLLER = {
|
|
6
|
+
prefix: 'hotels/by-id/:hotelId/sites/pages',
|
|
7
|
+
endpoints: {
|
|
8
|
+
findMany: '',
|
|
9
|
+
findBySlug: ':slug',
|
|
10
|
+
findBySlugAndLang: ':slug/lang/:lang',
|
|
11
|
+
create: '',
|
|
12
|
+
update: ':slug',
|
|
13
|
+
delete: ':slug',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
exports.HOTEL_PAGES_PUBLIC_CONTROLLER = {
|
|
17
|
+
prefix: 'hotels/by-slug/:hotelSlug/sites/pages',
|
|
18
|
+
endpoints: {
|
|
19
|
+
findBySlug: ':slug',
|
|
20
|
+
findBySlugAndLang: ':slug/lang/:lang',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
exports.HOTEL_PAGES_API = (0, utils_1.createApi)(exports.HOTEL_PAGES_CONTROLLER);
|
|
24
|
+
exports.HOTEL_PAGES_PUBLIC_API = (0, utils_1.createApi)(exports.HOTEL_PAGES_PUBLIC_CONTROLLER);
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./hotel-pages.api"), exports);
|
|
17
18
|
__exportStar(require("./contracts"), exports);
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FindHotelThemeContract = void 0;
|
|
4
4
|
const common_1 = require("../../../common");
|
|
5
5
|
const theme_models_1 = require("../theme.models");
|
|
6
|
-
const
|
|
6
|
+
const hotel_themes_api_1 = require("../hotel-themes.api");
|
|
7
7
|
var FindHotelThemeContract;
|
|
8
8
|
(function (FindHotelThemeContract) {
|
|
9
|
-
FindHotelThemeContract.getUrl =
|
|
10
|
-
FindHotelThemeContract.endpoint =
|
|
9
|
+
FindHotelThemeContract.getUrl = hotel_themes_api_1.HOTEL_THEMES_PUBLIC_API.get;
|
|
10
|
+
FindHotelThemeContract.endpoint = hotel_themes_api_1.HOTEL_THEMES_PUBLIC_CONTROLLER.endpoints.get;
|
|
11
11
|
FindHotelThemeContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
12
12
|
FindHotelThemeContract.ResponseSchema = theme_models_1.ThemePersistedSchema;
|
|
13
13
|
})(FindHotelThemeContract || (exports.FindHotelThemeContract = FindHotelThemeContract = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTEL_THEMES_PUBLIC_API = exports.HOTEL_THEMES_API = exports.HOTEL_THEMES_PUBLIC_CONTROLLER = exports.HOTEL_THEMES_CONTROLLER = void 0;
|
|
4
|
+
const utils_1 = require("../../common/utils");
|
|
5
|
+
exports.HOTEL_THEMES_CONTROLLER = {
|
|
6
|
+
prefix: 'hotels/by-id/:hotelId/theme',
|
|
7
|
+
endpoints: {
|
|
8
|
+
get: '',
|
|
9
|
+
upsert: '',
|
|
10
|
+
delete: '',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
exports.HOTEL_THEMES_PUBLIC_CONTROLLER = {
|
|
14
|
+
prefix: 'hotels/by-slug/:hotelSlug/theme',
|
|
15
|
+
endpoints: {
|
|
16
|
+
get: '',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
exports.HOTEL_THEMES_API = (0, utils_1.createApi)(exports.HOTEL_THEMES_CONTROLLER);
|
|
20
|
+
exports.HOTEL_THEMES_PUBLIC_API = (0, utils_1.createApi)(exports.HOTEL_THEMES_PUBLIC_CONTROLLER);
|
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./constants"), exports);
|
|
18
18
|
__exportStar(require("./theme.models"), exports);
|
|
19
|
+
__exportStar(require("./hotel-themes.api"), exports);
|
|
19
20
|
__exportStar(require("./contracts"), exports);
|
|
@@ -1,13 +1,46 @@
|
|
|
1
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.DeletePermissionContract = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
4
38
|
const common_1 = require("../../common");
|
|
5
39
|
const permissions_api_1 = require("../permissions.api");
|
|
6
|
-
const permission_models_1 = require("../permission.models");
|
|
7
40
|
var DeletePermissionContract;
|
|
8
41
|
(function (DeletePermissionContract) {
|
|
9
42
|
DeletePermissionContract.getUrl = permissions_api_1.PERMISSIONS_API.delete;
|
|
10
43
|
DeletePermissionContract.endpoint = permissions_api_1.PERMISSIONS_CONTROLLER.endpoints.delete;
|
|
11
44
|
DeletePermissionContract.httpMethod = common_1.HTTP_METHODS.delete;
|
|
12
|
-
DeletePermissionContract.ResponseSchema =
|
|
45
|
+
DeletePermissionContract.ResponseSchema = z.void();
|
|
13
46
|
})(DeletePermissionContract || (exports.DeletePermissionContract = DeletePermissionContract = {}));
|
|
@@ -4,17 +4,10 @@ exports.FindPermissionContract = void 0;
|
|
|
4
4
|
const common_1 = require("../../common");
|
|
5
5
|
const permission_models_1 = require("../permission.models");
|
|
6
6
|
const permissions_api_1 = require("../permissions.api");
|
|
7
|
-
// const FindPermissionContractResponseSchema = PersistedPermissionSchema.transform(
|
|
8
|
-
// ({ conditions, ...permission }) => ({
|
|
9
|
-
// ...permission,
|
|
10
|
-
// conditions: conditions === null ? undefined : conditions,
|
|
11
|
-
// }),
|
|
12
|
-
// );
|
|
13
7
|
var FindPermissionContract;
|
|
14
8
|
(function (FindPermissionContract) {
|
|
15
9
|
FindPermissionContract.getUrl = permissions_api_1.PERMISSIONS_API.find;
|
|
16
10
|
FindPermissionContract.endpoint = permissions_api_1.PERMISSIONS_CONTROLLER.endpoints.find;
|
|
17
11
|
FindPermissionContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
18
|
-
// export const ResponseSchema = FindPermissionContractResponseSchema;
|
|
19
12
|
FindPermissionContract.ResponseSchema = permission_models_1.PermissionWithTranslationsSchema;
|
|
20
13
|
})(FindPermissionContract || (exports.FindPermissionContract = FindPermissionContract = {}));
|