Skip to content

Commit

Permalink
Remove Client type
Browse files Browse the repository at this point in the history
  • Loading branch information
fragosti committed Sep 27, 2019
1 parent 5b0fc81 commit 8761502
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
4 changes: 2 additions & 2 deletions packages/connect/src/http_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { fetchAsync } from '@0x/utils';
import * as _ from 'lodash';
import * as queryString from 'query-string';

import { Client, HttpRequestOptions, HttpRequestType } from './types';
import { HttpRequestOptions, HttpRequestType } from './types';
import { relayerResponseJsonParsers } from './utils/relayer_response_json_parsers';

const TRAILING_SLASHES_REGEX = /\/+$/;
Expand All @@ -28,7 +28,7 @@ const TRAILING_SLASHES_REGEX = /\/+$/;
* This class includes all the functionality related to interacting with a set of HTTP endpoints
* that implement the standard relayer API v2
*/
export class HttpClient implements Client {
export class HttpClient {
private readonly _apiEndpointUrl: string;
/**
* Format parameters to be appended to http requests into query string form
Expand Down
2 changes: 1 addition & 1 deletion packages/connect/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { HttpClient } from './http_client';
export { ordersChannelFactory } from './orders_channel_factory';
export { Client, OrdersChannel, OrdersChannelHandler } from './types';
export { OrdersChannel, OrdersChannelHandler } from './types';
export {
APIOrder,
AssetPairsRequestOpts,
Expand Down
13 changes: 1 addition & 12 deletions packages/connect/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,10 @@ import {
OrdersRequestOpts,
PagedRequestOpts,
PaginatedCollection,
RequestOpts,
SignedOrder,
} from '@0x/types';

export interface Client {
getAssetPairsAsync: (
requestOpts?: AssetPairsRequestOpts & PagedRequestOpts,
) => Promise<PaginatedCollection<AssetPairsItem>>;
getOrdersAsync: (requestOpts?: OrdersRequestOpts & PagedRequestOpts) => Promise<PaginatedCollection<APIOrder>>;
getOrderAsync: (orderHash: string) => Promise<APIOrder>;
getOrderbookAsync: (request: OrderbookRequest, requestOpts?: PagedRequestOpts) => Promise<OrderbookResponse>;
getOrderConfigAsync: (request: OrderConfigRequest) => Promise<OrderConfigResponse>;
getFeeRecipientsAsync: (requestOpts?: PagedRequestOpts) => Promise<FeeRecipientsResponse>;
submitOrderAsync: (signedOrder: SignedOrder) => Promise<void>;
}

export interface OrdersChannel {
subscribe: (subscriptionOpts: OrdersChannelSubscriptionOpts) => void;
close: () => void;
Expand Down

0 comments on commit 8761502

Please sign in to comment.