ggez-banking-sdk 0.3.22 → 0.3.23
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/account.js +3 -3
- package/dist/api/clients/auth.js +5 -5
- package/dist/api/clients/blockchain.js +5 -5
- package/dist/api/clients/limited.js +10 -10
- package/dist/api/clients/order.js +2 -2
- package/dist/api/clients/organization.js +7 -7
- package/dist/api/clients/program.js +4 -4
- package/dist/api/clients/promotion.d.ts +5 -3
- package/dist/api/clients/promotion.js +16 -4
- package/dist/api/clients/transaction.js +5 -5
- package/dist/api/clients/user.js +78 -78
- package/dist/api/data/account.d.ts +2 -2
- package/dist/api/data/account.js +28 -8
- package/dist/api/data/auth.d.ts +2 -2
- package/dist/api/data/auth.js +30 -8
- package/dist/api/data/blockchain.d.ts +2 -2
- package/dist/api/data/blockchain.js +17 -11
- package/dist/api/data/order.d.ts +2 -2
- package/dist/api/data/order.js +21 -15
- package/dist/api/data/organization.d.ts +2 -2
- package/dist/api/data/organization.js +38 -35
- package/dist/api/data/program.d.ts +2 -2
- package/dist/api/data/program.js +32 -27
- package/dist/api/data/result.d.ts +2 -2
- package/dist/api/data/result.js +13 -16
- package/dist/api/data/transaction.d.ts +3 -3
- package/dist/api/data/transaction.js +52 -27
- package/dist/api/data/user/address.js +5 -9
- package/dist/api/data/user/auth.js +5 -17
- package/dist/api/data/user/bankAccount.js +5 -11
- package/dist/api/data/user/confirmUserSecurity.d.ts +2 -2
- package/dist/api/data/user/confirmUserSecurity.js +17 -12
- package/dist/api/data/user/device.js +7 -14
- package/dist/api/data/user/document.d.ts +2 -2
- package/dist/api/data/user/document.js +17 -8
- package/dist/api/data/user/email.js +6 -10
- package/dist/api/data/user/forgetSecurityData.d.ts +2 -2
- package/dist/api/data/user/forgetSecurityData.js +18 -10
- package/dist/api/data/user/identification.js +4 -7
- 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.js +2 -3
- package/dist/api/data/user/phone.js +5 -9
- package/dist/api/data/user/preferences.js +2 -3
- package/dist/api/data/user/resetUserSecurity.d.ts +2 -2
- package/dist/api/data/user/resetUserSecurity.js +16 -11
- package/dist/api/data/user/ticket.js +2 -3
- package/dist/api/data/user/type.js +2 -3
- package/dist/api/data/user/user.d.ts +2 -1
- package/dist/api/data/user/user.js +32 -46
- package/dist/api/data/user/userDefaults.d.ts +3 -0
- package/dist/api/data/user/userDefaults.js +48 -0
- package/dist/api/data/user/validateLimitedSecurity.d.ts +2 -2
- package/dist/api/data/user/validateLimitedSecurity.js +16 -10
- package/dist/api/data/user/validateSecurityData.d.ts +2 -2
- package/dist/api/data/user/validateSecurityData.js +16 -11
- package/dist/api/data/user/verifyUserSecurity.d.ts +2 -2
- package/dist/api/data/user/verifyUserSecurity.js +16 -11
- package/dist/helper/deviceHelper.js +6 -4
- package/dist/helper/userHelper.d.ts +0 -1
- package/dist/helper/userHelper.js +17 -66
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/api/data/user/index.d.ts +4 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
2
|
-
import {
|
|
2
|
+
import { CreateDefaultAccountData, FillResultByError } from "../data";
|
|
3
3
|
import { AccountService } from "../services";
|
|
4
4
|
import { BaseClient } from "./base";
|
|
5
5
|
class AccountClient extends BaseClient {
|
|
@@ -18,7 +18,7 @@ class AccountClient extends BaseClient {
|
|
|
18
18
|
}
|
|
19
19
|
catch (error) {
|
|
20
20
|
const result = FillResultByError(error);
|
|
21
|
-
const accountData =
|
|
21
|
+
const accountData = CreateDefaultAccountData({ result });
|
|
22
22
|
return this.responseHelper.GetErrorResponse(accountData, "Get");
|
|
23
23
|
}
|
|
24
24
|
};
|
|
@@ -29,7 +29,7 @@ class AccountClient extends BaseClient {
|
|
|
29
29
|
}
|
|
30
30
|
catch (error) {
|
|
31
31
|
const result = FillResultByError(error);
|
|
32
|
-
const accountData =
|
|
32
|
+
const accountData = CreateDefaultAccountData({ result });
|
|
33
33
|
return this.responseHelper.GetErrorResponse(accountData, "GetLimits");
|
|
34
34
|
}
|
|
35
35
|
};
|
package/dist/api/clients/auth.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
2
|
-
import { FillGenerateLimitedTokenData, FillLoginDeviceCredentialsData, FillLoginGoogleCredentialsData, FillLoginUserCredentialsData, FillResult, FillResultByError,
|
|
2
|
+
import { FillGenerateLimitedTokenData, FillLoginDeviceCredentialsData, FillLoginGoogleCredentialsData, FillLoginUserCredentialsData, FillResult, FillResultByError, CreateDefaultTokenData, } from "../data";
|
|
3
3
|
import { AuthService } from "../services";
|
|
4
4
|
import { BaseClient } from "./base";
|
|
5
5
|
class AuthClient extends BaseClient {
|
|
@@ -22,7 +22,7 @@ class AuthClient extends BaseClient {
|
|
|
22
22
|
}
|
|
23
23
|
catch (error) {
|
|
24
24
|
const result = FillResultByError(error);
|
|
25
|
-
const tokenData =
|
|
25
|
+
const tokenData = CreateDefaultTokenData({ result });
|
|
26
26
|
return this.responseHelper.GetErrorResponse(tokenData, "LoginUserCredentials");
|
|
27
27
|
}
|
|
28
28
|
};
|
|
@@ -35,7 +35,7 @@ class AuthClient extends BaseClient {
|
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
37
|
const result = FillResultByError(error);
|
|
38
|
-
const tokenData =
|
|
38
|
+
const tokenData = CreateDefaultTokenData({ result });
|
|
39
39
|
return this.responseHelper.GetErrorResponse(tokenData, "LoginDeviceCredentials");
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -48,7 +48,7 @@ class AuthClient extends BaseClient {
|
|
|
48
48
|
}
|
|
49
49
|
catch (error) {
|
|
50
50
|
const result = FillResultByError(error);
|
|
51
|
-
const tokenData =
|
|
51
|
+
const tokenData = CreateDefaultTokenData({ result });
|
|
52
52
|
return this.responseHelper.GetErrorResponse(tokenData, "LoginGoogleCredentials");
|
|
53
53
|
}
|
|
54
54
|
};
|
|
@@ -61,7 +61,7 @@ class AuthClient extends BaseClient {
|
|
|
61
61
|
}
|
|
62
62
|
catch (error) {
|
|
63
63
|
const result = FillResultByError(error);
|
|
64
|
-
const tokenData =
|
|
64
|
+
const tokenData = CreateDefaultTokenData({ result });
|
|
65
65
|
return this.responseHelper.GetErrorResponse(tokenData, "GenerateLimitedToken");
|
|
66
66
|
}
|
|
67
67
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
2
|
-
import {
|
|
2
|
+
import { CreateDefaultBlockchainData, FillBlockchainDelegateData, FillBlockchainMultiSendData, FillBlockchainSendData, FillBlockchainUndelegateData, FillResultByError, } from "../data";
|
|
3
3
|
import { BlockchainService } from "../services";
|
|
4
4
|
import { BaseClient } from "./base";
|
|
5
5
|
class BlockchainClient extends BaseClient {
|
|
@@ -19,7 +19,7 @@ class BlockchainClient extends BaseClient {
|
|
|
19
19
|
}
|
|
20
20
|
catch (error) {
|
|
21
21
|
const result = FillResultByError(error);
|
|
22
|
-
const blockchainData =
|
|
22
|
+
const blockchainData = CreateDefaultBlockchainData({ result });
|
|
23
23
|
return this.responseHelper.GetErrorResponse(blockchainData, "Send");
|
|
24
24
|
}
|
|
25
25
|
};
|
|
@@ -31,7 +31,7 @@ class BlockchainClient extends BaseClient {
|
|
|
31
31
|
}
|
|
32
32
|
catch (error) {
|
|
33
33
|
const result = FillResultByError(error);
|
|
34
|
-
const blockchainData =
|
|
34
|
+
const blockchainData = CreateDefaultBlockchainData({ result });
|
|
35
35
|
return this.responseHelper.GetErrorResponse(blockchainData, "MultiSend");
|
|
36
36
|
}
|
|
37
37
|
};
|
|
@@ -43,7 +43,7 @@ class BlockchainClient extends BaseClient {
|
|
|
43
43
|
}
|
|
44
44
|
catch (error) {
|
|
45
45
|
const result = FillResultByError(error);
|
|
46
|
-
const blockchainData =
|
|
46
|
+
const blockchainData = CreateDefaultBlockchainData({ result });
|
|
47
47
|
return this.responseHelper.GetErrorResponse(blockchainData, "Delegate");
|
|
48
48
|
}
|
|
49
49
|
};
|
|
@@ -55,7 +55,7 @@ class BlockchainClient extends BaseClient {
|
|
|
55
55
|
}
|
|
56
56
|
catch (error) {
|
|
57
57
|
const result = FillResultByError(error);
|
|
58
|
-
const blockchainData =
|
|
58
|
+
const blockchainData = CreateDefaultBlockchainData({ result });
|
|
59
59
|
return this.responseHelper.GetErrorResponse(blockchainData, "Undelegate");
|
|
60
60
|
}
|
|
61
61
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
2
|
-
import { FillCheckForgetPasswordData, FillConfirmEmailData, FillConfirmForgetPasswordData, FillConfirmPhoneData,
|
|
2
|
+
import { FillCheckForgetPasswordData, FillConfirmEmailData, FillConfirmForgetPasswordData, FillConfirmPhoneData, CreateDefaultConfirmUserSecurity, CreateDefaultForgetSecurityData, FillResultByError, FillValidateEmailData, FillValidateForgetPasswordData, CreateDefaultValidateLimitedSecurity, FillValidatePhoneData, FillVerifyEmailData, FillVerifyPhoneData, CreateDefaultVerifyUserSecurity, } from "../data";
|
|
3
3
|
import { LimitedService } from "../services";
|
|
4
4
|
import { BaseClient } from "./base";
|
|
5
5
|
class LimitedClient extends BaseClient {
|
|
@@ -23,7 +23,7 @@ class LimitedClient extends BaseClient {
|
|
|
23
23
|
}
|
|
24
24
|
catch (error) {
|
|
25
25
|
const result = FillResultByError(error);
|
|
26
|
-
const forgetSecurityData =
|
|
26
|
+
const forgetSecurityData = CreateDefaultForgetSecurityData({ result });
|
|
27
27
|
return this.responseHelper.GetErrorResponse(forgetSecurityData, "CheckForgetPassword");
|
|
28
28
|
}
|
|
29
29
|
};
|
|
@@ -35,7 +35,7 @@ class LimitedClient extends BaseClient {
|
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
37
|
const result = FillResultByError(error);
|
|
38
|
-
const forgetSecurityData =
|
|
38
|
+
const forgetSecurityData = CreateDefaultForgetSecurityData({ result });
|
|
39
39
|
return this.responseHelper.GetErrorResponse(forgetSecurityData, "ValidateForgetPassword");
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -47,7 +47,7 @@ class LimitedClient extends BaseClient {
|
|
|
47
47
|
}
|
|
48
48
|
catch (error) {
|
|
49
49
|
const result = FillResultByError(error);
|
|
50
|
-
const forgetSecurityData =
|
|
50
|
+
const forgetSecurityData = CreateDefaultForgetSecurityData({ result });
|
|
51
51
|
return this.responseHelper.GetErrorResponse(forgetSecurityData, "ConfirmForgetPassword");
|
|
52
52
|
}
|
|
53
53
|
};
|
|
@@ -59,7 +59,7 @@ class LimitedClient extends BaseClient {
|
|
|
59
59
|
}
|
|
60
60
|
catch (error) {
|
|
61
61
|
const result = FillResultByError(error);
|
|
62
|
-
const forgetSecurityData =
|
|
62
|
+
const forgetSecurityData = CreateDefaultValidateLimitedSecurity({ result });
|
|
63
63
|
return this.responseHelper.GetErrorResponse(forgetSecurityData, "ConfirmForgetPassword");
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -71,7 +71,7 @@ class LimitedClient extends BaseClient {
|
|
|
71
71
|
}
|
|
72
72
|
catch (error) {
|
|
73
73
|
const result = FillResultByError(error);
|
|
74
|
-
const forgetSecurityData =
|
|
74
|
+
const forgetSecurityData = CreateDefaultValidateLimitedSecurity({ result });
|
|
75
75
|
return this.responseHelper.GetErrorResponse(forgetSecurityData, "ValidatePhone");
|
|
76
76
|
}
|
|
77
77
|
};
|
|
@@ -83,7 +83,7 @@ class LimitedClient extends BaseClient {
|
|
|
83
83
|
}
|
|
84
84
|
catch (error) {
|
|
85
85
|
const result = FillResultByError(error);
|
|
86
|
-
const verifySecurityData =
|
|
86
|
+
const verifySecurityData = CreateDefaultVerifyUserSecurity({ result });
|
|
87
87
|
return this.responseHelper.GetErrorResponse(verifySecurityData, "VerifyEmail");
|
|
88
88
|
}
|
|
89
89
|
};
|
|
@@ -95,7 +95,7 @@ class LimitedClient extends BaseClient {
|
|
|
95
95
|
}
|
|
96
96
|
catch (error) {
|
|
97
97
|
const result = FillResultByError(error);
|
|
98
|
-
const verifySecurityData =
|
|
98
|
+
const verifySecurityData = CreateDefaultVerifyUserSecurity({ result });
|
|
99
99
|
return this.responseHelper.GetErrorResponse(verifySecurityData, "VerifyPhone");
|
|
100
100
|
}
|
|
101
101
|
};
|
|
@@ -107,7 +107,7 @@ class LimitedClient extends BaseClient {
|
|
|
107
107
|
}
|
|
108
108
|
catch (error) {
|
|
109
109
|
const result = FillResultByError(error);
|
|
110
|
-
const confirmUserSecurity =
|
|
110
|
+
const confirmUserSecurity = CreateDefaultConfirmUserSecurity({ result });
|
|
111
111
|
return this.responseHelper.GetErrorResponse(confirmUserSecurity, "ConfirmEmail");
|
|
112
112
|
}
|
|
113
113
|
};
|
|
@@ -119,7 +119,7 @@ class LimitedClient extends BaseClient {
|
|
|
119
119
|
}
|
|
120
120
|
catch (error) {
|
|
121
121
|
const result = FillResultByError(error);
|
|
122
|
-
const confirmUserSecurity =
|
|
122
|
+
const confirmUserSecurity = CreateDefaultConfirmUserSecurity({ result });
|
|
123
123
|
return this.responseHelper.GetErrorResponse(confirmUserSecurity, "ConfirmPhone");
|
|
124
124
|
}
|
|
125
125
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
2
|
-
import { FillCreateOrderData,
|
|
2
|
+
import { FillCreateOrderData, CreateDefaultOrderData, FillResultByError } from "../data";
|
|
3
3
|
import { OrderService } from "../services";
|
|
4
4
|
import { BaseClient } from "./base";
|
|
5
5
|
class OrderClient extends BaseClient {
|
|
@@ -19,7 +19,7 @@ class OrderClient extends BaseClient {
|
|
|
19
19
|
}
|
|
20
20
|
catch (error) {
|
|
21
21
|
const result = FillResultByError(error);
|
|
22
|
-
const orderData =
|
|
22
|
+
const orderData = CreateDefaultOrderData({ result });
|
|
23
23
|
return this.responseHelper.GetErrorResponse(orderData, "CreateOrder");
|
|
24
24
|
}
|
|
25
25
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
2
|
-
import { FillCreateOrganizationData, FillCreateOrganizationDocumentData,
|
|
2
|
+
import { FillCreateOrganizationData, FillCreateOrganizationDocumentData, CreateDefaultOrganizationData, FillUpdateOrganizationData, } from "../data/organization";
|
|
3
3
|
import { OrganizationService } from "../services";
|
|
4
|
-
import {
|
|
4
|
+
import { CreateDefaultDocumentData, FillResultByError } from "../data";
|
|
5
5
|
import { BaseClient } from "./base";
|
|
6
6
|
class OrganizationClient extends BaseClient {
|
|
7
7
|
organizationService;
|
|
@@ -21,7 +21,7 @@ class OrganizationClient extends BaseClient {
|
|
|
21
21
|
}
|
|
22
22
|
catch (error) {
|
|
23
23
|
const result = FillResultByError(error);
|
|
24
|
-
const organization =
|
|
24
|
+
const organization = CreateDefaultOrganizationData({ result });
|
|
25
25
|
return this.responseHelper.GetErrorResponse(organization, "GetOrganization");
|
|
26
26
|
}
|
|
27
27
|
};
|
|
@@ -35,7 +35,7 @@ class OrganizationClient extends BaseClient {
|
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
37
|
const result = FillResultByError(error);
|
|
38
|
-
const organization =
|
|
38
|
+
const organization = CreateDefaultOrganizationData({ result });
|
|
39
39
|
return this.responseHelper.GetErrorResponse(organization, "CreateOrganization");
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -47,7 +47,7 @@ class OrganizationClient extends BaseClient {
|
|
|
47
47
|
}
|
|
48
48
|
catch (error) {
|
|
49
49
|
const result = FillResultByError(error);
|
|
50
|
-
const documentData =
|
|
50
|
+
const documentData = CreateDefaultDocumentData({ result });
|
|
51
51
|
return this.responseHelper.GetErrorResponse(documentData, "CreateOrganizationDocument");
|
|
52
52
|
}
|
|
53
53
|
};
|
|
@@ -61,7 +61,7 @@ class OrganizationClient extends BaseClient {
|
|
|
61
61
|
}
|
|
62
62
|
catch (error) {
|
|
63
63
|
const result = FillResultByError(error);
|
|
64
|
-
const organization =
|
|
64
|
+
const organization = CreateDefaultOrganizationData({ result });
|
|
65
65
|
return this.responseHelper.GetErrorResponse(organization, "UpdateOrganization");
|
|
66
66
|
}
|
|
67
67
|
};
|
|
@@ -74,7 +74,7 @@ class OrganizationClient extends BaseClient {
|
|
|
74
74
|
}
|
|
75
75
|
catch (error) {
|
|
76
76
|
const result = FillResultByError(error);
|
|
77
|
-
const organization =
|
|
77
|
+
const organization = CreateDefaultOrganizationData({ result });
|
|
78
78
|
return this.responseHelper.GetErrorResponse(organization, "DeleteOrganization");
|
|
79
79
|
}
|
|
80
80
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
2
2
|
import { FillResultByError } from "../data";
|
|
3
|
-
import {
|
|
3
|
+
import { CreateDefaultProgramData } from "../data/program";
|
|
4
4
|
import { ProgramService } from "../services";
|
|
5
5
|
import { BaseClient } from "./base";
|
|
6
6
|
class ProgramClient extends BaseClient {
|
|
@@ -25,7 +25,7 @@ class ProgramClient extends BaseClient {
|
|
|
25
25
|
}
|
|
26
26
|
catch (error) {
|
|
27
27
|
const result = FillResultByError(error);
|
|
28
|
-
const program =
|
|
28
|
+
const program = CreateDefaultProgramData({ result });
|
|
29
29
|
return this.responseHelper.GetErrorResponse(program, "GetSystemFeatures");
|
|
30
30
|
}
|
|
31
31
|
};
|
|
@@ -36,7 +36,7 @@ class ProgramClient extends BaseClient {
|
|
|
36
36
|
}
|
|
37
37
|
catch (error) {
|
|
38
38
|
const result = FillResultByError(error);
|
|
39
|
-
const program =
|
|
39
|
+
const program = CreateDefaultProgramData({ result });
|
|
40
40
|
return this.responseHelper.GetErrorResponse(program, "GetBIN");
|
|
41
41
|
}
|
|
42
42
|
};
|
|
@@ -47,7 +47,7 @@ class ProgramClient extends BaseClient {
|
|
|
47
47
|
}
|
|
48
48
|
catch (error) {
|
|
49
49
|
const result = FillResultByError(error);
|
|
50
|
-
const program =
|
|
50
|
+
const program = CreateDefaultProgramData({ result });
|
|
51
51
|
return this.responseHelper.GetErrorResponse(program, "GetSignUp");
|
|
52
52
|
}
|
|
53
53
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { BaseResult, ErrorHandler, GGEZGiftRewards, PromotionClientData, RequestOptions } from "../../types";
|
|
1
|
+
import type { BaseResult, ErrorHandler, GGEZGiftRewards, PromotionClientData, PromotionDetails, RequestOptions } from "../../types";
|
|
2
2
|
import { BaseClient } from "./base";
|
|
3
3
|
declare class PromotionClient extends BaseClient {
|
|
4
4
|
private promotionService;
|
|
5
5
|
constructor(clientData: PromotionClientData, errorHandler: ErrorHandler);
|
|
6
6
|
GetPromotionByCode: (code: string, options?: RequestOptions) => Promise<{
|
|
7
|
-
data:
|
|
7
|
+
data: PromotionDetails;
|
|
8
8
|
success: boolean;
|
|
9
9
|
message: string;
|
|
10
10
|
error: any;
|
|
@@ -26,7 +26,9 @@ declare class PromotionClient extends BaseClient {
|
|
|
26
26
|
error: string;
|
|
27
27
|
}>;
|
|
28
28
|
IncrementPromotionParticipants: (data: GGEZGiftRewards, options?: RequestOptions) => Promise<{
|
|
29
|
-
data:
|
|
29
|
+
data: {
|
|
30
|
+
message: string;
|
|
31
|
+
};
|
|
30
32
|
success: boolean;
|
|
31
33
|
message: string;
|
|
32
34
|
error: any;
|
|
@@ -13,10 +13,16 @@ class PromotionClient extends BaseClient {
|
|
|
13
13
|
GetPromotionByCode = async (code, options) => {
|
|
14
14
|
try {
|
|
15
15
|
const response = await this.promotionService.getPromotionByCode(code, options);
|
|
16
|
-
return
|
|
16
|
+
return { data: response.data, success: true, message: "", error: null };
|
|
17
17
|
}
|
|
18
18
|
catch (error) {
|
|
19
|
-
|
|
19
|
+
this.errorHandler(error);
|
|
20
|
+
return {
|
|
21
|
+
data: null,
|
|
22
|
+
success: false,
|
|
23
|
+
message: String(error),
|
|
24
|
+
error: String(error),
|
|
25
|
+
};
|
|
20
26
|
}
|
|
21
27
|
};
|
|
22
28
|
GetTwitterSpotlightPostIds = async (options) => {
|
|
@@ -33,10 +39,16 @@ class PromotionClient extends BaseClient {
|
|
|
33
39
|
IncrementPromotionParticipants = async (data, options) => {
|
|
34
40
|
try {
|
|
35
41
|
const response = await this.promotionService.incrementPromotionParticipants(data, options);
|
|
36
|
-
return
|
|
42
|
+
return { data: response.data, success: true, message: "", error: null };
|
|
37
43
|
}
|
|
38
44
|
catch (error) {
|
|
39
|
-
|
|
45
|
+
this.errorHandler(error);
|
|
46
|
+
return {
|
|
47
|
+
data: null,
|
|
48
|
+
success: false,
|
|
49
|
+
message: String(error),
|
|
50
|
+
error: String(error),
|
|
51
|
+
};
|
|
40
52
|
}
|
|
41
53
|
};
|
|
42
54
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
2
|
-
import { FillCreateBlockchainTransactionData, FillCreateGatewayCryptoTransactionData, FillCreateSystemTransactionData, FillResultByError,
|
|
2
|
+
import { FillCreateBlockchainTransactionData, FillCreateGatewayCryptoTransactionData, FillCreateSystemTransactionData, FillResultByError, CreateDefaultTransactionData, CreateDefaultTransactionInquiryResultData, FillTransactionInquiryData, } from "../data";
|
|
3
3
|
import { TransactionService } from "../services";
|
|
4
4
|
import { BaseClient } from "./base";
|
|
5
5
|
class TransactionClient extends BaseClient {
|
|
@@ -19,7 +19,7 @@ class TransactionClient extends BaseClient {
|
|
|
19
19
|
}
|
|
20
20
|
catch (error) {
|
|
21
21
|
const result = FillResultByError(error);
|
|
22
|
-
const transactionInquiryResult =
|
|
22
|
+
const transactionInquiryResult = CreateDefaultTransactionInquiryResultData({ result });
|
|
23
23
|
return this.responseHelper.GetErrorResponse(transactionInquiryResult, "InquiryTransaction");
|
|
24
24
|
}
|
|
25
25
|
};
|
|
@@ -33,7 +33,7 @@ class TransactionClient extends BaseClient {
|
|
|
33
33
|
}
|
|
34
34
|
catch (error) {
|
|
35
35
|
const result = FillResultByError(error);
|
|
36
|
-
const transactionData =
|
|
36
|
+
const transactionData = CreateDefaultTransactionData({ result });
|
|
37
37
|
return this.responseHelper.GetErrorResponse(transactionData, "CreateSystemTransaction");
|
|
38
38
|
}
|
|
39
39
|
};
|
|
@@ -45,7 +45,7 @@ class TransactionClient extends BaseClient {
|
|
|
45
45
|
}
|
|
46
46
|
catch (error) {
|
|
47
47
|
const result = FillResultByError(error);
|
|
48
|
-
const transactionData =
|
|
48
|
+
const transactionData = CreateDefaultTransactionData({ result });
|
|
49
49
|
return this.responseHelper.GetErrorResponse(transactionData, "CreateBlockchainTransaction");
|
|
50
50
|
}
|
|
51
51
|
};
|
|
@@ -57,7 +57,7 @@ class TransactionClient extends BaseClient {
|
|
|
57
57
|
}
|
|
58
58
|
catch (error) {
|
|
59
59
|
const result = FillResultByError(error);
|
|
60
|
-
const transactionData =
|
|
60
|
+
const transactionData = CreateDefaultTransactionData({ result });
|
|
61
61
|
return this.responseHelper.GetErrorResponse(transactionData, "CreateGatewayCryptoTransaction");
|
|
62
62
|
}
|
|
63
63
|
};
|