ggez-banking-sdk 0.1.189 → 0.1.190
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.
- package/dist/api/clients/user.d.ts +7 -0
- package/dist/api/clients/user.js +67 -55
- package/dist/api/data/account.d.ts +1 -1
- package/dist/api/data/auth.d.ts +2 -2
- package/dist/api/data/result.d.ts +1 -1
- package/dist/api/data/user/confirmUserSecurity.d.ts +1 -1
- package/dist/api/data/user/forgetSecurityData.d.ts +1 -1
- package/dist/api/data/user/index.d.ts +1 -0
- package/dist/api/data/user/index.js +1 -0
- package/dist/api/data/user/personalInfo.d.ts +1 -1
- package/dist/api/data/user/preferences.d.ts +1 -1
- package/dist/api/data/user/resetUserSecurity.d.ts +1 -1
- package/dist/api/data/user/type.d.ts +3 -0
- package/dist/api/data/user/type.js +9 -0
- package/dist/api/data/user/validateLimitedSecurity.d.ts +1 -1
- package/dist/api/data/user/validateSecurityData.d.ts +1 -1
- package/dist/api/data/user/verifyUserSecurity.d.ts +1 -1
- package/dist/api/services/user.d.ts +40 -39
- package/dist/api/services/user.js +105 -101
- package/dist/constants/constants.d.ts +27 -26
- package/dist/constants/constants.js +27 -26
- package/dist/helper/api/axiosHelper.d.ts +1 -1
- package/dist/helper/api/responseHelper.d.ts +1 -1
- package/dist/helper/api/resultHelper.d.ts +1 -1
- package/dist/helper/cipherHelper.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/api/data/user/index.d.ts +1 -0
- package/dist/types/api/data/user/type.d.ts +5 -0
- package/dist/types/api/data/user/type.js +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import type { ErrorHandler, IActivateGoogleAuthData, IConfirmDeviceData, IConfir
|
|
|
2
2
|
import type { UserClientData } from "../../types";
|
|
3
3
|
import type { ResetUserSecurity, UserData } from "../../types";
|
|
4
4
|
import { BaseClient } from "./base";
|
|
5
|
+
import { IUpdateUserTypeData } from "../../types/api/data/user/type";
|
|
5
6
|
declare class UserClient extends BaseClient {
|
|
6
7
|
private userService;
|
|
7
8
|
private authService;
|
|
@@ -420,6 +421,12 @@ declare class UserClient extends BaseClient {
|
|
|
420
421
|
message: string;
|
|
421
422
|
error: any;
|
|
422
423
|
}>;
|
|
424
|
+
UpdateUserType: (data: IUpdateUserTypeData) => Promise<{
|
|
425
|
+
data: UserData;
|
|
426
|
+
success: boolean;
|
|
427
|
+
message: string;
|
|
428
|
+
error: any;
|
|
429
|
+
}>;
|
|
423
430
|
DeleteAddress: (data: IDeleteAddressData) => Promise<{
|
|
424
431
|
data: UserData;
|
|
425
432
|
success: boolean;
|
package/dist/api/clients/user.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosHelper, UserHelper } from "../../helper";
|
|
2
|
-
import { FillActivateGoogleAuthData, FillConfirmDeviceData, FillConfirmEmailData, FillConfirmPhoneData, FillConfirmUserSecurityData, FillCreateAddressData, FillCreateBankAccountData, FillCreateDeviceData, FillCreateEmailData, FillCreateIdentificationData, FillCreatePhoneData, FillCreateTicketData, FillCreateUserData, FillCreateUserWithGoogleData, FillDeactivateGoogleAuthData, FillDeleteAddressData, FillDeleteBankAccountData, FillDeleteDeviceData, FillDeleteEmailData, FillDeleteGoogleAuthData, FillDeleteIdentificationData, FillDeletePhoneData, FillDocumentData, FillEnrollGoogleAuthData, FillLogoutDeviceData, FillMakeAddressPrimaryData, FillMakeBankAccountPrimaryData, FillMakeEmailPrimaryData, FillMakePhonePrimaryData, FillResetPasswordData, FillResetSecurityCodeData, FillResetSecurityQuestionsData, FillResetUserSecurityData, FillResultByError, FillSendEmailOTPData, FillSendPhoneOTPData, FillUpdateAddressData, FillUpdateBankAccountData, FillUpdateDeviceData, FillUpdateEmailData, FillUpdateIdentificationData, FillUpdatePersonalInfoData, FillUpdatePhoneData, FillUpdatePreferencesData, FillUploadDocumentData, FillUploadProfilePictureData, FillValidateSecurityCodeData, FillValidateSecurityData, FillVerifyDeviceData, FillVerifyEmailData, FillVerifyPhoneData, FillVerifyUserSecurityData, } from "../data";
|
|
2
|
+
import { FillActivateGoogleAuthData, FillConfirmDeviceData, FillConfirmEmailData, FillConfirmPhoneData, FillConfirmUserSecurityData, FillCreateAddressData, FillCreateBankAccountData, FillCreateDeviceData, FillCreateEmailData, FillCreateIdentificationData, FillCreatePhoneData, FillCreateTicketData, FillCreateUserData, FillCreateUserWithGoogleData, FillDeactivateGoogleAuthData, FillDeleteAddressData, FillDeleteBankAccountData, FillDeleteDeviceData, FillDeleteEmailData, FillDeleteGoogleAuthData, FillDeleteIdentificationData, FillDeletePhoneData, FillDocumentData, FillEnrollGoogleAuthData, FillLogoutDeviceData, FillMakeAddressPrimaryData, FillMakeBankAccountPrimaryData, FillMakeEmailPrimaryData, FillMakePhonePrimaryData, FillResetPasswordData, FillResetSecurityCodeData, FillResetSecurityQuestionsData, FillResetUserSecurityData, FillResultByError, FillSendEmailOTPData, FillSendPhoneOTPData, FillUpdateAddressData, FillUpdateBankAccountData, FillUpdateDeviceData, FillUpdateEmailData, FillUpdateIdentificationData, FillUpdatePersonalInfoData, FillUpdatePhoneData, FillUpdatePreferencesData, FillUploadDocumentData, FillUploadProfilePictureData, FillValidateSecurityCodeData, FillValidateSecurityData, FillVerifyDeviceData, FillVerifyEmailData, FillVerifyPhoneData, FillVerifyUserSecurityData, FillUpdateUserTypeData, } from "../data";
|
|
3
3
|
import { AuthService, UserService } from "../services";
|
|
4
4
|
import { BaseClient } from "./base";
|
|
5
5
|
class UserClient extends BaseClient {
|
|
@@ -282,7 +282,7 @@ class UserClient extends BaseClient {
|
|
|
282
282
|
CreatePhone = async (data) => {
|
|
283
283
|
try {
|
|
284
284
|
const userData = FillCreatePhoneData(data);
|
|
285
|
-
const response = await this.userService.createPhone(
|
|
285
|
+
const response = await this.userService.createPhone(userData);
|
|
286
286
|
return this.responseHelper.GetResponse(response.data);
|
|
287
287
|
}
|
|
288
288
|
catch (error) {
|
|
@@ -294,7 +294,7 @@ class UserClient extends BaseClient {
|
|
|
294
294
|
CreateIdentification = async (data) => {
|
|
295
295
|
try {
|
|
296
296
|
const userData = FillCreateIdentificationData(data);
|
|
297
|
-
const response = await this.userService.createIdentification(
|
|
297
|
+
const response = await this.userService.createIdentification(userData);
|
|
298
298
|
return this.responseHelper.GetResponse(response.data);
|
|
299
299
|
}
|
|
300
300
|
catch (error) {
|
|
@@ -305,7 +305,7 @@ class UserClient extends BaseClient {
|
|
|
305
305
|
};
|
|
306
306
|
CreateExternalAuth = async (data) => {
|
|
307
307
|
try {
|
|
308
|
-
const response = await this.userService.createExternalAuth(
|
|
308
|
+
const response = await this.userService.createExternalAuth(data);
|
|
309
309
|
return this.responseHelper.GetResponse(response.data);
|
|
310
310
|
}
|
|
311
311
|
catch (error) {
|
|
@@ -317,7 +317,7 @@ class UserClient extends BaseClient {
|
|
|
317
317
|
CreateEmail = async (data) => {
|
|
318
318
|
try {
|
|
319
319
|
const userData = FillCreateEmailData(data);
|
|
320
|
-
const response = await this.userService.createEmail(
|
|
320
|
+
const response = await this.userService.createEmail(userData);
|
|
321
321
|
return this.responseHelper.GetResponse(response.data);
|
|
322
322
|
}
|
|
323
323
|
catch (error) {
|
|
@@ -328,7 +328,7 @@ class UserClient extends BaseClient {
|
|
|
328
328
|
};
|
|
329
329
|
CreateCurrency = async (data) => {
|
|
330
330
|
try {
|
|
331
|
-
const response = await this.userService.createCurrency(
|
|
331
|
+
const response = await this.userService.createCurrency(data);
|
|
332
332
|
return this.responseHelper.GetResponse(response.data);
|
|
333
333
|
}
|
|
334
334
|
catch (error) {
|
|
@@ -339,7 +339,7 @@ class UserClient extends BaseClient {
|
|
|
339
339
|
};
|
|
340
340
|
CreateCreditCard = async (data) => {
|
|
341
341
|
try {
|
|
342
|
-
const response = await this.userService.createCreditCard(
|
|
342
|
+
const response = await this.userService.createCreditCard(data);
|
|
343
343
|
return this.responseHelper.GetResponse(response.data);
|
|
344
344
|
}
|
|
345
345
|
catch (error) {
|
|
@@ -351,7 +351,7 @@ class UserClient extends BaseClient {
|
|
|
351
351
|
CreateTicket = async (data) => {
|
|
352
352
|
try {
|
|
353
353
|
const userData = FillCreateTicketData(data);
|
|
354
|
-
const response = await this.userService.createTicket(
|
|
354
|
+
const response = await this.userService.createTicket(userData);
|
|
355
355
|
return this.responseHelper.GetResponse(response.data);
|
|
356
356
|
}
|
|
357
357
|
catch (error) {
|
|
@@ -363,7 +363,7 @@ class UserClient extends BaseClient {
|
|
|
363
363
|
CreateBankAccount = async (data) => {
|
|
364
364
|
try {
|
|
365
365
|
const userData = FillCreateBankAccountData(data);
|
|
366
|
-
const response = await this.userService.createBankAccount(
|
|
366
|
+
const response = await this.userService.createBankAccount(userData);
|
|
367
367
|
return this.responseHelper.GetResponse(response.data);
|
|
368
368
|
}
|
|
369
369
|
catch (error) {
|
|
@@ -375,7 +375,7 @@ class UserClient extends BaseClient {
|
|
|
375
375
|
CreateAddress = async (data) => {
|
|
376
376
|
try {
|
|
377
377
|
const userData = FillCreateAddressData(data);
|
|
378
|
-
const response = await this.userService.createAddress(
|
|
378
|
+
const response = await this.userService.createAddress(userData);
|
|
379
379
|
return this.responseHelper.GetResponse(response.data);
|
|
380
380
|
}
|
|
381
381
|
catch (error) {
|
|
@@ -387,7 +387,7 @@ class UserClient extends BaseClient {
|
|
|
387
387
|
CreateDevice = async (data) => {
|
|
388
388
|
try {
|
|
389
389
|
const userData = FillCreateDeviceData(data);
|
|
390
|
-
const response = await this.userService.createDevice(
|
|
390
|
+
const response = await this.userService.createDevice(userData);
|
|
391
391
|
return this.responseHelper.GetResponse(response.data);
|
|
392
392
|
}
|
|
393
393
|
catch (error) {
|
|
@@ -398,7 +398,7 @@ class UserClient extends BaseClient {
|
|
|
398
398
|
};
|
|
399
399
|
SecurityAccess = async (data) => {
|
|
400
400
|
try {
|
|
401
|
-
const response = await this.userService.securityAccess(
|
|
401
|
+
const response = await this.userService.securityAccess(data);
|
|
402
402
|
return this.responseHelper.GetResponse(response.data);
|
|
403
403
|
}
|
|
404
404
|
catch (error) {
|
|
@@ -410,7 +410,7 @@ class UserClient extends BaseClient {
|
|
|
410
410
|
UploadDocument = async (data) => {
|
|
411
411
|
try {
|
|
412
412
|
const documentData = FillUploadDocumentData(data);
|
|
413
|
-
const response = await this.userService.uploadDocument(
|
|
413
|
+
const response = await this.userService.uploadDocument(documentData);
|
|
414
414
|
return this.responseHelper.GetResponse(response.data);
|
|
415
415
|
}
|
|
416
416
|
catch (error) {
|
|
@@ -422,7 +422,7 @@ class UserClient extends BaseClient {
|
|
|
422
422
|
UpdateProfilePicture = async (data) => {
|
|
423
423
|
try {
|
|
424
424
|
const documentData = FillUploadProfilePictureData(data);
|
|
425
|
-
const response = await this.userService.uploadDocument(
|
|
425
|
+
const response = await this.userService.uploadDocument(documentData);
|
|
426
426
|
return this.responseHelper.GetResponse(response.data);
|
|
427
427
|
}
|
|
428
428
|
catch (error) {
|
|
@@ -433,7 +433,7 @@ class UserClient extends BaseClient {
|
|
|
433
433
|
};
|
|
434
434
|
VerifySecurityData = async (data) => {
|
|
435
435
|
try {
|
|
436
|
-
const response = await this.userService.verifySecurityData(
|
|
436
|
+
const response = await this.userService.verifySecurityData(data);
|
|
437
437
|
return this.responseHelper.GetResponse(response.data);
|
|
438
438
|
}
|
|
439
439
|
catch (error) {
|
|
@@ -445,7 +445,7 @@ class UserClient extends BaseClient {
|
|
|
445
445
|
VerifyEmail = async (data) => {
|
|
446
446
|
try {
|
|
447
447
|
const verifyUserSecurity = FillVerifyEmailData(data);
|
|
448
|
-
const response = await this.userService.verifySecurityData(
|
|
448
|
+
const response = await this.userService.verifySecurityData(verifyUserSecurity);
|
|
449
449
|
return this.responseHelper.GetResponse(response.data);
|
|
450
450
|
}
|
|
451
451
|
catch (error) {
|
|
@@ -457,7 +457,7 @@ class UserClient extends BaseClient {
|
|
|
457
457
|
SendEmailOTP = async (data) => {
|
|
458
458
|
try {
|
|
459
459
|
const verifyUserSecurity = FillSendEmailOTPData(data);
|
|
460
|
-
const response = await this.userService.verifySecurityData(
|
|
460
|
+
const response = await this.userService.verifySecurityData(verifyUserSecurity);
|
|
461
461
|
return this.responseHelper.GetResponse(response.data);
|
|
462
462
|
}
|
|
463
463
|
catch (error) {
|
|
@@ -469,7 +469,7 @@ class UserClient extends BaseClient {
|
|
|
469
469
|
VerifyPhone = async (data) => {
|
|
470
470
|
try {
|
|
471
471
|
const verifyUserSecurity = FillVerifyPhoneData(data);
|
|
472
|
-
const response = await this.userService.verifySecurityData(
|
|
472
|
+
const response = await this.userService.verifySecurityData(verifyUserSecurity);
|
|
473
473
|
return this.responseHelper.GetResponse(response.data);
|
|
474
474
|
}
|
|
475
475
|
catch (error) {
|
|
@@ -481,7 +481,7 @@ class UserClient extends BaseClient {
|
|
|
481
481
|
SendPhoneOTP = async (data) => {
|
|
482
482
|
try {
|
|
483
483
|
const verifyUserSecurity = FillSendPhoneOTPData(data);
|
|
484
|
-
const response = await this.userService.verifySecurityData(
|
|
484
|
+
const response = await this.userService.verifySecurityData(verifyUserSecurity);
|
|
485
485
|
return this.responseHelper.GetResponse(response.data);
|
|
486
486
|
}
|
|
487
487
|
catch (error) {
|
|
@@ -493,7 +493,7 @@ class UserClient extends BaseClient {
|
|
|
493
493
|
VerifyDevice = async (data) => {
|
|
494
494
|
try {
|
|
495
495
|
const verifyUserSecurity = FillVerifyDeviceData(data);
|
|
496
|
-
const response = await this.userService.verifySecurityData(
|
|
496
|
+
const response = await this.userService.verifySecurityData(verifyUserSecurity);
|
|
497
497
|
return this.responseHelper.GetResponse(response.data);
|
|
498
498
|
}
|
|
499
499
|
catch (error) {
|
|
@@ -504,7 +504,7 @@ class UserClient extends BaseClient {
|
|
|
504
504
|
};
|
|
505
505
|
ConfirmSecurityData = async (data) => {
|
|
506
506
|
try {
|
|
507
|
-
const response = await this.userService.confirmSecurityData(
|
|
507
|
+
const response = await this.userService.confirmSecurityData(data);
|
|
508
508
|
return this.responseHelper.GetResponse(response.data);
|
|
509
509
|
}
|
|
510
510
|
catch (error) {
|
|
@@ -516,7 +516,7 @@ class UserClient extends BaseClient {
|
|
|
516
516
|
ConfirmEmail = async (data) => {
|
|
517
517
|
try {
|
|
518
518
|
const confirmUserSecurity = FillConfirmEmailData(data);
|
|
519
|
-
const response = await this.userService.confirmSecurityData(
|
|
519
|
+
const response = await this.userService.confirmSecurityData(confirmUserSecurity);
|
|
520
520
|
return this.responseHelper.GetResponse(response.data);
|
|
521
521
|
}
|
|
522
522
|
catch (error) {
|
|
@@ -528,7 +528,7 @@ class UserClient extends BaseClient {
|
|
|
528
528
|
ConfirmPhone = async (data) => {
|
|
529
529
|
try {
|
|
530
530
|
const confirmUserSecurity = FillConfirmPhoneData(data);
|
|
531
|
-
const response = await this.userService.confirmSecurityData(
|
|
531
|
+
const response = await this.userService.confirmSecurityData(confirmUserSecurity);
|
|
532
532
|
return this.responseHelper.GetResponse(response.data);
|
|
533
533
|
}
|
|
534
534
|
catch (error) {
|
|
@@ -540,7 +540,7 @@ class UserClient extends BaseClient {
|
|
|
540
540
|
ConfirmDevice = async (data) => {
|
|
541
541
|
try {
|
|
542
542
|
const confirmUserSecurity = FillConfirmDeviceData(data);
|
|
543
|
-
const response = await this.userService.confirmSecurityData(
|
|
543
|
+
const response = await this.userService.confirmSecurityData(confirmUserSecurity);
|
|
544
544
|
return this.responseHelper.GetResponse(response.data);
|
|
545
545
|
}
|
|
546
546
|
catch (error) {
|
|
@@ -551,7 +551,7 @@ class UserClient extends BaseClient {
|
|
|
551
551
|
};
|
|
552
552
|
ResetSecurityData = async (data) => {
|
|
553
553
|
try {
|
|
554
|
-
const response = await this.userService.resetSecurityData(
|
|
554
|
+
const response = await this.userService.resetSecurityData(data);
|
|
555
555
|
return this.responseHelper.GetResponse(response.data);
|
|
556
556
|
}
|
|
557
557
|
catch (error) {
|
|
@@ -563,7 +563,7 @@ class UserClient extends BaseClient {
|
|
|
563
563
|
EnrollGoogleAuth = async () => {
|
|
564
564
|
try {
|
|
565
565
|
const userData = FillEnrollGoogleAuthData();
|
|
566
|
-
const response = await this.userService.enrollGoogleAuth(
|
|
566
|
+
const response = await this.userService.enrollGoogleAuth(userData);
|
|
567
567
|
return this.responseHelper.GetResponse(response.data);
|
|
568
568
|
}
|
|
569
569
|
catch (error) {
|
|
@@ -575,7 +575,7 @@ class UserClient extends BaseClient {
|
|
|
575
575
|
ActivateGoogleAuth = async (data) => {
|
|
576
576
|
try {
|
|
577
577
|
const userData = FillActivateGoogleAuthData(data);
|
|
578
|
-
const response = await this.userService.activateGoogleAuth(
|
|
578
|
+
const response = await this.userService.activateGoogleAuth(userData);
|
|
579
579
|
return this.responseHelper.GetResponse(response.data);
|
|
580
580
|
}
|
|
581
581
|
catch (error) {
|
|
@@ -587,7 +587,7 @@ class UserClient extends BaseClient {
|
|
|
587
587
|
DeleteGoogleAuth = async (data) => {
|
|
588
588
|
try {
|
|
589
589
|
const userData = FillDeleteGoogleAuthData(data);
|
|
590
|
-
const response = await this.userService.deleteGoogleAuth(
|
|
590
|
+
const response = await this.userService.deleteGoogleAuth(userData);
|
|
591
591
|
return this.responseHelper.GetResponse(response.data);
|
|
592
592
|
}
|
|
593
593
|
catch (error) {
|
|
@@ -599,7 +599,7 @@ class UserClient extends BaseClient {
|
|
|
599
599
|
DeactivateGoogleAuth = async (data) => {
|
|
600
600
|
try {
|
|
601
601
|
const userData = FillDeactivateGoogleAuthData(data);
|
|
602
|
-
const response = await this.userService.deactivateGoogleAuth(
|
|
602
|
+
const response = await this.userService.deactivateGoogleAuth(userData);
|
|
603
603
|
return this.responseHelper.GetResponse(response.data);
|
|
604
604
|
}
|
|
605
605
|
catch (error) {
|
|
@@ -612,7 +612,7 @@ class UserClient extends BaseClient {
|
|
|
612
612
|
// #region "PUT"
|
|
613
613
|
UpdateUser = async (data) => {
|
|
614
614
|
try {
|
|
615
|
-
const response = await this.userService.updateUser(
|
|
615
|
+
const response = await this.userService.updateUser(data);
|
|
616
616
|
return this.responseHelper.GetResponse(response.data);
|
|
617
617
|
}
|
|
618
618
|
catch (error) {
|
|
@@ -624,7 +624,7 @@ class UserClient extends BaseClient {
|
|
|
624
624
|
ResetPassword = async (data) => {
|
|
625
625
|
try {
|
|
626
626
|
const resetSecurityData = FillResetPasswordData(data);
|
|
627
|
-
const response = await this.userService.resetSecurityData(
|
|
627
|
+
const response = await this.userService.resetSecurityData(resetSecurityData);
|
|
628
628
|
return this.responseHelper.GetResponse(response.data);
|
|
629
629
|
}
|
|
630
630
|
catch (error) {
|
|
@@ -636,7 +636,7 @@ class UserClient extends BaseClient {
|
|
|
636
636
|
ResetSecurityCode = async (data) => {
|
|
637
637
|
try {
|
|
638
638
|
const resetSecurityData = FillResetSecurityCodeData(data);
|
|
639
|
-
const response = await this.userService.resetSecurityData(
|
|
639
|
+
const response = await this.userService.resetSecurityData(resetSecurityData);
|
|
640
640
|
return this.responseHelper.GetResponse(response.data);
|
|
641
641
|
}
|
|
642
642
|
catch (error) {
|
|
@@ -648,7 +648,7 @@ class UserClient extends BaseClient {
|
|
|
648
648
|
ResetSecurityQuestions = async (data) => {
|
|
649
649
|
try {
|
|
650
650
|
const resetSecurityData = FillResetSecurityQuestionsData(data);
|
|
651
|
-
const response = await this.userService.resetSecurityData(
|
|
651
|
+
const response = await this.userService.resetSecurityData(resetSecurityData);
|
|
652
652
|
return this.responseHelper.GetResponse(response.data);
|
|
653
653
|
}
|
|
654
654
|
catch (error) {
|
|
@@ -660,7 +660,7 @@ class UserClient extends BaseClient {
|
|
|
660
660
|
ValidateSecurityCode = async (data) => {
|
|
661
661
|
try {
|
|
662
662
|
const validateUserSecurityData = FillValidateSecurityCodeData(data);
|
|
663
|
-
const response = await this.userService.validateSecurityData(
|
|
663
|
+
const response = await this.userService.validateSecurityData(validateUserSecurityData);
|
|
664
664
|
return this.responseHelper.GetResponse(response.data);
|
|
665
665
|
}
|
|
666
666
|
catch (error) {
|
|
@@ -672,7 +672,7 @@ class UserClient extends BaseClient {
|
|
|
672
672
|
UpdatePreferences = async (data) => {
|
|
673
673
|
try {
|
|
674
674
|
const userData = FillUpdatePreferencesData(data);
|
|
675
|
-
const response = await this.userService.updatePreferences(
|
|
675
|
+
const response = await this.userService.updatePreferences(userData);
|
|
676
676
|
return this.responseHelper.GetResponse(response.data);
|
|
677
677
|
}
|
|
678
678
|
catch (error) {
|
|
@@ -684,7 +684,7 @@ class UserClient extends BaseClient {
|
|
|
684
684
|
UpdatePhone = async (data) => {
|
|
685
685
|
try {
|
|
686
686
|
const userData = FillUpdatePhoneData(data);
|
|
687
|
-
const response = await this.userService.updatePhone(
|
|
687
|
+
const response = await this.userService.updatePhone(userData);
|
|
688
688
|
return this.responseHelper.GetResponse(response.data);
|
|
689
689
|
}
|
|
690
690
|
catch (error) {
|
|
@@ -696,7 +696,7 @@ class UserClient extends BaseClient {
|
|
|
696
696
|
MakePhonePrimary = async (data) => {
|
|
697
697
|
try {
|
|
698
698
|
const userData = FillMakePhonePrimaryData(data);
|
|
699
|
-
const response = await this.userService.updatePhone(
|
|
699
|
+
const response = await this.userService.updatePhone(userData);
|
|
700
700
|
return this.responseHelper.GetResponse(response.data);
|
|
701
701
|
}
|
|
702
702
|
catch (error) {
|
|
@@ -708,7 +708,7 @@ class UserClient extends BaseClient {
|
|
|
708
708
|
UpdatePersonalInfo = async (data) => {
|
|
709
709
|
try {
|
|
710
710
|
const userData = FillUpdatePersonalInfoData(data);
|
|
711
|
-
const response = await this.userService.updatePersonalInfo(
|
|
711
|
+
const response = await this.userService.updatePersonalInfo(userData);
|
|
712
712
|
return this.responseHelper.GetResponse(response.data);
|
|
713
713
|
}
|
|
714
714
|
catch (error) {
|
|
@@ -720,7 +720,7 @@ class UserClient extends BaseClient {
|
|
|
720
720
|
UpdateIdentification = async (data) => {
|
|
721
721
|
try {
|
|
722
722
|
const userData = FillUpdateIdentificationData(data);
|
|
723
|
-
const response = await this.userService.updateIdentification(
|
|
723
|
+
const response = await this.userService.updateIdentification(userData);
|
|
724
724
|
return this.responseHelper.GetResponse(response.data);
|
|
725
725
|
}
|
|
726
726
|
catch (error) {
|
|
@@ -731,7 +731,7 @@ class UserClient extends BaseClient {
|
|
|
731
731
|
};
|
|
732
732
|
UpdateExternalAuth = async (data) => {
|
|
733
733
|
try {
|
|
734
|
-
const response = await this.userService.updateExternalAuth(
|
|
734
|
+
const response = await this.userService.updateExternalAuth(data);
|
|
735
735
|
return this.responseHelper.GetResponse(response.data);
|
|
736
736
|
}
|
|
737
737
|
catch (error) {
|
|
@@ -743,7 +743,7 @@ class UserClient extends BaseClient {
|
|
|
743
743
|
UpdateEmail = async (data) => {
|
|
744
744
|
try {
|
|
745
745
|
const userData = FillUpdateEmailData(data);
|
|
746
|
-
const response = await this.userService.updateEmail(
|
|
746
|
+
const response = await this.userService.updateEmail(userData);
|
|
747
747
|
return this.responseHelper.GetResponse(response.data);
|
|
748
748
|
}
|
|
749
749
|
catch (error) {
|
|
@@ -755,7 +755,7 @@ class UserClient extends BaseClient {
|
|
|
755
755
|
MakeEmailPrimary = async (data) => {
|
|
756
756
|
try {
|
|
757
757
|
const userData = FillMakeEmailPrimaryData(data);
|
|
758
|
-
const response = await this.userService.updateEmail(
|
|
758
|
+
const response = await this.userService.updateEmail(userData);
|
|
759
759
|
return this.responseHelper.GetResponse(response.data);
|
|
760
760
|
}
|
|
761
761
|
catch (error) {
|
|
@@ -767,7 +767,7 @@ class UserClient extends BaseClient {
|
|
|
767
767
|
UpdateBankAccount = async (data) => {
|
|
768
768
|
try {
|
|
769
769
|
const userData = FillUpdateBankAccountData(data);
|
|
770
|
-
const response = await this.userService.updateBankAccount(
|
|
770
|
+
const response = await this.userService.updateBankAccount(userData);
|
|
771
771
|
return this.responseHelper.GetResponse(response.data);
|
|
772
772
|
}
|
|
773
773
|
catch (error) {
|
|
@@ -779,7 +779,7 @@ class UserClient extends BaseClient {
|
|
|
779
779
|
MakeBankAccountPrimary = async (data) => {
|
|
780
780
|
try {
|
|
781
781
|
const userData = FillMakeBankAccountPrimaryData(data);
|
|
782
|
-
const response = await this.userService.updateBankAccount(
|
|
782
|
+
const response = await this.userService.updateBankAccount(userData);
|
|
783
783
|
return this.responseHelper.GetResponse(response.data);
|
|
784
784
|
}
|
|
785
785
|
catch (error) {
|
|
@@ -791,7 +791,7 @@ class UserClient extends BaseClient {
|
|
|
791
791
|
UpdateAddress = async (data) => {
|
|
792
792
|
try {
|
|
793
793
|
const userData = FillUpdateAddressData(data);
|
|
794
|
-
const response = await this.userService.updateAddress(
|
|
794
|
+
const response = await this.userService.updateAddress(userData);
|
|
795
795
|
return this.responseHelper.GetResponse(response.data);
|
|
796
796
|
}
|
|
797
797
|
catch (error) {
|
|
@@ -803,7 +803,7 @@ class UserClient extends BaseClient {
|
|
|
803
803
|
MakeAddressPrimary = async (data) => {
|
|
804
804
|
try {
|
|
805
805
|
const userData = FillMakeAddressPrimaryData(data);
|
|
806
|
-
const response = await this.userService.updateAddress(
|
|
806
|
+
const response = await this.userService.updateAddress(userData);
|
|
807
807
|
return this.responseHelper.GetResponse(response.data);
|
|
808
808
|
}
|
|
809
809
|
catch (error) {
|
|
@@ -819,10 +819,10 @@ class UserClient extends BaseClient {
|
|
|
819
819
|
if (data.token && data.userId) {
|
|
820
820
|
const config = AxiosHelper.GetAxiosConfig(data.token, this.clientData.baseUrl, this.clientData.lang);
|
|
821
821
|
const userService = new UserService({ config, userId: data.userId }, this.errorHandler);
|
|
822
|
-
response = await userService.updateDevice(
|
|
822
|
+
response = await userService.updateDevice(userData);
|
|
823
823
|
}
|
|
824
824
|
else {
|
|
825
|
-
response = await this.userService.updateDevice(
|
|
825
|
+
response = await this.userService.updateDevice(userData);
|
|
826
826
|
}
|
|
827
827
|
return this.responseHelper.GetResponse(response.data);
|
|
828
828
|
}
|
|
@@ -835,7 +835,7 @@ class UserClient extends BaseClient {
|
|
|
835
835
|
LogoutDevice = async (data) => {
|
|
836
836
|
try {
|
|
837
837
|
const userData = FillLogoutDeviceData(data);
|
|
838
|
-
const response = await this.userService.logoutDevice(
|
|
838
|
+
const response = await this.userService.logoutDevice(userData);
|
|
839
839
|
return this.responseHelper.GetResponse(response.data);
|
|
840
840
|
}
|
|
841
841
|
catch (error) {
|
|
@@ -844,12 +844,24 @@ class UserClient extends BaseClient {
|
|
|
844
844
|
return this.responseHelper.GetErrorResponse(userData, "LogoutDevice");
|
|
845
845
|
}
|
|
846
846
|
};
|
|
847
|
+
UpdateUserType = async (data) => {
|
|
848
|
+
try {
|
|
849
|
+
const userData = FillUpdateUserTypeData(data);
|
|
850
|
+
const response = await this.userService.updateUserType(userData);
|
|
851
|
+
return this.responseHelper.GetResponse(response.data);
|
|
852
|
+
}
|
|
853
|
+
catch (error) {
|
|
854
|
+
const result = FillResultByError(error);
|
|
855
|
+
const userData = UserHelper.FillUserData("result", result);
|
|
856
|
+
return this.responseHelper.GetErrorResponse(userData, "UpdateUserType");
|
|
857
|
+
}
|
|
858
|
+
};
|
|
847
859
|
// #endregion
|
|
848
860
|
// #region "DELETE"
|
|
849
861
|
DeleteAddress = async (data) => {
|
|
850
862
|
try {
|
|
851
863
|
const userData = FillDeleteAddressData(data);
|
|
852
|
-
const response = await this.userService.deleteAddress(
|
|
864
|
+
const response = await this.userService.deleteAddress(userData);
|
|
853
865
|
return this.responseHelper.GetResponse(response.data);
|
|
854
866
|
}
|
|
855
867
|
catch (error) {
|
|
@@ -861,7 +873,7 @@ class UserClient extends BaseClient {
|
|
|
861
873
|
DeleteBankAccount = async (data) => {
|
|
862
874
|
try {
|
|
863
875
|
const userData = FillDeleteBankAccountData(data);
|
|
864
|
-
const response = await this.userService.deleteBankAccount(
|
|
876
|
+
const response = await this.userService.deleteBankAccount(userData);
|
|
865
877
|
return this.responseHelper.GetResponse(response.data);
|
|
866
878
|
}
|
|
867
879
|
catch (error) {
|
|
@@ -873,7 +885,7 @@ class UserClient extends BaseClient {
|
|
|
873
885
|
DeleteDevice = async (data) => {
|
|
874
886
|
try {
|
|
875
887
|
const userData = FillDeleteDeviceData(data);
|
|
876
|
-
const response = await this.userService.deleteDevice(
|
|
888
|
+
const response = await this.userService.deleteDevice(userData);
|
|
877
889
|
return this.responseHelper.GetResponse(response.data);
|
|
878
890
|
}
|
|
879
891
|
catch (error) {
|
|
@@ -885,7 +897,7 @@ class UserClient extends BaseClient {
|
|
|
885
897
|
DeleteEmail = async (data) => {
|
|
886
898
|
try {
|
|
887
899
|
const userData = FillDeleteEmailData(data);
|
|
888
|
-
const response = await this.userService.deleteEmail(
|
|
900
|
+
const response = await this.userService.deleteEmail(userData);
|
|
889
901
|
return this.responseHelper.GetResponse(response.data);
|
|
890
902
|
}
|
|
891
903
|
catch (error) {
|
|
@@ -897,7 +909,7 @@ class UserClient extends BaseClient {
|
|
|
897
909
|
DeleteIdentification = async (data) => {
|
|
898
910
|
try {
|
|
899
911
|
const userData = FillDeleteIdentificationData(data);
|
|
900
|
-
const response = await this.userService.deleteIdentification(
|
|
912
|
+
const response = await this.userService.deleteIdentification(userData);
|
|
901
913
|
return this.responseHelper.GetResponse(response.data);
|
|
902
914
|
}
|
|
903
915
|
catch (error) {
|
|
@@ -909,7 +921,7 @@ class UserClient extends BaseClient {
|
|
|
909
921
|
DeletePhone = async (data) => {
|
|
910
922
|
try {
|
|
911
923
|
const userData = FillDeletePhoneData(data);
|
|
912
|
-
const response = await this.userService.deletePhone(
|
|
924
|
+
const response = await this.userService.deletePhone(userData);
|
|
913
925
|
return this.responseHelper.GetResponse(response.data);
|
|
914
926
|
}
|
|
915
927
|
catch (error) {
|
package/dist/api/data/auth.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ILoginUserCredentialsData, ILoginDeviceCredentialsData, ILoginGoogleCredentialsData, IGenerateLimitedTokenData } from "../../types";
|
|
2
|
-
import { TokenData } from "../../types";
|
|
1
|
+
import type { ILoginUserCredentialsData, ILoginDeviceCredentialsData, ILoginGoogleCredentialsData, IGenerateLimitedTokenData } from "../../types";
|
|
2
|
+
import type { TokenData } from "../../types";
|
|
3
3
|
declare const FillTokenData: <K extends keyof TokenData>(key: K, value: TokenData[K]) => TokenData;
|
|
4
4
|
declare const FillLoginUserCredentialsData: (programId: number, data: ILoginUserCredentialsData) => string;
|
|
5
5
|
declare const FillLoginDeviceCredentialsData: (programId: number, data: ILoginDeviceCredentialsData) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpStatusCode } from "axios";
|
|
2
|
-
import { BaseResult, Result } from "../../types";
|
|
2
|
+
import type { BaseResult, Result } from "../../types";
|
|
3
3
|
declare const FillBaseResult: <K extends keyof BaseResult>(key: K, value: BaseResult[K]) => BaseResult;
|
|
4
4
|
declare const FillResult: <K extends BaseResult & {
|
|
5
5
|
error: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ConfirmUserSecurity } from "../../../types";
|
|
1
|
+
import type { ConfirmUserSecurity } from "../../../types";
|
|
2
2
|
declare const FillConfirmUserSecurityData: <K extends keyof ConfirmUserSecurity>(key: K, value: ConfirmUserSecurity[K]) => ConfirmUserSecurity;
|
|
3
3
|
export { FillConfirmUserSecurityData };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ForgetSecurityData } from "../../../types";
|
|
1
|
+
import type { ForgetSecurityData } from "../../../types";
|
|
2
2
|
declare const FillForgetSecurityData: <K extends keyof ForgetSecurityData>(key: K, value: ForgetSecurityData[K]) => ForgetSecurityData;
|
|
3
3
|
export { FillForgetSecurityData };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IUpdatePersonalInfoData } from "../../../types
|
|
1
|
+
import type { IUpdatePersonalInfoData } from "../../../types";
|
|
2
2
|
declare const FillUpdatePersonalInfoData: (data: IUpdatePersonalInfoData) => import("../../../types").UserData;
|
|
3
3
|
export { FillUpdatePersonalInfoData };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IUpdatePreferencesData } from "../../../types
|
|
1
|
+
import type { IUpdatePreferencesData } from "../../../types";
|
|
2
2
|
declare const FillUpdatePreferencesData: (data: IUpdatePreferencesData) => import("../../../types").UserData;
|
|
3
3
|
export { FillUpdatePreferencesData };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ResetUserSecurity } from "../../../types";
|
|
1
|
+
import type { ResetUserSecurity } from "../../../types";
|
|
2
2
|
declare const FillResetUserSecurityData: <K extends keyof ResetUserSecurity>(key: K, value: ResetUserSecurity[K]) => ResetUserSecurity;
|
|
3
3
|
export { FillResetUserSecurityData };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ValidateLimitedSecurity } from "../../../types";
|
|
1
|
+
import type { ValidateLimitedSecurity } from "../../../types";
|
|
2
2
|
declare const FillValidateLimitedSecurityData: <K extends keyof ValidateLimitedSecurity>(key: K, value: ValidateLimitedSecurity[K]) => ValidateLimitedSecurity;
|
|
3
3
|
export { FillValidateLimitedSecurityData };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ValidateUserSecurity } from "../../../types";
|
|
1
|
+
import type { ValidateUserSecurity } from "../../../types";
|
|
2
2
|
declare const FillValidateSecurityData: <K extends keyof ValidateUserSecurity>(key: K, value: ValidateUserSecurity[K]) => ValidateUserSecurity;
|
|
3
3
|
export { FillValidateSecurityData };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { VerifyUserSecurity } from "../../../types";
|
|
1
|
+
import type { VerifyUserSecurity } from "../../../types";
|
|
2
2
|
declare const FillVerifyUserSecurityData: <K extends keyof VerifyUserSecurity>(key: K, value: VerifyUserSecurity[K]) => VerifyUserSecurity;
|
|
3
3
|
export { FillVerifyUserSecurityData };
|