ggez-banking-sdk 0.3.24 → 0.3.26

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 (125) hide show
  1. package/dist/api/api.d.ts +29 -0
  2. package/dist/api/api.js +95 -0
  3. package/dist/api/clients/account.d.ts +2 -2
  4. package/dist/api/clients/account.js +12 -12
  5. package/dist/api/clients/auth.d.ts +4 -4
  6. package/dist/api/clients/auth.js +30 -30
  7. package/dist/api/clients/blockchain.d.ts +4 -4
  8. package/dist/api/clients/blockchain.js +26 -26
  9. package/dist/api/clients/ipAddressAndLocation.d.ts +3 -3
  10. package/dist/api/clients/ipAddressAndLocation.js +7 -7
  11. package/dist/api/clients/limited.d.ts +9 -9
  12. package/dist/api/clients/limited.js +60 -56
  13. package/dist/api/clients/order.d.ts +1 -1
  14. package/dist/api/clients/order.js +8 -8
  15. package/dist/api/clients/organization.d.ts +5 -5
  16. package/dist/api/clients/organization.js +31 -31
  17. package/dist/api/clients/program.d.ts +3 -3
  18. package/dist/api/clients/program.js +18 -18
  19. package/dist/api/clients/promotion.d.ts +3 -3
  20. package/dist/api/clients/promotion.js +6 -6
  21. package/dist/api/clients/transaction.d.ts +4 -4
  22. package/dist/api/clients/transaction.js +26 -26
  23. package/dist/api/clients/user.d.ts +76 -76
  24. package/dist/api/clients/user.js +434 -432
  25. package/dist/api/data/account.d.ts +2 -2
  26. package/dist/api/data/account.js +2 -2
  27. package/dist/api/data/auth.d.ts +6 -6
  28. package/dist/api/data/auth.js +9 -9
  29. package/dist/api/data/blockchain.d.ts +6 -6
  30. package/dist/api/data/blockchain.js +6 -6
  31. package/dist/api/data/limited.d.ts +4 -4
  32. package/dist/api/data/limited.js +4 -4
  33. package/dist/api/data/order.d.ts +3 -3
  34. package/dist/api/data/order.js +3 -3
  35. package/dist/api/data/organization.d.ts +5 -5
  36. package/dist/api/data/organization.js +9 -9
  37. package/dist/api/data/program.d.ts +2 -2
  38. package/dist/api/data/program.js +2 -2
  39. package/dist/api/data/result.d.ts +5 -5
  40. package/dist/api/data/result.js +6 -6
  41. package/dist/api/data/transaction.d.ts +7 -7
  42. package/dist/api/data/transaction.js +9 -9
  43. package/dist/api/data/user/address.d.ts +5 -5
  44. package/dist/api/data/user/address.js +10 -10
  45. package/dist/api/data/user/auth.d.ts +5 -5
  46. package/dist/api/data/user/auth.js +10 -10
  47. package/dist/api/data/user/bankAccount.d.ts +5 -5
  48. package/dist/api/data/user/bankAccount.js +10 -10
  49. package/dist/api/data/user/confirmUserSecurity.d.ts +2 -2
  50. package/dist/api/data/user/confirmUserSecurity.js +2 -2
  51. package/dist/api/data/user/device.d.ts +7 -7
  52. package/dist/api/data/user/device.js +12 -12
  53. package/dist/api/data/user/document.d.ts +4 -4
  54. package/dist/api/data/user/document.js +4 -4
  55. package/dist/api/data/user/email.d.ts +9 -9
  56. package/dist/api/data/user/email.js +14 -14
  57. package/dist/api/data/user/forgetSecurityData.d.ts +2 -2
  58. package/dist/api/data/user/forgetSecurityData.js +2 -2
  59. package/dist/api/data/user/identification.d.ts +4 -4
  60. package/dist/api/data/user/identification.js +8 -8
  61. package/dist/api/data/user/personalInfo.d.ts +2 -2
  62. package/dist/api/data/user/personalInfo.js +4 -4
  63. package/dist/api/data/user/phone.d.ts +9 -9
  64. package/dist/api/data/user/phone.js +14 -14
  65. package/dist/api/data/user/preferences.d.ts +2 -2
  66. package/dist/api/data/user/preferences.js +4 -4
  67. package/dist/api/data/user/resetUserSecurity.d.ts +2 -2
  68. package/dist/api/data/user/resetUserSecurity.js +2 -2
  69. package/dist/api/data/user/security.d.ts +5 -5
  70. package/dist/api/data/user/security.js +5 -5
  71. package/dist/api/data/user/ticket.d.ts +2 -2
  72. package/dist/api/data/user/ticket.js +4 -4
  73. package/dist/api/data/user/type.d.ts +2 -2
  74. package/dist/api/data/user/type.js +4 -4
  75. package/dist/api/data/user/user.d.ts +4 -4
  76. package/dist/api/data/user/user.js +8 -8
  77. package/dist/api/data/user/userDefaults.d.ts +2 -2
  78. package/dist/api/data/user/userDefaults.js +2 -2
  79. package/dist/api/data/user/validateLimitedSecurity.d.ts +2 -2
  80. package/dist/api/data/user/validateLimitedSecurity.js +2 -2
  81. package/dist/api/data/user/validateSecurityData.d.ts +2 -2
  82. package/dist/api/data/user/validateSecurityData.js +2 -2
  83. package/dist/api/data/user/verifyUserSecurity.d.ts +2 -2
  84. package/dist/api/data/user/verifyUserSecurity.js +2 -2
  85. package/dist/api/index.d.ts +1 -0
  86. package/dist/api/index.js +1 -0
  87. package/dist/api/services/account.js +2 -2
  88. package/dist/api/services/base.js +3 -3
  89. package/dist/api/services/limited.js +1 -1
  90. package/dist/api/services/order.js +2 -2
  91. package/dist/api/services/organization.d.ts +0 -1
  92. package/dist/api/services/organization.js +2 -3
  93. package/dist/api/services/transaction.js +2 -2
  94. package/dist/api/services/user.d.ts +0 -1
  95. package/dist/api/services/user.js +2 -3
  96. package/dist/helper/api/axiosHelper.d.ts +7 -7
  97. package/dist/helper/api/axiosHelper.js +12 -12
  98. package/dist/helper/api/responseHelper.d.ts +2 -2
  99. package/dist/helper/api/responseHelper.js +3 -3
  100. package/dist/helper/api/resultHelper.d.ts +2 -2
  101. package/dist/helper/api/resultHelper.js +2 -2
  102. package/dist/helper/cipherHelper.d.ts +11 -11
  103. package/dist/helper/cipherHelper.js +17 -17
  104. package/dist/helper/dateTimeHelper.d.ts +4 -4
  105. package/dist/helper/dateTimeHelper.js +4 -4
  106. package/dist/helper/deviceHelper.d.ts +2 -2
  107. package/dist/helper/deviceHelper.js +6 -6
  108. package/dist/helper/geoHelper.d.ts +3 -3
  109. package/dist/helper/geoHelper.js +3 -3
  110. package/dist/helper/storage/cookiesHelper.d.ts +21 -21
  111. package/dist/helper/storage/cookiesHelper.js +94 -94
  112. package/dist/helper/storage/localStorageHelper.d.ts +6 -6
  113. package/dist/helper/storage/localStorageHelper.js +14 -14
  114. package/dist/helper/storage/storageHelper.d.ts +2 -2
  115. package/dist/helper/storage/storageHelper.js +2 -2
  116. package/dist/helper/userHelper.d.ts +13 -13
  117. package/dist/helper/userHelper.js +35 -35
  118. package/dist/tsconfig.tsbuildinfo +1 -1
  119. package/dist/types/api/client/clientData.d.ts +12 -0
  120. package/dist/types/api/client/index.d.ts +1 -0
  121. package/dist/types/banking/program/bin/index.d.ts +1 -1
  122. package/dist/types/banking/program/bin/supportedCountriesExtended.js +1 -0
  123. package/package.json +2 -2
  124. /package/dist/types/{banking/program/bin/SupportedCountriesExtended.js → api/client/clientData.js} +0 -0
  125. /package/dist/types/banking/program/bin/{SupportedCountriesExtended.d.ts → supportedCountriesExtended.d.ts} +0 -0
