ggez-banking-sdk 0.1.178 → 0.1.179

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 (51) hide show
  1. package/dist/api/clients/account.d.ts +4 -4
  2. package/dist/api/clients/account.js +10 -11
  3. package/dist/api/clients/auth.d.ts +4 -4
  4. package/dist/api/clients/auth.js +13 -14
  5. package/dist/api/clients/base.d.ts +8 -0
  6. package/dist/api/clients/base.js +12 -0
  7. package/dist/api/clients/blockchain.d.ts +8 -8
  8. package/dist/api/clients/blockchain.js +14 -15
  9. package/dist/api/clients/ipAddressAndLocation.d.ts +17 -7
  10. package/dist/api/clients/ipAddressAndLocation.js +26 -14
  11. package/dist/api/clients/limited.d.ts +4 -4
  12. package/dist/api/clients/limited.js +21 -22
  13. package/dist/api/clients/order.d.ts +4 -4
  14. package/dist/api/clients/order.js +7 -8
  15. package/dist/api/clients/organization.d.ts +4 -4
  16. package/dist/api/clients/organization.js +13 -14
  17. package/dist/api/clients/promotion.d.ts +4 -4
  18. package/dist/api/clients/promotion.js +11 -12
  19. package/dist/api/clients/transaction.d.ts +4 -4
  20. package/dist/api/clients/transaction.js +10 -10
  21. package/dist/api/clients/user.d.ts +4 -4
  22. package/dist/api/clients/user.js +159 -159
  23. package/dist/api/data/result.js +3 -3
  24. package/dist/api/services/account.d.ts +1 -1
  25. package/dist/api/services/account.js +7 -9
  26. package/dist/api/services/auth.d.ts +1 -1
  27. package/dist/api/services/auth.js +4 -4
  28. package/dist/api/services/base.d.ts +2 -1
  29. package/dist/api/services/base.js +15 -17
  30. package/dist/api/services/blockchain.d.ts +2 -2
  31. package/dist/api/services/blockchain.js +6 -6
  32. package/dist/api/services/ipAddressAndLocation.d.ts +1 -1
  33. package/dist/api/services/ipAddressAndLocation.js +3 -3
  34. package/dist/api/services/limited.d.ts +1 -1
  35. package/dist/api/services/limited.js +13 -13
  36. package/dist/api/services/order.d.ts +2 -2
  37. package/dist/api/services/order.js +4 -4
  38. package/dist/api/services/organization.d.ts +2 -2
  39. package/dist/api/services/organization.js +7 -7
  40. package/dist/api/services/promotion.d.ts +2 -2
  41. package/dist/api/services/promotion.js +5 -5
  42. package/dist/api/services/transaction.d.ts +2 -2
  43. package/dist/api/services/transaction.js +5 -5
  44. package/dist/api/services/user.d.ts +2 -2
  45. package/dist/api/services/user.js +66 -66
  46. package/dist/helper/api/responseHelper.d.ts +6 -4
  47. package/dist/helper/api/responseHelper.js +8 -4
  48. package/dist/tsconfig.tsbuildinfo +1 -1
  49. package/dist/types/api/service/base.d.ts +2 -1
  50. package/dist/types/api/service/index.d.ts +1 -0
  51. package/package.json +1 -1
