ggez-banking-sdk 0.0.43 → 0.0.54

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.
Files changed (52) hide show
  1. package/dist/bank-system/helper/dataStructure.js +465 -177
  2. package/dist/bank-system/helper/index.d.ts +1 -1
  3. package/dist/bank-system/helper/index.js +53 -45
  4. package/dist/bank-system/interfaces/accountInterface.d.ts +3 -3
  5. package/dist/bank-system/interfaces/bankingSystemInterface.d.ts +44 -44
  6. package/dist/bank-system/interfaces/deviceInterface.d.ts +6 -6
  7. package/dist/bank-system/interfaces/interface.d.ts +1 -1
  8. package/dist/bank-system/interfaces/organizationInterface.d.ts +4 -4
  9. package/dist/bank-system/interfaces/signInterface.d.ts +6 -6
  10. package/dist/bank-system/interfaces/transactionInterface.d.ts +1 -1
  11. package/dist/bank-system/restApi/index.js +3 -12
  12. package/dist/bank-system/services/account.d.ts +2 -2
  13. package/dist/bank-system/services/account.js +27 -35
  14. package/dist/bank-system/services/addresses.d.ts +1 -1
  15. package/dist/bank-system/services/addresses.js +27 -33
  16. package/dist/bank-system/services/auth.d.ts +1 -1
  17. package/dist/bank-system/services/auth.js +40 -48
  18. package/dist/bank-system/services/bankAccount.d.ts +1 -1
  19. package/dist/bank-system/services/bankAccount.js +24 -33
  20. package/dist/bank-system/services/device.d.ts +1 -1
  21. package/dist/bank-system/services/device.js +48 -57
  22. package/dist/bank-system/services/document.d.ts +1 -1
  23. package/dist/bank-system/services/document.js +7 -16
  24. package/dist/bank-system/services/email.d.ts +1 -1
  25. package/dist/bank-system/services/email.js +34 -43
  26. package/dist/bank-system/services/history.js +5 -14
  27. package/dist/bank-system/services/identification.d.ts +1 -1
  28. package/dist/bank-system/services/identification.js +27 -27
  29. package/dist/bank-system/services/organization.d.ts +1 -1
  30. package/dist/bank-system/services/organization.js +30 -36
  31. package/dist/bank-system/services/personalInfo.d.ts +1 -1
  32. package/dist/bank-system/services/personalInfo.js +19 -22
  33. package/dist/bank-system/services/phone.d.ts +1 -1
  34. package/dist/bank-system/services/phone.js +37 -43
  35. package/dist/bank-system/services/security.d.ts +1 -1
  36. package/dist/bank-system/services/security.js +76 -67
  37. package/dist/bank-system/services/token.d.ts +1 -1
  38. package/dist/bank-system/services/token.js +12 -22
  39. package/dist/bank-system/services/transaction.js +6 -15
  40. package/dist/bank-system/services/verifyAndConfirm.d.ts +1 -1
  41. package/dist/bank-system/services/verifyAndConfirm.js +68 -72
  42. package/dist/bank-system/utils/chainAddressMasking.js +1 -1
  43. package/dist/bank-system/utils/copyText.js +3 -12
  44. package/dist/bank-system/utils/generateSourceId.js +1 -2
  45. package/dist/bank-system/utils/getCountryName.js +2 -4
  46. package/dist/bank-system/utils/getEnumName.js +2 -3
  47. package/dist/bank-system/utils/getStateByCountryCode.js +1 -1
  48. package/dist/bank-system/utils/handleEncryption/decryptData.js +23 -34
  49. package/dist/bank-system/utils/info.js +18 -24
  50. package/dist/bank-system/utils/sortUserInfo.js +6 -6
  51. package/dist/tsconfig.tsbuildinfo +1 -1
  52. package/package.json +3 -2
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -31,16 +22,16 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
31
22
  let headers = headerConfig(headersData);
32
23
  return headers;
33
24
  };