@@ -0,0 +1,29 @@
1
+ import { AccountClient, AuthClient, BlockchainClient, ClientData, ErrorHandler, IPAddressAndLocationClient, LimitedClient, OrderClient, OrganizationClient, ProgramClient, PromotionClient, TransactionClient, UserClient } from "..";
2
+ declare class API {
3
+ private _account;
4
+ private _auth;
5
+ private _blockchain;
6
+ private _ipAddress;
7
+ private _limited;
8
+ private _order;
9
+ private _organization;
10
+ private _program;
11
+ private _promotion;
12
+ private _transaction;
13
+ private _user;
14
+ private errorHandler;
15
+ private clientData;
16
+ constructor(clientData: ClientData, errorHandler: ErrorHandler);
17
+ get account(): AccountClient;
18
+ get auth(): AuthClient;
19
+ get blockchain(): BlockchainClient;
20
+ get ipAddress(): IPAddressAndLocationClient;
21
+ get limited(): LimitedClient;
22
+ get order(): OrderClient;
23
+ get organization(): OrganizationClient;
24
+ get program(): ProgramClient;
25
+ get promotion(): PromotionClient;
26
+ get transaction(): TransactionClient;
27
+ get user(): UserClient;
28
+ }
29
+ export { API };
@@ -0,0 +1,95 @@
1
+ import { AccountClient, AuthClient, BlockchainClient, IPAddressAndLocationClient, LimitedClient, OrderClient, OrganizationClient, ProgramClient, PromotionClient, TransactionClient, UserClient, } from "..";
2
+ class API {
3
+ // #region "Properties"
4
+ _account = null;
5
+ _auth = null;
6
+ _blockchain = null;
7
+ _ipAddress = null;
8
+ _limited = null;
9
+ _order = null;
10
+ _organization = null;
11
+ _program = null;
12
+ _promotion = null;
13
+ _transaction = null;
14
+ _user = null;
15
+ errorHandler;
16
+ clientData;
17
+ // #endregion
18
+ // #region "Constructor"
19
+ constructor(clientData, errorHandler) {
20
+ this.errorHandler = errorHandler;
21
+ this.clientData = clientData;
22
+ }
23
+ // #endregion
24
+ // #region "Clients"
25
+ get account() {
26
+ if (!this._account) {
27
+ this._account = new AccountClient(this.clientData, this.errorHandler);
28
+ }
29
+ return this._account;
30
+ }
31
+ get auth() {
32
+ if (!this._auth) {
33
+ this._auth = new AuthClient(this.clientData, this.errorHandler);
34
+ }
35
+ return this._auth;
36
+ }
37
+ get blockchain() {
38
+ if (!this._blockchain) {
39
+ this._blockchain = new BlockchainClient(this.clientData, this.errorHandler);
40
+ }
41
+ return this._blockchain;
42
+ }
43
+ get ipAddress() {
44
+ if (!this._ipAddress) {
45
+ this._ipAddress = new IPAddressAndLocationClient(this.clientData, this.errorHandler);
46
+ }
47
+ return this._ipAddress;
48
+ }
49
+ get limited() {
50
+ if (!this._limited) {
51
+ this._limited = new LimitedClient(this.clientData, this.errorHandler);
52
+ }
53
+ return this._limited;
54
+ }
55
+ get order() {
56
+ if (!this._order) {
57
+ this._order = new OrderClient(this.clientData, this.errorHandler);
58
+ }
59
+ return this._order;
60
+ }
61
+ get organization() {
62
+ if (!this._organization) {
63
+ this._organization = new OrganizationClient(this.clientData, this.errorHandler);
64
+ }
65
+ return this._organization;
66
+ }
67
+ get program() {
68
+ if (!this._program) {
69
+ this._program = new ProgramClient(this.clientData, this.errorHandler);
70
+ }
71
+ return this._program;
72
+ }
73
+ get promotion() {
74
+ if (!this._promotion) {
75
+ this._promotion = new PromotionClient(this.clientData, this.errorHandler);
76
+ }
77
+ return this._promotion;
78
+ }
79
+ get transaction() {
80
+ if (!this._transaction) {
81
+ this._transaction = new TransactionClient(this.clientData, this.errorHandler);
82
+ }
83
+ return this._transaction;
84
+ }
85
+ get user() {
86
+ if (!this._user) {
87
+ this._user = new UserClient(this.clientData, this.errorHandler);
88
+ }
89
+ return this._user;
90
+ }
91
+ }
92
+ const api = new API({}, (error) => {
93
+ console.error("API Error:", error);
94
+ });
95
+ export { API };
@@ -4,13 +4,13 @@ import { BaseClient } from "./base";
4
4
  declare class AccountClient extends BaseClient {
5
5
  private accountService;
6
6
  constructor(clientData: AccountClientData, errorHandler: ErrorHandler);
7
- Get: (accountId: number, options?: RequestOptions) => Promise<{
7
+ get: (accountId: number, options?: RequestOptions) => Promise<{
8
8
  data: import("../..").AccountData;
9
9
  success: boolean;
10
10
  message: string;
11
11
  error: any;
12
12
  }>;
13
- GetLimits: (accountId: number, options?: RequestOptions) => Promise<{
13
+ getLimits: (accountId: number, options?: RequestOptions) => Promise<{
14
14
  data: import("../..").AccountData;
15
15
  success: boolean;
16
16
  message: string;
@@ -1,5 +1,5 @@
1
1
  import { AxiosHelper } from "../../helper/api/axiosHelper";
2
- import { CreateDefaultAccountData, FillResultByError } from "../data";
2
+ import { createDefaultAccountData, fillResultByError } from "../data";
3
3
  import { AccountService } from "../services";
4
4
  import { BaseClient } from "./base";
5
5
  class AccountClient extends BaseClient {
@@ -7,30 +7,30 @@ class AccountClient extends BaseClient {
7
7
  constructor(clientData, errorHandler) {
8
8
  super(clientData, errorHandler);
9
9
  const { token, baseUrl, lang, installationId, userId } = this.clientData;
10
- const config = AxiosHelper.GetAxiosConfig(token, baseUrl, lang, installationId);
10
+ const config = AxiosHelper.getAxiosConfig(token, baseUrl, lang, installationId);
11
11
  this.accountService = new AccountService({ config, userId });
12
12
  }
13
13
  // #region "GET"
14
- Get = async (accountId, options) => {
14
+ get = async (accountId, options) => {
15
15
  try {
16
16
  const response = await this.accountService.get(accountId, options);
17
- return this.responseHelper.GetResponse(response.data);
17
+ return this.responseHelper.getResponse(response.data);
18
18
  }
19
19
  catch (error) {
20
- const result = FillResultByError(error);
21
- const accountData = CreateDefaultAccountData({ result });
22
- return this.responseHelper.GetErrorResponse(accountData, "Get");
20
+ const result = fillResultByError(error);
21
+ const accountData = createDefaultAccountData({ result });
22
+ return this.responseHelper.getErrorResponse(accountData, "get");
23
23
  }
24
24
  };
25
- GetLimits = async (accountId, options) => {
25
+ getLimits = async (accountId, options) => {
26
26
  try {
27
27
  const response = await this.accountService.getLimits(accountId, options);
28
- return this.responseHelper.GetResponse(response.data);
28
+ return this.responseHelper.getResponse(response.data);
29
29
  }
30
30
  catch (error) {
31
- const result = FillResultByError(error);
32
- const accountData = CreateDefaultAccountData({ result });
33
- return this.responseHelper.GetErrorResponse(accountData, "GetLimits");
31
+ const result = fillResultByError(error);
32
+ const accountData = createDefaultAccountData({ result });
33
+ return this.responseHelper.getErrorResponse(accountData, "getLimits");
34
34
  }
35
35
  };
36
36
  }
@@ -4,25 +4,25 @@ declare class AuthClient extends BaseClient {
4
4
  private programId;
5
5
  private authService;
6
6
  constructor(clientData: AuthClientData, errorHandler: ErrorHandler);
7
- LoginUserCredentials: (data: ILoginUserCredentialsData, options?: RequestOptions) => Promise<{
7
+ loginUserCredentials: (data: ILoginUserCredentialsData, options?: RequestOptions) => Promise<{
8
8
  data: import("../../types").TokenData;
9
9
  success: boolean;
10
10
  message: string;
11
11
  error: any;
12
12
  }>;
13
- LoginDeviceCredentials: (data: ILoginDeviceCredentialsData, options?: RequestOptions) => Promise<{
13
+ loginDeviceCredentials: (data: ILoginDeviceCredentialsData, options?: RequestOptions) => Promise<{
14
14
  data: import("../../types").TokenData;
15
15
  success: boolean;
16
16
  message: string;
17
17
  error: any;
18
18
  }>;
19
- LoginGoogleCredentials: (data: ILoginGoogleCredentialsData, options?: RequestOptions) => Promise<{
19
+ loginGoogleCredentials: (data: ILoginGoogleCredentialsData, options?: RequestOptions) => Promise<{
20
20
  data: import("../../types").TokenData;
21
21
  success: boolean;
22
22
  message: string;
23
23
  error: any;
24
24
  }>;
25
- GenerateLimitedToken: (data: IGenerateLimitedTokenData, options?: RequestOptions) => Promise<{
25
+ generateLimitedToken: (data: IGenerateLimitedTokenData, options?: RequestOptions) => Promise<{
26
26
  data: import("../../types").TokenData;
27
27
  success: boolean;
28
28
  message: string;
@@ -1,5 +1,5 @@
1
1
  import { AxiosHelper } from "../../helper/api/axiosHelper";
2
- import { FillGenerateLimitedTokenData, FillLoginDeviceCredentialsData, FillLoginGoogleCredentialsData, FillLoginUserCredentialsData, FillResult, FillResultByError, CreateDefaultTokenData, } from "../data";
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 {
@@ -8,61 +8,61 @@ class AuthClient extends BaseClient {
8
8
  constructor(clientData, errorHandler) {
9
9
  super(clientData, errorHandler);
10
10
  const { baseUrl, nodeUrl, lang, programId, userId } = this.clientData;
11
- const config = AxiosHelper.GetAuthAxiosConfig(baseUrl, lang, "");
11
+ const config = AxiosHelper.getAuthAxiosConfig(baseUrl, lang, "");
12
12
  this.authService = new AuthService({ config, nodeUrl, userId });
13
13
  this.programId = programId;
14
14
  }
15
15
  // #region "POST"
16
- LoginUserCredentials = async (data, options) => {
16
+ loginUserCredentials = async (data, options) => {
17
17
  try {
18
- const credentialsData = FillLoginUserCredentialsData(this.programId, data);
18
+ const credentialsData = fillLoginUserCredentialsData(this.programId, data);
19
19
  const response = await this.authService.login(credentialsData, options);
20
- response.data.result = FillResult(response.data);
21
- return this.responseHelper.GetResponse(response.data);
20
+ response.data.result = fillResult(response.data);
21
+ return this.responseHelper.getResponse(response.data);
22
22
  }
23
23
  catch (error) {
24
- const result = FillResultByError(error);
25
- const tokenData = CreateDefaultTokenData({ result });
26
- return this.responseHelper.GetErrorResponse(tokenData, "LoginUserCredentials");
24
+ const result = fillResultByError(error);
25
+ const tokenData = createDefaultTokenData({ result });
26
+ return this.responseHelper.getErrorResponse(tokenData, "loginUserCredentials");
27
27
  }
28
28
  };
29
- LoginDeviceCredentials = async (data, options) => {
29
+ loginDeviceCredentials = async (data, options) => {
30
30
  try {
31
- const credentialsData = FillLoginDeviceCredentialsData(this.programId, data);
31
+ const credentialsData = fillLoginDeviceCredentialsData(this.programId, data);
32
32
  const response = await this.authService.login(credentialsData, options);
33
- response.data.result = FillResult(response.data);
34
- return this.responseHelper.GetResponse(response.data);
33
+ response.data.result = fillResult(response.data);
34
+ return this.responseHelper.getResponse(response.data);
35
35
  }
36
36
  catch (error) {
37
- const result = FillResultByError(error);
38
- const tokenData = CreateDefaultTokenData({ result });
39
- return this.responseHelper.GetErrorResponse(tokenData, "LoginDeviceCredentials");
37
+ const result = fillResultByError(error);
38
+ const tokenData = createDefaultTokenData({ result });
39
+ return this.responseHelper.getErrorResponse(tokenData, "loginDeviceCredentials");
40
40
  }
41
41
  };
42
- LoginGoogleCredentials = async (data, options) => {
42
+ loginGoogleCredentials = async (data, options) => {
43
43
  try {
44
- const credentialsData = FillLoginGoogleCredentialsData(this.programId, data);
44
+ const credentialsData = fillLoginGoogleCredentialsData(this.programId, data);
45
45
  const response = await this.authService.login(credentialsData, options);
46
- response.data.result = FillResult(response.data);
47
- return this.responseHelper.GetResponse(response.data);
46
+ response.data.result = fillResult(response.data);
47
+ return this.responseHelper.getResponse(response.data);
48
48
  }
49
49
  catch (error) {
50
- const result = FillResultByError(error);
51
- const tokenData = CreateDefaultTokenData({ result });
52
- return this.responseHelper.GetErrorResponse(tokenData, "LoginGoogleCredentials");
50
+ const result = fillResultByError(error);
51
+ const tokenData = createDefaultTokenData({ result });
52
+ return this.responseHelper.getErrorResponse(tokenData, "loginGoogleCredentials");
53
53
  }
54
54
  };
55
- GenerateLimitedToken = async (data, options) => {
55
+ generateLimitedToken = async (data, options) => {
56
56
  try {
57
- const tokenData = FillGenerateLimitedTokenData(data);
57
+ const tokenData = fillGenerateLimitedTokenData(data);
58
58
  const response = await this.authService.generateLimitedToken(tokenData, options);
59
- response.data.result = FillResult(response.data);
60
- return this.responseHelper.GetResponse(response.data);
59
+ response.data.result = fillResult(response.data);
60
+ return this.responseHelper.getResponse(response.data);
61
61
  }
62
62
  catch (error) {
63
- const result = FillResultByError(error);
64
- const tokenData = CreateDefaultTokenData({ result });
65
- return this.responseHelper.GetErrorResponse(tokenData, "GenerateLimitedToken");
63
+ const result = fillResultByError(error);
64
+ const tokenData = createDefaultTokenData({ result });
65
+ return this.responseHelper.getErrorResponse(tokenData, "generateLimitedToken");
66
66
  }
67
67
  };
68
68
  }
@@ -3,25 +3,25 @@ import { BaseClient } from "./base";
3
3
  declare class BlockchainClient extends BaseClient {
4
4
  private blockchainService;
5
5
  constructor(clientData: BlockchainClientData, errorHandler: ErrorHandler);
6
- Send: (data: IBlockchainSendRequestData, options?: RequestOptions) => Promise<{
6
+ send: (data: IBlockchainSendRequestData, options?: RequestOptions) => Promise<{
7
7
  data: import("../../types").BlockchainData;
8
8
  success: boolean;
9
9
  message: string;
10
10
  error: any;
11
11
  }>;
12
- MultiSend: (data: IBlockchainMultiSendRequestData, options?: RequestOptions) => Promise<{
12
+ multiSend: (data: IBlockchainMultiSendRequestData, options?: RequestOptions) => Promise<{
13
13
  data: import("../../types").BlockchainData;
14
14
  success: boolean;
15
15
  message: string;
16
16
  error: any;
17
17
  }>;
18
- Delegate: (data: IBlockchainDelegateRequestData, options?: RequestOptions) => Promise<{
18
+ delegate: (data: IBlockchainDelegateRequestData, options?: RequestOptions) => Promise<{
19
19
  data: import("../../types").BlockchainData;
20
20
  success: boolean;
21
21
  message: string;
22
22
  error: any;
23
23
  }>;
24
- Undelegate: (data: IBlockchainUndelegateRequestData, options?: RequestOptions) => Promise<{
24
+ undelegate: (data: IBlockchainUndelegateRequestData, options?: RequestOptions) => Promise<{
25
25
  data: import("../../types").BlockchainData;
26
26
  success: boolean;
27
27
  message: string;
@@ -1,5 +1,5 @@
1
1
  import { AxiosHelper } from "../../helper/api/axiosHelper";
2
- import { CreateDefaultBlockchainData, FillBlockchainDelegateData, FillBlockchainMultiSendData, FillBlockchainSendData, FillBlockchainUndelegateData, FillResultByError, } from "../data";
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 {
@@ -7,56 +7,56 @@ class BlockchainClient extends BaseClient {
7
7
  constructor(clientData, errorHandler) {
8
8
  super(clientData, errorHandler);
9
9
  const { token, baseUrl, lang, installationId, userId } = clientData;
10
- const config = AxiosHelper.GetAxiosConfig(token, baseUrl, lang, installationId);
10
+ const config = AxiosHelper.getAxiosConfig(token, baseUrl, lang, installationId);
11
11
  this.blockchainService = new BlockchainService({ config, userId });
12
12
  }
13
13
  // #region "POST"
14
- Send = async (data, options) => {
14
+ send = async (data, options) => {
15
15
  try {
16
- const blockchainSendData = FillBlockchainSendData(data);
16
+ const blockchainSendData = fillBlockchainSendData(data);
17
17
  const response = await this.blockchainService.send(blockchainSendData, options);
18
- return this.responseHelper.GetResponse(response.data);
18
+ return this.responseHelper.getResponse(response.data);
19
19
  }
20
20
  catch (error) {
21
- const result = FillResultByError(error);
22
- const blockchainData = CreateDefaultBlockchainData({ result });
23
- return this.responseHelper.GetErrorResponse(blockchainData, "Send");
21
+ const result = fillResultByError(error);
22
+ const blockchainData = createDefaultBlockchainData({ result });
23
+ return this.responseHelper.getErrorResponse(blockchainData, "send");
24
24
  }
25
25
  };
26
- MultiSend = async (data, options) => {
26
+ multiSend = async (data, options) => {
27
27
  try {
28
- const blockchainMultiSendData = FillBlockchainMultiSendData(data);
28
+ const blockchainMultiSendData = fillBlockchainMultiSendData(data);
29
29
  const response = await this.blockchainService.multiSend(blockchainMultiSendData, options);
30
- return this.responseHelper.GetResponse(response.data);
30
+ return this.responseHelper.getResponse(response.data);
31
31
  }
32
32
  catch (error) {
33
- const result = FillResultByError(error);
34
- const blockchainData = CreateDefaultBlockchainData({ result });
35
- return this.responseHelper.GetErrorResponse(blockchainData, "MultiSend");
33
+ const result = fillResultByError(error);
34
+ const blockchainData = createDefaultBlockchainData({ result });
35
+ return this.responseHelper.getErrorResponse(blockchainData, "multiSend");
36
36
  }
37
37
  };
38
- Delegate = async (data, options) => {
38
+ delegate = async (data, options) => {
39
39
  try {
40
- const blockchainDelegateData = FillBlockchainDelegateData(data);
40
+ const blockchainDelegateData = fillBlockchainDelegateData(data);
41
41
  const response = await this.blockchainService.delegate(blockchainDelegateData, options);
42
- return this.responseHelper.GetResponse(response.data);
42
+ return this.responseHelper.getResponse(response.data);
43
43
  }
44
44
  catch (error) {
45
- const result = FillResultByError(error);
46
- const blockchainData = CreateDefaultBlockchainData({ result });
47
- return this.responseHelper.GetErrorResponse(blockchainData, "Delegate");
45
+ const result = fillResultByError(error);
46
+ const blockchainData = createDefaultBlockchainData({ result });
47
+ return this.responseHelper.getErrorResponse(blockchainData, "delegate");
48
48
  }
49
49
  };
50
- Undelegate = async (data, options) => {
50
+ undelegate = async (data, options) => {
51
51
  try {
52
- const blockchainUndelegateData = FillBlockchainUndelegateData(data);
52
+ const blockchainUndelegateData = fillBlockchainUndelegateData(data);
53
53
  const response = await this.blockchainService.undelegate(blockchainUndelegateData, options);
54
- return this.responseHelper.GetResponse(response.data);
54
+ return this.responseHelper.getResponse(response.data);
55
55
  }
56
56
  catch (error) {
57
- const result = FillResultByError(error);
58
- const blockchainData = CreateDefaultBlockchainData({ result });
59
- return this.responseHelper.GetErrorResponse(blockchainData, "Undelegate");
57
+ const result = fillResultByError(error);
58
+ const blockchainData = createDefaultBlockchainData({ result });
59
+ return this.responseHelper.getErrorResponse(blockchainData, "undelegate");
60
60
  }
61
61
  };
62
62
  }
@@ -3,13 +3,13 @@ import { BaseClient } from "./base";
3
3
  declare class IPAddressAndLocationClient extends BaseClient {
4
4
  private ipAddressAndLocationService;
5
5
  constructor(clientData: IPAddressAndLocationClientData, errorHandler: ErrorHandler);
6
- GetGeoCoordinates: () => Promise<import("../../types").GeoCoordinates> | {
6
+ getGeoCoordinates: () => Promise<import("../../types").GeoCoordinates> | {
7
7
  latitude: number;
8
8
  longitude: number;
9
9
  position_description: string;
10
10
  };
11
- GetIPAddress: () => Promise<string> | "";
12
- GetGeoCoordinatesAndIPAddress: () => Promise<{
11
+ getIPAddress: () => Promise<string> | "";
12
+ getGeoCoordinatesAndIPAddress: () => Promise<{
13
13
  geo_coordinates: import("../../types").GeoCoordinates;
14
14
  ip_address: string;
15
15
  }> | {
@@ -7,32 +7,32 @@ class IPAddressAndLocationClient extends BaseClient {
7
7
  constructor(clientData, errorHandler) {
8
8
  super(clientData, errorHandler);
9
9
  const { token, baseUrl, lang, installationId, userId } = clientData;
10
- const config = AxiosHelper.GetAxiosConfig(token, baseUrl, lang, installationId);
10
+ const config = AxiosHelper.getAxiosConfig(token, baseUrl, lang, installationId);
11
11
  this.ipAddressAndLocationService = new IPAddressAndLocationService({
12
12
  config,
13
13
  userId,
14
14
  });
15
15
  }
16
16
  // #region "GET"
17
- GetGeoCoordinates = () => {
17
+ getGeoCoordinates = () => {
18
18
  try {
19
- return GeoHelper.GetGeoCoordinates(this.ipAddressAndLocationService);
19
+ return GeoHelper.getGeoCoordinates(this.ipAddressAndLocationService);
20
20
  }
21
21
  catch (error) {
22
22
  return { latitude: 0, longitude: 0, position_description: "N/A, N/A" };
23
23
  }
24
24
  };
25
- GetIPAddress = () => {
25
+ getIPAddress = () => {
26
26
  try {
27
- return GeoHelper.GetIPAddress(this.ipAddressAndLocationService);
27
+ return GeoHelper.getIPAddress(this.ipAddressAndLocationService);
28
28
  }
29
29
  catch (error) {
30
30
  return "";
31
31
  }
32
32
  };
33
- GetGeoCoordinatesAndIPAddress = () => {
33
+ getGeoCoordinatesAndIPAddress = () => {
34
34
  try {
35
- return GeoHelper.GetGeoCoordinatesAndIPAddress(this.ipAddressAndLocationService);
35
+ return GeoHelper.getGeoCoordinatesAndIPAddress(this.ipAddressAndLocationService);
36
36
  }
37
37
  catch (error) {
38
38
  return { geo_coordinates: { latitude: 0, longitude: 0 }, ip_address: "" };
@@ -3,55 +3,55 @@ import { BaseClient } from "./base";
3
3
  declare class LimitedClient extends BaseClient {
4
4
  private limitedService;
5
5
  constructor(clientData: LimitedClientData, errorHandler: ErrorHandler);
6
- CheckForgetPassword: (data: ICheckForgetPasswordData, options?: RequestOptions) => Promise<{
6
+ checkForgetPassword: (data: ICheckForgetPasswordData, options?: RequestOptions) => Promise<{
7
7
  data: import("../../types").ForgetSecurityData;
8
8
  success: boolean;
9
9
  message: string;
10
10
  error: any;
11
11
  }>;
12
- ValidateForgetPassword: (data: IValidateForgetPasswordData, options?: RequestOptions) => Promise<{
12
+ validateForgetPassword: (data: IValidateForgetPasswordData, options?: RequestOptions) => Promise<{
13
13
  data: import("../../types").ForgetSecurityData;
14
14
  success: boolean;
15
15
  message: string;
16
16
  error: any;
17
17
  }>;
18
- ConfirmForgetPassword: (data: IConfirmForgetPasswordData, options?: RequestOptions) => Promise<{
18
+ confirmForgetPassword: (data: IConfirmForgetPasswordData, options?: RequestOptions) => Promise<{
19
19
  data: import("../../types").ForgetSecurityData;
20
20
  success: boolean;
21
21
  message: string;
22
22
  error: any;
23
23
  }>;
24
- ValidateEmail: (data: IValidateEmailData, options?: RequestOptions) => Promise<{
24
+ validateEmail: (data: IValidateEmailData, options?: RequestOptions) => Promise<{
25
25
  data: import("../../types").ValidateLimitedSecurity;
26
26
  success: boolean;
27
27
  message: string;
28
28
  error: any;
29
29
  }>;
30
- ValidatePhone: (data: IValidatePhoneData, options?: RequestOptions) => Promise<{
30
+ validatePhone: (data: IValidatePhoneData, options?: RequestOptions) => Promise<{
31
31
  data: import("../../types").ValidateLimitedSecurity;
32
32
  success: boolean;
33
33
  message: string;
34
34
  error: any;
35
35
  }>;
36
- VerifyEmail: (data: IVerifyEmailData, options?: RequestOptions) => Promise<{
36
+ verifyEmail: (data: IVerifyEmailData, options?: RequestOptions) => Promise<{
37
37
  data: import("../../types").VerifyUserSecurity;
38
38
  success: boolean;
39
39
  message: string;
40
40
  error: any;
41
41
  }>;
42
- VerifyPhone: (data: IVerifyPhoneData, options?: RequestOptions) => Promise<{
42
+ verifyPhone: (data: IVerifyPhoneData, options?: RequestOptions) => Promise<{
43
43
  data: import("../../types").VerifyUserSecurity;
44
44
  success: boolean;
45
45
  message: string;
46
46
  error: any;
47
47
  }>;
48
- ConfirmEmail: (data: IConfirmEmailData, options?: RequestOptions) => Promise<{
48
+ confirmEmail: (data: IConfirmEmailData, options?: RequestOptions) => Promise<{
49
49
  data: import("../../types").ConfirmUserSecurity;
50
50
  success: boolean;
51
51
  message: string;
52
52
  error: any;
53
53
  }>;
54
- ConfirmPhone: (data: IConfirmPhoneData, options?: RequestOptions) => Promise<{
54
+ confirmPhone: (data: IConfirmPhoneData, options?: RequestOptions) => Promise<{
55
55
  data: import("../../types").ConfirmUserSecurity;
56
56
  success: boolean;
57
57
  message: string;