hh-contracts 0.0.111 → 0.0.114
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/auth/auth.api.d.ts +19 -0
- package/build/auth/auth.api.d.ts.map +1 -0
- package/build/auth/auth.api.js +14 -0
- package/build/auth/auth.models.d.ts +17 -0
- package/build/auth/auth.models.d.ts.map +1 -0
- package/build/auth/auth.models.js +48 -0
- package/build/auth/contracts/email-login.contract.d.ts +16 -0
- package/build/auth/contracts/email-login.contract.d.ts.map +1 -0
- package/build/auth/contracts/email-login.contract.js +14 -0
- package/build/auth/contracts/index.d.ts +5 -0
- package/build/auth/contracts/index.d.ts.map +1 -0
- package/build/auth/contracts/index.js +20 -0
- package/build/auth/contracts/logout.contract.d.ts +9 -0
- package/build/auth/contracts/logout.contract.d.ts.map +1 -0
- package/build/auth/contracts/logout.contract.js +46 -0
- package/build/auth/contracts/me.contract.d.ts +100 -0
- package/build/auth/contracts/me.contract.d.ts.map +1 -0
- package/build/auth/contracts/me.contract.js +13 -0
- package/build/auth/contracts/refresh.contract.d.ts +11 -0
- package/build/auth/contracts/refresh.contract.d.ts.map +1 -0
- package/build/auth/contracts/refresh.contract.js +13 -0
- package/build/auth/index.d.ts +4 -0
- package/build/auth/index.d.ts.map +1 -0
- package/build/auth/index.js +19 -0
- package/build/hotels/integrations/hotel-integration.model.d.ts +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/permissions/index.d.ts +1 -0
- package/build/permissions/index.d.ts.map +1 -1
- package/build/permissions/index.js +1 -0
- package/build/users/contracts/find-many-users.contract.d.ts +8 -8
- package/build/users/contracts/find-many-users.contract.d.ts.map +1 -1
- package/build/users/contracts/find-many-users.contract.js +2 -2
- package/build/users/user.models.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const AUTH_CONTROLLER: {
|
|
2
|
+
readonly prefix: "auth";
|
|
3
|
+
readonly endpoints: {
|
|
4
|
+
readonly emailLogin: "login/email";
|
|
5
|
+
readonly refresh: "refresh";
|
|
6
|
+
readonly logout: "logout";
|
|
7
|
+
readonly me: "me";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const AUTH_API: import("../common/utils").TApi<{
|
|
11
|
+
readonly prefix: "auth";
|
|
12
|
+
readonly endpoints: {
|
|
13
|
+
readonly emailLogin: "login/email";
|
|
14
|
+
readonly refresh: "refresh";
|
|
15
|
+
readonly logout: "logout";
|
|
16
|
+
readonly me: "me";
|
|
17
|
+
};
|
|
18
|
+
}>;
|
|
19
|
+
//# sourceMappingURL=auth.api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.api.d.ts","sourceRoot":"","sources":["../../auth/auth.api.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;CAQI,CAAC;AAEjC,eAAO,MAAM,QAAQ;;;;;;;;EAA6B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AUTH_API = exports.AUTH_CONTROLLER = void 0;
|
|
4
|
+
const utils_1 = require("../common/utils");
|
|
5
|
+
exports.AUTH_CONTROLLER = {
|
|
6
|
+
prefix: 'auth',
|
|
7
|
+
endpoints: {
|
|
8
|
+
emailLogin: 'login/email',
|
|
9
|
+
refresh: 'refresh',
|
|
10
|
+
logout: 'logout',
|
|
11
|
+
me: 'me',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
exports.AUTH_API = (0, utils_1.createApi)(exports.AUTH_CONTROLLER);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const TokenSchema: z.ZodString;
|
|
3
|
+
export type TToken = z.infer<typeof TokenSchema>;
|
|
4
|
+
export declare const AuthEmailLoginSchema: z.ZodObject<{
|
|
5
|
+
email: z.ZodEmail;
|
|
6
|
+
password: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type TAuthEmailLogin = z.infer<typeof AuthEmailLoginSchema>;
|
|
9
|
+
export declare const AuthLoginResponseSchema: z.ZodObject<{
|
|
10
|
+
accessToken: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type TAuthLoginResponse = z.infer<typeof AuthLoginResponseSchema>;
|
|
13
|
+
export declare const AuthRefreshResponseSchema: z.ZodObject<{
|
|
14
|
+
accessToken: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type TAuthRefreshResponse = z.infer<typeof AuthRefreshResponseSchema>;
|
|
17
|
+
//# sourceMappingURL=auth.models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.models.d.ts","sourceRoot":"","sources":["../../auth/auth.models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,WAAW,aAAoB,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEjD,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEnE,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEzE,eAAO,MAAM,yBAAyB;;iBAEpC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -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.AuthRefreshResponseSchema = exports.AuthLoginResponseSchema = exports.AuthEmailLoginSchema = exports.TokenSchema = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
exports.TokenSchema = z.string().min(1);
|
|
39
|
+
exports.AuthEmailLoginSchema = z.object({
|
|
40
|
+
email: z.email().toLowerCase(),
|
|
41
|
+
password: z.string().min(1),
|
|
42
|
+
});
|
|
43
|
+
exports.AuthLoginResponseSchema = z.object({
|
|
44
|
+
accessToken: exports.TokenSchema,
|
|
45
|
+
});
|
|
46
|
+
exports.AuthRefreshResponseSchema = z.object({
|
|
47
|
+
accessToken: exports.TokenSchema,
|
|
48
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare namespace AuthEmailLoginContract {
|
|
3
|
+
const getUrl: (params?: {} | undefined) => string;
|
|
4
|
+
const endpoint: "login/email";
|
|
5
|
+
const httpMethod: "POST";
|
|
6
|
+
const RequestSchema: z.ZodObject<{
|
|
7
|
+
email: z.ZodEmail;
|
|
8
|
+
password: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type TRequest = z.infer<typeof RequestSchema>;
|
|
11
|
+
const ResponseSchema: z.ZodObject<{
|
|
12
|
+
accessToken: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
type TResponse = z.infer<typeof ResponseSchema>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=email-login.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-login.contract.d.ts","sourceRoot":"","sources":["../../../auth/contracts/email-login.contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAKzB,yBAAiB,sBAAsB,CAAC;IAC/B,MAAM,MAAM,qCAAsB,CAAC;IACnC,MAAM,QAAQ,eAAuC,CAAC;IACtD,MAAM,UAAU,QAAoB,CAAC;IAErC,MAAM,aAAa;;;qBAAuB,CAAC;IAClD,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE9C,MAAM,cAAc;;qBAA0B,CAAC;IACtD,KAAY,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACxD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthEmailLoginContract = void 0;
|
|
4
|
+
const auth_models_1 = require("../auth.models");
|
|
5
|
+
const auth_api_1 = require("../auth.api");
|
|
6
|
+
const common_1 = require("../../common");
|
|
7
|
+
var AuthEmailLoginContract;
|
|
8
|
+
(function (AuthEmailLoginContract) {
|
|
9
|
+
AuthEmailLoginContract.getUrl = auth_api_1.AUTH_API.emailLogin;
|
|
10
|
+
AuthEmailLoginContract.endpoint = auth_api_1.AUTH_CONTROLLER.endpoints.emailLogin;
|
|
11
|
+
AuthEmailLoginContract.httpMethod = common_1.HTTP_METHODS.post;
|
|
12
|
+
AuthEmailLoginContract.RequestSchema = auth_models_1.AuthEmailLoginSchema;
|
|
13
|
+
AuthEmailLoginContract.ResponseSchema = auth_models_1.AuthLoginResponseSchema;
|
|
14
|
+
})(AuthEmailLoginContract || (exports.AuthEmailLoginContract = AuthEmailLoginContract = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../auth/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./email-login.contract"), exports);
|
|
18
|
+
__exportStar(require("./logout.contract"), exports);
|
|
19
|
+
__exportStar(require("./me.contract"), exports);
|
|
20
|
+
__exportStar(require("./refresh.contract"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare namespace AuthLogoutContract {
|
|
3
|
+
const getUrl: (params?: {} | undefined) => string;
|
|
4
|
+
const endpoint: "logout";
|
|
5
|
+
const httpMethod: "POST";
|
|
6
|
+
const ResponseSchema: z.ZodVoid;
|
|
7
|
+
type TResponse = z.infer<typeof ResponseSchema>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=logout.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout.contract.d.ts","sourceRoot":"","sources":["../../../auth/contracts/logout.contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAIzB,yBAAiB,kBAAkB,CAAC;IAC3B,MAAM,MAAM,qCAAkB,CAAC;IAC/B,MAAM,QAAQ,UAAmC,CAAC;IAClD,MAAM,UAAU,QAAoB,CAAC;IAErC,MAAM,cAAc,WAAW,CAAC;IACvC,KAAY,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACxD"}
|
|
@@ -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.AuthLogoutContract = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const common_1 = require("../../common");
|
|
39
|
+
const auth_api_1 = require("../auth.api");
|
|
40
|
+
var AuthLogoutContract;
|
|
41
|
+
(function (AuthLogoutContract) {
|
|
42
|
+
AuthLogoutContract.getUrl = auth_api_1.AUTH_API.logout;
|
|
43
|
+
AuthLogoutContract.endpoint = auth_api_1.AUTH_CONTROLLER.endpoints.logout;
|
|
44
|
+
AuthLogoutContract.httpMethod = common_1.HTTP_METHODS.post;
|
|
45
|
+
AuthLogoutContract.ResponseSchema = z.void();
|
|
46
|
+
})(AuthLogoutContract || (exports.AuthLogoutContract = AuthLogoutContract = {}));
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare namespace AuthMeContract {
|
|
3
|
+
const getUrl: (params?: {} | undefined) => string;
|
|
4
|
+
const endpoint: "me";
|
|
5
|
+
const httpMethod: "GET";
|
|
6
|
+
const ResponseSchema: z.ZodObject<{
|
|
7
|
+
email: z.ZodEmail;
|
|
8
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
9
|
+
firstName: z.ZodString;
|
|
10
|
+
lastName: z.ZodString;
|
|
11
|
+
preferredLang: z.ZodEnum<{
|
|
12
|
+
en: "en";
|
|
13
|
+
ru: "ru";
|
|
14
|
+
}>;
|
|
15
|
+
timezone: z.ZodString;
|
|
16
|
+
status: z.ZodNonOptional<z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
active: "active";
|
|
18
|
+
disabled: "disabled";
|
|
19
|
+
invited: "invited";
|
|
20
|
+
blocked: "blocked";
|
|
21
|
+
}>>>;
|
|
22
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
23
|
+
isEmailVerified: z.ZodNonOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
24
|
+
createdAt: z.ZodDate;
|
|
25
|
+
updatedAt: z.ZodDate;
|
|
26
|
+
id: z.ZodUUID;
|
|
27
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
29
|
+
roleAssignments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
30
|
+
scope: z.ZodLiteral<"global">;
|
|
31
|
+
role: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
type: z.ZodEnum<{
|
|
33
|
+
hotel: "hotel";
|
|
34
|
+
superAdmin: "superAdmin";
|
|
35
|
+
system: "system";
|
|
36
|
+
guest: "guest";
|
|
37
|
+
}>;
|
|
38
|
+
isActive: z.ZodNonOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
39
|
+
isDefault: z.ZodNonOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
40
|
+
createdAt: z.ZodDate;
|
|
41
|
+
updatedAt: z.ZodDate;
|
|
42
|
+
id: z.ZodUUID;
|
|
43
|
+
name: z.ZodNullable<z.ZodString>;
|
|
44
|
+
description: z.ZodNullable<z.ZodString>;
|
|
45
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
46
|
+
name: z.ZodNullable<z.ZodString>;
|
|
47
|
+
id: z.ZodUUID;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
createdAt: z.ZodDate;
|
|
51
|
+
updatedAt: z.ZodDate;
|
|
52
|
+
id: z.ZodUUID;
|
|
53
|
+
grantedBy: z.ZodOptional<z.ZodUUID>;
|
|
54
|
+
roleId: z.ZodUUID;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
scope: z.ZodLiteral<"hotel">;
|
|
57
|
+
hotelId: z.ZodUUID;
|
|
58
|
+
role: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
type: z.ZodEnum<{
|
|
60
|
+
hotel: "hotel";
|
|
61
|
+
superAdmin: "superAdmin";
|
|
62
|
+
system: "system";
|
|
63
|
+
guest: "guest";
|
|
64
|
+
}>;
|
|
65
|
+
isActive: z.ZodNonOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
66
|
+
isDefault: z.ZodNonOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
67
|
+
createdAt: z.ZodDate;
|
|
68
|
+
updatedAt: z.ZodDate;
|
|
69
|
+
id: z.ZodUUID;
|
|
70
|
+
name: z.ZodNullable<z.ZodString>;
|
|
71
|
+
description: z.ZodNullable<z.ZodString>;
|
|
72
|
+
permissions: z.ZodArray<z.ZodObject<{
|
|
73
|
+
name: z.ZodNullable<z.ZodString>;
|
|
74
|
+
id: z.ZodUUID;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
hotel: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
createdAt: z.ZodDate;
|
|
79
|
+
updatedAt: z.ZodDate;
|
|
80
|
+
id: z.ZodUUID;
|
|
81
|
+
slug: z.ZodString;
|
|
82
|
+
status: z.ZodNonOptional<z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
active: "active";
|
|
84
|
+
disabled: "disabled";
|
|
85
|
+
pending: "pending";
|
|
86
|
+
maintenance: "maintenance";
|
|
87
|
+
archived: "archived";
|
|
88
|
+
}>>>;
|
|
89
|
+
name: z.ZodNullable<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
createdAt: z.ZodDate;
|
|
92
|
+
updatedAt: z.ZodDate;
|
|
93
|
+
id: z.ZodUUID;
|
|
94
|
+
grantedBy: z.ZodOptional<z.ZodUUID>;
|
|
95
|
+
roleId: z.ZodUUID;
|
|
96
|
+
}, z.core.$strip>], "scope">>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
type TResponse = z.infer<typeof ResponseSchema>;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=me.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"me.contract.d.ts","sourceRoot":"","sources":["../../../auth/contracts/me.contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAKzB,yBAAiB,cAAc,CAAC;IACvB,MAAM,MAAM,qCAAc,CAAC;IAC3B,MAAM,QAAQ,MAA+B,CAAC;IAC9C,MAAM,UAAU,OAAmB,CAAC;IAEpC,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAmB,CAAC;IAC/C,KAAY,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACxD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthMeContract = void 0;
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
|
+
const auth_api_1 = require("../auth.api");
|
|
6
|
+
const users_1 = require("../../users");
|
|
7
|
+
var AuthMeContract;
|
|
8
|
+
(function (AuthMeContract) {
|
|
9
|
+
AuthMeContract.getUrl = auth_api_1.AUTH_API.me;
|
|
10
|
+
AuthMeContract.endpoint = auth_api_1.AUTH_CONTROLLER.endpoints.me;
|
|
11
|
+
AuthMeContract.httpMethod = common_1.HTTP_METHODS.get;
|
|
12
|
+
AuthMeContract.ResponseSchema = users_1.UserDetailSchema;
|
|
13
|
+
})(AuthMeContract || (exports.AuthMeContract = AuthMeContract = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare namespace AuthRefreshContract {
|
|
3
|
+
const getUrl: (params?: {} | undefined) => string;
|
|
4
|
+
const endpoint: "refresh";
|
|
5
|
+
const httpMethod: "POST";
|
|
6
|
+
const ResponseSchema: z.ZodObject<{
|
|
7
|
+
accessToken: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
type TResponse = z.infer<typeof ResponseSchema>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=refresh.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh.contract.d.ts","sourceRoot":"","sources":["../../../auth/contracts/refresh.contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAKzB,yBAAiB,mBAAmB,CAAC;IAC5B,MAAM,MAAM,qCAAmB,CAAC;IAChC,MAAM,QAAQ,WAAoC,CAAC;IACnD,MAAM,UAAU,QAAoB,CAAC;IAErC,MAAM,cAAc;;qBAA4B,CAAC;IACxD,KAAY,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACxD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthRefreshContract = void 0;
|
|
4
|
+
const common_1 = require("../../common");
|
|
5
|
+
const auth_api_1 = require("../auth.api");
|
|
6
|
+
const auth_models_1 = require("../auth.models");
|
|
7
|
+
var AuthRefreshContract;
|
|
8
|
+
(function (AuthRefreshContract) {
|
|
9
|
+
AuthRefreshContract.getUrl = auth_api_1.AUTH_API.refresh;
|
|
10
|
+
AuthRefreshContract.endpoint = auth_api_1.AUTH_CONTROLLER.endpoints.refresh;
|
|
11
|
+
AuthRefreshContract.httpMethod = common_1.HTTP_METHODS.post;
|
|
12
|
+
AuthRefreshContract.ResponseSchema = auth_models_1.AuthRefreshResponseSchema;
|
|
13
|
+
})(AuthRefreshContract || (exports.AuthRefreshContract = AuthRefreshContract = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
|
@@ -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("./auth.api"), exports);
|
|
18
|
+
__exportStar(require("./auth.models"), exports);
|
|
19
|
+
__exportStar(require("./contracts"), exports);
|
|
@@ -63,8 +63,8 @@ export declare const HotelIntegrationConnectionSchema: z.ZodObject<{
|
|
|
63
63
|
lastHeartbeatAt: z.ZodDate;
|
|
64
64
|
lastSeenAt: z.ZodDate;
|
|
65
65
|
lastSyncStatus: z.ZodEnum<{
|
|
66
|
-
failed: "failed";
|
|
67
66
|
success: "success";
|
|
67
|
+
failed: "failed";
|
|
68
68
|
idle: "idle";
|
|
69
69
|
running: "running";
|
|
70
70
|
}>;
|
package/build/index.d.ts
CHANGED
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
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("./auth"), exports);
|
|
17
18
|
__exportStar(require("./hotels"), exports);
|
|
18
19
|
__exportStar(require("./common"), exports);
|
|
19
20
|
__exportStar(require("./companies"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../permissions/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../permissions/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,8BAA8B,CAAC"}
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./permission.models"), exports);
|
|
18
18
|
__exportStar(require("./permissions.api"), exports);
|
|
19
19
|
__exportStar(require("./contracts"), exports);
|
|
20
|
+
__exportStar(require("./permisson-conditions.model"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
declare const OrderBySchema: z.ZodEnum<{
|
|
3
|
-
createdAt: "createdAt";
|
|
4
3
|
email: "email";
|
|
4
|
+
createdAt: "createdAt";
|
|
5
5
|
status: "status";
|
|
6
6
|
fullName: "fullName";
|
|
7
7
|
}>;
|
|
@@ -16,11 +16,11 @@ export declare namespace FindManyUsersContract {
|
|
|
16
16
|
invited: "invited";
|
|
17
17
|
blocked: "blocked";
|
|
18
18
|
}>>>;
|
|
19
|
-
roleIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUUID
|
|
20
|
-
hotelId: z.ZodOptional<z.ZodOptional<z.ZodUUID
|
|
19
|
+
roleIds: z.ZodOptional<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodUUID>>>>;
|
|
20
|
+
hotelId: z.ZodOptional<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodUUID>>>>;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
22
|
type TBaseFilter = z.input<typeof BaseFilterSchema>;
|
|
23
|
-
const SORTING_KEYS: ("
|
|
23
|
+
const SORTING_KEYS: ("email" | "createdAt" | "status" | "fullName")[];
|
|
24
24
|
type TSortingKey = z.infer<typeof OrderBySchema>;
|
|
25
25
|
const RequestSchema: z.ZodObject<{
|
|
26
26
|
status: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
@@ -29,11 +29,11 @@ export declare namespace FindManyUsersContract {
|
|
|
29
29
|
invited: "invited";
|
|
30
30
|
blocked: "blocked";
|
|
31
31
|
}>>>;
|
|
32
|
-
roleIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUUID
|
|
33
|
-
hotelId: z.ZodOptional<z.ZodOptional<z.ZodUUID
|
|
32
|
+
roleIds: z.ZodOptional<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodUUID>>>>;
|
|
33
|
+
hotelId: z.ZodOptional<z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodUUID>>>>;
|
|
34
34
|
orderBy: z.ZodOptional<z.ZodEnum<{
|
|
35
|
-
createdAt: "createdAt";
|
|
36
35
|
email: "email";
|
|
36
|
+
createdAt: "createdAt";
|
|
37
37
|
status: "status";
|
|
38
38
|
fullName: "fullName";
|
|
39
39
|
}>>;
|
|
@@ -48,9 +48,9 @@ export declare namespace FindManyUsersContract {
|
|
|
48
48
|
type TRequest = z.infer<typeof RequestSchema>;
|
|
49
49
|
const ResponseSchema: z.ZodObject<{
|
|
50
50
|
users: z.ZodArray<z.ZodObject<{
|
|
51
|
+
email: z.ZodEmail;
|
|
51
52
|
createdAt: z.ZodDate;
|
|
52
53
|
id: z.ZodUUID;
|
|
53
|
-
email: z.ZodEmail;
|
|
54
54
|
status: z.ZodNonOptional<z.ZodOptional<z.ZodEnum<{
|
|
55
55
|
active: "active";
|
|
56
56
|
disabled: "disabled";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-many-users.contract.d.ts","sourceRoot":"","sources":["../../../users/contracts/find-many-users.contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"find-many-users.contract.d.ts","sourceRoot":"","sources":["../../../users/contracts/find-many-users.contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAkBzB,QAAA,MAAM,aAAa;;;;;EAIT,CAAC;AAaX,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,MAAM,qCAAqB,CAAC;IAClC,MAAM,QAAQ,IAAsC,CAAC;IACrD,MAAM,UAAU,OAAmB,CAAC;IAEpC,MAAM,gBAAgB;;;;;;;;;qBAAkB,CAAC;IAChD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;IAEpD,MAAM,YAAY,mDAAwB,CAAC;IAClD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAEjD,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;qBAAqC,CAAC;IAChE,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE9C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAsC,CAAC;IAClE,KAAY,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACxD"}
|
|
@@ -41,8 +41,8 @@ const users_api_1 = require("../users.api");
|
|
|
41
41
|
const BaseQuerySchema = z
|
|
42
42
|
.object({
|
|
43
43
|
status: z.enum(user_models_1.USER_STATUS_VALUES).optional(),
|
|
44
|
-
roleIds: common_1.
|
|
45
|
-
hotelId: common_1.
|
|
44
|
+
roleIds: common_1.UuidArrayQueryParamSchema.optional(),
|
|
45
|
+
hotelId: common_1.UuidArrayQueryParamSchema.optional(),
|
|
46
46
|
})
|
|
47
47
|
.partial();
|
|
48
48
|
const OrderBySchema = user_models_1.UserListItemSchema.omit({
|
|
@@ -58,9 +58,9 @@ export declare const UserPersistedSchema: z.ZodObject<{
|
|
|
58
58
|
}, z.core.$strip>;
|
|
59
59
|
export type TUserPersisted = z.infer<typeof UserPersistedSchema>;
|
|
60
60
|
export declare const UserListItemSchema: z.ZodObject<{
|
|
61
|
+
email: z.ZodEmail;
|
|
61
62
|
createdAt: z.ZodDate;
|
|
62
63
|
id: z.ZodUUID;
|
|
63
|
-
email: z.ZodEmail;
|
|
64
64
|
status: z.ZodNonOptional<z.ZodOptional<z.ZodEnum<{
|
|
65
65
|
active: "active";
|
|
66
66
|
disabled: "disabled";
|