34
- const ResetPassword = (values) => __awaiter(void 0, void 0, void 0, function* () {
35
- var _a, _b, _c;
36
- let data = resetDataPassword(Object.assign(Object.assign({}, values), { geoCoordinates: geoCoordinates }));
25
+ const ResetPassword = async (values) => {
26
+ let data = resetDataPassword({ ...values, geoCoordinates: geoCoordinates });
37
27
  try {
38
- const response = yield restApi_1.default.restApi(baseUrl, "POST", `v1/user/security/reset/${userId}`, headerConfigSecurity(), data);
28
+ const response = await restApi_1.default.restApi(baseUrl, "POST", `v1/user/security/reset/${userId}`, headerConfigSecurity(), data);
39
29
  let { newUserInfo } = checkGlobalResponse("password", response, "ResetPassword", "reset");
40
30
  return {
41
31
  response: response,
42
32
  newUser: newUserInfo,
43
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "Password Changed Successfully",
33
+ message: response?.data?.result?.friendly_message ??
34
+ "Password Changed Successfully",
44
35
  status: "success",
45
36
  };
46
37
  }
@@ -52,17 +43,17 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
52
43
  status: "failed",
53
44
  };
54
45
  }
55
- });
56
- const ResetSecurityQuestions = (values) => __awaiter(void 0, void 0, void 0, function* () {
57
- var _a, _b, _c;
58
- let data = resetDataQuestion(Object.assign(Object.assign({}, values), { geoCoordinates: geoCoordinates }));
46
+ };
47
+ const ResetSecurityQuestions = async (values) => {
48
+ let data = resetDataQuestion({ ...values, geoCoordinates: geoCoordinates });
59
49
  try {
60
- const response = yield restApi_1.default.restApi(baseUrl, "POST", `v1/user/security/reset/${userId}`, headerConfigSecurity(), data);
50
+ const response = await restApi_1.default.restApi(baseUrl, "POST", `v1/user/security/reset/${userId}`, headerConfigSecurity(), data);
61
51
  let { newUserInfo } = checkGlobalResponse("security", response, "ResetSecurityQuestions", "resetQuestions");
62
52
  return {
63
53
  response: response,
64
54
  newUser: newUserInfo,
65
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "Questions Changed Successfully",
55
+ message: response?.data?.result?.friendly_message ??
56
+ "Questions Changed Successfully",
66
57
  status: "success",
67
58
  };
68
59
  }
@@ -74,17 +65,20 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
74
65
  status: "failed",
75
66
  };
76
67
  }
77
- });
78
- const ChangeUserSecurityCode = (values) => __awaiter(void 0, void 0, void 0, function* () {
79
- var _a, _b, _c;
80
- let data = changeDataSecurityCode(Object.assign(Object.assign({}, values), { geoCoordinates: geoCoordinates }));
68
+ };
69
+ const ChangeUserSecurityCode = async (values) => {
70
+ let data = changeDataSecurityCode({
71
+ ...values,
72
+ geoCoordinates: geoCoordinates,
73
+ });
81
74
  try {
82
- const response = yield restApi_1.default.restApi(baseUrl, "POST", `v1/user/security/reset/${userId}`, headerConfigSecurity(), data);
75
+ const response = await restApi_1.default.restApi(baseUrl, "POST", `v1/user/security/reset/${userId}`, headerConfigSecurity(), data);
83
76
  let { newUserInfo } = checkGlobalResponse("security", response, "ChangeUserSecurityCode", "resetSecurityCode");
84
77
  return {
85
78
  response: response,
86
79
  newUser: newUserInfo,
87
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "User Security Code Changed Successfully",
80
+ message: response?.data?.result?.friendly_message ??
81
+ "User Security Code Changed Successfully",
88
82
  status: "success",
89
83
  };
90
84
  }
@@ -96,17 +90,20 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
96
90
  status: "failed",
97
91
  };
98
92
  }
