@elaraai/e3-api-client 1.0.79 → 1.0.81

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.
Files changed (57) hide show
  1. package/README.md +19 -9
  2. package/dist/src/datasets-transfer.spec.js +21 -33
  3. package/dist/src/datasets-transfer.spec.js.map +1 -1
  4. package/dist/src/datasets.d.ts +77 -9
  5. package/dist/src/datasets.d.ts.map +1 -1
  6. package/dist/src/datasets.js +190 -34
  7. package/dist/src/datasets.js.map +1 -1
  8. package/dist/src/datasets.spec.js +131 -4
  9. package/dist/src/datasets.spec.js.map +1 -1
  10. package/dist/src/executions.d.ts +17 -6
  11. package/dist/src/executions.d.ts.map +1 -1
  12. package/dist/src/executions.js +21 -8
  13. package/dist/src/executions.js.map +1 -1
  14. package/dist/src/http.d.ts +19 -5
  15. package/dist/src/http.d.ts.map +1 -1
  16. package/dist/src/http.js +25 -14
  17. package/dist/src/http.js.map +1 -1
  18. package/dist/src/index.d.ts +8 -7
  19. package/dist/src/index.d.ts.map +1 -1
  20. package/dist/src/index.js +6 -9
  21. package/dist/src/index.js.map +1 -1
  22. package/dist/src/packages.d.ts +11 -1
  23. package/dist/src/packages.d.ts.map +1 -1
  24. package/dist/src/packages.js +16 -6
  25. package/dist/src/packages.js.map +1 -1
  26. package/dist/src/platform.d.ts +231 -34
  27. package/dist/src/platform.d.ts.map +1 -1
  28. package/dist/src/platform.js +2 -6
  29. package/dist/src/platform.js.map +1 -1
  30. package/dist/src/records.d.ts.map +1 -1
  31. package/dist/src/records.js +1 -1
  32. package/dist/src/records.js.map +1 -1
  33. package/dist/src/records.spec.d.ts +6 -0
  34. package/dist/src/records.spec.d.ts.map +1 -0
  35. package/dist/src/records.spec.js +73 -0
  36. package/dist/src/records.spec.js.map +1 -0
  37. package/dist/src/repository.d.ts +14 -0
  38. package/dist/src/repository.d.ts.map +1 -1
  39. package/dist/src/repository.js +16 -0
  40. package/dist/src/repository.js.map +1 -1
  41. package/dist/src/types.d.ts +534 -17
  42. package/dist/src/types.d.ts.map +1 -1
  43. package/dist/src/types.js +13 -3
  44. package/dist/src/types.js.map +1 -1
  45. package/dist/src/util.d.ts +9 -7
  46. package/dist/src/util.d.ts.map +1 -1
  47. package/dist/src/util.js +14 -8
  48. package/dist/src/util.js.map +1 -1
  49. package/dist/src/util.spec.d.ts +6 -0
  50. package/dist/src/util.spec.d.ts.map +1 -0
  51. package/dist/src/util.spec.js +34 -0
  52. package/dist/src/util.spec.js.map +1 -0
  53. package/dist/src/workspaces.d.ts +51 -4
  54. package/dist/src/workspaces.d.ts.map +1 -1
  55. package/dist/src/workspaces.js +57 -7
  56. package/dist/src/workspaces.js.map +1 -1
  57. package/package.json +5 -5
@@ -1 +1 @@
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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHX,CAAC"}
package/dist/src/types.js CHANGED
@@ -18,7 +18,7 @@ RepositoryStatusType, GcRequestType, GcResultType, AsyncOperationStatusType, GcS
18
18
  // Packages
19
19
  PackageListItemType, PackageImportResultType, PackageInfoType, PackageDetailsType,
20
20
  // Workspaces
21
- WorkspaceCreateRequestType, WorkspaceInfoType, WorkspaceDeployRequestType, WorkspaceExportRequestType,
21
+ WorkspaceCreateRequestType, WorkspaceInfoType, SchemaPolicyType, WorkspaceDeployRequestType, RecordPlanType, RecordIndexPlanType, WorkspaceDeployResultType, WorkspaceDeployProgressType, WorkspaceDeployStatusType, WorkspaceExportRequestType, LockStatusType,
22
22
  // Workspace Status
