@oceanprotocol/lib 5.1.0 → 5.1.1

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.
@@ -4,9 +4,9 @@ export interface RunningPlatform {
4
4
  architecture: string;
5
5
  os: string;
6
6
  }
7
- export type ComputeResourceType = 'cpu' | 'memory' | 'storage';
7
+ export type ComputeResourceType = 'cpu' | 'ram' | 'disk' | 'gpu';
8
8
  export interface ComputeResourcesPricingInfo {
9
- type: ComputeResourceType;
9
+ id: string;
10
10
  price: number;
11
11
  }
12
12
  export interface ComputeEnvFees {
@@ -14,22 +14,31 @@ export interface ComputeEnvFees {
14
14
  prices: ComputeResourcesPricingInfo[];
15
15
  }
16
16
  export interface ComputeEnvFeesStructure {
17
- [chainId: string]: ComputeEnvFees;
17
+ [chainId: string]: ComputeEnvFees[];
18
18
  }
19
19
  export interface ComputeResourceRequest {
20
20
  id: string;
21
21
  amount: number;
22
22
  }
23
23
  export interface ComputeResource {
24
- id: ComputeResourceType;
25
- type?: string;
24
+ id: string;
25
+ type?: ComputeResourceType;
26
26
  kind?: string;
27
- total: number;
28
- min: number;
27
+ total?: number;
28
+ min?: number;
29
29
  max: number;
30
+ description?: string;
31
+ init?: {
32
+ [key: string]: any;
33
+ };
30
34
  inUse?: number;
31
35
  }
36
+ export interface ComputeEnvironmentAccessOptions {
37
+ addresses?: string[];
38
+ accessLists?: any;
39
+ }
32
40
  export interface ComputeEnvironmentFreeOptions {
41
+ access?: ComputeEnvironmentAccessOptions;
33
42
  storageExpiry?: number;
34
43
  maxJobDuration?: number;
35
44
  maxJobs?: number;
@@ -37,14 +46,21 @@ export interface ComputeEnvironmentFreeOptions {
37
46
  }
38
47
  export interface ComputeEnvironment {
39
48
  id: string;
40
- description: string;
49
+ description?: string;
41
50
  consumerAddress: string;
51
+ access?: ComputeEnvironmentAccessOptions;
42
52
  storageExpiry?: number;
43
53
  minJobDuration?: number;
44
54
  maxJobDuration?: number;
45
55
  maxJobs?: number;
46
56
  runningJobs: number;
47
57
  runningfreeJobs?: number;
58
+ queuedJobs?: number;
59
+ queuedFreeJobs?: number;
60
+ queMaxWaitTime?: number;
61
+ queMaxWaitTimeFree?: number;
62
+ runMaxWaitTime?: number;
63
+ runMaxWaitTimeFree?: number;
48
64
  fees: ComputeEnvFeesStructure;
49
65
  resources?: ComputeResource[];
50
66
  free?: ComputeEnvironmentFreeOptions;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oceanprotocol/lib",
3
3
  "source": "./src/index.ts",
4
- "version": "5.1.0",
4
+ "version": "5.1.1",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.cjs",
7
7
  "umd:main": "dist/lib.umd.js",