@elaraai/e3-api-client 0.0.2-beta.5 → 0.0.2-beta.51
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 +2 -2
- package/dist/src/datasets.d.ts +73 -4
- package/dist/src/datasets.d.ts.map +1 -1
- package/dist/src/datasets.js +194 -19
- package/dist/src/datasets.js.map +1 -1
- package/dist/src/executions.d.ts +74 -11
- package/dist/src/executions.d.ts.map +1 -1
- package/dist/src/executions.js +184 -36
- package/dist/src/executions.js.map +1 -1
- package/dist/src/http.d.ts +67 -12
- package/dist/src/http.d.ts.map +1 -1
- package/dist/src/http.js +168 -34
- package/dist/src/http.js.map +1 -1
- package/dist/src/index.d.ts +9 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/packages.d.ts +32 -27
- package/dist/src/packages.d.ts.map +1 -1
- package/dist/src/packages.js +175 -39
- package/dist/src/packages.js.map +1 -1
- package/dist/src/platform.d.ts +553 -1343
- package/dist/src/platform.d.ts.map +1 -1
- package/dist/src/platform.js +123 -915
- package/dist/src/platform.js.map +1 -1
- package/dist/src/repos.d.ts +16 -0
- package/dist/src/repos.d.ts.map +1 -0
- package/dist/src/repos.js +19 -0
- package/dist/src/repos.js.map +1 -0
- package/dist/src/repository.d.ts +67 -5
- package/dist/src/repository.d.ts.map +1 -1
- package/dist/src/repository.js +94 -10
- package/dist/src/repository.js.map +1 -1
- package/dist/src/tasks.d.ts +25 -3
- package/dist/src/tasks.d.ts.map +1 -1
- package/dist/src/tasks.js +29 -8
- package/dist/src/tasks.js.map +1 -1
- package/dist/src/types.d.ts +755 -1251
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +62 -453
- package/dist/src/types.js.map +1 -1
- package/dist/src/util.d.ts +21 -0
- package/dist/src/util.d.ts.map +1 -0
- package/dist/src/util.js +26 -0
- package/dist/src/util.js.map +1 -0
- package/dist/src/workspaces.d.ts +51 -9
- package/dist/src/workspaces.d.ts.map +1 -1
- package/dist/src/workspaces.js +87 -26
- package/dist/src/workspaces.js.map +1 -1
- package/package.json +4 -4
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAGH,OAAO,EAEL,0BAA0B,EAC1B,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EACjB,2BAA2B,EAC3B,SAAS,EACT,YAAY,EAEZ,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,EAElB,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAElB,0BAA0B,EAC1B,iBAAiB,EACjB,0BAA0B,EAC1B,0BAA0B,EAE1B,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EAEzB,gBAAgB,EAChB,eAAe,EAEf,mBAAmB,EACnB,YAAY,EACZ,uBAAuB,EACvB,kBAAkB,EAElB,iBAAiB,EACjB,sBAAsB,IAAI,mBAAmB,EAC7C,4BAA4B,EAC5B,6BAA6B,IAAI,0BAA0B,EAE3D,0BAA0B,EAC1B,qBAAqB,EAErB,YAAY,EACZ,aAAa,EAEb,uBAAu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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FX,CAAC"}
|
package/dist/src/types.js
CHANGED
|
@@ -3,464 +3,48 @@
|
|
|
3
3
|
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* API types for e3-api-
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// Error
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export const InternalErrorType = StructType({ message: StringType });
|
|
41
|
-
export const ErrorType = VariantType({
|
|
42
|
-
workspace_not_found: WorkspaceNotFoundErrorType,
|
|
43
|
-
workspace_not_deployed: WorkspaceNotDeployedErrorType,
|
|
44
|
-
workspace_exists: WorkspaceExistsErrorType,
|
|
45
|
-
workspace_locked: WorkspaceLockedErrorType,
|
|
46
|
-
package_not_found: PackageNotFoundErrorType,
|
|
47
|
-
package_exists: PackageExistsErrorType,
|
|
48
|
-
package_invalid: PackageInvalidErrorType,
|
|
49
|
-
dataset_not_found: DatasetNotFoundErrorType,
|
|
50
|
-
task_not_found: TaskNotFoundErrorType,
|
|
51
|
-
object_not_found: ObjectNotFoundErrorType,
|
|
52
|
-
dataflow_error: DataflowErrorType,
|
|
53
|
-
dataflow_aborted: NullType,
|
|
54
|
-
permission_denied: PermissionDeniedErrorType,
|
|
55
|
-
internal: InternalErrorType,
|
|
56
|
-
});
|
|
57
|
-
// =============================================================================
|
|
58
|
-
// Response Wrapper
|
|
59
|
-
// =============================================================================
|
|
60
|
-
export const ResponseType = (successType) => VariantType({
|
|
61
|
-
success: successType,
|
|
62
|
-
error: ErrorType,
|
|
63
|
-
});
|
|
64
|
-
// =============================================================================
|
|
65
|
-
// Repository Types
|
|
66
|
-
// =============================================================================
|
|
67
|
-
/**
|
|
68
|
-
* Repository status information.
|
|
69
|
-
*
|
|
70
|
-
* @property path - Absolute path to the .e3 repository directory
|
|
71
|
-
* @property objectCount - Number of content-addressed objects stored
|
|
72
|
-
* @property packageCount - Number of imported packages
|
|
73
|
-
* @property workspaceCount - Number of workspaces
|
|
74
|
-
*/
|
|
75
|
-
export const RepositoryStatusType = StructType({
|
|
76
|
-
path: StringType,
|
|
77
|
-
objectCount: IntegerType,
|
|
78
|
-
packageCount: IntegerType,
|
|
79
|
-
workspaceCount: IntegerType,
|
|
80
|
-
});
|
|
81
|
-
/**
|
|
82
|
-
* Garbage collection request options.
|
|
83
|
-
*
|
|
84
|
-
* @property dryRun - If true, report what would be deleted without deleting
|
|
85
|
-
* @property minAge - Minimum age in milliseconds for objects to be considered for deletion
|
|
86
|
-
*/
|
|
87
|
-
export const GcRequestType = StructType({
|
|
88
|
-
dryRun: BooleanType,
|
|
89
|
-
minAge: OptionType(IntegerType),
|
|
90
|
-
});
|
|
91
|
-
/**
|
|
92
|
-
* Garbage collection result.
|
|
93
|
-
*
|
|
94
|
-
* @property deletedObjects - Number of unreferenced objects deleted
|
|
95
|
-
* @property deletedPartials - Number of incomplete uploads deleted
|
|
96
|
-
* @property retainedObjects - Number of objects still referenced
|
|
97
|
-
* @property skippedYoung - Number of objects skipped due to minAge
|
|
98
|
-
* @property bytesFreed - Total bytes freed by deletion
|
|
99
|
-
*/
|
|
100
|
-
export const GcResultType = StructType({
|
|
101
|
-
deletedObjects: IntegerType,
|
|
102
|
-
deletedPartials: IntegerType,
|
|
103
|
-
retainedObjects: IntegerType,
|
|
104
|
-
skippedYoung: IntegerType,
|
|
105
|
-
bytesFreed: IntegerType,
|
|
106
|
-
});
|
|
107
|
-
// =============================================================================
|
|
108
|
-
// Package Types
|
|
109
|
-
// =============================================================================
|
|
110
|
-
/**
|
|
111
|
-
* Package list item (summary info).
|
|
112
|
-
*
|
|
113
|
-
* @property name - Package name
|
|
114
|
-
* @property version - Semantic version string
|
|
115
|
-
*/
|
|
116
|
-
export const PackageListItemType = StructType({
|
|
117
|
-
name: StringType,
|
|
118
|
-
version: StringType,
|
|
119
|
-
});
|
|
120
|
-
/**
|
|
121
|
-
* Result of importing a package.
|
|
122
|
-
*
|
|
123
|
-
* @property name - Imported package name
|
|
124
|
-
* @property version - Imported package version
|
|
125
|
-
* @property packageHash - SHA256 hash of the package content
|
|
126
|
-
* @property objectCount - Number of objects added to the repository
|
|
127
|
-
*/
|
|
128
|
-
export const PackageImportResultType = StructType({
|
|
129
|
-
name: StringType,
|
|
130
|
-
version: StringType,
|
|
131
|
-
packageHash: StringType,
|
|
132
|
-
objectCount: IntegerType,
|
|
133
|
-
});
|
|
134
|
-
/**
|
|
135
|
-
* Basic package info.
|
|
136
|
-
*
|
|
137
|
-
* @property name - Package name
|
|
138
|
-
* @property version - Semantic version string
|
|
139
|
-
* @property hash - SHA256 content hash
|
|
140
|
-
*/
|
|
141
|
-
export const PackageInfoType = StructType({
|
|
142
|
-
name: StringType,
|
|
143
|
-
version: StringType,
|
|
144
|
-
hash: StringType,
|
|
145
|
-
});
|
|
146
|
-
/**
|
|
147
|
-
* Detailed package information including structure.
|
|
148
|
-
*
|
|
149
|
-
* @property name - Package name
|
|
150
|
-
* @property version - Semantic version string
|
|
151
|
-
* @property hash - SHA256 content hash
|
|
152
|
-
* @property tasks - List of task names defined in the package
|
|
153
|
-
* @property dataStructure - East structure type describing the package's data schema
|
|
154
|
-
*/
|
|
155
|
-
export const PackageDetailsType = StructType({
|
|
156
|
-
name: StringType,
|
|
157
|
-
version: StringType,
|
|
158
|
-
hash: StringType,
|
|
159
|
-
tasks: ArrayType(StringType),
|
|
160
|
-
dataStructure: StructureType,
|
|
161
|
-
});
|
|
162
|
-
// =============================================================================
|
|
163
|
-
// Workspace Types
|
|
164
|
-
// =============================================================================
|
|
165
|
-
/**
|
|
166
|
-
* Request to create a new workspace.
|
|
167
|
-
*
|
|
168
|
-
* @property name - Unique workspace name
|
|
169
|
-
*/
|
|
170
|
-
export const WorkspaceCreateRequestType = StructType({
|
|
171
|
-
name: StringType,
|
|
172
|
-
});
|
|
173
|
-
/**
|
|
174
|
-
* Workspace summary information.
|
|
175
|
-
*
|
|
176
|
-
* @property name - Workspace name
|
|
177
|
-
* @property deployed - Whether a package is deployed to this workspace
|
|
178
|
-
* @property packageName - Name of deployed package (if deployed)
|
|
179
|
-
* @property packageVersion - Version of deployed package (if deployed)
|
|
180
|
-
*/
|
|
181
|
-
export const WorkspaceInfoType = StructType({
|
|
182
|
-
name: StringType,
|
|
183
|
-
deployed: BooleanType,
|
|
184
|
-
packageName: OptionType(StringType),
|
|
185
|
-
packageVersion: OptionType(StringType),
|
|
186
|
-
});
|
|
187
|
-
/**
|
|
188
|
-
* Request to deploy a package to a workspace.
|
|
189
|
-
*
|
|
190
|
-
* @property packageRef - Package reference in format "name" or "name@version"
|
|
191
|
-
*/
|
|
192
|
-
export const WorkspaceDeployRequestType = StructType({
|
|
193
|
-
packageRef: StringType,
|
|
194
|
-
});
|
|
195
|
-
// =============================================================================
|
|
196
|
-
// Workspace Status Types
|
|
197
|
-
// =============================================================================
|
|
198
|
-
/**
|
|
199
|
-
* Dataset status variant.
|
|
200
|
-
*
|
|
201
|
-
* - `unset`: No value assigned to this dataset
|
|
202
|
-
* - `stale`: Value exists but is outdated (upstream changed)
|
|
203
|
-
* - `up-to-date`: Value is current
|
|
204
|
-
*/
|
|
205
|
-
export const DatasetStatusType = VariantType({
|
|
206
|
-
unset: NullType,
|
|
207
|
-
stale: NullType,
|
|
208
|
-
'up-to-date': NullType,
|
|
209
|
-
});
|
|
210
|
-
/** Task completed successfully. @property cached - True if result was from cache */
|
|
211
|
-
export const TaskStatusUpToDateType = StructType({ cached: BooleanType });
|
|
212
|
-
/** Task waiting on dependencies. @property reason - Human-readable wait reason */
|
|
213
|
-
export const TaskStatusWaitingType = StructType({ reason: StringType });
|
|
214
|
-
/** Task currently executing. */
|
|
215
|
-
export const TaskStatusInProgressType = StructType({
|
|
216
|
-
/** Process ID of the running task */
|
|
217
|
-
pid: OptionType(IntegerType),
|
|
218
|
-
/** ISO timestamp when execution started */
|
|
219
|
-
startedAt: OptionType(StringType),
|
|
220
|
-
});
|
|
221
|
-
/** Task exited with non-zero code. */
|
|
222
|
-
export const TaskStatusFailedType = StructType({
|
|
223
|
-
/** Process exit code */
|
|
224
|
-
exitCode: IntegerType,
|
|
225
|
-
/** ISO timestamp when task completed */
|
|
226
|
-
completedAt: OptionType(StringType),
|
|
227
|
-
});
|
|
228
|
-
/** Task encountered an internal error. */
|
|
229
|
-
export const TaskStatusErrorType = StructType({
|
|
230
|
-
/** Error message */
|
|
231
|
-
message: StringType,
|
|
232
|
-
/** ISO timestamp when error occurred */
|
|
233
|
-
completedAt: OptionType(StringType),
|
|
234
|
-
});
|
|
235
|
-
/** Task was running but process is no longer alive. */
|
|
236
|
-
export const TaskStatusStaleRunningType = StructType({
|
|
237
|
-
/** Last known process ID */
|
|
238
|
-
pid: OptionType(IntegerType),
|
|
239
|
-
/** ISO timestamp when execution started */
|
|
240
|
-
startedAt: OptionType(StringType),
|
|
241
|
-
});
|
|
242
|
-
/**
|
|
243
|
-
* Task execution status variant.
|
|
244
|
-
*
|
|
245
|
-
* - `up-to-date`: Task completed successfully (cached indicates if from cache)
|
|
246
|
-
* - `ready`: Task is ready to run (all inputs available)
|
|
247
|
-
* - `waiting`: Task waiting on upstream dependencies
|
|
248
|
-
* - `in-progress`: Task currently executing
|
|
249
|
-
* - `failed`: Task exited with non-zero exit code
|
|
250
|
-
* - `error`: Internal error during task execution
|
|
251
|
-
* - `stale-running`: Task was marked running but process died
|
|
252
|
-
*/
|
|
253
|
-
export const TaskStatusType = VariantType({
|
|
254
|
-
'up-to-date': TaskStatusUpToDateType,
|
|
255
|
-
ready: NullType,
|
|
256
|
-
waiting: TaskStatusWaitingType,
|
|
257
|
-
'in-progress': TaskStatusInProgressType,
|
|
258
|
-
failed: TaskStatusFailedType,
|
|
259
|
-
error: TaskStatusErrorType,
|
|
260
|
-
'stale-running': TaskStatusStaleRunningType,
|
|
261
|
-
});
|
|
262
|
-
/**
|
|
263
|
-
* Status information for a single dataset.
|
|
264
|
-
*
|
|
265
|
-
* @property path - Dataset path (e.g., ".inputs.config" or ".tasks.foo.output")
|
|
266
|
-
* @property status - Current status (unset, stale, or up-to-date)
|
|
267
|
-
* @property hash - SHA256 hash of current value (if set)
|
|
268
|
-
* @property isTaskOutput - True if this dataset is produced by a task
|
|
269
|
-
* @property producedBy - Name of task that produces this dataset (if isTaskOutput)
|
|
270
|
-
*/
|
|
271
|
-
export const DatasetStatusInfoType = StructType({
|
|
272
|
-
path: StringType,
|
|
273
|
-
status: DatasetStatusType,
|
|
274
|
-
hash: OptionType(StringType),
|
|
275
|
-
isTaskOutput: BooleanType,
|
|
276
|
-
producedBy: OptionType(StringType),
|
|
277
|
-
});
|
|
278
|
-
/**
|
|
279
|
-
* Status information for a single task.
|
|
280
|
-
*
|
|
281
|
-
* @property name - Task name
|
|
282
|
-
* @property hash - Task definition hash (changes when task code changes)
|
|
283
|
-
* @property status - Current execution status
|
|
284
|
-
* @property inputs - Dataset paths this task reads from
|
|
285
|
-
* @property output - Dataset path this task writes to
|
|
286
|
-
* @property dependsOn - Names of tasks that must complete before this one
|
|
287
|
-
*/
|
|
288
|
-
export const TaskStatusInfoType = StructType({
|
|
289
|
-
name: StringType,
|
|
290
|
-
hash: StringType,
|
|
291
|
-
status: TaskStatusType,
|
|
292
|
-
inputs: ArrayType(StringType),
|
|
293
|
-
output: StringType,
|
|
294
|
-
dependsOn: ArrayType(StringType),
|
|
295
|
-
});
|
|
296
|
-
/**
|
|
297
|
-
* Summary counts for workspace status.
|
|
298
|
-
*/
|
|
299
|
-
export const WorkspaceStatusSummaryType = StructType({
|
|
300
|
-
/** Dataset status counts */
|
|
301
|
-
datasets: StructType({
|
|
302
|
-
total: IntegerType,
|
|
303
|
-
unset: IntegerType,
|
|
304
|
-
stale: IntegerType,
|
|
305
|
-
upToDate: IntegerType,
|
|
306
|
-
}),
|
|
307
|
-
/** Task status counts */
|
|
308
|
-
tasks: StructType({
|
|
309
|
-
total: IntegerType,
|
|
310
|
-
upToDate: IntegerType,
|
|
311
|
-
ready: IntegerType,
|
|
312
|
-
waiting: IntegerType,
|
|
313
|
-
inProgress: IntegerType,
|
|
314
|
-
failed: IntegerType,
|
|
315
|
-
error: IntegerType,
|
|
316
|
-
staleRunning: IntegerType,
|
|
317
|
-
}),
|
|
318
|
-
});
|
|
319
|
-
/**
|
|
320
|
-
* Complete workspace status including all datasets, tasks, and summary.
|
|
321
|
-
*
|
|
322
|
-
* @property workspace - Workspace name
|
|
323
|
-
* @property lock - Information about current lock holder (if locked)
|
|
324
|
-
* @property datasets - Status of all datasets in the workspace
|
|
325
|
-
* @property tasks - Status of all tasks in the workspace
|
|
326
|
-
* @property summary - Aggregated counts by status
|
|
327
|
-
*/
|
|
328
|
-
export const WorkspaceStatusResultType = StructType({
|
|
329
|
-
workspace: StringType,
|
|
330
|
-
lock: OptionType(LockHolderType),
|
|
331
|
-
datasets: ArrayType(DatasetStatusInfoType),
|
|
332
|
-
tasks: ArrayType(TaskStatusInfoType),
|
|
333
|
-
summary: WorkspaceStatusSummaryType,
|
|
334
|
-
});
|
|
335
|
-
// =============================================================================
|
|
336
|
-
// Task Types
|
|
337
|
-
// =============================================================================
|
|
338
|
-
/**
|
|
339
|
-
* Task list item (summary info).
|
|
340
|
-
*
|
|
341
|
-
* @property name - Task name
|
|
342
|
-
* @property hash - Task definition hash
|
|
343
|
-
*/
|
|
344
|
-
export const TaskListItemType = StructType({
|
|
345
|
-
name: StringType,
|
|
346
|
-
hash: StringType,
|
|
347
|
-
});
|
|
348
|
-
/**
|
|
349
|
-
* Detailed task information.
|
|
350
|
-
*
|
|
351
|
-
* @property name - Task name
|
|
352
|
-
* @property hash - Task definition hash
|
|
353
|
-
* @property commandIr - East IR for the task's command
|
|
354
|
-
* @property inputs - Tree paths for task inputs
|
|
355
|
-
* @property output - Tree path for task output
|
|
356
|
-
*/
|
|
357
|
-
export const TaskDetailsType = StructType({
|
|
358
|
-
name: StringType,
|
|
359
|
-
hash: StringType,
|
|
360
|
-
commandIr: StringType,
|
|
361
|
-
inputs: ArrayType(TreePathType),
|
|
362
|
-
output: TreePathType,
|
|
363
|
-
});
|
|
364
|
-
// =============================================================================
|
|
365
|
-
// Execution Types
|
|
366
|
-
// =============================================================================
|
|
367
|
-
/**
|
|
368
|
-
* Request to start dataflow execution.
|
|
369
|
-
*
|
|
370
|
-
* @property concurrency - Maximum parallel tasks (default: 4)
|
|
371
|
-
* @property force - Force re-execution of all tasks
|
|
372
|
-
* @property filter - Filter to specific task names (glob pattern)
|
|
373
|
-
*/
|
|
374
|
-
export const DataflowRequestType = StructType({
|
|
375
|
-
concurrency: OptionType(IntegerType),
|
|
376
|
-
force: BooleanType,
|
|
377
|
-
filter: OptionType(StringType),
|
|
378
|
-
});
|
|
379
|
-
/**
|
|
380
|
-
* Task in a dependency graph.
|
|
381
|
-
*
|
|
382
|
-
* @property name - Task name
|
|
383
|
-
* @property hash - Task definition hash
|
|
384
|
-
* @property inputs - Dataset paths this task reads from
|
|
385
|
-
* @property output - Dataset path this task writes to
|
|
386
|
-
* @property dependsOn - Names of tasks that must complete before this one
|
|
387
|
-
*/
|
|
388
|
-
export const GraphTaskType = StructType({
|
|
389
|
-
name: StringType,
|
|
390
|
-
hash: StringType,
|
|
391
|
-
inputs: ArrayType(StringType),
|
|
392
|
-
output: StringType,
|
|
393
|
-
dependsOn: ArrayType(StringType),
|
|
394
|
-
});
|
|
395
|
-
/**
|
|
396
|
-
* Dataflow dependency graph.
|
|
397
|
-
*
|
|
398
|
-
* @property tasks - All tasks in the graph with their dependencies
|
|
399
|
-
*/
|
|
400
|
-
export const DataflowGraphType = StructType({
|
|
401
|
-
tasks: ArrayType(GraphTaskType),
|
|
402
|
-
});
|
|
403
|
-
/**
|
|
404
|
-
* Chunk of log data from task execution.
|
|
405
|
-
*
|
|
406
|
-
* @property data - Log content (UTF-8 text)
|
|
407
|
-
* @property offset - Byte offset from start of log
|
|
408
|
-
* @property size - Size of this chunk in bytes
|
|
409
|
-
* @property totalSize - Total size of the log file
|
|
410
|
-
* @property complete - True if this chunk reaches end of file
|
|
411
|
-
*/
|
|
412
|
-
export const LogChunkType = StructType({
|
|
413
|
-
data: StringType,
|
|
414
|
-
offset: IntegerType,
|
|
415
|
-
size: IntegerType,
|
|
416
|
-
totalSize: IntegerType,
|
|
417
|
-
complete: BooleanType,
|
|
418
|
-
});
|
|
419
|
-
/**
|
|
420
|
-
* Result of executing a single task.
|
|
421
|
-
*
|
|
422
|
-
* @property name - Task name
|
|
423
|
-
* @property cached - True if result was retrieved from cache
|
|
424
|
-
* @property state - Execution outcome (success, failed, error, skipped)
|
|
425
|
-
* @property duration - Execution time in seconds
|
|
426
|
-
*/
|
|
427
|
-
export const TaskExecutionResultType = StructType({
|
|
428
|
-
name: StringType,
|
|
429
|
-
cached: BooleanType,
|
|
430
|
-
state: VariantType({
|
|
431
|
-
success: NullType,
|
|
432
|
-
failed: StructType({ exitCode: IntegerType }),
|
|
433
|
-
error: StructType({ message: StringType }),
|
|
434
|
-
skipped: NullType,
|
|
435
|
-
}),
|
|
436
|
-
duration: FloatType,
|
|
437
|
-
});
|
|
438
|
-
/**
|
|
439
|
-
* Result of dataflow execution.
|
|
440
|
-
*
|
|
441
|
-
* @property success - True if all tasks completed successfully
|
|
442
|
-
* @property executed - Number of tasks that were executed
|
|
443
|
-
* @property cached - Number of tasks that used cached results
|
|
444
|
-
* @property failed - Number of tasks that failed
|
|
445
|
-
* @property skipped - Number of tasks that were skipped
|
|
446
|
-
* @property tasks - Per-task execution results
|
|
447
|
-
* @property duration - Total execution time in seconds
|
|
448
|
-
*/
|
|
449
|
-
export const DataflowResultType = StructType({
|
|
450
|
-
success: BooleanType,
|
|
451
|
-
executed: IntegerType,
|
|
452
|
-
cached: IntegerType,
|
|
453
|
-
failed: IntegerType,
|
|
454
|
-
skipped: IntegerType,
|
|
455
|
-
tasks: ArrayType(TaskExecutionResultType),
|
|
456
|
-
duration: FloatType,
|
|
457
|
-
});
|
|
6
|
+
* API types for e3-api-client.
|
|
7
|
+
*
|
|
8
|
+
* Re-exports all API wire types from @elaraai/e3-types (the single source of truth).
|
|
9
|
+
* Types with "Api" prefix in e3-types are re-exported here with shorter names
|
|
10
|
+
* since API consumers don't see the conflicting domain types.
|
|
11
|
+
*/
|
|
12
|
+
// API wire types — re-export from @elaraai/e3-types
|
|
13
|
+
export {
|
|
14
|
+
// Error types
|
|
15
|
+
WorkspaceNotFoundErrorType, WorkspaceNotDeployedErrorType, WorkspaceExistsErrorType, LockHolderType, WorkspaceLockedErrorType, PackageNotFoundErrorType, PackageExistsErrorType, PackageInvalidErrorType, DatasetNotFoundErrorType, TaskNotFoundErrorType, ExecutionNotFoundErrorType, ObjectNotFoundErrorType, DataflowErrorType, PermissionDeniedErrorType, InternalErrorType, RepositoryNotFoundErrorType, ErrorType, ResponseType,
|
|
16
|
+
// Repository
|
|
17
|
+
RepositoryStatusType, GcRequestType, GcResultType, AsyncOperationStatusType, GcStartResultType, GcStatusResultType,
|
|
18
|
+
// Packages
|
|
19
|
+
PackageListItemType, PackageImportResultType, PackageInfoType, PackageDetailsType,
|
|
20
|
+
// Workspaces
|
|
21
|
+
WorkspaceCreateRequestType, WorkspaceInfoType, WorkspaceDeployRequestType, WorkspaceExportRequestType,
|
|
22
|
+
// Workspace Status
|
|
23
|
+
DatasetStatusType, TaskStatusUpToDateType, TaskStatusWaitingType, TaskStatusInProgressType, TaskStatusFailedType, TaskStatusErrorType, TaskStatusStaleRunningType, TaskStatusType, DatasetStatusInfoType, TaskStatusInfoType, WorkspaceStatusSummaryType, WorkspaceStatusResultType,
|
|
24
|
+
// Tasks
|
|
25
|
+
TaskListItemType, TaskDetailsType,
|
|
26
|
+
// Execution
|
|
27
|
+
DataflowRequestType, LogChunkType, TaskExecutionResultType, DataflowResultType,
|
|
28
|
+
// Dataflow API polling
|
|
29
|
+
DataflowEventType, ApiExecutionStatusType as ExecutionStatusType, DataflowExecutionSummaryType, ApiDataflowExecutionStateType as DataflowExecutionStateType,
|
|
30
|
+
// Task Execution History
|
|
31
|
+
ExecutionHistoryStatusType, ExecutionListItemType,
|
|
32
|
+
// Dataset List
|
|
33
|
+
TreeKindType, ListEntryType,
|
|
34
|
+
// Dataset Status Detail
|
|
35
|
+
DatasetStatusDetailType,
|
|
36
|
+
// Transfer types
|
|
37
|
+
TransferUploadRequestType, TransferUploadResponseType, TransferDoneResponseType, PackageImportStatusType, PackageExportStatusType,
|
|
38
|
+
// Graph types (from dataflow.ts, structurally identical to old API GraphTaskType)
|
|
39
|
+
DataflowGraphType, DataflowGraphTaskType, } from '@elaraai/e3-types';
|
|
458
40
|
// =============================================================================
|
|
459
41
|
// Namespace export for convenience
|
|
460
42
|
// =============================================================================
|
|
43
|
+
import { ErrorType, RepositoryNotFoundErrorType, WorkspaceNotFoundErrorType, WorkspaceNotDeployedErrorType, WorkspaceExistsErrorType, WorkspaceLockedErrorType, LockHolderType, PackageNotFoundErrorType, PackageExistsErrorType, PackageInvalidErrorType, DatasetNotFoundErrorType, TaskNotFoundErrorType, ExecutionNotFoundErrorType, ObjectNotFoundErrorType, DataflowErrorType, PermissionDeniedErrorType, InternalErrorType, ResponseType, RepositoryStatusType, GcRequestType, GcResultType, AsyncOperationStatusType, GcStartResultType, GcStatusResultType, PackageListItemType, PackageImportResultType, PackageInfoType, PackageDetailsType, WorkspaceCreateRequestType, WorkspaceInfoType, WorkspaceDeployRequestType, WorkspaceExportRequestType, DatasetStatusType, TaskStatusType, TaskStatusUpToDateType, TaskStatusWaitingType, TaskStatusInProgressType, TaskStatusFailedType, TaskStatusErrorType, TaskStatusStaleRunningType, DatasetStatusInfoType, TaskStatusInfoType, WorkspaceStatusSummaryType, WorkspaceStatusResultType, TaskListItemType, TaskDetailsType, DataflowRequestType, DataflowGraphType, DataflowGraphTaskType, LogChunkType, TaskExecutionResultType, DataflowResultType, DataflowEventType, ApiExecutionStatusType, DataflowExecutionSummaryType, ApiDataflowExecutionStateType, ExecutionHistoryStatusType, ExecutionListItemType, TreeKindType, ListEntryType, DatasetStatusDetailType, TransferUploadRequestType, TransferUploadResponseType, TransferDoneResponseType, PackageImportStatusType, PackageExportStatusType, } from '@elaraai/e3-types';
|
|
461
44
|
export const ApiTypes = {
|
|
462
45
|
// Errors
|
|
463
46
|
ErrorType,
|
|
47
|
+
RepositoryNotFoundErrorType,
|
|
464
48
|
WorkspaceNotFoundErrorType,
|
|
465
49
|
WorkspaceNotDeployedErrorType,
|
|
466
50
|
WorkspaceExistsErrorType,
|
|
@@ -471,6 +55,7 @@ export const ApiTypes = {
|
|
|
471
55
|
PackageInvalidErrorType,
|
|
472
56
|
DatasetNotFoundErrorType,
|
|
473
57
|
TaskNotFoundErrorType,
|
|
58
|
+
ExecutionNotFoundErrorType,
|
|
474
59
|
ObjectNotFoundErrorType,
|
|
475
60
|
DataflowErrorType,
|
|
476
61
|
PermissionDeniedErrorType,
|
|
@@ -481,6 +66,10 @@ export const ApiTypes = {
|
|
|
481
66
|
RepositoryStatusType,
|
|
482
67
|
GcRequestType,
|
|
483
68
|
GcResultType,
|
|
69
|
+
// Async Operations
|
|
70
|
+
AsyncOperationStatusType,
|
|
71
|
+
GcStartResultType,
|
|
72
|
+
GcStatusResultType,
|
|
484
73
|
// Packages
|
|
485
74
|
PackageListItemType,
|
|
486
75
|
PackageImportResultType,
|
|
@@ -490,6 +79,7 @@ export const ApiTypes = {
|
|
|
490
79
|
WorkspaceCreateRequestType,
|
|
491
80
|
WorkspaceInfoType,
|
|
492
81
|
WorkspaceDeployRequestType,
|
|
82
|
+
WorkspaceExportRequestType,
|
|
493
83
|
// Workspace Status
|
|
494
84
|
DatasetStatusType,
|
|
495
85
|
TaskStatusType,
|
|
@@ -508,10 +98,29 @@ export const ApiTypes = {
|
|
|
508
98
|
TaskDetailsType,
|
|
509
99
|
// Execution
|
|
510
100
|
DataflowRequestType,
|
|
511
|
-
GraphTaskType,
|
|
512
101
|
DataflowGraphType,
|
|
102
|
+
DataflowGraphTaskType,
|
|
513
103
|
LogChunkType,
|
|
514
104
|
TaskExecutionResultType,
|
|
515
105
|
DataflowResultType,
|
|
106
|
+
// Execution State (polling)
|
|
107
|
+
DataflowEventType,
|
|
108
|
+
ExecutionStatusType: ApiExecutionStatusType,
|
|
109
|
+
DataflowExecutionSummaryType,
|
|
110
|
+
DataflowExecutionStateType: ApiDataflowExecutionStateType,
|
|
111
|
+
// Task Execution History
|
|
112
|
+
ExecutionHistoryStatusType,
|
|
113
|
+
ExecutionListItemType,
|
|
114
|
+
// Dataset List (recursive)
|
|
115
|
+
TreeKindType,
|
|
116
|
+
ListEntryType,
|
|
117
|
+
// Dataset Status Detail (single dataset)
|
|
118
|
+
DatasetStatusDetailType,
|
|
119
|
+
// Transfer
|
|
120
|
+
TransferUploadRequestType,
|
|
121
|
+
TransferUploadResponseType,
|
|
122
|
+
TransferDoneResponseType,
|
|
123
|
+
PackageImportStatusType,
|
|
124
|
+
PackageExportStatusType,
|
|
516
125
|
};
|
|
517
126
|
//# sourceMappingURL=types.js.map
|
package/dist/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAEH,oDAAoD;AACpD,OAAO;AACL,cAAc;AACd,0BAA0B,EAC1B,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EACjB,2BAA2B,EAC3B,SAAS,EACT,YAAY;AACZ,aAAa;AACb,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB;AAClB,WAAW;AACX,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,kBAAkB;AAClB,aAAa;AACb,0BAA0B,EAC1B,iBAAiB,EACjB,0BAA0B,EAC1B,0BAA0B;AAC1B,mBAAmB;AACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB;AACzB,QAAQ;AACR,gBAAgB,EAChB,eAAe;AACf,YAAY;AACZ,mBAAmB,EACnB,YAAY,EACZ,uBAAuB,EACvB,kBAAkB;AAClB,uBAAuB;A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C,uBAAuB;IAEvB,WAAW;IACX,yBAAyB;IACzB,0BAA0B;IAC1B,wBAAwB;IACxB,uBAAuB;IACvB,uBAAuB;CACf,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Calculate SHA256 hash of data for content-addressed transfers.
|
|
7
|
+
*
|
|
8
|
+
* This is a browser-safe version using the Web Crypto API (crypto.subtle),
|
|
9
|
+
* which is available in both Node.js (>=15) and all modern browsers.
|
|
10
|
+
*
|
|
11
|
+
* The canonical sync implementation lives in @elaraai/e3-core (objects.ts)
|
|
12
|
+
* but uses Node.js `crypto.createHash` which is not available in browser
|
|
13
|
+
* environments. This async version produces identical SHA-256 output and
|
|
14
|
+
* is used here because e3-api-client must be browser-compatible (used by
|
|
15
|
+
* e3-ui-components in webview builds).
|
|
16
|
+
*
|
|
17
|
+
* @param data - Data to hash
|
|
18
|
+
* @returns SHA256 hash as a hex string
|
|
19
|
+
*/
|
|
20
|
+
export declare function computeHash(data: Uint8Array): Promise<string>;
|
|
21
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAKnE"}
|