ggez-banking-sdk 0.1.35 → 0.1.36

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.
@@ -60,6 +60,10 @@ export declare const StructTicketMessageDescriptionCodes: {
60
60
  Identification_Verification_Canceled: string;
61
61
  Phone_Verification: string;
62
62
  };
63
+ export declare const SystemResponses: {
64
+ Approved: string;
65
+ Create_User_Completed_Partially: string;
66
+ };
63
67
  export declare const BlockchainActions: {
64
68
  Send: string;
65
69
  MultiSend: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BlockchainActions = exports.StructTicketMessageDescriptionCodes = void 0;
3
+ exports.BlockchainActions = exports.SystemResponses = exports.StructTicketMessageDescriptionCodes = void 0;
4
4
  exports.StructTicketMessageDescriptionCodes = {
5
5
  Custom: "M000",
6
6
  Identification_Is_Being_Verified: "M100",
@@ -63,6 +63,10 @@ exports.StructTicketMessageDescriptionCodes = {
63
63
  Identification_Verification_Canceled: "M157",
64
64
  Phone_Verification: "M158",
65
65
  };
66
+ exports.SystemResponses = {
67
+ Approved: "0000",
68
+ Create_User_Completed_Partially: "0100",
69
+ };
66
70
  exports.BlockchainActions = {
67
71
  Send: "send",
68
72
  MultiSend: "multisend",
@@ -11,6 +11,7 @@ const qs_1 = __importDefault(require("qs"));
11
11
  const enum_1 = require("../constants/enum");
12
12
  const fillDeviceDetails_1 = require("../utils/fillDeviceDetails");
13
13
  const info_1 = require("../utils/info");
14
+ const constants_1 = require("../constants");
14
15
  const Helper = (userInfo) => {
15
16
  // error Handler
16
17
  const errorHandler = (error, funcName, response) => {
@@ -364,7 +365,8 @@ const Helper = (userInfo) => {
364
365
  };
365
366
  const checkUserResponseAuth = (response, showMessageSuccess, funcName) => {
366
367
  let check = response?.data?.result?.code;
367
- if (check != "0000") {
368
+ if (check != constants_1.SystemResponses.Approved ||
369
+ check != constants_1.SystemResponses.Create_User_Completed_Partially) {
368
370
  errorHandler(response?.data?.result?.friendly_message, funcName, response);
369
371
  }
370
372
  else if (!showMessageSuccess) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",