@elaraai/e3-types 0.0.2-beta.39 → 0.0.2-beta.40
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/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/package.d.ts +89 -40
- package/dist/src/package.d.ts.map +1 -1
- package/dist/src/package.js +38 -1
- package/dist/src/package.js.map +1 -1
- 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/package.json +1 -1
- package/src/index.ts +25 -0
- package/src/package.ts +53 -1
- package/src/transfer.ts +56 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -24,9 +24,10 @@ export { DataRefType, type DataRef, unassignedRef, nullRef, DataTreeType, } from
|
|
|
24
24
|
export { VersionVectorType, type VersionVector, DatasetRefType, type DatasetRef, } from './dataset-ref.js';
|
|
25
25
|
export { TaskObjectType, type TaskObject, } from './task.js';
|
|
26
26
|
export { StructureType, type Structure, PathSegmentType, type PathSegment, TreePathType, type TreePath, type ParsePathResult, type ParseDatasetPathResult, type ParsePackageRefResult, treePath, pathToString, parsePath, parseDatasetPath, parsePackageRef, urlPathToTreePath, DatasetSchemaType, type DatasetSchema, } from './structure.js';
|
|
27
|
-
export { PackageDataType, type PackageData, PackageObjectType, type PackageObject, PackageDatasetsType, type PackageDatasets, } from './package.js';
|
|
27
|
+
export { PackageDataType, type PackageData, PackageObjectType, type PackageObject, PackageDatasetsType, type PackageDatasets, PackageTransferInitRequestType, type PackageTransferInitRequest, PackageTransferInitResponseType, type PackageTransferInitResponse, PackageJobResponseType, type PackageJobResponse, PackageImportResultType, type PackageImportResult, PackageExportResultType, type PackageExportResult, PackageImportStatusType, type PackageImportStatus, PackageExportStatusType, type PackageExportStatus, } from './package.js';
|
|
28
28
|
export { WorkspaceStateType, type WorkspaceState, } from './workspace.js';
|
|
29
29
|
export { ExecutionStatusType, type ExecutionStatus, } from './execution.js';
|
|
30
30
|
export { LockOperationType, type LockOperation, ProcessHolderType, type ProcessHolder, LockStateType, type LockState, } from './lock.js';
|
|
31
|
+
export { TransferUploadRequestType, type TransferUploadRequest, TransferUploadResponseType, type TransferUploadResponse, TransferDoneResponseType, type TransferDoneResponse, } from './transfer.js';
|
|
31
32
|
export { type DataflowExecutionStatus, type TaskStatus, TaskStateType, type TaskState, DataflowGraphTaskType, type DataflowGraphTask, DataflowGraphType, type DataflowGraph, ExecutionEventType, type ExecutionEvent, DataflowExecutionStateType, type DataflowExecutionState, DataflowRunStatusType, type DataflowRunStatus, TaskExecutionRecordType, type TaskExecutionRecord, DataflowRunSummaryType, type DataflowRunSummary, DataflowRunType, type DataflowRun, } from './dataflow.js';
|
|
32
33
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EACL,WAAW,EACX,KAAK,OAAO,EACZ,aAAa,EACb,OAAO,EACP,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,iBAAiB,EACjB,KAAK,aAAa,EAClB,cAAc,EACd,KAAK,UAAU,GAChB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,cAAc,EACd,KAAK,UAAU,GAChB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,aAAa,EACb,KAAK,SAAS,EACd,eAAe,EACf,KAAK,WAAW,EAChB,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EAEjB,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,eAAe,EACf,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,aAAa,EAElB,mBAAmB,EACnB,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EACL,WAAW,EACX,KAAK,OAAO,EACZ,aAAa,EACb,OAAO,EACP,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,iBAAiB,EACjB,KAAK,aAAa,EAClB,cAAc,EACd,KAAK,UAAU,GAChB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,cAAc,EACd,KAAK,UAAU,GAChB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,aAAa,EACb,KAAK,SAAS,EACd,eAAe,EACf,KAAK,WAAW,EAChB,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EAEjB,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,eAAe,EACf,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,aAAa,EAElB,mBAAmB,EACnB,KAAK,eAAe,EAEpB,8BAA8B,EAC9B,KAAK,0BAA0B,EAC/B,+BAA+B,EAC/B,KAAK,2BAA2B,EAChC,sBAAsB,EACtB,KAAK,kBAAkB,EACvB,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,uBAAuB,EACvB,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,kBAAkB,EAClB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,mBAAmB,EACnB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,iBAAiB,EACjB,KAAK,aAAa,EAClB,iBAAiB,EACjB,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,SAAS,GACf,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,yBAAyB,EACzB,KAAK,qBAAqB,EAC1B,0BAA0B,EAC1B,KAAK,sBAAsB,EAC3B,wBAAwB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,aAAa,EACb,KAAK,SAAS,EACd,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,iBAAiB,EACjB,KAAK,aAAa,EAClB,kBAAkB,EAClB,KAAK,cAAc,EACnB,0BAA0B,EAC1B,KAAK,sBAAsB,EAE3B,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,sBAAsB,EACtB,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -33,13 +33,17 @@ DatasetSchemaType, } from './structure.js';
|
|
|
33
33
|
// Package objects
|
|
34
34
|
export { PackageDataType, PackageObjectType,
|
|
35
35
|
// Backwards compatibility
|
|
36
|
-
PackageDatasetsType,
|
|
36
|
+
PackageDatasetsType,
|
|
37
|
+
// Package transfer types
|
|
38
|
+
PackageTransferInitRequestType, PackageTransferInitResponseType, PackageJobResponseType, PackageImportResultType, PackageExportResultType, PackageImportStatusType, PackageExportStatusType, } from './package.js';
|
|
37
39
|
// Workspace state
|
|
38
40
|
export { WorkspaceStateType, } from './workspace.js';
|
|
39
41
|
// Execution status
|
|
40
42
|
export { ExecutionStatusType, } from './execution.js';
|
|
41
43
|
// Lock state
|
|
42
44
|
export { LockOperationType, ProcessHolderType, LockStateType, } from './lock.js';
|
|
45
|
+
// Dataset transfer types
|
|
46
|
+
export { TransferUploadRequestType, TransferUploadResponseType, TransferDoneResponseType, } from './transfer.js';
|
|
43
47
|
// Dataflow execution state
|
|
44
48
|
export { TaskStateType, DataflowGraphTaskType, DataflowGraphType, ExecutionEventType, DataflowExecutionStateType,
|
|
45
49
|
// Dataflow run history
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH,4BAA4B;AAC5B,OAAO,EACL,WAAW,EAEX,aAAa,EACb,OAAO,EACP,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,2DAA2D;AAC3D,OAAO,EACL,iBAAiB,EAEjB,cAAc,GAEf,MAAM,kBAAkB,CAAC;AAE1B,mBAAmB;AACnB,OAAO,EACL,cAAc,GAEf,MAAM,WAAW,CAAC;AAEnB,2BAA2B;AAC3B,OAAO,EACL,aAAa,EAEb,eAAe,EAEf,YAAY,EAKZ,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,iBAAiB;AACjB,0BAA0B;AAC1B,iBAAiB,GAElB,MAAM,gBAAgB,CAAC;AAExB,kBAAkB;AAClB,OAAO,EACL,eAAe,EAEf,iBAAiB;AAEjB,0BAA0B;AAC1B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH,4BAA4B;AAC5B,OAAO,EACL,WAAW,EAEX,aAAa,EACb,OAAO,EACP,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,2DAA2D;AAC3D,OAAO,EACL,iBAAiB,EAEjB,cAAc,GAEf,MAAM,kBAAkB,CAAC;AAE1B,mBAAmB;AACnB,OAAO,EACL,cAAc,GAEf,MAAM,WAAW,CAAC;AAEnB,2BAA2B;AAC3B,OAAO,EACL,aAAa,EAEb,eAAe,EAEf,YAAY,EAKZ,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,iBAAiB;AACjB,0BAA0B;AAC1B,iBAAiB,GAElB,MAAM,gBAAgB,CAAC;AAExB,kBAAkB;AAClB,OAAO,EACL,eAAe,EAEf,iBAAiB;AAEjB,0BAA0B;AAC1B,mBAAmB;AAEnB,yBAAyB;AACzB,8BAA8B,EAE9B,+BAA+B,EAE/B,sBAAsB,EAEtB,uBAAuB,EAEvB,uBAAuB,EAEvB,uBAAuB,EAEvB,uBAAuB,GAExB,MAAM,cAAc,CAAC;AAEtB,kBAAkB;AAClB,OAAO,EACL,kBAAkB,GAEnB,MAAM,gBAAgB,CAAC;AAExB,mBAAmB;AACnB,OAAO,EACL,mBAAmB,GAEpB,MAAM,gBAAgB,CAAC;AAExB,aAAa;AACb,OAAO,EACL,iBAAiB,EAEjB,iBAAiB,EAEjB,aAAa,GAEd,MAAM,WAAW,CAAC;AAEnB,yBAAyB;AACzB,OAAO,EACL,yBAAyB,EAEzB,0BAA0B,EAE1B,wBAAwB,GAEzB,MAAM,eAAe,CAAC;AAEvB,2BAA2B;AAC3B,OAAO,EAGL,aAAa,EAEb,qBAAqB,EAErB,iBAAiB,EAEjB,kBAAkB,EAElB,0BAA0B;AAE1B,uBAAuB;AACvB,qBAAqB,EAErB,uBAAuB,EAEvB,sBAAsB,EAEtB,eAAe,GAEhB,MAAM,eAAe,CAAC"}
|
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
|
*
|
|
@@ -26,17 +26,17 @@ import { StructType, StringType, DictType, ValueTypeOf } from '@elaraai/east';
|
|
|
26
26
|
*/
|
|
27
27
|
export declare const PackageDataType: StructType<{
|
|
28
28
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
29
|
-
readonly structure: import("@elaraai/east").RecursiveType<
|
|
29
|
+
readonly structure: import("@elaraai/east").RecursiveType<VariantType<{
|
|
30
30
|
readonly value: StructType<{
|
|
31
|
-
readonly type: import("@elaraai/east").RecursiveType<
|
|
32
|
-
readonly Never:
|
|
33
|
-
readonly Null:
|
|
34
|
-
readonly Boolean:
|
|
35
|
-
readonly Integer:
|
|
36
|
-
readonly Float:
|
|
37
|
-
readonly String:
|
|
38
|
-
readonly DateTime:
|
|
39
|
-
readonly Blob:
|
|
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
40
|
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
41
41
|
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
42
42
|
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
@@ -52,7 +52,7 @@ export declare const PackageDataType: StructType<{
|
|
|
52
52
|
readonly name: StringType;
|
|
53
53
|
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
54
54
|
}>>;
|
|
55
|
-
readonly Recursive:
|
|
55
|
+
readonly Recursive: IntegerType;
|
|
56
56
|
readonly Function: StructType<{
|
|
57
57
|
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
58
58
|
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
@@ -69,8 +69,8 @@ export declare const PackageDataType: StructType<{
|
|
|
69
69
|
readonly struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
70
70
|
}>>;
|
|
71
71
|
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
72
|
-
readonly refs: DictType<StringType,
|
|
73
|
-
readonly unassigned:
|
|
72
|
+
readonly refs: DictType<StringType, VariantType<{
|
|
73
|
+
readonly unassigned: NullType;
|
|
74
74
|
readonly null: StructType<{
|
|
75
75
|
readonly versions: DictType<StringType, StringType>;
|
|
76
76
|
}>;
|
|
@@ -85,17 +85,17 @@ export type PackageData = ValueTypeOf<typeof PackageDataType>;
|
|
|
85
85
|
/** @deprecated Use PackageDataType instead */
|
|
86
86
|
export declare const PackageDatasetsType: StructType<{
|
|
87
87
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
88
|
-
readonly structure: import("@elaraai/east").RecursiveType<
|
|
88
|
+
readonly structure: import("@elaraai/east").RecursiveType<VariantType<{
|
|
89
89
|
readonly value: StructType<{
|
|
90
|
-
readonly type: import("@elaraai/east").RecursiveType<
|
|
91
|
-
readonly Never:
|
|
92
|
-
readonly Null:
|
|
93
|
-
readonly Boolean:
|
|
94
|
-
readonly Integer:
|
|
95
|
-
readonly Float:
|
|
96
|
-
readonly String:
|
|
97
|
-
readonly DateTime:
|
|
98
|
-
readonly Blob:
|
|
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
99
|
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
100
100
|
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
101
101
|
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
@@ -111,7 +111,7 @@ export declare const PackageDatasetsType: StructType<{
|
|
|
111
111
|
readonly name: StringType;
|
|
112
112
|
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
113
113
|
}>>;
|
|
114
|
-
readonly Recursive:
|
|
114
|
+
readonly Recursive: IntegerType;
|
|
115
115
|
readonly Function: StructType<{
|
|
116
116
|
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
117
117
|
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
@@ -128,8 +128,8 @@ export declare const PackageDatasetsType: StructType<{
|
|
|
128
128
|
readonly struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
129
129
|
}>>;
|
|
130
130
|
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
131
|
-
readonly refs: DictType<StringType,
|
|
132
|
-
readonly unassigned:
|
|
131
|
+
readonly refs: DictType<StringType, VariantType<{
|
|
132
|
+
readonly unassigned: NullType;
|
|
133
133
|
readonly null: StructType<{
|
|
134
134
|
readonly versions: DictType<StringType, StringType>;
|
|
135
135
|
}>;
|
|
@@ -174,17 +174,17 @@ export declare const PackageObjectType: StructType<{
|
|
|
174
174
|
/** Data structure and initial values */
|
|
175
175
|
readonly data: StructType<{
|
|
176
176
|
/** Structure defining tree shape (what's a group vs dataset) */
|
|
177
|
-
readonly structure: import("@elaraai/east").RecursiveType<
|
|
177
|
+
readonly structure: import("@elaraai/east").RecursiveType<VariantType<{
|
|
178
178
|
readonly value: StructType<{
|
|
179
|
-
readonly type: import("@elaraai/east").RecursiveType<
|
|
180
|
-
readonly Never:
|
|
181
|
-
readonly Null:
|
|
182
|
-
readonly Boolean:
|
|
183
|
-
readonly Integer:
|
|
184
|
-
readonly Float:
|
|
185
|
-
readonly String:
|
|
186
|
-
readonly DateTime:
|
|
187
|
-
readonly Blob:
|
|
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
188
|
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
189
189
|
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
190
190
|
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
@@ -200,7 +200,7 @@ export declare const PackageObjectType: StructType<{
|
|
|
200
200
|
readonly name: StringType;
|
|
201
201
|
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
202
202
|
}>>;
|
|
203
|
-
readonly Recursive:
|
|
203
|
+
readonly Recursive: IntegerType;
|
|
204
204
|
readonly Function: StructType<{
|
|
205
205
|
readonly inputs: import("@elaraai/east").ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
206
206
|
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
@@ -217,8 +217,8 @@ export declare const PackageObjectType: StructType<{
|
|
|
217
217
|
readonly struct: DictType<StringType, import("@elaraai/east").RecursiveTypeMarker>;
|
|
218
218
|
}>>;
|
|
219
219
|
/** Per-dataset refs: refPath (e.g. "inputs/greeting") -> DatasetRef */
|
|
220
|
-
readonly refs: DictType<StringType,
|
|
221
|
-
readonly unassigned:
|
|
220
|
+
readonly refs: DictType<StringType, VariantType<{
|
|
221
|
+
readonly unassigned: NullType;
|
|
222
222
|
readonly null: StructType<{
|
|
223
223
|
readonly versions: DictType<StringType, StringType>;
|
|
224
224
|
}>;
|
|
@@ -231,4 +231,53 @@ export declare const PackageObjectType: StructType<{
|
|
|
231
231
|
}>;
|
|
232
232
|
export type PackageObjectType = typeof PackageObjectType;
|
|
233
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 PackageImportStatusType: VariantType<{
|
|
260
|
+
readonly processing: NullType;
|
|
261
|
+
readonly completed: StructType<{
|
|
262
|
+
readonly name: StringType;
|
|
263
|
+
readonly version: StringType;
|
|
264
|
+
readonly packageHash: StringType;
|
|
265
|
+
readonly objectCount: IntegerType;
|
|
266
|
+
}>;
|
|
267
|
+
readonly failed: StructType<{
|
|
268
|
+
readonly message: StringType;
|
|
269
|
+
}>;
|
|
270
|
+
}>;
|
|
271
|
+
export type PackageImportStatus = ValueTypeOf<typeof PackageImportStatusType>;
|
|
272
|
+
export declare const PackageExportStatusType: VariantType<{
|
|
273
|
+
readonly processing: NullType;
|
|
274
|
+
readonly completed: StructType<{
|
|
275
|
+
readonly downloadUrl: StringType;
|
|
276
|
+
readonly size: IntegerType;
|
|
277
|
+
}>;
|
|
278
|
+
readonly failed: StructType<{
|
|
279
|
+
readonly message: StringType;
|
|
280
|
+
}>;
|
|
281
|
+
}>;
|
|
282
|
+
export type PackageExportStatus = ValueTypeOf<typeof PackageExportStatusType>;
|
|
234
283
|
//# 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;IAX9B,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEhE,uEAAuE;;;;;;;;;;;EASvB,CAAC;AACnD,0CAA0C;AAC1C,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAClD,0CAA0C;AAC1C,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,iBAAiB;IAC5B,8DAA8D;;IAE9D,wCAAwC;;QA7CxC,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAEhE,uEAAuE;;;;;;;;;;;;EA6CvE,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAMlE,eAAO,MAAM,8BAA8B;;EAEzC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAE5F,eAAO,MAAM,+BAA+B;;;EAG1C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,WAAW,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAE9F,eAAO,MAAM,sBAAsB;;EAEjC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,eAAO,MAAM,uBAAuB;;;;;EAKlC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,eAAO,MAAM,uBAAuB;;;EAGlC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,eAAO,MAAM,uBAAuB;;;;;;;;;;;EAMlC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,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,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 } from '@elaraai/east';
|
|
16
|
+
import { StructType, StringType, IntegerType, VariantType, NullType, DictType } from '@elaraai/east';
|
|
17
17
|
import { DatasetRefType } from './dataset-ref.js';
|
|
18
18
|
import { StructureType } from './structure.js';
|
|
19
19
|
/**
|
|
@@ -66,4 +66,41 @@ export const PackageObjectType = StructType({
|
|
|
66
66
|
/** Data structure and initial values */
|
|
67
67
|
data: PackageDataType,
|
|
68
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 PackageImportStatusType = VariantType({
|
|
93
|
+
processing: NullType,
|
|
94
|
+
completed: PackageImportResultType,
|
|
95
|
+
failed: StructType({
|
|
96
|
+
message: StringType,
|
|
97
|
+
}),
|
|
98
|
+
});
|
|
99
|
+
export const PackageExportStatusType = VariantType({
|
|
100
|
+
processing: NullType,
|
|
101
|
+
completed: PackageExportResultType,
|
|
102
|
+
failed: StructType({
|
|
103
|
+
message: StringType,
|
|
104
|
+
}),
|
|
105
|
+
});
|
|
69
106
|
//# 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,eAAe,CAAC;AAClH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;IACxC,gEAAgE;IAChE,SAAS,EAAE,aAAa;IACxB,uEAAuE;IACvE,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;CAC3C,CAAC,CAAC;AAKH,gCAAgC;AAChC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAMnD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;IAC1C,8DAA8D;IAC9D,KAAK,EAAE,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IACvC,wCAAwC;IACxC,IAAI,EAAE,eAAe;CACtB,CAAC,CAAC;AAKH,gFAAgF;AAChF,yBAAyB;AACzB,gFAAgF;AAEhF,MAAM,CAAC,MAAM,8BAA8B,GAAG,UAAU,CAAC;IACvD,IAAI,EAAE,WAAW;CAClB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,+BAA+B,GAAG,UAAU,CAAC;IACxD,EAAE,EAAE,UAAU;IACd,SAAS,EAAE,UAAU;CACtB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC;IAC/C,EAAE,EAAE,UAAU;CACf,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;IAChD,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,WAAW;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;IAChD,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,WAAW;CAClB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAC;IACjD,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,uBAAuB;IAClC,MAAM,EAAE,UAAU,CAAC;QACjB,OAAO,EAAE,UAAU;KACpB,CAAC;CACH,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAC;IACjD,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,uBAAuB;IAClC,MAAM,EAAE,UAAU,CAAC;QACjB,OAAO,EAAE,UAAU;KACpB,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Dataset transfer types for the staged upload protocol.
|
|
7
|
+
*
|
|
8
|
+
* Used by both the API server and client for large dataset uploads
|
|
9
|
+
* that exceed inline body size limits.
|
|
10
|
+
*/
|
|
11
|
+
import { VariantType, StructType, StringType, IntegerType, NullType, type ValueTypeOf } from '@elaraai/east';
|
|
12
|
+
/**
|
|
13
|
+
* Transfer upload init request.
|
|
14
|
+
*
|
|
15
|
+
* Workspace and dataset path are now encoded in the URL.
|
|
16
|
+
*
|
|
17
|
+
* @property hash - SHA-256 hex hash of the data (computed by client)
|
|
18
|
+
* @property size - Size of the data in bytes
|
|
19
|
+
*/
|
|
20
|
+
export declare const TransferUploadRequestType: StructType<{
|
|
21
|
+
readonly hash: StringType;
|
|
22
|
+
readonly size: IntegerType;
|
|
23
|
+
}>;
|
|
24
|
+
export type TransferUploadRequest = ValueTypeOf<typeof TransferUploadRequestType>;
|
|
25
|
+
/**
|
|
26
|
+
* Transfer upload init response.
|
|
27
|
+
*
|
|
28
|
+
* - `completed`: Object already exists (dedup), dataset ref updated
|
|
29
|
+
* - `upload`: Staging slot created, client should upload then call done
|
|
30
|
+
*/
|
|
31
|
+
export declare const TransferUploadResponseType: VariantType<{
|
|
32
|
+
readonly completed: NullType;
|
|
33
|
+
readonly upload: StructType<{
|
|
34
|
+
readonly id: StringType;
|
|
35
|
+
readonly uploadUrl: StringType;
|
|
36
|
+
}>;
|
|
37
|
+
}>;
|
|
38
|
+
export type TransferUploadResponse = ValueTypeOf<typeof TransferUploadResponseType>;
|
|
39
|
+
/**
|
|
40
|
+
* Transfer done response.
|
|
41
|
+
*
|
|
42
|
+
* - `completed`: Hash verified, object stored, dataset ref updated
|
|
43
|
+
* - `error`: Hash mismatch or other failure
|
|
44
|
+
*/
|
|
45
|
+
export declare const TransferDoneResponseType: VariantType<{
|
|
46
|
+
readonly completed: NullType;
|
|
47
|
+
readonly error: StructType<{
|
|
48
|
+
readonly message: StringType;
|
|
49
|
+
}>;
|
|
50
|
+
}>;
|
|
51
|
+
export type TransferDoneResponse = ValueTypeOf<typeof TransferDoneResponseType>;
|
|
52
|
+
//# sourceMappingURL=transfer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../src/transfer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAE7G;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB;;;EAGpC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;;;;;;EAMrC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEpF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;;;EAKnC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Dataset transfer types for the staged upload protocol.
|
|
7
|
+
*
|
|
8
|
+
* Used by both the API server and client for large dataset uploads
|
|
9
|
+
* that exceed inline body size limits.
|
|
10
|
+
*/
|
|
11
|
+
import { VariantType, StructType, StringType, IntegerType, NullType } from '@elaraai/east';
|
|
12
|
+
/**
|
|
13
|
+
* Transfer upload init request.
|
|
14
|
+
*
|
|
15
|
+
* Workspace and dataset path are now encoded in the URL.
|
|
16
|
+
*
|
|
17
|
+
* @property hash - SHA-256 hex hash of the data (computed by client)
|
|
18
|
+
* @property size - Size of the data in bytes
|
|
19
|
+
*/
|
|
20
|
+
export const TransferUploadRequestType = StructType({
|
|
21
|
+
hash: StringType,
|
|
22
|
+
size: IntegerType,
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Transfer upload init response.
|
|
26
|
+
*
|
|
27
|
+
* - `completed`: Object already exists (dedup), dataset ref updated
|
|
28
|
+
* - `upload`: Staging slot created, client should upload then call done
|
|
29
|
+
*/
|
|
30
|
+
export const TransferUploadResponseType = VariantType({
|
|
31
|
+
completed: NullType,
|
|
32
|
+
upload: StructType({
|
|
33
|
+
id: StringType,
|
|
34
|
+
uploadUrl: StringType,
|
|
35
|
+
}),
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* Transfer done response.
|
|
39
|
+
*
|
|
40
|
+
* - `completed`: Hash verified, object stored, dataset ref updated
|
|
41
|
+
* - `error`: Hash mismatch or other failure
|
|
42
|
+
*/
|
|
43
|
+
export const TransferDoneResponseType = VariantType({
|
|
44
|
+
completed: NullType,
|
|
45
|
+
error: StructType({
|
|
46
|
+
message: StringType,
|
|
47
|
+
}),
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=transfer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer.js","sourceRoot":"","sources":["../../src/transfer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAoB,MAAM,eAAe,CAAC;AAE7G;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAC;IAClD,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,WAAW;CAClB,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,WAAW,CAAC;IACpD,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE,UAAU,CAAC;QACjB,EAAE,EAAE,UAAU;QACd,SAAS,EAAE,UAAU;KACtB,CAAC;CACH,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,WAAW,CAAC;IAClD,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,UAAU,CAAC;QAChB,OAAO,EAAE,UAAU;KACpB,CAAC;CACH,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -76,6 +76,21 @@ export {
|
|
|
76
76
|
// Backwards compatibility
|
|
77
77
|
PackageDatasetsType,
|
|
78
78
|
type PackageDatasets,
|
|
79
|
+
// Package transfer types
|
|
80
|
+
PackageTransferInitRequestType,
|
|
81
|
+
type PackageTransferInitRequest,
|
|
82
|
+
PackageTransferInitResponseType,
|
|
83
|
+
type PackageTransferInitResponse,
|
|
84
|
+
PackageJobResponseType,
|
|
85
|
+
type PackageJobResponse,
|
|
86
|
+
PackageImportResultType,
|
|
87
|
+
type PackageImportResult,
|
|
88
|
+
PackageExportResultType,
|
|
89
|
+
type PackageExportResult,
|
|
90
|
+
PackageImportStatusType,
|
|
91
|
+
type PackageImportStatus,
|
|
92
|
+
PackageExportStatusType,
|
|
93
|
+
type PackageExportStatus,
|
|
79
94
|
} from './package.js';
|
|
80
95
|
|
|
81
96
|
// Workspace state
|
|
@@ -100,6 +115,16 @@ export {
|
|
|
100
115
|
type LockState,
|
|
101
116
|
} from './lock.js';
|
|
102
117
|
|
|
118
|
+
// Dataset transfer types
|
|
119
|
+
export {
|
|
120
|
+
TransferUploadRequestType,
|
|
121
|
+
type TransferUploadRequest,
|
|
122
|
+
TransferUploadResponseType,
|
|
123
|
+
type TransferUploadResponse,
|
|
124
|
+
TransferDoneResponseType,
|
|
125
|
+
type TransferDoneResponse,
|
|
126
|
+
} from './transfer.js';
|
|
127
|
+
|
|
103
128
|
// Dataflow execution state
|
|
104
129
|
export {
|
|
105
130
|
type DataflowExecutionStatus,
|
package/src/package.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* - **Task**: A computation with input/output paths (stored separately)
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { StructType, StringType, DictType, ValueTypeOf } from '@elaraai/east';
|
|
18
|
+
import { StructType, StringType, IntegerType, VariantType, NullType, DictType, ValueTypeOf } from '@elaraai/east';
|
|
19
19
|
import { DatasetRefType } from './dataset-ref.js';
|
|
20
20
|
import { StructureType } from './structure.js';
|
|
21
21
|
|
|
@@ -81,3 +81,55 @@ export const PackageObjectType = StructType({
|
|
|
81
81
|
export type PackageObjectType = typeof PackageObjectType;
|
|
82
82
|
|
|
83
83
|
export type PackageObject = ValueTypeOf<typeof PackageObjectType>;
|
|
84
|
+
|
|
85
|
+
// =============================================================================
|
|
86
|
+
// Package Transfer Types
|
|
87
|
+
// =============================================================================
|
|
88
|
+
|
|
89
|
+
export const PackageTransferInitRequestType = StructType({
|
|
90
|
+
size: IntegerType,
|
|
91
|
+
});
|
|
92
|
+
export type PackageTransferInitRequest = ValueTypeOf<typeof PackageTransferInitRequestType>;
|
|
93
|
+
|
|
94
|
+
export const PackageTransferInitResponseType = StructType({
|
|
95
|
+
id: StringType,
|
|
96
|
+
uploadUrl: StringType,
|
|
97
|
+
});
|
|
98
|
+
export type PackageTransferInitResponse = ValueTypeOf<typeof PackageTransferInitResponseType>;
|
|
99
|
+
|
|
100
|
+
export const PackageJobResponseType = StructType({
|
|
101
|
+
id: StringType,
|
|
102
|
+
});
|
|
103
|
+
export type PackageJobResponse = ValueTypeOf<typeof PackageJobResponseType>;
|
|
104
|
+
|
|
105
|
+
export const PackageImportResultType = StructType({
|
|
106
|
+
name: StringType,
|
|
107
|
+
version: StringType,
|
|
108
|
+
packageHash: StringType,
|
|
109
|
+
objectCount: IntegerType,
|
|
110
|
+
});
|
|
111
|
+
export type PackageImportResult = ValueTypeOf<typeof PackageImportResultType>;
|
|
112
|
+
|
|
113
|
+
export const PackageExportResultType = StructType({
|
|
114
|
+
downloadUrl: StringType,
|
|
115
|
+
size: IntegerType,
|
|
116
|
+
});
|
|
117
|
+
export type PackageExportResult = ValueTypeOf<typeof PackageExportResultType>;
|
|
118
|
+
|
|
119
|
+
export const PackageImportStatusType = VariantType({
|
|
120
|
+
processing: NullType,
|
|
121
|
+
completed: PackageImportResultType,
|
|
122
|
+
failed: StructType({
|
|
123
|
+
message: StringType,
|
|
124
|
+
}),
|
|
125
|
+
});
|
|
126
|
+
export type PackageImportStatus = ValueTypeOf<typeof PackageImportStatusType>;
|
|
127
|
+
|
|
128
|
+
export const PackageExportStatusType = VariantType({
|
|
129
|
+
processing: NullType,
|
|
130
|
+
completed: PackageExportResultType,
|
|
131
|
+
failed: StructType({
|
|
132
|
+
message: StringType,
|
|
133
|
+
}),
|
|
134
|
+
});
|
|
135
|
+
export type PackageExportStatus = ValueTypeOf<typeof PackageExportStatusType>;
|
package/src/transfer.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Dataset transfer types for the staged upload protocol.
|
|
8
|
+
*
|
|
9
|
+
* Used by both the API server and client for large dataset uploads
|
|
10
|
+
* that exceed inline body size limits.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { VariantType, StructType, StringType, IntegerType, NullType, type ValueTypeOf } from '@elaraai/east';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Transfer upload init request.
|
|
17
|
+
*
|
|
18
|
+
* Workspace and dataset path are now encoded in the URL.
|
|
19
|
+
*
|
|
20
|
+
* @property hash - SHA-256 hex hash of the data (computed by client)
|
|
21
|
+
* @property size - Size of the data in bytes
|
|
22
|
+
*/
|
|
23
|
+
export const TransferUploadRequestType = StructType({
|
|
24
|
+
hash: StringType,
|
|
25
|
+
size: IntegerType,
|
|
26
|
+
});
|
|
27
|
+
export type TransferUploadRequest = ValueTypeOf<typeof TransferUploadRequestType>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Transfer upload init response.
|
|
31
|
+
*
|
|
32
|
+
* - `completed`: Object already exists (dedup), dataset ref updated
|
|
33
|
+
* - `upload`: Staging slot created, client should upload then call done
|
|
34
|
+
*/
|
|
35
|
+
export const TransferUploadResponseType = VariantType({
|
|
36
|
+
completed: NullType,
|
|
37
|
+
upload: StructType({
|
|
38
|
+
id: StringType,
|
|
39
|
+
uploadUrl: StringType,
|
|
40
|
+
}),
|
|
41
|
+
});
|
|
42
|
+
export type TransferUploadResponse = ValueTypeOf<typeof TransferUploadResponseType>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Transfer done response.
|
|
46
|
+
*
|
|
47
|
+
* - `completed`: Hash verified, object stored, dataset ref updated
|
|
48
|
+
* - `error`: Hash mismatch or other failure
|
|
49
|
+
*/
|
|
50
|
+
export const TransferDoneResponseType = VariantType({
|
|
51
|
+
completed: NullType,
|
|
52
|
+
error: StructType({
|
|
53
|
+
message: StringType,
|
|
54
|
+
}),
|
|
55
|
+
});
|
|
56
|
+
export type TransferDoneResponse = ValueTypeOf<typeof TransferDoneResponseType>;
|