@@ -30,9 +30,9 @@ const FillResult = (responseData) => {
30
30
  const FillResultByError = (error) => {
31
31
  const result = {
32
32
  code: HttpStatusCode.BadRequest.toString(),
33
- message: error.data?.error || error.message || error,
34
- friendly_message: error.data?.error || error.message || error,
35
- description: error.data?.error || error.message || error,
33
+ message: error.data?.error || error.message || error.toString(),
34
+ friendly_message: error.data?.error || error.message || error.toString(),
35
+ description: error.data?.error || error.message || error.toString(),
36
36
  };
37
37
  return result;
38
38
  };
@@ -3,7 +3,7 @@ import type { AccountData, AccountServiceParameters } from "../../types";
3
3
  declare class AccountService extends BaseService {
4
4
  userId: number;
5
5
  endpoint: string;
6
- constructor(data: AccountServiceParameters);
6
+ constructor(data: AccountServiceParameters, errorHandler: (error: any) => void);
7
7
  get(accountId: number): Promise<import("axios").AxiosResponse<AccountData, any, {}>>;
8
8
  getLimits(accountId: number): Promise<import("axios").AxiosResponse<AccountData, any, {}>>;
9
9
  }
@@ -6,29 +6,27 @@ import { AxiosHelper } from "../../helper";
6
6
  class AccountService extends BaseService {
7
7
  userId;
8
8
  endpoint = Endpoints.Account;
9
- constructor(data) {
10
- super(data);
9
+ constructor(data, errorHandler) {
10
+ super(data, errorHandler);
11
11
  this.userId = data.userId;
12
12
  this.axiosInstance.interceptors.request.use(async (req) => {
13
13
  const locationService = new IPAddressAndLocationService({
14
14
  config: data.config,
15
15
  userId: this.userId,
16
- });
16
+ }, this.errorHandler);
17
17
  const geoCoordinates = await GeoHelper.GetGeoCoordinates(locationService);
18
18
  AxiosHelper.InjectGeoCoordinates(req, geoCoordinates);
19
19
  return req;
20
20
  });
21
21
  }
22
22
  // #region "GET"
23
- async get(accountId) {
23
+ get(accountId) {
24
24
  const url = this.resolveURL(`/${accountId}`);
25
- const response = await this.GET(url);
26
- return response;
25
+ return this.GET(url);
27
26
  }
28
- async getLimits(accountId) {
27
+ getLimits(accountId) {
29
28
  const url = this.resolveURL(`/${AccountEndpoints.Limits}/${accountId}`);
30
- const response = await this.GET(url);
31
- return response;
29
+ return this.GET(url);
32
30
  }
33
31
  }
34
32
  export { AccountService };
@@ -4,7 +4,7 @@ declare class AuthService extends BaseService {
4
4
  nodeUrl: string;
5
5
  userId: number;
6
6
  endpoint: string;
7
- constructor(data: AuthServiceParameters);
7
+ constructor(data: AuthServiceParameters, errorHandler: (error: any) => void);
8
8
  login(data: string): Promise<import("axios").AxiosResponse<TokenData, any, {}>>;
9
9
  generateLimitedToken(data: IGenerateLimitedTokenData): Promise<import("axios").AxiosResponse<TokenData, any, {}>>;
10
10
  }
@@ -4,17 +4,17 @@ class AuthService extends BaseService {
4
4
  nodeUrl;
5
5
  userId;
6
6
  endpoint = Endpoints.Auth;
7
- constructor(data) {
8
- super(data);
7
+ constructor(data, errorHandler) {
8
+ super(data, errorHandler);
9
9
  this.nodeUrl = data.nodeUrl;
10
10
  this.userId = data.userId;
11
11
  }
12
12
  // #region "POST"
13
- async login(data) {
13
+ login(data) {
14
14
  const url = this.resolveURL();
15
15
  return this.POST(url, data);
16
16
  }
17
- async generateLimitedToken(data) {
17
+ generateLimitedToken(data) {
18
18
  return this.POST(`${this.nodeUrl}/v1/limited-token`, data);
19
19
  }
20
20
  }
@@ -4,7 +4,8 @@ declare abstract class BaseService {
4
4
  protected abstract userId: number;
5
5
  protected abstract endpoint: string;
6
6
  protected axiosInstance: AxiosInstance;
7
- constructor(data: BaseServiceParameters);
7
+ protected errorHandler: (error: any) => void;
8
+ constructor(data: BaseServiceParameters, errorHandler: (error: any) => void);
8
9
  protected GET<T>(url: string, params?: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
9
10
  protected POST<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
10
11
  protected PUT<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
@@ -2,7 +2,9 @@ import axios from "axios";
2
2
  import { AxiosHelper } from "../../helper";
3
3
  class BaseService {
4
4
  axiosInstance;
5
- constructor(data) {
5
+ errorHandler;
6
+ constructor(data, errorHandler) {
7
+ this.errorHandler = errorHandler;
6
8
  this.axiosInstance = axios.create(data.config);
7
9
  this.axiosInstance.interceptors.request.use((req) => {
8
10
  AxiosHelper.InjectRequiredHeaders(req, this.userId);
@@ -10,46 +12,42 @@ class BaseService {
10
12
  return req;
11
13
  });
12
14
  }
13
- async GET(url, params, config) {
15
+ GET(url, params, config) {
14
16
  try {
15
17
  return this.axiosInstance.get(url, {
16
18
  ...config,
17
19
  params,
18
20
  });
19
21
  }
20
- catch (ex) {
21
- console.error(ex);
22
- // onErrorHandler(ex);
22
+ catch (error) {
23
+ this.errorHandler(error);
23
24
  }
24
25
  }
25
- async POST(url, data, config) {
26
+ POST(url, data, config) {
26
27
  try {
27
28
  return this.axiosInstance.post(url, data, config);
28
29
  }
29
- catch (ex) {
30
- console.error(ex);
31
- // onErrorHandler(ex);
30
+ catch (error) {
31
+ this.errorHandler(error);
32
32
  }
33
33
  }
34
- async PUT(url, data, config) {
34
+ PUT(url, data, config) {
35
35
  try {
36
36
  return this.axiosInstance.put(url, data, config);
37
37
  }
38
- catch (ex) {
39
- console.error(ex);
40
- // onErrorHandler(ex);
38
+ catch (error) {
39
+ this.errorHandler(error);
41
40
  }
42
41
  }
43
- async DELETE(url, data, config) {
42
+ DELETE(url, data, config) {
44
43
  try {
45
44
  return this.axiosInstance.delete(url, {
46
45
  ...config,
47
46
  data,
48
47
  });
49
48
  }
50
- catch (ex) {
51
- console.error(ex);
52
- // onErrorHandler(ex);
49
+ catch (error) {
50
+ this.errorHandler(error);
53
51
  }
54
52
  }
55
53
  resolveURL(path = "") {
@@ -1,9 +1,9 @@
1
1
  import { BaseService } from "./base";
2
- import type { BlockchainData, BlockchainServiceParameters } from "../../types";
2
+ import type { BlockchainData, BlockchainServiceParameters, ErrorHandler } from "../../types";
3
3
  declare class BlockchainService extends BaseService {
4
4
  userId: number;
5
5
  endpoint: string;
6
- constructor(data: BlockchainServiceParameters);
6
+ constructor(data: BlockchainServiceParameters, errorHandler: ErrorHandler);
7
7
  send(payload: BlockchainData): Promise<import("axios").AxiosResponse<BlockchainData, any, {}>>;
8
8
  multiSend(payload: BlockchainData): Promise<import("axios").AxiosResponse<BlockchainData, any, {}>>;
9
9
  delegate(payload: BlockchainData): Promise<import("axios").AxiosResponse<BlockchainData, any, {}>>;
@@ -3,24 +3,24 @@ import { BaseService } from "./base";
3
3
  class BlockchainService extends BaseService {
4
4
  userId;
5
5
  endpoint = Endpoints.Blockchain;
6
- constructor(data) {
7
- super(data);
6
+ constructor(data, errorHandler) {
7
+ super(data, errorHandler);
8
8
  this.userId = data.userId;
9
9
  }
10
10
  // #region "POST"
11
- async send(payload) {
11
+ send(payload) {
12
12
  const url = this.resolveURL(BlockchainEndpoints.Send);
13
13
  return this.POST(url, payload);
14
14
  }
15
- async multiSend(payload) {
15
+ multiSend(payload) {
16
16
  const url = this.resolveURL(BlockchainEndpoints.MultiSend);
17
17
  return this.POST(url, payload);
18
18
  }
19
- async delegate(payload) {
19
+ delegate(payload) {
20
20
  const url = this.resolveURL(BlockchainEndpoints.Delegate);
21
21
  return this.POST(url, payload);
22
22
  }
23
- async undelegate(payload) {
23
+ undelegate(payload) {
24
24
  const url = this.resolveURL(BlockchainEndpoints.Undelegate);
25
25
  return this.POST(url, payload);
26
26
  }
@@ -3,7 +3,7 @@ import type { IPAddressAndLocationServiceParameters } from "../../types";
3
3
  declare class IPAddressAndLocationService extends BaseService {
4
4
  userId: number;
5
5
  endpoint: string;
6
- constructor(data: IPAddressAndLocationServiceParameters);
6
+ constructor(data: IPAddressAndLocationServiceParameters, errorHandler: (error: any) => void);
7
7
  getIPAddressAndLocation: () => Promise<import("axios").AxiosResponse<string, any, {}>>;
8
8
  }
9
9
  export { IPAddressAndLocationService };
@@ -3,8 +3,8 @@ import { Endpoints } from "../../constants";
3
3
  class IPAddressAndLocationService extends BaseService {
4
4
  userId;
5
5
  endpoint = Endpoints.IPAddress;
6
- constructor(data) {
7
- super(data);
6
+ constructor(data, errorHandler) {
7
+ super(data, errorHandler);
8
8
  this.userId = data.userId;
9
9
  }
10
10
  // #region "GET"
@@ -13,7 +13,7 @@ class IPAddressAndLocationService extends BaseService {
13
13
  return this.GET(this.endpoint);
14
14
  }
15
15
  catch (error) {
16
- // console.error(error);
16
+ this.errorHandler(error);
17
17
  }
18
18
  };
19
19
  }
@@ -4,7 +4,7 @@ declare class LimitedService extends BaseService {
4
4
  endpoint: string;
5
5
  private nodeUrl;
6
6
  userId: number;
7
- constructor(data: LimitedServiceParameters);
7
+ constructor(data: LimitedServiceParameters, errorHandler: (error: any) => void);
8
8
  validateForgetSecurityData(data: ForgetSecurityData): Promise<import("axios").AxiosResponse<ForgetSecurityData, any, {}>>;
9
9
  confirmForgetSecurityData(data: ForgetSecurityData): Promise<import("axios").AxiosResponse<ForgetSecurityData, any, {}>>;
10
10
  validateSecurityData(data: ValidateLimitedSecurity): Promise<import("axios").AxiosResponse<ValidateLimitedSecurity, any, {}>>;
@@ -6,8 +6,8 @@ class LimitedService extends BaseService {
6
6
  endpoint = Endpoints.Limited;
7
7
  nodeUrl;
8
8
  userId;
9
- constructor(data) {
10
- super(data);
9
+ constructor(data, errorHandler) {
10
+ super(data, errorHandler);
11
11
  this.nodeUrl = data.nodeUrl;
12
12
  this.userId = data.userId;
13
13
  this.axiosInstance.interceptors.request.use(async (req) => {
@@ -16,7 +16,7 @@ class LimitedService extends BaseService {
16
16
  config: authConfig,
17
17
  nodeUrl: this.nodeUrl,
18
18
  userId: this.userId,
19
- });
19
+ }, this.errorHandler);
20
20
  const { data } = await authService.generateLimitedToken({
21
21
  installationId: "",
22
22
  });
@@ -28,25 +28,25 @@ class LimitedService extends BaseService {
28
28
  });
29
29
  }
30
30
  // #region "POST"
31
- async validateForgetSecurityData(data) {
31
+ validateForgetSecurityData(data) {
32
32
  const url = this.resolveURL(LimitedEndpoints.SecurityForgetValidate);
33
- return await this.POST(url, data);
33
+ return this.POST(url, data);
34
34
  }
35
- async confirmForgetSecurityData(data) {
35
+ confirmForgetSecurityData(data) {
36
36
  const url = this.resolveURL(LimitedEndpoints.SecurityForgetConfirm);
37
- return await this.POST(url, data);
37
+ return this.POST(url, data);
38
38
  }
39
- async validateSecurityData(data) {
39
+ validateSecurityData(data) {
40
40
  const url = this.resolveURL(LimitedEndpoints.SecurityValidate);
41
- return await this.POST(url, data);
41
+ return this.POST(url, data);
42
42
  }
43
- async verifySecurityData(data) {
43
+ verifySecurityData(data) {
44
44
  const url = this.resolveURL(LimitedEndpoints.SecurityVerify);
45
- return await this.POST(url, data);
45
+ return this.POST(url, data);
46
46
  }
47
- async confirmSecurityData(data) {
47
+ confirmSecurityData(data) {
48
48
  const url = this.resolveURL(LimitedEndpoints.SecurityConfirm);
49
- return await this.POST(url, data);
49
+ return this.POST(url, data);
50
50
  }
51
51
  }
52
52
  export { LimitedService };
@@ -1,9 +1,9 @@
1
1
  import { BaseService } from "./base";
2
- import type { OrderData, OrderServiceParameters } from "../../types";
2
+ import type { ErrorHandler, OrderData, OrderServiceParameters } from "../../types";
3
3
  declare class OrderService extends BaseService {
4
4
  userId: number;
5
5
  endpoint: string;
6
- constructor(data: OrderServiceParameters);
6
+ constructor(data: OrderServiceParameters, errorHandler: ErrorHandler);
7
7
  create(data: OrderData): Promise<import("axios").AxiosResponse<OrderData, any, {}>>;
8
8
  }
9
9
  export { OrderService };
@@ -6,21 +6,21 @@ import { AxiosHelper } from "../../helper";
6
6
  class OrderService extends BaseService {
7
7
  userId;
8
8
  endpoint = Endpoints.Order;
9
- constructor(data) {
10
- super(data);
9
+ constructor(data, errorHandler) {
10
+ super(data, errorHandler);
11
11
  this.userId = data.userId;
12
12
  this.axiosInstance.interceptors.request.use(async (req) => {
13
13
  const locationService = new IPAddressAndLocationService({
14
14
  config: data.config,
15
15
  userId: this.userId,
16
- });
16
+ }, this.errorHandler);
17
17
  const geoCoordinates = await GeoHelper.GetGeoCoordinates(locationService);
18
18
  AxiosHelper.InjectGeoCoordinates(req, geoCoordinates);
19
19
  return req;
20
20
  });
21
21
  }
22
22
  // #region "POST"
23
- async create(data) {
23
+ create(data) {
24
24
  const url = this.resolveURL();
25
25
  return this.POST(url, data);
26
26
  }
@@ -1,10 +1,10 @@
1
1
  import { BaseService } from "./base";
2
- import type { DocumentData, OrganizationData, OrganizationServiceParameters } from "../../types";
2
+ import type { DocumentData, ErrorHandler, OrganizationData, OrganizationServiceParameters } from "../../types";
3
3
  declare class OrganizationService extends BaseService {
4
4
  url: string;
5
5
  userId: number;
6
6
  endpoint: string;
7
- constructor(data: OrganizationServiceParameters);
7
+ constructor(data: OrganizationServiceParameters, errorHandler: ErrorHandler);
8
8
  create(data: OrganizationData): Promise<import("axios").AxiosResponse<OrganizationData, any, {}>>;
9
9
  createDocument(id: number, data: DocumentData): Promise<import("axios").AxiosResponse<DocumentData, any, {}>>;
10
10
  update(id: number, data: OrganizationData): Promise<import("axios").AxiosResponse<OrganizationData, any, {}>>;
@@ -7,37 +7,37 @@ class OrganizationService extends BaseService {
7
7
  url;
8
8
  userId;
9
9
  endpoint = Endpoints.Organization;
10
- constructor(data) {
11
- super(data);
10
+ constructor(data, errorHandler) {
11
+ super(data, errorHandler);
12
12
  this.userId = data.userId;
13
13
  this.axiosInstance.interceptors.request.use(async (req) => {
14
14
  const locationService = new IPAddressAndLocationService({
15
15
  config: data.config,
16
16
  userId: this.userId,
17
- });
17
+ }, this.errorHandler);
18
18
  const geoCoordinates = await GeoHelper.GetGeoCoordinates(locationService);
19
19
  AxiosHelper.InjectGeoCoordinates(req, geoCoordinates);
20
20
  return req;
21
21
  });
22
22
  }
23
23
  // #region "POST"
24
- async create(data) {
24
+ create(data) {
25
25
  const url = this.resolveURL();
26
26
  return this.POST(url, data);
27
27
  }
28
- async createDocument(id, data) {
28
+ createDocument(id, data) {
29
29
  const url = this.resolveURL(`${OrganizationEndpoints.Document}/${id}`);
30
30
  return this.POST(url, data);
31
31
  }
32
32
  // #endregion
33
33
  // #region "PUT"
34
- async update(id, data) {
34
+ update(id, data) {
35
35
  const url = this.resolveURL(id);
36
36
  return this.PUT(url, data);
37
37
  }
38
38
  // #endregion
39
39
  // #region "DELETE"
40
- async delete(id) {
40
+ delete(id) {
41
41
  const url = this.resolveURL(id);
42
42
  return this.DELETE(url);
43
43
  }
@@ -1,9 +1,9 @@
1
1
  import { BaseService } from "./base";
2
- import type { GGEZGiftRewards, PromotionDetails, PromotionServiceParameters } from "../../types";
2
+ import type { ErrorHandler, GGEZGiftRewards, PromotionDetails, PromotionServiceParameters } from "../../types";
3
3
  declare class PromotionService extends BaseService {
4
4
  userId: number;
5
5
  endpoint: string;
6
- constructor(data: PromotionServiceParameters);
6
+ constructor(data: PromotionServiceParameters, errorHandler: ErrorHandler);
7
7
  getPromotionByCode(promotionCode: string): Promise<import("axios").AxiosResponse<PromotionDetails, any, {}>>;
8
8
  getTwitterSpotlightPostIds(): Promise<import("axios").AxiosResponse<string[], any, {}>>;
9
9
  incrementPromotionParticipants(data: GGEZGiftRewards): Promise<import("axios").AxiosResponse<{
@@ -3,22 +3,22 @@ import { BaseService } from "./base";
3
3
  class PromotionService extends BaseService {
4
4
  userId;
5
5
  endpoint = Endpoints.Promotion;
6
- constructor(data) {
7
- super(data);
6
+ constructor(data, errorHandler) {
7
+ super(data, errorHandler);
8
8
  this.userId = data.userId;
9
9
  }
10
10
  // #region "GET"
11
- async getPromotionByCode(promotionCode) {
11
+ getPromotionByCode(promotionCode) {
12
12
  const url = this.resolveURL(`/${promotionCode}`);
13
13
  return this.GET(url);
14
14
  }
15
- async getTwitterSpotlightPostIds() {
15
+ getTwitterSpotlightPostIds() {
16
16
  const url = this.resolveURL("/spotlight/twitter");
17
17
  return this.GET(url);
18
18
  }
19
19
  // #endregion
20
20
  // #region "PUT"
21
- async incrementPromotionParticipants(data) {
21
+ incrementPromotionParticipants(data) {
22
22
  const url = this.resolveURL();
23
23
  return this.PUT(url, data);
24
24
  }
@@ -1,9 +1,9 @@
1
1
  import { BaseService } from "./base";
2
- import type { TransactionData, TransactionInquiry, TransactionResultInquiry, TransactionServiceParameters } from "../../types";
2
+ import type { ErrorHandler, TransactionData, TransactionInquiry, TransactionResultInquiry, TransactionServiceParameters } from "../../types";
3
3
  declare class TransactionService extends BaseService {
4
4
  userId: number;
5
5
  endpoint: string;
6
- constructor(data: TransactionServiceParameters);
6
+ constructor(data: TransactionServiceParameters, errorHandler: ErrorHandler);
7
7
  inquiry(payload: TransactionInquiry): Promise<import("axios").AxiosResponse<TransactionResultInquiry, any, {}>>;
8
8
  create(payload: TransactionData): Promise<import("axios").AxiosResponse<TransactionData, any, {}>>;
9
9
  }
@@ -6,27 +6,27 @@ import { AxiosHelper } from "../../helper";
6
6
  class TransactionService extends BaseService {
7
7
  userId;
8
8
  endpoint = Endpoints.Transaction;
9
- constructor(data) {
10
- super(data);
9
+ constructor(data, errorHandler) {
10
+ super(data, errorHandler);
11
11
  this.userId = data.userId;
12
12
  this.axiosInstance.interceptors.request.use(async (req) => {
13
13
  const locationService = new IPAddressAndLocationService({
14
14
  config: data.config,
15
15
  userId: this.userId,
16
- });
16
+ }, this.errorHandler);
17
17
  const geoCoordinates = await GeoHelper.GetGeoCoordinates(locationService);
18
18
  AxiosHelper.InjectGeoCoordinates(req, geoCoordinates);
19
19
  return req;
20
20
  });
21
21
  }
22
22
  // #region "GET"
23
- async inquiry(payload) {
23
+ inquiry(payload) {
24
24
  const url = this.resolveURL(TransactionEndpoints.Inquiry);
25
25
  return this.GET(url, payload);
26
26
  }
27
27
  // #endregion
28
28
  // #region "POST"
29
- async create(payload) {
29
+ create(payload) {
30
30
  const url = this.resolveURL();
31
31
  return this.POST(url, payload);
32
32
  }
@@ -1,11 +1,11 @@
1
1
  import { AxiosRequestConfig } from "axios";
2
2
  import { BaseService } from "./base";
3
- import type { ConfirmUserSecurity, DocumentData, ResetUserSecurity, UserData, UserServiceParameters, ValidateUserSecurity, VerifyUserSecurity } from "../../types";
3
+ import type { ConfirmUserSecurity, DocumentData, ErrorHandler, ResetUserSecurity, UserData, UserServiceParameters, ValidateUserSecurity, VerifyUserSecurity } from "../../types";
4
4
  declare class UserService extends BaseService {
5
5
  url: string;
6
6
  userId: number;
7
7
  endpoint: string;
8
- constructor(data: UserServiceParameters);
8
+ constructor(data: UserServiceParameters, errorHandler: ErrorHandler);
9
9
  getUser(userId: number): Promise<import("axios").AxiosResponse<UserData, any, {}>>;
10
10
  getTermsAndConditions(userId: number): Promise<import("axios").AxiosResponse<UserData, any, {}>>;
11
11
  getSecurity(userId: number): Promise<import("axios").AxiosResponse<UserData, any, {}>>;