@floristcloud/api-lib 1.2.29 → 1.2.30
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/index.js +1 -0
- package/build/commands/auth/reset-login-attempts-by-admin.command.js +13 -0
- package/build/commands/order/group/merge-orders.command.js +7 -1
- package/build/constant/error.js +1 -0
- package/build/schemas/client/client.schema.js +1 -0
- package/commands/auth/index.ts +1 -0
- package/commands/auth/reset-login-attempts-by-admin.command.ts +15 -0
- package/commands/order/group/merge-orders.command.ts +9 -3
- package/constant/error.ts +1 -0
- package/package.json +1 -1
- package/schemas/client/client.schema.ts +1 -0
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./register-user.command"), exports);
|
|
18
18
|
__exportStar(require("./reset-password-by-user.command"), exports);
|
|
19
19
|
__exportStar(require("./reset-password-by-admin.command"), exports);
|
|
20
|
+
__exportStar(require("./reset-login-attempts-by-admin.command"), exports);
|
|
20
21
|
__exportStar(require("./login-user.command"), exports);
|
|
21
22
|
__exportStar(require("./list-mobile-buyer-tenants.command"), exports);
|
|
22
23
|
__exportStar(require("./reset-password-by-token.command"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResetLoginAttemptsByAdminContractCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ResetLoginAttemptsByAdminRequestSchema = zod_1.z.object({});
|
|
6
|
+
const ResetLoginAttemptsByAdminResponseSchema = zod_1.z.object({
|
|
7
|
+
message: zod_1.z.string().optional(),
|
|
8
|
+
});
|
|
9
|
+
var ResetLoginAttemptsByAdminContractCommand;
|
|
10
|
+
(function (ResetLoginAttemptsByAdminContractCommand) {
|
|
11
|
+
ResetLoginAttemptsByAdminContractCommand.RequestSchema = ResetLoginAttemptsByAdminRequestSchema;
|
|
12
|
+
ResetLoginAttemptsByAdminContractCommand.ResponseSchema = ResetLoginAttemptsByAdminResponseSchema;
|
|
13
|
+
})(ResetLoginAttemptsByAdminContractCommand || (exports.ResetLoginAttemptsByAdminContractCommand = ResetLoginAttemptsByAdminContractCommand = {}));
|
|
@@ -3,8 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MergeOrdersExecuteContractCommand = exports.MergeOrdersContractCommand = exports.MergeOrdersGroupAnalysisResponseSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const schemas_1 = require("../../../schemas");
|
|
6
|
-
const MergeOrdersRequestSchema = zod_1.z
|
|
6
|
+
const MergeOrdersRequestSchema = zod_1.z
|
|
7
|
+
.object({
|
|
7
8
|
orderUUIDList: zod_1.z.array(zod_1.z.string().uuid()).min(2),
|
|
9
|
+
targetOrderUUID: zod_1.z.string().uuid().optional(),
|
|
10
|
+
})
|
|
11
|
+
.refine(data => !data.targetOrderUUID || data.orderUUIDList.includes(data.targetOrderUUID), {
|
|
12
|
+
message: 'targetOrderUUID must be present in orderUUIDList',
|
|
13
|
+
path: ['targetOrderUUID'],
|
|
8
14
|
});
|
|
9
15
|
exports.MergeOrdersGroupAnalysisResponseSchema = zod_1.z.object({
|
|
10
16
|
clientUUID: zod_1.z.string(),
|
package/build/constant/error.js
CHANGED
|
@@ -110,6 +110,7 @@ exports.ERRORS = {
|
|
|
110
110
|
ALREADY_REGISTERED: { code: 'A001', message: 'User already exists', httpCode: 409 },
|
|
111
111
|
INVALID_USER_TYPE: { code: 'A018', message: 'Invalid user type', httpCode: 400 },
|
|
112
112
|
TOO_MANY_REQUESTS: { code: 'A019', message: 'Too many requests', httpCode: 429 },
|
|
113
|
+
ERROR_WHILE_RESET_LOGIN_ATTEMPTS: { code: 'A020', message: 'Failed to reset login attempts', httpCode: 500 },
|
|
113
114
|
//DOMAIN
|
|
114
115
|
DOMAIN_LIST_FETCH_FAILED: { code: 'D001', message: 'Error when retrieving a domain list', httpCode: 500 },
|
|
115
116
|
DOMAIN_FETCH_FAILED: { code: 'D002', message: 'Error when retrieving a domain', httpCode: 500 },
|
|
@@ -46,6 +46,7 @@ exports.ClientExtendedSchema = exports.ClientSchema.merge(zod_1.z.object({
|
|
|
46
46
|
responsibleUser: user_schema_1.UserSchema.nullable(),
|
|
47
47
|
clientMarkingList: client_marking_schema_1.ClientMarkingSchema.array().optional(),
|
|
48
48
|
hasOverdueDebt: zod_1.z.boolean().nullable().optional(),
|
|
49
|
+
isLoginBlocked: zod_1.z.boolean(),
|
|
49
50
|
}));
|
|
50
51
|
exports.ClientExtendedListSchema = zod_1.z.object({
|
|
51
52
|
clientList: exports.ClientExtendedSchema.array(),
|
package/commands/auth/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './register-user.command';
|
|
2
2
|
export * from './reset-password-by-user.command';
|
|
3
3
|
export * from './reset-password-by-admin.command';
|
|
4
|
+
export * from './reset-login-attempts-by-admin.command';
|
|
4
5
|
export * from './login-user.command';
|
|
5
6
|
export * from './list-mobile-buyer-tenants.command';
|
|
6
7
|
export * from './reset-password-by-token.command';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const ResetLoginAttemptsByAdminRequestSchema = z.object({});
|
|
4
|
+
|
|
5
|
+
const ResetLoginAttemptsByAdminResponseSchema = z.object({
|
|
6
|
+
message: z.string().optional(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export namespace ResetLoginAttemptsByAdminContractCommand {
|
|
10
|
+
export const RequestSchema = ResetLoginAttemptsByAdminRequestSchema;
|
|
11
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = ResetLoginAttemptsByAdminResponseSchema;
|
|
14
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
15
|
+
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ErrorMessageSchema } from '../../../schemas';
|
|
3
3
|
|
|
4
|
-
const MergeOrdersRequestSchema = z
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const MergeOrdersRequestSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
orderUUIDList: z.array(z.string().uuid()).min(2),
|
|
7
|
+
targetOrderUUID: z.string().uuid().optional(),
|
|
8
|
+
})
|
|
9
|
+
.refine(data => !data.targetOrderUUID || data.orderUUIDList.includes(data.targetOrderUUID), {
|
|
10
|
+
message: 'targetOrderUUID must be present in orderUUIDList',
|
|
11
|
+
path: ['targetOrderUUID'],
|
|
12
|
+
});
|
|
7
13
|
|
|
8
14
|
export const MergeOrdersGroupAnalysisResponseSchema = z.object({
|
|
9
15
|
clientUUID: z.string(),
|
package/constant/error.ts
CHANGED
|
@@ -114,6 +114,7 @@ export const ERRORS = {
|
|
|
114
114
|
ALREADY_REGISTERED: { code: 'A001', message: 'User already exists', httpCode: 409 },
|
|
115
115
|
INVALID_USER_TYPE: { code: 'A018', message: 'Invalid user type', httpCode: 400 },
|
|
116
116
|
TOO_MANY_REQUESTS: { code: 'A019', message: 'Too many requests', httpCode: 429 },
|
|
117
|
+
ERROR_WHILE_RESET_LOGIN_ATTEMPTS: { code: 'A020', message: 'Failed to reset login attempts', httpCode: 500 },
|
|
117
118
|
|
|
118
119
|
//DOMAIN
|
|
119
120
|
DOMAIN_LIST_FETCH_FAILED: { code: 'D001', message: 'Error when retrieving a domain list', httpCode: 500 },
|
package/package.json
CHANGED
|
@@ -49,6 +49,7 @@ export const ClientExtendedSchema = ClientSchema.merge(
|
|
|
49
49
|
responsibleUser: UserSchema.nullable(),
|
|
50
50
|
clientMarkingList: ClientMarkingSchema.array().optional(),
|
|
51
51
|
hasOverdueDebt: z.boolean().nullable().optional(),
|
|
52
|
+
isLoginBlocked: z.boolean(),
|
|
52
53
|
}),
|
|
53
54
|
);
|
|
54
55
|
|