99
- });
100
- const UpdateUserPreferences = (values) => __awaiter(void 0, void 0, void 0, function* () {
101
- var _a, _b, _c;
102
- let data = updateDataUserPreferences(Object.assign(Object.assign({}, values), { geoCoordinates: geoCoordinates }));
93
+ };
94
+ const UpdateUserPreferences = async (values) => {
95
+ let data = updateDataUserPreferences({
96
+ ...values,
97
+ geoCoordinates: geoCoordinates,
98
+ });
103
99
  try {
104
- const response = yield restApi_1.default.restApi(baseUrl, "PUT", `v1/user/preferences/${userId}`, Object.assign(Object.assign({}, headerConfigSecurity()), { language: values.preferredLanguageCode }), data);
100
+ const response = await restApi_1.default.restApi(baseUrl, "PUT", `v1/user/preferences/${userId}`, { ...headerConfigSecurity(), language: values.preferredLanguageCode }, data);
105
101
  let { newUserInfo } = checkGlobalResponse("preferences", response, "UpdateUserPreferences", "updateObjectInfo");
106
102
  return {
107
103
  response: response,
108
104
  newUser: newUserInfo,
109
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "Preference Updated Successfully",
105
+ message: response?.data?.result?.friendly_message ??
106
+ "Preference Updated Successfully",
110
107
  status: "success",
111
108
  };
112
109
  }
@@ -118,17 +115,20 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
118
115
  status: "failed",
119
116
  };
120
117
  }
121
- });
122
- const ValidateSecurityCode = (values) => __awaiter(void 0, void 0, void 0, function* () {
123
- var _a, _b, _c;
124
- let data = dataValidateSecurityCode(Object.assign(Object.assign({}, values), { geoCoordinates: geoCoordinates }));
118
+ };
119
+ const ValidateSecurityCode = async (values) => {
120
+ let data = dataValidateSecurityCode({
121
+ ...values,
122
+ geoCoordinates: geoCoordinates,
123
+ });
125
124
  try {
126
- const response = yield restApi_1.default.restApi(baseUrl, "POST", `v1/user/security/validate/${userId}`, headerConfigSecurity(), data);
125
+ const response = await restApi_1.default.restApi(baseUrl, "POST", `v1/user/security/validate/${userId}`, headerConfigSecurity(), data);
127
126
  let { newUserInfo } = checkGlobalResponse("securityCode", response, "ValidateSecurityCode");
128
127
  return {
129
128
  response: response,
130
129
  newUser: newUserInfo,
131
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "Message send successfully",
130
+ message: response?.data?.result?.friendly_message ??
131
+ "Message send successfully",
132
132
  status: "success",
133
133
  };
134
134
  }
@@ -140,18 +140,18 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
140
140
  status: "failed",
141
141
  };
142
142
  }
143
- });
143
+ };
144
144
  /** Authentication Google */
145
- const EnrollGoogleAuth = () => __awaiter(void 0, void 0, void 0, function* () {
146
- var _a, _b, _c;
145
+ const EnrollGoogleAuth = async () => {
147
146
  let data = dataEnrollGoogleAuth();
148
147
  try {
149
- const response = yield restApi_1.default.restApi(baseUrl, "POST", `v1/user/auth/enroll/${userId}`, headerConfigSecurity(), data);
148
+ const response = await restApi_1.default.restApi(baseUrl, "POST", `v1/user/auth/enroll/${userId}`, headerConfigSecurity(), data);
150
149
  let { newUserInfo } = checkGlobalResponse("authentication_data", response, "EnrollGoogleAuth", "update");
151
150
  return {
152
151
  response: response,
153
152
  newUser: newUserInfo,
154
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "User Enrolled successfully",
153
+ message: response?.data?.result?.friendly_message ??
154
+ "User Enrolled successfully",
155
155
  status: "success",
156
156
  };
157
157
  }
@@ -163,17 +163,20 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
163
163
  status: "failed",
164
164
  };
165
165
  }
166
- });
167
- const ActivateGoogleAuth = (values) => __awaiter(void 0, void 0, void 0, function* () {
168
- var _a, _b, _c;
169
- let data = dataActivateGoogleAuth(Object.assign(Object.assign({}, values), { geoCoordinates: geoCoordinates }));
166
+ };
167
+ const ActivateGoogleAuth = async (values) => {
168
+ let data = dataActivateGoogleAuth({
169
+ ...values,
170
+ geoCoordinates: geoCoordinates,
171
+ });
170
172
  try {
171
- const response = yield restApi_1.default.restApi(baseUrl, "POST", `v1/user/auth/activate/${userId}`, headerConfigSecurity(), data);
173
+ const response = await restApi_1.default.restApi(baseUrl, "POST", `v1/user/auth/activate/${userId}`, headerConfigSecurity(), data);
172
174
  let { newUserInfo } = checkGlobalResponse("authentication_data", response, "ActivateGoogleAuth", "create");
173
175
  return {
174
176
  response: response,
175
177
  newUser: newUserInfo,
176
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "Account Authentication Activated successfully",
178
+ message: response?.data?.result?.friendly_message ??
179
+ "Account Authentication Activated successfully",
177
180
  status: "success",
178
181
  };
179
182
  }
@@ -185,17 +188,20 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
185
188
  status: "failed",
186
189
  };
187
190
  }
