@hastehaul/common 2.0.36 → 2.0.38
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.
@@ -36,7 +36,7 @@ class NatsPublisher {
|
|
36
36
|
return yield jetStreamClient.publish(this.subject, typeof data === "string" ? this.sc.encode(data) : this.jc.encode(data));
|
37
37
|
}
|
38
38
|
catch (error) {
|
39
|
-
console.error(error);
|
39
|
+
console.error("Publisher Error: ", error);
|
40
40
|
throw new Error(`Failed to publish message. Error: [${error.message}]`);
|
41
41
|
}
|
42
42
|
});
|
package/build/utils/enums.d.ts
CHANGED
@@ -26,6 +26,26 @@ export declare enum OtpStatus {
|
|
26
26
|
OTP_EXPIRED = "otp-expired",
|
27
27
|
OTP_VERIFIED = "otp-verified"
|
28
28
|
}
|
29
|
+
export declare enum AccountStatus {
|
30
|
+
AccountBlocked = 5000,
|
31
|
+
AccountSuspendedTimeNotElapsed = 5001,
|
32
|
+
AccountSuspendedTimeElapsed = 5002,
|
33
|
+
OTPVerifiedAllowAccessAccountActive = 2000,
|
34
|
+
TokenRefreshSuccess = 2001,
|
35
|
+
NotNewCustomer = 2100,
|
36
|
+
IsNewCustomer = 2101,
|
37
|
+
NotAllowedToPerformAction = 2201,
|
38
|
+
DefaultBadRequestError = 2301,
|
39
|
+
Default2302 = 2302,
|
40
|
+
DefaultDatabaseError = 2303,
|
41
|
+
NotAuthorized = 2304,
|
42
|
+
DefaultNotFoundError = 2305,
|
43
|
+
ResourceNotFoundError = 2306,
|
44
|
+
SystemError = 2307,
|
45
|
+
TooManyRequestError = 2308,
|
46
|
+
IncorrectOrNotFoundOTP = 2400,
|
47
|
+
OTPExpired = 2401
|
48
|
+
}
|
29
49
|
export declare enum StatusCodes {
|
30
50
|
CONTINUE = 100,
|
31
51
|
SWITCHING_PROTOCOL = 101,
|
package/build/utils/enums.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.StatusCodes = exports.OtpStatus = exports.SmsStatus = exports.Status = exports.Events = void 0;
|
3
|
+
exports.StatusCodes = exports.AccountStatus = exports.OtpStatus = exports.SmsStatus = exports.Status = exports.Events = void 0;
|
4
4
|
// Enum that defines various event types
|
5
5
|
var Events;
|
6
6
|
(function (Events) {
|
@@ -37,6 +37,27 @@ var OtpStatus;
|
|
37
37
|
OtpStatus["OTP_EXPIRED"] = "otp-expired";
|
38
38
|
OtpStatus["OTP_VERIFIED"] = "otp-verified"; // OTP was successfully verified
|
39
39
|
})(OtpStatus || (exports.OtpStatus = OtpStatus = {}));
|
40
|
+
var AccountStatus;
|
41
|
+
(function (AccountStatus) {
|
42
|
+
AccountStatus[AccountStatus["AccountBlocked"] = 5000] = "AccountBlocked";
|
43
|
+
AccountStatus[AccountStatus["AccountSuspendedTimeNotElapsed"] = 5001] = "AccountSuspendedTimeNotElapsed";
|
44
|
+
AccountStatus[AccountStatus["AccountSuspendedTimeElapsed"] = 5002] = "AccountSuspendedTimeElapsed";
|
45
|
+
AccountStatus[AccountStatus["OTPVerifiedAllowAccessAccountActive"] = 2000] = "OTPVerifiedAllowAccessAccountActive";
|
46
|
+
AccountStatus[AccountStatus["TokenRefreshSuccess"] = 2001] = "TokenRefreshSuccess";
|
47
|
+
AccountStatus[AccountStatus["NotNewCustomer"] = 2100] = "NotNewCustomer";
|
48
|
+
AccountStatus[AccountStatus["IsNewCustomer"] = 2101] = "IsNewCustomer";
|
49
|
+
AccountStatus[AccountStatus["NotAllowedToPerformAction"] = 2201] = "NotAllowedToPerformAction";
|
50
|
+
AccountStatus[AccountStatus["DefaultBadRequestError"] = 2301] = "DefaultBadRequestError";
|
51
|
+
AccountStatus[AccountStatus["Default2302"] = 2302] = "Default2302";
|
52
|
+
AccountStatus[AccountStatus["DefaultDatabaseError"] = 2303] = "DefaultDatabaseError";
|
53
|
+
AccountStatus[AccountStatus["NotAuthorized"] = 2304] = "NotAuthorized";
|
54
|
+
AccountStatus[AccountStatus["DefaultNotFoundError"] = 2305] = "DefaultNotFoundError";
|
55
|
+
AccountStatus[AccountStatus["ResourceNotFoundError"] = 2306] = "ResourceNotFoundError";
|
56
|
+
AccountStatus[AccountStatus["SystemError"] = 2307] = "SystemError";
|
57
|
+
AccountStatus[AccountStatus["TooManyRequestError"] = 2308] = "TooManyRequestError";
|
58
|
+
AccountStatus[AccountStatus["IncorrectOrNotFoundOTP"] = 2400] = "IncorrectOrNotFoundOTP";
|
59
|
+
AccountStatus[AccountStatus["OTPExpired"] = 2401] = "OTPExpired";
|
60
|
+
})(AccountStatus || (exports.AccountStatus = AccountStatus = {}));
|
40
61
|
var StatusCodes;
|
41
62
|
(function (StatusCodes) {
|
42
63
|
StatusCodes[StatusCodes["CONTINUE"] = 100] = "CONTINUE";
|