cetus-tools 1.2.12 → 1.2.13
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/external/KycApiManager.d.ts +9 -62
- package/dist/api/external/KycApiManager.js +13 -86
- package/dist/api/external/KycApiManager.js.map +1 -1
- package/dist/api/external/KycApiManagerV1.d.ts +84 -0
- package/dist/api/external/KycApiManagerV1.js +114 -0
- package/dist/api/external/KycApiManagerV1.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
import { ExternalApiConnection, StandardKeyGroup } from "itrm-tools";
|
|
3
3
|
export declare enum KycStatus {
|
|
4
4
|
APPROVED = "APPROVED",
|
|
5
5
|
REJECTED = "REJECTED"
|
|
6
6
|
}
|
|
7
|
-
export interface IThirdPartyDetails {
|
|
8
|
-
id?: number | string;
|
|
9
|
-
thirdPartyId?: string;
|
|
10
|
-
counterpartyId?: number;
|
|
11
|
-
document?: string;
|
|
12
|
-
details?: any;
|
|
13
|
-
limit?: number;
|
|
14
|
-
offset?: number;
|
|
15
|
-
count?: boolean;
|
|
16
|
-
}
|
|
17
7
|
export interface ICounterpartyDetails {
|
|
18
8
|
id?: number | string;
|
|
19
9
|
counterpartyId?: number;
|
|
@@ -23,38 +13,9 @@ export interface ICounterpartyDetails {
|
|
|
23
13
|
registerDate?: number;
|
|
24
14
|
approvalDate?: number;
|
|
25
15
|
details?: any;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
config?: AxiosRequestConfig;
|
|
30
|
-
}
|
|
31
|
-
export interface IAccounts {
|
|
32
|
-
accountId?: number;
|
|
33
|
-
statusId?: number;
|
|
34
|
-
thirdPartyId?: number;
|
|
35
|
-
counterpartyId?: number;
|
|
36
|
-
typeId?: number;
|
|
37
|
-
date?: number;
|
|
38
|
-
bank?: string;
|
|
39
|
-
backAccount?: string;
|
|
40
|
-
updatedAt?: string;
|
|
41
|
-
createdAt?: string;
|
|
42
|
-
config?: AxiosRequestConfig;
|
|
43
|
-
}
|
|
44
|
-
export interface IAccountsDetails {
|
|
45
|
-
id?: number | string;
|
|
46
|
-
accountId?: number;
|
|
47
|
-
statusId?: number;
|
|
48
|
-
thirdPartyId?: number;
|
|
49
|
-
counterpartyId?: number;
|
|
50
|
-
typeId?: number;
|
|
51
|
-
backAccountType?: string;
|
|
52
|
-
date?: number;
|
|
53
|
-
bank?: string;
|
|
54
|
-
backAccount?: string;
|
|
55
|
-
values?: IAccounts[];
|
|
56
|
-
updatedAt?: string;
|
|
57
|
-
createdAt?: string;
|
|
16
|
+
status?: string;
|
|
17
|
+
sources?: string;
|
|
18
|
+
types?: string;
|
|
58
19
|
limit?: number;
|
|
59
20
|
offset?: number;
|
|
60
21
|
count?: boolean;
|
|
@@ -62,23 +23,9 @@ export interface IAccountsDetails {
|
|
|
62
23
|
}
|
|
63
24
|
export declare class KycApiManager extends ExternalApiConnection {
|
|
64
25
|
private url;
|
|
65
|
-
constructor(keys: StandardKeyGroup,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
getCounterpartyById(id: number): Promise<any>;
|
|
26
|
+
constructor(keys: StandardKeyGroup, apiUrl: string, application: string);
|
|
27
|
+
getCounterParties(details: ICounterpartyDetails): Promise<object[]>;
|
|
28
|
+
countCounterParties(details: ICounterpartyDetails): Promise<unknown>;
|
|
29
|
+
getCounterPartyById(id: number): Promise<any>;
|
|
70
30
|
private buildRequestPathForCounterparties;
|
|
71
|
-
getAllThirdParties(details: IThirdPartyDetails): Promise<unknown>;
|
|
72
|
-
countAllThirdParties(details: IThirdPartyDetails): Promise<unknown>;
|
|
73
|
-
getThirdPartyById(id: number): Promise<any>;
|
|
74
|
-
createThirdParty(details: IThirdPartyDetails): Promise<unknown>;
|
|
75
|
-
updateThirdParty(details: IThirdPartyDetails): Promise<unknown>;
|
|
76
|
-
private buildRequestPathForThirdParties;
|
|
77
|
-
getAllAccounts(details: IAccountsDetails): Promise<unknown>;
|
|
78
|
-
countAllAccounts(details: IAccountsDetails): Promise<unknown>;
|
|
79
|
-
getAccountById(id: number): Promise<any>;
|
|
80
|
-
createAccount(details: IAccountsDetails): Promise<unknown>;
|
|
81
|
-
createAccounts(details: IAccountsDetails): Promise<unknown>;
|
|
82
|
-
updateAccount(details: IAccountsDetails): Promise<unknown>;
|
|
83
|
-
private buildRequestPathForAccounts;
|
|
84
31
|
}
|
|
@@ -9,27 +9,23 @@ var KycStatus;
|
|
|
9
9
|
})(KycStatus || (exports.KycStatus = KycStatus = {}));
|
|
10
10
|
class KycApiManager extends itrm_tools_1.ExternalApiConnection {
|
|
11
11
|
url;
|
|
12
|
-
constructor(keys,
|
|
13
|
-
super(
|
|
14
|
-
this.url =
|
|
12
|
+
constructor(keys, apiUrl, application) {
|
|
13
|
+
super(application.toLowerCase(), keys);
|
|
14
|
+
this.url = apiUrl;
|
|
15
15
|
}
|
|
16
|
-
async
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
async getCounterParties(details) {
|
|
17
|
+
let path = this.buildRequestPathForCounterparties(`/v1/counterParties`, details);
|
|
18
|
+
const headers = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
19
|
+
const response = this.decryptResponse(await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, headers));
|
|
20
|
+
return response;
|
|
20
21
|
}
|
|
21
|
-
async
|
|
22
|
-
let path = this.buildRequestPathForCounterparties(`/v1/
|
|
22
|
+
async countCounterParties(details) {
|
|
23
|
+
let path = this.buildRequestPathForCounterparties(`/v1/counterParties`, { ...details, count: true });
|
|
23
24
|
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
24
25
|
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
25
26
|
}
|
|
26
|
-
async
|
|
27
|
-
let path =
|
|
28
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
29
|
-
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
30
|
-
}
|
|
31
|
-
async getCounterpartyById(id) {
|
|
32
|
-
let path = `/v1/kyc/counterparties?id=${id}`;
|
|
27
|
+
async getCounterPartyById(id) {
|
|
28
|
+
let path = `/v1/counterParties?id=${id}`;
|
|
33
29
|
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
34
30
|
let response = await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature);
|
|
35
31
|
if (response.result?.length > 0)
|
|
@@ -37,76 +33,7 @@ class KycApiManager extends itrm_tools_1.ExternalApiConnection {
|
|
|
37
33
|
return undefined;
|
|
38
34
|
}
|
|
39
35
|
buildRequestPathForCounterparties(url, details) {
|
|
40
|
-
let suffix = `${details.
|
|
41
|
-
return `${url}?${suffix.substring(1)}`;
|
|
42
|
-
}
|
|
43
|
-
async getAllThirdParties(details) {
|
|
44
|
-
let path = this.buildRequestPathForThirdParties(`/v1/kyc/third-parties`, details);
|
|
45
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
46
|
-
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
47
|
-
}
|
|
48
|
-
async countAllThirdParties(details) {
|
|
49
|
-
let path = this.buildRequestPathForThirdParties(`/v1/kyc/third-parties`, { ...details, count: true });
|
|
50
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
51
|
-
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
52
|
-
}
|
|
53
|
-
async getThirdPartyById(id) {
|
|
54
|
-
let path = `/v1/kyc/third-parties?id=${id}`;
|
|
55
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
56
|
-
let response = await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature);
|
|
57
|
-
if (response.result?.length > 0)
|
|
58
|
-
return response.result[0];
|
|
59
|
-
return undefined;
|
|
60
|
-
}
|
|
61
|
-
async createThirdParty(details) {
|
|
62
|
-
let path = `/v1/kyc/third-parties`;
|
|
63
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.POST, path: path, body: details });
|
|
64
|
-
return (await itrm_tools_1.RequestAxiosCall.post(`${this.url}${path}`, details, signature));
|
|
65
|
-
}
|
|
66
|
-
async updateThirdParty(details) {
|
|
67
|
-
let path = `/v1/kyc/third-parties/${details.thirdPartyId}`;
|
|
68
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.PUT, path: path, body: details });
|
|
69
|
-
return (await itrm_tools_1.RequestAxiosCall.put(`${this.url}${path}`, details, signature));
|
|
70
|
-
}
|
|
71
|
-
buildRequestPathForThirdParties(url, details) {
|
|
72
|
-
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.counterpartyId ? `&counterpartyId=${details.counterpartyId}` : ""}${details.document ? `&document=${details.document}` : ""}${details.limit ? `&limit=${details.limit}` : ""}${details.offset ? `&offset=${details.offset}` : ""}${details.count ? `&count=${details.count}` : ""}`;
|
|
73
|
-
return `${url}?${suffix.substring(1)}`;
|
|
74
|
-
}
|
|
75
|
-
async getAllAccounts(details) {
|
|
76
|
-
let path = this.buildRequestPathForAccounts(`/v1/kyc/accounts`, details);
|
|
77
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
78
|
-
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
79
|
-
}
|
|
80
|
-
async countAllAccounts(details) {
|
|
81
|
-
let path = this.buildRequestPathForAccounts(`/v1/kyc/accounts`, { ...details, count: true });
|
|
82
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
83
|
-
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
84
|
-
}
|
|
85
|
-
async getAccountById(id) {
|
|
86
|
-
let path = `/v1/kyc/accounts?id=${id}`;
|
|
87
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
88
|
-
let response = await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature);
|
|
89
|
-
if (response.result?.length > 0)
|
|
90
|
-
return response.result[0];
|
|
91
|
-
return undefined;
|
|
92
|
-
}
|
|
93
|
-
async createAccount(details) {
|
|
94
|
-
let path = `/v1/kyc/accounts`;
|
|
95
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.POST, path: path, body: details });
|
|
96
|
-
return (await itrm_tools_1.RequestAxiosCall.post(`${this.url}${path}`, details, signature));
|
|
97
|
-
}
|
|
98
|
-
async createAccounts(details) {
|
|
99
|
-
let path = `/v1/kyc/accounts`;
|
|
100
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.POST, path: path, body: { values: details.values } });
|
|
101
|
-
return (await itrm_tools_1.RequestAxiosCall.post(`${this.url}${path}`, { values: details.values }, signature));
|
|
102
|
-
}
|
|
103
|
-
async updateAccount(details) {
|
|
104
|
-
let path = `/v1/kyc/accounts/${details.accountId}`;
|
|
105
|
-
let signature = this.sign({ method: itrm_tools_1.RequestMethod.PUT, path: path, body: details });
|
|
106
|
-
return (await itrm_tools_1.RequestAxiosCall.put(`${this.url}${path}`, details, signature));
|
|
107
|
-
}
|
|
108
|
-
buildRequestPathForAccounts(url, details) {
|
|
109
|
-
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.counterpartyId ? `&counterpartyId=${details.counterpartyId}` : ""}${details.statusId ? `&statusId=${details.statusId}` : ""}${details.thirdPartyId ? `&thirdPartyId=${details.thirdPartyId}` : ""}${details.typeId ? `&typeId=${details.typeId}` : ""}${details.bank ? `&bank=${details.bank}` : ""}${details.backAccount ? `&backAccount=${details.backAccount}` : ""}${details.limit ? `&limit=${details.limit}` : ""}${details.offset ? `&offset=${details.offset}` : ""}${details.count ? `&count=${details.count}` : ""}`;
|
|
36
|
+
let suffix = `${details.sourceId ? `&sourceId=${details.sourceId}` : ""}${details.statusId ? `&statusId=${details.statusId}` : ""}${details.typeId ? `&typeId=${details.typeId}` : ""}${details.status ? `&status=${details.status}` : ""}${details.sources ? `&sources=${details.sources}` : ""}${details.types ? `&types=${details.types}` : ""}${details.limit ? `&limit=${details.limit}` : ""}${details.offset ? `&offset=${details.offset}` : ""}${details.count ? `&count=${details.count}` : ""}`;
|
|
110
37
|
return `${url}?${suffix.substring(1)}`;
|
|
111
38
|
}
|
|
112
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KycApiManager.js","sourceRoot":"","sources":["../../../src/api/external/KycApiManager.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"KycApiManager.js","sourceRoot":"","sources":["../../../src/api/external/KycApiManager.ts"],"names":[],"mappings":";;;AAEA,2CAAmH;AAEnH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;AACvB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAoBD,MAAa,aAAc,SAAQ,kCAAqB;IAC9C,GAAG,CAAS;IAEpB,YAAY,IAAsB,EAAE,MAAc,EAAE,WAAmB;QACrE,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC;IACpB,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,OAA6B;QAC1D,IAAI,IAAI,GAAG,IAAI,CAAC,iCAAiC,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QACjF,MAAM,OAAO,GAAuB,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,0BAAa,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACzF,MAAM,QAAQ,GAAG,IAAI,CAA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AC,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC1e,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACzC,CAAC;CACF;AAlCD,sCAkCC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ExternalApiConnection, StandardKeyGroup } from 'itrm-tools';
|
|
2
|
+
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
export declare enum KycStatus {
|
|
4
|
+
APPROVED = "APPROVED",
|
|
5
|
+
REJECTED = "REJECTED"
|
|
6
|
+
}
|
|
7
|
+
export interface IThirdPartyDetails {
|
|
8
|
+
id?: number | string;
|
|
9
|
+
thirdPartyId?: string;
|
|
10
|
+
counterpartyId?: number;
|
|
11
|
+
document?: string;
|
|
12
|
+
details?: any;
|
|
13
|
+
limit?: number;
|
|
14
|
+
offset?: number;
|
|
15
|
+
count?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ICounterpartyDetails {
|
|
18
|
+
id?: number | string;
|
|
19
|
+
counterpartyId?: number;
|
|
20
|
+
sourceId?: number;
|
|
21
|
+
statusId?: number;
|
|
22
|
+
typeId?: number;
|
|
23
|
+
registerDate?: number;
|
|
24
|
+
approvalDate?: number;
|
|
25
|
+
details?: any;
|
|
26
|
+
limit?: number;
|
|
27
|
+
offset?: number;
|
|
28
|
+
count?: boolean;
|
|
29
|
+
config?: AxiosRequestConfig;
|
|
30
|
+
}
|
|
31
|
+
export interface IAccounts {
|
|
32
|
+
accountId?: number;
|
|
33
|
+
statusId?: number;
|
|
34
|
+
thirdPartyId?: number;
|
|
35
|
+
counterpartyId?: number;
|
|
36
|
+
typeId?: number;
|
|
37
|
+
date?: number;
|
|
38
|
+
bank?: string;
|
|
39
|
+
backAccount?: string;
|
|
40
|
+
updatedAt?: string;
|
|
41
|
+
createdAt?: string;
|
|
42
|
+
config?: AxiosRequestConfig;
|
|
43
|
+
}
|
|
44
|
+
export interface IAccountsDetails {
|
|
45
|
+
id?: number | string;
|
|
46
|
+
accountId?: number;
|
|
47
|
+
statusId?: number;
|
|
48
|
+
thirdPartyId?: number;
|
|
49
|
+
counterpartyId?: number;
|
|
50
|
+
typeId?: number;
|
|
51
|
+
backAccountType?: string;
|
|
52
|
+
date?: number;
|
|
53
|
+
bank?: string;
|
|
54
|
+
backAccount?: string;
|
|
55
|
+
values?: IAccounts[];
|
|
56
|
+
updatedAt?: string;
|
|
57
|
+
createdAt?: string;
|
|
58
|
+
limit?: number;
|
|
59
|
+
offset?: number;
|
|
60
|
+
count?: boolean;
|
|
61
|
+
config?: AxiosRequestConfig;
|
|
62
|
+
}
|
|
63
|
+
export declare class KycApiManagerV1 extends ExternalApiConnection {
|
|
64
|
+
private url;
|
|
65
|
+
constructor(keys: StandardKeyGroup, url: string);
|
|
66
|
+
getCounterparties(status: KycStatus): Promise<unknown>;
|
|
67
|
+
getAllCounterparties(details: ICounterpartyDetails): Promise<unknown>;
|
|
68
|
+
countAllCounterparties(details: ICounterpartyDetails): Promise<unknown>;
|
|
69
|
+
getCounterpartyById(id: number): Promise<any>;
|
|
70
|
+
private buildRequestPathForCounterparties;
|
|
71
|
+
getAllThirdParties(details: IThirdPartyDetails): Promise<unknown>;
|
|
72
|
+
countAllThirdParties(details: IThirdPartyDetails): Promise<unknown>;
|
|
73
|
+
getThirdPartyById(id: number): Promise<any>;
|
|
74
|
+
createThirdParty(details: IThirdPartyDetails): Promise<unknown>;
|
|
75
|
+
updateThirdParty(details: IThirdPartyDetails): Promise<unknown>;
|
|
76
|
+
private buildRequestPathForThirdParties;
|
|
77
|
+
getAllAccounts(details: IAccountsDetails): Promise<unknown>;
|
|
78
|
+
countAllAccounts(details: IAccountsDetails): Promise<unknown>;
|
|
79
|
+
getAccountById(id: number): Promise<any>;
|
|
80
|
+
createAccount(details: IAccountsDetails): Promise<unknown>;
|
|
81
|
+
createAccounts(details: IAccountsDetails): Promise<unknown>;
|
|
82
|
+
updateAccount(details: IAccountsDetails): Promise<unknown>;
|
|
83
|
+
private buildRequestPathForAccounts;
|
|
84
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KycApiManagerV1 = exports.KycStatus = void 0;
|
|
4
|
+
const itrm_tools_1 = require("itrm-tools");
|
|
5
|
+
var KycStatus;
|
|
6
|
+
(function (KycStatus) {
|
|
7
|
+
KycStatus["APPROVED"] = "APPROVED";
|
|
8
|
+
KycStatus["REJECTED"] = "REJECTED";
|
|
9
|
+
})(KycStatus || (exports.KycStatus = KycStatus = {}));
|
|
10
|
+
class KycApiManagerV1 extends itrm_tools_1.ExternalApiConnection {
|
|
11
|
+
url;
|
|
12
|
+
constructor(keys, url) {
|
|
13
|
+
super('cetus', keys);
|
|
14
|
+
this.url = url;
|
|
15
|
+
}
|
|
16
|
+
async getCounterparties(status) {
|
|
17
|
+
let paath = `/v1/kyc/counterparties?status=${status}`;
|
|
18
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: paath });
|
|
19
|
+
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${paath}`, signature));
|
|
20
|
+
}
|
|
21
|
+
async getAllCounterparties(details) {
|
|
22
|
+
let path = this.buildRequestPathForCounterparties(`/v1/kyc/counterparties`, details);
|
|
23
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
24
|
+
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
25
|
+
}
|
|
26
|
+
async countAllCounterparties(details) {
|
|
27
|
+
let path = this.buildRequestPathForThirdParties(`/v1/kyc/counterparties`, { ...details, count: true });
|
|
28
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
29
|
+
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
30
|
+
}
|
|
31
|
+
async getCounterpartyById(id) {
|
|
32
|
+
let path = `/v1/kyc/counterparties?id=${id}`;
|
|
33
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
34
|
+
let response = await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature);
|
|
35
|
+
if (response.result?.length > 0)
|
|
36
|
+
return response.result[0];
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
buildRequestPathForCounterparties(url, details) {
|
|
40
|
+
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.sourceId ? `&sourceId=${details.sourceId}` : ""}${details.statusId ? `&statusId=${details.statusId}` : ""}${details.typeId ? `&typeId=${details.typeId}` : ""}${details.limit ? `&limit=${details.limit}` : ""}${details.offset ? `&offset=${details.offset}` : ""}${details.count ? `&count=${details.count}` : ""}`;
|
|
41
|
+
return `${url}?${suffix.substring(1)}`;
|
|
42
|
+
}
|
|
43
|
+
async getAllThirdParties(details) {
|
|
44
|
+
let path = this.buildRequestPathForThirdParties(`/v1/kyc/third-parties`, details);
|
|
45
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
46
|
+
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
47
|
+
}
|
|
48
|
+
async countAllThirdParties(details) {
|
|
49
|
+
let path = this.buildRequestPathForThirdParties(`/v1/kyc/third-parties`, { ...details, count: true });
|
|
50
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
51
|
+
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
52
|
+
}
|
|
53
|
+
async getThirdPartyById(id) {
|
|
54
|
+
let path = `/v1/kyc/third-parties?id=${id}`;
|
|
55
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
56
|
+
let response = await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature);
|
|
57
|
+
if (response.result?.length > 0)
|
|
58
|
+
return response.result[0];
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
async createThirdParty(details) {
|
|
62
|
+
let path = `/v1/kyc/third-parties`;
|
|
63
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.POST, path: path, body: details });
|
|
64
|
+
return (await itrm_tools_1.RequestAxiosCall.post(`${this.url}${path}`, details, signature));
|
|
65
|
+
}
|
|
66
|
+
async updateThirdParty(details) {
|
|
67
|
+
let path = `/v1/kyc/third-parties/${details.thirdPartyId}`;
|
|
68
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.PUT, path: path, body: details });
|
|
69
|
+
return (await itrm_tools_1.RequestAxiosCall.put(`${this.url}${path}`, details, signature));
|
|
70
|
+
}
|
|
71
|
+
buildRequestPathForThirdParties(url, details) {
|
|
72
|
+
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.counterpartyId ? `&counterpartyId=${details.counterpartyId}` : ""}${details.document ? `&document=${details.document}` : ""}${details.limit ? `&limit=${details.limit}` : ""}${details.offset ? `&offset=${details.offset}` : ""}${details.count ? `&count=${details.count}` : ""}`;
|
|
73
|
+
return `${url}?${suffix.substring(1)}`;
|
|
74
|
+
}
|
|
75
|
+
async getAllAccounts(details) {
|
|
76
|
+
let path = this.buildRequestPathForAccounts(`/v1/kyc/accounts`, details);
|
|
77
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
78
|
+
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
79
|
+
}
|
|
80
|
+
async countAllAccounts(details) {
|
|
81
|
+
let path = this.buildRequestPathForAccounts(`/v1/kyc/accounts`, { ...details, count: true });
|
|
82
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
83
|
+
return (await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature));
|
|
84
|
+
}
|
|
85
|
+
async getAccountById(id) {
|
|
86
|
+
let path = `/v1/kyc/accounts?id=${id}`;
|
|
87
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.GET, path: path });
|
|
88
|
+
let response = await itrm_tools_1.RequestAxiosCall.get(`${this.url}${path}`, signature);
|
|
89
|
+
if (response.result?.length > 0)
|
|
90
|
+
return response.result[0];
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
async createAccount(details) {
|
|
94
|
+
let path = `/v1/kyc/accounts`;
|
|
95
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.POST, path: path, body: details });
|
|
96
|
+
return (await itrm_tools_1.RequestAxiosCall.post(`${this.url}${path}`, details, signature));
|
|
97
|
+
}
|
|
98
|
+
async createAccounts(details) {
|
|
99
|
+
let path = `/v1/kyc/accounts`;
|
|
100
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.POST, path: path, body: { values: details.values } });
|
|
101
|
+
return (await itrm_tools_1.RequestAxiosCall.post(`${this.url}${path}`, { values: details.values }, signature));
|
|
102
|
+
}
|
|
103
|
+
async updateAccount(details) {
|
|
104
|
+
let path = `/v1/kyc/accounts/${details.accountId}`;
|
|
105
|
+
let signature = this.sign({ method: itrm_tools_1.RequestMethod.PUT, path: path, body: details });
|
|
106
|
+
return (await itrm_tools_1.RequestAxiosCall.put(`${this.url}${path}`, details, signature));
|
|
107
|
+
}
|
|
108
|
+
buildRequestPathForAccounts(url, details) {
|
|
109
|
+
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.counterpartyId ? `&counterpartyId=${details.counterpartyId}` : ""}${details.statusId ? `&statusId=${details.statusId}` : ""}${details.thirdPartyId ? `&thirdPartyId=${details.thirdPartyId}` : ""}${details.typeId ? `&typeId=${details.typeId}` : ""}${details.bank ? `&bank=${details.bank}` : ""}${details.backAccount ? `&backAccount=${details.backAccount}` : ""}${details.limit ? `&limit=${details.limit}` : ""}${details.offset ? `&offset=${details.offset}` : ""}${details.count ? `&count=${details.count}` : ""}`;
|
|
110
|
+
return `${url}?${suffix.substring(1)}`;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.KycApiManagerV1 = KycApiManagerV1;
|
|
114
|
+
//# sourceMappingURL=KycApiManagerV1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KycApiManagerV1.js","sourceRoot":"","sources":["../../../src/api/external/KycApiManagerV1.ts"],"names":[],"mappings":";;;AAAA,2CAAsG;AAGtG,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;AACzB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AA8DD,MAAa,eAAgB,SAAQ,kCAAqB;IAC9C,GAAG,CAAS;IAEpB,YAAY,IAAsB,EAAE,GAAW;QAC3C,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,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AAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAC/jB,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3C,CAAC;CACJ;AAzHD,0CAyHC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ExpressLogableConfig as ExpressLogableConfig } from './api/ExpressLogableConfig';
|
|
2
2
|
export { RoleServicePermissionsChecker as RoleServicePermissionsChecker } from './api/checkers/RoleServicePermissionsChecker';
|
|
3
|
-
export { KycApiManager as KycApiManager, KycStatus as KycStatus } from './api/external/KycApiManager';
|
|
3
|
+
export { KycApiManager as KycApiManager, KycStatus as KycStatus, ICounterpartyDetails as ICounterpartyDetails } from './api/external/KycApiManager';
|
|
4
4
|
export { BitsoApiConfig as BitsoApiConfig, BitsoApiConnection as BitsoApiConnection } from './api/bitso/BitsoApiConnection';
|
|
5
5
|
export { IBitsoBalance as IBitsoBalance, findBalances as findBalances } from './api/bitso/tools/BitsoBalance';
|
|
6
6
|
export { IBitsoBook as IBitsoBook, findBitsoBook as findBitsoBook } from './api/bitso/tools/BitsoBook';
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ var ExpressLogableConfig_1 = require("./api/ExpressLogableConfig");
|
|
|
5
5
|
Object.defineProperty(exports, "ExpressLogableConfig", { enumerable: true, get: function () { return ExpressLogableConfig_1.ExpressLogableConfig; } });
|
|
6
6
|
var RoleServicePermissionsChecker_1 = require("./api/checkers/RoleServicePermissionsChecker");
|
|
7
7
|
Object.defineProperty(exports, "RoleServicePermissionsChecker", { enumerable: true, get: function () { return RoleServicePermissionsChecker_1.RoleServicePermissionsChecker; } });
|
|
8
|
+
// export { KycApiManager as KycApiManager, KycStatus as KycStatus } from './api/external/KycApiManagerV1';
|
|
8
9
|
var KycApiManager_1 = require("./api/external/KycApiManager");
|
|
9
10
|
Object.defineProperty(exports, "KycApiManager", { enumerable: true, get: function () { return KycApiManager_1.KycApiManager; } });
|
|
10
11
|
Object.defineProperty(exports, "KycStatus", { enumerable: true, get: function () { return KycApiManager_1.KycStatus; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mEAA0F;AAAjF,4HAAA,oBAAoB,OAAwB;AAErD,8FAA8H;AAArH,8IAAA,6BAA6B,OAAiC;AAEvE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mEAA0F;AAAjF,4HAAA,oBAAoB,OAAwB;AAErD,8FAA8H;AAArH,8IAAA,6BAA6B,OAAiC;AAEvE,2GAA2G;AAC3G,8DAAoJ;AAA3I,8GAAA,aAAa,OAAiB;AAAE,0GAAA,SAAS,OAAa;AAE/D,qEAA4H;AAAjF,wHAAA,kBAAkB,OAAsB;AACnF,+DAA8G;AAArE,4GAAA,YAAY,OAAgB;AACrE,yDAAuG;AAApE,0GAAA,aAAa,OAAiB;AAIjE,wDAA+I;AAAtI,gHAAA,cAAc,OAAkB;AACzC,sDAA4H;AAAnH,8GAAA,aAAa,OAAiB;AACvC,4EAAyM;AAAhM,oIAAA,wBAAwB,OAA4B;AAC7D,gEAA+J;AAAtJ,wHAAA,kBAAkB,OAAsB;AACjD,wDAAmI;AAA1H,gHAAA,cAAc,OAAkB;AACzC,kEAAsK;AAA7J,0HAAA,mBAAmB,OAAuB;AACnD,kEAAsK;AAA7J,0HAAA,mBAAmB,OAAuB;AACnD,gDAAuG;AAA9F,wGAAA,UAAU,OAAc;AACjC,8DAAwJ;AAA/I,sHAAA,iBAAiB,OAAqB;AAC/C,oDAAqH;AAA5G,4GAAA,YAAY,OAAgB;AACrC,gDAAuG;AAA9F,wGAAA,UAAU,OAAc;AACjC,oDAAqH;AAA5G,4GAAA,YAAY,OAAgB;AACrC,sDAA4H;AAAnH,8GAAA,aAAa,OAAiB;AACvC,0DAAsJ;AAA7I,kHAAA,eAAe,OAAmB;AAC3C,oEAAyL;AAAhL,4HAAA,oBAAoB,OAAwB;AACrD,kEAA4K;AAAnK,yHAAA,kBAAkB,OAAsB;AACjD,oEAA+N;AAAtN,mIAAA,2BAA2B,OAA+B;AACnE,oEAAyL;AAAhL,4HAAA,oBAAoB,OAAwB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cetus-tools",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.13",
|
|
4
4
|
"description": "Librería para elementos comunes de CETUS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@types/morgan": "^1.9.9",
|
|
38
38
|
"@types/node": "^24.10.1",
|
|
39
39
|
"jest": "^30.2.0",
|
|
40
|
-
"rimraf": "^6.1.
|
|
40
|
+
"rimraf": "^6.1.2",
|
|
41
41
|
"ts-jest": "^29.4.5",
|
|
42
42
|
"typescript": "^5.9.3"
|
|
43
43
|
},
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"axios": "^1.13.2",
|
|
46
46
|
"crypto-js": "^4.2.0",
|
|
47
47
|
"dotenv": "^17.2.3",
|
|
48
|
-
"itrm-tools": "^1.3.
|
|
48
|
+
"itrm-tools": "^1.3.24",
|
|
49
49
|
"morgan": "^1.10.1"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
52
|
"axios-mock-adapter": "^2.0.0"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|