Skip to content

Commit

Permalink
Merge pull request #38 from Saba-Sabato/main
Browse files Browse the repository at this point in the history
  • Loading branch information
alplabin authored Oct 2, 2024
2 parents daf6336 + 4e41927 commit e6b6d18
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 25 deletions.
8 changes: 1 addition & 7 deletions src/helpers/logger.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
export enum LogLevel {
NONE = '',
DEBUG = 'debug',
INFO = 'info',
WARN = 'warn',
ERROR = 'error',
}
import { LogLevel } from "../modules/enum";

export class Logger {
private static instance: Logger;
Expand Down
33 changes: 18 additions & 15 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import { listenkeyResponse } from './modules/restful/stream/types';
import { Spot } from './spot';
import { WebsocketAPI } from './websocketAPI';
import { WebsocketStream } from './websocketStream';
import {
import {
AccountSnapshotType,
AccountType,
AddLiquidityPreviewType,
BusdStableCoinsConversion,
CancelReplaceMode,
CancelResult,
CancelRestrictions,
CancelResult,
ConvertExpiredType,
ConvertOrderStatus,
ConvertSide,
Expand All @@ -38,8 +38,8 @@ import {
FlexibleProductStatus,
FlexibleProductType,
FromAccountType,
FuturesType,
FuturesTransferType,
FuturesType,
GetCrossMargingTransferHistoryType,
HisrecStatus,
HistoryStatus,
Expand All @@ -51,31 +51,32 @@ import {
LendingType,
LiquidityAddType,
LiquidityRemoveType,
LogLevel,
MarginArchive,
MarginBorrowRepayType,
MargintransferType,
MarginTransferType,
MarginStatus,
MarginInterestHistory,
MarginArchive,
MarginLevelStatus,
MarginStatus,
MarginSubAccountTransferType,
MargintransferType,
MarginTransferType,
NeedBtcValuation,
NewOrderRespType,
NewOrderResult,
OrderListAboveBelowType,
OrderListOrderStatus,
OcoNewOrderRespType,
OrderListStatusType,
Operation,
OptionalFixedAndActivityProductStatus,
OptionalFlexibleProductStatus,
OptionalSide,
OptionalTransFrom,
OptionalTransTo,
OrderListAboveBelowType,
OrderListOrderStatus,
OrderListStatusType,
orderListWorkingType,
OrderStatus,
OrderType,
OtoPendingType,
orderListWorkingType,
Permissions,
PortfolioAccountStatus,
PortfolioAccountType,
Expand All @@ -84,8 +85,8 @@ import {
PositionStatus,
QueryConvertTransfer,
QuerySubAccountList,
RemoveLiquidityPreviewType,
RedeemDestAccount,
RemoveLiquidityPreviewType,
SelfTradePreventionMode,
Side,
SideEffectType,
Expand All @@ -106,10 +107,10 @@ import {
TimeInForce,
ToAccountType,
TradeType,
TransFrom,
TransactionType,
TransferSide,
TransFrom,
TransTo,
TransactionType,
UnivStatus,
UnivTransferType,
Urgency,
Expand All @@ -119,7 +120,8 @@ import {
WorkingFloor
} from './modules/enum';

export { AccountSnapshotType,
export {
AccountSnapshotType,
AccountType,
AddLiquidityPreviewType,
BusdStableCoinsConversion,
Expand Down Expand Up @@ -153,6 +155,7 @@ export { AccountSnapshotType,
LendingType,
LiquidityAddType,
LiquidityRemoveType,
LogLevel,
listenkeyResponse,
MarginBorrowRepayType,
MargintransferType,
Expand Down
12 changes: 10 additions & 2 deletions src/modules/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@ export enum LiquidityRemoveType {
COMBINATION = 'COMBINATION',
}

export enum LogLevel {
NONE = '',
DEBUG = 'debug',
INFO = 'info',
WARN = 'warn',
ERROR = 'error'
}

export enum MarginBorrowRepayType {
BORROW = 'BORROW',
REPAY = 'REPAY',
Expand Down Expand Up @@ -493,8 +501,8 @@ export enum SimpleEarnStatus {

export enum SimpleEarnType {
AUTO = 'AUTO',
NORMAL ='NORMAL',
CONVERT ='CONVERT',
NORMAL = 'NORMAL',
CONVERT = 'CONVERT',
LOAN = 'LOAN',
AI = 'AI',
TRANSFER = 'TRANSFER'
Expand Down
3 changes: 2 additions & 1 deletion tests/helpers/logger.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { LogLevel, Logger } from '../../src/helpers/logger';
import { Logger } from '../../src/helpers/logger';
import { LogLevel } from '../../src/modules/enum';

describe('Logger', () => {
let logger: Logger;
Expand Down

0 comments on commit e6b6d18

Please sign in to comment.