itrm-tools 1.3.23 → 1.3.25
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/ExternalApiConnection.d.ts +6 -2
- package/dist/api/external/ExternalApiConnection.js +30 -4
- package/dist/api/external/ExternalApiConnection.js.map +1 -1
- package/dist/api/request/crud/common/ApplicationManager.d.ts +0 -1
- package/dist/api/request/crud/common/ApplicationManager.js.map +1 -1
- package/dist/api/request/crud/common/ComponentManager.d.ts +1 -2
- package/dist/api/request/crud/common/ComponentManager.js.map +1 -1
- package/dist/api/request/crud/common/IdentificationTypeManager.d.ts +37 -0
- package/dist/api/request/crud/common/IdentificationTypeManager.js +57 -0
- package/dist/api/request/crud/common/IdentificationTypeManager.js.map +1 -0
- package/dist/api/request/crud/common/KindOfPersonManager.d.ts +37 -0
- package/dist/api/request/crud/common/KindOfPersonManager.js +57 -0
- package/dist/api/request/crud/common/KindOfPersonManager.js.map +1 -0
- package/dist/api/request/crud/common/PlatformManager.d.ts +0 -1
- package/dist/api/request/crud/common/PlatformManager.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/api/external/cetus/CetusStrategyApiManager.d.ts +0 -29
- package/dist/api/external/cetus/CetusStrategyApiManager.js +0 -32
- package/dist/api/external/cetus/CetusStrategyApiManager.js.map +0 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { StandardKeyGroup } from "../../cryptography/generate/StandardApiKeyGenerator";
|
|
2
2
|
import { ApiSignValues } from "../../cryptography/sign/ApiKeySigner";
|
|
3
3
|
import { ApiResponse } from "../../types/api";
|
|
4
|
+
import { RequestMethod } from "../APIRequest";
|
|
4
5
|
export declare class ExternalApiConnection {
|
|
5
6
|
private signer;
|
|
6
|
-
private
|
|
7
|
+
private application;
|
|
8
|
+
private apiUrl;
|
|
7
9
|
private cipher;
|
|
8
10
|
private keys;
|
|
9
|
-
constructor(
|
|
11
|
+
constructor(application: string, apiUrl: string, keys: StandardKeyGroup);
|
|
10
12
|
sign(input: ApiSignValues): {
|
|
11
13
|
headers: {
|
|
12
14
|
Authorization: string;
|
|
@@ -14,4 +16,6 @@ export declare class ExternalApiConnection {
|
|
|
14
16
|
};
|
|
15
17
|
encryptBody(body: any): string;
|
|
16
18
|
decryptResponse(response: ApiResponse<string>): any;
|
|
19
|
+
request<T>(method: RequestMethod, path: string, body?: any): Promise<T>;
|
|
20
|
+
private executeRequest;
|
|
17
21
|
}
|
|
@@ -3,22 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExternalApiConnection = void 0;
|
|
4
4
|
const AesCipheringAlgorithm_1 = require("../../cryptography/algorithm/AesCipheringAlgorithm");
|
|
5
5
|
const ApiKeySigner_1 = require("../../cryptography/sign/ApiKeySigner");
|
|
6
|
+
const APIRequest_1 = require("../APIRequest");
|
|
7
|
+
const RequestAxiosCall_1 = require("../request/RequestAxiosCall");
|
|
6
8
|
class ExternalApiConnection {
|
|
7
9
|
signer;
|
|
8
|
-
|
|
10
|
+
application;
|
|
11
|
+
apiUrl;
|
|
9
12
|
cipher;
|
|
10
13
|
keys;
|
|
11
|
-
constructor(
|
|
14
|
+
constructor(application, apiUrl, keys) {
|
|
15
|
+
this.application = application.toLowerCase();
|
|
12
16
|
this.cipher = new AesCipheringAlgorithm_1.AesCipheringAlgorithm();
|
|
13
17
|
this.signer = new ApiKeySigner_1.ApiKeySigner();
|
|
14
|
-
this.
|
|
18
|
+
this.apiUrl = apiUrl;
|
|
15
19
|
this.keys = keys;
|
|
16
20
|
}
|
|
17
21
|
sign(input) {
|
|
18
22
|
let signature = this.signer.sign(input, this.keys);
|
|
19
23
|
return {
|
|
20
24
|
headers: {
|
|
21
|
-
Authorization: `${this.
|
|
25
|
+
Authorization: `${this.application} ${signature}`
|
|
22
26
|
}
|
|
23
27
|
};
|
|
24
28
|
}
|
|
@@ -28,6 +32,28 @@ class ExternalApiConnection {
|
|
|
28
32
|
decryptResponse(response) {
|
|
29
33
|
return JSON.parse(this.cipher.decrypt(response.payload, this.keys.secretKey));
|
|
30
34
|
}
|
|
35
|
+
async request(method, path, body) {
|
|
36
|
+
if (body) {
|
|
37
|
+
let encryptedtBody = { payload: this.encryptBody(body) };
|
|
38
|
+
let headers = this.sign({ method: method, path: path, body: encryptedtBody });
|
|
39
|
+
return this.executeRequest(method, path, headers, encryptedtBody);
|
|
40
|
+
}
|
|
41
|
+
return this.executeRequest(method, path, this.sign({ method: method, path: path }));
|
|
42
|
+
}
|
|
43
|
+
async executeRequest(method, path, headers, encryptedtBody) {
|
|
44
|
+
switch (method) {
|
|
45
|
+
case APIRequest_1.RequestMethod.GET:
|
|
46
|
+
return (this.decryptResponse(await RequestAxiosCall_1.RequestAxiosCall.get(`${this.apiUrl}${path}`, headers)));
|
|
47
|
+
case APIRequest_1.RequestMethod.POST:
|
|
48
|
+
return (this.decryptResponse(await RequestAxiosCall_1.RequestAxiosCall.post(`${this.apiUrl}${path}`, encryptedtBody, headers)));
|
|
49
|
+
case APIRequest_1.RequestMethod.PUT:
|
|
50
|
+
return (this.decryptResponse(await RequestAxiosCall_1.RequestAxiosCall.put(`${this.apiUrl}${path}`, encryptedtBody, headers)));
|
|
51
|
+
case APIRequest_1.RequestMethod.DELETE:
|
|
52
|
+
return (this.decryptResponse(await RequestAxiosCall_1.RequestAxiosCall.delete(`${this.apiUrl}${path}`, headers)));
|
|
53
|
+
default:
|
|
54
|
+
throw new Error(`Unsupported method: ${method}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
31
57
|
}
|
|
32
58
|
exports.ExternalApiConnection = ExternalApiConnection;
|
|
33
59
|
//# sourceMappingURL=ExternalApiConnection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalApiConnection.js","sourceRoot":"","sources":["../../../src/api/external/ExternalApiConnection.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version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OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,mCAAgB,CAAC,MAAM,CAAsB,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,CAAM,CAAC;YAC7H;gBACI,MAAM,IAAI,KAAK,CAAC,uBAAuB,MAAM,EAAE,CAAC,CAAC;QACzD,CAAC;IACL,CAAC;CACJ;AAvDD,sDAuDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/ApplicationManager.ts"],"names":[],"mappings":";;;AACA,8DAAwF;
|
|
1
|
+
{"version":3,"file":"ApplicationManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/ApplicationManager.ts"],"names":[],"mappings":";;;AACA,8DAAwF;AA0BxF,MAAa,kBAAmB,SAAQ,uCAA2D;IAChF,GAAG,CAAS;IAE7B,YAAY,GAAW;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,IAAI,CAAC,OAAkC;QAC5C,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,sBAAsB,OAAO,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3F,CAAC;IAEM,QAAQ,CAAC,OAAoC;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,oBAAoB,OAAO,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACvF,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,OAAkC;QACnD,IAAI,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,eAAe,EAAE,OAAO,CAAC,CAAC;QACpE,OAAO,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,CAA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, Record<string, boolean>>>;
|
|
22
22
|
}[];
|
|
23
|
-
config?: AxiosRequestConfig;
|
|
24
23
|
}
|
|
25
24
|
export interface IComponentSearchDetails {
|
|
26
25
|
id?: string | number;
|
|
@@ -35,7 +34,7 @@ export interface IComponentSearchDetails {
|
|
|
35
34
|
offset?: number;
|
|
36
35
|
config?: AxiosRequestConfig;
|
|
37
36
|
}
|
|
38
|
-
export declare class ComponentManager extends CrudServiceManager<
|
|
37
|
+
export declare class ComponentManager extends CrudServiceManager<IComponentSearchDetails, IComponent> {
|
|
39
38
|
private readonly url;
|
|
40
39
|
constructor(url: string);
|
|
41
40
|
find(details: IComponentSearchDetails): Promise<IComponent | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/ComponentManager.ts"],"names":[],"mappings":";;;AACA,8DAAwF;
|
|
1
|
+
{"version":3,"file":"ComponentManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/ComponentManager.ts"],"names":[],"mappings":";;;AACA,8DAAwF;AAoCxF,MAAa,gBAAiB,SAAQ,uCAAuD;IAC1E,GAAG,CAAS;IAE7B,YAAY,GAAW;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,IAAI,CAAC,OAAgC;QAC1C,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,oBAAoB,OAAO,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACzF,CAAC;IAEM,QAAQ,CAAC,OAAoC;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,kBAAkB,OAAO,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACrF,CAAC;IAEM,gBAAgB,CAAC,OAAgC;QACtD,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG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AI,CAAC,YAAY,CACtB,GAAG,IAAI,CAAC,GAAG,aAAa,EACxB,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EACtH,OAAO,CAAC,MAAM,CACf,CAAC;IACJ,CAAC;IAEM,UAAU,CAAC,OAAgC;QAChD,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,GAAG,aAAa,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/F,CAAC;IAEM,MAAM,CAAC,SAAqB;QACjC,OAAO,IAAI,CAAC,gBAAgB,CAC1B,GAAG,IAAI,CAAC,GAAG,eAAe,SAAS,CAAC,WAAW,EAAE,EACjD,EAAE,aAAa,EAAE,SAAS,CAAC,aAAa,EAAE,UAAU,EAAE,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,EAC9H,SAAS,CAAC,MAAM,CACjB,CAAC;IACJ,CAAC;IAEM,OAAO,CAAC,SAAqB;QAClC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,eAAe,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACnG,CAAC;CACF;AA3ED,4CA2EC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
import { CrudServiceManager, StandardIdRequestDefinition } from "../CrudServiceManager";
|
|
3
|
+
export interface IIdentificationType {
|
|
4
|
+
identificationTypeId?: number;
|
|
5
|
+
name?: string;
|
|
6
|
+
details?: IIdentificationTypeDetails;
|
|
7
|
+
updatedAt?: string;
|
|
8
|
+
createdAt?: string;
|
|
9
|
+
config?: AxiosRequestConfig;
|
|
10
|
+
}
|
|
11
|
+
export interface IIdentificationTypeDetails {
|
|
12
|
+
lang: Record<string, string>;
|
|
13
|
+
symbol: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IIdentificationTypeSearchDetails {
|
|
17
|
+
id?: string | number;
|
|
18
|
+
name?: string;
|
|
19
|
+
details?: IIdentificationTypeDetails;
|
|
20
|
+
values?: IIdentificationType[];
|
|
21
|
+
limit?: number;
|
|
22
|
+
offset?: number;
|
|
23
|
+
config?: AxiosRequestConfig;
|
|
24
|
+
}
|
|
25
|
+
export declare class IdentificationTypeManager extends CrudServiceManager<IIdentificationTypeSearchDetails, IIdentificationType> {
|
|
26
|
+
private readonly url;
|
|
27
|
+
constructor(url: string);
|
|
28
|
+
find(details: IIdentificationTypeSearchDetails): Promise<IIdentificationType | undefined>;
|
|
29
|
+
findById(details: StandardIdRequestDefinition): Promise<IIdentificationType | undefined>;
|
|
30
|
+
count(details: IIdentificationTypeSearchDetails): Promise<number>;
|
|
31
|
+
findAll(details: IIdentificationTypeSearchDetails): Promise<IIdentificationType[] | undefined>;
|
|
32
|
+
private buildRequestUrl;
|
|
33
|
+
create(details: IIdentificationTypeSearchDetails): Promise<IIdentificationType | undefined>;
|
|
34
|
+
createMany(details: IIdentificationTypeSearchDetails): Promise<IIdentificationType[] | undefined>;
|
|
35
|
+
modify(identificationType: IIdentificationType): Promise<IIdentificationType | undefined>;
|
|
36
|
+
destroy(identificationType: IIdentificationType): Promise<void | number>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IdentificationTypeManager = void 0;
|
|
4
|
+
const CrudServiceManager_1 = require("../CrudServiceManager");
|
|
5
|
+
class IdentificationTypeManager extends CrudServiceManager_1.CrudServiceManager {
|
|
6
|
+
url;
|
|
7
|
+
constructor(url) {
|
|
8
|
+
super();
|
|
9
|
+
this.url = url;
|
|
10
|
+
}
|
|
11
|
+
find(details) {
|
|
12
|
+
return this.sendFinding(`${this.url}/identificationTypes?name=${details.name}`, details.config);
|
|
13
|
+
}
|
|
14
|
+
findById(details) {
|
|
15
|
+
return this.sendFinding(`${this.url}/identificationTypes?id=${details.id}`, details.config);
|
|
16
|
+
}
|
|
17
|
+
async count(details) {
|
|
18
|
+
let url = this.buildRequestUrl(`${this.url}/identificationTypes`, details);
|
|
19
|
+
return (await this.sendCounting(url, details.config)) ?? 0;
|
|
20
|
+
}
|
|
21
|
+
async findAll(details) {
|
|
22
|
+
let identificationTypes = [];
|
|
23
|
+
let url = this.buildRequestUrl(`${this.url}/identificationTypes`, details);
|
|
24
|
+
if (details.limit) {
|
|
25
|
+
identificationTypes = (await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config)) ?? [];
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
let limit = 5000, offset = 0, isEmpty = false;
|
|
29
|
+
do {
|
|
30
|
+
let values = await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
31
|
+
if (values)
|
|
32
|
+
identificationTypes = identificationTypes.concat(values);
|
|
33
|
+
isEmpty = values == undefined || values.length == 0;
|
|
34
|
+
offset += limit;
|
|
35
|
+
} while (!isEmpty);
|
|
36
|
+
}
|
|
37
|
+
return identificationTypes;
|
|
38
|
+
}
|
|
39
|
+
buildRequestUrl(url, details) {
|
|
40
|
+
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.name ? `&name=${details.name}` : ""}`;
|
|
41
|
+
return `${url}?${suffix.substring(1)}`;
|
|
42
|
+
}
|
|
43
|
+
create(details) {
|
|
44
|
+
return this.sendCreation(`${this.url}/identificationTypes`, { name: details.name, details: details.details }, details.config);
|
|
45
|
+
}
|
|
46
|
+
createMany(details) {
|
|
47
|
+
return this.sendCreationMany(`${this.url}/identificationTypes`, details.values ?? [], details.config);
|
|
48
|
+
}
|
|
49
|
+
modify(identificationType) {
|
|
50
|
+
return this.sendModification(`${this.url}/identificationTypes/${identificationType.identificationTypeId}`, { name: identificationType.name, details: identificationType.details }, identificationType.config);
|
|
51
|
+
}
|
|
52
|
+
destroy(identificationType) {
|
|
53
|
+
return this.sendDestruction(`${this.url}/identificationTypes/${identificationType.identificationTypeId}`, identificationType.config);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.IdentificationTypeManager = IdentificationTypeManager;
|
|
57
|
+
//# sourceMappingURL=IdentificationTypeManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentificationTypeManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/IdentificationTypeManager.ts"],"names":[],"mappings":";;;AACA,8DAAwF;AA4BxF,MAAa,yBAA0B,SAAQ,uCAAyE;IACrG,GAAG,CAAS;IAE7B,YAAY,GAAW;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,IAAI,CAAC,OAAyC;QACnD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,6BAA6B,OAAO,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAClG,CAAC;IAEM,QAAQ,CAAC,OAAoC;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,2BAA2B,OAAO,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9F,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,OAAyC;QAC1D,IAAI,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,sBAAsB,EAAE,OAAO,CAAC,CAAC;QAC3E,OAAO,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,C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 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
import { CrudServiceManager, StandardIdRequestDefinition } from "../CrudServiceManager";
|
|
3
|
+
export interface IKindOfPerson {
|
|
4
|
+
kindOfPersonId?: number;
|
|
5
|
+
name?: string;
|
|
6
|
+
details?: IKindOfPersonDetails;
|
|
7
|
+
updatedAt?: string;
|
|
8
|
+
createdAt?: string;
|
|
9
|
+
config?: AxiosRequestConfig;
|
|
10
|
+
}
|
|
11
|
+
export interface IKindOfPersonDetails {
|
|
12
|
+
lang: Record<string, string>;
|
|
13
|
+
symbol?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IKindOfPersonSearchDetails {
|
|
17
|
+
id?: string | number;
|
|
18
|
+
name?: string;
|
|
19
|
+
details?: IKindOfPersonDetails;
|
|
20
|
+
values?: IKindOfPerson[];
|
|
21
|
+
limit?: number;
|
|
22
|
+
offset?: number;
|
|
23
|
+
config?: AxiosRequestConfig;
|
|
24
|
+
}
|
|
25
|
+
export declare class KindOfPersonManager extends CrudServiceManager<IKindOfPersonSearchDetails, IKindOfPerson> {
|
|
26
|
+
private readonly url;
|
|
27
|
+
constructor(url: string);
|
|
28
|
+
find(details: IKindOfPersonSearchDetails): Promise<IKindOfPerson | undefined>;
|
|
29
|
+
findById(details: StandardIdRequestDefinition): Promise<IKindOfPerson | undefined>;
|
|
30
|
+
count(details: IKindOfPersonSearchDetails): Promise<number>;
|
|
31
|
+
findAll(details: IKindOfPersonSearchDetails): Promise<IKindOfPerson[] | undefined>;
|
|
32
|
+
private buildRequestUrl;
|
|
33
|
+
create(details: IKindOfPersonSearchDetails): Promise<IKindOfPerson | undefined>;
|
|
34
|
+
createMany(details: IKindOfPersonSearchDetails): Promise<IKindOfPerson[] | undefined>;
|
|
35
|
+
modify(kindOfPerson: IKindOfPerson): Promise<IKindOfPerson | undefined>;
|
|
36
|
+
destroy(kindOfPerson: IKindOfPerson): Promise<void | number>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KindOfPersonManager = void 0;
|
|
4
|
+
const CrudServiceManager_1 = require("../CrudServiceManager");
|
|
5
|
+
class KindOfPersonManager extends CrudServiceManager_1.CrudServiceManager {
|
|
6
|
+
url;
|
|
7
|
+
constructor(url) {
|
|
8
|
+
super();
|
|
9
|
+
this.url = url;
|
|
10
|
+
}
|
|
11
|
+
find(details) {
|
|
12
|
+
return this.sendFinding(`${this.url}/kindOfPersons?name=${details.name}`, details.config);
|
|
13
|
+
}
|
|
14
|
+
findById(details) {
|
|
15
|
+
return this.sendFinding(`${this.url}/kindOfPersons?id=${details.id}`, details.config);
|
|
16
|
+
}
|
|
17
|
+
async count(details) {
|
|
18
|
+
let url = this.buildRequestUrl(`${this.url}/kindOfPersons`, details);
|
|
19
|
+
return (await this.sendCounting(url, details.config)) ?? 0;
|
|
20
|
+
}
|
|
21
|
+
async findAll(details) {
|
|
22
|
+
let kindOfPersons = [];
|
|
23
|
+
let url = this.buildRequestUrl(`${this.url}/kindOfPersons`, details);
|
|
24
|
+
if (details.limit) {
|
|
25
|
+
kindOfPersons = (await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config)) ?? [];
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
let limit = 5000, offset = 0, isEmpty = false;
|
|
29
|
+
do {
|
|
30
|
+
let values = await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
31
|
+
if (values)
|
|
32
|
+
kindOfPersons = kindOfPersons.concat(values);
|
|
33
|
+
isEmpty = values == undefined || values.length == 0;
|
|
34
|
+
offset += limit;
|
|
35
|
+
} while (!isEmpty);
|
|
36
|
+
}
|
|
37
|
+
return kindOfPersons;
|
|
38
|
+
}
|
|
39
|
+
buildRequestUrl(url, details) {
|
|
40
|
+
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.name ? `&name=${details.name}` : ""}`;
|
|
41
|
+
return `${url}?${suffix.substring(1)}`;
|
|
42
|
+
}
|
|
43
|
+
create(details) {
|
|
44
|
+
return this.sendCreation(`${this.url}/kindOfPersons`, { name: details.name, details: details.details }, details.config);
|
|
45
|
+
}
|
|
46
|
+
createMany(details) {
|
|
47
|
+
return this.sendCreationMany(`${this.url}/kindOfPersons`, details.values ?? [], details.config);
|
|
48
|
+
}
|
|
49
|
+
modify(kindOfPerson) {
|
|
50
|
+
return this.sendModification(`${this.url}/kindOfPersons/${kindOfPerson.kindOfPersonId}`, { name: kindOfPerson.name, details: kindOfPerson.details }, kindOfPerson.config);
|
|
51
|
+
}
|
|
52
|
+
destroy(kindOfPerson) {
|
|
53
|
+
return this.sendDestruction(`${this.url}/kindOfPersons/${kindOfPerson.kindOfPersonId}`, kindOfPerson.config);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.KindOfPersonManager = KindOfPersonManager;
|
|
57
|
+
//# sourceMappingURL=KindOfPersonManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KindOfPersonManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/KindOfPersonManager.ts"],"names":[],"mappings":";;;AACA,8DAAwF;AA4BxF,MAAa,mBAAoB,SAAQ,uCAA6D;IACnF,GAAG,CAAS;IAE7B,YAAY,GAAW;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,IAAI,CAAC,OAAmC;QAC7C,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,uBAAuB,OAAO,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5F,CAAC;IAEM,QAAQ,CAAC,OAAoC;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,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AY,CAAC,OAAO,EAAE,EAC1D,YAAY,CAAC,MAAM,CACpB,CAAC;IACJ,CAAC;IAEM,OAAO,CAAC,YAA2B;QACxC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,kBAAkB,YAAY,CAAC,cAAc,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC/G,CAAC;CACF;AAnED,kDAmEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/PlatformManager.ts"],"names":[],"mappings":";;;AACA,8DAAwF;
|
|
1
|
+
{"version":3,"file":"PlatformManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/PlatformManager.ts"],"names":[],"mappings":";;;AACA,8DAAwF;AAiCxF,MAAa,eAAgB,SAAQ,uCAAqD;IACvE,GAAG,CAAS;IAE7B,YAAY,GAAW;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,IAAI,CAAC,OAA+B;QACzC,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,mBAAmB,OAAO,CAAC,IAAI,kBAAkB,OAAO,CAAC,aAAa,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/H,CAAC;IAEM,QAAQ,CAAC,OAAoC;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,iBAAiB,OAAO,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACpF,CAAC;IAEM,mBAAmB,CAAC,OAA+B;QACxD,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,GAAG,4BAA4B,OAAO,CAAC,aAAa,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7G,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,OAA+B;QAChD,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,UAAU,EAAE,EAC9C,EAAE,aAAa,EAAE,QAAQ,CAAC,aAAa,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,EACzF,QAAQ,CAAC,MAAM,CAChB,CAAC;IACJ,CAAC;IAEM,OAAO,CAAC,QAAmB;QAChC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,cAAc,QAAQ,CAAC,UAAU,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/F,CAAC;CACF;AAvED,0CAuEC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export { ExpressCookieParserConfiguration as ExpressCookieParserConfiguration }
|
|
|
12
12
|
export { ExpressStandardConfiguration as ExpressStandardConfiguration } from './api/express/ExpressStandardConfiguration';
|
|
13
13
|
export { ExpressFileUploadingConfiguration as ExpressFileUploadingConfiguration } from './api/express/ExpressFileUploadingConfiguration';
|
|
14
14
|
export { ExternalApiConnection as ExternalApiConnection } from './api/external/ExternalApiConnection';
|
|
15
|
-
export { CetusStrategyApiManager as CetusStrategyApiManager, CetusPair as CetusPair, CetusRate as CetusRate, CetusStrategy as CetusStrategy } from './api/external/cetus/CetusStrategyApiManager';
|
|
16
15
|
export { APIRequest as APIRequest, RequestMethod as RequestMethod, RequestContext as RequestContext, GroupedParameters as GroupedParameters, APIRequestConfig as APIRequestConfig, RequestParameterType as RequestParameterType } from './api/APIRequest';
|
|
17
16
|
export { APIRequestBuilder as APIRequestBuilder, DocDetails as DocDetails, ISamples as ISamples } from './api/APIRequestBuilder';
|
|
18
17
|
export { APIRouter as APIRouter } from './api/APIRouter';
|
|
@@ -47,6 +46,8 @@ export { ServiceSessionManager as ServiceSessionManager } from './api/request/cr
|
|
|
47
46
|
export { CountryManager as CountryManager, ICountry as ICountry, ICountryDetails as ICountryDetails, ICountrySearchDetails as ICountrySearchDetails } from './api/request/crud/common/CountryManager';
|
|
48
47
|
export { DepartmentManager as DepartmentManager, IDepartment as IDepartment, IDepartmentDetails as IDepartmentDetails, IDepartmentSearchDetails as IDepartmentSearchDetails } from './api/request/crud/common/DepartmentManager';
|
|
49
48
|
export { CityManager as CityManager, ICity as ICity, ICityDetails as ICityDetails, ICitySearchDetails as ICitySearchDetails } from './api/request/crud/common/CityManager';
|
|
49
|
+
export { IdentificationTypeManager as IdentificationTypeManager, IIdentificationType as IIdentificationType, IIdentificationTypeDetails as IIdentificationTypeDetails, IIdentificationTypeSearchDetails as IIdentificationTypeSearchDetails } from './api/request/crud/common/IdentificationTypeManager';
|
|
50
|
+
export { KindOfPersonManager as KindOfPersonManager, IKindOfPerson as IKindOfPerson, IKindOfPersonDetails as IKindOfPersonDetails, IKindOfPersonSearchDetails as IKindOfPersonSearchDetails } from './api/request/crud/common/KindOfPersonManager';
|
|
50
51
|
export { CrudManager as CrudManager } from './api/request/crud/CrudManager';
|
|
51
52
|
export { CrudServiceManager as CrudServiceManager, StandardIdRequestDefinition as StandardIdRequestDefinition } from './api/request/crud/CrudServiceManager';
|
|
52
53
|
export { CipheringAlgorithm as CipheringAlgorithm } from './cryptography/CipheringAlgorithm';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServiceSessionManager = exports.UserManager = exports.UserCredentialsManager = exports.TypeManager = exports.StatusManager = exports.RoleManager = exports.PlatformManager = exports.KeyManager = exports.ComponentManager = exports.AvailablePlatformManager = exports.ApplicationManager = exports.ActivityHistoryManager = exports.SimpleCheckableAPIRouter = exports.CorsCheckApiRouter = exports.CheckableAPIRouter = exports.CheckableFileUploadingPostRequest = exports.CheckablePutRequest = exports.CheckablePostRequest = exports.CheckableGetRequest = exports.CheckableDeleteRequest = exports.APIChecker = exports.CheckableAPIRequest = exports.DeleteRequest = exports.PutRequest = exports.PostRequest = exports.GetRequest = exports.RequestAxiosCall = exports.SimpleAPIRouter = exports.APIRouter = exports.APIRequestBuilder = exports.RequestParameterType = exports.RequestContext = exports.RequestMethod = exports.APIRequest = exports.
|
|
4
|
-
exports.PAYMENT_TYPES = exports.DOCUMENT_TYPES = exports.BANKS = exports.round = exports.CoingeckoPriceFinder = exports.Coin = exports.LoggerWebSocket = exports.LoggerManager = exports.Logger = exports.SequelizeModelManager = exports.SequelizeConnection = exports.MongooseModelManager = exports.JwtUtils = exports.PasswordUtils = exports.ApiKeySigner = exports.StandardApiKeyGenerator = exports.AesCipheringAlgorithm = exports.CrudServiceManager = exports.
|
|
3
|
+
exports.DepartmentManager = exports.CountryManager = exports.ServiceSessionManager = exports.UserManager = exports.UserCredentialsManager = exports.TypeManager = exports.StatusManager = exports.RoleManager = exports.PlatformManager = exports.KeyManager = exports.ComponentManager = exports.AvailablePlatformManager = exports.ApplicationManager = exports.ActivityHistoryManager = exports.SimpleCheckableAPIRouter = exports.CorsCheckApiRouter = exports.CheckableAPIRouter = exports.CheckableFileUploadingPostRequest = exports.CheckablePutRequest = exports.CheckablePostRequest = exports.CheckableGetRequest = exports.CheckableDeleteRequest = exports.APIChecker = exports.CheckableAPIRequest = exports.DeleteRequest = exports.PutRequest = exports.PostRequest = exports.GetRequest = exports.RequestAxiosCall = exports.SimpleAPIRouter = exports.APIRouter = exports.APIRequestBuilder = exports.RequestParameterType = exports.RequestContext = exports.RequestMethod = exports.APIRequest = exports.ExternalApiConnection = exports.ExpressFileUploadingConfiguration = exports.ExpressStandardConfiguration = exports.ExpressCookieParserConfiguration = exports.ExpressLogableConfig = exports.StandardGetRequestBuilder = exports.HttpsAPIService = exports.ITRMAPIServiceGlobal = exports.APIService = exports.HttpCode = exports.mapErrorCodeToHttpStatus = exports.ResponseUtils = exports.ApiServiceError = exports.AlegraConnectionManager = void 0;
|
|
4
|
+
exports.PAYMENT_TYPES = exports.DOCUMENT_TYPES = exports.BANKS = exports.round = exports.CoingeckoPriceFinder = exports.Coin = exports.LoggerWebSocket = exports.LoggerManager = exports.Logger = exports.SequelizeModelManager = exports.SequelizeConnection = exports.MongooseModelManager = exports.JwtUtils = exports.PasswordUtils = exports.ApiKeySigner = exports.StandardApiKeyGenerator = exports.AesCipheringAlgorithm = exports.CrudServiceManager = exports.KindOfPersonManager = exports.IdentificationTypeManager = exports.CityManager = void 0;
|
|
5
5
|
var AlegraConnectionManager_1 = require("./api/alegra/AlegraConnectionManager");
|
|
6
6
|
Object.defineProperty(exports, "AlegraConnectionManager", { enumerable: true, get: function () { return AlegraConnectionManager_1.AlegraConnectionManager; } });
|
|
7
7
|
var Response_1 = require("./api/utils/Response");
|
|
@@ -26,9 +26,6 @@ var ExpressFileUploadingConfiguration_1 = require("./api/express/ExpressFileUplo
|
|
|
26
26
|
Object.defineProperty(exports, "ExpressFileUploadingConfiguration", { enumerable: true, get: function () { return ExpressFileUploadingConfiguration_1.ExpressFileUploadingConfiguration; } });
|
|
27
27
|
var ExternalApiConnection_1 = require("./api/external/ExternalApiConnection");
|
|
28
28
|
Object.defineProperty(exports, "ExternalApiConnection", { enumerable: true, get: function () { return ExternalApiConnection_1.ExternalApiConnection; } });
|
|
29
|
-
var CetusStrategyApiManager_1 = require("./api/external/cetus/CetusStrategyApiManager");
|
|
30
|
-
Object.defineProperty(exports, "CetusStrategyApiManager", { enumerable: true, get: function () { return CetusStrategyApiManager_1.CetusStrategyApiManager; } });
|
|
31
|
-
Object.defineProperty(exports, "CetusPair", { enumerable: true, get: function () { return CetusStrategyApiManager_1.CetusPair; } });
|
|
32
29
|
var APIRequest_1 = require("./api/APIRequest");
|
|
33
30
|
Object.defineProperty(exports, "APIRequest", { enumerable: true, get: function () { return APIRequest_1.APIRequest; } });
|
|
34
31
|
Object.defineProperty(exports, "RequestMethod", { enumerable: true, get: function () { return APIRequest_1.RequestMethod; } });
|
|
@@ -100,6 +97,10 @@ var DepartmentManager_1 = require("./api/request/crud/common/DepartmentManager")
|
|
|
100
97
|
Object.defineProperty(exports, "DepartmentManager", { enumerable: true, get: function () { return DepartmentManager_1.DepartmentManager; } });
|
|
101
98
|
var CityManager_1 = require("./api/request/crud/common/CityManager");
|
|
102
99
|
Object.defineProperty(exports, "CityManager", { enumerable: true, get: function () { return CityManager_1.CityManager; } });
|
|
100
|
+
var IdentificationTypeManager_1 = require("./api/request/crud/common/IdentificationTypeManager");
|
|
101
|
+
Object.defineProperty(exports, "IdentificationTypeManager", { enumerable: true, get: function () { return IdentificationTypeManager_1.IdentificationTypeManager; } });
|
|
102
|
+
var KindOfPersonManager_1 = require("./api/request/crud/common/KindOfPersonManager");
|
|
103
|
+
Object.defineProperty(exports, "KindOfPersonManager", { enumerable: true, get: function () { return KindOfPersonManager_1.KindOfPersonManager; } });
|
|
103
104
|
var CrudServiceManager_1 = require("./api/request/crud/CrudServiceManager");
|
|
104
105
|
Object.defineProperty(exports, "CrudServiceManager", { enumerable: true, get: function () { return CrudServiceManager_1.CrudServiceManager; } });
|
|
105
106
|
var AesCipheringAlgorithm_1 = require("./cryptography/algorithm/AesCipheringAlgorithm");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAEA,gFAA0G;AAAjG,kIAAA,uBAAuB,OAA2B;AAG3D,iDAAsL;AAA7K,2GAAA,eAAe,OAAmB;AAAE,yGAAA,aAAa,OAAiB;AAAE,oHAAA,wBAAwB,OAA4B;AAAE,oGAAA,QAAQ,OAAY;AAGvJ,+CAA0L;AAA3I,wGAAA,UAAU,OAAc;AAA4C,kHAAA,oBAAoB,OAAwB;AAC/J,yDAA2E;AAAlE,kHAAA,eAAe,OAAmB;AAE3C,qFAAiH;AAAxG,sIAAA,yBAAyB,OAA6B;AAC/D,2EAAkG;AAAzF,4HAAA,oBAAoB,OAAwB;AACrD,mGAAsI;AAA7H,oJAAA,gCAAgC,OAAoC;AAC7E,2FAA0H;AAAjH,4IAAA,4BAA4B,OAAgC;AACrE,qG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J;AAA5G,kIAAA,uBAAuB,OAA2B;AACjG,iEAAgF;AAAvE,4GAAA,YAAY,OAAgB;AACrC,uEAAuF;AAA9E,8GAAA,aAAa,OAAiB;AACvC,wDAAiI;AAAxH,oGAAA,QAAQ,OAAY;AAE7B,iFAAwG;AAA/F,4HAAA,oBAAoB,OAAwB;AACrD,gFAAsG;AAA7F,0HAAA,mBAAmB,OAAuB;AACnD,oFAA4G;AAAnG,8HAAA,qBAAqB,OAAyB;AAEvD,uCAAgD;AAAvC,gGAAA,MAAM,OAAU;AACzB,qDAAqE;AAA5D,8GAAA,aAAa,OAAiB;AACvC,yDAA2E;AAAlE,kHAAA,eAAe,OAAmB;AAE3C,oCAA2C;AAAlC,4FAAA,IAAI,OAAQ;AACrB,8EAAqG;AAA5F,4HAAA,oBAAoB,OAAwB;AAErD,sCAA8C;AAArC,8FAAA,KAAK,OAAS;AAEvB,6CAAoH;AAA3G,iGAAA,KAAK,OAAS;AAAE,0GAAA,cAAc,OAAkB;AAAE,yGAAA,aAAa,OAAiB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itrm-tools",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
"jest": "^30.2.0",
|
|
50
50
|
"jest-puppeteer": "^11.0.0",
|
|
51
51
|
"mongodb-memory-server": "^10.3.0",
|
|
52
|
-
"puppeteer": "^24.
|
|
53
|
-
"redis": "^5.
|
|
54
|
-
"rimraf": "^6.1.
|
|
52
|
+
"puppeteer": "^24.31.0",
|
|
53
|
+
"redis": "^5.10.0",
|
|
54
|
+
"rimraf": "^6.1.2",
|
|
55
55
|
"sqlite3": "^5.1.7",
|
|
56
56
|
"ts-jest": "^29.4.5",
|
|
57
57
|
"typescript": "^5.9.3"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@scalar/express-api-reference": "^0.8.
|
|
60
|
+
"@scalar/express-api-reference": "^0.8.25",
|
|
61
61
|
"@sequelize/core": "^7.0.0-alpha.47",
|
|
62
62
|
"axios": "^1.13.2",
|
|
63
63
|
"axios-retry": "^4.5.0",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"crypto-js": "^4.2.0",
|
|
67
67
|
"express": "^5.1.0",
|
|
68
68
|
"https": "^1.0.0",
|
|
69
|
-
"jose": "^6.1.
|
|
69
|
+
"jose": "^6.1.2",
|
|
70
70
|
"jsrsasign": "^11.1.0",
|
|
71
|
-
"mongoose": "^8.
|
|
71
|
+
"mongoose": "^8.20.1",
|
|
72
72
|
"morgan": "^1.10.0",
|
|
73
73
|
"multer": "^2.0.1",
|
|
74
74
|
"pg": "^8.16.3",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ExternalApiConnection } from "../ExternalApiConnection";
|
|
2
|
-
import { StandardKeyGroup } from "../../../cryptography/generate/StandardApiKeyGenerator";
|
|
3
|
-
export interface CetusRate {
|
|
4
|
-
symbol: string;
|
|
5
|
-
source: string;
|
|
6
|
-
bid?: number;
|
|
7
|
-
ask?: number;
|
|
8
|
-
spot?: number;
|
|
9
|
-
prevDayClose?: number;
|
|
10
|
-
}
|
|
11
|
-
export declare enum CetusPair {
|
|
12
|
-
USDCOP = "USDCOP"
|
|
13
|
-
}
|
|
14
|
-
export interface CetusStrategy {
|
|
15
|
-
id: number;
|
|
16
|
-
name: string;
|
|
17
|
-
settings: any;
|
|
18
|
-
memory: any;
|
|
19
|
-
account: string;
|
|
20
|
-
pair: string;
|
|
21
|
-
intermediary: string;
|
|
22
|
-
status: string;
|
|
23
|
-
}
|
|
24
|
-
export declare class CetusStrategyApiManager extends ExternalApiConnection {
|
|
25
|
-
private apiUrl;
|
|
26
|
-
constructor(keys: StandardKeyGroup, apiUrl: string);
|
|
27
|
-
getRates(): Promise<CetusRate[]>;
|
|
28
|
-
getStrategies(name: string, pair: CetusPair, account: string): Promise<CetusStrategy[]>;
|
|
29
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CetusStrategyApiManager = exports.CetusPair = void 0;
|
|
4
|
-
const ExternalApiConnection_1 = require("../ExternalApiConnection");
|
|
5
|
-
const APIRequest_1 = require("../../APIRequest");
|
|
6
|
-
const RequestAxiosCall_1 = require("../../request/RequestAxiosCall");
|
|
7
|
-
;
|
|
8
|
-
var CetusPair;
|
|
9
|
-
(function (CetusPair) {
|
|
10
|
-
CetusPair["USDCOP"] = "USDCOP";
|
|
11
|
-
})(CetusPair || (exports.CetusPair = CetusPair = {}));
|
|
12
|
-
class CetusStrategyApiManager extends ExternalApiConnection_1.ExternalApiConnection {
|
|
13
|
-
apiUrl;
|
|
14
|
-
constructor(keys, apiUrl) {
|
|
15
|
-
super('cetus', keys);
|
|
16
|
-
this.apiUrl = apiUrl;
|
|
17
|
-
}
|
|
18
|
-
async getRates() {
|
|
19
|
-
let signature = this.sign({ method: APIRequest_1.RequestMethod.GET, path: '/v1/rates' });
|
|
20
|
-
//let signature: AxiosRequestConfig = this.sign({ method: RequestMethod.POST, path: '/v1/rates', body: this.encryptBody({ message: "Ejemplo de body" }) });
|
|
21
|
-
let response = this.decryptResponse(await RequestAxiosCall_1.RequestAxiosCall.get(`${this.apiUrl}/v1/rates`, signature));
|
|
22
|
-
return response;
|
|
23
|
-
}
|
|
24
|
-
async getStrategies(name, pair, account) {
|
|
25
|
-
let url = `/v1/strategies?name=${name}&pair=${pair}&account=${account}`;
|
|
26
|
-
let signature = this.sign({ method: APIRequest_1.RequestMethod.GET, path: url });
|
|
27
|
-
let response = this.decryptResponse(await RequestAxiosCall_1.RequestAxiosCall.get(`${this.apiUrl}${url}`, signature));
|
|
28
|
-
return response;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.CetusStrategyApiManager = CetusStrategyApiManager;
|
|
32
|
-
//# sourceMappingURL=CetusStrategyApiManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CetusStrategyApiManager.js","sourceRoot":"","sources":["../../../../src/api/external/cetus/CetusStrategyApiManager.ts"],"names":[],"mappings":";;;AACA,oEAAiE;AACjE,iDAAiD;AACjD,qEAAkE;AAWjE,CAAC;AAEF,IAAY,SAEX;AAFD,WAAY,SAAS;IACjB,8BAAiB,CAAA;AACrB,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB;AAaD,MAAa,uBAAwB,SAAQ,6CAAqB;IACtD,MAAM,CAAS;IAEvB,YAAY,IAAsB,EAAE,MAAc;QAC9C,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,QAAQ;QACjB,IAAI,SAAS,GAAuB,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,0BAAa,CAAC,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QAChG,2JAA2J;QAC3J,IAAI,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,mCAAgB,CAAC,GAAG,CAAsB,GAAG,IAAI,CAAC,MAAM,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;QAC3H,OAAO,QAAuB,CAAC;IACnC,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,IAAe,EAAE,OAAe;QACrE,IAAI,GAAG,GAAG,uBAAuB,IAAI,SAAS,IAAI,YAAY,OAAO,EAAE,CAAC;QACxE,IAAI,SAAS,GAAuB,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,0BAAa,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACxF,IAAI,QAAQ,GAAG,IAAI,CAAC,eAAe,CA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