23
23
  DatasetStatusType, TaskStatusUpToDateType, TaskStatusWaitingType, TaskStatusInProgressType, TaskStatusFailedType, TaskStatusErrorType, TaskStatusStaleRunningType, TaskStatusType, DatasetStatusInfoType, TaskStatusInfoType, WorkspaceStatusSummaryType, WorkspaceStatusResultType,
24
24
  // Tasks
@@ -26,7 +26,7 @@ TaskListItemType, TaskDetailsType,
26
26
  // Execution
27
27
  DataflowRequestType, LogChunkType, TaskExecutionResultType, DataflowResultType,
28
28
  // Dataflow API polling
29
- DataflowEventType, ApiExecutionStatusType as ExecutionStatusType, DataflowExecutionSummaryType, ApiDataflowExecutionStateType as DataflowExecutionStateType,
29
+ DataflowEventType, ApiExecutionStatusType as ExecutionStatusType, DataflowExecutionSummaryType, DataflowBudgetType, UnitWaitType, SplitProgressType, ApiDataflowExecutionStateType as DataflowExecutionStateType,
30
30
  // Task Execution History
31
31
  ExecutionHistoryStatusType, ExecutionListItemType,
32
32
  // Dataset List
@@ -42,7 +42,7 @@ DataflowGraphType, DataflowGraphTaskType, } from '@elaraai/e3-types';
42
42
  // =============================================================================
43
43
  // Namespace export for convenience
44
44
  // =============================================================================
