@volare.finance/nestjs.plugins 2.0.0-alpha.7 → 2.0.1
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/README.md +111 -6
- package/dist/aws/aws.module.d.ts +1 -1
- package/dist/aws/aws.module.js +1 -2
- package/dist/aws/aws.module.js.map +1 -1
- package/dist/aws/aws.service.d.ts +1 -1
- package/dist/aws/aws.service.js +3 -3
- package/dist/aws/aws.service.js.map +1 -1
- package/dist/coingecko/coingecko.module.d.ts +1 -1
- package/dist/coingecko/coingecko.module.js +1 -2
- package/dist/coingecko/coingecko.module.js.map +1 -1
- package/dist/coingecko/coingecko.service.js +3 -3
- package/dist/coingecko/coingecko.service.js.map +1 -1
- package/dist/decorators/api.empty.response.decorator.d.ts +5 -0
- package/dist/decorators/api.empty.response.decorator.js +27 -0
- package/dist/decorators/api.empty.response.decorator.js.map +1 -0
- package/dist/decorators/api.list.response.decorator.d.ts +6 -0
- package/dist/decorators/api.list.response.decorator.js +31 -0
- package/dist/decorators/api.list.response.decorator.js.map +1 -0
- package/dist/decorators/api.obj.response.decorator.d.ts +6 -0
- package/dist/decorators/api.obj.response.decorator.js +28 -0
- package/dist/decorators/api.obj.response.decorator.js.map +1 -0
- package/dist/decorators/index.d.ts +8 -0
- package/dist/decorators/index.js +12 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/decorators/response.dto.d.ts +14 -0
- package/dist/decorators/response.dto.js +31 -0
- package/dist/decorators/response.dto.js.map +1 -0
- package/dist/{binance → exchanges/binance}/binance.config.d.ts +2 -2
- package/dist/exchanges/binance/binance.config.js.map +1 -0
- package/dist/{binance → exchanges/binance}/binance.module.d.ts +2 -2
- package/dist/{binance → exchanges/binance}/binance.module.js +2 -3
- package/dist/exchanges/binance/binance.module.js.map +1 -0
- package/dist/{binance → exchanges/binance}/binance.service.d.ts +6 -3
- package/dist/{binance → exchanges/binance}/binance.service.js +16 -16
- package/dist/exchanges/binance/binance.service.js.map +1 -0
- package/dist/exchanges/binance/index.js.map +1 -0
- package/dist/exchanges/bingx/bingx.config.d.ts +10 -0
- package/dist/exchanges/bingx/bingx.config.js +7 -0
- package/dist/exchanges/bingx/bingx.config.js.map +1 -0
- package/dist/exchanges/bingx/bingx.module.d.ts +9 -0
- package/dist/exchanges/bingx/bingx.module.js +27 -0
- package/dist/exchanges/bingx/bingx.module.js.map +1 -0
- package/dist/exchanges/bingx/bingx.service.d.ts +73 -0
- package/dist/exchanges/bingx/bingx.service.js +68 -0
- package/dist/exchanges/bingx/bingx.service.js.map +1 -0
- package/dist/exchanges/bingx/index.d.ts +7 -0
- package/dist/exchanges/bingx/index.js +11 -0
- package/dist/exchanges/bingx/index.js.map +1 -0
- package/dist/exchanges/bitget/bitget.config.d.ts +10 -0
- package/dist/exchanges/bitget/bitget.config.js +7 -0
- package/dist/exchanges/bitget/bitget.config.js.map +1 -0
- package/dist/exchanges/bitget/bitget.module.d.ts +9 -0
- package/dist/exchanges/bitget/bitget.module.js +27 -0
- package/dist/exchanges/bitget/bitget.module.js.map +1 -0
- package/dist/exchanges/bitget/bitget.service.d.ts +72 -0
- package/dist/exchanges/bitget/bitget.service.js +63 -0
- package/dist/exchanges/bitget/bitget.service.js.map +1 -0
- package/dist/exchanges/bitget/index.d.ts +7 -0
- package/dist/exchanges/bitget/index.js +11 -0
- package/dist/exchanges/bitget/index.js.map +1 -0
- package/dist/exchanges/bybit/bybit.config.d.ts +10 -0
- package/dist/exchanges/bybit/bybit.config.js +7 -0
- package/dist/exchanges/bybit/bybit.config.js.map +1 -0
- package/dist/exchanges/bybit/bybit.module.d.ts +9 -0
- package/dist/exchanges/bybit/bybit.module.js +27 -0
- package/dist/exchanges/bybit/bybit.module.js.map +1 -0
- package/dist/exchanges/bybit/bybit.service.d.ts +103 -0
- package/dist/exchanges/bybit/bybit.service.js +67 -0
- package/dist/exchanges/bybit/bybit.service.js.map +1 -0
- package/dist/exchanges/bybit/index.d.ts +7 -0
- package/dist/exchanges/bybit/index.js +11 -0
- package/dist/exchanges/bybit/index.js.map +1 -0
- package/dist/exchanges/gate.io/gate.io.config.d.ts +10 -0
- package/dist/exchanges/gate.io/gate.io.config.js +7 -0
- package/dist/exchanges/gate.io/gate.io.config.js.map +1 -0
- package/dist/exchanges/gate.io/gate.io.module.d.ts +9 -0
- package/dist/exchanges/gate.io/gate.io.module.js +27 -0
- package/dist/exchanges/gate.io/gate.io.module.js.map +1 -0
- package/dist/exchanges/gate.io/gate.io.service.d.ts +57 -0
- package/dist/exchanges/gate.io/gate.io.service.js +65 -0
- package/dist/exchanges/gate.io/gate.io.service.js.map +1 -0
- package/dist/exchanges/gate.io/index.d.ts +7 -0
- package/dist/exchanges/gate.io/index.js +11 -0
- package/dist/exchanges/gate.io/index.js.map +1 -0
- package/dist/exchanges/index.d.ts +13 -0
- package/dist/exchanges/index.js +17 -0
- package/dist/exchanges/index.js.map +1 -0
- package/dist/exchanges/lbank/index.js.map +1 -0
- package/dist/{lbank → exchanges/lbank}/lbank.config.d.ts +2 -2
- package/dist/exchanges/lbank/lbank.config.js.map +1 -0
- package/dist/{lbank → exchanges/lbank}/lbank.module.d.ts +2 -2
- package/dist/{lbank → exchanges/lbank}/lbank.module.js +2 -3
- package/dist/exchanges/lbank/lbank.module.js.map +1 -0
- package/dist/exchanges/lbank/lbank.service.d.ts +66 -0
- package/dist/exchanges/lbank/lbank.service.js +61 -0
- package/dist/exchanges/lbank/lbank.service.js.map +1 -0
- package/dist/exchanges/mexc/index.js.map +1 -0
- package/dist/{mexc → exchanges/mexc}/mexc.config.d.ts +2 -2
- package/dist/exchanges/mexc/mexc.config.js.map +1 -0
- package/dist/{mexc → exchanges/mexc}/mexc.module.d.ts +2 -2
- package/dist/{mexc → exchanges/mexc}/mexc.module.js +2 -3
- package/dist/exchanges/mexc/mexc.module.js.map +1 -0
- package/dist/{mexc → exchanges/mexc}/mexc.service.d.ts +3 -2
- package/dist/{mexc → exchanges/mexc}/mexc.service.js +12 -13
- package/dist/exchanges/mexc/mexc.service.js.map +1 -0
- package/dist/exchanges/okx/index.d.ts +7 -0
- package/dist/exchanges/okx/index.js +11 -0
- package/dist/exchanges/okx/index.js.map +1 -0
- package/dist/exchanges/okx/okx.config.d.ts +10 -0
- package/dist/exchanges/okx/okx.config.js +7 -0
- package/dist/exchanges/okx/okx.config.js.map +1 -0
- package/dist/exchanges/okx/okx.module.d.ts +9 -0
- package/dist/exchanges/okx/okx.module.js +27 -0
- package/dist/exchanges/okx/okx.module.js.map +1 -0
- package/dist/exchanges/okx/okx.service.d.ts +72 -0
- package/dist/exchanges/okx/okx.service.js +64 -0
- package/dist/exchanges/okx/okx.service.js.map +1 -0
- package/dist/exchanges/venkate/index.d.ts +7 -0
- package/dist/exchanges/venkate/index.js +11 -0
- package/dist/exchanges/venkate/index.js.map +1 -0
- package/dist/exchanges/venkate/venkate.config.d.ts +10 -0
- package/dist/exchanges/venkate/venkate.config.js +7 -0
- package/dist/exchanges/venkate/venkate.config.js.map +1 -0
- package/dist/exchanges/venkate/venkate.module.d.ts +9 -0
- package/dist/exchanges/venkate/venkate.module.js +27 -0
- package/dist/exchanges/venkate/venkate.module.js.map +1 -0
- package/dist/exchanges/venkate/venkate.service.d.ts +56 -0
- package/dist/exchanges/venkate/venkate.service.js +62 -0
- package/dist/exchanges/venkate/venkate.service.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/logger/logger.module.d.ts +1 -1
- package/dist/logger/logger.module.js +1 -2
- package/dist/logger/logger.module.js.map +1 -1
- package/dist/logger/logger.service.d.ts +2 -4
- package/dist/logger/logger.service.js +4 -10
- package/dist/logger/logger.service.js.map +1 -1
- package/dist/middlewares/index.d.ts +5 -0
- package/dist/middlewares/index.js +9 -0
- package/dist/middlewares/index.js.map +1 -0
- package/dist/middlewares/ip.whitelist.middleware.d.ts +9 -0
- package/dist/middlewares/ip.whitelist.middleware.js +25 -0
- package/dist/middlewares/ip.whitelist.middleware.js.map +1 -0
- package/dist/mongo/filter.dto.js.map +1 -1
- package/dist/mongo/mongo.service.d.ts +5 -0
- package/dist/mongo/mongo.service.js +7 -3
- package/dist/mongo/mongo.service.js.map +1 -1
- package/dist/pipes/index.d.ts +0 -1
- package/dist/pipes/index.js +0 -1
- package/dist/pipes/index.js.map +1 -1
- package/dist/pipes/parse-bool.pipe.d.ts +0 -1
- package/dist/pipes/parse-bool.pipe.js +0 -1
- package/dist/pipes/parse-bool.pipe.js.map +1 -1
- package/dist/viabtc/viabtc.module.d.ts +1 -1
- package/dist/viabtc/viabtc.module.js +1 -2
- package/dist/viabtc/viabtc.module.js.map +1 -1
- package/package.json +20 -15
- package/dist/binance/binance.config.js.map +0 -1
- package/dist/binance/binance.module.js.map +0 -1
- package/dist/binance/binance.service.js.map +0 -1
- package/dist/binance/index.js.map +0 -1
- package/dist/lbank/index.js.map +0 -1
- package/dist/lbank/lbank.config.js.map +0 -1
- package/dist/lbank/lbank.module.js.map +0 -1
- package/dist/lbank/lbank.service.d.ts +0 -48
- package/dist/lbank/lbank.service.js +0 -81
- package/dist/lbank/lbank.service.js.map +0 -1
- package/dist/mexc/index.js.map +0 -1
- package/dist/mexc/mexc.config.js.map +0 -1
- package/dist/mexc/mexc.module.js.map +0 -1
- package/dist/mexc/mexc.service.js.map +0 -1
- /package/dist/{binance → exchanges/binance}/binance.config.js +0 -0
- /package/dist/{binance → exchanges/binance}/index.d.ts +0 -0
- /package/dist/{binance → exchanges/binance}/index.js +0 -0
- /package/dist/{lbank → exchanges/lbank}/index.d.ts +0 -0
- /package/dist/{lbank → exchanges/lbank}/index.js +0 -0
- /package/dist/{lbank → exchanges/lbank}/lbank.config.js +0 -0
- /package/dist/{mexc → exchanges/mexc}/index.d.ts +0 -0
- /package/dist/{mexc → exchanges/mexc}/index.js +0 -0
- /package/dist/{mexc → exchanges/mexc}/mexc.config.js +0 -0
|
@@ -12,7 +12,14 @@ const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
|
12
12
|
let MexcService = class MexcService {
|
|
13
13
|
constructor(constant) {
|
|
14
14
|
this.constant = constant;
|
|
15
|
-
|
|
15
|
+
if (constant.mexc?.enabled) {
|
|
16
|
+
this.instance = axios_1.default.create({ baseURL: constant.mexc.url });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
checkConstant() {
|
|
20
|
+
if (!this.constant.mexc?.enabled) {
|
|
21
|
+
throw new common_1.HttpException('This feature is not supported', common_1.HttpStatus.BAD_REQUEST);
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
/**
|
|
18
25
|
* Market Data - Current Average Price
|
|
@@ -20,9 +27,7 @@ let MexcService = class MexcService {
|
|
|
20
27
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#current-average-price
|
|
21
28
|
*/
|
|
22
29
|
async avgPrice(symbol) {
|
|
23
|
-
|
|
24
|
-
throw new common_1.HttpException('This feature is not supported', common_1.HttpStatus.BAD_REQUEST);
|
|
25
|
-
}
|
|
30
|
+
this.checkConstant();
|
|
26
31
|
return (await this.instance.get('/api/v3/avgPrice', { params: { symbol } })).data;
|
|
27
32
|
}
|
|
28
33
|
/**
|
|
@@ -31,9 +36,7 @@ let MexcService = class MexcService {
|
|
|
31
36
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#24hr-ticker-price-change-statistics
|
|
32
37
|
*/
|
|
33
38
|
async ticker(symbol) {
|
|
34
|
-
|
|
35
|
-
throw new common_1.HttpException('This feature is not supported', common_1.HttpStatus.BAD_REQUEST);
|
|
36
|
-
}
|
|
39
|
+
this.checkConstant();
|
|
37
40
|
return (await this.instance.get('/api/v3/ticker/24hr', { params: { symbol } })).data;
|
|
38
41
|
}
|
|
39
42
|
/**
|
|
@@ -46,9 +49,7 @@ let MexcService = class MexcService {
|
|
|
46
49
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#kline-candlestick-data
|
|
47
50
|
*/
|
|
48
51
|
async klines(symbol, interval, startTime, endTime, limit) {
|
|
49
|
-
|
|
50
|
-
throw new common_1.HttpException('This feature is not supported', common_1.HttpStatus.BAD_REQUEST);
|
|
51
|
-
}
|
|
52
|
+
this.checkConstant();
|
|
52
53
|
return (await this.instance.get('/api/v3/klines', { params: { symbol, interval, startTime, endTime, limit } })).data;
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
@@ -58,9 +59,7 @@ let MexcService = class MexcService {
|
|
|
58
59
|
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#order-book
|
|
59
60
|
*/
|
|
60
61
|
async depth(symbol, limit) {
|
|
61
|
-
|
|
62
|
-
throw new common_1.HttpException('This feature is not supported', common_1.HttpStatus.BAD_REQUEST);
|
|
63
|
-
}
|
|
62
|
+
this.checkConstant();
|
|
64
63
|
return (await this.instance.get('/api/v3/depth', { params: { symbol, limit } })).data;
|
|
65
64
|
}
|
|
66
65
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mexc.service.js","sourceRoot":"","sources":["../../../src/exchanges/mexc/mexc.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;AAEH,2CAA+E;AAC/E,0DAA6C;AAItC,IAAM,WAAW,GAAjB,MAAM,WAAW;IAGtB,YAAqD,QAAoB;QAApB,aAAQ,GAAR,QAAQ,CAAY;QACvE,IAAI,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC;YAC3B,IAAI,CAAC,QAAQ,GAAG,eAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED,aAAa;QACX,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC;YACjC,MAAM,IAAI,sBAAa,CAAC,+BAA+B,EAAE,mBAAU,CAAC,WAAW,CAAC,CAAC;QACnF,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,MAAc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
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file index.ts
|
|
4
|
+
* @date 2024
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const tslib_1 = require("tslib");
|
|
8
|
+
tslib_1.__exportStar(require("./okx.config"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./okx.module"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./okx.service"), exports);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exchanges/okx/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uDAA6B;AAC7B,uDAA6B;AAC7B,wDAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"okx.config.js","sourceRoot":"","sources":["../../../src/exchanges/okx/okx.config.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file okx.module.ts
|
|
4
|
+
* @date 2024
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.OkxModule = void 0;
|
|
8
|
+
const config_1 = require("../../config");
|
|
9
|
+
const okx_service_1 = require("./okx.service");
|
|
10
|
+
class OkxModule {
|
|
11
|
+
static forRoot(_options) {
|
|
12
|
+
return {
|
|
13
|
+
module: OkxModule,
|
|
14
|
+
exports: [okx_service_1.OkxService],
|
|
15
|
+
providers: [
|
|
16
|
+
{
|
|
17
|
+
provide: 'OkxConstant',
|
|
18
|
+
useFactory: (constant) => constant.config(),
|
|
19
|
+
inject: [config_1.ConfigService],
|
|
20
|
+
},
|
|
21
|
+
okx_service_1.OkxService,
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.OkxModule = OkxModule;
|
|
27
|
+
//# sourceMappingURL=okx.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"okx.module.js","sourceRoot":"","sources":["../../../src/exchanges/okx/okx.module.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yCAA4D;AAE5D,+CAA2C;AAE3C,MAAa,SAAS;IACpB,MAAM,CAAC,OAAO,CAAC,QAAwB;QACrC,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,CAAC,wBAAU,CAAC;YACrB,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,aAAa;oBACtB,UAAU,EAAE,CAAC,QAAkC,EAAO,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE;oBAC1E,MAAM,EAAE,CAAC,sBAAa,CAAC;iBACxB;gBACD,wBAAU;aACX;SACF,CAAC;IACJ,CAAC;CACF;AAfD,8BAeC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file okx.service.ts
|
|
3
|
+
* @date 2024
|
|
4
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data
|
|
5
|
+
*/
|
|
6
|
+
import { OkxConfig } from './okx.config';
|
|
7
|
+
export declare class OkxService {
|
|
8
|
+
private readonly constant;
|
|
9
|
+
private readonly instance;
|
|
10
|
+
constructor(constant: OkxConfig);
|
|
11
|
+
checkConstant(): void;
|
|
12
|
+
/**
|
|
13
|
+
* GET Tickers
|
|
14
|
+
* @param instType Instrument type. e.g. SWAP
|
|
15
|
+
* @param uly Underlying e.g. BTC-USDT
|
|
16
|
+
* @param instFamily Instrument family.
|
|
17
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
|
|
18
|
+
*/
|
|
19
|
+
ticker(instType: 'SPOT' | 'SWAP' | 'FUTURES' | 'OPTION', uly: string, instFamily?: string): Promise<{
|
|
20
|
+
code: string;
|
|
21
|
+
msg: string;
|
|
22
|
+
data: {
|
|
23
|
+
instType: string;
|
|
24
|
+
instId: string;
|
|
25
|
+
last: string;
|
|
26
|
+
lastSz: string;
|
|
27
|
+
askPx: string;
|
|
28
|
+
askSz: string;
|
|
29
|
+
bidPx: string;
|
|
30
|
+
bidSz: string;
|
|
31
|
+
open24h: string;
|
|
32
|
+
high24h: string;
|
|
33
|
+
low24h: string;
|
|
34
|
+
volCcy24h: string;
|
|
35
|
+
vol24h: string;
|
|
36
|
+
ts: string;
|
|
37
|
+
sodUtc0: string;
|
|
38
|
+
sodUtc8: string;
|
|
39
|
+
}[];
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* GET Candlesticks
|
|
43
|
+
* @param instId Instrument ID. e.g. BTC-USDT
|
|
44
|
+
* @param bar Bar size. e.g. 1m
|
|
45
|
+
* @param after Pagination of data to return records earlier than the requested ts. e.g. 1622548800000
|
|
46
|
+
* @param before Pagination of data to return records newer than the requested ts. e.g. 1622548800000
|
|
47
|
+
* @param limit Number of results per request. The maximum is 300. e.g. 100
|
|
48
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-candlesticks
|
|
49
|
+
*/
|
|
50
|
+
klines(instId: string, bar?: '1m' | '3m' | '5m' | '15m' | '30m' | '1H' | '2H' | '4H' | '6H' | '12H' | '1D' | '2D' | '3D' | '1W' | '1M' | '3M', after?: string | number, before?: string | number, limit?: string | number): Promise<{
|
|
51
|
+
code: string;
|
|
52
|
+
msg: string;
|
|
53
|
+
data: [string, string, string, string, string, string, string, string, string][];
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* GET Order book
|
|
57
|
+
* @param instId Instrument ID. e.g. BTC-USDT
|
|
58
|
+
* @param sz Order book depth per side. Maximum 400. e.g. 1
|
|
59
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-order-book
|
|
60
|
+
*/
|
|
61
|
+
depth(instId: string, sz?: string | number): Promise<{
|
|
62
|
+
code: string;
|
|
63
|
+
msg: string;
|
|
64
|
+
data: [
|
|
65
|
+
{
|
|
66
|
+
asks: [string, string, string, string][];
|
|
67
|
+
bids: [string, string, string, string][];
|
|
68
|
+
ts: string;
|
|
69
|
+
}
|
|
70
|
+
];
|
|
71
|
+
}>;
|
|
72
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file okx.service.ts
|
|
4
|
+
* @date 2024
|
|
5
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.OkxService = void 0;
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
12
|
+
let OkxService = class OkxService {
|
|
13
|
+
constructor(constant) {
|
|
14
|
+
this.constant = constant;
|
|
15
|
+
if (constant.okx?.enabled) {
|
|
16
|
+
this.instance = axios_1.default.create({ baseURL: constant.okx.url });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
checkConstant() {
|
|
20
|
+
if (!this.constant.okx?.enabled) {
|
|
21
|
+
throw new common_1.HttpException('This feature is not supported', common_1.HttpStatus.BAD_REQUEST);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* GET Tickers
|
|
26
|
+
* @param instType Instrument type. e.g. SWAP
|
|
27
|
+
* @param uly Underlying e.g. BTC-USDT
|
|
28
|
+
* @param instFamily Instrument family.
|
|
29
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
|
|
30
|
+
*/
|
|
31
|
+
async ticker(instType, uly, instFamily) {
|
|
32
|
+
this.checkConstant();
|
|
33
|
+
return (await this.instance.get('/api/v5/market/tickers', { params: { instType, uly, instFamily } })).data;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* GET Candlesticks
|
|
37
|
+
* @param instId Instrument ID. e.g. BTC-USDT
|
|
38
|
+
* @param bar Bar size. e.g. 1m
|
|
39
|
+
* @param after Pagination of data to return records earlier than the requested ts. e.g. 1622548800000
|
|
40
|
+
* @param before Pagination of data to return records newer than the requested ts. e.g. 1622548800000
|
|
41
|
+
* @param limit Number of results per request. The maximum is 300. e.g. 100
|
|
42
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-candlesticks
|
|
43
|
+
*/
|
|
44
|
+
async klines(instId, bar, after, before, limit) {
|
|
45
|
+
this.checkConstant();
|
|
46
|
+
return (await this.instance.get('/api/v5/market/candles', { params: { instId, bar, after, before, limit } })).data;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* GET Order book
|
|
50
|
+
* @param instId Instrument ID. e.g. BTC-USDT
|
|
51
|
+
* @param sz Order book depth per side. Maximum 400. e.g. 1
|
|
52
|
+
* @see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-order-book
|
|
53
|
+
*/
|
|
54
|
+
async depth(instId, sz) {
|
|
55
|
+
this.checkConstant();
|
|
56
|
+
return (await this.instance.get('/api/v5/market/books', { params: { instId, sz } })).data;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.OkxService = OkxService;
|
|
60
|
+
exports.OkxService = OkxService = tslib_1.__decorate([
|
|
61
|
+
(0, common_1.Injectable)(),
|
|
62
|
+
tslib_1.__param(0, (0, common_1.Inject)('OkxConstant'))
|
|
63
|
+
], OkxService);
|
|
64
|
+
//# sourceMappingURL=okx.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"okx.service.js","sourceRoot":"","sources":["../../../src/exchanges/okx/okx.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;AAEH,2CAA+E;AAC/E,0DAA6C;AAItC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAGrB,YAAoD,QAAmB;QAAnB,aAAQ,GAAR,QAAQ,CAAW;QACrE,IAAI,QAAQ,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E,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5F,CAAC;CACF,CAAA;AAnGY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;IAIE,mBAAA,IAAA,eAAM,EAAC,aAAa,CAAC,CAAA;GAHvB,UAAU,CAmGtB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file index.ts
|
|
4
|
+
* @date 2024
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const tslib_1 = require("tslib");
|
|
8
|
+
tslib_1.__exportStar(require("./venkate.config"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./venkate.module"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./venkate.service"), exports);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exchanges/venkate/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAiC;AACjC,2DAAiC;AACjC,4DAAkC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"venkate.config.js","sourceRoot":"","sources":["../../../src/exchanges/venkate/venkate.config.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file venkate.module.ts
|
|
4
|
+
* @date 2024
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.VenkateModule = void 0;
|
|
8
|
+
const config_1 = require("../../config");
|
|
9
|
+
const venkate_service_1 = require("./venkate.service");
|
|
10
|
+
class VenkateModule {
|
|
11
|
+
static forRoot(_options) {
|
|
12
|
+
return {
|
|
13
|
+
module: VenkateModule,
|
|
14
|
+
exports: [venkate_service_1.VenkateService],
|
|
15
|
+
providers: [
|
|
16
|
+
{
|
|
17
|
+
provide: 'VenkateConstant',
|
|
18
|
+
useFactory: (constant) => constant.config(),
|
|
19
|
+
inject: [config_1.ConfigService],
|
|
20
|
+
},
|
|
21
|
+
venkate_service_1.VenkateService,
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.VenkateModule = VenkateModule;
|
|
27
|
+
//# sourceMappingURL=venkate.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"venkate.module.js","sourceRoot":"","sources":["../../../src/exchanges/venkate/venkate.module.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yCAA4D;AAE5D,uDAAmD;AAEnD,MAAa,aAAa;IACxB,MAAM,CAAC,OAAO,CAAC,QAAwB;QACrC,OAAO;YACL,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,CAAC,gCAAc,CAAC;YACzB,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,iBAAiB;oBAC1B,UAAU,EAAE,CAAC,QAAsC,EAAO,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE;oBAC9E,MAAM,EAAE,CAAC,sBAAa,CAAC;iBACxB;gBACD,gCAAc;aACf;SACF,CAAC;IACJ,CAAC;CACF;AAfD,sCAeC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file venkate.service.ts
|
|
3
|
+
* @date 2024
|
|
4
|
+
* @see https://venkate.gitbook.io/venkate-api-doc/v/english
|
|
5
|
+
*/
|
|
6
|
+
import { VenkateConfig } from './venkate.config';
|
|
7
|
+
export declare class VenkateService {
|
|
8
|
+
private readonly constant;
|
|
9
|
+
private readonly instance;
|
|
10
|
+
constructor(constant: VenkateConfig);
|
|
11
|
+
checkConstant(): void;
|
|
12
|
+
/**
|
|
13
|
+
* Get 24hrs ticker
|
|
14
|
+
* @param symbol Symbol name e.g. BTCUSDT
|
|
15
|
+
* @see https://venkate.gitbook.io/venkate-api-doc/v/english/spot#id-24hrs-ticker
|
|
16
|
+
*/
|
|
17
|
+
ticker(symbol: string): Promise<{
|
|
18
|
+
high: string;
|
|
19
|
+
vol: string;
|
|
20
|
+
last: string;
|
|
21
|
+
low: string;
|
|
22
|
+
buy: number;
|
|
23
|
+
sell: number;
|
|
24
|
+
rose: string;
|
|
25
|
+
time: number;
|
|
26
|
+
open: string;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Get Kline/candlestick data
|
|
30
|
+
* @param symbol Symbol Name. e.g. BTCUSDT
|
|
31
|
+
* @param interval Interval of the Kline. e.g. 1min
|
|
32
|
+
* @param limit e.g. 100
|
|
33
|
+
* @param startTime e.g. 1538728740000
|
|
34
|
+
* @param endTime e.g. 1538728740000
|
|
35
|
+
* @see https://venkate.gitbook.io/venkate-api-doc/v/english/spot#kline-candlestick-data
|
|
36
|
+
*/
|
|
37
|
+
klines(symbol: string, interval: '1min' | '5min' | '15min' | '30min' | '60min' | '1day' | '1week' | '1month', limit?: string | number, startTime?: string | number, endTime?: string | number): Promise<{
|
|
38
|
+
high: string;
|
|
39
|
+
vol: string;
|
|
40
|
+
low: string;
|
|
41
|
+
idx: number;
|
|
42
|
+
close: string;
|
|
43
|
+
open: string;
|
|
44
|
+
}[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Depth
|
|
47
|
+
* @param symbol Symbol Name. e.g. BTCUSDT
|
|
48
|
+
* @param limit e.g. 100
|
|
49
|
+
* @see https://venkate.gitbook.io/venkate-api-doc/v/english/spot#depth
|
|
50
|
+
*/
|
|
51
|
+
depth(symbol: string, limit?: string | number): Promise<{
|
|
52
|
+
asks: [number, number][];
|
|
53
|
+
bids: [number, number][];
|
|
54
|
+
time: number;
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file venkate.service.ts
|
|
4
|
+
* @date 2024
|
|
5
|
+
* @see https://venkate.gitbook.io/venkate-api-doc/v/english
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.VenkateService = void 0;
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
12
|
+
let VenkateService = class VenkateService {
|
|
13
|
+
constructor(constant) {
|
|
14
|
+
this.constant = constant;
|
|
15
|
+
if (constant.venkate?.enabled) {
|
|
16
|
+
this.instance = axios_1.default.create({ baseURL: constant.venkate.url });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
checkConstant() {
|
|
20
|
+
if (!this.constant.venkate?.enabled) {
|
|
21
|
+
throw new common_1.HttpException('This feature is not supported', common_1.HttpStatus.BAD_REQUEST);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get 24hrs ticker
|
|
26
|
+
* @param symbol Symbol name e.g. BTCUSDT
|
|
27
|
+
* @see https://venkate.gitbook.io/venkate-api-doc/v/english/spot#id-24hrs-ticker
|
|
28
|
+
*/
|
|
29
|
+
async ticker(symbol) {
|
|
30
|
+
this.checkConstant();
|
|
31
|
+
return (await this.instance.get('/sapi/v1/ticker', { params: { symbol } })).data;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get Kline/candlestick data
|
|
35
|
+
* @param symbol Symbol Name. e.g. BTCUSDT
|
|
36
|
+
* @param interval Interval of the Kline. e.g. 1min
|
|
37
|
+
* @param limit e.g. 100
|
|
38
|
+
* @param startTime e.g. 1538728740000
|
|
39
|
+
* @param endTime e.g. 1538728740000
|
|
40
|
+
* @see https://venkate.gitbook.io/venkate-api-doc/v/english/spot#kline-candlestick-data
|
|
41
|
+
*/
|
|
42
|
+
async klines(symbol, interval, limit, startTime, endTime) {
|
|
43
|
+
this.checkConstant();
|
|
44
|
+
return (await this.instance.get('/sapi/v1/klines', { params: { symbol, interval, limit, startTime, endTime } })).data;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Depth
|
|
48
|
+
* @param symbol Symbol Name. e.g. BTCUSDT
|
|
49
|
+
* @param limit e.g. 100
|
|
50
|
+
* @see https://venkate.gitbook.io/venkate-api-doc/v/english/spot#depth
|
|
51
|
+
*/
|
|
52
|
+
async depth(symbol, limit) {
|
|
53
|
+
this.checkConstant();
|
|
54
|
+
return (await this.instance.get('/sapi/v1/depth', { params: { symbol, limit } })).data;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.VenkateService = VenkateService;
|
|
58
|
+
exports.VenkateService = VenkateService = tslib_1.__decorate([
|
|
59
|
+
(0, common_1.Injectable)(),
|
|
60
|
+
tslib_1.__param(0, (0, common_1.Inject)('VenkateConstant'))
|
|
61
|
+
], VenkateService);
|
|
62
|
+
//# sourceMappingURL=venkate.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"venkate.service.js","sourceRoot":"","sources":["../../../src/exchanges/venkate/venkate.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;AAEH,2CAA+E;AAC/E,0DAA6C;AAItC,IAAM,cAAc,GAApB,MAAM,cAAc;IAGzB,YAAwD,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;QAC7E,IAAI,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;YAC9B,IAAI,CAAC,QAAQ,GAAG,eAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IAED,aAAa;QACX,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;YACpC,MAAM,IAAI,sBAAa,CAAC,+BAA+B,EAAE,mBAAU,CAAC,WAAW,CAAC,CAAC;QACnF,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,MAAc;QAWzB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACnF,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,MAAM,CACV,MAAc,EACd,QAAqF,EACrF,KAAuB,EACvB,SAA2B,EAC3B,OAAyB;QAWzB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACxH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CACT,MAAc,EACd,KAAuB;QAMvB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACzF,CAAC;CACF,CAAA;AAjFY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;IAIE,mBAAA,IAAA,eAAM,EAAC,iBAAiB,CAAC,CAAA;GAH3B,cAAc,CAiF1B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* @date 2023
|
|
4
4
|
*/
|
|
5
5
|
export * from './aws';
|
|
6
|
-
export * from './binance';
|
|
7
6
|
export * from './coingecko';
|
|
8
7
|
export * from './config';
|
|
9
|
-
export * from './
|
|
8
|
+
export * from './decorators';
|
|
9
|
+
export * from './exchanges';
|
|
10
10
|
export * from './logger';
|
|
11
|
-
export * from './
|
|
11
|
+
export * from './middlewares';
|
|
12
12
|
export * from './mongo';
|
|
13
13
|
export * from './pipes';
|
|
14
14
|
export * from './viabtc';
|
package/dist/index.js
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
tslib_1.__exportStar(require("./aws"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./binance"), exports);
|
|
10
9
|
tslib_1.__exportStar(require("./coingecko"), exports);
|
|
11
10
|
tslib_1.__exportStar(require("./config"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./
|
|
11
|
+
tslib_1.__exportStar(require("./decorators"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./exchanges"), exports);
|
|
13
13
|
tslib_1.__exportStar(require("./logger"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./
|
|
14
|
+
tslib_1.__exportStar(require("./middlewares"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./mongo"), exports);
|
|
16
16
|
tslib_1.__exportStar(require("./pipes"), exports);
|
|
17
17
|
tslib_1.__exportStar(require("./viabtc"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,gDAAsB;AACtB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,gDAAsB;AACtB,sDAA4B;AAC5B,mDAAyB;AACzB,uDAA6B;AAC7B,sDAA4B;AAC5B,mDAAyB;AACzB,wDAA8B;AAC9B,kDAAwB;AACxB,kDAAwB;AACxB,mDAAyB"}
|
|
@@ -8,10 +8,9 @@ exports.MyLoggerModule = void 0;
|
|
|
8
8
|
const config_1 = require("../config");
|
|
9
9
|
const logger_service_1 = require("./logger.service");
|
|
10
10
|
class MyLoggerModule {
|
|
11
|
-
static forRoot(
|
|
11
|
+
static forRoot(_options) {
|
|
12
12
|
return {
|
|
13
13
|
module: MyLoggerModule,
|
|
14
|
-
imports: [config_1.ConfigModule.forRoot(options)],
|
|
15
14
|
providers: [
|
|
16
15
|
{
|
|
17
16
|
provide: 'MyLoggerConstant',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.module.js","sourceRoot":"","sources":["../../src/logger/logger.module.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"logger.module.js","sourceRoot":"","sources":["../../src/logger/logger.module.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,sCAAyD;AAEzD,qDAAmD;AAEnD,MAAa,cAAc;IACzB,MAAM,CAAC,OAAO,CAAC,QAAwB;QACrC,OAAO;YACL,MAAM,EAAE,cAAc;YACtB,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,kBAAkB;oBAC3B,UAAU,EAAE,CAAC,QAAuC,EAAkB,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE;oBAC1F,MAAM,EAAE,CAAC,sBAAa,CAAC;iBACxB;gBACD,gCAAe;aAChB;YACD,OAAO,EAAE,CAAC,gCAAe,CAAC;SAC3B,CAAC;IACJ,CAAC;CACF;AAfD,wCAeC"}
|
|
@@ -9,11 +9,9 @@ export declare class MyLoggerService implements LoggerService {
|
|
|
9
9
|
private readonly constant;
|
|
10
10
|
winstonLogger: winston.Logger;
|
|
11
11
|
constructor(constant: MyLoggerConfig);
|
|
12
|
-
debug(message: any, context?: string): any;
|
|
13
|
-
error(message: any, context?: string): any;
|
|
14
12
|
log(message: any, context?: string): any;
|
|
15
|
-
|
|
13
|
+
debug(message: any, context?: string): any;
|
|
16
14
|
verbose(message: any, context?: string): any;
|
|
17
15
|
warn(message: any, context?: string): any;
|
|
18
|
-
|
|
16
|
+
error(message: any, context?: string): any;
|
|
19
17
|
}
|
|
@@ -24,17 +24,11 @@ let MyLoggerService = class MyLoggerService {
|
|
|
24
24
|
transports,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
debug(message, context) {
|
|
28
|
-
this.winstonLogger.debug(message, context);
|
|
29
|
-
}
|
|
30
|
-
error(message, context) {
|
|
31
|
-
this.winstonLogger.error(message, context);
|
|
32
|
-
}
|
|
33
27
|
log(message, context) {
|
|
34
28
|
this.winstonLogger.info(message, context);
|
|
35
29
|
}
|
|
36
|
-
|
|
37
|
-
this.winstonLogger.
|
|
30
|
+
debug(message, context) {
|
|
31
|
+
this.winstonLogger.debug(message, context);
|
|
38
32
|
}
|
|
39
33
|
verbose(message, context) {
|
|
40
34
|
this.winstonLogger.verbose(message, context);
|
|
@@ -42,8 +36,8 @@ let MyLoggerService = class MyLoggerService {
|
|
|
42
36
|
warn(message, context) {
|
|
43
37
|
this.winstonLogger.warning(message, context);
|
|
44
38
|
}
|
|
45
|
-
|
|
46
|
-
this.winstonLogger.
|
|
39
|
+
error(message, context) {
|
|
40
|
+
this.winstonLogger.error(message, context);
|
|
47
41
|
}
|
|
48
42
|
};
|
|
49
43
|
exports.MyLoggerService = MyLoggerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.service.js","sourceRoot":"","sources":["../../src/logger/logger.service.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,2CAAmE;AACnE,8DAA8B;AAIvB,IAAM,eAAe,GAArB,MAAM,eAAe;IAG1B,YAAyD,QAAwB;QAAxB,aAAQ,GAAR,QAAQ,CAAgB;QAC/E,MAAM,UAAU,GAAG,IAAI,KAAK,CAAM,CAAC,CAAC,CAAC;QAErC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,iBAAO,CAAC,UAAU,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,IAAI,MAAM;YAC7C,MAAM,EAAE,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