ggez-banking-sdk 0.1.106 → 0.1.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/clients/account.d.ts +8 -8
- package/dist/api/clients/account.js +26 -19
- package/dist/api/clients/auth.d.ts +22 -17
- package/dist/api/clients/auth.js +57 -42
- package/dist/api/clients/blockchain.d.ts +16 -16
- package/dist/api/clients/blockchain.js +52 -42
- package/dist/api/clients/ipAddressAndLocation.js +15 -13
- package/dist/api/clients/limited.d.ts +42 -32
- package/dist/api/clients/limited.js +100 -82
- package/dist/api/clients/order.d.ts +4 -4
- package/dist/api/clients/order.js +16 -12
- package/dist/api/clients/organization.d.ts +23 -18
- package/dist/api/clients/organization.js +57 -45
- package/dist/api/clients/promotion.d.ts +28 -13
- package/dist/api/clients/promotion.js +32 -30
- package/dist/api/clients/transaction.d.ts +9 -9
- package/dist/api/clients/transaction.js +30 -24
- package/dist/api/clients/user.d.ts +387 -301
- package/dist/api/clients/user.js +886 -735
- package/dist/api/data/account.d.ts +3 -0
- package/dist/api/data/account.js +8 -0
- package/dist/api/data/blockchain.d.ts +2 -1
- package/dist/api/data/blockchain.js +11 -1
- package/dist/api/data/index.d.ts +2 -0
- package/dist/api/data/index.js +2 -0
- package/dist/api/data/order.d.ts +2 -1
- package/dist/api/data/order.js +15 -1
- package/dist/api/data/organization.d.ts +2 -1
- package/dist/api/data/organization.js +26 -1
- package/dist/api/data/result.d.ts +9 -0
- package/dist/api/data/result.js +48 -0
- package/dist/api/data/transaction.d.ts +4 -2
- package/dist/api/data/transaction.js +24 -1
- package/dist/api/data/user/confirmUserSecurity.d.ts +3 -0
- package/dist/api/data/user/confirmUserSecurity.js +12 -0
- package/dist/api/data/user/forgetSecurityData.d.ts +3 -0
- package/dist/api/data/user/forgetSecurityData.js +10 -0
- package/dist/api/data/user/index.d.ts +8 -8
- package/dist/api/data/user/index.js +8 -161
- package/dist/api/data/user/user.d.ts +6 -0
- package/dist/api/data/user/user.js +159 -0
- package/dist/api/data/user/validateLimitedSecurity.d.ts +3 -0
- package/dist/api/data/user/validateLimitedSecurity.js +10 -0
- package/dist/api/data/user/validateSecurityData.d.ts +3 -0
- package/dist/api/data/user/validateSecurityData.js +11 -0
- package/dist/api/data/user/verifyUserSecurity.d.ts +3 -0
- package/dist/api/data/user/verifyUserSecurity.js +11 -0
- package/dist/api/services/account.js +1 -1
- package/dist/api/services/auth.js +4 -5
- package/dist/api/services/base.d.ts +1 -1
- package/dist/api/services/base.js +1 -0
- package/dist/api/services/blockchain.js +5 -9
- package/dist/api/services/ipAddressAndLocation.js +10 -10
- package/dist/api/services/limited.js +2 -1
- package/dist/api/services/order.js +2 -3
- package/dist/api/services/organization.d.ts +2 -2
- package/dist/api/services/organization.js +7 -10
- package/dist/api/services/promotion.js +1 -1
- package/dist/api/services/transaction.d.ts +2 -2
- package/dist/api/services/transaction.js +3 -5
- package/dist/api/services/user.js +65 -127
- package/dist/constants/structure.d.ts +1 -0
- package/dist/constants/structure.js +1 -0
- package/dist/helper/api/axiosHelper.js +71 -71
- package/dist/helper/api/responseHelper.d.ts +12 -11
- package/dist/helper/api/responseHelper.js +24 -25
- package/dist/helper/cipherHelper.js +95 -97
- package/dist/helper/clientHelper.js +1 -0
- package/dist/helper/cookiesHelper.d.ts +5 -0
- package/dist/helper/cookiesHelper.js +169 -126
- package/dist/helper/deviceHelper.js +31 -31
- package/dist/helper/userHelper.d.ts +12 -2
- package/dist/helper/userHelper.js +69 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/banking/common/ResultSet.d.ts +10 -0
- package/dist/types/banking/common/ResultSet.js +1 -0
- package/dist/types/banking/common/index.d.ts +1 -0
- package/dist/types/banking/entities/address.d.ts +1 -0
- package/dist/types/banking/oauth/tokenData.d.ts +3 -1
- package/dist/types/banking/transaction/index.d.ts +1 -0
- package/dist/types/banking/transaction/transactionResultInquiry.d.ts +9 -0
- package/dist/types/banking/transaction/transactionResultInquiry.js +1 -0
- package/dist/types/helper/index.d.ts +4 -3
- package/dist/types/helper/index.js +1 -3
- package/dist/types/helper/userHelper.d.ts +17 -0
- package/dist/types/helper/userHelper.js +2 -0
- package/package.json +2 -2
@@ -0,0 +1,11 @@
|
|
1
|
+
const FillValidateSecurityData = (key, value) => {
|
2
|
+
const forgetSecurityData = {
|
3
|
+
result: null,
|
4
|
+
info: null,
|
5
|
+
validate_data: null,
|
6
|
+
geo_coordinates: null,
|
7
|
+
};
|
8
|
+
forgetSecurityData[key] = value;
|
9
|
+
return forgetSecurityData;
|
10
|
+
};
|
11
|
+
export { FillValidateSecurityData };
|
@@ -0,0 +1,11 @@
|
|
1
|
+
const FillVerifyUserSecurityData = (key, value) => {
|
2
|
+
const validateSecurityData = {
|
3
|
+
result: null,
|
4
|
+
info: null,
|
5
|
+
verify_data: null,
|
6
|
+
geo_coordinates: null,
|
7
|
+
};
|
8
|
+
validateSecurityData[key] = value;
|
9
|
+
return validateSecurityData;
|
10
|
+
};
|
11
|
+
export { FillVerifyUserSecurityData };
|
@@ -4,9 +4,9 @@ import { IPAddressAndLocationService } from "..";
|
|
4
4
|
import { GeoHelper } from "../../helper";
|
5
5
|
import { AxiosHelper } from "../../helper";
|
6
6
|
class AccountService extends BaseService {
|
7
|
+
endpoint = Endpoints.Account;
|
7
8
|
constructor(config) {
|
8
9
|
super(config);
|
9
|
-
this.endpoint = Endpoints.Account;
|
10
10
|
this.axiosInstance.interceptors.request.use(async (req) => {
|
11
11
|
const locationService = new IPAddressAndLocationService(config);
|
12
12
|
const geoCoordinates = await GeoHelper.GetGeoCoordinates(locationService);
|
@@ -1,20 +1,19 @@
|
|
1
1
|
import { Endpoints } from "../../constants";
|
2
2
|
import { BaseService } from "./base";
|
3
3
|
class AuthService extends BaseService {
|
4
|
+
nodeUrl;
|
5
|
+
endpoint = Endpoints.Auth;
|
4
6
|
constructor(config, nodeUrl) {
|
5
7
|
super(config);
|
6
|
-
this.endpoint = Endpoints.Auth;
|
7
8
|
this.nodeUrl = nodeUrl;
|
8
9
|
}
|
9
10
|
// #region "POST"
|
10
11
|
async login(data) {
|
11
12
|
const url = this.resolveURL();
|
12
|
-
|
13
|
-
return response;
|
13
|
+
return this.POST(url, data);
|
14
14
|
}
|
15
15
|
async generateLimitedToken(data) {
|
16
|
-
|
17
|
-
return response;
|
16
|
+
return this.POST(`${this.nodeUrl}/v1/limited-token`, data);
|
18
17
|
}
|
19
18
|
}
|
20
19
|
export { AuthService };
|
@@ -3,7 +3,7 @@ declare abstract class BaseService {
|
|
3
3
|
protected axiosInstance: AxiosInstance;
|
4
4
|
protected abstract endpoint: string;
|
5
5
|
constructor(config: AxiosRequestConfig);
|
6
|
-
protected resolveURL(path?:
|
6
|
+
protected resolveURL(path?: any): string;
|
7
7
|
protected GET<T>(url: string, params?: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
|
8
8
|
protected POST<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
|
9
9
|
protected PUT<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
|
@@ -1,30 +1,26 @@
|
|
1
1
|
import { Endpoints } from "../../constants";
|
2
2
|
import { BaseService } from "./base";
|
3
3
|
class BlockchainService extends BaseService {
|
4
|
+
endpoint = Endpoints.Blockchain;
|
4
5
|
constructor(config) {
|
5
6
|
super(config);
|
6
|
-
this.endpoint = Endpoints.Blockchain;
|
7
7
|
}
|
8
8
|
// #region "POST"
|
9
9
|
async send(payload) {
|
10
10
|
const url = this.resolveURL();
|
11
|
-
|
12
|
-
return response;
|
11
|
+
return this.POST(url, payload);
|
13
12
|
}
|
14
13
|
async multiSend(payload) {
|
15
14
|
const url = this.resolveURL();
|
16
|
-
|
17
|
-
return response;
|
15
|
+
return this.POST(url, payload);
|
18
16
|
}
|
19
17
|
async delegate(payload) {
|
20
18
|
const url = this.resolveURL();
|
21
|
-
|
22
|
-
return response;
|
19
|
+
return this.POST(url, payload);
|
23
20
|
}
|
24
21
|
async undelegate(payload) {
|
25
22
|
const url = this.resolveURL();
|
26
|
-
|
27
|
-
return response;
|
23
|
+
return this.POST(url, payload);
|
28
24
|
}
|
29
25
|
}
|
30
26
|
export { BlockchainService };
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import { BaseService } from "./base";
|
2
2
|
import { Endpoints } from "../../constants";
|
3
3
|
class IPAddressAndLocationService extends BaseService {
|
4
|
+
endpoint = Endpoints.IPAddress;
|
4
5
|
constructor(config) {
|
5
6
|
super(config);
|
6
|
-
this.endpoint = Endpoints.IPAddress;
|
7
|
-
// #region "GET"
|
8
|
-
this.getIPAddressAndLocation = async () => {
|
9
|
-
try {
|
10
|
-
return this.GET(this.endpoint);
|
11
|
-
}
|
12
|
-
catch (error) {
|
13
|
-
// console.error(error);
|
14
|
-
}
|
15
|
-
};
|
16
7
|
}
|
8
|
+
// #region "GET"
|
9
|
+
getIPAddressAndLocation = async () => {
|
10
|
+
try {
|
11
|
+
return this.GET(this.endpoint);
|
12
|
+
}
|
13
|
+
catch (error) {
|
14
|
+
// console.error(error);
|
15
|
+
}
|
16
|
+
};
|
17
17
|
}
|
18
18
|
export { IPAddressAndLocationService };
|
@@ -3,9 +3,10 @@ import { BaseService } from "./base";
|
|
3
3
|
import { AuthService } from "./auth";
|
4
4
|
import { AxiosHelper } from "../../helper";
|
5
5
|
class LimitedService extends BaseService {
|
6
|
+
endpoint = Endpoints.Limited;
|
7
|
+
nodeUrl;
|
6
8
|
constructor(config, nodeUrl) {
|
7
9
|
super(config);
|
8
|
-
this.endpoint = Endpoints.Limited;
|
9
10
|
this.nodeUrl = nodeUrl;
|
10
11
|
this.axiosInstance.interceptors.request.use(async (req) => {
|
11
12
|
const config = AxiosHelper.GetAuthAxiosConfig(this.nodeUrl, "", "");
|
@@ -4,9 +4,9 @@ import { IPAddressAndLocationService } from "..";
|
|
4
4
|
import { GeoHelper } from "../../helper";
|
5
5
|
import { AxiosHelper } from "../../helper";
|
6
6
|
class OrderService extends BaseService {
|
7
|
+
endpoint = Endpoints.Order;
|
7
8
|
constructor(config) {
|
8
9
|
super(config);
|
9
|
-
this.endpoint = Endpoints.Order;
|
10
10
|
this.axiosInstance.interceptors.request.use(async (req) => {
|
11
11
|
const locationService = new IPAddressAndLocationService(config);
|
12
12
|
const geoCoordinates = await GeoHelper.GetGeoCoordinates(locationService);
|
@@ -17,8 +17,7 @@ class OrderService extends BaseService {
|
|
17
17
|
// #region "POST"
|
18
18
|
async create(data) {
|
19
19
|
const url = this.resolveURL();
|
20
|
-
|
21
|
-
return response;
|
20
|
+
return this.POST(url, data);
|
22
21
|
}
|
23
22
|
}
|
24
23
|
export { OrderService };
|
@@ -6,8 +6,8 @@ declare class OrganizationService extends BaseService {
|
|
6
6
|
endpoint: string;
|
7
7
|
constructor(config: AxiosRequestConfig);
|
8
8
|
create(data: OrganizationData): Promise<import("axios").AxiosResponse<OrganizationData, any, {}>>;
|
9
|
-
createDocument(id:
|
10
|
-
update(id:
|
9
|
+
createDocument(id: number, data: DocumentData): Promise<import("axios").AxiosResponse<DocumentData, any, {}>>;
|
10
|
+
update(id: number, data: OrganizationData): Promise<import("axios").AxiosResponse<OrganizationData, any, {}>>;
|
11
11
|
delete(id: number): Promise<import("axios").AxiosResponse<OrganizationData, any, {}>>;
|
12
12
|
}
|
13
13
|
export { OrganizationService };
|
@@ -4,9 +4,10 @@ import { IPAddressAndLocationService } from "..";
|
|
4
4
|
import { GeoHelper } from "../../helper";
|
5
5
|
import { AxiosHelper } from "../../helper";
|
6
6
|
class OrganizationService extends BaseService {
|
7
|
+
url;
|
8
|
+
endpoint = Endpoints.Organization;
|
7
9
|
constructor(config) {
|
8
10
|
super(config);
|
9
|
-
this.endpoint = Endpoints.Organization;
|
10
11
|
this.axiosInstance.interceptors.request.use(async (req) => {
|
11
12
|
const locationService = new IPAddressAndLocationService(config);
|
12
13
|
const geoCoordinates = await GeoHelper.GetGeoCoordinates(locationService);
|
@@ -17,27 +18,23 @@ class OrganizationService extends BaseService {
|
|
17
18
|
// #region "POST"
|
18
19
|
async create(data) {
|
19
20
|
const url = this.resolveURL();
|
20
|
-
|
21
|
-
return response;
|
21
|
+
return this.POST(url, data);
|
22
22
|
}
|
23
23
|
async createDocument(id, data) {
|
24
24
|
const url = this.resolveURL(`${OrganizationEndpoints.Document}/${id}`);
|
25
|
-
|
26
|
-
return response;
|
25
|
+
return this.POST(url, data);
|
27
26
|
}
|
28
27
|
// #endregion
|
29
28
|
// #region "PUT"
|
30
29
|
async update(id, data) {
|
31
30
|
const url = this.resolveURL(id);
|
32
|
-
|
33
|
-
return response;
|
31
|
+
return this.PUT(url, data);
|
34
32
|
}
|
35
33
|
// #endregion
|
36
34
|
// #region "DELETE"
|
37
35
|
async delete(id) {
|
38
|
-
const url = this.resolveURL(id
|
39
|
-
|
40
|
-
return response;
|
36
|
+
const url = this.resolveURL(id);
|
37
|
+
return this.DELETE(url);
|
41
38
|
}
|
42
39
|
}
|
43
40
|
export { OrganizationService };
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { Endpoints } from "../../constants";
|
2
2
|
import { BaseService } from "./base";
|
3
3
|
class PromotionService extends BaseService {
|
4
|
+
endpoint = Endpoints.Promotion;
|
4
5
|
constructor(config) {
|
5
6
|
super(config);
|
6
|
-
this.endpoint = Endpoints.Promotion;
|
7
7
|
}
|
8
8
|
// #region "GET"
|
9
9
|
async getPromotionByCode(promotionCode) {
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { AxiosRequestConfig } from "axios";
|
2
2
|
import { BaseService } from "./base";
|
3
|
-
import type { TransactionData, TransactionInquiry } from "../../types";
|
3
|
+
import type { TransactionData, TransactionInquiry, TransactionResultInquiry } from "../../types";
|
4
4
|
declare class TransactionService extends BaseService {
|
5
5
|
endpoint: string;
|
6
6
|
constructor(config: AxiosRequestConfig);
|
7
|
-
inquiry(payload: TransactionInquiry): Promise<import("axios").AxiosResponse<
|
7
|
+
inquiry(payload: TransactionInquiry): Promise<import("axios").AxiosResponse<TransactionResultInquiry, any, {}>>;
|
8
8
|
create(payload: TransactionData): Promise<import("axios").AxiosResponse<TransactionData, any, {}>>;
|
9
9
|
}
|
10
10
|
export { TransactionService };
|
@@ -4,9 +4,9 @@ import { IPAddressAndLocationService } from "..";
|
|
4
4
|
import { GeoHelper } from "../../helper";
|
5
5
|
import { AxiosHelper } from "../../helper";
|
6
6
|
class TransactionService extends BaseService {
|
7
|
+
endpoint = Endpoints.Transaction;
|
7
8
|
constructor(config) {
|
8
9
|
super(config);
|
9
|
-
this.endpoint = Endpoints.Transaction;
|
10
10
|
this.axiosInstance.interceptors.request.use(async (req) => {
|
11
11
|
const locationService = new IPAddressAndLocationService(config);
|
12
12
|
const geoCoordinates = await GeoHelper.GetGeoCoordinates(locationService);
|
@@ -17,15 +17,13 @@ class TransactionService extends BaseService {
|
|
17
17
|
// #region "GET"
|
18
18
|
async inquiry(payload) {
|
19
19
|
const url = this.resolveURL("/inquiry");
|
20
|
-
|
21
|
-
return response;
|
20
|
+
return this.GET(url, payload);
|
22
21
|
}
|
23
22
|
// #endregion
|
24
23
|
// #region "POST"
|
25
24
|
async create(payload) {
|
26
25
|
const url = this.resolveURL();
|
27
|
-
|
28
|
-
return response;
|
26
|
+
return this.POST(url, payload);
|
29
27
|
}
|
30
28
|
}
|
31
29
|
export { TransactionService };
|