@oceanprotocol/lib 8.3.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,12 +55,14 @@ export type StorageObject = UrlFileObject | IpfsFileObject | ArweaveFileObject |
55
55
  export type PersistentStorageAccessList = AccessList;
56
56
  export interface PersistentStorageCreateBucketRequest {
57
57
  accessLists: PersistentStorageAccessList[];
58
+ label?: string;
58
59
  }
59
60
  export interface PersistentStorageBucket {
60
61
  bucketId: string;
61
62
  owner: string;
62
63
  createdAt: number;
63
64
  accessLists: PersistentStorageAccessList[];
65
+ label?: string | null;
64
66
  }
65
67
  export interface PersistentStorageFileEntry {
66
68
  bucketId: string;
@@ -71,3 +73,7 @@ export interface PersistentStorageFileEntry {
71
73
  export interface PersistentStorageDeleteFileResponse {
72
74
  success: boolean;
73
75
  }
76
+ export interface PersistentStorageUpdateBucketResponse {
77
+ bucketId: string;
78
+ label: string | null;
79
+ }
@@ -130,6 +130,7 @@ export declare const PROTOCOL_COMMANDS: {
130
130
  GET_LOGS: string;
131
131
  JOBS: string;
132
132
  PERSISTENT_STORAGE_CREATE_BUCKET: string;
133
+ PERSISTENT_STORAGE_UPDATE_BUCKET: string;
133
134
  PERSISTENT_STORAGE_GET_BUCKETS: string;
134
135
  PERSISTENT_STORAGE_LIST_FILES: string;
135
136
  PERSISTENT_STORAGE_UPLOAD_FILE: string;
@@ -1,5 +1,5 @@
1
1
  import { Signer } from 'ethers';
2
- import { StorageObject, FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ComputeResultStream, ProviderInitialize, ProviderComputeInitializeResults, ServiceEndpoint, UserCustomParameters, ComputeResourceRequest, ComputeJobMetadata, PolicyServerInitializeCommand, PolicyServerPassthroughCommand, dockerRegistryAuth, DownloadResponse, NodeStatus, NodeComputeJob, NodeLogEntry, PersistentStorageAccessList, PersistentStorageBucket, PersistentStorageCreateBucketRequest, PersistentStorageDeleteFileResponse, PersistentStorageFileEntry, PersistentStorageObject, OceanNode, CompleteSignature, SignerOrAuthTokenOrSignature } from '../../@types/index.js';
2
+ import { StorageObject, FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ComputeResultStream, ProviderInitialize, ProviderComputeInitializeResults, ServiceEndpoint, UserCustomParameters, ComputeResourceRequest, ComputeJobMetadata, PolicyServerInitializeCommand, PolicyServerPassthroughCommand, dockerRegistryAuth, DownloadResponse, NodeStatus, NodeComputeJob, NodeLogEntry, PersistentStorageAccessList, PersistentStorageBucket, PersistentStorageCreateBucketRequest, PersistentStorageDeleteFileResponse, PersistentStorageFileEntry, PersistentStorageObject, PersistentStorageUpdateBucketResponse, OceanNode, CompleteSignature, SignerOrAuthTokenOrSignature } from '../../@types/index.js';
3
3
  import { type DDO, type ValidateMetadata } from '@oceanprotocol/ddo-js';
4
4
  import { P2pProvider, type P2PConfig, type P2PRequestBodyStream } from './P2pProvider.js';
5
5
  export { OCEAN_P2P_PROTOCOL, type P2PConfig } from './P2pProvider.js';
@@ -52,7 +52,9 @@ export declare class BaseProvider {
52
52
  bucketId: string;
53
53
  owner: string;
54
54
  accessList: PersistentStorageAccessList[];
55
+ label?: string | null;
55
56
  }>;
57
+ updatePersistentStorageBucket(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, label: string | null, signal?: AbortSignal): Promise<PersistentStorageUpdateBucketResponse>;
56
58
  getPersistentStorageBuckets(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, owner: string, signal?: AbortSignal): Promise<PersistentStorageBucket[]>;
57
59
  listPersistentStorageFiles(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, signal?: AbortSignal): Promise<PersistentStorageFileEntry[]>;
58
60
  getPersistentStorageFileObject(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, fileName: string, signal?: AbortSignal): Promise<PersistentStorageObject>;
@@ -1,5 +1,5 @@
1
1
  import { Signer } from 'ethers';
2
- import { StorageObject, FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ProviderInitialize, ProviderComputeInitializeResults, ServiceEndpoint, UserCustomParameters, ComputeResourceRequest, ComputeJobMetadata, PolicyServerInitializeCommand, PolicyServerPassthroughCommand, dockerRegistryAuth, ComputeResultStream, NodeStatus, NodeComputeJob, NodeLogEntry, PersistentStorageAccessList, PersistentStorageBucket, PersistentStorageCreateBucketRequest, PersistentStorageDeleteFileResponse, PersistentStorageFileEntry, PersistentStorageObject, SignerOrAuthTokenOrSignature } from '../../@types/index.js';
2
+ import { StorageObject, FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ProviderInitialize, ProviderComputeInitializeResults, ServiceEndpoint, UserCustomParameters, ComputeResourceRequest, ComputeJobMetadata, PolicyServerInitializeCommand, PolicyServerPassthroughCommand, dockerRegistryAuth, ComputeResultStream, NodeStatus, NodeComputeJob, NodeLogEntry, PersistentStorageAccessList, PersistentStorageBucket, PersistentStorageCreateBucketRequest, PersistentStorageDeleteFileResponse, PersistentStorageFileEntry, PersistentStorageObject, PersistentStorageUpdateBucketResponse, SignerOrAuthTokenOrSignature } from '../../@types/index.js';
3
3
  import { type DDO, type ValidateMetadata } from '@oceanprotocol/ddo-js';
4
4
  import { type P2PRequestBodyStream } from './P2pProvider.js';
5
5
  export declare class HttpProvider {
@@ -250,10 +250,12 @@ export declare class HttpProvider {
250
250
  bucketId: string;
251
251
  owner: string;
252
252
  accessList: PersistentStorageAccessList[];
253
+ label?: string | null;
253
254
  }>;
254
255
  getPersistentStorageBuckets(nodeUri: string, signerOrAuthToken: SignerOrAuthTokenOrSignature, owner: string, signal?: AbortSignal): Promise<PersistentStorageBucket[]>;
255
256
  listPersistentStorageFiles(nodeUri: string, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, signal?: AbortSignal): Promise<PersistentStorageFileEntry[]>;
256
257
  getPersistentStorageFileObject(nodeUri: string, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, fileName: string, signal?: AbortSignal): Promise<PersistentStorageObject>;
257
258
  uploadPersistentStorageFile(nodeUri: string, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, fileName: string, content: P2PRequestBodyStream, signal?: AbortSignal): Promise<PersistentStorageFileEntry>;
258
259
  deletePersistentStorageFile(nodeUri: string, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, fileName: string, signal?: AbortSignal): Promise<PersistentStorageDeleteFileResponse>;
260
+ updatePersistentStorageBucket(nodeUri: string, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, label: string | null, signal?: AbortSignal): Promise<PersistentStorageUpdateBucketResponse>;
259
261
  }
@@ -1,6 +1,6 @@
1
1
  import { type Libp2p, type Libp2pOptions } from 'libp2p';
2
2
  import { Signer } from 'ethers';
3
- import { StorageObject, FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ProviderInitialize, ProviderComputeInitializeResults, UserCustomParameters, ComputeResourceRequest, ComputeJobMetadata, PolicyServerInitializeCommand, PolicyServerPassthroughCommand, dockerRegistryAuth, DownloadResponse, ComputeResultStream, NodeStatus, NodeComputeJob, PersistentStorageAccessList, PersistentStorageBucket, PersistentStorageCreateBucketRequest, PersistentStorageDeleteFileResponse, PersistentStorageFileEntry, PersistentStorageObject, OceanNode, SignerOrAuthTokenOrSignature } from '../../@types/index.js';
3
+ import { StorageObject, FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ProviderInitialize, ProviderComputeInitializeResults, UserCustomParameters, ComputeResourceRequest, ComputeJobMetadata, PolicyServerInitializeCommand, PolicyServerPassthroughCommand, dockerRegistryAuth, DownloadResponse, ComputeResultStream, NodeStatus, NodeComputeJob, PersistentStorageAccessList, PersistentStorageBucket, PersistentStorageCreateBucketRequest, PersistentStorageDeleteFileResponse, PersistentStorageFileEntry, PersistentStorageObject, PersistentStorageUpdateBucketResponse, OceanNode, SignerOrAuthTokenOrSignature } from '../../@types/index.js';
4
4
  import { NodeLogEntry } from '../../@types/Provider.js';
5
5
  import { type DDO, type ValidateMetadata } from '@oceanprotocol/ddo-js';
6
6
  import { CID } from 'multiformats/cid';
@@ -202,12 +202,13 @@ export declare class P2pProvider {
202
202
  * the caller is responsible for nonce retrieval and signing.
203
203
  */
204
204
  pushConfig(nodeUri: OceanNode, payload: Record<string, any>): Promise<any>;
205
- private getPersistentStorageSignaturePayload;
206
205
  createPersistentStorageBucket(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, payload: PersistentStorageCreateBucketRequest, signal?: AbortSignal): Promise<{
207
206
  bucketId: string;
208
207
  owner: string;
209
208
  accessList: PersistentStorageAccessList[];
209
+ label?: string | null;
210
210
  }>;
211
+ updatePersistentStorageBucket(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, label: string | null, signal?: AbortSignal): Promise<PersistentStorageUpdateBucketResponse>;
211
212
  getPersistentStorageBuckets(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, owner: string, signal?: AbortSignal): Promise<PersistentStorageBucket[]>;
212
213
  listPersistentStorageFiles(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, signal?: AbortSignal): Promise<PersistentStorageFileEntry[]>;
213
214
  getPersistentStorageFileObject(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, bucketId: string, fileName: string, signal?: AbortSignal): Promise<PersistentStorageObject>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oceanprotocol/lib",
3
3
  "source": "./src/index.ts",
4
- "version": "8.3.0",
4
+ "version": "8.4.0",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.cjs",
7
7
  "umd:main": "dist/lib.umd.js",