ggez-banking-sdk 0.1.72 → 0.1.74

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.
@@ -2,7 +2,7 @@ import { AddressType, AuthorizationOperationRequestType, BankAccountTypes, BankB
2
2
  import { CreateDeviceInterface, UpdateDeviceInterface, DeleteDeviceInterface, VerifyDeviceInterface, ConfirmDeviceInterface, LogoutDeviceInterface } from "../interfaces/deviceInterface";
3
3
  import { SignUpInterface, SignUpWithGoogleInterface } from "../interfaces/signInterface";
4
4
  import { DoTransactionInterface, GetTransactionInterface } from "../interfaces/accountInterface";
5
- import { CreateAddressInterface, DeleteUserAddressInterface, MakeAddressPrimaryInterface, UpdateAddressInterface, CreateUserEmailInterface, DeleteUserEmailInterface, UpdateUserEmailInterface, ConfirmLimitedEmailInterface, MakePrimaryUserEmailInterface, VerifyLimitedEmailInterface, ConfirmLimitedPhoneInterface, CreateUserPhoneInterface, DeleteUserPhoneInterface, MakeUserPhonePrimaryInterface, UpdateUserPhoneInterface, VerifyLimitedPhoneInterface, CreateBankAccountInterFace, UpdateBankAccountInterFace, DeleteBankAccountInterFace, MakeBankAccountPrimaryInterFace, CreateIdentificationInterface, DeleteIdentificationInterface, UpdateIdentificationInterface, UpdatePersonalInfoInterface, UpdateProfilePictureInterface, ChangeUserSecurityCodeInterface, ResetPasswordInterface, ResetSecurityQuestionsInterface, UpdateUserPreferencesInterface, ValidateSecurityCodeInterface, ActivateGoogleAuthInterface, ValidateLimitedPhoneInterface, IsEmailPresentAndValidInterface, IsPhonePresentAndValidInterface, SendOTPPhoneInterface, SendOTPEmailInterface, CreateDocumentInterface, ForgetPasswordConfirmInterface, ForgetPasswordValidateInterface, DeleteGoogleAuthInterface, CreateTicketInterface, VerifyUserPhoneInterface } from "../interfaces/bankingSystemInterface";
5
+ import { CreateAddressInterface, DeleteUserAddressInterface, MakeAddressPrimaryInterface, UpdateAddressInterface, CreateUserEmailInterface, DeleteUserEmailInterface, UpdateUserEmailInterface, ConfirmLimitedEmailInterface, MakePrimaryUserEmailInterface, VerifyLimitedEmailInterface, ConfirmLimitedPhoneInterface, CreateUserPhoneInterface, DeleteUserPhoneInterface, MakeUserPhonePrimaryInterface, UpdateUserPhoneInterface, VerifyLimitedPhoneInterface, CreateBankAccountInterFace, UpdateBankAccountInterFace, DeleteBankAccountInterFace, MakeBankAccountPrimaryInterFace, CreateIdentificationInterface, DeleteIdentificationInterface, UpdateIdentificationInterface, UpdatePersonalInfoInterface, UpdateProfilePictureInterface, ChangeUserSecurityCodeInterface, ResetPasswordInterface, ResetSecurityQuestionsInterface, UpdateUserPreferencesInterface, ValidateSecurityCodeInterface, ActivateGoogleAuthInterface, ValidateLimitedPhoneInterface, IsEmailPresentAndValidInterface, IsPhonePresentAndValidInterface, SendOTPPhoneInterface, SendOTPEmailInterface, CreateDocumentInterface, ForgetPasswordConfirmInterface, ForgetPasswordValidateInterface, DeleteGoogleAuthInterface, CreateTicketInterface } from "../interfaces/bankingSystemInterface";
6
6
  import { IOrderInterface } from "../interfaces/transactionInterface";
7
7
  import { CreateDocumentOrganizationInterface, CreateOrganizationInterface, UpdateOrganizationInterface } from "../interfaces/organizationInterface";
8
8
  import { IBlockchainDelegateRequest, IBlockchainMultiSendRequest, IBlockchainSendRequest, IBlockchainUndelegateRequest } from "../interfaces/blockchain";
@@ -904,57 +904,7 @@ declare const Data: () => {
904
904
  time_zone: string;
905
905
  time_zone_name: string;
906
906
  };
907
- verifyDataPhone: (values: VerifyUserPhoneInterface) => {
908
- phone: {
909
- id: any;
910
- number: any;
911
- verification_status: number;
912
- }[];
913
- geo_coordinates: import("../interfaces").IGeoCoordinates;
914
- result: any;
915
- info: any;
916
- personal_info: any;
917
- address: any;
918
- addresses: any;
919
- email: any;
920
- security: any;
921
- preferences: any;
922
- identification: any;
923
- bank_account: any;
924
- credit_card: any;
925
- notification: any;
926
- documents: any;
927
- currency: any;
928
- credit_limit: any;
929
- account: any;
930
- group: any;
931
- terms_conditions: any;
932
- device_info: any;
933
- device: any;
934
- device_history: any;
935
- commerce: any;
936
- external_auth: any;
937
- validation_data: any;
938
- relationship: any;
939
- custom_field: any;
940
- history: any;
941
- access_rule: any;
942
- ticket: any;
943
- general_requirements: any;
944
- organization: any;
945
- authentication_data: any;
946
- crypto_address: any;
947
- activity: any;
948
- notes: any;
949
- last_activity: any;
950
- authentication: any;
951
- validate: any;
952
- function_code: any;
953
- response_time: any;
954
- time_zone: string;
955
- time_zone_name: string;
956
- };
957
- verifyLimitedDataPhone: (values: VerifyLimitedPhoneInterface) => {
907
+ verifyDataPhone: (values: VerifyLimitedPhoneInterface) => {
958
908
  verify_data: {
959
909
  phone: {
960
910
  number: string;
@@ -2199,7 +2149,7 @@ declare const Data: () => {
2199
2149
  time_zone: string;
2200
2150
  time_zone_name: string;
2201
2151
  };
2202
- dataVerifyLimitedPhone: (values: VerifyLimitedPhoneInterface) => {
2152
+ dataVerifyPhone: (values: VerifyLimitedPhoneInterface) => {
2203
2153
  info: {
2204
2154
  type: number;
2205
2155
  };
@@ -829,7 +829,7 @@ const Data = () => {
829
829
  };
830
830
  return data;
831
831
  };
832
- const verifyLimitedDataPhone = (values) => {
832
+ const verifyDataPhone = (values) => {
833
833
  let data = {
834
834
  ...data_1.userData,
835
835
  verify_data: {
@@ -844,20 +844,6 @@ const Data = () => {
844
844
  };
845
845
  return data;
846
846
  };
847
- const verifyDataPhone = (values) => {
848
- let data = {
849
- ...data_1.userData,
850
- phone: [
851
- {
852
- id: values.id,
853
- number: values.number,
854
- verification_status: 1,
855
- },
856
- ],
857
- geo_coordinates: values.geoCoordinates,
858
- };
859
- return data;
860
- };
861
847
  const confirmDataPhone = (values) => {
862
848
  let data = {
863
849
  ...data_1.userData,
@@ -908,7 +894,6 @@ const Data = () => {
908
894
  createDataPhone,
909
895
  deleteDataPhone,
910
896
  verifyDataPhone,
911
- verifyLimitedDataPhone,
912
897
  confirmDataPhone,
913
898
  updateDataPhone,
914
899
  makePrimaryDataPhone,
@@ -1285,21 +1270,6 @@ const Data = () => {
1285
1270
  };
1286
1271
  return data;
1287
1272
  };
1288
- let dataVerifyLimitedPhone = (values) => {
1289
- let data = {
1290
- ...data_1.userData,
1291
- info: {
1292
- type: 10,
1293
- },
1294
- verify_data: {
1295
- phone: {
1296
- number: values.number,
1297
- },
1298
- },
1299
- geo_coordinates: values.geoCoordinates,
1300
- };
1301
- return data;
1302
- };
1303
1273
  let dataVerifyPhone = (values) => {
1304
1274
  let data = {
1305
1275
  ...data_1.userData,
@@ -1452,7 +1422,7 @@ const Data = () => {
1452
1422
  return {
1453
1423
  dataValidatePhone,
1454
1424
  dataVerifyEmail,
1455
- dataVerifyLimitedPhone,
1425
+ dataVerifyPhone,
1456
1426
  dataConfirmEmail,
1457
1427
  dataConfirmPhone,
1458
1428
  dataISEmailUsed,
@@ -1,4 +1,4 @@
1
- import { IAuthentication, IGeoCoordinates } from "./interface";
1
+ import { IGeoCoordinates } from "./interface";
2
2
  export interface ConfirmLimitedEmailInterface {
3
3
  address: string;
4
4
  verificationCode: string;
@@ -19,12 +19,6 @@ export interface UpdateUserPhoneInterface {
19
19
  number: any;
20
20
  geoCoordinates?: IGeoCoordinates | null;
21
21
  }
22
- export interface VerifyUserPhoneInterface {
23
- id: any;
24
- number: any;
25
- authentication: IAuthentication[];
26
- geoCoordinates?: IGeoCoordinates | null;
27
- }
28
22
  export interface MakeUserPhonePrimaryInterface {
29
23
  id: any;
30
24
  number: any;
@@ -183,11 +177,6 @@ export interface VerifyLimitedPhoneInterface {
183
177
  number: string;
184
178
  geoCoordinates?: IGeoCoordinates | null;
185
179
  }
186
- export interface VerifyPhoneInterface {
187
- number: string;
188
- authentication: IAuthentication[];
189
- geoCoordinates?: IGeoCoordinates | null;
190
- }
191
180
  export interface IsEmailPresentAndValidInterface {
192
181
  emailAddress: string;
193
182
  geoCoordinates?: IGeoCoordinates | null;
@@ -130,10 +130,6 @@ export interface IGeoCoordinates {
130
130
  longitude: string;
131
131
  position_description: string;
132
132
  }
133
- export interface IAuthentication {
134
- code: string;
135
- type: number;
136
- }
137
133
  export interface InfoChain {
138
134
  isKeplerConnect: boolean;
139
135
  address: string;
@@ -1,5 +1,5 @@
1
1
  import { IGeoCoordinates, UserInfo } from "../interfaces/interface";
2
- import { ConfirmLimitedPhoneInterface, CreateUserPhoneInterface, DeleteUserPhoneInterface, MakeUserPhonePrimaryInterface, UpdateUserPhoneInterface, VerifyLimitedPhoneInterface, VerifyUserPhoneInterface } from "../interfaces/bankingSystemInterface";
2
+ import { ConfirmLimitedPhoneInterface, CreateUserPhoneInterface, DeleteUserPhoneInterface, MakeUserPhonePrimaryInterface, UpdateUserPhoneInterface, VerifyLimitedPhoneInterface } from "../interfaces/bankingSystemInterface";
3
3
  export declare const usePhone: (token: string, userInfo: UserInfo, userId: string, baseUrl: string, geoCoordinates?: IGeoCoordinates | null, lang?: string) => {
4
4
  CreateUserPhone: (values: CreateUserPhoneInterface) => Promise<{
5
5
  response: import("axios").AxiosResponse<any, any>;
@@ -23,18 +23,7 @@ export declare const usePhone: (token: string, userInfo: UserInfo, userId: strin
23
23
  message: any;
24
24
  status: string;
25
25
  }>;
26
- VerifyUserPhone: (values: VerifyUserPhoneInterface) => Promise<{
27
- response: import("axios").AxiosResponse<any, any>;
28
- newUser: any;
29
- message: any;
30
- status: string;
31
- } | {
32
- response: any;
33
- newUser: any;
34
- message: any;
35
- status: string;
36
- }>;
37
- VerifyUserLimitedPhone: (values: VerifyLimitedPhoneInterface) => Promise<{
26
+ VerifyUserPhone: (values: VerifyLimitedPhoneInterface) => Promise<{
38
27
  response: import("axios").AxiosResponse<any, any>;
39
28
  newUser: any;
40
29
  message: string;
@@ -11,7 +11,7 @@ const usePhone = (token, userInfo, userId, baseUrl, geoCoordinates, lang) => {
11
11
  const { checkResponse, headerConfig } = (0, helper_1.default)(userInfo);
12
12
  const { checkGlobalResponse, errorHandler } = checkResponse();
13
13
  const { dataPhone } = (0, dataStructure_1.default)();
14
- const { confirmDataPhone, createDataPhone, deleteDataPhone, makePrimaryDataPhone, updateDataPhone, verifyLimitedDataPhone, verifyDataPhone, } = dataPhone();
14
+ const { confirmDataPhone, createDataPhone, deleteDataPhone, makePrimaryDataPhone, updateDataPhone, verifyDataPhone, } = dataPhone();
15
15
  let endPointPhone = `v1/user/phone/${userId}`;
16
16
  const headerConfigPhone = () => {
17
17
  let headersData = {
@@ -66,34 +66,10 @@ const usePhone = (token, userInfo, userId, baseUrl, geoCoordinates, lang) => {
66
66
  }
67
67
  };
68
68
  const VerifyUserPhone = async (values) => {
69
- const data = verifyDataPhone({ ...values, geoCoordinates: geoCoordinates });
70
- try {
71
- const response = await restApi_1.default.restApi(baseUrl, "PUT", endPointPhone, headerConfigPhone(), data);
72
- let { newUserInfo } = checkGlobalResponse("phone", response, "VerifyUserPhone", "verify");
73
- return {
74
- response: response,
75
- newUser: newUserInfo,
76
- message: response?.data?.result?.message ?? "Phone Verified Successfully",
77
- status: "success",
78
- };
79
- }
80
- catch (error) {
81
- return {
82
- response: error.response,
83
- newUser: null,
84
- message: error.message,
85
- status: "failed",
86
- };
87
- }
88
- };
89
- const VerifyUserLimitedPhone = async (values) => {
90
- let data = verifyLimitedDataPhone({
91
- ...values,
92
- geoCoordinates: geoCoordinates,
93
- });
69
+ let data = verifyDataPhone({ ...values, geoCoordinates: geoCoordinates });
94
70
  try {
95
71
  const response = await restApi_1.default.restApi(baseUrl, "POST", `v1/user/security/verify/${userId}`, headerConfigPhone(), data);
96
- let { newUserInfo } = checkGlobalResponse("phone", response, "VerifyUserLimitedPhone");
72
+ let { newUserInfo } = checkGlobalResponse("phone", response, "VerifyUserPhone");
97
73
  return {
98
74
  response: response,
99
75
  newUser: newUserInfo,
@@ -180,7 +156,6 @@ const usePhone = (token, userInfo, userId, baseUrl, geoCoordinates, lang) => {
180
156
  CreateUserPhone,
181
157
  DeleteUserPhone,
182
158
  VerifyUserPhone,
183
- VerifyUserLimitedPhone,
184
159
  ConfirmUserPhone,
185
160
  UpdateUserPhone,
186
161
  MakeUserPhonePrimary,
@@ -10,7 +10,7 @@ const restApi_1 = __importDefault(require("../restApi"));
10
10
  const helper_1 = __importDefault(require("../helper"));
11
11
  const useVerifyAndConfirm = (userInfo, tokenData, baseUrl, nodeUrl, programId, geoCoordinates, token, userId, lang) => {
12
12
  const { dataValidate, dataSecurity } = (0, dataStructure_1.default)();
13
- const { dataConfirmEmail, dataConfirmPhone, dataISEmailUsed, dataIsPhoneUsed, dataValidatePhone, dataVerifyEmail, dataVerifyLimitedPhone, dataSendOTPEmail, dataSendOTPPhone, dataValidateForgetPassword, dataConfirmForgetPassword, } = dataValidate();
13
+ const { dataConfirmEmail, dataConfirmPhone, dataISEmailUsed, dataIsPhoneUsed, dataValidatePhone, dataVerifyEmail, dataVerifyPhone, dataSendOTPEmail, dataSendOTPPhone, dataValidateForgetPassword, dataConfirmForgetPassword, } = dataValidate();
14
14
  const { CreateLimitedToken } = (0, token_1.useToken)(userInfo, nodeUrl, programId, "", geoCoordinates);
15
15
  const { checkResponse, headerConfig } = (0, helper_1.default)(userInfo);
16
16
  const { checkGlobalResponse, errorHandler } = checkResponse();
@@ -85,10 +85,7 @@ const useVerifyAndConfirm = (userInfo, tokenData, baseUrl, nodeUrl, programId, g
85
85
  }
86
86
  };
87
87
  const VerifyLimitedPhone = async (values) => {
88
- let data = dataVerifyLimitedPhone({
89
- ...values,
90
- geoCoordinates: geoCoordinates,
91
- });
88
+ let data = dataVerifyPhone({ ...values, geoCoordinates: geoCoordinates });
92
89
  try {
93
90
  const response = await restApi_1.default.restApi(baseUrl, "POST", `v1/limited/security/verify`, await headerConfigVerify(), data);
94
91
  checkGlobalResponse("verify", response, "VerifyLimitedPhone", "verify");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.72",
3
+ "version": "0.1.74",
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",