@floristcloud/api-lib 1.2.5 → 1.2.6
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-available-channels.command.js +1 -0
- package/build/constant/error.js +3 -0
- package/build/enum/index.js +1 -0
- package/build/enum/notification-type.enum.js +1 -0
- package/build/enum/security-code-blocked-reason.enum.js +8 -0
- package/commands/auth/get-available-channels.command.ts +2 -1
- package/constant/error.ts +3 -0
- package/enum/index.ts +1 -0
- package/enum/notification-type.enum.ts +1 -0
- package/enum/security-code-blocked-reason.enum.ts +4 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ exports.GetAvailableChannelsRequestSchema = zod_1.z.object({
|
|
|
9
9
|
});
|
|
10
10
|
exports.GetAvailableChannelsResponseSchema = zod_1.z.object({
|
|
11
11
|
channels: zod_1.z.array(zod_1.z.nativeEnum(enum_1.NotificationChannelEnum)),
|
|
12
|
+
blockedReason: zod_1.z.nativeEnum(enum_1.SecurityCodeBlockedReasonEnum).optional(),
|
|
12
13
|
});
|
|
13
14
|
var GetAvailableChannelsContractCommand;
|
|
14
15
|
(function (GetAvailableChannelsContractCommand) {
|
package/build/constant/error.js
CHANGED
|
@@ -879,6 +879,9 @@ exports.ERRORS = {
|
|
|
879
879
|
SECURITY_CODE_NOT_FOUND: { code: 'SC002', message: 'Security code not found', httpCode: 404 },
|
|
880
880
|
SECURITY_CODE_INVALID: { code: 'SC003', message: 'Security code is invalid', httpCode: 400 },
|
|
881
881
|
SECURITY_CODE_THROTTLED: { code: 'SC004', message: 'Security code creation too frequent', httpCode: 429 },
|
|
882
|
+
SECURITY_CODE_FRAUD: { code: 'SC005', message: 'Security code attempts exceeded. Contact administrator', httpCode: 403 },
|
|
883
|
+
SECURITY_CODE_DAILY_LIMIT: { code: 'SC006', message: 'Daily security code limit reached. Contact administrator', httpCode: 429 },
|
|
884
|
+
SECURITY_CODE_FRAUD_BLOCK: { code: 'SC007', message: 'Security code temporarily blocked after fraud detection', httpCode: 429 },
|
|
882
885
|
// MESSENGER PROFILE
|
|
883
886
|
MESSENGER_VERIFICATION_CODE_NOT_FOUND: { code: 'MP001', message: 'Verification code not found', httpCode: 404 },
|
|
884
887
|
MESSENGER_VERIFICATION_CODE_EXPIRED: { code: 'MP002', message: 'Verification code expired', httpCode: 400 },
|
package/build/enum/index.js
CHANGED
|
@@ -81,3 +81,4 @@ __exportStar(require("./chat-no-manager-mode.enum"), exports);
|
|
|
81
81
|
__exportStar(require("./match-confidence.enum"), exports);
|
|
82
82
|
__exportStar(require("./session-platform.enum"), exports);
|
|
83
83
|
__exportStar(require("./device-platform.enum"), exports);
|
|
84
|
+
__exportStar(require("./security-code-blocked-reason.enum"), exports);
|
|
@@ -9,4 +9,5 @@ var NotificationTypeEnum;
|
|
|
9
9
|
NotificationTypeEnum["CART_EXPIRATION"] = "CART_EXPIRATION";
|
|
10
10
|
NotificationTypeEnum["WRITE_OFF_REJECTED"] = "WRITE_OFF_REJECTED";
|
|
11
11
|
NotificationTypeEnum["CLIENT_MESSAGE_TO_EMPLOYEE"] = "CLIENT_MESSAGE_TO_EMPLOYEE";
|
|
12
|
+
NotificationTypeEnum["PASSWORD_CHANGED"] = "PASSWORD_CHANGED";
|
|
12
13
|
})(NotificationTypeEnum || (exports.NotificationTypeEnum = NotificationTypeEnum = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecurityCodeBlockedReasonEnum = void 0;
|
|
4
|
+
var SecurityCodeBlockedReasonEnum;
|
|
5
|
+
(function (SecurityCodeBlockedReasonEnum) {
|
|
6
|
+
SecurityCodeBlockedReasonEnum["FRAUD_BLOCK"] = "fraud_block";
|
|
7
|
+
SecurityCodeBlockedReasonEnum["DAILY_LIMIT"] = "daily_limit";
|
|
8
|
+
})(SecurityCodeBlockedReasonEnum || (exports.SecurityCodeBlockedReasonEnum = SecurityCodeBlockedReasonEnum = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { NotificationChannelEnum } from '../../enum';
|
|
2
|
+
import { NotificationChannelEnum, SecurityCodeBlockedReasonEnum } from '../../enum';
|
|
3
3
|
|
|
4
4
|
export const GetAvailableChannelsRequestSchema = z.object({
|
|
5
5
|
email: z.email().toLowerCase().optional(),
|
|
@@ -8,6 +8,7 @@ export const GetAvailableChannelsRequestSchema = z.object({
|
|
|
8
8
|
|
|
9
9
|
export const GetAvailableChannelsResponseSchema = z.object({
|
|
10
10
|
channels: z.array(z.nativeEnum(NotificationChannelEnum)),
|
|
11
|
+
blockedReason: z.nativeEnum(SecurityCodeBlockedReasonEnum).optional(),
|
|
11
12
|
});
|
|
12
13
|
|
|
13
14
|
export namespace GetAvailableChannelsContractCommand {
|
package/constant/error.ts
CHANGED
|
@@ -928,6 +928,9 @@ export const ERRORS = {
|
|
|
928
928
|
SECURITY_CODE_NOT_FOUND: { code: 'SC002', message: 'Security code not found', httpCode: 404 },
|
|
929
929
|
SECURITY_CODE_INVALID: { code: 'SC003', message: 'Security code is invalid', httpCode: 400 },
|
|
930
930
|
SECURITY_CODE_THROTTLED: { code: 'SC004', message: 'Security code creation too frequent', httpCode: 429 },
|
|
931
|
+
SECURITY_CODE_FRAUD: { code: 'SC005', message: 'Security code attempts exceeded. Contact administrator', httpCode: 403 },
|
|
932
|
+
SECURITY_CODE_DAILY_LIMIT: { code: 'SC006', message: 'Daily security code limit reached. Contact administrator', httpCode: 429 },
|
|
933
|
+
SECURITY_CODE_FRAUD_BLOCK: { code: 'SC007', message: 'Security code temporarily blocked after fraud detection', httpCode: 429 },
|
|
931
934
|
|
|
932
935
|
// MESSENGER PROFILE
|
|
933
936
|
MESSENGER_VERIFICATION_CODE_NOT_FOUND: { code: 'MP001', message: 'Verification code not found', httpCode: 404 },
|
package/enum/index.ts
CHANGED