ggez-banking-sdk 0.4.5 → 0.4.6
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/data/result.d.ts +2 -6
- package/dist/api/data/result.js +3 -15
- package/dist/api/proxy/account.d.ts +2 -2
- package/dist/api/proxy/auth.d.ts +4 -4
- package/dist/api/proxy/blockchain.d.ts +4 -4
- package/dist/api/proxy/limited.d.ts +9 -9
- package/dist/api/proxy/order.d.ts +1 -1
- package/dist/api/proxy/organization.d.ts +5 -5
- package/dist/api/proxy/program.d.ts +3 -3
- package/dist/api/proxy/promotion.d.ts +3 -5
- package/dist/api/proxy/transaction.d.ts +5 -5
- package/dist/api/proxy/user.d.ts +76 -76
- package/dist/api/service/account.d.ts +2 -2
- package/dist/api/service/auth.d.ts +2 -2
- package/dist/api/service/base.d.ts +8 -7
- package/dist/api/service/base.js +18 -14
- package/dist/api/service/blockchain.d.ts +4 -4
- package/dist/api/service/ipAddressAndLocation.d.ts +2 -2
- package/dist/api/service/limited.d.ts +6 -6
- package/dist/api/service/order.d.ts +1 -1
- package/dist/api/service/organization.d.ts +5 -5
- package/dist/api/service/program.d.ts +3 -3
- package/dist/api/service/promotion.d.ts +4 -6
- package/dist/api/service/transaction.d.ts +2 -2
- package/dist/api/service/user.d.ts +64 -64
- package/dist/auth.d.ts +0 -1
- package/dist/helper/api/responseHelper.d.ts +5 -12
- package/dist/helper/api/responseHelper.js +29 -12
- package/dist/helper/geoHelper.js +6 -6
- package/dist/types/api/api.d.ts +9 -0
- package/dist/types/api/index.d.ts +1 -1
- package/dist/types/api/service/base.d.ts +8 -0
- package/dist/types/api/service/ipAddressAndLocation.d.ts +5 -0
- package/dist/types/api/service/promotion.d.ts +8 -0
- package/dist/types/helper/geoHelper.d.ts +3 -2
- package/dist/types/node/promotionDetails.d.ts +2 -1
- package/package.json +1 -1
- package/dist/types/api/client/auth.d.ts +0 -17
- package/dist/types/api/client/clientData.d.ts +0 -22
- package/dist/types/api/client/clientData.js +0 -1
- package/dist/types/api/client/index.d.ts +0 -3
- package/dist/types/api/client/index.js +0 -1
- package/dist/types/api/client/openPayd.d.ts +0 -9
- package/dist/types/api/client/openPayd.js +0 -1
- /package/dist/types/api/{client/auth.js → api.js} +0 -0
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { BaseResult } from "../../types/banking/common/baseresult";
|
|
2
|
-
import type { Result } from "../../types/banking/common/result";
|
|
3
2
|
declare const createDefaultBaseResult: (overrides?: Partial<BaseResult>) => BaseResult;
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
}>(responseData: K) => Result;
|
|
7
|
-
declare const fillResultByError: (error: any) => Result;
|
|
8
|
-
export { createDefaultBaseResult, fillResult, fillResultByError };
|
|
3
|
+
declare const fillResultByError: (error: any) => BaseResult;
|
|
4
|
+
export { createDefaultBaseResult, fillResultByError };
|
package/dist/api/data/result.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HttpStatusCode } from "axios";
|
|
2
|
-
import { SystemResponses } from "../../constant";
|
|
3
2
|
const createDefaultBaseResult = (overrides) => ({
|
|
4
3
|
result: null,
|
|
5
4
|
notes: null,
|
|
@@ -12,18 +11,6 @@ const createDefaultBaseResult = (overrides) => ({
|
|
|
12
11
|
time_zone_name: null,
|
|
13
12
|
...overrides,
|
|
14
13
|
});
|
|
15
|
-
const fillResult = (responseData) => {
|
|
16
|
-
if (responseData.error) {
|
|
17
|
-
const result = fillResultByError(responseData.error);
|
|
18
|
-
responseData.result = result;
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
code: SystemResponses.Approved,
|
|
22
|
-
message: "Operation Completed Successfully",
|
|
23
|
-
friendly_message: "Operation Completed Successfully",
|
|
24
|
-
description: "Operation Completed Successfully",
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
14
|
const fillResultByError = (error) => {
|
|
28
15
|
const result = {
|
|
29
16
|
code: HttpStatusCode.BadRequest.toString(),
|
|
@@ -31,6 +18,7 @@ const fillResultByError = (error) => {
|
|
|
31
18
|
friendly_message: error.data?.error || error.message || error.toString(),
|
|
32
19
|
description: error.data?.error || error.message || error.toString(),
|
|
33
20
|
};
|
|
34
|
-
|
|
21
|
+
const baseResult = createDefaultBaseResult({ result });
|
|
22
|
+
return baseResult;
|
|
35
23
|
};
|
|
36
|
-
export { createDefaultBaseResult,
|
|
24
|
+
export { createDefaultBaseResult, fillResultByError };
|
|
@@ -4,7 +4,7 @@ import { BaseProxy } from "./base";
|
|
|
4
4
|
declare class AccountProxy extends BaseProxy {
|
|
5
5
|
private accountService;
|
|
6
6
|
constructor(context: ClientContextProvider, errorHandler: ErrorHandler);
|
|
7
|
-
get: (accountId: number) => Promise<import("
|
|
8
|
-
getLimits: (accountId: number) => Promise<import("
|
|
7
|
+
get: (accountId: number) => Promise<import("../..").ApiResponse<import("../..").AccountData>>;
|
|
8
|
+
getLimits: (accountId: number) => Promise<import("../..").ApiResponse<import("../..").AccountData>>;
|
|
9
9
|
}
|
|
10
10
|
export { AccountProxy };
|
package/dist/api/proxy/auth.d.ts
CHANGED
|
@@ -9,9 +9,9 @@ declare class AuthProxy {
|
|
|
9
9
|
private cookiesHelper;
|
|
10
10
|
constructor(context: ClientContextProvider, authService: AuthService, cookiesHelper: CookiesHelper);
|
|
11
11
|
private login;
|
|
12
|
-
loginUserCredentials(data: ILoginUserCredentialsData): Promise<import("
|
|
13
|
-
loginDeviceCredentials(data: ILoginDeviceCredentialsData): Promise<import("
|
|
14
|
-
loginGoogleCredentials(data: ILoginGoogleCredentialsData): Promise<import("
|
|
15
|
-
generateLimitedToken(data: IGenerateLimitedTokenData): Promise<import("
|
|
12
|
+
loginUserCredentials(data: ILoginUserCredentialsData): Promise<import("../..").ApiResponse<import("../..").TokenData>>;
|
|
13
|
+
loginDeviceCredentials(data: ILoginDeviceCredentialsData): Promise<import("../..").ApiResponse<import("../..").TokenData>>;
|
|
14
|
+
loginGoogleCredentials(data: ILoginGoogleCredentialsData): Promise<import("../..").ApiResponse<import("../..").TokenData>>;
|
|
15
|
+
generateLimitedToken(data: IGenerateLimitedTokenData): Promise<import("../..").ApiResponse<import("../..").NodeTokenData>>;
|
|
16
16
|
}
|
|
17
17
|
export { AuthProxy };
|
|
@@ -4,9 +4,9 @@ import { BaseProxy } from "./base";
|
|
|
4
4
|
declare class BlockchainProxy extends BaseProxy {
|
|
5
5
|
private blockchainService;
|
|
6
6
|
constructor(context: ClientContextProvider, errorHandler: ErrorHandler);
|
|
7
|
-
send: (data: IBlockchainSendRequestData) => Promise<import("
|
|
8
|
-
multiSend: (data: IBlockchainMultiSendRequestData) => Promise<import("
|
|
9
|
-
delegate: (data: IBlockchainDelegateRequestData) => Promise<import("
|
|
10
|
-
undelegate: (data: IBlockchainUndelegateRequestData) => Promise<import("
|
|
7
|
+
send: (data: IBlockchainSendRequestData) => Promise<import("../..").ApiResponse<import("../..").BlockchainData>>;
|
|
8
|
+
multiSend: (data: IBlockchainMultiSendRequestData) => Promise<import("../..").ApiResponse<import("../..").BlockchainData>>;
|
|
9
|
+
delegate: (data: IBlockchainDelegateRequestData) => Promise<import("../..").ApiResponse<import("../..").BlockchainData>>;
|
|
10
|
+
undelegate: (data: IBlockchainUndelegateRequestData) => Promise<import("../..").ApiResponse<import("../..").BlockchainData>>;
|
|
11
11
|
}
|
|
12
12
|
export { BlockchainProxy };
|
|
@@ -4,14 +4,14 @@ import { BaseProxy } from "./base";
|
|
|
4
4
|
declare class LimitedProxy extends BaseProxy {
|
|
5
5
|
private limitedService;
|
|
6
6
|
constructor(context: ClientContextProvider, errorHandler: ErrorHandler);
|
|
7
|
-
checkForgetPassword: (data: ICheckForgetPasswordData) => Promise<import("
|
|
8
|
-
validateForgetPassword: (data: IValidateForgetPasswordData) => Promise<import("
|
|
9
|
-
confirmForgetPassword: (data: IConfirmForgetPasswordData) => Promise<import("
|
|
10
|
-
validateEmail: (data: IValidateEmailData) => Promise<import("
|
|
11
|
-
validatePhone: (data: IValidatePhoneData) => Promise<import("
|
|
12
|
-
verifyEmail: (data: IVerifyEmailData) => Promise<import("
|
|
13
|
-
verifyPhone: (data: IVerifyPhoneData) => Promise<import("
|
|
14
|
-
confirmEmail: (data: IConfirmEmailData) => Promise<import("
|
|
15
|
-
confirmPhone: (data: IConfirmPhoneData) => Promise<import("
|
|
7
|
+
checkForgetPassword: (data: ICheckForgetPasswordData) => Promise<import("../..").ApiResponse<import("../..").ForgetSecurityData>>;
|
|
8
|
+
validateForgetPassword: (data: IValidateForgetPasswordData) => Promise<import("../..").ApiResponse<import("../..").ForgetSecurityData>>;
|
|
9
|
+
confirmForgetPassword: (data: IConfirmForgetPasswordData) => Promise<import("../..").ApiResponse<import("../..").ForgetSecurityData>>;
|
|
10
|
+
validateEmail: (data: IValidateEmailData) => Promise<import("../..").ApiResponse<import("../..").ValidateLimitedSecurity>>;
|
|
11
|
+
validatePhone: (data: IValidatePhoneData) => Promise<import("../..").ApiResponse<import("../..").ValidateLimitedSecurity>>;
|
|
12
|
+
verifyEmail: (data: IVerifyEmailData) => Promise<import("../..").ApiResponse<import("../..").VerifyUserSecurity>>;
|
|
13
|
+
verifyPhone: (data: IVerifyPhoneData) => Promise<import("../..").ApiResponse<import("../..").VerifyUserSecurity>>;
|
|
14
|
+
confirmEmail: (data: IConfirmEmailData) => Promise<import("../..").ApiResponse<import("../..").ConfirmUserSecurity>>;
|
|
15
|
+
confirmPhone: (data: IConfirmPhoneData) => Promise<import("../..").ApiResponse<import("../..").ConfirmUserSecurity>>;
|
|
16
16
|
}
|
|
17
17
|
export { LimitedProxy };
|
|
@@ -4,6 +4,6 @@ import { BaseProxy } from "./base";
|
|
|
4
4
|
declare class OrderProxy extends BaseProxy {
|
|
5
5
|
private orderService;
|
|
6
6
|
constructor(context: ClientContextProvider, errorHandler: ErrorHandler);
|
|
7
|
-
createOrder: (data: ICreateOrderData) => Promise<import("
|
|
7
|
+
createOrder: (data: ICreateOrderData) => Promise<import("../..").ApiResponse<import("../..").OrderData>>;
|
|
8
8
|
}
|
|
9
9
|
export { OrderProxy };
|
|
@@ -6,10 +6,10 @@ declare class OrganizationProxy extends BaseProxy {
|
|
|
6
6
|
private context;
|
|
7
7
|
private organizationService;
|
|
8
8
|
constructor(context: ClientContextProvider, errorHandler: ErrorHandler);
|
|
9
|
-
getOrganization: (id: number) => Promise<import("
|
|
10
|
-
createOrganization: (data: ICreateOrganizationData) => Promise<import("
|
|
11
|
-
uploadDocument: (data: IUploadOrganizationDocumentData) => Promise<import("
|
|
12
|
-
updateOrganization: (data: IUpdateOrganizationData) => Promise<import("
|
|
13
|
-
deleteOrganization: (id: number) => Promise<import("
|
|
9
|
+
getOrganization: (id: number) => Promise<import("../..").ApiResponse<import("../..").OrganizationData>>;
|
|
10
|
+
createOrganization: (data: ICreateOrganizationData) => Promise<import("../..").ApiResponse<import("../..").OrganizationData>>;
|
|
11
|
+
uploadDocument: (data: IUploadOrganizationDocumentData) => Promise<import("../..").ApiResponse<import("../..").DocumentData>>;
|
|
12
|
+
updateOrganization: (data: IUpdateOrganizationData) => Promise<import("../..").ApiResponse<import("../..").OrganizationData>>;
|
|
13
|
+
deleteOrganization: (id: number) => Promise<import("../..").ApiResponse<import("../..").OrganizationData>>;
|
|
14
14
|
}
|
|
15
15
|
export { OrganizationProxy };
|
|
@@ -4,8 +4,8 @@ import { BaseProxy } from "./base";
|
|
|
4
4
|
declare class ProgramProxy extends BaseProxy {
|
|
5
5
|
private programService;
|
|
6
6
|
constructor(context: ClientContextProvider, errorHandler: ErrorHandler);
|
|
7
|
-
getSystemFeatures: () => Promise<import("
|
|
8
|
-
getBin: () => Promise<import("
|
|
9
|
-
getSignUp: () => Promise<import("
|
|
7
|
+
getSystemFeatures: () => Promise<import("../..").ApiResponse<import("../../types/banking/program").ProgramData>>;
|
|
8
|
+
getBin: () => Promise<import("../..").ApiResponse<import("../../types/banking/program").ProgramData>>;
|
|
9
|
+
getSignUp: () => Promise<import("../..").ApiResponse<import("../../types/banking/program").ProgramData>>;
|
|
10
10
|
}
|
|
11
11
|
export { ProgramProxy };
|
|
@@ -4,10 +4,8 @@ import { BaseProxy } from "./base";
|
|
|
4
4
|
declare class PromotionProxy extends BaseProxy {
|
|
5
5
|
private promotionService;
|
|
6
6
|
constructor(context: ClientContextProvider, errorHandler: ErrorHandler);
|
|
7
|
-
getPromotionByCode: (code: string) => Promise<import("
|
|
8
|
-
getTwitterSpotlightPostIds: () => Promise<import("
|
|
9
|
-
incrementPromotionParticipants: (data: GGEZGiftRewards) => Promise<import("
|
|
10
|
-
message: string;
|
|
11
|
-
}, any, {}>>;
|
|
7
|
+
getPromotionByCode: (code: string) => Promise<import("../..").ApiResponse<import("../..").PromotionDetails>>;
|
|
8
|
+
getTwitterSpotlightPostIds: () => Promise<import("../..").ApiResponse<import("../..").TwitterSpotlightPostIdsResult>>;
|
|
9
|
+
incrementPromotionParticipants: (data: GGEZGiftRewards) => Promise<import("../..").ApiResponse<import("../..").PromotionIncrementResult>>;
|
|
12
10
|
}
|
|
13
11
|
export { PromotionProxy };
|
|
@@ -4,10 +4,10 @@ import { BaseProxy } from "./base";
|
|
|
4
4
|
declare class TransactionProxy extends BaseProxy {
|
|
5
5
|
private transactionService;
|
|
6
6
|
constructor(context: ClientContextProvider, errorHandler: ErrorHandler);
|
|
7
|
-
inquiryTransaction: (params: IInquiryTransactionData) => Promise<import("
|
|
8
|
-
createSystemTransaction: (data: ICreateSystemTransactionData) => Promise<import("
|
|
9
|
-
createBlockchainTransaction: (data: ICreateBlockchainTransactionData) => Promise<import("
|
|
10
|
-
createBlockchainTransferTransaction: (data: ICreateBlockchainTransferTransactionData) => Promise<import("
|
|
11
|
-
createGatewayCryptoTransaction: (data: ICreateGatewayCryptoTransactionData) => Promise<import("
|
|
7
|
+
inquiryTransaction: (params: IInquiryTransactionData) => Promise<import("../..").ApiResponse<import("../..").TransactionResultInquiry>>;
|
|
8
|
+
createSystemTransaction: (data: ICreateSystemTransactionData) => Promise<import("../..").ApiResponse<import("../..").TransactionData>>;
|
|
9
|
+
createBlockchainTransaction: (data: ICreateBlockchainTransactionData) => Promise<import("../..").ApiResponse<import("../..").TransactionData>>;
|
|
10
|
+
createBlockchainTransferTransaction: (data: ICreateBlockchainTransferTransactionData) => Promise<import("../..").ApiResponse<import("../..").TransactionData>>;
|
|
11
|
+
createGatewayCryptoTransaction: (data: ICreateGatewayCryptoTransactionData) => Promise<import("../..").ApiResponse<import("../..").TransactionData>>;
|
|
12
12
|
}
|
|
13
13
|
export { TransactionProxy };
|
package/dist/api/proxy/user.d.ts
CHANGED
|
@@ -6,81 +6,81 @@ import { BaseProxy } from "./base";
|
|
|
6
6
|
declare class UserProxy extends BaseProxy {
|
|
7
7
|
private userService;
|
|
8
8
|
constructor(context: ClientContextProvider, errorHandler: ErrorHandler);
|
|
9
|
-
getUser: () => Promise<import("
|
|
10
|
-
getTermsAndConditions: () => Promise<import("
|
|
11
|
-
getSecurity: () => Promise<import("
|
|
12
|
-
getPhone: () => Promise<import("
|
|
13
|
-
getPreferences: () => Promise<import("
|
|
14
|
-
getPersonalInfo: () => Promise<import("
|
|
15
|
-
getLatestHistory: () => Promise<import("
|
|
16
|
-
getIdentification: () => Promise<import("
|
|
17
|
-
getHistory: () => Promise<import("
|
|
18
|
-
getGroup: () => Promise<import("
|
|
19
|
-
getExternalAuth: () => Promise<import("
|
|
20
|
-
getEmail: () => Promise<import("
|
|
21
|
-
getDocuments: () => Promise<import("
|
|
22
|
-
getCurrency: () => Promise<import("
|
|
23
|
-
getCreditCard: () => Promise<import("
|
|
24
|
-
getBankAccount: () => Promise<import("
|
|
25
|
-
getAddress: () => Promise<import("
|
|
26
|
-
getAccount: () => Promise<import("
|
|
27
|
-
getSecurityOperations: () => Promise<import("
|
|
28
|
-
getDeviceHistory: () => Promise<import("
|
|
29
|
-
createUser: (data: ICreateUserData) => Promise<import("
|
|
30
|
-
createUserWithGoogle: (data: ICreateUserWithGoogleData) => Promise<import("
|
|
31
|
-
createPhone: (data: ICreatePhoneData) => Promise<import("
|
|
32
|
-
createIdentification: (data: ICreateIdentificationData) => Promise<import("
|
|
33
|
-
createExternalAuth: (data: any) => Promise<import("
|
|
34
|
-
createEmail: (data: ICreateEmailData) => Promise<import("
|
|
35
|
-
createCurrency: (data: any) => Promise<import("
|
|
36
|
-
createCreditCard: (data: any) => Promise<import("
|
|
37
|
-
createTicket: (data: ICreateTicketData) => Promise<import("
|
|
38
|
-
createBankAccount: (data: ICreateBankAccountData) => Promise<import("
|
|
39
|
-
createAddress: (data: ICreateAddressData) => Promise<import("
|
|
40
|
-
createDevice: (data: ICreateDeviceData) => Promise<import("
|
|
41
|
-
securityAccess: (data: any) => Promise<import("
|
|
42
|
-
uploadDocument: (data: IUploadDocumentData) => Promise<import("
|
|
43
|
-
updateProfilePicture: (data: IUploadProfilePictureData) => Promise<import("
|
|
44
|
-
verifySecurityData: (data: any) => Promise<import("
|
|
45
|
-
verifyEmail: (data: IVerifyEmailData) => Promise<import("
|
|
46
|
-
sendEmailOTP: (data: ISendEmailOTPData) => Promise<import("
|
|
47
|
-
verifyPhone: (data: IVerifyPhoneData) => Promise<import("
|
|
48
|
-
sendPhoneOTP: (data: ISendPhoneOTPData) => Promise<import("
|
|
49
|
-
verifyDevice: (data: IVerifyDeviceData) => Promise<import("
|
|
50
|
-
confirmSecurityData: (data: any) => Promise<import("
|
|
51
|
-
confirmEmail: (data: IConfirmEmailData) => Promise<import("
|
|
52
|
-
confirmPhone: (data: IConfirmPhoneData) => Promise<import("
|
|
53
|
-
confirmDevice: (data: IConfirmDeviceData) => Promise<import("
|
|
54
|
-
resetSecurityData: (data: ResetUserSecurity) => Promise<import("
|
|
55
|
-
enrollGoogleAuth: () => Promise<import("
|
|
56
|
-
activateGoogleAuth: (data: IActivateGoogleAuthData) => Promise<import("
|
|
57
|
-
deleteGoogleAuth: (data: IDeleteGoogleAuthData) => Promise<import("
|
|
58
|
-
deactivateGoogleAuth: (data: IDeactivateGoogleAuthData) => Promise<import("
|
|
59
|
-
updateUser: (data: any) => Promise<import("
|
|
60
|
-
resetPassword: (data: IResetPasswordData) => Promise<import("
|
|
61
|
-
resetSecurityCode: (data: IResetSecurityCodeData) => Promise<import("
|
|
62
|
-
resetSecurityQuestions: (data: IResetSecurityQuestionsData) => Promise<import("
|
|
63
|
-
validateSecurityCode: (data: IValidateSecurityCodeData) => Promise<import("
|
|
64
|
-
updatePreferences: (data: IUpdatePreferencesData) => Promise<import("
|
|
65
|
-
updatePhone: (data: IUpdatePhoneData) => Promise<import("
|
|
66
|
-
makePhonePrimary: (data: IMakePhonePrimaryData) => Promise<import("
|
|
67
|
-
updatePersonalInfo: (data: IUpdatePersonalInfoData) => Promise<import("
|
|
68
|
-
updateIdentification: (data: IUpdateIdentificationData) => Promise<import("
|
|
69
|
-
updateExternalAuth: (data: any) => Promise<import("
|
|
70
|
-
updateEmail: (data: IUpdateEmailData) => Promise<import("
|
|
71
|
-
makeEmailPrimary: (data: IMakeEmailPrimaryData) => Promise<import("
|
|
72
|
-
updateBankAccount: (data: IUpdateBankAccountData) => Promise<import("
|
|
73
|
-
makeBankAccountPrimary: (data: IMakeBankAccountPrimaryData) => Promise<import("
|
|
74
|
-
updateAddress: (data: IUpdateAddressData) => Promise<import("
|
|
75
|
-
makeAddressPrimary: (data: IMakeAddressPrimaryData) => Promise<import("
|
|
76
|
-
updateDevice: (data: IUpdateDeviceData) => Promise<import("
|
|
77
|
-
logoutDevice: (data: ILogoutDeviceData) => Promise<import("
|
|
78
|
-
updateUserType: (data: IUpdateUserTypeData) => Promise<import("
|
|
79
|
-
deleteAddress: (data: IDeleteAddressData) => Promise<import("
|
|
80
|
-
deleteBankAccount: (data: IDeleteBankAccountData) => Promise<import("
|
|
81
|
-
deleteDevice: (data: IDeleteDeviceData) => Promise<import("
|
|
82
|
-
deleteEmail: (data: IDeleteEmailData) => Promise<import("
|
|
83
|
-
deleteIdentification: (data: IDeleteIdentificationData) => Promise<import("
|
|
84
|
-
deletePhone: (data: IDeletePhoneData) => Promise<import("
|
|
9
|
+
getUser: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
10
|
+
getTermsAndConditions: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
11
|
+
getSecurity: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
12
|
+
getPhone: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
13
|
+
getPreferences: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
14
|
+
getPersonalInfo: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
15
|
+
getLatestHistory: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
16
|
+
getIdentification: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
17
|
+
getHistory: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
18
|
+
getGroup: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
19
|
+
getExternalAuth: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
20
|
+
getEmail: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
21
|
+
getDocuments: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
22
|
+
getCurrency: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
23
|
+
getCreditCard: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
24
|
+
getBankAccount: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
25
|
+
getAddress: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
26
|
+
getAccount: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
27
|
+
getSecurityOperations: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
28
|
+
getDeviceHistory: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
29
|
+
createUser: (data: ICreateUserData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
30
|
+
createUserWithGoogle: (data: ICreateUserWithGoogleData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
31
|
+
createPhone: (data: ICreatePhoneData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
32
|
+
createIdentification: (data: ICreateIdentificationData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
33
|
+
createExternalAuth: (data: any) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
34
|
+
createEmail: (data: ICreateEmailData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
35
|
+
createCurrency: (data: any) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
36
|
+
createCreditCard: (data: any) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
37
|
+
createTicket: (data: ICreateTicketData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
38
|
+
createBankAccount: (data: ICreateBankAccountData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
39
|
+
createAddress: (data: ICreateAddressData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
40
|
+
createDevice: (data: ICreateDeviceData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
41
|
+
securityAccess: (data: any) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
42
|
+
uploadDocument: (data: IUploadDocumentData) => Promise<import("../..").ApiResponse<import("../..").DocumentData>>;
|
|
43
|
+
updateProfilePicture: (data: IUploadProfilePictureData) => Promise<import("../..").ApiResponse<import("../..").DocumentData>>;
|
|
44
|
+
verifySecurityData: (data: any) => Promise<import("../..").ApiResponse<import("../..").VerifyUserSecurity>>;
|
|
45
|
+
verifyEmail: (data: IVerifyEmailData) => Promise<import("../..").ApiResponse<import("../..").VerifyUserSecurity>>;
|
|
46
|
+
sendEmailOTP: (data: ISendEmailOTPData) => Promise<import("../..").ApiResponse<import("../..").VerifyUserSecurity>>;
|
|
47
|
+
verifyPhone: (data: IVerifyPhoneData) => Promise<import("../..").ApiResponse<import("../..").VerifyUserSecurity>>;
|
|
48
|
+
sendPhoneOTP: (data: ISendPhoneOTPData) => Promise<import("../..").ApiResponse<import("../..").VerifyUserSecurity>>;
|
|
49
|
+
verifyDevice: (data: IVerifyDeviceData) => Promise<import("../..").ApiResponse<import("../..").VerifyUserSecurity>>;
|
|
50
|
+
confirmSecurityData: (data: any) => Promise<import("../..").ApiResponse<import("../..").ConfirmUserSecurity>>;
|
|
51
|
+
confirmEmail: (data: IConfirmEmailData) => Promise<import("../..").ApiResponse<import("../..").ConfirmUserSecurity>>;
|
|
52
|
+
confirmPhone: (data: IConfirmPhoneData) => Promise<import("../..").ApiResponse<import("../..").ConfirmUserSecurity>>;
|
|
53
|
+
confirmDevice: (data: IConfirmDeviceData) => Promise<import("../..").ApiResponse<import("../..").ConfirmUserSecurity>>;
|
|
54
|
+
resetSecurityData: (data: ResetUserSecurity) => Promise<import("../..").ApiResponse<ResetUserSecurity>>;
|
|
55
|
+
enrollGoogleAuth: () => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
56
|
+
activateGoogleAuth: (data: IActivateGoogleAuthData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
57
|
+
deleteGoogleAuth: (data: IDeleteGoogleAuthData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
58
|
+
deactivateGoogleAuth: (data: IDeactivateGoogleAuthData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
59
|
+
updateUser: (data: any) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
60
|
+
resetPassword: (data: IResetPasswordData) => Promise<import("../..").ApiResponse<ResetUserSecurity>>;
|
|
61
|
+
resetSecurityCode: (data: IResetSecurityCodeData) => Promise<import("../..").ApiResponse<ResetUserSecurity>>;
|
|
62
|
+
resetSecurityQuestions: (data: IResetSecurityQuestionsData) => Promise<import("../..").ApiResponse<ResetUserSecurity>>;
|
|
63
|
+
validateSecurityCode: (data: IValidateSecurityCodeData) => Promise<import("../..").ApiResponse<import("../..").ValidateUserSecurity>>;
|
|
64
|
+
updatePreferences: (data: IUpdatePreferencesData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
65
|
+
updatePhone: (data: IUpdatePhoneData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
66
|
+
makePhonePrimary: (data: IMakePhonePrimaryData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
67
|
+
updatePersonalInfo: (data: IUpdatePersonalInfoData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
68
|
+
updateIdentification: (data: IUpdateIdentificationData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
69
|
+
updateExternalAuth: (data: any) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
70
|
+
updateEmail: (data: IUpdateEmailData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
71
|
+
makeEmailPrimary: (data: IMakeEmailPrimaryData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
72
|
+
updateBankAccount: (data: IUpdateBankAccountData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
73
|
+
makeBankAccountPrimary: (data: IMakeBankAccountPrimaryData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
74
|
+
updateAddress: (data: IUpdateAddressData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
75
|
+
makeAddressPrimary: (data: IMakeAddressPrimaryData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
76
|
+
updateDevice: (data: IUpdateDeviceData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
77
|
+
logoutDevice: (data: ILogoutDeviceData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
78
|
+
updateUserType: (data: IUpdateUserTypeData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
79
|
+
deleteAddress: (data: IDeleteAddressData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
80
|
+
deleteBankAccount: (data: IDeleteBankAccountData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
81
|
+
deleteDevice: (data: IDeleteDeviceData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
82
|
+
deleteEmail: (data: IDeleteEmailData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
83
|
+
deleteIdentification: (data: IDeleteIdentificationData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
84
|
+
deletePhone: (data: IDeletePhoneData) => Promise<import("../..").ApiResponse<import("../..").UserData>>;
|
|
85
85
|
}
|
|
86
86
|
export { UserProxy };
|
|
@@ -4,7 +4,7 @@ import type { AccountServiceParameters } from "../../types/api/service/account";
|
|
|
4
4
|
declare class AccountService extends BaseService {
|
|
5
5
|
protected endpoint: string;
|
|
6
6
|
constructor(data: AccountServiceParameters);
|
|
7
|
-
get(accountId: number): Promise<import("
|
|
8
|
-
getLimits(accountId: number): Promise<import("
|
|
7
|
+
get(accountId: number): Promise<import("../..").ApiResponse<AccountData>>;
|
|
8
|
+
getLimits(accountId: number): Promise<import("../..").ApiResponse<AccountData>>;
|
|
9
9
|
}
|
|
10
10
|
export { AccountService };
|
|
@@ -5,7 +5,7 @@ import type { AuthServiceParameters } from "../../types/api/service/auth";
|
|
|
5
5
|
declare class AuthService extends BaseService {
|
|
6
6
|
protected endpoint: string;
|
|
7
7
|
constructor(data: AuthServiceParameters);
|
|
8
|
-
login(data: string): Promise<import("
|
|
9
|
-
generateLimitedToken(data: IGenerateLimitedTokenData): Promise<import("
|
|
8
|
+
login(data: string): Promise<import("../..").ApiResponse<TokenData>>;
|
|
9
|
+
generateLimitedToken(data: IGenerateLimitedTokenData): Promise<import("../..").ApiResponse<NodeTokenData>>;
|
|
10
10
|
}
|
|
11
11
|
export { AuthService };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AxiosInstance
|
|
2
|
-
import type { BaseServiceParameters, ErrorHandler } from "../../types/api/service/base";
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import type { ApiResponse, BaseServiceParameters, ErrorHandler } from "../../types/api/service/base";
|
|
3
3
|
import type { ClientContextProvider } from "../../types/api/context/clientContext";
|
|
4
4
|
import type { RequestFlag } from "../../types/helper/api/requestBuilder";
|
|
5
|
+
import type { BaseResult } from "../../types/banking/common/baseresult";
|
|
5
6
|
declare abstract class BaseService {
|
|
6
7
|
protected abstract endpoint: string;
|
|
7
8
|
protected context: ClientContextProvider;
|
|
@@ -11,13 +12,13 @@ declare abstract class BaseService {
|
|
|
11
12
|
private onRequest;
|
|
12
13
|
private onResponse;
|
|
13
14
|
private onError;
|
|
14
|
-
protected GET<T>(url: string, options?: {
|
|
15
|
+
protected GET<T extends BaseResult>(url: string, options?: {
|
|
15
16
|
params?: object;
|
|
16
17
|
flags?: RequestFlag;
|
|
17
|
-
}): Promise<
|
|
18
|
-
protected POST<T>(url: string, data: object | string, flags?: RequestFlag): Promise<
|
|
19
|
-
protected PUT<T>(url: string, data: object | string, flags?: RequestFlag): Promise<
|
|
20
|
-
protected DELETE<T>(url: string, data?: object, flags?: RequestFlag): Promise<
|
|
18
|
+
}): Promise<ApiResponse<T>>;
|
|
19
|
+
protected POST<T extends BaseResult>(url: string, data: object | string, flags?: RequestFlag): Promise<ApiResponse<T>>;
|
|
20
|
+
protected PUT<T extends BaseResult>(url: string, data: object | string, flags?: RequestFlag): Promise<ApiResponse<T>>;
|
|
21
|
+
protected DELETE<T extends BaseResult>(url: string, data?: object, flags?: RequestFlag): Promise<ApiResponse<T>>;
|
|
21
22
|
protected resolveURL(path?: string | number): string;
|
|
22
23
|
private buildFlagHeaders;
|
|
23
24
|
}
|
package/dist/api/service/base.js
CHANGED
|
@@ -11,41 +11,45 @@ class BaseService {
|
|
|
11
11
|
this.errorHandler = data.errorHandler;
|
|
12
12
|
this.axiosInstance = axios.create();
|
|
13
13
|
this.axiosInstance.interceptors.request.use((req) => this.onRequest(req));
|
|
14
|
-
this.axiosInstance.interceptors.response.use((
|
|
14
|
+
this.axiosInstance.interceptors.response.use((response) => this.onResponse(response), (error) => this.onError(error));
|
|
15
15
|
}
|
|
16
16
|
async onRequest(req) {
|
|
17
17
|
AxiosHelper.injectBaseHeaders(req, this.context, this.endpoint);
|
|
18
18
|
AxiosHelper.injectBaseBodyProperties(req);
|
|
19
19
|
return req;
|
|
20
20
|
}
|
|
21
|
-
onResponse(
|
|
22
|
-
return
|
|
21
|
+
onResponse(response) {
|
|
22
|
+
return ResponseHelper.onResponse(response);
|
|
23
23
|
}
|
|
24
|
-
onError(
|
|
25
|
-
this.errorHandler(
|
|
26
|
-
return ResponseHelper.
|
|
24
|
+
onError(error) {
|
|
25
|
+
this.errorHandler(error);
|
|
26
|
+
return ResponseHelper.onError(error);
|
|
27
27
|
}
|
|
28
|
-
GET(url, options) {
|
|
29
|
-
|
|
28
|
+
async GET(url, options) {
|
|
29
|
+
const response = await this.axiosInstance.get(url, {
|
|
30
30
|
params: options?.params,
|
|
31
31
|
headers: this.buildFlagHeaders(options?.flags),
|
|
32
32
|
});
|
|
33
|
+
return ResponseHelper.getApiResponse(response);
|
|
33
34
|
}
|
|
34
|
-
POST(url, data, flags) {
|
|
35
|
-
|
|
35
|
+
async POST(url, data, flags) {
|
|
36
|
+
const response = await this.axiosInstance.post(url, data, {
|
|
36
37
|
headers: this.buildFlagHeaders(flags),
|
|
37
38
|
});
|
|
39
|
+
return ResponseHelper.getApiResponse(response);
|
|
38
40
|
}
|
|
39
|
-
PUT(url, data, flags) {
|
|
40
|
-
|
|
41
|
+
async PUT(url, data, flags) {
|
|
42
|
+
const response = await this.axiosInstance.put(url, data, {
|
|
41
43
|
headers: this.buildFlagHeaders(flags),
|
|
42
44
|
});
|
|
45
|
+
return ResponseHelper.getApiResponse(response);
|
|
43
46
|
}
|
|
44
|
-
DELETE(url, data, flags) {
|
|
45
|
-
|
|
47
|
+
async DELETE(url, data, flags) {
|
|
48
|
+
const response = await this.axiosInstance.delete(url, {
|
|
46
49
|
data,
|
|
47
50
|
headers: this.buildFlagHeaders(flags),
|
|
48
51
|
});
|
|
52
|
+
return ResponseHelper.getApiResponse(response);
|
|
49
53
|
}
|
|
50
54
|
resolveURL(path = "") {
|
|
51
55
|
const p = path.toString().trim();
|
|
@@ -3,9 +3,9 @@ import type { BlockchainData, BlockchainServiceParameters } from "../../types";
|
|
|
3
3
|
declare class BlockchainService extends BaseService {
|
|
4
4
|
protected endpoint: string;
|
|
5
5
|
constructor(data: BlockchainServiceParameters);
|
|
6
|
-
send(payload: BlockchainData): Promise<import("
|
|
7
|
-
multiSend(payload: BlockchainData): Promise<import("
|
|
8
|
-
delegate(payload: BlockchainData): Promise<import("
|
|
9
|
-
undelegate(payload: BlockchainData): Promise<import("
|
|
6
|
+
send(payload: BlockchainData): Promise<import("../..").ApiResponse<BlockchainData>>;
|
|
7
|
+
multiSend(payload: BlockchainData): Promise<import("../..").ApiResponse<BlockchainData>>;
|
|
8
|
+
delegate(payload: BlockchainData): Promise<import("../..").ApiResponse<BlockchainData>>;
|
|
9
|
+
undelegate(payload: BlockchainData): Promise<import("../..").ApiResponse<BlockchainData>>;
|
|
10
10
|
}
|
|
11
11
|
export { BlockchainService };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseService } from "./base";
|
|
2
|
-
import type { IPAddressAndLocationServiceParameters } from "../../types";
|
|
2
|
+
import type { IPAddressAndLocationServiceParameters, IPAddressStringResult } from "../../types";
|
|
3
3
|
declare class IPAddressAndLocationService extends BaseService {
|
|
4
4
|
protected endpoint: string;
|
|
5
5
|
constructor(data: IPAddressAndLocationServiceParameters);
|
|
6
|
-
getIPAddressAndLocation: () => Promise<import("
|
|
6
|
+
getIPAddressAndLocation: () => Promise<import("../..").ApiResponse<IPAddressStringResult>>;
|
|
7
7
|
}
|
|
8
8
|
export { IPAddressAndLocationService };
|
|
@@ -3,11 +3,11 @@ import type { ConfirmUserSecurity, ForgetSecurityData, ValidateLimitedSecurity,
|
|
|
3
3
|
declare class LimitedService extends BaseService {
|
|
4
4
|
protected endpoint: string;
|
|
5
5
|
constructor(data: LimitedServiceParameters);
|
|
6
|
-
validateSecurityData(data: ValidateLimitedSecurity): Promise<import("
|
|
7
|
-
verifySecurityData(data: VerifyUserSecurity): Promise<import("
|
|
8
|
-
confirmSecurityData(data: ConfirmUserSecurity): Promise<import("
|
|
9
|
-
checkForgetSecurityData(data: ForgetSecurityData): Promise<import("
|
|
10
|
-
validateForgetSecurityData(data: ForgetSecurityData): Promise<import("
|
|
11
|
-
confirmForgetSecurityData(data: ForgetSecurityData): Promise<import("
|
|
6
|
+
validateSecurityData(data: ValidateLimitedSecurity): Promise<import("../..").ApiResponse<ValidateLimitedSecurity>>;
|
|
7
|
+
verifySecurityData(data: VerifyUserSecurity): Promise<import("../..").ApiResponse<VerifyUserSecurity>>;
|
|
8
|
+
confirmSecurityData(data: ConfirmUserSecurity): Promise<import("../..").ApiResponse<ConfirmUserSecurity>>;
|
|
9
|
+
checkForgetSecurityData(data: ForgetSecurityData): Promise<import("../..").ApiResponse<ForgetSecurityData>>;
|
|
10
|
+
validateForgetSecurityData(data: ForgetSecurityData): Promise<import("../..").ApiResponse<ForgetSecurityData>>;
|
|
11
|
+
confirmForgetSecurityData(data: ForgetSecurityData): Promise<import("../..").ApiResponse<ForgetSecurityData>>;
|
|
12
12
|
}
|
|
13
13
|
export { LimitedService };
|
|
@@ -3,6 +3,6 @@ import type { OrderData, OrderServiceParameters } from "../../types";
|
|
|
3
3
|
declare class OrderService extends BaseService {
|
|
4
4
|
protected endpoint: string;
|
|
5
5
|
constructor(data: OrderServiceParameters);
|
|
6
|
-
create(data: OrderData): Promise<import("
|
|
6
|
+
create(data: OrderData): Promise<import("../..").ApiResponse<OrderData>>;
|
|
7
7
|
}
|
|
8
8
|
export { OrderService };
|
|
@@ -3,10 +3,10 @@ import type { DocumentData, OrganizationData, OrganizationServiceParameters } fr
|
|
|
3
3
|
declare class OrganizationService extends BaseService {
|
|
4
4
|
protected endpoint: string;
|
|
5
5
|
constructor(data: OrganizationServiceParameters);
|
|
6
|
-
get(id: number): Promise<import("
|
|
7
|
-
create(data: OrganizationData): Promise<import("
|
|
8
|
-
createDocument(id: number, data: DocumentData): Promise<import("
|
|
9
|
-
update(id: number, data: OrganizationData): Promise<import("
|
|
10
|
-
delete(id: number): Promise<import("
|
|
6
|
+
get(id: number): Promise<import("../..").ApiResponse<OrganizationData>>;
|
|
7
|
+
create(data: OrganizationData): Promise<import("../..").ApiResponse<OrganizationData>>;
|
|
8
|
+
createDocument(id: number, data: DocumentData): Promise<import("../..").ApiResponse<DocumentData>>;
|
|
9
|
+
update(id: number, data: OrganizationData): Promise<import("../..").ApiResponse<OrganizationData>>;
|
|
10
|
+
delete(id: number): Promise<import("../..").ApiResponse<OrganizationData>>;
|
|
11
11
|
}
|
|
12
12
|
export { OrganizationService };
|
|
@@ -4,8 +4,8 @@ import type { ProgramData } from "../../types/banking/program";
|
|
|
4
4
|
declare class ProgramService extends BaseService {
|
|
5
5
|
protected endpoint: string;
|
|
6
6
|
constructor(data: ProgramServiceParameter);
|
|
7
|
-
getSystemFeatures(): Promise<import("
|
|
8
|
-
getBin(): Promise<import("
|
|
9
|
-
getSignUp(): Promise<import("
|
|
7
|
+
getSystemFeatures(): Promise<import("../..").ApiResponse<ProgramData>>;
|
|
8
|
+
getBin(): Promise<import("../..").ApiResponse<ProgramData>>;
|
|
9
|
+
getSignUp(): Promise<import("../..").ApiResponse<ProgramData>>;
|
|
10
10
|
}
|
|
11
11
|
export { ProgramService };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { BaseService } from "./base";
|
|
2
|
-
import type { GGEZGiftRewards, PromotionDetails, PromotionServiceParameters } from "../../types";
|
|
2
|
+
import type { GGEZGiftRewards, PromotionDetails, PromotionIncrementResult, PromotionServiceParameters, TwitterSpotlightPostIdsResult } from "../../types";
|
|
3
3
|
declare class PromotionService extends BaseService {
|
|
4
4
|
protected endpoint: string;
|
|
5
5
|
constructor(data: PromotionServiceParameters);
|
|
6
|
-
getPromotionByCode(promotionCode: string): Promise<import("
|
|
7
|
-
getTwitterSpotlightPostIds(): Promise<import("
|
|
8
|
-
incrementPromotionParticipants(data: GGEZGiftRewards): Promise<import("
|
|
9
|
-
message: string;
|
|
10
|
-
}, any, {}>>;
|
|
6
|
+
getPromotionByCode(promotionCode: string): Promise<import("../..").ApiResponse<PromotionDetails>>;
|
|
7
|
+
getTwitterSpotlightPostIds(): Promise<import("../..").ApiResponse<TwitterSpotlightPostIdsResult>>;
|
|
8
|
+
incrementPromotionParticipants(data: GGEZGiftRewards): Promise<import("../..").ApiResponse<PromotionIncrementResult>>;
|
|
11
9
|
}
|
|
12
10
|
export { PromotionService };
|
|
@@ -6,7 +6,7 @@ import type { TransactionServiceParameters } from "../../types/api/service/trans
|
|
|
6
6
|
declare class TransactionService extends BaseService {
|
|
7
7
|
protected endpoint: string;
|
|
8
8
|
constructor(data: TransactionServiceParameters);
|
|
9
|
-
inquiry(payload: TransactionInquiry): Promise<import("
|
|
10
|
-
create(payload: TransactionData): Promise<import("
|
|
9
|
+
inquiry(payload: TransactionInquiry): Promise<import("../..").ApiResponse<TransactionResultInquiry>>;
|
|
10
|
+
create(payload: TransactionData): Promise<import("../..").ApiResponse<TransactionData>>;
|
|
11
11
|
}
|
|
12
12
|
export { TransactionService };
|
|
@@ -10,69 +10,69 @@ declare class UserService extends BaseService {
|
|
|
10
10
|
protected endpoint: string;
|
|
11
11
|
constructor(data: UserServiceParameters);
|
|
12
12
|
private userIdPath;
|
|
13
|
-
getUser(): Promise<import("
|
|
14
|
-
getTermsAndConditions(): Promise<import("
|
|
15
|
-
getSecurity(): Promise<import("
|
|
16
|
-
getPhone(): Promise<import("
|
|
17
|
-
getPreferences(): Promise<import("
|
|
18
|
-
getPersonalInfo(): Promise<import("
|
|
19
|
-
getLatestHistory(): Promise<import("
|
|
20
|
-
getIdentification(): Promise<import("
|
|
21
|
-
getHistory(): Promise<import("
|
|
22
|
-
getGroup(): Promise<import("
|
|
23
|
-
getExternalAuth(): Promise<import("
|
|
24
|
-
getEmail(): Promise<import("
|
|
25
|
-
getDocuments(): Promise<import("
|
|
26
|
-
getCurrency(): Promise<import("
|
|
27
|
-
getCreditCard(): Promise<import("
|
|
28
|
-
getBankAccount(): Promise<import("
|
|
29
|
-
getAddress(): Promise<import("
|
|
30
|
-
getAccount(): Promise<import("
|
|
31
|
-
getDeviceHistory(): Promise<import("
|
|
32
|
-
getActivity(): Promise<import("
|
|
33
|
-
createUser(payload: UserData): Promise<import("
|
|
34
|
-
createPhone(payload: UserData): Promise<import("
|
|
35
|
-
createDevice(payload: UserData): Promise<import("
|
|
36
|
-
createIdentification(payload: UserData): Promise<import("
|
|
37
|
-
createExternalAuth(payload: UserData): Promise<import("
|
|
38
|
-
createEmail(payload: UserData): Promise<import("
|
|
39
|
-
createCurrency(payload: UserData): Promise<import("
|
|
40
|
-
createCreditCard(payload: UserData): Promise<import("
|
|
41
|
-
createBankAccount(payload: UserData): Promise<import("
|
|
42
|
-
createAddress(payload: UserData): Promise<import("
|
|
43
|
-
createTicket(payload: UserData): Promise<import("
|
|
44
|
-
securityAccess(payload: UserData): Promise<import("
|
|
45
|
-
uploadDocument(payload: DocumentData): Promise<import("
|
|
46
|
-
confirmSecurityData(payload: ConfirmUserSecurity): Promise<import("
|
|
47
|
-
validateSecurityData(payload: ValidateUserSecurity): Promise<import("
|
|
48
|
-
verifySecurityData(payload: VerifyUserSecurity): Promise<import("
|
|
49
|
-
resetSecurityData(payload: ResetUserSecurity): Promise<import("
|
|
50
|
-
enrollGoogleAuth(payload: UserData): Promise<import("
|
|
51
|
-
activateGoogleAuth(payload: UserData): Promise<import("
|
|
52
|
-
deactivateGoogleAuth(payload: UserData): Promise<import("
|
|
53
|
-
deleteGoogleAuth(payload: UserData): Promise<import("
|
|
54
|
-
updateUser(payload: UserData): Promise<import("
|
|
55
|
-
updateSecurity(payload: UserData): Promise<import("
|
|
56
|
-
updatePreferences(payload: UserData): Promise<import("
|
|
57
|
-
updateDevice(payload: UserData): Promise<import("
|
|
58
|
-
logoutDevice(payload: UserData): Promise<import("
|
|
59
|
-
updatePhone(payload: UserData): Promise<import("
|
|
60
|
-
updatePersonalInfo(payload: UserData): Promise<import("
|
|
61
|
-
updateIdentification(payload: UserData): Promise<import("
|
|
62
|
-
updateExternalAuth(payload: UserData): Promise<import("
|
|
63
|
-
updateEmail(payload: UserData): Promise<import("
|
|
64
|
-
updateCreditCard(payload: UserData): Promise<import("
|
|
65
|
-
updateBankAccount(payload: UserData): Promise<import("
|
|
66
|
-
updateAddress(payload: UserData): Promise<import("
|
|
67
|
-
updateUserType(payload: UserData): Promise<import("
|
|
68
|
-
deleteUser(): Promise<import("
|
|
69
|
-
deleteCreditCard(): Promise<import("
|
|
70
|
-
deleteAddress(payload: UserData): Promise<import("
|
|
71
|
-
deleteDevice(payload: UserData): Promise<import("
|
|
72
|
-
deleteBankAccount(payload: UserData): Promise<import("
|
|
73
|
-
deleteIdentification(payload: UserData): Promise<import("
|
|
74
|
-
deleteEmail(payload: UserData): Promise<import("
|
|
75
|
-
deletePhone(payload: UserData): Promise<import("
|
|
76
|
-
deleteExternalAuth(): Promise<import("
|
|
13
|
+
getUser(): Promise<import("../..").ApiResponse<UserData>>;
|
|
14
|
+
getTermsAndConditions(): Promise<import("../..").ApiResponse<UserData>>;
|
|
15
|
+
getSecurity(): Promise<import("../..").ApiResponse<UserData>>;
|
|
16
|
+
getPhone(): Promise<import("../..").ApiResponse<UserData>>;
|
|
17
|
+
getPreferences(): Promise<import("../..").ApiResponse<UserData>>;
|
|
18
|
+
getPersonalInfo(): Promise<import("../..").ApiResponse<UserData>>;
|
|
19
|
+
getLatestHistory(): Promise<import("../..").ApiResponse<UserData>>;
|
|
20
|
+
getIdentification(): Promise<import("../..").ApiResponse<UserData>>;
|
|
21
|
+
getHistory(): Promise<import("../..").ApiResponse<UserData>>;
|
|
22
|
+
getGroup(): Promise<import("../..").ApiResponse<UserData>>;
|
|
23
|
+
getExternalAuth(): Promise<import("../..").ApiResponse<UserData>>;
|
|
24
|
+
getEmail(): Promise<import("../..").ApiResponse<UserData>>;
|
|
25
|
+
getDocuments(): Promise<import("../..").ApiResponse<UserData>>;
|
|
26
|
+
getCurrency(): Promise<import("../..").ApiResponse<UserData>>;
|
|
27
|
+
getCreditCard(): Promise<import("../..").ApiResponse<UserData>>;
|
|
28
|
+
getBankAccount(): Promise<import("../..").ApiResponse<UserData>>;
|
|
29
|
+
getAddress(): Promise<import("../..").ApiResponse<UserData>>;
|
|
30
|
+
getAccount(): Promise<import("../..").ApiResponse<UserData>>;
|
|
31
|
+
getDeviceHistory(): Promise<import("../..").ApiResponse<UserData>>;
|
|
32
|
+
getActivity(): Promise<import("../..").ApiResponse<UserData>>;
|
|
33
|
+
createUser(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
34
|
+
createPhone(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
35
|
+
createDevice(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
36
|
+
createIdentification(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
37
|
+
createExternalAuth(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
38
|
+
createEmail(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
39
|
+
createCurrency(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
40
|
+
createCreditCard(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
41
|
+
createBankAccount(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
42
|
+
createAddress(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
43
|
+
createTicket(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
44
|
+
securityAccess(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
45
|
+
uploadDocument(payload: DocumentData): Promise<import("../..").ApiResponse<DocumentData>>;
|
|
46
|
+
confirmSecurityData(payload: ConfirmUserSecurity): Promise<import("../..").ApiResponse<ConfirmUserSecurity>>;
|
|
47
|
+
validateSecurityData(payload: ValidateUserSecurity): Promise<import("../..").ApiResponse<ValidateUserSecurity>>;
|
|
48
|
+
verifySecurityData(payload: VerifyUserSecurity): Promise<import("../..").ApiResponse<VerifyUserSecurity>>;
|
|
49
|
+
resetSecurityData(payload: ResetUserSecurity): Promise<import("../..").ApiResponse<ResetUserSecurity>>;
|
|
50
|
+
enrollGoogleAuth(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
51
|
+
activateGoogleAuth(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
52
|
+
deactivateGoogleAuth(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
53
|
+
deleteGoogleAuth(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
54
|
+
updateUser(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
55
|
+
updateSecurity(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
56
|
+
updatePreferences(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
57
|
+
updateDevice(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
58
|
+
logoutDevice(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
59
|
+
updatePhone(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
60
|
+
updatePersonalInfo(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
61
|
+
updateIdentification(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
62
|
+
updateExternalAuth(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
63
|
+
updateEmail(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
64
|
+
updateCreditCard(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
65
|
+
updateBankAccount(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
66
|
+
updateAddress(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
67
|
+
updateUserType(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
68
|
+
deleteUser(): Promise<import("../..").ApiResponse<UserData>>;
|
|
69
|
+
deleteCreditCard(): Promise<import("../..").ApiResponse<UserData>>;
|
|
70
|
+
deleteAddress(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
71
|
+
deleteDevice(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
72
|
+
deleteBankAccount(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
73
|
+
deleteIdentification(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
74
|
+
deleteEmail(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
75
|
+
deletePhone(payload: UserData): Promise<import("../..").ApiResponse<UserData>>;
|
|
76
|
+
deleteExternalAuth(): Promise<import("../..").ApiResponse<UserData>>;
|
|
77
77
|
}
|
|
78
78
|
export { UserService };
|
package/dist/auth.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { AuthProxy } from "./api/proxy/auth";
|
|
2
2
|
export { AuthService } from "./api/service/auth";
|
|
3
3
|
export * from "./api/data/auth";
|
|
4
|
-
export type * from "./types/api/client/auth";
|
|
5
4
|
export type * from "./types/api/data/auth";
|
|
6
5
|
export type * from "./types/api/service/auth";
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import type { BaseResult } from "../../types/banking/common/baseresult";
|
|
2
|
+
import type { AxiosResponse } from "axios";
|
|
3
|
+
import type { ApiResponse } from "../../types";
|
|
2
4
|
declare class ResponseHelper {
|
|
3
|
-
static
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
message: string;
|
|
7
|
-
error: null;
|
|
8
|
-
};
|
|
9
|
-
static getErrorResponse: (error: any) => {
|
|
10
|
-
data: import("../..").Result;
|
|
11
|
-
success: boolean;
|
|
12
|
-
message: string;
|
|
13
|
-
error: any;
|
|
14
|
-
};
|
|
5
|
+
static onResponse: (res: AxiosResponse) => AxiosResponse;
|
|
6
|
+
static onError: (error: any) => AxiosResponse<BaseResult>;
|
|
7
|
+
static getApiResponse: <T extends BaseResult>(res: AxiosResponse<T>) => ApiResponse<T>;
|
|
15
8
|
}
|
|
16
9
|
export { ResponseHelper };
|
|
@@ -1,21 +1,38 @@
|
|
|
1
|
+
import { createDefaultBaseResult, fillResultByError } from "../../api";
|
|
1
2
|
import { ResultHelper } from "./resultHelper";
|
|
2
|
-
import { fillResultByError } from "../../api";
|
|
3
3
|
class ResponseHelper {
|
|
4
|
-
static
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
static onResponse = (res) => {
|
|
5
|
+
const defaultResult = {
|
|
6
|
+
code: "0000",
|
|
7
|
+
message: "Operation completed successfully",
|
|
8
|
+
friendly_message: "Operation completed successfully",
|
|
9
|
+
description: "Operation completed successfully",
|
|
10
10
|
};
|
|
11
|
+
if (typeof res.data !== "object" || res.data === null) {
|
|
12
|
+
res.data = createDefaultBaseResult({ result: defaultResult, value: res.data });
|
|
13
|
+
}
|
|
14
|
+
else if (!res.data.result) {
|
|
15
|
+
res.data.result = createDefaultBaseResult({ result: defaultResult }).result;
|
|
16
|
+
}
|
|
17
|
+
return res;
|
|
11
18
|
};
|
|
12
|
-
static
|
|
19
|
+
static onError = (error) => {
|
|
13
20
|
const data = fillResultByError(error);
|
|
14
21
|
return {
|
|
15
|
-
data
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
data,
|
|
23
|
+
status: error?.response?.status ?? 400,
|
|
24
|
+
statusText: error?.response?.statusText ?? "Bad Request",
|
|
25
|
+
headers: error?.response?.headers ?? {},
|
|
26
|
+
config: error?.config ?? {},
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
static getApiResponse = (res) => {
|
|
30
|
+
const { data } = res;
|
|
31
|
+
return {
|
|
32
|
+
data,
|
|
33
|
+
success: ResultHelper.isApproved(data.result),
|
|
34
|
+
message: data.result.friendly_message,
|
|
35
|
+
error: data.result.message,
|
|
19
36
|
};
|
|
20
37
|
};
|
|
21
38
|
}
|
package/dist/helper/geoHelper.js
CHANGED
|
@@ -94,8 +94,8 @@ class GeoHelper {
|
|
|
94
94
|
}
|
|
95
95
|
// Fetch fresh data
|
|
96
96
|
const { data } = await locationService.getIPAddressAndLocation();
|
|
97
|
-
if (data) {
|
|
98
|
-
const ipAddressAndLocation = JSON.parse(data);
|
|
97
|
+
if (data?.value) {
|
|
98
|
+
const ipAddressAndLocation = JSON.parse(data.value);
|
|
99
99
|
const { latitude, longitude, city, country } = ipAddressAndLocation;
|
|
100
100
|
const geo_coordinates = {
|
|
101
101
|
latitude: latitude || 0,
|
|
@@ -136,8 +136,8 @@ class GeoHelper {
|
|
|
136
136
|
}
|
|
137
137
|
// Fetch fresh data
|
|
138
138
|
const { data } = await locationService.getIPAddressAndLocation();
|
|
139
|
-
if (data) {
|
|
140
|
-
const ipAddressAndLocation = JSON.parse(data);
|
|
139
|
+
if (data?.value) {
|
|
140
|
+
const ipAddressAndLocation = JSON.parse(data.value);
|
|
141
141
|
const { ip_address } = ipAddressAndLocation;
|
|
142
142
|
// Cache the result (we need to get geo coordinates too for caching)
|
|
143
143
|
if (ttlMs > 0 && ip_address) {
|
|
@@ -173,8 +173,8 @@ class GeoHelper {
|
|
|
173
173
|
}
|
|
174
174
|
// Fetch fresh data
|
|
175
175
|
const { data } = await locationService.getIPAddressAndLocation();
|
|
176
|
-
if (data) {
|
|
177
|
-
const ipAddressAndLocation = JSON.parse(data);
|
|
176
|
+
if (data?.value) {
|
|
177
|
+
const ipAddressAndLocation = JSON.parse(data.value);
|
|
178
178
|
const { latitude, longitude, city, country, ip_address } = ipAddressAndLocation;
|
|
179
179
|
const geo_coordinates = {
|
|
180
180
|
latitude: latitude || 0,
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { ClientContextProvider } from "../context/clientContext";
|
|
2
|
+
import type { BaseResult } from "../../banking/common/baseresult";
|
|
2
3
|
type BaseServiceParameters = {
|
|
3
4
|
context: ClientContextProvider;
|
|
4
5
|
errorHandler: ErrorHandler;
|
|
5
6
|
};
|
|
6
7
|
type ErrorHandler = (error: unknown) => void;
|
|
8
|
+
type ApiResponse<T extends BaseResult> = {
|
|
9
|
+
data: T;
|
|
10
|
+
success: boolean;
|
|
11
|
+
message: string;
|
|
12
|
+
error: string | null;
|
|
13
|
+
};
|
|
14
|
+
export type { ApiResponse };
|
|
7
15
|
export { BaseServiceParameters, ErrorHandler };
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import type { BaseResult } from "../../banking/common/baseresult";
|
|
1
2
|
import { BaseServiceParameters } from "./base";
|
|
2
3
|
type IPAddressAndLocationServiceParameters = BaseServiceParameters;
|
|
4
|
+
type IPAddressStringResult = BaseResult & {
|
|
5
|
+
value: string;
|
|
6
|
+
};
|
|
7
|
+
export type { IPAddressStringResult };
|
|
3
8
|
export { IPAddressAndLocationServiceParameters };
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import type { BaseResult } from "../../banking/common/baseresult";
|
|
1
2
|
import { BaseServiceParameters } from "./base";
|
|
2
3
|
type PromotionServiceParameters = BaseServiceParameters;
|
|
4
|
+
type TwitterSpotlightPostIdsResult = BaseResult & {
|
|
5
|
+
postIds: string[];
|
|
6
|
+
};
|
|
7
|
+
type PromotionIncrementResult = BaseResult & {
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
export type { TwitterSpotlightPostIdsResult, PromotionIncrementResult };
|
|
3
11
|
export { PromotionServiceParameters };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { AxiosResponse } from "axios";
|
|
2
1
|
import type { GeoCoordinates } from "../banking/common";
|
|
2
|
+
import type { ApiResponse } from "../api/service/base";
|
|
3
|
+
import type { IPAddressStringResult } from "../api/service/ipAddressAndLocation";
|
|
3
4
|
type IPAddressAndLocation = {
|
|
4
5
|
ip_address: string;
|
|
5
6
|
country: string;
|
|
@@ -8,7 +9,7 @@ type IPAddressAndLocation = {
|
|
|
8
9
|
longitude: number;
|
|
9
10
|
};
|
|
10
11
|
type GeoSource = {
|
|
11
|
-
getIPAddressAndLocation: () => Promise<
|
|
12
|
+
getIPAddressAndLocation: () => Promise<ApiResponse<IPAddressStringResult>>;
|
|
12
13
|
};
|
|
13
14
|
interface CachedGeoData {
|
|
14
15
|
geo_coordinates: GeoCoordinates;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PromotionType, PromotionVisibility, PromotionStatus, PromotionGames } from "../../constant";
|
|
2
2
|
import type { Amount, LotteryPrize } from ".";
|
|
3
|
-
|
|
3
|
+
import { BaseResult } from "../..";
|
|
4
|
+
type PromotionDetails = BaseResult & {
|
|
4
5
|
id: number;
|
|
5
6
|
code: string;
|
|
6
7
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ggez-banking-sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { AxiosResponse } from "axios";
|
|
2
|
-
import type { TokenData } from "../../banking/oauth/tokenData";
|
|
3
|
-
import type { UserData } from "../../banking/user/userdata";
|
|
4
|
-
type LoginClientResponse = {
|
|
5
|
-
data: {
|
|
6
|
-
tokenData: TokenData;
|
|
7
|
-
userData: UserData | null;
|
|
8
|
-
};
|
|
9
|
-
success: boolean;
|
|
10
|
-
message: string;
|
|
11
|
-
error: string | null;
|
|
12
|
-
};
|
|
13
|
-
type LoginResult = {
|
|
14
|
-
tokenData: AxiosResponse<TokenData>;
|
|
15
|
-
userData: AxiosResponse<UserData> | null;
|
|
16
|
-
};
|
|
17
|
-
export type { LoginClientResponse, LoginResult };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bootstrap config consumers pass to the SDK (API class) at construction.
|
|
3
|
-
* Per-session credentials (token, userId) are not here — they are written
|
|
4
|
-
* by the SDK's AuthProxy into ClientContextProvider after a successful
|
|
5
|
-
* login, and every Service reads them at call time.
|
|
6
|
-
*/
|
|
7
|
-
type ClientData = {
|
|
8
|
-
baseUrl: string;
|
|
9
|
-
nodeUrl: string;
|
|
10
|
-
lang: string;
|
|
11
|
-
installationId: string;
|
|
12
|
-
programId: number;
|
|
13
|
-
webhookUrl: string;
|
|
14
|
-
/**
|
|
15
|
-
* Cookie scope for the SDK-owned CookiesHelper. Maps directly to the
|
|
16
|
-
* `domain` attribute of every cookie the SDK writes (e.g. `.example.com`
|
|
17
|
-
* to share across subdomains). Omit to use the browser's default
|
|
18
|
-
* exact-origin scope.
|
|
19
|
-
*/
|
|
20
|
-
domain?: string;
|
|
21
|
-
};
|
|
22
|
-
export type { ClientData };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|