@oceanprotocol/lib 9.0.0-next.3 → 9.0.0-next.4
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.
- package/dist/lib.cjs +3 -3
- package/dist/lib.module.mjs +3 -3
- package/dist/lib.umd.js +3 -3
- package/dist/types/@types/Provider.d.ts +1 -0
- package/dist/types/@types/Services.d.ts +6 -0
- package/dist/types/services/providers/BaseProvider.d.ts +2 -1
- package/dist/types/services/providers/HttpProvider.d.ts +9 -1
- package/dist/types/services/providers/P2pProvider.d.ts +8 -1
- package/package.json +1 -1
|
@@ -84,6 +84,12 @@ export interface ServiceJob {
|
|
|
84
84
|
payment: ServiceJobPayment;
|
|
85
85
|
extendPayments?: ServiceJobPayment[];
|
|
86
86
|
}
|
|
87
|
+
export type ServiceJobListed = Omit<ServiceJob, 'dockerCmd' | 'dockerEntrypoint' | 'dockerfile' | 'additionalDockerFiles'>;
|
|
88
|
+
export interface ServiceListFilters {
|
|
89
|
+
status?: ServiceStatusNumber;
|
|
90
|
+
includeAllStatuses?: boolean;
|
|
91
|
+
fromTimestamp?: string;
|
|
92
|
+
}
|
|
87
93
|
export interface ServicePayment {
|
|
88
94
|
chainId: number;
|
|
89
95
|
token: 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, PersistentStorageUpdateBucketResponse, ServiceJob, ServiceTemplatePublic, ServiceStartParams, ServiceUserData, ServicePayment, 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, ServiceJob, ServiceJobListed, ServiceListFilters, ServiceTemplatePublic, ServiceStartParams, ServiceUserData, ServicePayment, 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';
|
|
@@ -79,6 +79,7 @@ export declare class BaseProvider {
|
|
|
79
79
|
serviceExtend(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, serviceId: string, additionalDuration: number, payment: ServicePayment, signal?: AbortSignal): Promise<ServiceJob[]>;
|
|
80
80
|
serviceRestart(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, serviceId: string, userData?: ServiceUserData, dockerCmd?: string[], dockerEntrypoint?: string[], signal?: AbortSignal): Promise<ServiceJob[]>;
|
|
81
81
|
getServiceStatus(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, serviceId?: string, signal?: AbortSignal): Promise<ServiceJob[]>;
|
|
82
|
+
getServices(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, filters?: ServiceListFilters, signal?: AbortSignal): Promise<ServiceJobListed[]>;
|
|
82
83
|
serviceGetStreamableLogs(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, serviceId: string, since?: string, signal?: AbortSignal): Promise<any>;
|
|
83
84
|
fetchConfig(nodeUri: OceanNode, payload: Record<string, any>): Promise<any>;
|
|
84
85
|
pushConfig(nodeUri: OceanNode, payload: Record<string, any>): Promise<any>;
|
|
@@ -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, PersistentStorageUpdateBucketResponse, ServiceJob, ServiceTemplatePublic, ServiceStartParams, ServiceUserData, ServicePayment, 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, ServiceJob, ServiceJobListed, ServiceListFilters, ServiceTemplatePublic, ServiceStartParams, ServiceUserData, ServicePayment, 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 {
|
|
@@ -304,5 +304,13 @@ export declare class HttpProvider {
|
|
|
304
304
|
* @return {Promise<ServiceJob[]>} The matching service jobs.
|
|
305
305
|
*/
|
|
306
306
|
getServiceStatus(nodeUri: string, signerOrAuthToken: SignerOrAuthTokenOrSignature, serviceId?: string, signal?: AbortSignal): Promise<ServiceJob[]>;
|
|
307
|
+
/**
|
|
308
|
+
* Node-wide service listing (SERVICE_LIST). Authenticated but NOT owner-scoped: any
|
|
309
|
+
* consumer identity sees every owner's services, listing-sanitized (no userData, no
|
|
310
|
+
* dockerCmd/dockerEntrypoint, no Dockerfile). Default (no filters) returns only the
|
|
311
|
+
* services currently holding a resource reservation; see ServiceListFilters.
|
|
312
|
+
* @return {Promise<ServiceJobListed[]>} The matching service jobs.
|
|
313
|
+
*/
|
|
314
|
+
getServices(nodeUri: string, signerOrAuthToken: SignerOrAuthTokenOrSignature, filters?: ServiceListFilters, signal?: AbortSignal): Promise<ServiceJobListed[]>;
|
|
307
315
|
serviceGetStreamableLogs(nodeUri: string, signerOrAuthToken: SignerOrAuthTokenOrSignature, serviceId: string, since?: string, signal?: AbortSignal): Promise<any>;
|
|
308
316
|
}
|
|
@@ -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, PersistentStorageUpdateBucketResponse, ServiceJob, ServiceTemplatePublic, ServiceStartParams, ServiceUserData, ServicePayment, 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, ServiceJob, ServiceJobListed, ServiceListFilters, ServiceTemplatePublic, ServiceStartParams, ServiceUserData, ServicePayment, 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';
|
|
@@ -220,6 +220,13 @@ export declare class P2pProvider {
|
|
|
220
220
|
serviceExtend(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, serviceId: string, additionalDuration: number, payment: ServicePayment, signal?: AbortSignal): Promise<ServiceJob[]>;
|
|
221
221
|
serviceRestart(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, serviceId: string, userData?: ServiceUserData, dockerCmd?: string[], dockerEntrypoint?: string[], signal?: AbortSignal): Promise<ServiceJob[]>;
|
|
222
222
|
getServiceStatus(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, serviceId?: string, signal?: AbortSignal): Promise<ServiceJob[]>;
|
|
223
|
+
/**
|
|
224
|
+
* Node-wide service listing (SERVICE_LIST) via P2P. Authenticated but NOT owner-scoped:
|
|
225
|
+
* any consumer identity sees every owner's services, listing-sanitized (no userData, no
|
|
226
|
+
* dockerCmd/dockerEntrypoint, no Dockerfile). Default (no filters) returns only the
|
|
227
|
+
* services currently holding a resource reservation; see ServiceListFilters.
|
|
228
|
+
*/
|
|
229
|
+
getServices(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, filters?: ServiceListFilters, signal?: AbortSignal): Promise<ServiceJobListed[]>;
|
|
223
230
|
/**
|
|
224
231
|
* Stream a running service's container logs via P2P. `since` optionally bounds the lower time
|
|
225
232
|
* (Unix seconds, or a relative duration like '30s'/'2h'); omit for the full history then live.
|
package/package.json
CHANGED