From 685f9dcde0426b3ef738c588cf1bf2f15bef6b11 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Fri, 13 Sep 2024 15:09:35 +0100 Subject: [PATCH] fix(): import paths --- src/AdvancedTradeClient.ts | 16 ++++++++-------- src/CoinbaseAppClient.ts | 18 +++++++++--------- src/CoinbasePrime.ts | 16 ++++++++-------- src/WebsocketClient.ts | 5 +---- src/types/request/advanced-trade-client.ts | 4 ++-- src/types/response/advanced-trade-client.ts | 2 +- src/types/websockets/requests.ts | 2 +- 7 files changed, 30 insertions(+), 33 deletions(-) diff --git a/src/AdvancedTradeClient.ts b/src/AdvancedTradeClient.ts index 309eeb4..2a1ab23 100644 --- a/src/AdvancedTradeClient.ts +++ b/src/AdvancedTradeClient.ts @@ -1,5 +1,12 @@ import { AxiosRequestConfig } from 'axios'; import { nanoid } from 'nanoid'; + +import { BaseRestClient } from './lib/BaseRestClient.js'; +import { + REST_CLIENT_TYPE_ENUM, + RestClientOptions, + RestClientType, +} from './lib/requestUtils.js'; import { AllocateAdvTradePortfolioRequest, GetAdvTradeFillsRequest, @@ -15,14 +22,7 @@ import { PreviewAdvTradeOrderRequest, SubmitAdvTradeConvertQuoteRequest, SubmitAdvTradeOrderRequest, -} from 'types/request/advanced-trade-client.js'; - -import { BaseRestClient } from './lib/BaseRestClient.js'; -import { - REST_CLIENT_TYPE_ENUM, - RestClientOptions, - RestClientType, -} from './lib/requestUtils.js'; +} from './types/request/advanced-trade-client.js'; import { AdvTradeAccount, AdvTradeAccountsList, diff --git a/src/CoinbaseAppClient.ts b/src/CoinbaseAppClient.ts index a4f5146..d1540cf 100644 --- a/src/CoinbaseAppClient.ts +++ b/src/CoinbaseAppClient.ts @@ -1,25 +1,25 @@ import { AxiosRequestConfig } from 'axios'; import { nanoid } from 'nanoid'; + +import { BaseRestClient } from './lib/BaseRestClient.js'; +import { + REST_CLIENT_TYPE_ENUM, + RestClientOptions, + RestClientType, +} from './lib/requestUtils.js'; import { CBAppDepositFundsRequest, CBAppSendMoneyRequest, CBAppTransferMoneyRequest, CBAppWithdrawFundsRequest, -} from 'types/request/coinbase-app-client.js'; +} from './types/request/coinbase-app-client.js'; import { CBAppAccount, CBAppAddress, CBAppDepositWithdrawal, CBAppPagination, CBAppTransaction, -} from 'types/response/coinbase-app-client.js'; - -import { BaseRestClient } from './lib/BaseRestClient.js'; -import { - REST_CLIENT_TYPE_ENUM, - RestClientOptions, - RestClientType, -} from './lib/requestUtils.js'; +} from './types/response/coinbase-app-client.js'; /** * REST client for Coinbase's Coinbase App API: diff --git a/src/CoinbasePrime.ts b/src/CoinbasePrime.ts index 4eedc62..0661289 100644 --- a/src/CoinbasePrime.ts +++ b/src/CoinbasePrime.ts @@ -1,5 +1,12 @@ import { AxiosRequestConfig } from 'axios'; import { nanoid } from 'nanoid'; + +import { BaseRestClient } from './lib/BaseRestClient.js'; +import { + REST_CLIENT_TYPE_ENUM, + RestClientOptions, + RestClientType, +} from './lib/requestUtils.js'; import { CreatePrimeAddressBookEntryRequest, CreatePrimeConversionRequest, @@ -25,14 +32,7 @@ import { GetPrimeWalletTransactionsRequest, GetPrimeWeb3WalletBalancesRequest, SubmitPrimeOrderRequest, -} from 'types/request/coinbase-prime.js'; - -import { BaseRestClient } from './lib/BaseRestClient.js'; -import { - REST_CLIENT_TYPE_ENUM, - RestClientOptions, - RestClientType, -} from './lib/requestUtils.js'; +} from './types/request/coinbase-prime.js'; /** * REST client for Coinbase Prime API: diff --git a/src/WebsocketClient.ts b/src/WebsocketClient.ts index adc04de..7116851 100644 --- a/src/WebsocketClient.ts +++ b/src/WebsocketClient.ts @@ -9,7 +9,6 @@ import { WsTopicRequest, } from './lib/websocket/websocket-util.js'; import { WSConnectedResult } from './lib/websocket/WsStore.types.js'; -import { APISuccessResponse } from './types/shared.types.js'; import { WsMarket } from './types/websockets/client.js'; import { WsOperation, @@ -76,9 +75,7 @@ export class WebsocketClient extends BaseWebsocketClient { throw new Error(`Unhandled WsKey: "${wsKey}"`); } - private async getWSConnectionInfo( - _wsKey: WsKey, - ): Promise> { + private async getWSConnectionInfo(_wsKey: WsKey): Promise<{}> { throw new Error('not used'); } diff --git a/src/types/request/advanced-trade-client.ts b/src/types/request/advanced-trade-client.ts index 8cc430f..01ff6ca 100644 --- a/src/types/request/advanced-trade-client.ts +++ b/src/types/request/advanced-trade-client.ts @@ -1,11 +1,11 @@ -import { OrderConfiguration } from 'types/shared.types'; - /** * * Account Endpoints * */ +import { OrderConfiguration } from '../shared.types.js'; + /** * * Products Endpoints diff --git a/src/types/response/advanced-trade-client.ts b/src/types/response/advanced-trade-client.ts index 4ce0bdd..a7a285d 100644 --- a/src/types/response/advanced-trade-client.ts +++ b/src/types/response/advanced-trade-client.ts @@ -4,7 +4,7 @@ * */ -import { OrderConfiguration } from 'types/shared.types'; +import { OrderConfiguration } from '../shared.types.js'; interface Balance { value: string; diff --git a/src/types/websockets/requests.ts b/src/types/websockets/requests.ts index 1a71f67..a92b54c 100644 --- a/src/types/websockets/requests.ts +++ b/src/types/websockets/requests.ts @@ -1,4 +1,4 @@ -export type WsOperation = 'TODO:'; +export type WsOperation = 'subscribe' | 'unsubscribe'; export interface WsRequestOperation { id: number;