hh-contracts 0.0.74 → 0.0.75
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/hotels/hotels.api.js +7 -7
- package/build/hotels/sites/contracts/find-hotel-site-page-by-lang.contract.js +2 -2
- package/build/hotels/themes/contracts/find-hotel-theme.contract.js +2 -2
- package/hotels/hotels.api.ts +6 -6
- package/hotels/sites/contracts/find-hotel-site-page-by-lang.contract.ts +3 -3
- package/hotels/themes/contracts/find-hotel-theme.contract.ts +3 -3
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.HOTELS_BY_SLUG_API = exports.HOTELS_BY_SLUG_CONTROLLER = void 0;
|
|
4
4
|
const utils_1 = require("../common/utils");
|
|
5
|
-
exports.
|
|
6
|
-
prefix: 'hotels',
|
|
5
|
+
exports.HOTELS_BY_SLUG_CONTROLLER = {
|
|
6
|
+
prefix: 'hotels/by-slug',
|
|
7
7
|
endpoints: {
|
|
8
|
-
findTheme: '
|
|
9
|
-
findSitePageByLang: '
|
|
10
|
-
findSitePage: '
|
|
8
|
+
findTheme: ':hotelSlug/theme',
|
|
9
|
+
findSitePageByLang: ':hotelSlug/sites/pages/:slug',
|
|
10
|
+
findSitePage: ':hotelSlug/sites/pages/:slug',
|
|
11
11
|
},
|
|
12
12
|
};
|
|
13
|
-
exports.
|
|
13
|
+
exports.HOTELS_BY_SLUG_API = (0, utils_1.createApi)(exports.HOTELS_BY_SLUG_CONTROLLER);
|
|
@@ -48,8 +48,8 @@ const FindHotelSitePageByLangContractResponseSchema = pages_1.PageSchema.omit({
|
|
|
48
48
|
});
|
|
49
49
|
var FindHotelSitePageByLangContract;
|
|
50
50
|
(function (FindHotelSitePageByLangContract) {
|
|
51
|
-
FindHotelSitePageByLangContract.getUrl = hotels_api_1.
|
|
52
|
-
FindHotelSitePageByLangContract.endpoint = hotels_api_1.
|
|
51
|
+
FindHotelSitePageByLangContract.getUrl = hotels_api_1.HOTELS_BY_SLUG_API.findSitePageByLang;
|
|
52
|
+
FindHotelSitePageByLangContract.endpoint = hotels_api_1.HOTELS_BY_SLUG_CONTROLLER.endpoints.findSitePageByLang;
|
|
53
53
|
FindHotelSitePageByLangContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
54
54
|
FindHotelSitePageByLangContract.RequestSchema = FindHotelSitePageByLangContractRequestSchema;
|
|
55
55
|
FindHotelSitePageByLangContract.ResponseSchema = FindHotelSitePageByLangContractResponseSchema;
|
|
@@ -6,8 +6,8 @@ const theme_models_1 = require("../theme.models");
|
|
|
6
6
|
const hotels_api_1 = require("../../hotels.api");
|
|
7
7
|
var FindHotelThemeContract;
|
|
8
8
|
(function (FindHotelThemeContract) {
|
|
9
|
-
FindHotelThemeContract.getUrl = hotels_api_1.
|
|
10
|
-
FindHotelThemeContract.endpoint = hotels_api_1.
|
|
9
|
+
FindHotelThemeContract.getUrl = hotels_api_1.HOTELS_BY_SLUG_API.findTheme;
|
|
10
|
+
FindHotelThemeContract.endpoint = hotels_api_1.HOTELS_BY_SLUG_CONTROLLER.endpoints.findTheme;
|
|
11
11
|
FindHotelThemeContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
12
12
|
FindHotelThemeContract.ResponseSchema = theme_models_1.ThemePersistedSchema;
|
|
13
13
|
})(FindHotelThemeContract || (exports.FindHotelThemeContract = FindHotelThemeContract = {}));
|
package/hotels/hotels.api.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createApi, TController } from '../common/utils';
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
prefix: 'hotels',
|
|
3
|
+
export const HOTELS_BY_SLUG_CONTROLLER = {
|
|
4
|
+
prefix: 'hotels/by-slug',
|
|
5
5
|
endpoints: {
|
|
6
|
-
findTheme: '
|
|
7
|
-
findSitePageByLang: '
|
|
8
|
-
findSitePage: '
|
|
6
|
+
findTheme: ':hotelSlug/theme',
|
|
7
|
+
findSitePageByLang: ':hotelSlug/sites/pages/:slug',
|
|
8
|
+
findSitePage: ':hotelSlug/sites/pages/:slug',
|
|
9
9
|
},
|
|
10
10
|
} as const satisfies TController;
|
|
11
11
|
|
|
12
|
-
export const
|
|
12
|
+
export const HOTELS_BY_SLUG_API = createApi(HOTELS_BY_SLUG_CONTROLLER);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import { HTTP_METHODS, LanguageKeysSchema } from '../../../common';
|
|
3
|
-
import {
|
|
3
|
+
import { HOTELS_BY_SLUG_API, HOTELS_BY_SLUG_CONTROLLER } from '../../hotels.api';
|
|
4
4
|
import { PageLangTranslationSchema, PageSchema } from '../../../pages';
|
|
5
5
|
|
|
6
6
|
const FindHotelSitePageByLangContractRequestSchema = z.object({
|
|
@@ -14,8 +14,8 @@ const FindHotelSitePageByLangContractResponseSchema = PageSchema.omit({
|
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
export namespace FindHotelSitePageByLangContract {
|
|
17
|
-
export const getUrl =
|
|
18
|
-
export const endpoint =
|
|
17
|
+
export const getUrl = HOTELS_BY_SLUG_API.findSitePageByLang;
|
|
18
|
+
export const endpoint = HOTELS_BY_SLUG_CONTROLLER.endpoints.findSitePageByLang;
|
|
19
19
|
export const httpMethod = HTTP_METHODS.get;
|
|
20
20
|
|
|
21
21
|
export const RequestSchema = FindHotelSitePageByLangContractRequestSchema;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import { HTTP_METHODS } from '../../../common';
|
|
3
3
|
import { ThemePersistedSchema } from '../theme.models';
|
|
4
|
-
import {
|
|
4
|
+
import { HOTELS_BY_SLUG_API, HOTELS_BY_SLUG_CONTROLLER } from '../../hotels.api';
|
|
5
5
|
|
|
6
6
|
export namespace FindHotelThemeContract {
|
|
7
|
-
export const getUrl =
|
|
8
|
-
export const endpoint =
|
|
7
|
+
export const getUrl = HOTELS_BY_SLUG_API.findTheme;
|
|
8
|
+
export const endpoint = HOTELS_BY_SLUG_CONTROLLER.endpoints.findTheme;
|
|
9
9
|
export const httpMethod = HTTP_METHODS.get;
|
|
10
10
|
|
|
11
11
|
export const ResponseSchema = ThemePersistedSchema;
|