1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

wip: update to support agreementId

This commit is contained in:
paulo-ocean 2024-06-21 15:20:41 +01:00
parent 1f4e4336dd
commit 9d582082f0
4 changed files with 9 additions and 9 deletions

View File

@ -128,9 +128,9 @@ ___
### computeStatus
**computeStatus**(`providerUri`, `consumerAddress`, `jobId?`, `did?`, `signal?`): `Promise`<[`ComputeJob`](../interfaces/ComputeJob.md) \| [`ComputeJob`](../interfaces/ComputeJob.md)[]\>
**computeStatus**(`providerUri`, `consumerAddress`, `jobId?`, `agreementId?`, `signal?`): `Promise`<[`ComputeJob`](../interfaces/ComputeJob.md) \| [`ComputeJob`](../interfaces/ComputeJob.md)[]\>
Get compute status for a specific jobId/documentId/owner.
Get compute status for a specific jobId/agreementId/owner.
#### Parameters
@ -139,7 +139,7 @@ Get compute status for a specific jobId/documentId/owner.
| `providerUri` | `string` | The URI of the provider we want to query |
| `consumerAddress` | `string` | The consumer ethereum address |
| `jobId?` | `string` | The ID of a compute job. |
| `did?` | `string` | The ID of the asset |
| `agreementId?` | `string` | The ID of service agreement |
| `signal?` | `AbortSignal` | abort signal |
#### Returns

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@oceanprotocol/lib",
"version": "3.3.1",
"version": "3.3.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@oceanprotocol/lib",
"version": "3.3.1",
"version": "3.3.2",
"license": "Apache-2.0",
"dependencies": {
"@oceanprotocol/contracts": "^2.0.3",

View File

@ -1,7 +1,7 @@
{
"name": "@oceanprotocol/lib",
"source": "./src/index.ts",
"version": "3.3.1",
"version": "3.3.2",
"description": "JavaScript client library for Ocean Protocol",
"main": "./dist/lib.js",
"umd:main": "dist/lib.umd.js",

View File

@ -685,7 +685,7 @@ export class Provider {
* @param {string} providerUri The URI of the provider we want to query
* @param {string} consumerAddress The consumer ethereum address
* @param {string} jobId The ID of a compute job.
* @param {string} did The ID of the asset
* @param {string} agreementId The ID of the service agreement (tx id)
* @param {AbortSignal} signal abort signal
* @return {Promise<ComputeJob | ComputeJob[]>}
*/
@ -693,7 +693,7 @@ export class Provider {
providerUri: string,
consumerAddress: string,
jobId?: string,
did?: string,
agreementId?: string,
signal?: AbortSignal
): Promise<ComputeJob | ComputeJob[]> {
const providerEndpoints = await this.getEndpoints(providerUri)
@ -706,7 +706,7 @@ export class Provider {
: null
let url = `?consumerAddress=${consumerAddress}`
url += (did && `&documentId=${this.noZeroX(did)}`) || ''
url += (agreementId && `&agreementId=${this.noZeroX(agreementId)}`) || ''
url += (jobId && `&jobId=${jobId}`) || ''
if (!computeStatusUrl) return null