Skip to content

Commit 5e1c880

Browse files
feat: allow searching apporders and datasetorders by asset owner (#466)
* feat: allow searching apporders and datasetorders by asset owner * chore: deprecate fetchAppOrderbook(appAddress, options) and fetchDatasetOrderbook(datasetAddress, options) * fix: missing label
1 parent e0f2d05 commit 5e1c880

File tree

7 files changed

+575
-183
lines changed

7 files changed

+575
-183
lines changed

docs/classes/IExecOrderbookModule.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ current IExecConfig
7171

7272
### fetchAppOrderbook
7373

74-
**fetchAppOrderbook**(`appAddress`, `options?`): `Promise`<[`PaginableOrders`](../interfaces/internal_.PaginableOrders.md)<[`PublishedApporder`](../interfaces/internal_.PublishedApporder.md)\>\>
74+
**fetchAppOrderbook**(`appAddressOrOptions`, `options?`): `Promise`<[`PaginableOrders`](../interfaces/internal_.PaginableOrders.md)<[`PublishedApporder`](../interfaces/internal_.PublishedApporder.md)\>\>
7575

7676
find the cheapest orders for the specified app.
7777

@@ -88,8 +88,8 @@ console.log('total orders:', count);
8888
8989
| Name | Type | Description |
9090
| :------ | :------ | :------ |
91-
| `appAddress` | `string` | - |
92-
| `options?` | `Object` | - |
91+
| `appAddressOrOptions` | `string` \| { `app?`: `string` ; `appOwner?`: `string` ; `dataset?`: `string` ; `isDatasetStrict?`: `boolean` ; `isRequesterStrict?`: `boolean` ; `isWorkerpoolStrict?`: `boolean` ; `maxTag?`: [`Tag`](../modules.md#tag) \| `string`[] ; `minTag?`: [`Tag`](../modules.md#tag) \| `string`[] ; `minVolume?`: [`BNish`](../modules.md#bnish) ; `page?`: `number` ; `pageSize?`: `number` ; `requester?`: `string` ; `workerpool?`: `string` } | - |
92+
| `options?` | `Object` | **`Deprecated`** use first parameter instead migration: replace `fetchAppOrderbook(appAddress, options)` by `fetchAppOrderbook({ app: appAddress, ...options })` |
9393
| `options.dataset?` | `string` | include orders restricted to specified dataset (use `'any'` to include any dataset) |
9494
| `options.isDatasetStrict?` | `boolean` | filters out orders allowing “any” dataset (default: `false`) |
9595
| `options.isRequesterStrict?` | `boolean` | filters out orders allowing “any” requester (default: `false`) |
@@ -135,7 +135,7 @@ ___
135135
136136
### fetchDatasetOrderbook
137137
138-
▸ **fetchDatasetOrderbook**(`datasetAddress`, `options?`): `Promise`<[`PaginableOrders`](../interfaces/internal_.PaginableOrders.md)<[`PublishedDatasetorder`](../interfaces/internal_.PublishedDatasetorder.md)\>\>
138+
▸ **fetchDatasetOrderbook**(`datasetAddressOrOptions`, `options?`): `Promise`<[`PaginableOrders`](../interfaces/internal_.PaginableOrders.md)<[`PublishedDatasetorder`](../interfaces/internal_.PublishedDatasetorder.md)\>\>
139139
140140
find the cheapest orders for the specified dataset.
141141
@@ -152,8 +152,8 @@ console.log('total orders:', count);
152152
153153
| Name | Type | Description |
154154
| :------ | :------ | :------ |
155-
| `datasetAddress` | `string` | - |
156-
| `options?` | `Object` | - |
155+
| `datasetAddressOrOptions` | `string` \| { `app?`: `string` ; `dataset?`: `string` ; `datasetOwner?`: `string` ; `isAppStrict?`: `boolean` ; `isRequesterStrict?`: `boolean` ; `isWorkerpoolStrict?`: `boolean` ; `maxTag?`: [`Tag`](../modules.md#tag) \| `string`[] ; `minTag?`: [`Tag`](../modules.md#tag) \| `string`[] ; `minVolume?`: [`BNish`](../modules.md#bnish) ; `page?`: `number` ; `pageSize?`: `number` ; `requester?`: `string` ; `workerpool?`: `string` } | - |
156+
| `options?` | `Object` | **`Deprecated`** use first parameter instead migration: replace `fetchDatasetOrderbook(datasetAddress, options)` by `fetchDatasetOrderbook({ dataset: datasetAddress, ...options })` |
157157
| `options.app?` | `string` | include orders restricted to specified app (use `'any'` to include any app) |
158158
| `options.isAppStrict?` | `boolean` | filters out orders allowing “any” app (default: `false`) |
159159
| `options.isRequesterStrict?` | `boolean` | filters out orders allowing “any” requester (default: `false`) |

src/cli/cmd/iexec-app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,8 +775,8 @@ run
775775
const { orders } = await fetchAppOrderbook(
776776
chain.contracts,
777777
getPropertyFormChain(chain, 'iexecGateway'),
778-
app,
779778
{
779+
app,
780780
requester,
781781
...(useDataset && { dataset }),
782782
...(runOnWorkerpool && { workerpool }),
@@ -819,8 +819,8 @@ run
819819
const { orders } = await fetchDatasetOrderbook(
820820
chain.contracts,
821821
getPropertyFormChain(chain, 'iexecGateway'),
822-
dataset,
823822
{
823+
dataset,
824824
app,
825825
requester,
826826
...(runOnWorkerpool && { workerpool }),

src/cli/cmd/iexec-orderbook.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ orderbookApp
6666
const request = fetchAppOrderbook(
6767
chain.contracts,
6868
getPropertyFormChain(chain, 'iexecGateway'),
69-
app,
7069
{
70+
app,
7171
dataset,
7272
workerpool,
7373
requester,
@@ -180,8 +180,8 @@ orderbookDataset
180180
const request = fetchDatasetOrderbook(
181181
chain.contracts,
182182
getPropertyFormChain(chain, 'iexecGateway'),
183-
dataset,
184183
{
184+
dataset,
185185
app,
186186
workerpool,
187187
requester,

0 commit comments

Comments
 (0)