45
- 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, TransferPartResponseType, TransferDoneResponseType, PackageImportStatusType, PackageExportStatusType, RunnerType as _RunnerType, ExecuteLimitsType as _ExecuteLimitsType, DiagnosticType as _DiagnosticType, ExecuteResultType as _ExecuteResultType, FunctionCallRequestType as _FunctionCallRequestType, FunctionSignatureType as _FunctionSignatureType, OneShotRequestType as _OneShotRequestType, } from '@elaraai/e3-types';
45
+ 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, SchemaPolicyType, WorkspaceDeployRequestType, RecordPlanType, RecordIndexPlanType, WorkspaceDeployResultType, WorkspaceDeployProgressType, WorkspaceDeployStatusType, WorkspaceExportRequestType, LockStatusType, DatasetStatusType, TaskStatusType, TaskStatusUpToDateType, TaskStatusWaitingType, TaskStatusInProgressType, TaskStatusFailedType, TaskStatusErrorType, TaskStatusStaleRunningType, DatasetStatusInfoType, TaskStatusInfoType, WorkspaceStatusSummaryType, WorkspaceStatusResultType, TaskListItemType, TaskDetailsType, DataflowRequestType, DataflowGraphType, DataflowGraphTaskType, LogChunkType, TaskExecutionResultType, DataflowResultType, DataflowEventType, ApiExecutionStatusType, DataflowExecutionSummaryType, DataflowBudgetType, UnitWaitType, SplitProgressType, ApiDataflowExecutionStateType, ExecutionHistoryStatusType, ExecutionListItemType, TreeKindType, ListEntryType, DatasetStatusDetailType, TransferUploadRequestType, TransferUploadResponseType, TransferPartResponseType, TransferDoneResponseType, PackageImportStatusType, PackageExportStatusType, RunnerType as _RunnerType, ExecuteLimitsType as _ExecuteLimitsType, DiagnosticType as _DiagnosticType, ExecuteResultType as _ExecuteResultType, FunctionCallRequestType as _FunctionCallRequestType, FunctionSignatureType as _FunctionSignatureType, OneShotRequestType as _OneShotRequestType, } from '@elaraai/e3-types';
46
46
  export const ApiTypes = {
47
47
  // Errors
48
48
  ErrorType,
@@ -80,8 +80,15 @@ export const ApiTypes = {
80
80
  // Workspaces
81
81
  WorkspaceCreateRequestType,
82
82
  WorkspaceInfoType,
83
+ SchemaPolicyType,
83
84
  WorkspaceDeployRequestType,
85
+ RecordPlanType,
86
+ RecordIndexPlanType,
87
+ WorkspaceDeployResultType,
88
+ WorkspaceDeployProgressType,
89
+ WorkspaceDeployStatusType,
84
90
  WorkspaceExportRequestType,
91
+ LockStatusType,
85
92
  // Workspace Status
86
93
  DatasetStatusType,
87
94
  TaskStatusType,
@@ -109,6 +116,9 @@ export const ApiTypes = {
109
116
  DataflowEventType,
110
117
  ExecutionStatusType: ApiExecutionStatusType,
111
118
  DataflowExecutionSummaryType,
119
+ DataflowBudgetType,
120
+ UnitWaitType,
121
+ SplitProgressType,
112
122
  DataflowExecutionStateType: ApiDataflowExecutionStateType,
113
123
  // Task Execution History
114
124
  ExecutionHistoryStatusType,
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAM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zC,uBAAuB;IAEvB,WAAW;IACX,yBAAyB;IACzB,0BAA0B;IAC1B,wBAAwB;IACxB,wBAAwB;IACxB,uBAAuB;IACvB,uBAAuB;IAEvB,gCAAgC;IAChC,UAAU,EAAE,WAAW;IACvB,iBAAiB,EAAE,kBAAkB;IACrC,cAAc,EAAE,eAAe;IAC/B,iBAAiB,EAAE,kBAAkB;IACrC,uBAAuB,EAAE,wBAAwB;IACjD,qBAAqB,EAAE,sBAAsB;IAC7C,kBAAkB,EAAE,mBAAmB;CAC/B,CAAC"}
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,gBAAgB,EAChB,0BAA0B,EAC1B,cAAc,EACd,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,0BAA0B,EAC1B,cAAc;AACd,mBAAmB;AACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAy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-addressed transfers.
7
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.
8
+ * This is a browser-safe version, used because e3-api-client must be
9
+ * browser-compatible (used by e3-ui-components in webview builds). The
10
+ * canonical sync implementation lives in @elaraai/e3-core (objects.ts) but uses
11
+ * Node.js `crypto.createHash`, which is not available in browser environments.
10
12
  *
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).
13
+ * It uses the Web Crypto API (`crypto.subtle`) where the context has it:
14
+ * Node.js (>=15), and a browser page served over https or from localhost. A
15
+ * browser provides it only in a secure context, so a page served over plain
16
+ * http from any other address hashes with east's own SHA-256, which produces
17
+ * the same digest.
16
18
  *
17
19
  * @param data - Data to hash
18
20
  * @returns SHA256 hash as a hex string
@@ -1 +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"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAOnE"}
package/dist/src/util.js CHANGED
@@ -2,23 +2,29 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Licensed under BSL 1.1. See LICENSE for details.
4
4
  */
5
+ import { sha256Hex } from '@elaraai/east';
5
6
  /**
6
7
  * Calculate SHA256 hash of data for content-addressed transfers.
7
8
  *
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.
9
+ * This is a browser-safe version, used because e3-api-client must be
10
+ * browser-compatible (used by e3-ui-components in webview builds). The
11
+ * canonical sync implementation lives in @elaraai/e3-core (objects.ts) but uses
12
+ * Node.js `crypto.createHash`, which is not available in browser environments.
10
13
  *
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).
14
+ * It uses the Web Crypto API (`crypto.subtle`) where the context has it:
15
+ * Node.js (>=15), and a browser page served over https or from localhost. A
16
+ * browser provides it only in a secure context, so a page served over plain
17
+ * http from any other address hashes with east's own SHA-256, which produces
18
+ * the same digest.
16
19
  *
17
20
  * @param data - Data to hash
18
21
  * @returns SHA256 hash as a hex string
19
22
  */
20
23
  export async function computeHash(data) {
21
- const hashBuffer = await crypto.subtle.digest('SHA-256', data);
24
+ const subtle = globalThis.crypto?.subtle;
25
+ if (subtle === undefined)
26
+ return sha256Hex(data);
27
+ const hashBuffer = await subtle.digest('SHA-256', data);
22
28
  return Array.from(new Uint8Array(hashBuffer))
23
29
  .map(b => b.toString(16).padStart(2, '0'))
24
30
  .join('');
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAgB;IAChD,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC/D,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;SAC1C,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;SACzC,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAgB;IAChD,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC;IACzC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACxD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;SAC1C,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;SACzC,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Licensed under BSL 1.1. See LICENSE for details.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=util.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.spec.d.ts","sourceRoot":"","sources":["../../src/util.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Licensed under BSL 1.1. See LICENSE for details.
4
+ */
5
+ /**
6
+ * The hash a download checks each object against. A browser provides WebCrypto
7
+ * only in a secure context, so a page served over plain http from any address
8
+ * but localhost has `crypto` without `crypto.subtle`, and must still hash.
9
+ */
10
+ import { describe, it } from 'node:test';
11
+ import assert from 'node:assert/strict';
12
+ import { computeHash } from './util.js';
13
+ describe('computeHash', () => {
14
+ const abc = new TextEncoder().encode('abc');
15
+ const ABC = 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad';
16
+ // Two blocks and a partial third, so the fallback's padding is exercised.
17
+ const long = Uint8Array.from({ length: 150 }, (_, i) => i);
18
+ it('hashes with WebCrypto where the context has it', async () => {
19
+ assert.equal(await computeHash(abc), ABC);
20
+ });
21
+ it('hashes where the context has no WebCrypto digest, to the same digest', async () => {
22
+ const expected = await computeHash(long);
23
+ const own = Object.getOwnPropertyDescriptor(globalThis, 'crypto');
24
+ Object.defineProperty(globalThis, 'crypto', { value: {}, configurable: true, writable: true });
25
+ try {
26
+ assert.equal(await computeHash(abc), ABC);
27
+ assert.equal(await computeHash(long), expected);
28
+ }
29
+ finally {
30
+ Object.defineProperty(globalThis, 'crypto', own);
31
+ }
32
+ });
33
+ });
34
+ //# sourceMappingURL=util.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.spec.js","sourceRoot":"","sources":["../../src/util.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,MAAM,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,kEAAkE,CAAC;IAC/E,0EAA0E;IAC1E,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAE3D,EAAE,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QAC9D,MAAM,CAAC,KAAK,CAAC,MAAM,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sEAAsE,EAAE,KAAK,IAAI,EAAE;QACpF,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,GAAG,GAAG,MAAM,CAAC,wBAAwB,CAAC,UAAU,EAAE,QAAQ,CAAE,CAAC;QACnE,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/F,IAAI,CAAC;YACH,MAAM,CAAC,KAAK,CAAC,MAAM,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;YAC1C,MAAM,CAAC,KAAK,CAAC,MAAM,WAAW,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;QAClD,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * Licensed under BSL 1.1. See LICENSE for details.
4
4
  */
5
5
  import { type WorkspaceState, type PackageExportProgress } from '@elaraai/e3-types';
6
- import type { WorkspaceInfo, WorkspaceStatusResult } from './types.js';
6
+ import type { LockStatus, SchemaPolicy, WorkspaceDeployProgress, WorkspaceDeployResult, WorkspaceInfo, WorkspaceStatusResult } from './types.js';
7
7
  import { type RequestOptions } from './http.js';
8
8
  /**
9
9
  * List all workspaces in the repository.
@@ -43,7 +43,7 @@ export declare function workspaceGet(url: string, repo: string, name: string, op
43
43
  /**
44
44
  * Get comprehensive workspace status including datasets, tasks, and lock info.
45
45
  *
46
- * Use this to poll for execution progress after calling dataflowStart().
46
+ * Use this to poll for execution progress after calling dataflowExecuteLaunch().
47
47
  *
48
48
  * @param url - Base URL of the e3 API server
49
49
  * @param repo - Repository name
@@ -54,6 +54,26 @@ export declare function workspaceGet(url: string, repo: string, name: string, op
54
54
  * @throws {AuthError} On 401 Unauthorized
55
55
  */
56
56
  export declare function workspaceStatus(url: string, repo: string, name: string, options: RequestOptions): Promise<WorkspaceStatusResult>;
57
+ /**
58
+ * What holds a workspace exclusively, and how far that operation says it has
59
+ * got.
60
+ *
61
+ * @remarks
62
+ * A workspace deployed for the first time has no status until its deploy
63
+ * ends: {@link workspaceStatus} answers `workspace_not_deployed` meanwhile. Its
64
+ * lock says a deploy holds it, and how far the deploy has got with its file
65
+ * sources and its records.
66
+ *
67
+ * @param url - Base URL of the e3 API server
68
+ * @param repo - Repository name
69
+ * @param name - Workspace name
70
+ * @param options - Request options including auth token
71
+ * @returns The lock's state and what its holder last reported, or null when
72
+ * nothing holds the workspace exclusively
73
+ * @throws {ApiError} On application-level errors
74
+ * @throws {AuthError} On 401 Unauthorized
75
+ */
76
+ export declare function workspaceLockStatus(url: string, repo: string, name: string, options: RequestOptions): Promise<LockStatus | null>;
57
77
  /**
58
78
  * Remove a workspace.
59
79
  *
@@ -65,18 +85,45 @@ export declare function workspaceStatus(url: string, repo: string, name: string,
65
85
  * @throws {AuthError} On 401 Unauthorized
66
86
  */
67
87
  export declare function workspaceRemove(url: string, repo: string, name: string, options: RequestOptions): Promise<void>;
88
+ /**
89
+ * Options for a workspace deploy.
90
+ */
91
+ export interface WorkspaceDeployOptions {
92
+ /** What the deploy does with a record it cannot keep as it is (default
93
+ * `migrate`). */
94
+ schema?: SchemaPolicy;
95
+ /** Whether a record the package no longer declares may be dropped, with its
96
+ * state and history (default false). */
97
+ allowDropRecords?: boolean;
98
+ /** Say what the deploy would do, and write nothing (default false). */
99
+ plan?: boolean;
100
+ /** Called with the job's progress each time a poll finds it running. */
101
+ onProgress?: (progress: WorkspaceDeployProgress) => void;
102
+ signal?: AbortSignal;
103
+ }
68
104
  /**
69
105
  * Deploy a package to a workspace.
70
106
  *
107
+ * @remarks
108
+ * The server runs the deploy as a job, since one that migrates a record, or
109
+ * builds an index over one, can outlast a request. This starts the job and
110
+ * polls it until it answers: 100 ms apart at first, backing off to a second.
111
+ *
71
112
  * @param url - Base URL of the e3 API server
72
113
  * @param repo - Repository name
73
114
  * @param name - Workspace name
74
115
  * @param packageRef - Package reference (name or name@version)
75
116
  * @param options - Request options including auth token
76
- * @throws {ApiError} On application-level errors
117
+ * @param deployOptions - What the deploy does with a record it cannot keep,
118
+ * whether it only plans, and its progress and cancellation
119
+ * @returns What the deploy decided for each record and index, and the inputs
120
+ * it left unassigned
121
+ * @throws {ApiError} When the server does not start the deploy, such as for a
122
+ * package the repository does not hold
77
123
  * @throws {AuthError} On 401 Unauthorized
124
+ * @throws {Error} When the deploy fails, or refuses a record
78
125
  */
79
- export declare function workspaceDeploy(url: string, repo: string, name: string, packageRef: string, options: RequestOptions): Promise<void>;
126
+ export declare function workspaceDeploy(url: string, repo: string, name: string, packageRef: string, options: RequestOptions, deployOptions?: WorkspaceDeployOptions): Promise<WorkspaceDeployResult>;
80
127
  /**
81
128
  * Options for workspace export progress reporting.
82
129
  */
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../src/workspaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAUvE,OAAO,EAA8D,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAG5G;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO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IAAI,CAAC;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,cAAc,EACvB,aAAa,CAAC,EAAE,sBAAsB,GACrC,OAAO,CAAC,UAAU,CAAC,CA0CrB"}
@@ -2,12 +2,12 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Licensed under BSL 1.1. See LICENSE for details.
4
4
  */
5
- import { ArrayType, NullType, encodeBeast2For, decodeBeast2For, some, none } from '@elaraai/east';
5
+ import { ArrayType, NullType, OptionType, encodeBeast2For, decodeBeast2For, some, none, variant } from '@elaraai/east';
6
6
  import { WorkspaceStateType, PackageJobResponseType, } from '@elaraai/e3-types';
7
- import { WorkspaceInfoType, WorkspaceCreateRequestType, WorkspaceDeployRequestType, WorkspaceStatusResultType, WorkspaceExportRequestType, ResponseType, } from './types.js';
7
+ import { WorkspaceInfoType, WorkspaceCreateRequestType, WorkspaceDeployRequestType, WorkspaceDeployStatusType, WorkspaceStatusResultType, WorkspaceExportRequestType, LockStatusType, ResponseType, } from './types.js';
8
8
  import { BEAST2_CONTENT_TYPE } from '@elaraai/e3-types';
9
9
  import { get, post, del, fetchWithAuth, fetchWithProgress, ApiError } from './http.js';
10
- import { pollExport } from './packages.js';
10
+ import { JOB_POLL_MAX_MS, JOB_POLL_MIN_MS, pollExport } from './packages.js';
11
11
  /**
12
12
  * List all workspaces in the repository.
13
13
  *
@@ -52,7 +52,7 @@ export async function workspaceGet(url, repo, name, options) {
52
52
  /**
53
53
  * Get comprehensive workspace status including datasets, tasks, and lock info.
54
54
  *
55
- * Use this to poll for execution progress after calling dataflowStart().
55
+ * Use this to poll for execution progress after calling dataflowExecuteLaunch().
56
56
  *
57
57
  * @param url - Base URL of the e3 API server
58
58
  * @param repo - Repository name
@@ -65,6 +65,29 @@ export async function workspaceGet(url, repo, name, options) {
65
65
  export async function workspaceStatus(url, repo, name, options) {
66
66
  return get(url, `/repos/${encodeURIComponent(repo)}/workspaces/${encodeURIComponent(name)}/status`, WorkspaceStatusResultType, options);
67
67
  }
68
+ /**
69
+ * What holds a workspace exclusively, and how far that operation says it has
70
+ * got.
71
+ *
72
+ * @remarks
73
+ * A workspace deployed for the first time has no status until its deploy
74
+ * ends: {@link workspaceStatus} answers `workspace_not_deployed` meanwhile. Its
75
+ * lock says a deploy holds it, and how far the deploy has got with its file
76
+ * sources and its records.
77
+ *
78
+ * @param url - Base URL of the e3 API server
79
+ * @param repo - Repository name
80
+ * @param name - Workspace name
81
+ * @param options - Request options including auth token
82
+ * @returns The lock's state and what its holder last reported, or null when
83
+ * nothing holds the workspace exclusively
84
+ * @throws {ApiError} On application-level errors
85
+ * @throws {AuthError} On 401 Unauthorized
86
+ */
87
+ export async function workspaceLockStatus(url, repo, name, options) {
88
+ const status = await get(url, `/repos/${encodeURIComponent(repo)}/workspaces/${encodeURIComponent(name)}/lock`, OptionType(LockStatusType), options);
89
+ return status.type === 'some' ? status.value : null;
90
+ }
68
91
  /**
69
92
  * Remove a workspace.
70
93
  *
@@ -81,16 +104,43 @@ export async function workspaceRemove(url, repo, name, options) {
81
104
  /**
82
105
  * Deploy a package to a workspace.
83
106
  *
107
+ * @remarks
108
+ * The server runs the deploy as a job, since one that migrates a record, or
109
+ * builds an index over one, can outlast a request. This starts the job and
110
+ * polls it until it answers: 100 ms apart at first, backing off to a second.
111
+ *
84
112
  * @param url - Base URL of the e3 API server
85
113
  * @param repo - Repository name
86
114
  * @param name - Workspace name
87
115
  * @param packageRef - Package reference (name or name@version)
88
116
  * @param options - Request options including auth token
89
- * @throws {ApiError} On application-level errors
117
+ * @param deployOptions - What the deploy does with a record it cannot keep,
118
+ * whether it only plans, and its progress and cancellation
119
+ * @returns What the deploy decided for each record and index, and the inputs
120
+ * it left unassigned
121
+ * @throws {ApiError} When the server does not start the deploy, such as for a
122
+ * package the repository does not hold
90
123
  * @throws {AuthError} On 401 Unauthorized
124
+ * @throws {Error} When the deploy fails, or refuses a record
91
125
  */
92
- export async function workspaceDeploy(url, repo, name, packageRef, options) {
93
- await post(url, `/repos/${encodeURIComponent(repo)}/workspaces/${encodeURIComponent(name)}/deploy`, { packageRef }, WorkspaceDeployRequestType, NullType, options);
126
+ export async function workspaceDeploy(url, repo, name, packageRef, options, deployOptions = {}) {
127
+ const path = `/repos/${encodeURIComponent(repo)}/workspaces/${encodeURIComponent(name)}/deploy`;
128
+ const { id } = await post(url, path, {
129
+ packageRef,
130
+ schema: variant(deployOptions.schema ?? 'migrate', null),
131
+ allowDropRecords: deployOptions.allowDropRecords ?? false,
132
+ plan: deployOptions.plan ?? false,
133
+ }, WorkspaceDeployRequestType, PackageJobResponseType, options);
134
+ for (let wait = JOB_POLL_MIN_MS;; wait = Math.min(wait * 2, JOB_POLL_MAX_MS)) {
135
+ deployOptions.signal?.throwIfAborted();
136
+ const status = await get(url, `${path}/${encodeURIComponent(id)}`, WorkspaceDeployStatusType, options);
137
+ if (status.type === 'completed')
138
+ return status.value;
139
+ if (status.type === 'failed')
140
+ throw new Error(`Workspace deploy failed: ${status.value.message}`);
141
+ deployOptions.onProgress?.(status.value);
142
+ await new Promise((resolve) => setTimeout(resolve, wait));
143
+ }
94
144
  }
95
145
  /**
96
146
  * Export workspace as a package zip archive.
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../src/workspaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EACL,kBAAkB,EAElB,sBAAsB,GAEvB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC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AE,CAAC,CAAC;IACrE,MAAM,aAAa,GAAG,eAAe,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC,CAAC;IAC5E,MAAM,aAAa,GAAG,aAAa,CAAC,aAAa,CAA2G,CAAC;IAC7J,IAAI,aAAa,CAAC,IAAI,KAAK,OAAO;QAAE,MAAM,IAAI,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE5G,qBAAqB;IACrB,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAEtH,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,4BAA4B,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;IAErC,4DAA4D;IAC5D,OAAO,iBAAiB,CAAC,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC;AACnF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elaraai/e3-api-client",
3
- "version": "1.0.79",
3
+ "version": "1.0.81",
4
4
  "type": "module",
5
5
  "description": "East Execution Engine API Client - TypeScript client library for e3 API server",
6
6
  "main": "dist/src/index.js",
@@ -30,10 +30,10 @@
30
30
  "directory": "libs/e3/packages/e3-api-client"
31
31
  },
32
32
  "dependencies": {
33
- "@elaraai/e3-types": "1.0.79"
33
+ "@elaraai/e3-types": "1.0.81"
34
34
  },
35
35
  "peerDependencies": {
36
- "@elaraai/east": "1.0.79"
36
+ "@elaraai/east": "1.0.81"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.0.0",
@@ -42,11 +42,11 @@
42
42
  "eslint": "^9.0.0",
43
43
  "eslint-plugin-headers": "^1.3.3",
44
44
  "typescript": "^5.6.0",
45
- "@elaraai/east-node-std": "1.0.79"
45
+ "@elaraai/east-node-std": "1.0.81"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "tsc",
49
- "test": "npm run build && node --enable-source-maps --test-reporter=spec --test 'dist/src/**/*.spec.js'",
49
+ "test": "npm run build && node --enable-source-maps --test-reporter=spec --test-timeout=480000 --test 'dist/src/**/*.spec.js'",
50
50
  "lint": "eslint .",
51
51
  "lint:fix": "eslint . --fix"
52
52
  }