cetus-tools 1.1.7 → 1.1.9
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 +74 -0
- package/dist/api/external/KycApiManager.js +114 -0
- package/dist/api/external/KycApiManager.js.map +1 -1
- package/dist/crud/TransactionsManager.d.ts +52 -0
- package/dist/crud/TransactionsManager.js +96 -0
- package/dist/crud/TransactionsManager.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,10 +1,84 @@
|
|
|
1
1
|
import { ApiKeyPair, ExternalApiSigner } from 'itrm-tools';
|
|
2
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
3
|
export declare enum KycStatus {
|
|
3
4
|
APPROVED = "APPROVED",
|
|
4
5
|
REJECTED = "REJECTED"
|
|
5
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
|
+
}
|
|
6
63
|
export declare class KycApiManager extends ExternalApiSigner {
|
|
7
64
|
private url;
|
|
8
65
|
constructor(keys: ApiKeyPair, url: string);
|
|
9
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 buildRequestUrlForCounterparties;
|
|
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 buildRequestUrlForThirdParties;
|
|
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 buildRequestUrlForAccounts;
|
|
10
84
|
}
|
|
@@ -27,6 +27,120 @@ class KycApiManager extends itrm_tools_1.ExternalApiSigner {
|
|
|
27
27
|
return (yield itrm_tools_1.RequestAxiosCall.get(`${this.url}/v1/kyc/counterparties?status=${status}`, signature));
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
+
getAllCounterparties(details) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
let url = this.buildRequestUrlForCounterparties(`/v1/kyc/counterparties`, details);
|
|
33
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.GET, url);
|
|
34
|
+
return (yield itrm_tools_1.RequestAxiosCall.get(`${this.url}${url}`, signature));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
countAllCounterparties(details) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
let url = this.buildRequestUrlForThirdParties(`/v1/kyc/counterparties`, Object.assign(Object.assign({}, details), { count: true }));
|
|
40
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.GET, url);
|
|
41
|
+
return (yield itrm_tools_1.RequestAxiosCall.get(`${this.url}${url}`, signature));
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
getCounterpartyById(id) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
var _a;
|
|
47
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.GET, `/v1/kyc/counterparties?id=${id}`);
|
|
48
|
+
let response = yield itrm_tools_1.RequestAxiosCall.get(`${this.url}/v1/kyc/counterparties?id=${id}`, signature);
|
|
49
|
+
if (((_a = response.result) === null || _a === void 0 ? void 0 : _a.length) > 0)
|
|
50
|
+
return response.result[0];
|
|
51
|
+
return undefined;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
buildRequestUrlForCounterparties(url, details) {
|
|
55
|
+
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}` : ""}`;
|
|
56
|
+
return `${url}?${suffix.substring(1)}`;
|
|
57
|
+
}
|
|
58
|
+
getAllThirdParties(details) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
let url = this.buildRequestUrlForThirdParties(`/v1/kyc/third-parties`, details);
|
|
61
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.GET, url);
|
|
62
|
+
return (yield itrm_tools_1.RequestAxiosCall.get(`${this.url}${url}`, signature));
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
countAllThirdParties(details) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
let url = this.buildRequestUrlForThirdParties(`/v1/kyc/third-parties`, Object.assign(Object.assign({}, details), { count: true }));
|
|
68
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.GET, url);
|
|
69
|
+
return (yield itrm_tools_1.RequestAxiosCall.get(`${this.url}${url}`, signature));
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
getThirdPartyById(id) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a;
|
|
75
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.GET, `/v1/kyc/third-parties?id=${id}`);
|
|
76
|
+
let response = yield itrm_tools_1.RequestAxiosCall.get(`${this.url}/v1/kyc/third-parties?id=${id}`, signature);
|
|
77
|
+
if (((_a = response.result) === null || _a === void 0 ? void 0 : _a.length) > 0)
|
|
78
|
+
return response.result[0];
|
|
79
|
+
return undefined;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
createThirdParty(details) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.POST, `/v1/kyc/third-parties`, details);
|
|
85
|
+
return (yield itrm_tools_1.RequestAxiosCall.post(`${this.url}/v1/kyc/third-parties`, details, signature));
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
updateThirdParty(details) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.PUT, `/v1/kyc/third-parties/${details.thirdPartyId}`, details);
|
|
91
|
+
return (yield itrm_tools_1.RequestAxiosCall.put(`${this.url}/v1/kyc/third-parties/${details.thirdPartyId}`, details, signature));
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
buildRequestUrlForThirdParties(url, details) {
|
|
95
|
+
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}` : ""}`;
|
|
96
|
+
return `${url}?${suffix.substring(1)}`;
|
|
97
|
+
}
|
|
98
|
+
getAllAccounts(details) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
let url = this.buildRequestUrlForAccounts(`/v1/kyc/accounts`, details);
|
|
101
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.GET, url);
|
|
102
|
+
return (yield itrm_tools_1.RequestAxiosCall.get(`${this.url}${url}`, signature));
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
countAllAccounts(details) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
let url = this.buildRequestUrlForAccounts(`/v1/kyc/accounts`, Object.assign(Object.assign({}, details), { count: true }));
|
|
108
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.GET, url);
|
|
109
|
+
return (yield itrm_tools_1.RequestAxiosCall.get(`${this.url}${url}`, signature));
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
getAccountById(id) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
var _a;
|
|
115
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.GET, `/v1/kyc/accounts?id=${id}`);
|
|
116
|
+
let response = yield itrm_tools_1.RequestAxiosCall.get(`${this.url}/v1/kyc/accounts?id=${id}`, signature);
|
|
117
|
+
if (((_a = response.result) === null || _a === void 0 ? void 0 : _a.length) > 0)
|
|
118
|
+
return response.result[0];
|
|
119
|
+
return undefined;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
createAccount(details) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.POST, `/v1/kyc/accounts`, details);
|
|
125
|
+
return (yield itrm_tools_1.RequestAxiosCall.post(`${this.url}/v1/kyc/accounts`, details, signature));
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
createAccounts(details) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.POST, `/v1/kyc/accounts`, { values: details.values });
|
|
131
|
+
return (yield itrm_tools_1.RequestAxiosCall.post(`${this.url}/v1/kyc/accounts`, { values: details.values }, signature));
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
updateAccount(details) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
let signature = this.sign(itrm_tools_1.RequestMethod.PUT, `/v1/kyc/accounts/${details.accountId}`, details);
|
|
137
|
+
return (yield itrm_tools_1.RequestAxiosCall.put(`${this.url}/v1/kyc/accounts/${details.accountId}`, details, signature));
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
buildRequestUrlForAccounts(url, details) {
|
|
141
|
+
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}` : ""}`;
|
|
142
|
+
return `${url}?${suffix.substring(1)}`;
|
|
143
|
+
}
|
|
30
144
|
}
|
|
31
145
|
exports.KycApiManager = KycApiManager;
|
|
32
146
|
//# sourceMappingURL=KycApiManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KycApiManager.js","sourceRoot":"","sources":["../../../src/api/external/KycApiManager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4F;AAG5F,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;AACzB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;
|
|
1
|
+
{"version":3,"file":"KycApiManager.js","sourceRoot":"","sources":["../../../src/api/external/KycApiManager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4F;AAG5F,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;AACzB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AA8DD,MAAa,aAAc,SAAQ,8BAAiB;IAGhD,YAAY,IAAgB,EAAE,GAAW;QACrC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACnB,CAAC;IAEY,iBAAiB,CAAC,MA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,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,gBAAgB,OAAO,CAAC,WAAW,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;QAC/jB,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3C,CAAC;CACJ;AAhHD,sCAgHC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CrudServiceManager, StandardIdRequestDefinition } from "itrm-tools";
|
|
2
|
+
import { AxiosRequestConfig } from "axios";
|
|
3
|
+
export interface ITransaction {
|
|
4
|
+
transactionId?: number;
|
|
5
|
+
typeId?: number;
|
|
6
|
+
statusId?: number;
|
|
7
|
+
date?: number;
|
|
8
|
+
effectiveDate?: number;
|
|
9
|
+
pairId?: number;
|
|
10
|
+
quantity?: number;
|
|
11
|
+
quoteQuantity?: number;
|
|
12
|
+
price?: number;
|
|
13
|
+
side?: string;
|
|
14
|
+
details?: any;
|
|
15
|
+
updatedAt?: string;
|
|
16
|
+
createdAt?: string;
|
|
17
|
+
config?: AxiosRequestConfig;
|
|
18
|
+
}
|
|
19
|
+
export interface ITransactionSearchDetails {
|
|
20
|
+
transactionId?: number;
|
|
21
|
+
typeId?: number;
|
|
22
|
+
statusId?: number;
|
|
23
|
+
date?: number;
|
|
24
|
+
effectiveDate?: number;
|
|
25
|
+
pairId?: number;
|
|
26
|
+
quantity?: number;
|
|
27
|
+
quoteQuantity?: number;
|
|
28
|
+
price?: number;
|
|
29
|
+
side?: string;
|
|
30
|
+
details?: any;
|
|
31
|
+
updatedAt?: string;
|
|
32
|
+
createdAt?: string;
|
|
33
|
+
values?: ITransaction[];
|
|
34
|
+
limit?: number;
|
|
35
|
+
offset?: number;
|
|
36
|
+
config?: AxiosRequestConfig;
|
|
37
|
+
}
|
|
38
|
+
export declare class TransactionManager extends CrudServiceManager<ITransactionSearchDetails, ITransaction> {
|
|
39
|
+
private url;
|
|
40
|
+
constructor(url: string);
|
|
41
|
+
find(details: ITransactionSearchDetails): Promise<ITransaction | undefined>;
|
|
42
|
+
count(details: ITransactionSearchDetails): Promise<{
|
|
43
|
+
result: number;
|
|
44
|
+
}>;
|
|
45
|
+
findAll(details: ITransactionSearchDetails): Promise<ITransaction[] | undefined>;
|
|
46
|
+
private buildRequestUrl;
|
|
47
|
+
findById(id: StandardIdRequestDefinition): Promise<ITransaction | undefined>;
|
|
48
|
+
create(details: ITransactionSearchDetails): Promise<ITransaction | undefined>;
|
|
49
|
+
createMany(details: ITransactionSearchDetails): Promise<ITransaction[] | undefined>;
|
|
50
|
+
modify(transaction: ITransaction): Promise<any>;
|
|
51
|
+
destroy(transaction: ITransaction): Promise<any>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TransactionManager = void 0;
|
|
13
|
+
const itrm_tools_1 = require("itrm-tools");
|
|
14
|
+
class TransactionManager extends itrm_tools_1.CrudServiceManager {
|
|
15
|
+
constructor(url) {
|
|
16
|
+
super();
|
|
17
|
+
this.url = url;
|
|
18
|
+
}
|
|
19
|
+
find(details) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return this.sendFinding(`${this.url}/transactions?date=${details.date}&effectiveDate=${details.effectiveDate}`, details.config);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
count(details) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
var _a;
|
|
27
|
+
let url = this.buildRequestUrl(`${this.url}/transactions`, details);
|
|
28
|
+
return (_a = (yield this.sendCounting(url, details.config))) !== null && _a !== void 0 ? _a : { result: 0 };
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
findAll(details) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
var _a;
|
|
34
|
+
let strategies = [];
|
|
35
|
+
let url = this.buildRequestUrl(`${this.url}/transactions`, details);
|
|
36
|
+
if (details.limit) {
|
|
37
|
+
strategies = (_a = (yield this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config))) !== null && _a !== void 0 ? _a : [];
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
let limit = 5000, offset = 0, isEmpty = false;
|
|
41
|
+
do {
|
|
42
|
+
let values = yield this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
43
|
+
if (values)
|
|
44
|
+
strategies = strategies.concat(values);
|
|
45
|
+
isEmpty = values == undefined || values.length == 0;
|
|
46
|
+
offset += limit;
|
|
47
|
+
} while (!isEmpty);
|
|
48
|
+
}
|
|
49
|
+
return strategies;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
buildRequestUrl(url, details) {
|
|
53
|
+
let suffix = `${details.typeId ? `&typeId=${details.typeId}` : ""}${details.statusId ? `&statusId=${details.statusId}` : ""}${details.date ? `&date=${details.date}` : ""}`;
|
|
54
|
+
return `${url}?${suffix.substring(1)}`;
|
|
55
|
+
}
|
|
56
|
+
findById(id) {
|
|
57
|
+
return this.sendFinding(`${this.url}/transactions?id=${id.id}`, id.config);
|
|
58
|
+
}
|
|
59
|
+
create(details) {
|
|
60
|
+
return this.sendCreation(`${this.url}/transactions`, {
|
|
61
|
+
typeId: details.typeId,
|
|
62
|
+
statusId: details.statusId,
|
|
63
|
+
date: details.date,
|
|
64
|
+
effectiveDate: details.effectiveDate,
|
|
65
|
+
pairId: details.pairId,
|
|
66
|
+
quantity: details.quantity,
|
|
67
|
+
quoteQuantity: details.quoteQuantity,
|
|
68
|
+
price: details.price,
|
|
69
|
+
side: details.side,
|
|
70
|
+
details: details.details
|
|
71
|
+
}, details.config);
|
|
72
|
+
}
|
|
73
|
+
createMany(details) {
|
|
74
|
+
var _a;
|
|
75
|
+
return this.sendCreationMany(`${this.url}/transactions`, (_a = details.values) !== null && _a !== void 0 ? _a : [], details.config);
|
|
76
|
+
}
|
|
77
|
+
modify(transaction) {
|
|
78
|
+
return this.sendModification(`${this.url}/transactions/${transaction.transactionId}`, {
|
|
79
|
+
typeId: transaction.typeId,
|
|
80
|
+
statusId: transaction.statusId,
|
|
81
|
+
date: transaction.date,
|
|
82
|
+
effectiveDate: transaction.effectiveDate,
|
|
83
|
+
pairId: transaction.pairId,
|
|
84
|
+
quantity: transaction.quantity,
|
|
85
|
+
quoteQuantity: transaction.quoteQuantity,
|
|
86
|
+
price: transaction.price,
|
|
87
|
+
side: transaction.side,
|
|
88
|
+
details: transaction.details
|
|
89
|
+
}, transaction.config);
|
|
90
|
+
}
|
|
91
|
+
destroy(transaction) {
|
|
92
|
+
return this.sendDestruction(`${this.url}/transactions/${transaction.transactionId}`, transaction.config);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.TransactionManager = TransactionManager;
|
|
96
|
+
//# sourceMappingURL=TransactionsManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionsManager.js","sourceRoot":"","sources":["../../src/crud/TransactionsManager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA6E;AAwC7E,MAAa,kBAAmB,SAAQ,+BAA2D;IAG/F,YAAY,GAAW;QACnB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACnB,CAAC;IAEY,IAAI,CAAC,OAAkC;;YAChD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,sBAAsB,OAAO,CAAC,IAAI,kBAAkB,OAAO,CAAC,aAAa,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QACpI,CAAC;KAAA;IAEY,KAAK,CAAC,OAAkC;;;YACjD,IAAI,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,eAAe,EAAE,OAAO,CAAC,CAAC;YACpE,OAAO,MAAA,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,mCAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAC3E,CAAC;KAAA;IAEY,OAAO,CAAC,OAAkC;;;YACnD,IAAI,UAAU,GAAmB,EAAE,CAAC;YACpC,IAAI,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,eAAe,EAAE,OAAO,CAAC,CAAC;YACpE,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,UAAU,GAAG,MAAA,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC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B,aAAa,EAAE,WAAW,CAAC,aAAa;YACxC,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,QAAQ,EAAE,WAAW,CAAC,QAAQ;YAC9B,aAAa,EAAE,WAAW,CAAC,aAAa;YACxC,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,OAAO,EAAE,WAAW,CAAC,OAAO;SAC/B,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAEM,OAAO,CAAC,WAAyB;QACpC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,iBAAiB,WAAW,CAAC,aAAa,EAAE,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7G,CAAC;CACJ;AAjFD,gDAiFC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export { StrategyOrderManager as StrategyOrderManager, IStrategyOrder as IStrate
|
|
|
32
32
|
export { TypeManager as TypeManager, IType as IType, ITypeSearchDetails as ITypeSearchDetails } from "./crud/TypeManager";
|
|
33
33
|
export { UserCredentialsManager as UserCredentialsManager, IUserCredentials as IUserCredentials, IUserCredentialsSearchDetails as IUserCredentialsSearchDetails } from "./crud/UserCredentialsManager";
|
|
34
34
|
export { UserManager as UserManager, IUser as IUser, IUserSearchDetails as IUserSearchDetails } from "./crud/UserManager";
|
|
35
|
+
export { TransactionManager as TransactionManager, ITransaction as ITransaction, ITransactionSearchDetails as ITransactionSearchDetails } from "./crud/TransactionsManager";
|
|
35
36
|
export { applyLoginMocks as applyLoginMocks } from "./crud/test/LoginServiceMock";
|
|
36
37
|
export { applyPlatformMocks as applyPlatformMocks } from "./crud/test/PlatformMocks";
|
|
37
38
|
export { applyRoleMocks as applyRoleMocks } from "./crud/test/RoleMocks";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applyKeyMocks = exports.applyTypeMocks = exports.applyStatusMocks = exports.applyRoleMocks = exports.applyPlatformMocks = exports.applyLoginMocks = exports.UserManager = exports.UserCredentialsManager = exports.TypeManager = exports.StrategyOrderManager = exports.StrategyManager = exports.StatusManager = exports.SourceManager = exports.RoleManager = exports.RatesManager = exports.PnlManager = exports.PlatformManager = exports.PairsManager = exports.OperationsManager = exports.NavManager = exports.ModificationManager = exports.KeyManager = exports.IntermediaryManager = exports.ExpenseManager = exports.ContributorManager = exports.ContributorActionManager = exports.ComponentManager = exports.AvailablePlatformManager = exports.AssetsManager = exports.ActivityHistoryManager = exports.AccountManager = exports.findBitsoBook = exports.findBalances = exports.BitsoApiConnection = exports.KycStatus = exports.KycApiManager = exports.ServiceSessionChecker = exports.RoleServicePermissionsChecker = exports.ExpressLogableConfig = void 0;
|
|
3
|
+
exports.applyKeyMocks = exports.applyTypeMocks = exports.applyStatusMocks = exports.applyRoleMocks = exports.applyPlatformMocks = exports.applyLoginMocks = exports.TransactionManager = exports.UserManager = exports.UserCredentialsManager = exports.TypeManager = exports.StrategyOrderManager = exports.StrategyManager = exports.StatusManager = exports.SourceManager = exports.RoleManager = exports.RatesManager = exports.PnlManager = exports.PlatformManager = exports.PairsManager = exports.OperationsManager = exports.NavManager = exports.ModificationManager = exports.KeyManager = exports.IntermediaryManager = exports.ExpenseManager = exports.ContributorManager = exports.ContributorActionManager = exports.ComponentManager = exports.AvailablePlatformManager = exports.AssetsManager = exports.ActivityHistoryManager = exports.AccountManager = exports.findBitsoBook = exports.findBalances = exports.BitsoApiConnection = exports.KycStatus = exports.KycApiManager = exports.ServiceSessionChecker = exports.RoleServicePermissionsChecker = exports.ExpressLogableConfig = void 0;
|
|
4
4
|
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");
|
|
@@ -66,6 +66,8 @@ var UserCredentialsManager_1 = require("./crud/UserCredentialsManager");
|
|
|
66
66
|
Object.defineProperty(exports, "UserCredentialsManager", { enumerable: true, get: function () { return UserCredentialsManager_1.UserCredentialsManager; } });
|
|
67
67
|
var UserManager_1 = require("./crud/UserManager");
|
|
68
68
|
Object.defineProperty(exports, "UserManager", { enumerable: true, get: function () { return UserManager_1.UserManager; } });
|
|
69
|
+
var TransactionsManager_1 = require("./crud/TransactionsManager");
|
|
70
|
+
Object.defineProperty(exports, "TransactionManager", { enumerable: true, get: function () { return TransactionsManager_1.TransactionManager; } });
|
|
69
71
|
var LoginServiceMock_1 = require("./crud/test/LoginServiceMock");
|
|
70
72
|
Object.defineProperty(exports, "applyLoginMocks", { enumerable: true, get: function () { return LoginServiceMock_1.applyLoginMocks; } });
|
|
71
73
|
var PlatformMocks_1 = require("./crud/test/PlatformMocks");
|
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;AACvE,8EAAkM;AAA7F,8HAAA,qBAAqB,OAAyB;AAEnJ,8DAAsG;AAA7F,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,wEAA2L;AAAlL,gIAAA,sBAAsB,OAA0B;AACzD,sDAA4H;AAAnH,8GAAA,aAAa,OAAiB;AACvC,4EAAqN;AAA5M,oIAAA,wBAAwB,OAA4B;AAC7D,4DAA2P;AA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3C,2DAAqF;AAA5E,mHAAA,kBAAkB,OAAsB;AACjD,mDAAyE;AAAhE,2GAAA,cAAc,OAAkB;AACzC,uDAA+E;AAAtE,+GAAA,gBAAgB,OAAoB;AAC7C,mDAAyE;AAAhE,2GAAA,cAAc,OAAkB;AACzC,iDAAsE;AAA7D,yGAAA,aAAa,OAAiB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cetus-tools",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "Librería para elementos comunes de CETUS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/express": "^5.0.3",
|
|
36
36
|
"@types/jest": "^30.0.0",
|
|
37
37
|
"@types/morgan": "^1.9.9",
|
|
38
|
-
"@types/node": "^24.
|
|
38
|
+
"@types/node": "^24.3.0",
|
|
39
39
|
"jest": "^30.0.5",
|
|
40
40
|
"rimraf": "^6.0.1",
|
|
41
41
|
"ts-jest": "^29.4.1",
|