@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.
@@ -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) {
@@ -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 },
@@ -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
@@ -65,3 +65,4 @@ export * from './chat-no-manager-mode.enum';
65
65
  export * from './match-confidence.enum';
66
66
  export * from './session-platform.enum';
67
67
  export * from './device-platform.enum';
68
+ export * from './security-code-blocked-reason.enum';
@@ -5,4 +5,5 @@ export enum NotificationTypeEnum {
5
5
  CART_EXPIRATION = 'CART_EXPIRATION',
6
6
  WRITE_OFF_REJECTED = 'WRITE_OFF_REJECTED',
7
7
  CLIENT_MESSAGE_TO_EMPLOYEE = 'CLIENT_MESSAGE_TO_EMPLOYEE',
8
+ PASSWORD_CHANGED = 'PASSWORD_CHANGED',
8
9
  }
@@ -0,0 +1,4 @@
1
+ export enum SecurityCodeBlockedReasonEnum {
2
+ FRAUD_BLOCK = 'fraud_block',
3
+ DAILY_LIMIT = 'daily_limit',
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {