Skip to content

Commit

Permalink
include missing method
Browse files Browse the repository at this point in the history
  • Loading branch information
mdymalla committed Oct 2, 2024
1 parent b14a0b9 commit b72039e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/orderbook/src/api-client/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
CollectionBidResult,
Fee,
ListBidsResult,
ListCollectionBidsResult,
ListingResult,
ListListingsResult,
ListTradeResult,
Expand Down Expand Up @@ -98,7 +99,7 @@ export class ImmutableApiClient {

async listCollectionBids(
listOrderParams: ListCollectionBidsParams,
): Promise<ListBidsResult> {
): Promise<ListCollectionBidsResult> {
return this.orderbookService.listCollectionBids({
chainName: this.chainName,
...listOrderParams,
Expand Down
18 changes: 18 additions & 0 deletions packages/orderbook/src/orderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import {
FulfillOrderResponse,
ListBidsParams,
ListBidsResult,
ListCollectionBidsParams,
ListCollectionBidsResult,
ListingResult,
ListListingsParams,
ListListingsResult,
Expand Down Expand Up @@ -209,6 +211,22 @@ export class Orderbook {
};
}

/**
* List collection bids. This method is used to get a list of collection bids filtered
* by conditions specified in the params object.
* @param {ListCollectionBidsParams} listOrderParams - Filtering, ordering and page parameters.
* @return {ListCollectionBidsResult} The paged collection bids.
*/
async listCollectionBids(
listOrderParams: ListCollectionBidsParams,
): Promise<ListCollectionBidsResult> {
const apiCollectionBids = await this.apiClient.listCollectionBids(listOrderParams);
return {
page: mapFromOpenApiPage(apiCollectionBids.page),
result: apiCollectionBids.result.map(mapCollectionBidFromOpenApiOrder),
};
}

/**
* List trades. This method is used to get a list of trades filtered by conditions specified
* in the params object
Expand Down

0 comments on commit b72039e

Please sign in to comment.