188
- });
189
- const deActivateGoogleAuth = (values) => __awaiter(void 0, void 0, void 0, function* () {
190
- var _a, _b, _c;
191
- let data = dataActivateGoogleAuth(Object.assign(Object.assign({}, values), { geoCoordinates: geoCoordinates }));
191
+ };
192
+ const deActivateGoogleAuth = async (values) => {
193
+ let data = dataActivateGoogleAuth({
194
+ ...values,
195
+ geoCoordinates: geoCoordinates,
196
+ });
192
197
  try {
193
- const response = yield restApi_1.default.restApi(baseUrl, "POST", `v1/user/auth/deactivate/${userId}`, headerConfigSecurity(), data);
198
+ const response = await restApi_1.default.restApi(baseUrl, "POST", `v1/user/auth/deactivate/${userId}`, headerConfigSecurity(), data);
194
199
  let { newUserInfo } = checkGlobalResponse("authentication_data", response, "deActivateGoogleAuth", "update");
195
200
  return {
196
201
  response: response,
197
202
  newUser: newUserInfo,
198
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "Account Authentication deactivated successfully",
203
+ message: response?.data?.result?.friendly_message ??
204
+ "Account Authentication deactivated successfully",
199
205
  status: "success",
200
206
  };
201
207
  }
@@ -207,17 +213,20 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
207
213
  status: "failed",
208
214
  };
209
215
  }
210
- });
211
- const deleteGoogleAuth = (values) => __awaiter(void 0, void 0, void 0, function* () {
212
- var _a, _b, _c;
213
- let data = dataDeleteGoogleAuth(Object.assign(Object.assign({}, values), { geoCoordinates: geoCoordinates }));
216
+ };
217
+ const deleteGoogleAuth = async (values) => {
218
+ let data = dataDeleteGoogleAuth({
219
+ ...values,
220
+ geoCoordinates: geoCoordinates,
221
+ });
214
222
  try {
215
- const response = yield restApi_1.default.restApi(baseUrl, "POST", `v1/user/auth/delete/${userId}`, headerConfigSecurity(), data);
223
+ const response = await restApi_1.default.restApi(baseUrl, "POST", `v1/user/auth/delete/${userId}`, headerConfigSecurity(), data);
216
224
  let { newUserInfo } = checkGlobalResponse("authentication_data", response, "deleteGoogleAuth", "delete");
217
225
  return {
218
226
  response: response,
219
227
  newUser: newUserInfo,
220
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "Account authentication deleted successfully",
228
+ message: response?.data?.result?.friendly_message ??
229
+ "Account authentication deleted successfully",
221
230
  status: "success",
222
231
  };
223
232
  }
@@ -229,16 +238,16 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
229
238
  status: "failed",
230
239
  };
231
240
  }
