@floristcloud/api-lib 1.2.194 → 1.2.196
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/commands/auth/get-security-code-status-by-admin.query.js +8 -0
- package/build/commands/auth/index.js +2 -0
- package/build/commands/auth/register-user.command.js +4 -15
- package/build/commands/auth/reset-password-by-admin.command.js +4 -9
- package/build/commands/auth/reset-password-by-security-code.command.js +8 -18
- package/build/commands/auth/reset-password-by-token.command.js +9 -20
- package/build/commands/auth/reset-password-by-user.command.js +4 -9
- package/build/commands/auth/reset-security-code-limits-by-admin.command.js +10 -0
- package/build/commands/company/createCompanyWithUser.command.js +4 -21
- package/build/commands/company/getCompanyList.query.js +4 -12
- package/build/commands/domain/get-domain-list.query.js +4 -12
- package/build/commands/session/validate-session-s2s.query.js +4 -19
- package/build/commands/session/validate-ws-ticket-s2s.query.js +2 -5
- package/build/commands/user/attachUserToCompany.command.js +1 -0
- package/build/commands/user/create-user-global.command.js +4 -22
- package/build/commands/user/createUserByClientId.command.js +4 -25
- package/build/commands/user/createUserForCompany.command.js +4 -23
- package/build/commands/user/get-me.query.js +2 -11
- package/build/commands/user/getUser.command.js +2 -8
- package/build/commands/user/update-password-by-user.command.js +4 -9
- package/build/commands/work-session/create-many-work-session.command.js +4 -11
- package/build/commands/work-session/export-overtime.query.js +4 -20
- package/build/constant/error.js +10 -0
- package/build/constant/validation-i18n-key.js +2 -0
- package/build/constant/validation-i18n-message.js +2 -0
- package/build/constant/work-session-report-limits.constant.js +7 -0
- package/build/enum/index.js +1 -0
- package/build/enum/security-code-blocked-reason.enum.js +2 -0
- package/build/enum/security-code-purpose.enum.js +8 -0
- package/build/schemas/auth/get-security-code-status-by-admin-response.schema.js +6 -0
- package/build/schemas/auth/index.js +36 -0
- package/build/schemas/auth/password-reset-data.schema.js +6 -0
- package/build/schemas/auth/password-reset-user.schema.js +5 -0
- package/build/schemas/auth/password.schema.js +9 -0
- package/build/schemas/auth/register-user-request.schema.js +11 -0
- package/build/schemas/auth/register-user-response.schema.js +6 -0
- package/build/schemas/auth/registration-success.schema.js +5 -0
- package/build/schemas/auth/reset-password-by-admin-request.schema.js +6 -0
- package/build/schemas/auth/reset-password-by-admin-response.schema.js +5 -0
- package/build/schemas/auth/reset-password-by-security-code-request.schema.js +11 -0
- package/build/schemas/auth/reset-password-by-security-code-response.schema.js +6 -0
- package/build/schemas/auth/reset-password-by-token-request.schema.js +8 -0
- package/build/schemas/auth/reset-password-by-token-response.schema.js +6 -0
- package/build/schemas/auth/reset-password-by-user-request.schema.js +6 -0
- package/build/schemas/auth/reset-password-by-user-response.schema.js +5 -0
- package/build/schemas/auth/reset-security-code-limits-by-admin-request.schema.js +5 -0
- package/build/schemas/auth/reset-security-code-limits-by-admin-response.schema.js +5 -0
- package/build/schemas/auth/restore-access-token.schema.js +5 -0
- package/build/schemas/auth/security-code-issuance-block.schema.js +9 -0
- package/build/schemas/auth/security-code-issuance-status.schema.js +16 -0
- package/build/schemas/client/register-client-webshop-request.schema.js +2 -1
- package/build/schemas/company/create-company-data.schema.js +5 -0
- package/build/schemas/company/create-company-user-data.schema.js +6 -0
- package/build/schemas/company/create-company-with-user-request.schema.js +7 -0
- package/build/schemas/company/create-company-with-user-response.schema.js +6 -0
- package/build/schemas/company/get-company-list-request.schema.js +8 -0
- package/build/schemas/company/get-company-list-response.schema.js +6 -0
- package/build/schemas/company/index.js +21 -0
- package/build/schemas/consignment/consignment.schema.js +9 -9
- package/build/schemas/domain/get-domain-list-request.schema.js +8 -0
- package/build/schemas/domain/get-domain-list-response.schema.js +6 -0
- package/build/schemas/employee-schedule/employee-schedule.schema.js +1 -1
- package/build/schemas/index.js +29 -8
- package/build/schemas/product/group/update-group-product-update-batch-request-data.schema.js +1 -1
- package/build/schemas/product/product-base.schema.js +1 -1
- package/build/schemas/product/update-product-request.schema.js +2 -2
- package/build/schemas/session/validate-session-s2s-request.schema.js +7 -0
- package/build/schemas/session/validate-session-s2s-response.schema.js +6 -0
- package/build/schemas/session/validate-ws-ticket-s2s-request.schema.js +7 -0
- package/build/schemas/session/validated-session-user.schema.js +15 -0
- package/build/schemas/user/allowed-user-role.schema.js +8 -0
- package/build/schemas/user/create-user-by-client-id-data.schema.js +15 -0
- package/build/schemas/user/create-user-by-client-id-request.schema.js +6 -0
- package/build/schemas/user/create-user-by-client-id-response.schema.js +11 -0
- package/build/schemas/user/create-user-for-company-request.schema.js +11 -0
- package/build/schemas/user/create-user-for-company-response.schema.js +11 -0
- package/build/schemas/user/create-user-global-request.schema.js +15 -0
- package/build/schemas/user/create-user-global-response.schema.js +6 -0
- package/build/schemas/user/create-user.schema.js +14 -0
- package/build/schemas/user/get-me-data.schema.js +7 -0
- package/build/schemas/user/get-me-response.schema.js +6 -0
- package/build/schemas/user/get-user-data.schema.js +6 -0
- package/build/schemas/user/get-user-response.schema.js +6 -0
- package/build/schemas/user/index.js +15 -0
- package/build/schemas/user/update-password-by-user-request.schema.js +9 -0
- package/build/schemas/user/update-password-by-user-response.schema.js +5 -0
- package/build/schemas/user/user.schema.js +2 -12
- package/build/schemas/work-session/create-many-work-session-request.schema.js +8 -0
- package/build/schemas/work-session/create-many-work-session-response.schema.js +9 -0
- package/build/schemas/work-session/create-work-session-for-employee.schema.js +8 -0
- package/build/schemas/work-session/create-work-session.schema.js +18 -0
- package/build/schemas/work-session/export-overtime-request.schema.js +23 -0
- package/build/schemas/work-session/export-overtime-response.schema.js +6 -0
- package/build/schemas/work-session/overtime-file.schema.js +5 -0
- package/build/schemas/work-session/update-work-session.schema.js +21 -0
- package/build/schemas/work-session/work-session-date.schema.js +13 -0
- package/build/schemas/work-session/work-session-extended-list.schema.js +9 -0
- package/build/schemas/work-session/work-session-extended.schema.js +8 -0
- package/build/schemas/work-session/work-session.schema.js +1 -26
- package/commands/auth/get-security-code-status-by-admin.query.ts +7 -0
- package/commands/auth/index.ts +2 -0
- package/commands/auth/register-user.command.ts +3 -15
- package/commands/auth/reset-password-by-admin.command.ts +3 -9
- package/commands/auth/reset-password-by-security-code.command.ts +5 -17
- package/commands/auth/reset-password-by-token.command.ts +6 -19
- package/commands/auth/reset-password-by-user.command.ts +3 -9
- package/commands/auth/reset-security-code-limits-by-admin.command.ts +11 -0
- package/commands/company/createCompanyWithUser.command.ts +3 -21
- package/commands/company/getCompanyList.query.ts +4 -14
- package/commands/domain/get-domain-list.query.ts +3 -13
- package/commands/session/validate-session-s2s.query.ts +3 -20
- package/commands/session/validate-ws-ticket-s2s.query.ts +2 -6
- package/commands/user/attachUserToCompany.command.ts +1 -0
- package/commands/user/create-user-global.command.ts +3 -22
- package/commands/user/createUserByClientId.command.ts +3 -25
- package/commands/user/createUserForCompany.command.ts +3 -26
- package/commands/user/get-me.query.ts +2 -11
- package/commands/user/getUser.command.ts +3 -9
- package/commands/user/update-password-by-user.command.ts +3 -10
- package/commands/work-session/create-many-work-session.command.ts +3 -12
- package/commands/work-session/export-overtime.query.ts +3 -21
- package/constant/error.ts +11 -0
- package/constant/validation-i18n-key.ts +2 -0
- package/constant/validation-i18n-message.ts +2 -0
- package/constant/work-session-report-limits.constant.ts +4 -0
- package/enum/index.ts +2 -0
- package/enum/security-code-blocked-reason.enum.ts +2 -0
- package/enum/security-code-purpose.enum.ts +4 -0
- package/package.json +1 -1
- package/schemas/auth/get-security-code-status-by-admin-response.schema.ts +4 -0
- package/schemas/auth/index.ts +20 -0
- package/schemas/auth/password-reset-data.schema.ts +4 -0
- package/schemas/auth/password-reset-user.schema.ts +3 -0
- package/schemas/auth/password.schema.ts +7 -0
- package/schemas/auth/register-user-request.schema.ts +9 -0
- package/schemas/auth/register-user-response.schema.ts +4 -0
- package/schemas/auth/registration-success.schema.ts +3 -0
- package/schemas/auth/reset-password-by-admin-request.schema.ts +4 -0
- package/schemas/auth/reset-password-by-admin-response.schema.ts +3 -0
- package/schemas/auth/reset-password-by-security-code-request.schema.ts +9 -0
- package/schemas/auth/reset-password-by-security-code-response.schema.ts +4 -0
- package/schemas/auth/reset-password-by-token-request.schema.ts +6 -0
- package/schemas/auth/reset-password-by-token-response.schema.ts +4 -0
- package/schemas/auth/reset-password-by-user-request.schema.ts +4 -0
- package/schemas/auth/reset-password-by-user-response.schema.ts +3 -0
- package/schemas/auth/reset-security-code-limits-by-admin-request.schema.ts +3 -0
- package/schemas/auth/reset-security-code-limits-by-admin-response.schema.ts +3 -0
- package/schemas/auth/restore-access-token.schema.ts +3 -0
- package/schemas/auth/security-code-issuance-block.schema.ts +7 -0
- package/schemas/auth/security-code-issuance-status.schema.ts +14 -0
- package/schemas/client/register-client-webshop-request.schema.ts +2 -1
- package/schemas/company/create-company-data.schema.ts +3 -0
- package/schemas/company/create-company-user-data.schema.ts +4 -0
- package/schemas/company/create-company-with-user-request.schema.ts +5 -0
- package/schemas/company/create-company-with-user-response.schema.ts +4 -0
- package/schemas/company/get-company-list-request.schema.ts +5 -0
- package/schemas/company/get-company-list-response.schema.ts +3 -0
- package/schemas/company/index.ts +5 -0
- package/schemas/consignment/consignment.schema.ts +9 -9
- package/schemas/domain/get-domain-list-request.schema.ts +5 -0
- package/schemas/domain/get-domain-list-response.schema.ts +3 -0
- package/schemas/employee-schedule/employee-schedule.schema.ts +1 -1
- package/schemas/index.ts +30 -8
- package/schemas/product/group/update-group-product-update-batch-request-data.schema.ts +1 -1
- package/schemas/product/product-base.schema.ts +1 -1
- package/schemas/product/update-product-request.schema.ts +2 -2
- package/schemas/session/validate-session-s2s-request.schema.ts +4 -0
- package/schemas/session/validate-session-s2s-response.schema.ts +3 -0
- package/schemas/session/validate-ws-ticket-s2s-request.schema.ts +4 -0
- package/schemas/session/validated-session-user.schema.ts +12 -0
- package/schemas/user/allowed-user-role.schema.ts +6 -0
- package/schemas/user/create-user-by-client-id-data.schema.ts +13 -0
- package/schemas/user/create-user-by-client-id-request.schema.ts +4 -0
- package/schemas/user/create-user-by-client-id-response.schema.ts +9 -0
- package/schemas/user/create-user-for-company-request.schema.ts +9 -0
- package/schemas/user/create-user-for-company-response.schema.ts +9 -0
- package/schemas/user/create-user-global-request.schema.ts +13 -0
- package/schemas/user/create-user-global-response.schema.ts +4 -0
- package/schemas/user/create-user.schema.ts +12 -0
- package/schemas/user/get-me-data.schema.ts +5 -0
- package/schemas/user/get-me-response.schema.ts +4 -0
- package/schemas/user/get-user-data.schema.ts +4 -0
- package/schemas/user/get-user-response.schema.ts +4 -0
- package/schemas/user/index.ts +15 -0
- package/schemas/user/update-password-by-user-request.schema.ts +7 -0
- package/schemas/user/update-password-by-user-response.schema.ts +3 -0
- package/schemas/user/user.schema.ts +1 -12
- package/schemas/work-session/create-many-work-session-request.schema.ts +5 -0
- package/schemas/work-session/create-many-work-session-response.schema.ts +6 -0
- package/schemas/work-session/create-work-session-for-employee.schema.ts +5 -0
- package/schemas/work-session/create-work-session.schema.ts +15 -0
- package/schemas/work-session/export-overtime-request.schema.ts +24 -0
- package/schemas/work-session/export-overtime-response.schema.ts +3 -0
- package/schemas/work-session/overtime-file.schema.ts +2 -0
- package/schemas/work-session/update-work-session.schema.ts +18 -0
- package/schemas/work-session/work-session-date.schema.ts +14 -0
- package/schemas/work-session/work-session-extended-list.schema.ts +6 -0
- package/schemas/work-session/work-session-extended.schema.ts +5 -0
- package/schemas/work-session/work-session.schema.ts +0 -30
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateUserGlobalResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const user_schema_1 = require("./user.schema");
|
|
6
|
+
exports.CreateUserGlobalResponseSchema = zod_1.z.object({ message: zod_1.z.string().optional(), data: user_schema_1.UserSchema });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateUserSchema = void 0;
|
|
4
|
+
const password_schema_1 = require("../auth/password.schema");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const enum_1 = require("../../enum");
|
|
7
|
+
exports.CreateUserSchema = zod_1.z.object({
|
|
8
|
+
name: zod_1.z.string(),
|
|
9
|
+
email: zod_1.z.string(),
|
|
10
|
+
phone: zod_1.z.string(),
|
|
11
|
+
password: password_schema_1.PasswordSchema,
|
|
12
|
+
roles: zod_1.z.array(zod_1.z.nativeEnum(enum_1.UserRoleEnum)).default([enum_1.UserRoleEnum.BUYER]),
|
|
13
|
+
status: zod_1.z.nativeEnum(enum_1.UserStatusEnum).default(enum_1.UserStatusEnum.INACTIVE),
|
|
14
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMeDataSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const user_schema_1 = require("./user.schema");
|
|
6
|
+
const access_policy_schema_1 = require("../access-policy/access-policy.schema");
|
|
7
|
+
exports.GetMeDataSchema = zod_1.z.object({ user: user_schema_1.UserSchema, permissions: access_policy_schema_1.EffectivePermissionsSchema });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMeResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const get_me_data_schema_1 = require("./get-me-data.schema");
|
|
6
|
+
exports.GetMeResponseSchema = zod_1.z.object({ message: zod_1.z.string().optional(), data: get_me_data_schema_1.GetMeDataSchema });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetUserDataSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const user_schema_1 = require("./user.schema");
|
|
6
|
+
exports.GetUserDataSchema = zod_1.z.object({ user: user_schema_1.UserSchema });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetUserResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const get_user_data_schema_1 = require("./get-user-data.schema");
|
|
6
|
+
exports.GetUserResponseSchema = zod_1.z.object({ data: get_user_data_schema_1.GetUserDataSchema });
|
|
@@ -17,3 +17,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./user.schema"), exports);
|
|
18
18
|
__exportStar(require("./user-contact-for-client.schema"), exports);
|
|
19
19
|
__exportStar(require("./user-name.schema"), exports);
|
|
20
|
+
__exportStar(require("./create-user.schema"), exports);
|
|
21
|
+
__exportStar(require("./update-password-by-user-request.schema"), exports);
|
|
22
|
+
__exportStar(require("./update-password-by-user-response.schema"), exports);
|
|
23
|
+
__exportStar(require("./create-user-by-client-id-data.schema"), exports);
|
|
24
|
+
__exportStar(require("./create-user-by-client-id-request.schema"), exports);
|
|
25
|
+
__exportStar(require("./create-user-by-client-id-response.schema"), exports);
|
|
26
|
+
__exportStar(require("./allowed-user-role.schema"), exports);
|
|
27
|
+
__exportStar(require("./create-user-for-company-request.schema"), exports);
|
|
28
|
+
__exportStar(require("./create-user-for-company-response.schema"), exports);
|
|
29
|
+
__exportStar(require("./create-user-global-request.schema"), exports);
|
|
30
|
+
__exportStar(require("./create-user-global-response.schema"), exports);
|
|
31
|
+
__exportStar(require("./get-me-data.schema"), exports);
|
|
32
|
+
__exportStar(require("./get-me-response.schema"), exports);
|
|
33
|
+
__exportStar(require("./get-user-data.schema"), exports);
|
|
34
|
+
__exportStar(require("./get-user-response.schema"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdatePasswordByUserRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const password_schema_1 = require("../auth/password.schema");
|
|
6
|
+
exports.UpdatePasswordByUserRequestSchema = zod_1.z.object({
|
|
7
|
+
password: password_schema_1.PasswordSchema,
|
|
8
|
+
currentPassword: zod_1.z.string().optional(),
|
|
9
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UserSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
const user_messenger_profile_schema_1 = require("../messenger-profile/user-messenger-profile.schema");
|
|
@@ -10,21 +10,11 @@ exports.UserSchema = zod_1.z.object({
|
|
|
10
10
|
email: zod_1.z.string().nullable(),
|
|
11
11
|
phone: zod_1.z.string().nullable(),
|
|
12
12
|
roles: zod_1.z.array(zod_1.z.nativeEnum(enum_1.UserRoleEnum)),
|
|
13
|
-
companyUUID: zod_1.z.string(),
|
|
13
|
+
companyUUID: zod_1.z.string().nullable(),
|
|
14
14
|
status: zod_1.z.nativeEnum(enum_1.UserStatusEnum),
|
|
15
15
|
isGlobal: zod_1.z.boolean(),
|
|
16
|
-
restoreTokenHash: zod_1.z.string().nullable(),
|
|
17
|
-
passwordHash: zod_1.z.string(),
|
|
18
16
|
deletedAt: zod_1.z.date().nullable(),
|
|
19
17
|
createdAt: zod_1.z.date(),
|
|
20
18
|
updatedAt: zod_1.z.date(),
|
|
21
19
|
messengerProfiles: zod_1.z.array(user_messenger_profile_schema_1.UserMessengerProfileSchema).optional(),
|
|
22
20
|
});
|
|
23
|
-
exports.CreateUserSchema = zod_1.z.object({
|
|
24
|
-
name: zod_1.z.string(),
|
|
25
|
-
email: zod_1.z.string(),
|
|
26
|
-
phone: zod_1.z.string(),
|
|
27
|
-
password: zod_1.z.string(),
|
|
28
|
-
roles: zod_1.z.array(zod_1.z.nativeEnum(enum_1.UserRoleEnum)).default([enum_1.UserRoleEnum.BUYER]),
|
|
29
|
-
status: zod_1.z.nativeEnum(enum_1.UserStatusEnum).default(enum_1.UserStatusEnum.INACTIVE),
|
|
30
|
-
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateManyWorkSessionRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const create_work_session_schema_1 = require("./create-work-session.schema");
|
|
6
|
+
exports.CreateManyWorkSessionRequestSchema = zod_1.z.object({
|
|
7
|
+
data: zod_1.z.array(create_work_session_schema_1.CreateWorkSessionSchema).min(1, { message: 'validation.atLeastOneItem' }),
|
|
8
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateManyWorkSessionResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const work_session_schema_1 = require("./work-session.schema");
|
|
6
|
+
exports.CreateManyWorkSessionResponseSchema = zod_1.z.object({
|
|
7
|
+
message: zod_1.z.string().optional(),
|
|
8
|
+
data: zod_1.z.array(work_session_schema_1.WorkSessionSchema),
|
|
9
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateWorkSessionForEmployeeSchema = void 0;
|
|
4
|
+
const work_session_schema_1 = require("./work-session.schema");
|
|
5
|
+
const work_session_date_schema_1 = require("./work-session-date.schema");
|
|
6
|
+
exports.CreateWorkSessionForEmployeeSchema = work_session_schema_1.WorkSessionSchema.pick({
|
|
7
|
+
date: true,
|
|
8
|
+
}).extend({ date: work_session_date_schema_1.WorkSessionDateSchema });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateWorkSessionSchema = void 0;
|
|
4
|
+
const work_session_schema_1 = require("./work-session.schema");
|
|
5
|
+
const work_session_date_schema_1 = require("./work-session-date.schema");
|
|
6
|
+
exports.CreateWorkSessionSchema = work_session_schema_1.WorkSessionSchema.omit({
|
|
7
|
+
uuid: true,
|
|
8
|
+
actualWorkHours: true,
|
|
9
|
+
checkInIp: true,
|
|
10
|
+
createdAt: true,
|
|
11
|
+
updatedAt: true,
|
|
12
|
+
companyUUID: true,
|
|
13
|
+
})
|
|
14
|
+
.extend({ date: work_session_date_schema_1.WorkSessionDateSchema, checkInAt: work_session_date_schema_1.WorkSessionDateSchema, checkOutAt: work_session_date_schema_1.WorkSessionDateSchema.nullable() })
|
|
15
|
+
.refine(value => value.checkOutAt === null || value.checkOutAt >= value.checkInAt, {
|
|
16
|
+
message: 'validation.dateRange',
|
|
17
|
+
path: ['checkOutAt'],
|
|
18
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExportOvertimeRequestSchema = void 0;
|
|
4
|
+
const validation_i18n_key_1 = require("../../constant/validation-i18n-key");
|
|
5
|
+
const work_session_report_limits_constant_1 = require("../../constant/work-session-report-limits.constant");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const date_helper_1 = require("../../helpers/date.helper");
|
|
8
|
+
const work_session_date_schema_1 = require("./work-session-date.schema");
|
|
9
|
+
exports.ExportOvertimeRequestSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
startDate: work_session_date_schema_1.WorkSessionDateSchema,
|
|
12
|
+
endDate: work_session_date_schema_1.WorkSessionDateSchema,
|
|
13
|
+
userUUIDs: zod_1.z.array(zod_1.z.string().uuid()).optional(),
|
|
14
|
+
})
|
|
15
|
+
.refine(value => (0, date_helper_1.dateRangeCheck)(value.startDate, value.endDate), {
|
|
16
|
+
message: validation_i18n_key_1.ValidationI18nKey.dateRange,
|
|
17
|
+
path: ['endDate', 'startDate'],
|
|
18
|
+
})
|
|
19
|
+
.refine(value => value.endDate.getTime() - value.startDate.getTime() <=
|
|
20
|
+
work_session_report_limits_constant_1.WORK_SESSION_REPORT_LIMITS.maxPeriodDays * work_session_report_limits_constant_1.WORK_SESSION_REPORT_LIMITS.millisecondsPerDay, {
|
|
21
|
+
message: validation_i18n_key_1.ValidationI18nKey.reportPeriodMax,
|
|
22
|
+
path: ['endDate', 'startDate'],
|
|
23
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExportOvertimeResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const overtime_file_schema_1 = require("./overtime-file.schema");
|
|
6
|
+
exports.ExportOvertimeResponseSchema = zod_1.z.object({ data: overtime_file_schema_1.OvertimeFileSchema });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateWorkSessionSchema = void 0;
|
|
4
|
+
const work_session_schema_1 = require("./work-session.schema");
|
|
5
|
+
const work_session_date_schema_1 = require("./work-session-date.schema");
|
|
6
|
+
exports.UpdateWorkSessionSchema = work_session_schema_1.WorkSessionSchema.pick({
|
|
7
|
+
date: true,
|
|
8
|
+
checkInAt: true,
|
|
9
|
+
checkOutAt: true,
|
|
10
|
+
actualWorkHours: true,
|
|
11
|
+
})
|
|
12
|
+
.partial()
|
|
13
|
+
.extend({
|
|
14
|
+
date: work_session_date_schema_1.WorkSessionDateSchema.optional(),
|
|
15
|
+
checkInAt: work_session_date_schema_1.WorkSessionDateSchema.optional(),
|
|
16
|
+
checkOutAt: work_session_date_schema_1.WorkSessionDateSchema.nullable().optional(),
|
|
17
|
+
})
|
|
18
|
+
.refine(value => !value.checkInAt || !value.checkOutAt || value.checkOutAt >= value.checkInAt, {
|
|
19
|
+
message: 'validation.dateRange',
|
|
20
|
+
path: ['checkOutAt'],
|
|
21
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkSessionDateSchema = void 0;
|
|
4
|
+
const validation_i18n_key_1 = require("../../constant/validation-i18n-key");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.WorkSessionDateSchema = zod_1.z.coerce
|
|
7
|
+
.date()
|
|
8
|
+
.min(new Date('2000-01-01T00:00:00.000Z'), { message: validation_i18n_key_1.ValidationI18nKey.dateRange })
|
|
9
|
+
.refine(value => {
|
|
10
|
+
const latest = new Date();
|
|
11
|
+
latest.setUTCFullYear(latest.getUTCFullYear() + 1);
|
|
12
|
+
return value <= latest;
|
|
13
|
+
}, { message: validation_i18n_key_1.ValidationI18nKey.dateRange });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkSessionExtendedListSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const work_session_extended_schema_1 = require("./work-session-extended.schema");
|
|
6
|
+
exports.WorkSessionExtendedListSchema = zod_1.z.object({
|
|
7
|
+
list: zod_1.z.array(work_session_extended_schema_1.WorkSessionExtendedSchema),
|
|
8
|
+
total: zod_1.z.number(),
|
|
9
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkSessionExtendedSchema = void 0;
|
|
4
|
+
const work_session_schema_1 = require("./work-session.schema");
|
|
5
|
+
const user_schema_1 = require("../user/user.schema");
|
|
6
|
+
exports.WorkSessionExtendedSchema = work_session_schema_1.WorkSessionSchema.extend({
|
|
7
|
+
user: user_schema_1.UserSchema,
|
|
8
|
+
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.WorkSessionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const user_schema_1 = require("../user/user.schema");
|
|
6
5
|
exports.WorkSessionSchema = zod_1.z.object({
|
|
7
6
|
uuid: zod_1.z.string(),
|
|
8
7
|
userUUID: zod_1.z.string(),
|
|
@@ -15,27 +14,3 @@ exports.WorkSessionSchema = zod_1.z.object({
|
|
|
15
14
|
createdAt: zod_1.z.coerce.date(),
|
|
16
15
|
updatedAt: zod_1.z.coerce.date(),
|
|
17
16
|
});
|
|
18
|
-
exports.WorkSessionExtendedSchema = exports.WorkSessionSchema.extend({
|
|
19
|
-
user: user_schema_1.UserSchema.omit({ passwordHash: true, restoreTokenHash: true }),
|
|
20
|
-
});
|
|
21
|
-
exports.WorkSessionExtendedListSchema = zod_1.z.object({
|
|
22
|
-
list: zod_1.z.array(exports.WorkSessionExtendedSchema),
|
|
23
|
-
total: zod_1.z.number(),
|
|
24
|
-
});
|
|
25
|
-
exports.CreateWorkSessionSchema = exports.WorkSessionSchema.omit({
|
|
26
|
-
uuid: true,
|
|
27
|
-
actualWorkHours: true,
|
|
28
|
-
checkInIp: true,
|
|
29
|
-
createdAt: true,
|
|
30
|
-
updatedAt: true,
|
|
31
|
-
companyUUID: true,
|
|
32
|
-
});
|
|
33
|
-
exports.CreateWorkSessionForEmployeeSchema = exports.WorkSessionSchema.pick({
|
|
34
|
-
date: true,
|
|
35
|
-
});
|
|
36
|
-
exports.UpdateWorkSessionSchema = exports.WorkSessionSchema.pick({
|
|
37
|
-
date: true,
|
|
38
|
-
checkInAt: true,
|
|
39
|
-
checkOutAt: true,
|
|
40
|
-
actualWorkHours: true,
|
|
41
|
-
}).partial();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { GetSecurityCodeStatusByAdminResponseSchema } from '../../schemas/auth/get-security-code-status-by-admin-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace GetSecurityCodeStatusByAdminContractQuery {
|
|
5
|
+
export const ResponseSchema = GetSecurityCodeStatusByAdminResponseSchema;
|
|
6
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
7
|
+
}
|
package/commands/auth/index.ts
CHANGED
|
@@ -9,3 +9,5 @@ export * from './restore-password-by-security-code.command';
|
|
|
9
9
|
export * from './reset-password-by-security-code.command';
|
|
10
10
|
export * from './mobile-login-user.command';
|
|
11
11
|
export * from './get-available-channels.command';
|
|
12
|
+
export * from './get-security-code-status-by-admin.query';
|
|
13
|
+
export * from './reset-security-code-limits-by-admin.command';
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
email: z.email().toLowerCase(),
|
|
5
|
-
phone: z.string(),
|
|
6
|
-
name: z.string(),
|
|
7
|
-
password: z.string(),
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
const RegisterUserResponseSchema = z.object({
|
|
11
|
-
message: z.string().optional(),
|
|
12
|
-
data: z.object({
|
|
13
|
-
success: z.boolean(),
|
|
14
|
-
}),
|
|
15
|
-
});
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { RegisterUserRequestSchema } from '../../schemas/auth/register-user-request.schema';
|
|
3
|
+
import { RegisterUserResponseSchema } from '../../schemas/auth/register-user-response.schema';
|
|
16
4
|
|
|
17
5
|
export namespace RegisterUserContractCommand {
|
|
18
6
|
export const RequestSchema = RegisterUserRequestSchema;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
password: z.string(),
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
const ResetPasswordByAdminResponseSchema = z.object({
|
|
8
|
-
message: z.string().optional(),
|
|
9
|
-
});
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { ResetPasswordByAdminRequestSchema } from '../../schemas/auth/reset-password-by-admin-request.schema';
|
|
3
|
+
import { ResetPasswordByAdminResponseSchema } from '../../schemas/auth/reset-password-by-admin-response.schema';
|
|
10
4
|
|
|
11
5
|
export namespace ResetPasswordByAdminContractCommand {
|
|
12
6
|
export const RequestSchema = ResetPasswordByAdminRequestSchema;
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { ResetPasswordBySecurityCodeRequestSchema } from '../../schemas/auth/reset-password-by-security-code-request.schema';
|
|
3
|
+
import { ResetPasswordBySecurityCodeResponseSchema } from '../../schemas/auth/reset-password-by-security-code-response.schema';
|
|
2
4
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
phone: z.string().optional(),
|
|
6
|
-
securityCode: z.string(),
|
|
7
|
-
password: z.string().min(6),
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export const ResetPasswordBySecurityCodeResponseSchema = z.object({
|
|
11
|
-
data: z.object({
|
|
12
|
-
user: z.object({
|
|
13
|
-
uuid: z.string(),
|
|
14
|
-
email: z.string().nullable(),
|
|
15
|
-
phone: z.string().nullable(),
|
|
16
|
-
}),
|
|
17
|
-
}),
|
|
18
|
-
});
|
|
5
|
+
export { ResetPasswordBySecurityCodeRequestSchema } from '../../schemas/auth/reset-password-by-security-code-request.schema';
|
|
6
|
+
export { ResetPasswordBySecurityCodeResponseSchema } from '../../schemas/auth/reset-password-by-security-code-response.schema';
|
|
19
7
|
|
|
20
8
|
export namespace ResetPasswordBySecurityCodeContractCommand {
|
|
21
9
|
export const RequestSchema = ResetPasswordBySecurityCodeRequestSchema;
|
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { ResetPasswordByTokenRequestSchema } from '../../schemas/auth/reset-password-by-token-request.schema';
|
|
3
|
+
import { ResetPasswordByTokenResponseSchema } from '../../schemas/auth/reset-password-by-token-response.schema';
|
|
2
4
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
email: z.email().toLowerCase().optional(),
|
|
6
|
-
phone: z.string().optional(),
|
|
7
|
-
restoreToken: z.string(),
|
|
8
|
-
password: z.string(),
|
|
9
|
-
})
|
|
10
|
-
.refine(data => data.email || data.phone, {
|
|
11
|
-
message: 'validation.emailOrPhoneRequired',
|
|
12
|
-
path: ['email', 'phone'],
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export const ResetPasswordByTokenResponseSchema = z.object({
|
|
16
|
-
message: z.string().optional(),
|
|
17
|
-
data: z.object({
|
|
18
|
-
accessToken: z.string(),
|
|
19
|
-
}),
|
|
20
|
-
});
|
|
5
|
+
export { ResetPasswordByTokenRequestSchema } from '../../schemas/auth/reset-password-by-token-request.schema';
|
|
6
|
+
export { ResetPasswordByTokenResponseSchema } from '../../schemas/auth/reset-password-by-token-response.schema';
|
|
21
7
|
|
|
8
|
+
/** @deprecated Legacy-контракт для совместимости api-lib; пароль проверяется через PasswordSchema. */
|
|
22
9
|
export namespace ResetPasswordByTokenContractCommand {
|
|
23
10
|
export const RequestSchema = ResetPasswordByTokenRequestSchema;
|
|
24
11
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
password: z.string(),
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
const ResetPasswordByUserResponseSchema = z.object({
|
|
8
|
-
message: z.string().optional(),
|
|
9
|
-
});
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { ResetPasswordByUserRequestSchema } from '../../schemas/auth/reset-password-by-user-request.schema';
|
|
3
|
+
import { ResetPasswordByUserResponseSchema } from '../../schemas/auth/reset-password-by-user-response.schema';
|
|
10
4
|
|
|
11
5
|
export namespace ResetPasswordByUserContractCommand {
|
|
12
6
|
export const RequestSchema = ResetPasswordByUserRequestSchema;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { ResetSecurityCodeLimitsByAdminRequestSchema } from '../../schemas/auth/reset-security-code-limits-by-admin-request.schema';
|
|
3
|
+
import { ResetSecurityCodeLimitsByAdminResponseSchema } from '../../schemas/auth/reset-security-code-limits-by-admin-response.schema';
|
|
4
|
+
|
|
5
|
+
export namespace ResetSecurityCodeLimitsByAdminContractCommand {
|
|
6
|
+
export const RequestSchema = ResetSecurityCodeLimitsByAdminRequestSchema;
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = ResetSecurityCodeLimitsByAdminResponseSchema;
|
|
10
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
|
+
}
|
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const CreateCompanyWithUserRequestSchema = z.object({
|
|
5
|
-
company: z.object({
|
|
6
|
-
name: z.string(),
|
|
7
|
-
alias: z.string().optional(),
|
|
8
|
-
}),
|
|
9
|
-
user: UserSchema.pick({
|
|
10
|
-
email: true,
|
|
11
|
-
phone: true,
|
|
12
|
-
name: true,
|
|
13
|
-
}).extend({
|
|
14
|
-
password: z.string(),
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const CreateCompanyWithUserResponseSchema = z.object({
|
|
19
|
-
message: z.string().optional(),
|
|
20
|
-
data: CompanySchema.nullable(),
|
|
21
|
-
});
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { CreateCompanyWithUserRequestSchema } from '../../schemas/company/create-company-with-user-request.schema';
|
|
3
|
+
import { CreateCompanyWithUserResponseSchema } from '../../schemas/company/create-company-with-user-response.schema';
|
|
22
4
|
|
|
23
5
|
export namespace CreateCompanyWithUserContractCommand {
|
|
24
6
|
export const RequestSchema = CreateCompanyWithUserRequestSchema;
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const GetCompanyListRequestSchema = z.object({
|
|
5
|
-
page: z.string().transform(val => Number(val) || 1),
|
|
6
|
-
count: z.string().transform(val => Number(val) || 10),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const GetCompanyResponseSchema = z.object({
|
|
10
|
-
message: z.string().optional(),
|
|
11
|
-
data: CompanyListSchema,
|
|
12
|
-
});
|
|
13
|
-
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { GetCompanyListRequestSchema } from '../../schemas/company/get-company-list-request.schema';
|
|
3
|
+
import { GetCompanyListResponseSchema } from '../../schemas/company/get-company-list-response.schema';
|
|
14
4
|
export namespace GetCompanyListContractQuery {
|
|
15
5
|
export const RequestSchema = GetCompanyListRequestSchema;
|
|
16
6
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
7
|
|
|
18
|
-
export const ResponseSchema =
|
|
8
|
+
export const ResponseSchema = GetCompanyListResponseSchema;
|
|
19
9
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
10
|
}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const GetDomainListRequestSchema = z.object({
|
|
5
|
-
page: z.string().transform(val => Number(val) || 1),
|
|
6
|
-
count: z.string().transform(val => Number(val) || 10),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const GetDomainListResponseSchema = z.object({
|
|
10
|
-
message: z.string().optional(),
|
|
11
|
-
data: DomainListSchema,
|
|
12
|
-
});
|
|
13
|
-
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { GetDomainListRequestSchema } from '../../schemas/domain/get-domain-list-request.schema';
|
|
3
|
+
import { GetDomainListResponseSchema } from '../../schemas/domain/get-domain-list-response.schema';
|
|
14
4
|
export namespace GetDomainListContractQuery {
|
|
15
5
|
export const RequestSchema = GetDomainListRequestSchema;
|
|
16
6
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const ValidateSessionS2SRequestSchema = z.object({
|
|
5
|
-
sessionToken: z.string(),
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
const ValidateSessionS2SResponseSchema = z.object({
|
|
9
|
-
data: z.object({
|
|
10
|
-
userUUID: z.string(),
|
|
11
|
-
companyUUID: z.string(),
|
|
12
|
-
email: z.string().nullable(),
|
|
13
|
-
phone: z.string().nullable(),
|
|
14
|
-
roles: z.array(z.nativeEnum(UserRoleEnum)),
|
|
15
|
-
status: z.nativeEnum(UserStatusEnum),
|
|
16
|
-
isGlobal: z.boolean(),
|
|
17
|
-
type: z.string().nullable(),
|
|
18
|
-
}),
|
|
19
|
-
});
|
|
20
|
-
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { ValidateSessionS2SRequestSchema } from '../../schemas/session/validate-session-s2s-request.schema';
|
|
3
|
+
import { ValidateSessionS2SResponseSchema } from '../../schemas/session/validate-session-s2s-response.schema';
|
|
21
4
|
export namespace ValidateSessionS2SContractQuery {
|
|
22
5
|
export const RequestSchema = ValidateSessionS2SRequestSchema;
|
|
23
6
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
const ValidateWsTicketS2SRequestSchema = z.object({
|
|
4
|
-
ticket: z.string(),
|
|
5
|
-
});
|
|
6
|
-
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { ValidateWsTicketS2SRequestSchema } from '../../schemas/session/validate-ws-ticket-s2s-request.schema';
|
|
7
3
|
export namespace ValidateWsTicketS2SContractQuery {
|
|
8
4
|
export const RequestSchema = ValidateWsTicketS2SRequestSchema;
|
|
9
5
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -6,6 +6,7 @@ const AttachUserToCompanyResponseSchema = z.object({
|
|
|
6
6
|
data: UserSchema,
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
+
/** @deprecated Не используется сервером; сохранён для совместимости api-lib. */
|
|
9
10
|
export namespace AttachUserToCompanyCommand {
|
|
10
11
|
export const ResponseSchema = AttachUserToCompanyResponseSchema;
|
|
11
12
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const CreateUserGlobalRequestSchema = UserSchema.omit({
|
|
5
|
-
uuid: true,
|
|
6
|
-
createdAt: true,
|
|
7
|
-
updatedAt: true,
|
|
8
|
-
deletedAt: true,
|
|
9
|
-
companyUUID: true,
|
|
10
|
-
roles: true,
|
|
11
|
-
isGlobal: true,
|
|
12
|
-
status: true,
|
|
13
|
-
restoreTokenHash: true,
|
|
14
|
-
passwordHash: true,
|
|
15
|
-
}).extend({
|
|
16
|
-
password: z.string(),
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const CreateUserGlobalResponseSchema = z.object({
|
|
20
|
-
message: z.string().optional(),
|
|
21
|
-
data: UserSchema,
|
|
22
|
-
});
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import { CreateUserGlobalRequestSchema } from '../../schemas/user/create-user-global-request.schema';
|
|
3
|
+
import { CreateUserGlobalResponseSchema } from '../../schemas/user/create-user-global-response.schema';
|
|
23
4
|
|
|
24
5
|
export namespace CreateUserGlobalCommand {
|
|
25
6
|
export const RequestSchema = CreateUserGlobalRequestSchema;
|