hh-contracts 0.0.71 → 0.0.72
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/contracts/find-theme.contract.js +13 -0
- package/build/hotels/contracts/index.js +17 -0
- package/build/hotels/hotels.api.js +11 -0
- package/build/hotels/index.js +19 -0
- package/build/hotels/themes/constants/accent-colors.constant.js +16 -0
- package/build/hotels/themes/constants/fonts.constant.js +10 -0
- package/build/hotels/themes/constants/index.js +19 -0
- package/build/hotels/themes/constants/radius.constant.js +13 -0
- package/build/hotels/themes/index.js +18 -0
- package/build/hotels/themes/theme.models.js +14 -0
- package/build/index.js +1 -0
- package/hotels/contracts/find-theme.contract.ts +13 -0
- package/hotels/contracts/index.ts +1 -0
- package/hotels/hotels.api.ts +10 -0
- package/hotels/index.ts +3 -0
- package/hotels/themes/constants/accent-colors.constant.ts +18 -0
- package/hotels/themes/constants/fonts.constant.ts +9 -0
- package/hotels/themes/constants/index.ts +3 -0
- package/hotels/themes/constants/radius.constant.ts +12 -0
- package/hotels/themes/index.ts +2 -0
- package/hotels/themes/theme.models.ts +13 -0
- package/index.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindThemeContract = void 0;
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
|
+
const theme_models_1 = require("../themes/theme.models");
|
|
6
|
+
const hotels_api_1 = require("../hotels.api");
|
|
7
|
+
var FindThemeContract;
|
|
8
|
+
(function (FindThemeContract) {
|
|
9
|
+
FindThemeContract.getUrl = hotels_api_1.HOTELS_API.findTheme;
|
|
10
|
+
FindThemeContract.endpoint = hotels_api_1.HOTELS_CONTROLLER.endpoints.findTheme;
|
|
11
|
+
FindThemeContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
12
|
+
FindThemeContract.ResponseSchema = theme_models_1.ThemePersistedSchema;
|
|
13
|
+
})(FindThemeContract || (exports.FindThemeContract = FindThemeContract = {}));
|
|
@@ -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("./find-theme.contract"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOTELS_API = exports.HOTELS_CONTROLLER = void 0;
|
|
4
|
+
const utils_1 = require("../common/utils");
|
|
5
|
+
exports.HOTELS_CONTROLLER = {
|
|
6
|
+
prefix: 'hotels',
|
|
7
|
+
endpoints: {
|
|
8
|
+
findTheme: ':id/theme',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
exports.HOTELS_API = (0, utils_1.createApi)(exports.HOTELS_CONTROLLER);
|
|
@@ -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("./themes"), exports);
|
|
18
|
+
__exportStar(require("./hotels.api"), exports);
|
|
19
|
+
__exportStar(require("./contracts"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ACCENT_COLORS_VALUES = exports.ACCENT_COLORS = void 0;
|
|
4
|
+
exports.ACCENT_COLORS = {
|
|
5
|
+
gray: 'gray',
|
|
6
|
+
red: 'red',
|
|
7
|
+
orange: 'orange',
|
|
8
|
+
yellow: 'yellow',
|
|
9
|
+
green: 'green',
|
|
10
|
+
teal: 'teal',
|
|
11
|
+
blue: 'blue',
|
|
12
|
+
cyan: 'cyan',
|
|
13
|
+
purple: 'purple',
|
|
14
|
+
pink: 'pink',
|
|
15
|
+
};
|
|
16
|
+
exports.ACCENT_COLORS_VALUES = Object.values(exports.ACCENT_COLORS);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FONT_FAMILIES_VALUES = exports.FONT_FAMILIES = void 0;
|
|
4
|
+
exports.FONT_FAMILIES = {
|
|
5
|
+
inter: 'inter',
|
|
6
|
+
outfit: 'outfit',
|
|
7
|
+
geist: 'geist',
|
|
8
|
+
figtree: 'figtree',
|
|
9
|
+
};
|
|
10
|
+
exports.FONT_FAMILIES_VALUES = Object.values(exports.FONT_FAMILIES);
|
|
@@ -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("./accent-colors.constant"), exports);
|
|
18
|
+
__exportStar(require("./fonts.constant"), exports);
|
|
19
|
+
__exportStar(require("./radius.constant"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RADIUS_VALUES = void 0;
|
|
4
|
+
const RADIUS = {
|
|
5
|
+
none: 'none',
|
|
6
|
+
xs: 'xs',
|
|
7
|
+
sm: 'sm',
|
|
8
|
+
md: 'md',
|
|
9
|
+
lg: 'lg',
|
|
10
|
+
xl: 'xl',
|
|
11
|
+
'2xl': '2xl',
|
|
12
|
+
};
|
|
13
|
+
exports.RADIUS_VALUES = Object.values(RADIUS);
|
|
@@ -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("./constants"), exports);
|
|
18
|
+
__exportStar(require("./theme.models"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThemePersistedSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
const common_1 = require("../../common");
|
|
7
|
+
exports.ThemePersistedSchema = zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
hotelId: zod_1.z.string().uuid(),
|
|
10
|
+
fontFamily: zod_1.z.enum(constants_1.FONT_FAMILIES_VALUES),
|
|
11
|
+
accentColor: zod_1.z.enum(constants_1.ACCENT_COLORS_VALUES),
|
|
12
|
+
radius: zod_1.z.enum(constants_1.RADIUS_VALUES),
|
|
13
|
+
})
|
|
14
|
+
.merge(common_1.TimestampSchema);
|
package/build/index.js
CHANGED
|
@@ -14,6 +14,7 @@ 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("./hotels"), exports);
|
|
17
18
|
__exportStar(require("./common"), exports);
|
|
18
19
|
__exportStar(require("./app-menu"), exports);
|
|
19
20
|
__exportStar(require("./permissions"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../common';
|
|
3
|
+
import { ThemePersistedSchema } from '../themes/theme.models';
|
|
4
|
+
import { HOTELS_API, HOTELS_CONTROLLER } from '../hotels.api';
|
|
5
|
+
|
|
6
|
+
export namespace FindThemeContract {
|
|
7
|
+
export const getUrl = HOTELS_API.findTheme;
|
|
8
|
+
export const endpoint = HOTELS_CONTROLLER.endpoints.findTheme;
|
|
9
|
+
export const httpMethod = HTTP_METHODS.get;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = ThemePersistedSchema;
|
|
12
|
+
export type TResponse = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './find-theme.contract';
|
package/hotels/index.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const ACCENT_COLORS = {
|
|
2
|
+
gray: 'gray',
|
|
3
|
+
red: 'red',
|
|
4
|
+
orange: 'orange',
|
|
5
|
+
yellow: 'yellow',
|
|
6
|
+
green: 'green',
|
|
7
|
+
teal: 'teal',
|
|
8
|
+
blue: 'blue',
|
|
9
|
+
cyan: 'cyan',
|
|
10
|
+
purple: 'purple',
|
|
11
|
+
pink: 'pink',
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
export type TAccentColor = (typeof ACCENT_COLORS)[keyof typeof ACCENT_COLORS];
|
|
15
|
+
export const ACCENT_COLORS_VALUES = Object.values(ACCENT_COLORS) as [
|
|
16
|
+
TAccentColor,
|
|
17
|
+
...TAccentColor[],
|
|
18
|
+
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const FONT_FAMILIES = {
|
|
2
|
+
inter: 'inter',
|
|
3
|
+
outfit: 'outfit',
|
|
4
|
+
geist: 'geist',
|
|
5
|
+
figtree: 'figtree',
|
|
6
|
+
} as const;
|
|
7
|
+
|
|
8
|
+
export type TFontFamily = (typeof FONT_FAMILIES)[keyof typeof FONT_FAMILIES];
|
|
9
|
+
export const FONT_FAMILIES_VALUES = Object.values(FONT_FAMILIES) as [TFontFamily, ...TFontFamily[]];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const RADIUS = {
|
|
2
|
+
none: 'none',
|
|
3
|
+
xs: 'xs',
|
|
4
|
+
sm: 'sm',
|
|
5
|
+
md: 'md',
|
|
6
|
+
lg: 'lg',
|
|
7
|
+
xl: 'xl',
|
|
8
|
+
'2xl': '2xl',
|
|
9
|
+
} as const;
|
|
10
|
+
|
|
11
|
+
export type TRadius = (typeof RADIUS)[keyof typeof RADIUS];
|
|
12
|
+
export const RADIUS_VALUES = Object.values(RADIUS) as [TRadius, ...TRadius[]];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ACCENT_COLORS_VALUES, FONT_FAMILIES_VALUES, RADIUS_VALUES } from './constants';
|
|
3
|
+
import { TimestampSchema } from '../../common';
|
|
4
|
+
|
|
5
|
+
export const ThemePersistedSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
hotelId: z.string().uuid(),
|
|
8
|
+
fontFamily: z.enum(FONT_FAMILIES_VALUES),
|
|
9
|
+
accentColor: z.enum(ACCENT_COLORS_VALUES),
|
|
10
|
+
radius: z.enum(RADIUS_VALUES),
|
|
11
|
+
})
|
|
12
|
+
.merge(TimestampSchema);
|
|
13
|
+
export type TThemePersisted = z.infer<typeof ThemePersistedSchema>;
|
package/index.ts
CHANGED