232
- });
233
- const GetSecurityOperation = () => __awaiter(void 0, void 0, void 0, function* () {
234
- var _a, _b, _c;
241
+ };
242
+ const GetSecurityOperation = async () => {
235
243
  try {
236
- const response = yield restApi_1.default.restApi(baseUrl, "GET", `v1/user/activity/${userId}`, headerConfigSecurity());
244
+ const response = await restApi_1.default.restApi(baseUrl, "GET", `v1/user/activity/${userId}`, headerConfigSecurity());
237
245
  let { newUserInfo } = checkGlobalResponse("activity", response, "GetSecurityOperation", "get");
238
246
  return {
239
247
  response: response,
240
248
  newUser: newUserInfo,
241
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "Get Security Operation Successfully",
249
+ message: response?.data?.result?.friendly_message ??
250
+ "Get Security Operation Successfully",
242
251
  status: "success",
243
252
  };
244
253
  }
@@ -250,7 +259,7 @@ const useSecurity = (token, userInfo, userId, baseUrl, geoCoordinates, lang) =>
250
259
  status: "failed",
251
260
  };
252
261
  }
253
- });
262
+ };
254
263
  return {
255
264
  ResetPassword,
256
265
  ResetSecurityQuestions,
@@ -1,6 +1,6 @@
1
1
  import { LimitedTokenInterface } from "../interfaces/signInterface";
2
2
  import { IGeoCoordinates, UserInfo } from "../interfaces/interface";
3
- export declare const useToken: (userInfo: UserInfo, nodeUrl: string, programId: string, lang?: string, geoCoordinates?: IGeoCoordinates) => {
3
+ export declare const useToken: (userInfo: UserInfo, nodeUrl: string, programId: string, lang?: string, geoCoordinates?: IGeoCoordinates | null) => {
4
4
  CreateLimitedToken: (values: LimitedTokenInterface) => Promise<{
5
5
  response: any;
6
6
  newUser: any;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -29,16 +20,16 @@ const useToken = (userInfo, nodeUrl, programId, lang, geoCoordinates) => {
29
20
  let headers = headerConfig(headersData);
30
21
  return headers;
31
22
  };
32
- const CreateLimitedToken = (values) => __awaiter(void 0, void 0, void 0, function* () {
33
- var _a, _b, _c, _d;
34
- let data = dataTokenUrlEncoded(Object.assign(Object.assign({}, values), { geoCoordinates: geoCoordinates }));
23
+ const CreateLimitedToken = async (values) => {
24
+ let data = dataTokenUrlEncoded({ ...values, geoCoordinates: geoCoordinates });
35
25
  try {
36
- const response = yield restApi_1.default.restApi(nodeUrl, "POST", "v1/limited-token", headerConfigToken(), JSON.stringify(data));
37
- if ((_a = response.data) === null || _a === void 0 ? void 0 : _a.access_token) {
26
+ const response = await restApi_1.default.restApi(nodeUrl, "POST", "v1/limited-token", headerConfigToken(), JSON.stringify(data));
27
+ if (response.data?.access_token) {
38
28
  return {
39
29
  response: response,
40
30
  newUser: null,
41
- message: (_d = (_c = (_b = response === null || response === void 0 ? void 0 : response.data) === null || _b === void 0 ? void 0 : _b.result) === null || _c === void 0 ? void 0 : _c.friendly_message) !== null && _d !== void 0 ? _d : "Create Limited Token Successfully",
31
+ message: response?.data?.result?.friendly_message ??
32
+ "Create Limited Token Successfully",
42
33
  status: "success",
43
34
  };
44
35
  }
@@ -57,14 +48,13 @@ const useToken = (userInfo, nodeUrl, programId, lang, geoCoordinates) => {
57
48
  status: "failed",
58
49
  };
59
50
  }
60
- });
61
- const CreateProgramToken = (values) => __awaiter(void 0, void 0, void 0, function* () {
62
- var _a;
63
- let data = dataTokenUrlEncoded(Object.assign(Object.assign({}, values), { geoCoordinates: geoCoordinates }));
51
+ };
52
+ const CreateProgramToken = async (values) => {
53
+ let data = dataTokenUrlEncoded({ ...values, geoCoordinates: geoCoordinates });
64
54
  try {
65
- const response = yield restApi_1.default.restApi(nodeUrl, "POST", "oauth/token", headerConfigToken(), data);
55
+ const response = await restApi_1.default.restApi(nodeUrl, "POST", "oauth/token", headerConfigToken(), data);
66
56
  checkGlobalResponse("token", response, "CreateProgramToken");
67
- return (_a = response.data) === null || _a === void 0 ? void 0 : _a.access_token;
57
+ return response.data?.access_token;
68
58
  }
69
59
  catch (error) {
70
60
  return {
@@ -74,7 +64,7 @@ const useToken = (userInfo, nodeUrl, programId, lang, geoCoordinates) => {
74
64
  status: "failed",
75
65
  };
76
66
  }
77
- });
67
+ };
78
68
  return {
79
69
  CreateLimitedToken,
80
70
  CreateProgramToken,
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -32,16 +23,16 @@ const useTransaction = (token, userInfo, userId, baseUrl, lang) => {
32
23
  let headers = headerConfig(headersData);
33
24
  return headers;
34
25
  };
35
- const OrderRequest = (values) => __awaiter(void 0, void 0, void 0, function* () {
36
- var _a, _b, _c;
26
+ const OrderRequest = async (values) => {
37
27
  let data = dataOrderRequest(values);
38
28
  try {
39
- const response = yield restApi_1.default.restApi(baseUrl, "POST", `${endPointOrder}`, headerConfigAccount(), data);
29
+ const response = await restApi_1.default.restApi(baseUrl, "POST", `${endPointOrder}`, headerConfigAccount(), data);
40
30
  let { newUserInfo } = checkGlobalResponse("order", response, "OrderRequest", "OrderRequest");
41
31
  return {
42
- response: response === null || response === void 0 ? void 0 : response.data,
32
+ response: response?.data,
43
33
  newUser: newUserInfo,
44
- message: (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.friendly_message) !== null && _c !== void 0 ? _c : "Transaction Successfully",
34
+ message: response?.data?.result?.friendly_message ??
35
+ "Transaction Successfully",
45
36
  status: "success",
46
37
  };
47
38
  }
@@ -53,7 +44,7 @@ const useTransaction = (token, userInfo, userId, baseUrl, lang) => {
53
44
  status: "failed",
54
45
  };
55
46
  }
56
- });
47
+ };
57
48
  return {
58
49
  OrderRequest,
59
50
  };
@@ -1,7 +1,7 @@
1
1
  import { ValidateLimitedPhoneInterface, VerifyLimitedEmailInterface, VerifyLimitedPhoneInterface, ConfirmLimitedEmailInterface, ConfirmLimitedPhoneInterface, IsEmailPresentAndValidInterface, IsPhonePresentAndValidInterface, SendOTPPhoneInterface, SendOTPEmailInterface, ForgetPasswordValidateInterface, ForgetPasswordConfirmInterface } from "../interfaces/bankingSystemInterface";
2
2
  import { LimitedTokenInterface } from "../interfaces/signInterface";
3
3
  import { IGeoCoordinates, UserInfo } from "../interfaces/interface";
4
- export declare const useVerifyAndConfirm: (userInfo: UserInfo, tokenData: LimitedTokenInterface, baseUrl: string, nodeUrl: string, programId: string, geoCoordinates?: IGeoCoordinates, token?: string, userId?: string, lang?: string) => {
4
+ export declare const useVerifyAndConfirm: (userInfo: UserInfo, tokenData: LimitedTokenInterface, baseUrl: string, nodeUrl: string, programId: string, geoCoordinates?: IGeoCoordinates | null, token?: string, userId?: string, lang?: string) => {
5
5
  ValidateLimitedPhone: (values: ValidateLimitedPhoneInterface) => Promise<{
6
6
  response: import("axios").AxiosResponse<any, any>;
7
7
  newUser: {};