@elaraai/e3-types 0.0.2-beta.5 → 0.0.2-beta.50
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/README.md +7 -4
- package/dist/src/api.d.ts +1111 -0
- package/dist/src/api.d.ts.map +1 -0
- package/dist/src/api.js +650 -0
- package/dist/src/api.js.map +1 -0
- package/dist/src/constants.d.ts +12 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +12 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/dataflow.d.ts +574 -0
- package/dist/src/dataflow.d.ts.map +1 -0
- package/dist/src/dataflow.js +366 -0
- package/dist/src/dataflow.js.map +1 -0
- package/dist/src/dataset-ref.d.ts +86 -0
- package/dist/src/dataset-ref.d.ts.map +1 -0
- package/dist/src/dataset-ref.js +82 -0
- package/dist/src/dataset-ref.js.map +1 -0
- package/dist/src/dataset.d.ts +4 -4
- package/dist/src/execution.d.ts +29 -21
- package/dist/src/execution.d.ts.map +1 -1
- package/dist/src/execution.js +8 -0
- package/dist/src/execution.js.map +1 -1
- package/dist/src/index.d.ts +7 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +39 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lock.d.ts +85 -0
- package/dist/src/lock.d.ts.map +1 -0
- package/dist/src/lock.js +71 -0
- package/dist/src/lock.js.map +1 -0
- package/dist/src/package.d.ts +235 -134
- package/dist/src/package.d.ts.map +1 -1
- package/dist/src/package.js +53 -23
- package/dist/src/package.js.map +1 -1
- package/dist/src/structure.d.ts +87 -73
- package/dist/src/structure.d.ts.map +1 -1
- package/dist/src/structure.js +8 -3
- package/dist/src/structure.js.map +1 -1
- package/dist/src/task.d.ts +5 -5
- package/dist/src/transfer.d.ts +52 -0
- package/dist/src/transfer.d.ts.map +1 -0
- package/dist/src/transfer.js +49 -0
- package/dist/src/transfer.js.map +1 -0
- package/dist/src/workspace.d.ts +7 -9
- package/dist/src/workspace.d.ts.map +1 -1
- package/dist/src/workspace.js +3 -5
- package/dist/src/workspace.js.map +1 -1
- package/package.json +2 -2
- package/src/api.ts +760 -0
- package/src/constants.ts +12 -0
- package/src/dataflow.ts +427 -0
- package/src/dataset-ref.ts +91 -0
- package/src/execution.ts +8 -0
- package/src/index.ts +183 -0
- package/src/lock.ts +90 -0
- package/src/package.ts +72 -23
- package/src/structure.ts +8 -3
- package/src/transfer.ts +56 -0
- package/src/workspace.ts +3 -5
package/dist/src/package.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* - **Structure**: The shape of the data tree
|
|
14
14
|
* - **Task**: A computation with input/output paths (stored separately)
|
|
15
15
|
*/
|
|
16
|
-
import { StructType, StringType, DictType, ValueTypeOf } from '@elaraai/east';
|
|
16
|
+
import { StructType, StringType, IntegerType, VariantType, NullType, DictType, ValueTypeOf } from '@elaraai/east';
|
|
17
17
|
/**
|
|
18
18
|
* Data configuration in a package.
|
|
19
19
|
*
|
|
@@ -22,112 +22,122 @@ import { StructType, StringType, DictType, ValueTypeOf } from '@elaraai/east';
|
|
|
22
22
|
*
|
|
23
23
|
* @remarks
|
|
24
24
|
* - `structure`: Defines which paths are datasets vs trees (recursive)
|
|
25
|
-
* - `
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* const data: PackageData = {
|
|
30
|
-
* structure: variant('struct', new Map([
|
|
31
|
-
* ['inputs', variant('struct', new Map([
|
|
32
|
-
* ['sales', variant('value', variant('Array', variant('Integer', null)))],
|
|
33
|
-
* ]))],
|
|
34
|
-
* ['tasks', variant('struct', new Map([
|
|
35
|
-
* ['process', variant('struct', new Map([
|
|
36
|
-
* ['function_ir', variant('value', ...)],
|
|
37
|
-
* ['output', variant('value', variant('Integer', null))],
|
|
38
|
-
* ]))],
|
|
39
|
-
* ]))],
|
|
40
|
-
* ])),
|
|
41
|
-
* value: 'abc123...', // Hash of initial tree
|
|
42
|
-
* };
|
|
43
|
-
* ```
|
|
25
|
+
* - `refs`: Per-dataset refs mapping refPath to DatasetRef (replaces old root tree hash)
|
|
44
26
|
*/
|
|
45
27
|
export declare const PackageDataType: StructType<{
|
|
46
28
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
47
|
-
structure: import("@elaraai/east").RecursiveType<
|
|
48
|
-
value:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
29
|
+
readonly structure: import("@elaraai/east").RecursiveType<VariantType<{
|
|
30
|
+
readonly value: StructType<{
|
|
31
|
+
readonly type: import("@elaraai/east").RecursiveType<VariantType<{
|
|
32
|
+
readonly Never: NullType;
|
|
33
|
+
readonly Null: NullType;
|
|
34
|
+
readonly Boolean: NullType;
|
|
35
|
+
readonly Integer: NullType;
|
|
36
|
+
readonly Float: NullType;
|
|
37
|
+
readonly String: NullType;
|
|
38
|
+
readonly DateTime: NullType;
|
|
39
|
+
readonly Blob: NullType;
|
|
40
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
41
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
42
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
43
|
+
readonly Dict: StructType<{
|
|
44
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
45
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
46
|
+
}>;
|
|
47
|
+
readonly Struct: import("@elaraai/east").ArrayType<StructType<{
|
|
48
|
+
readonly name: StringType;
|
|
49
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
50
|
+
}>>;
|
|
51
|
+
readonly Variant: import("@elaraai/east").ArrayType<StructType<{
|
|
52
|
+
readonly name: StringType;
|
|
53
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
54
|
+
}>>;
|
|
55
|
+
readonly Recursive: IntegerType;
|
|
56
|
+
readonly Function: StructType<{
|
|
57
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
58
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
59
|
+
}>;
|
|
60
|
+
readonly AsyncFunction: StructType<{
|
|
61
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
62
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
63
|
+
}>;
|
|
64
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
65
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
71
66
|
}>>;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
67
|
+
readonly writable: import("@elaraai/east").BooleanType;
|
|
68
|
+
}>;
|
|
69
|
+
readonly struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
70
|
+
}>>;
|
|
71
|
+
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
72
|
+
readonly refs: DictType<StringType, VariantType<{
|
|
73
|
+
readonly unassigned: NullType;
|
|
74
|
+
readonly null: StructType<{
|
|
75
|
+
readonly versions: DictType<StringType, StringType>;
|
|
76
|
+
}>;
|
|
77
|
+
readonly value: StructType<{
|
|
78
|
+
readonly hash: StringType;
|
|
79
|
+
readonly versions: DictType<StringType, StringType>;
|
|
80
|
+
}>;
|
|
83
81
|
}>>;
|
|
84
|
-
/** Hash of the root tree object containing initial/default values */
|
|
85
|
-
value: StringType;
|
|
86
82
|
}>;
|
|
87
83
|
export type PackageDataType = typeof PackageDataType;
|
|
88
84
|
export type PackageData = ValueTypeOf<typeof PackageDataType>;
|
|
89
85
|
/** @deprecated Use PackageDataType instead */
|
|
90
86
|
export declare const PackageDatasetsType: StructType<{
|
|
91
87
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
92
|
-
structure: import("@elaraai/east").RecursiveType<
|
|
93
|
-
value:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
88
|
+
readonly structure: import("@elaraai/east").RecursiveType<VariantType<{
|
|
89
|
+
readonly value: StructType<{
|
|
90
|
+
readonly type: import("@elaraai/east").RecursiveType<VariantType<{
|
|
91
|
+
readonly Never: NullType;
|
|
92
|
+
readonly Null: NullType;
|
|
93
|
+
readonly Boolean: NullType;
|
|
94
|
+
readonly Integer: NullType;
|
|
95
|
+
readonly Float: NullType;
|
|
96
|
+
readonly String: NullType;
|
|
97
|
+
readonly DateTime: NullType;
|
|
98
|
+
readonly Blob: NullType;
|
|
99
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
100
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
101
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
102
|
+
readonly Dict: StructType<{
|
|
103
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
104
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
105
|
+
}>;
|
|
106
|
+
readonly Struct: import("@elaraai/east").ArrayType<StructType<{
|
|
107
|
+
readonly name: StringType;
|
|
108
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
109
|
+
}>>;
|
|
110
|
+
readonly Variant: import("@elaraai/east").ArrayType<StructType<{
|
|
111
|
+
readonly name: StringType;
|
|
112
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
113
|
+
}>>;
|
|
114
|
+
readonly Recursive: IntegerType;
|
|
115
|
+
readonly Function: StructType<{
|
|
116
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
117
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
118
|
+
}>;
|
|
119
|
+
readonly AsyncFunction: StructType<{
|
|
120
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
121
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
122
|
+
}>;
|
|
123
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
124
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
116
125
|
}>>;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
126
|
+
readonly writable: import("@elaraai/east").BooleanType;
|
|
127
|
+
}>;
|
|
128
|
+
readonly struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
129
|
+
}>>;
|
|
130
|
+
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
131
|
+
readonly refs: DictType<StringType, VariantType<{
|
|
132
|
+
readonly unassigned: NullType;
|
|
133
|
+
readonly null: StructType<{
|
|
134
|
+
readonly versions: DictType<StringType, StringType>;
|
|
135
|
+
}>;
|
|
136
|
+
readonly value: StructType<{
|
|
137
|
+
readonly hash: StringType;
|
|
138
|
+
readonly versions: DictType<StringType, StringType>;
|
|
139
|
+
}>;
|
|
128
140
|
}>>;
|
|
129
|
-
/** Hash of the root tree object containing initial/default values */
|
|
130
|
-
value: StringType;
|
|
131
141
|
}>;
|
|
132
142
|
/** @deprecated Use PackageData instead */
|
|
133
143
|
export type PackageDatasetsType = PackageDataType;
|
|
@@ -153,58 +163,149 @@ export type PackageDatasets = PackageData;
|
|
|
153
163
|
* tasks: new Map([['process', 'abc123...']]), // hash of TaskObject
|
|
154
164
|
* data: {
|
|
155
165
|
* structure: variant('struct', new Map([...])),
|
|
156
|
-
* value: 'def456...',
|
|
166
|
+
* refs: new Map([['inputs/sales', variant('value', { hash: 'def456...', versions: new Map() })]]),
|
|
157
167
|
* },
|
|
158
168
|
* };
|
|
159
169
|
* ```
|
|
160
170
|
*/
|
|
161
171
|
export declare const PackageObjectType: StructType<{
|
|
162
172
|
/** Tasks defined in this package: name -> task object hash */
|
|
163
|
-
tasks: DictType<StringType, StringType>;
|
|
173
|
+
readonly tasks: DictType<StringType, StringType>;
|
|
164
174
|
/** Data structure and initial values */
|
|
165
|
-
data: StructType<{
|
|
175
|
+
readonly data: StructType<{
|
|
166
176
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
167
|
-
structure: import("@elaraai/east").RecursiveType<
|
|
168
|
-
value:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
177
|
+
readonly structure: import("@elaraai/east").RecursiveType<VariantType<{
|
|
178
|
+
readonly value: StructType<{
|
|
179
|
+
readonly type: import("@elaraai/east").RecursiveType<VariantType<{
|
|
180
|
+
readonly Never: NullType;
|
|
181
|
+
readonly Null: NullType;
|
|
182
|
+
readonly Boolean: NullType;
|
|
183
|
+
readonly Integer: NullType;
|
|
184
|
+
readonly Float: NullType;
|
|
185
|
+
readonly String: NullType;
|
|
186
|
+
readonly DateTime: NullType;
|
|
187
|
+
readonly Blob: NullType;
|
|
188
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
189
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
190
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
191
|
+
readonly Dict: StructType<{
|
|
192
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
193
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
194
|
+
}>;
|
|
195
|
+
readonly Struct: import("@elaraai/east").ArrayType<StructType<{
|
|
196
|
+
readonly name: StringType;
|
|
197
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
198
|
+
}>>;
|
|
199
|
+
readonly Variant: import("@elaraai/east").ArrayType<StructType<{
|
|
200
|
+
readonly name: StringType;
|
|
201
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
202
|
+
}>>;
|
|
203
|
+
readonly Recursive: IntegerType;
|
|
204
|
+
readonly Function: StructType<{
|
|
205
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
206
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
207
|
+
}>;
|
|
208
|
+
readonly AsyncFunction: StructType<{
|
|
209
|
+
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
210
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
211
|
+
}>;
|
|
212
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
213
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
191
214
|
}>>;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
215
|
+
readonly writable: import("@elaraai/east").BooleanType;
|
|
216
|
+
}>;
|
|
217
|
+
readonly struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
218
|
+
}>>;
|
|
219
|
+
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
220
|
+
readonly refs: DictType<StringType, VariantType<{
|
|
221
|
+
readonly unassigned: NullType;
|
|
222
|
+
readonly null: StructType<{
|
|
223
|
+
readonly versions: DictType<StringType, StringType>;
|
|
224
|
+
}>;
|
|
225
|
+
readonly value: StructType<{
|
|
226
|
+
readonly hash: StringType;
|
|
227
|
+
readonly versions: DictType<StringType, StringType>;
|
|
228
|
+
}>;
|
|
203
229
|
}>>;
|
|
204
|
-
/** Hash of the root tree object containing initial/default values */
|
|
205
|
-
value: StringType;
|
|
206
230
|
}>;
|
|
207
231
|
}>;
|
|
208
232
|
export type PackageObjectType = typeof PackageObjectType;
|
|
209
233
|
export type PackageObject = ValueTypeOf<typeof PackageObjectType>;
|
|
234
|
+
export declare const PackageTransferInitRequestType: StructType<{
|
|
235
|
+
readonly size: IntegerType;
|
|
236
|
+
}>;
|
|
237
|
+
export type PackageTransferInitRequest = ValueTypeOf<typeof PackageTransferInitRequestType>;
|
|
238
|
+
export declare const PackageTransferInitResponseType: StructType<{
|
|
239
|
+
readonly id: StringType;
|
|
240
|
+
readonly uploadUrl: StringType;
|
|
241
|
+
}>;
|
|
242
|
+
export type PackageTransferInitResponse = ValueTypeOf<typeof PackageTransferInitResponseType>;
|
|
243
|
+
export declare const PackageJobResponseType: StructType<{
|
|
244
|
+
readonly id: StringType;
|
|
245
|
+
}>;
|
|
246
|
+
export type PackageJobResponse = ValueTypeOf<typeof PackageJobResponseType>;
|
|
247
|
+
export declare const PackageImportResultType: StructType<{
|
|
248
|
+
readonly name: StringType;
|
|
249
|
+
readonly version: StringType;
|
|
250
|
+
readonly packageHash: StringType;
|
|
251
|
+
readonly objectCount: IntegerType;
|
|
252
|
+
}>;
|
|
253
|
+
export type PackageImportResult = ValueTypeOf<typeof PackageImportResultType>;
|
|
254
|
+
export declare const PackageExportResultType: StructType<{
|
|
255
|
+
readonly downloadUrl: StringType;
|
|
256
|
+
readonly size: IntegerType;
|
|
257
|
+
}>;
|
|
258
|
+
export type PackageExportResult = ValueTypeOf<typeof PackageExportResultType>;
|
|
259
|
+
export declare const PackageImportProgressType: VariantType<{
|
|
260
|
+
readonly pending: NullType;
|
|
261
|
+
readonly downloading: NullType;
|
|
262
|
+
readonly importing: StructType<{
|
|
263
|
+
readonly objectsProcessed: IntegerType;
|
|
264
|
+
}>;
|
|
265
|
+
}>;
|
|
266
|
+
export type PackageImportProgress = ValueTypeOf<typeof PackageImportProgressType>;
|
|
267
|
+
export declare const PackageImportStatusType: VariantType<{
|
|
268
|
+
readonly processing: VariantType<{
|
|
269
|
+
readonly pending: NullType;
|
|
270
|
+
readonly downloading: NullType;
|
|
271
|
+
readonly importing: StructType<{
|
|
272
|
+
readonly objectsProcessed: IntegerType;
|
|
273
|
+
}>;
|
|
274
|
+
}>;
|
|
275
|
+
readonly completed: StructType<{
|
|
276
|
+
readonly name: StringType;
|
|
277
|
+
readonly version: StringType;
|
|
278
|
+
readonly packageHash: StringType;
|
|
279
|
+
readonly objectCount: IntegerType;
|
|
280
|
+
}>;
|
|
281
|
+
readonly failed: StructType<{
|
|
282
|
+
readonly message: StringType;
|
|
283
|
+
}>;
|
|
284
|
+
}>;
|
|
285
|
+
export type PackageImportStatus = ValueTypeOf<typeof PackageImportStatusType>;
|
|
286
|
+
export declare const PackageExportProgressType: VariantType<{
|
|
287
|
+
readonly pending: NullType;
|
|
288
|
+
readonly exporting: StructType<{
|
|
289
|
+
readonly objectsProcessed: IntegerType;
|
|
290
|
+
}>;
|
|
291
|
+
readonly uploading: NullType;
|
|
292
|
+
}>;
|
|
293
|
+
export type PackageExportProgress = ValueTypeOf<typeof PackageExportProgressType>;
|
|
294
|
+
export declare const PackageExportStatusType: VariantType<{
|
|
295
|
+
readonly processing: VariantType<{
|
|
296
|
+
readonly pending: NullType;
|
|
297
|
+
readonly exporting: StructType<{
|
|
298
|
+
readonly objectsProcessed: IntegerType;
|
|
299
|
+
}>;
|
|
300
|
+
readonly uploading: NullType;
|
|
301
|
+
}>;
|
|
302
|
+
readonly completed: StructType<{
|
|
303
|
+
readonly downloadUrl: StringType;
|
|
304
|
+
readonly size: IntegerType;
|
|
305
|
+
}>;
|
|
306
|
+
readonly failed: StructType<{
|
|
307
|
+
readonly message: StringType;
|
|
308
|
+
}>;
|
|
309
|
+
}>;
|
|
310
|
+
export type PackageExportStatus = ValueTypeOf<typeof PackageExportStatusType>;
|
|
210
311
|
//# sourceMappingURL=package.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIlH;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;IAC1B,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhE,uEAAuE;;;;;;;;;;;EAEvE,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AAG9D,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB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C,CAAC;AAElF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;EAMlC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,eAAO,MAAM,yBAAyB;;;;;;EAIpC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAMlC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
package/dist/src/package.js
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* - **Structure**: The shape of the data tree
|
|
14
14
|
* - **Task**: A computation with input/output paths (stored separately)
|
|
15
15
|
*/
|
|
16
|
-
import { StructType, StringType, DictType } from '@elaraai/east';
|
|
16
|
+
import { StructType, StringType, IntegerType, VariantType, NullType, DictType } from '@elaraai/east';
|
|
17
|
+
import { DatasetRefType } from './dataset-ref.js';
|
|
17
18
|
import { StructureType } from './structure.js';
|
|
18
19
|
/**
|
|
19
20
|
* Data configuration in a package.
|
|
@@ -23,31 +24,13 @@ import { StructureType } from './structure.js';
|
|
|
23
24
|
*
|
|
24
25
|
* @remarks
|
|
25
26
|
* - `structure`: Defines which paths are datasets vs trees (recursive)
|
|
26
|
-
* - `
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const data: PackageData = {
|
|
31
|
-
* structure: variant('struct', new Map([
|
|
32
|
-
* ['inputs', variant('struct', new Map([
|
|
33
|
-
* ['sales', variant('value', variant('Array', variant('Integer', null)))],
|
|
34
|
-
* ]))],
|
|
35
|
-
* ['tasks', variant('struct', new Map([
|
|
36
|
-
* ['process', variant('struct', new Map([
|
|
37
|
-
* ['function_ir', variant('value', ...)],
|
|
38
|
-
* ['output', variant('value', variant('Integer', null))],
|
|
39
|
-
* ]))],
|
|
40
|
-
* ]))],
|
|
41
|
-
* ])),
|
|
42
|
-
* value: 'abc123...', // Hash of initial tree
|
|
43
|
-
* };
|
|
44
|
-
* ```
|
|
27
|
+
* - `refs`: Per-dataset refs mapping refPath to DatasetRef (replaces old root tree hash)
|
|
45
28
|
*/
|
|
46
29
|
export const PackageDataType = StructType({
|
|
47
30
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
48
31
|
structure: StructureType,
|
|
49
|
-
/**
|
|
50
|
-
|
|
32
|
+
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
33
|
+
refs: DictType(StringType, DatasetRefType),
|
|
51
34
|
});
|
|
52
35
|
// Backwards compatibility alias
|
|
53
36
|
/** @deprecated Use PackageDataType instead */
|
|
@@ -72,7 +55,7 @@ export const PackageDatasetsType = PackageDataType;
|
|
|
72
55
|
* tasks: new Map([['process', 'abc123...']]), // hash of TaskObject
|
|
73
56
|
* data: {
|
|
74
57
|
* structure: variant('struct', new Map([...])),
|
|
75
|
-
* value: 'def456...',
|
|
58
|
+
* refs: new Map([['inputs/sales', variant('value', { hash: 'def456...', versions: new Map() })]]),
|
|
76
59
|
* },
|
|
77
60
|
* };
|
|
78
61
|
* ```
|
|
@@ -83,4 +66,51 @@ export const PackageObjectType = StructType({
|
|
|
83
66
|
/** Data structure and initial values */
|
|
84
67
|
data: PackageDataType,
|
|
85
68
|
});
|
|
69
|
+
// =============================================================================
|
|
70
|
+
// Package Transfer Types
|
|
71
|
+
// =============================================================================
|
|
72
|
+
export const PackageTransferInitRequestType = StructType({
|
|
73
|
+
size: IntegerType,
|
|
74
|
+
});
|
|
75
|
+
export const PackageTransferInitResponseType = StructType({
|
|
76
|
+
id: StringType,
|
|
77
|
+
uploadUrl: StringType,
|
|
78
|
+
});
|
|
79
|
+
export const PackageJobResponseType = StructType({
|
|
80
|
+
id: StringType,
|
|
81
|
+
});
|
|
82
|
+
export const PackageImportResultType = StructType({
|
|
83
|
+
name: StringType,
|
|
84
|
+
version: StringType,
|
|
85
|
+
packageHash: StringType,
|
|
86
|
+
objectCount: IntegerType,
|
|
87
|
+
});
|
|
88
|
+
export const PackageExportResultType = StructType({
|
|
89
|
+
downloadUrl: StringType,
|
|
90
|
+
size: IntegerType,
|
|
91
|
+
});
|
|
92
|
+
export const PackageImportProgressType = VariantType({
|
|
93
|
+
pending: NullType,
|
|
94
|
+
downloading: NullType,
|
|
95
|
+
importing: StructType({ objectsProcessed: IntegerType }),
|
|
96
|
+
});
|
|
97
|
+
export const PackageImportStatusType = VariantType({
|
|
98
|
+
processing: PackageImportProgressType,
|
|
99
|
+
completed: PackageImportResultType,
|
|
100
|
+
failed: StructType({
|
|
101
|
+
message: StringType,
|
|
102
|
+
}),
|
|
103
|
+
});
|
|
104
|
+
export const PackageExportProgressType = VariantType({
|
|
105
|
+
pending: NullType,
|
|
106
|
+
exporting: StructType({ objectsProcessed: IntegerType }),
|
|
107
|
+
uploading: NullType,
|
|
108
|
+
});
|
|
109
|
+
export const PackageExportStatusType = VariantType({
|
|
110
|
+
processing: PackageExportProgressType,
|
|
111
|
+
completed: PackageExportResultType,
|
|
112
|
+
failed: StructType({
|
|
113
|
+
message: StringType,
|
|
114
|
+
}),
|
|
115
|
+
});
|
|
86
116
|
//# sourceMappingURL=package.js.map
|
package/dist/src/package.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAe,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAe,MAAM,eA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