ggez-banking-sdk 0.4.25 → 0.4.27
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/account.d.ts +3 -3
- package/dist/account.js +2 -2
- package/dist/api/api.d.ts +1 -2
- package/dist/api/api.js +1 -3
- package/dist/api/proxy/{account.d.ts → accountProxy.d.ts} +1 -1
- package/dist/api/proxy/{account.js → accountProxy.js} +2 -2
- package/dist/api/proxy/{auth.d.ts → authProxy.d.ts} +1 -1
- package/dist/api/proxy/{auth.js → authProxy.js} +2 -2
- package/dist/api/proxy/{blockchain.d.ts → blockchainProxy.d.ts} +1 -1
- package/dist/api/proxy/{blockchain.js → blockchainProxy.js} +2 -2
- package/dist/api/proxy/index.d.ts +10 -11
- package/dist/api/proxy/index.js +10 -11
- package/dist/api/proxy/{limited.d.ts → limitedProxy.d.ts} +1 -1
- package/dist/api/proxy/{limited.js → limitedProxy.js} +2 -2
- package/dist/api/proxy/{order.d.ts → orderProxy.d.ts} +1 -1
- package/dist/api/proxy/{order.js → orderProxy.js} +2 -2
- package/dist/api/proxy/{organization.d.ts → organizationProxy.d.ts} +1 -1
- package/dist/api/proxy/{organization.js → organizationProxy.js} +2 -2
- package/dist/api/proxy/{program.d.ts → programProxy.d.ts} +1 -1
- package/dist/api/proxy/{program.js → programProxy.js} +2 -2
- package/dist/api/proxy/{promotion.d.ts → promotionProxy.d.ts} +1 -1
- package/dist/api/proxy/{promotion.js → promotionProxy.js} +2 -2
- package/dist/api/proxy/{transaction.d.ts → transactionProxy.d.ts} +1 -1
- package/dist/api/proxy/{transaction.js → transactionProxy.js} +2 -2
- package/dist/api/proxy/{user.d.ts → userProxy.d.ts} +1 -1
- package/dist/api/proxy/{user.js → userProxy.js} +2 -2
- package/dist/api/service/{account.d.ts → accountService.d.ts} +2 -2
- package/dist/api/service/accountService.js +18 -0
- package/dist/api/service/{auth.d.ts → authService.d.ts} +2 -2
- package/dist/api/service/{auth.js → authService.js} +1 -1
- package/dist/api/service/{base.d.ts → baseService.d.ts} +1 -1
- package/dist/api/service/{base.js → baseService.js} +4 -1
- package/dist/api/service/{blockchain.d.ts → blockchainService.d.ts} +1 -1
- package/dist/api/service/{blockchain.js → blockchainService.js} +1 -1
- package/dist/api/service/index.d.ts +11 -12
- package/dist/api/service/index.js +11 -12
- package/dist/api/service/{limited.d.ts → limitedService.d.ts} +1 -1
- package/dist/api/service/{limited.js → limitedService.js} +2 -2
- package/dist/api/service/{order.d.ts → orderService.d.ts} +1 -1
- package/dist/api/service/orderService.js +14 -0
- package/dist/api/service/{organization.d.ts → organizationService.d.ts} +1 -1
- package/dist/api/service/{organization.js → organizationService.js} +1 -10
- package/dist/api/service/{program.d.ts → programService.d.ts} +1 -1
- package/dist/api/service/{program.js → programService.js} +1 -1
- package/dist/api/service/{promotion.d.ts → promotionService.d.ts} +1 -1
- package/dist/api/service/{promotion.js → promotionService.js} +1 -1
- package/dist/api/service/{transaction.d.ts → transactionService.d.ts} +2 -2
- package/dist/api/service/{transaction.js → transactionService.js} +1 -10
- package/dist/api/service/{user.d.ts → userService.d.ts} +2 -2
- package/dist/api/service/{user.js → userService.js} +2 -10
- package/dist/auth.d.ts +3 -3
- package/dist/auth.js +2 -2
- package/dist/blockchain.d.ts +3 -3
- package/dist/blockchain.js +2 -2
- package/dist/helper/api/axiosHelper.d.ts +3 -2
- package/dist/helper/api/axiosHelper.js +9 -2
- package/dist/helper/api/responseHelper.js +7 -0
- package/dist/helper/geoHelper.d.ts +10 -38
- package/dist/helper/geoHelper.js +57 -124
- package/dist/limited.d.ts +3 -3
- package/dist/limited.js +2 -2
- package/dist/order.d.ts +3 -3
- package/dist/order.js +2 -2
- package/dist/organization.d.ts +3 -3
- package/dist/organization.js +2 -2
- package/dist/program.d.ts +3 -3
- package/dist/program.js +2 -2
- package/dist/promotion.d.ts +3 -3
- package/dist/promotion.js +2 -2
- package/dist/transaction.d.ts +3 -3
- package/dist/transaction.js +2 -2
- package/dist/types/api/service/{account.d.ts → accountService.d.ts} +1 -1
- package/dist/types/api/service/{auth.d.ts → authService.d.ts} +1 -1
- package/dist/types/api/service/{blockchain.d.ts → blockchainService.d.ts} +1 -1
- package/dist/types/api/service/index.d.ts +11 -12
- package/dist/types/api/service/{limited.d.ts → limitedService.d.ts} +1 -1
- package/dist/types/api/service/{order.d.ts → orderService.d.ts} +1 -1
- package/dist/types/api/service/{organization.d.ts → organizationService.d.ts} +1 -1
- package/dist/types/api/service/{program.d.ts → programService.d.ts} +1 -1
- package/dist/types/api/service/{promotion.d.ts → promotionService.d.ts} +1 -1
- package/dist/types/api/service/{transaction.d.ts → transactionService.d.ts} +1 -1
- package/dist/types/api/service/{user.d.ts → userService.d.ts} +1 -1
- package/dist/types/helper/api/axiosHelper.d.ts +4 -8
- package/dist/types/helper/geoHelper.d.ts +4 -6
- package/dist/user.d.ts +3 -3
- package/dist/user.js +2 -2
- package/dist/utils/api/endpointUtils.d.ts +2 -0
- package/dist/utils/api/endpointUtils.js +15 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +1 -6
- package/dist/api/proxy/ipAddressAndLocation.d.ts +0 -13
- package/dist/api/proxy/ipAddressAndLocation.js +0 -27
- package/dist/api/service/account.js +0 -27
- package/dist/api/service/ipAddressAndLocation.d.ts +0 -8
- package/dist/api/service/ipAddressAndLocation.js +0 -13
- package/dist/api/service/order.js +0 -23
- package/dist/ip-location.d.ts +0 -3
- package/dist/ip-location.js +0 -3
- package/dist/types/api/service/ipAddressAndLocation.d.ts +0 -8
- package/dist/types/api/service/user.js +0 -1
- /package/dist/api/proxy/{base.d.ts → baseProxy.d.ts} +0 -0
- /package/dist/api/proxy/{base.js → baseProxy.js} +0 -0
- /package/dist/types/api/service/{account.js → accountService.js} +0 -0
- /package/dist/types/api/service/{auth.js → authService.js} +0 -0
- /package/dist/types/api/service/{base.d.ts → baseService.d.ts} +0 -0
- /package/dist/types/api/service/{base.js → baseService.js} +0 -0
- /package/dist/types/api/service/{blockchain.js → blockchainService.js} +0 -0
- /package/dist/types/api/service/{ipAddressAndLocation.js → limitedService.js} +0 -0
- /package/dist/types/api/service/{limited.js → orderService.js} +0 -0
- /package/dist/types/api/service/{order.js → organizationService.js} +0 -0
- /package/dist/types/api/service/{organization.js → programService.js} +0 -0
- /package/dist/types/api/service/{program.js → promotionService.js} +0 -0
- /package/dist/types/api/service/{promotion.js → transactionService.js} +0 -0
- /package/dist/types/api/service/{transaction.js → userService.js} +0 -0
package/dist/account.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { AccountProxy } from "./api/proxy/
|
|
2
|
-
export { AccountService } from "./api/service/
|
|
1
|
+
export { AccountProxy } from "./api/proxy/accountProxy";
|
|
2
|
+
export { AccountService } from "./api/service/accountService";
|
|
3
3
|
export * from "./api/data/account";
|
|
4
4
|
export type * from "./types/api/data/account";
|
|
5
|
-
export type * from "./types/api/service/
|
|
5
|
+
export type * from "./types/api/service/accountService";
|
package/dist/account.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Account-related exports - Complete account domain
|
|
2
|
-
export { AccountProxy } from "./api/proxy/
|
|
3
|
-
export { AccountService } from "./api/service/
|
|
2
|
+
export { AccountProxy } from "./api/proxy/accountProxy";
|
|
3
|
+
export { AccountService } from "./api/service/accountService";
|
|
4
4
|
// Account data exports
|
|
5
5
|
export * from "./api/data/account";
|
package/dist/api/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountProxy, AuthProxy, BlockchainProxy,
|
|
1
|
+
import { AccountProxy, AuthProxy, BlockchainProxy, LimitedProxy, OrderProxy, OrganizationProxy, ProgramProxy, PromotionProxy, TransactionProxy, UserProxy } from "./proxy";
|
|
2
2
|
import type { APIConfig, ErrorHandler } from "../types";
|
|
3
3
|
import type { ClientContextProvider } from "../types/api/context/clientContext";
|
|
4
4
|
declare class API {
|
|
@@ -6,7 +6,6 @@ declare class API {
|
|
|
6
6
|
readonly account: AccountProxy;
|
|
7
7
|
readonly auth: AuthProxy;
|
|
8
8
|
readonly blockchain: BlockchainProxy;
|
|
9
|
-
readonly ipAddress: IPAddressAndLocationProxy;
|
|
10
9
|
readonly limited: LimitedProxy;
|
|
11
10
|
readonly order: OrderProxy;
|
|
12
11
|
readonly organization: OrganizationProxy;
|
package/dist/api/api.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { CookiesHelper } from "../helper/storage/cookiesHelper";
|
|
2
|
-
import { AccountProxy, AuthProxy, BlockchainProxy,
|
|
2
|
+
import { AccountProxy, AuthProxy, BlockchainProxy, LimitedProxy, OrderProxy, OrganizationProxy, ProgramProxy, PromotionProxy, TransactionProxy, UserProxy, } from "./proxy";
|
|
3
3
|
import { DefaultClientContextProvider } from "./context";
|
|
4
4
|
class API {
|
|
5
5
|
context;
|
|
6
6
|
account;
|
|
7
7
|
auth;
|
|
8
8
|
blockchain;
|
|
9
|
-
ipAddress;
|
|
10
9
|
limited;
|
|
11
10
|
order;
|
|
12
11
|
organization;
|
|
@@ -36,7 +35,6 @@ class API {
|
|
|
36
35
|
this.organization = new OrganizationProxy(proxyData);
|
|
37
36
|
this.program = new ProgramProxy(proxyData);
|
|
38
37
|
this.promotion = new PromotionProxy(proxyData);
|
|
39
|
-
this.ipAddress = new IPAddressAndLocationProxy(proxyData);
|
|
40
38
|
this.transaction = new TransactionProxy(proxyData);
|
|
41
39
|
this.user = new UserProxy(proxyData);
|
|
42
40
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AccountService } from "../service/
|
|
2
|
-
import { BaseProxy } from "./
|
|
1
|
+
import { AccountService } from "../service/accountService";
|
|
2
|
+
import { BaseProxy } from "./baseProxy";
|
|
3
3
|
class AccountProxy extends BaseProxy {
|
|
4
4
|
accountService;
|
|
5
5
|
constructor(data) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IGenerateLimitedTokenData } from "../../types/api/data/auth";
|
|
2
2
|
import type { BaseProxyParameters, ILoginDeviceCredentialsData, ILoginGoogleCredentialsData, ILoginUserCredentialsData } from "../../types";
|
|
3
|
-
import { BaseProxy } from "./
|
|
3
|
+
import { BaseProxy } from "./baseProxy";
|
|
4
4
|
declare class AuthProxy extends BaseProxy {
|
|
5
5
|
private authService;
|
|
6
6
|
constructor(data: BaseProxyParameters);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AuthService } from "../service/
|
|
1
|
+
import { AuthService } from "../service/authService";
|
|
2
2
|
import { ResultHelper } from "../../helper/api/resultHelper";
|
|
3
3
|
import { fillLoginDeviceCredentialsData, fillLoginGoogleCredentialsData, fillLoginUserCredentialsData, } from "../data";
|
|
4
|
-
import { BaseProxy } from "./
|
|
4
|
+
import { BaseProxy } from "./baseProxy";
|
|
5
5
|
class AuthProxy extends BaseProxy {
|
|
6
6
|
authService;
|
|
7
7
|
constructor(data) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseProxyParameters, IBlockchainDelegateRequestData, IBlockchainMultiSendRequestData, IBlockchainSendRequestData, IBlockchainUndelegateRequestData } from "../../types";
|
|
2
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { BaseProxy } from "./baseProxy";
|
|
3
3
|
declare class BlockchainProxy extends BaseProxy {
|
|
4
4
|
private blockchainService;
|
|
5
5
|
constructor(data: BaseProxyParameters);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fillBlockchainDelegateData, fillBlockchainMultiSendData, fillBlockchainSendData, fillBlockchainUndelegateData, } from "../data";
|
|
2
|
-
import { BlockchainService } from "../service/
|
|
3
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { BlockchainService } from "../service/blockchainService";
|
|
3
|
+
import { BaseProxy } from "./baseProxy";
|
|
4
4
|
class BlockchainProxy extends BaseProxy {
|
|
5
5
|
blockchainService;
|
|
6
6
|
constructor(data) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./user";
|
|
1
|
+
export * from "./accountProxy";
|
|
2
|
+
export * from "./authProxy";
|
|
3
|
+
export * from "./blockchainProxy";
|
|
4
|
+
export * from "./limitedProxy";
|
|
5
|
+
export * from "./orderProxy";
|
|
6
|
+
export * from "./organizationProxy";
|
|
7
|
+
export * from "./programProxy";
|
|
8
|
+
export * from "./promotionProxy";
|
|
9
|
+
export * from "./transactionProxy";
|
|
10
|
+
export * from "./userProxy";
|
package/dist/api/proxy/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./user";
|
|
1
|
+
export * from "./accountProxy";
|
|
2
|
+
export * from "./authProxy";
|
|
3
|
+
export * from "./blockchainProxy";
|
|
4
|
+
export * from "./limitedProxy";
|
|
5
|
+
export * from "./orderProxy";
|
|
6
|
+
export * from "./organizationProxy";
|
|
7
|
+
export * from "./programProxy";
|
|
8
|
+
export * from "./promotionProxy";
|
|
9
|
+
export * from "./transactionProxy";
|
|
10
|
+
export * from "./userProxy";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IConfirmEmailData, IConfirmPhoneData, IValidateEmailData, IValidatePhoneData, IVerifyEmailData, IVerifyPhoneData, IValidateForgetPasswordData, IConfirmForgetPasswordData, ICheckForgetPasswordData, BaseProxyParameters } from "../../types";
|
|
2
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { BaseProxy } from "./baseProxy";
|
|
3
3
|
declare class LimitedProxy extends BaseProxy {
|
|
4
4
|
private limitedService;
|
|
5
5
|
constructor(data: BaseProxyParameters);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fillCheckForgetPasswordData, fillConfirmEmailData, fillConfirmForgetPasswordData, fillConfirmPhoneData, fillValidateEmailData, fillValidateForgetPasswordData, fillValidatePhoneData, fillVerifyEmailData, fillVerifyPhoneData, } from "../data";
|
|
2
|
-
import { LimitedService } from "../service/
|
|
3
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { LimitedService } from "../service/limitedService";
|
|
3
|
+
import { BaseProxy } from "./baseProxy";
|
|
4
4
|
class LimitedProxy extends BaseProxy {
|
|
5
5
|
limitedService;
|
|
6
6
|
constructor(data) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fillCreateOrderData } from "../data";
|
|
2
|
-
import { OrderService } from "../service/
|
|
3
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { OrderService } from "../service/orderService";
|
|
3
|
+
import { BaseProxy } from "./baseProxy";
|
|
4
4
|
class OrderProxy extends BaseProxy {
|
|
5
5
|
orderService;
|
|
6
6
|
constructor(data) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseProxyParameters, ICreateOrganizationData, IUpdateOrganizationData, IUploadOrganizationDocumentData } from "../../types";
|
|
2
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { BaseProxy } from "./baseProxy";
|
|
3
3
|
declare class OrganizationProxy extends BaseProxy {
|
|
4
4
|
private organizationService;
|
|
5
5
|
constructor(data: BaseProxyParameters);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fillCreateOrganizationData, fillCreateOrganizationDocumentData, fillUpdateOrganizationData, } from "../data/organization";
|
|
2
|
-
import { OrganizationService } from "../service/
|
|
3
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { OrganizationService } from "../service/organizationService";
|
|
3
|
+
import { BaseProxy } from "./baseProxy";
|
|
4
4
|
class OrganizationProxy extends BaseProxy {
|
|
5
5
|
organizationService;
|
|
6
6
|
constructor(data) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProgramService } from "../service/
|
|
2
|
-
import { BaseProxy } from "./
|
|
1
|
+
import { ProgramService } from "../service/programService";
|
|
2
|
+
import { BaseProxy } from "./baseProxy";
|
|
3
3
|
class ProgramProxy extends BaseProxy {
|
|
4
4
|
programService;
|
|
5
5
|
constructor(data) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseProxyParameters, GGEZGiftRewards } from "../../types";
|
|
2
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { BaseProxy } from "./baseProxy";
|
|
3
3
|
declare class PromotionProxy extends BaseProxy {
|
|
4
4
|
private promotionService;
|
|
5
5
|
constructor(data: BaseProxyParameters);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PromotionService } from "../service/
|
|
2
|
-
import { BaseProxy } from "./
|
|
1
|
+
import { PromotionService } from "../service/promotionService";
|
|
2
|
+
import { BaseProxy } from "./baseProxy";
|
|
3
3
|
class PromotionProxy extends BaseProxy {
|
|
4
4
|
promotionService;
|
|
5
5
|
constructor(data) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseProxyParameters, IInquiryTransactionData, ICreateSystemTransactionData, ICreateGatewayCryptoTransactionData, ICreateBlockchainTransactionData, ICreateBlockchainTransferTransactionData } from "../../types";
|
|
2
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { BaseProxy } from "./baseProxy";
|
|
3
3
|
declare class TransactionProxy extends BaseProxy {
|
|
4
4
|
private transactionService;
|
|
5
5
|
constructor(data: BaseProxyParameters);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fillCreateBlockchainTransactionData, fillCreateGatewayCryptoTransactionData, fillCreateSystemTransactionData, fillTransactionInquiryData, fillCreateBlockchainTransferTransactionData, } from "../data";
|
|
2
|
-
import { TransactionService } from "../service/
|
|
3
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { TransactionService } from "../service/transactionService";
|
|
3
|
+
import { BaseProxy } from "./baseProxy";
|
|
4
4
|
class TransactionProxy extends BaseProxy {
|
|
5
5
|
transactionService;
|
|
6
6
|
constructor(data) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseProxyParameters, IActivateGoogleAuthData, IConfirmDeviceData, IConfirmEmailData, IConfirmPhoneData, ICreateAddressData, ICreateBankAccountData, ICreateDeviceData, ICreateEmailData, ICreateIdentificationData, ICreatePhoneData, ICreateTicketData, ICreateUserData, ICreateUserWithGoogleData, IDeactivateGoogleAuthData, IDeleteAddressData, IDeleteBankAccountData, IDeleteDeviceData, IDeleteEmailData, IDeleteGoogleAuthData, IDeleteIdentificationData, IDeletePhoneData, ILogoutDeviceData, IMakeAddressPrimaryData, IMakeBankAccountPrimaryData, IMakeEmailPrimaryData, IMakePhonePrimaryData, IResetPasswordData, IResetSecurityCodeData, IResetSecurityQuestionsData, ISendEmailOTPData, ISendPhoneOTPData, IUpdateAddressData, IUpdateBankAccountData, IUpdateDeviceData, IUpdateEmailData, IUpdateIdentificationData, IUpdatePersonalInfoData, IUpdatePhoneData, IUpdatePreferencesData, IUploadDocumentData, IUploadProfilePictureData, IValidateSecurityCodeData, IVerifyDeviceData, IVerifyEmailData, IVerifyPhoneData } from "../../types";
|
|
2
2
|
import type { ResetUserSecurity } from "../../types/banking/user/resetUserSecurity";
|
|
3
3
|
import type { IUpdateUserTypeData } from "../../types/api/data/user/type";
|
|
4
|
-
import { BaseProxy } from "./
|
|
4
|
+
import { BaseProxy } from "./baseProxy";
|
|
5
5
|
declare class UserProxy extends BaseProxy {
|
|
6
6
|
private userService;
|
|
7
7
|
constructor(data: BaseProxyParameters);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fillActivateGoogleAuthData, fillConfirmDeviceData, fillConfirmEmailData, fillConfirmPhoneData, fillCreateAddressData, fillCreateBankAccountData, fillCreateDeviceData, fillCreateEmailData, fillCreateIdentificationData, fillCreatePhoneData, fillCreateTicketData, fillCreateUserData, fillCreateUserWithGoogleData, fillDeactivateGoogleAuthData, fillDeleteAddressData, fillDeleteBankAccountData, fillDeleteDeviceData, fillDeleteEmailData, fillDeleteGoogleAuthData, fillDeleteIdentificationData, fillDeletePhoneData, fillEnrollGoogleAuthData, fillLogoutDeviceData, fillMakeAddressPrimaryData, fillMakeBankAccountPrimaryData, fillMakeEmailPrimaryData, fillMakePhonePrimaryData, fillResetPasswordData, fillResetSecurityCodeData, fillResetSecurityQuestionsData, fillSendEmailOTPData, fillSendPhoneOTPData, fillUpdateAddressData, fillUpdateBankAccountData, fillUpdateDeviceData, fillUpdateEmailData, fillUpdateIdentificationData, fillUpdatePersonalInfoData, fillUpdatePhoneData, fillUpdatePreferencesData, fillUploadDocumentData, fillUploadProfilePictureData, fillValidateSecurityCodeData, fillVerifyDeviceData, fillVerifyEmailData, fillVerifyPhoneData, fillUpdateUserTypeData, } from "../data";
|
|
2
|
-
import { UserService } from "../service/
|
|
3
|
-
import { BaseProxy } from "./
|
|
2
|
+
import { UserService } from "../service/userService";
|
|
3
|
+
import { BaseProxy } from "./baseProxy";
|
|
4
4
|
class UserProxy extends BaseProxy {
|
|
5
5
|
userService;
|
|
6
6
|
constructor(data) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseService } from "./
|
|
1
|
+
import { BaseService } from "./baseService";
|
|
2
2
|
import type { AccountData } from "../../types/banking/account/accountdata";
|
|
3
|
-
import type { AccountServiceParameters } from "../../types/api/service/
|
|
3
|
+
import type { AccountServiceParameters } from "../../types/api/service/accountService";
|
|
4
4
|
declare class AccountService extends BaseService {
|
|
5
5
|
protected endpoint: string;
|
|
6
6
|
constructor(data: AccountServiceParameters);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AccountEndpoints, Endpoints } from "../../constant/constant";
|
|
2
|
+
import { BaseService } from "./baseService";
|
|
3
|
+
class AccountService extends BaseService {
|
|
4
|
+
endpoint = Endpoints.Account;
|
|
5
|
+
constructor(data) {
|
|
6
|
+
super(data);
|
|
7
|
+
}
|
|
8
|
+
// #region "GET"
|
|
9
|
+
get(accountId) {
|
|
10
|
+
const url = this.resolveURL(`/${accountId}`);
|
|
11
|
+
return this.GET(url, { flags: { showSensitiveData: true } });
|
|
12
|
+
}
|
|
13
|
+
getLimits(accountId) {
|
|
14
|
+
const url = this.resolveURL(`/${AccountEndpoints.Limits}/${accountId}`);
|
|
15
|
+
return this.GET(url);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export { AccountService };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseService } from "./
|
|
1
|
+
import { BaseService } from "./baseService";
|
|
2
2
|
import type { TokenData, NodeTokenData } from "../../types/banking/oauth/tokenData";
|
|
3
3
|
import type { IGenerateLimitedTokenData } from "../../types/api/data/auth";
|
|
4
|
-
import type { AuthServiceParameters } from "../../types/api/service/
|
|
4
|
+
import type { AuthServiceParameters } from "../../types/api/service/authService";
|
|
5
5
|
declare class AuthService extends BaseService {
|
|
6
6
|
protected endpoint: string;
|
|
7
7
|
constructor(data: AuthServiceParameters);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import type { BaseServiceParameters, ServiceRequestOptions } from "../../types/api/service/
|
|
2
|
+
import type { BaseServiceParameters, ServiceRequestOptions } from "../../types/api/service/baseService";
|
|
3
3
|
import type { ClientContextProvider } from "../../types/api/context/clientContext";
|
|
4
4
|
import type { BaseResult } from "../../types/banking/common/baseresult";
|
|
5
5
|
import { ApiResponse, CookiesHelper, ErrorHandler } from "../..";
|
|
@@ -17,7 +17,7 @@ class BaseService {
|
|
|
17
17
|
}
|
|
18
18
|
// #region "Interceptors Handlers"
|
|
19
19
|
async onRequest(req) {
|
|
20
|
-
await AxiosHelper.injectBaseHeaders(req, this.context, this.cookiesHelper);
|
|
20
|
+
await AxiosHelper.injectBaseHeaders(req, this.context, this.cookiesHelper, this.axiosInstance);
|
|
21
21
|
AxiosHelper.injectBaseBodyProperties(req);
|
|
22
22
|
return req;
|
|
23
23
|
}
|
|
@@ -29,6 +29,7 @@ class BaseService {
|
|
|
29
29
|
return ResponseHelper.onError(err);
|
|
30
30
|
}
|
|
31
31
|
// #endregion
|
|
32
|
+
// #region "HTTP Methods"
|
|
32
33
|
async GET(url, options) {
|
|
33
34
|
const response = await this.axiosInstance.get(url, this.buildConfig(options));
|
|
34
35
|
return ResponseHelper.getApiResponse(response);
|
|
@@ -45,6 +46,8 @@ class BaseService {
|
|
|
45
46
|
const response = await this.axiosInstance.delete(url, this.buildConfig(options));
|
|
46
47
|
return ResponseHelper.getApiResponse(response);
|
|
47
48
|
}
|
|
49
|
+
// #endregion
|
|
50
|
+
// #region "Helpers"
|
|
48
51
|
resolveURL(path = "") {
|
|
49
52
|
const p = path.toString().trim();
|
|
50
53
|
const normalized = p && !p.startsWith("/") ? `/${p}` : p;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./user";
|
|
1
|
+
export * from "./accountService";
|
|
2
|
+
export * from "./authService";
|
|
3
|
+
export * from "./baseService";
|
|
4
|
+
export * from "./blockchainService";
|
|
5
|
+
export * from "./limitedService";
|
|
6
|
+
export * from "./orderService";
|
|
7
|
+
export * from "./organizationService";
|
|
8
|
+
export * from "./programService";
|
|
9
|
+
export * from "./promotionService";
|
|
10
|
+
export * from "./transactionService";
|
|
11
|
+
export * from "./userService";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./user";
|
|
1
|
+
export * from "./accountService";
|
|
2
|
+
export * from "./authService";
|
|
3
|
+
export * from "./baseService";
|
|
4
|
+
export * from "./blockchainService";
|
|
5
|
+
export * from "./limitedService";
|
|
6
|
+
export * from "./orderService";
|
|
7
|
+
export * from "./organizationService";
|
|
8
|
+
export * from "./programService";
|
|
9
|
+
export * from "./promotionService";
|
|
10
|
+
export * from "./transactionService";
|
|
11
|
+
export * from "./userService";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseService } from "./
|
|
1
|
+
import { BaseService } from "./baseService";
|
|
2
2
|
import type { ConfirmUserSecurity, ForgetSecurityData, ValidateLimitedSecurity, VerifyUserSecurity, LimitedServiceParameters } from "../../types";
|
|
3
3
|
declare class LimitedService extends BaseService {
|
|
4
4
|
protected endpoint: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Endpoints, LimitedEndpoints } from "../../constant/constant";
|
|
2
2
|
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
3
|
-
import { AuthService } from "./
|
|
4
|
-
import { BaseService } from "./
|
|
3
|
+
import { AuthService } from "./authService";
|
|
4
|
+
import { BaseService } from "./baseService";
|
|
5
5
|
class LimitedService extends BaseService {
|
|
6
6
|
endpoint = Endpoints.Limited;
|
|
7
7
|
authService;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Endpoints } from "../../constant/constant";
|
|
2
|
+
import { BaseService } from "./baseService";
|
|
3
|
+
class OrderService extends BaseService {
|
|
4
|
+
endpoint = Endpoints.Order;
|
|
5
|
+
constructor(data) {
|
|
6
|
+
super(data);
|
|
7
|
+
}
|
|
8
|
+
// #region "POST"
|
|
9
|
+
create(data) {
|
|
10
|
+
const url = this.resolveURL();
|
|
11
|
+
return this.POST(url, data);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export { OrderService };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseService } from "./
|
|
1
|
+
import { BaseService } from "./baseService";
|
|
2
2
|
import type { DocumentData, OrganizationData, OrganizationServiceParameters } from "../../types";
|
|
3
3
|
declare class OrganizationService extends BaseService {
|
|
4
4
|
protected endpoint: string;
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { Endpoints, OrganizationEndpoints } from "../../constant/constant";
|
|
2
|
-
import { BaseService } from "./
|
|
3
|
-
import { IPAddressAndLocationService } from "./ipAddressAndLocation";
|
|
4
|
-
import { GeoHelper } from "../../helper/geoHelper";
|
|
5
|
-
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
2
|
+
import { BaseService } from "./baseService";
|
|
6
3
|
class OrganizationService extends BaseService {
|
|
7
4
|
endpoint = Endpoints.Organization;
|
|
8
5
|
constructor(data) {
|
|
9
6
|
super(data);
|
|
10
|
-
this.axiosInstance.interceptors.request.use(async (req) => {
|
|
11
|
-
const locationService = new IPAddressAndLocationService(data);
|
|
12
|
-
const geoCoordinates = await GeoHelper.getGeoCoordinates(locationService);
|
|
13
|
-
AxiosHelper.injectGeoCoordinates(req, geoCoordinates);
|
|
14
|
-
return req;
|
|
15
|
-
});
|
|
16
7
|
}
|
|
17
8
|
// #region "GET"
|
|
18
9
|
get(id) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseService } from "./
|
|
1
|
+
import { BaseService } from "./baseService";
|
|
2
2
|
import type { GGEZGiftRewards, PromotionDetails, PromotionIncrementResult, PromotionServiceParameters, TwitterSpotlightPostIdsResult } from "../../types";
|
|
3
3
|
declare class PromotionService extends BaseService {
|
|
4
4
|
protected endpoint: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BaseService } from "./
|
|
1
|
+
import { BaseService } from "./baseService";
|
|
2
2
|
import type { TransactionData } from "../../types/banking/transaction/transactionData";
|
|
3
3
|
import type { TransactionInquiry } from "../../types/banking/transaction/transactionInquiry";
|
|
4
4
|
import type { TransactionResultInquiry } from "../../types/banking/transaction/transactionResultInquiry";
|
|
5
|
-
import type { TransactionServiceParameters } from "../../types/api/service/
|
|
5
|
+
import type { TransactionServiceParameters } from "../../types/api/service/transactionService";
|
|
6
6
|
declare class TransactionService extends BaseService {
|
|
7
7
|
protected endpoint: string;
|
|
8
8
|
constructor(data: TransactionServiceParameters);
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { Endpoints, TransactionEndpoints } from "../../constant/constant";
|
|
2
|
-
import { BaseService } from "./
|
|
3
|
-
import { IPAddressAndLocationService } from "./ipAddressAndLocation";
|
|
4
|
-
import { GeoHelper } from "../../helper/geoHelper";
|
|
5
|
-
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
2
|
+
import { BaseService } from "./baseService";
|
|
6
3
|
class TransactionService extends BaseService {
|
|
7
4
|
endpoint = Endpoints.Transaction;
|
|
8
5
|
constructor(data) {
|
|
9
6
|
super(data);
|
|
10
|
-
this.axiosInstance.interceptors.request.use(async (req) => {
|
|
11
|
-
const locationService = new IPAddressAndLocationService(data);
|
|
12
|
-
const geoCoordinates = await GeoHelper.getGeoCoordinates(locationService);
|
|
13
|
-
AxiosHelper.injectGeoCoordinates(req, geoCoordinates);
|
|
14
|
-
return req;
|
|
15
|
-
});
|
|
16
7
|
}
|
|
17
8
|
// #region "GET"
|
|
18
9
|
inquiry(payload) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BaseService } from "./
|
|
1
|
+
import { BaseService } from "./baseService";
|
|
2
2
|
import type { ConfirmUserSecurity } from "../../types/banking/user/confirmUserSecurity";
|
|
3
3
|
import type { DocumentData } from "../../types/banking/user/documentdata";
|
|
4
4
|
import type { ResetUserSecurity } from "../../types/banking/user/resetUserSecurity";
|
|
5
5
|
import type { UserData } from "../../types/banking/user/userdata";
|
|
6
|
-
import type { UserServiceParameters } from "../../types/api/service/
|
|
6
|
+
import type { UserServiceParameters } from "../../types/api/service/userService";
|
|
7
7
|
import type { ValidateUserSecurity } from "../../types/banking/user/validateUserSecurity";
|
|
8
8
|
import type { VerifyUserSecurity } from "../../types/banking/user/verifyUserSecurity";
|
|
9
9
|
declare class UserService extends BaseService {
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { Endpoints, UserEndpoints } from "../../constant/constant";
|
|
2
|
-
import { AuthService } from "./
|
|
3
|
-
import { BaseService } from "./base";
|
|
4
|
-
import { IPAddressAndLocationService } from "./ipAddressAndLocation";
|
|
2
|
+
import { AuthService } from "./authService";
|
|
5
3
|
import { AxiosHelper } from "../../helper/api/axiosHelper";
|
|
6
|
-
import {
|
|
4
|
+
import { BaseService } from "./baseService";
|
|
7
5
|
class UserService extends BaseService {
|
|
8
6
|
endpoint = Endpoints.User;
|
|
9
7
|
authService;
|
|
10
8
|
constructor(data) {
|
|
11
9
|
super(data);
|
|
12
10
|
this.authService = new AuthService(data);
|
|
13
|
-
this.axiosInstance.interceptors.request.use(async (req) => {
|
|
14
|
-
const locationService = new IPAddressAndLocationService(data);
|
|
15
|
-
const geoCoordinates = await GeoHelper.getGeoCoordinates(locationService);
|
|
16
|
-
AxiosHelper.injectGeoCoordinates(req, geoCoordinates);
|
|
17
|
-
return req;
|
|
18
|
-
});
|
|
19
11
|
}
|
|
20
12
|
async userId() {
|
|
21
13
|
return await this.cookiesHelper.getUserId();
|