@twin.org/dataspace-models 0.0.3-next.25 → 0.0.3-next.27
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/es/entities/dataspaceAppDataset.js +76 -0
- package/dist/es/entities/dataspaceAppDataset.js.map +1 -0
- package/dist/es/index.js +24 -11
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IActivityLogDetails.js.map +1 -1
- package/dist/es/models/IActivityLogEntry.js.map +1 -1
- package/dist/es/models/IActivityTask.js.map +1 -1
- package/dist/es/models/{IActivityLogDates.js → IActivityTaskEntry.js} +1 -1
- package/dist/es/models/IActivityTaskEntry.js.map +1 -0
- package/dist/es/models/IExecutionPayload.js.map +1 -1
- package/dist/es/models/activityTaskStatus.js +25 -0
- package/dist/es/models/activityTaskStatus.js.map +1 -0
- package/dist/es/models/api/IActivityStreamNotifyResponse.js +2 -0
- package/dist/es/models/api/IActivityStreamNotifyResponse.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetCreateRequest.js +2 -0
- package/dist/es/models/api/controlPlane/IAppDatasetCreateRequest.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetCreateResponse.js +2 -0
- package/dist/es/models/api/controlPlane/IAppDatasetCreateResponse.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetDeleteRequest.js +4 -0
- package/dist/es/models/api/controlPlane/IAppDatasetDeleteRequest.js.map +1 -0
- package/dist/es/models/{ITaskApp.js → api/controlPlane/IAppDatasetGetRequest.js} +1 -1
- package/dist/es/models/api/controlPlane/IAppDatasetGetRequest.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetGetResponse.js +2 -0
- package/dist/es/models/api/controlPlane/IAppDatasetGetResponse.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetListRequest.js +4 -0
- package/dist/es/models/api/controlPlane/IAppDatasetListRequest.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetListResponse.js +2 -0
- package/dist/es/models/api/controlPlane/IAppDatasetListResponse.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetUpdateRequest.js +2 -0
- package/dist/es/models/api/controlPlane/IAppDatasetUpdateRequest.js.map +1 -0
- package/dist/es/models/app/IActivityQuery.js.map +1 -1
- package/dist/es/models/app/IDataspaceApp.js.map +1 -1
- package/dist/es/models/app/IProcessingGroupOptions.js +4 -0
- package/dist/es/models/app/IProcessingGroupOptions.js.map +1 -0
- package/dist/es/models/controlPlane/IDataspaceAppDataset.js +2 -0
- package/dist/es/models/controlPlane/IDataspaceAppDataset.js.map +1 -0
- package/dist/es/models/controlPlane/IDataspaceControlPlaneComponent.js.map +1 -1
- package/dist/es/models/dataPlane/IDataspaceDataPlaneComponent.js.map +1 -1
- package/dist/es/models/dataspaceTransferFormat.js +28 -0
- package/dist/es/models/dataspaceTransferFormat.js.map +1 -0
- package/dist/es/models/dataspaceTypes.js +3 -0
- package/dist/es/models/dataspaceTypes.js.map +1 -1
- package/dist/types/entities/dataspaceAppDataset.d.ts +42 -0
- package/dist/types/index.d.ts +24 -11
- package/dist/types/models/IActivityLogDetails.d.ts +0 -4
- package/dist/types/models/IActivityLogEntry.d.ts +3 -27
- package/dist/types/models/IActivityTask.d.ts +2 -2
- package/dist/types/models/IActivityTaskEntry.d.ts +39 -0
- package/dist/types/models/IExecutionPayload.d.ts +2 -2
- package/dist/types/models/activityTaskStatus.d.ts +25 -0
- package/dist/types/models/api/IActivityStreamNotifyResponse.d.ts +23 -0
- package/dist/types/models/api/controlPlane/IAppDatasetCreateRequest.d.ts +31 -0
- package/dist/types/models/api/controlPlane/IAppDatasetCreateResponse.d.ts +16 -0
- package/dist/types/models/api/controlPlane/IAppDatasetDeleteRequest.d.ts +14 -0
- package/dist/types/models/api/controlPlane/IAppDatasetGetRequest.d.ts +14 -0
- package/dist/types/models/api/controlPlane/IAppDatasetGetResponse.d.ts +10 -0
- package/dist/types/models/api/controlPlane/IAppDatasetListRequest.d.ts +18 -0
- package/dist/types/models/api/controlPlane/IAppDatasetListResponse.d.ts +19 -0
- package/dist/types/models/api/controlPlane/IAppDatasetUpdateRequest.d.ts +29 -0
- package/dist/types/models/app/IActivityQuery.d.ts +4 -0
- package/dist/types/models/app/IDataspaceApp.d.ts +17 -3
- package/dist/types/models/app/IProcessingGroupOptions.d.ts +18 -0
- package/dist/types/models/controlPlane/IDataspaceAppDataset.d.ts +26 -0
- package/dist/types/models/controlPlane/IDataspaceControlPlaneComponent.d.ts +42 -1
- package/dist/types/models/dataPlane/IDataspaceDataPlaneComponent.d.ts +2 -2
- package/dist/types/models/dataspaceTransferFormat.d.ts +28 -0
- package/dist/types/models/dataspaceTypes.d.ts +3 -0
- package/docs/changelog.md +81 -66
- package/docs/reference/classes/DataspaceAppDataset.md +80 -0
- package/docs/reference/index.md +17 -2
- package/docs/reference/interfaces/IActivityLogDetails.md +0 -8
- package/docs/reference/interfaces/IActivityLogEntry.md +3 -39
- package/docs/reference/interfaces/IActivityQuery.md +8 -0
- package/docs/reference/interfaces/IActivityStreamNotifyResponse.md +33 -0
- package/docs/reference/interfaces/IActivityTask.md +1 -1
- package/docs/reference/interfaces/IActivityTaskEntry.md +67 -0
- package/docs/reference/interfaces/IAppDatasetCreateRequest.md +37 -0
- package/docs/reference/interfaces/IAppDatasetCreateResponse.md +23 -0
- package/docs/reference/interfaces/IAppDatasetDeleteRequest.md +17 -0
- package/docs/reference/interfaces/IAppDatasetGetRequest.md +17 -0
- package/docs/reference/interfaces/IAppDatasetGetResponse.md +11 -0
- package/docs/reference/interfaces/IAppDatasetListRequest.md +23 -0
- package/docs/reference/interfaces/IAppDatasetListResponse.md +23 -0
- package/docs/reference/interfaces/IAppDatasetUpdateRequest.md +38 -0
- package/docs/reference/interfaces/IDataspaceApp.md +36 -4
- package/docs/reference/interfaces/IDataspaceAppDataset.md +43 -0
- package/docs/reference/interfaces/IDataspaceControlPlaneComponent.md +142 -0
- package/docs/reference/interfaces/IDataspaceDataPlaneComponent.md +3 -3
- package/docs/reference/interfaces/IExecutionPayload.md +3 -3
- package/docs/reference/interfaces/IProcessingGroupOptions.md +28 -0
- package/docs/reference/type-aliases/ActivityTaskStatus.md +5 -0
- package/docs/reference/type-aliases/DataspaceTransferFormat.md +5 -0
- package/docs/reference/variables/ActivityTaskStatus.md +31 -0
- package/docs/reference/variables/DataspaceTransferFormat.md +32 -0
- package/docs/reference/variables/DataspaceTypes.md +2 -0
- package/package.json +3 -3
- package/dist/es/models/IActivityLogDates.js.map +0 -1
- package/dist/es/models/ITaskApp.js.map +0 -1
- package/dist/types/models/IActivityLogDates.d.ts +0 -13
- package/dist/types/models/ITaskApp.d.ts +0 -13
- package/docs/reference/interfaces/IActivityLogDates.md +0 -19
- package/docs/reference/interfaces/ITaskApp.md +0 -19
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tenant-supplied Dataset shape persisted by the Control Plane.
|
|
3
|
+
*/
|
|
4
|
+
export declare class DataspaceAppDataset {
|
|
5
|
+
/**
|
|
6
|
+
* The unique identifier for the dataset.
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* The identity of the node that owns this entity (required for sync).
|
|
11
|
+
*/
|
|
12
|
+
nodeIdentity: string;
|
|
13
|
+
/**
|
|
14
|
+
* The tenant that owns this dataset, captured from the request context at
|
|
15
|
+
* write time. Optional — single-tenant nodes (no `TWIN_TENANT_ENABLED`)
|
|
16
|
+
* register datasets without a tenant context, in which case federated catalogue stores
|
|
17
|
+
* the dataset with no `tenantId` and URL-baking is skipped.
|
|
18
|
+
*/
|
|
19
|
+
tenantId?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The dataspace app that this dataset belongs to. Matches the app's
|
|
22
|
+
* registered name in `DataspaceAppFactory` (typically the app's URI).
|
|
23
|
+
* Used as the join key when dispatching to an app's optional
|
|
24
|
+
* `datasetsHandled` override.
|
|
25
|
+
*/
|
|
26
|
+
appId: string;
|
|
27
|
+
/**
|
|
28
|
+
* The user-controlled JSON-LD dataset payload. Stored as an
|
|
29
|
+
* opaque object and validated/populated at publish time.
|
|
30
|
+
*/
|
|
31
|
+
dataset: {
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Creation timestamp (ISO string format).
|
|
36
|
+
*/
|
|
37
|
+
dateCreated: string;
|
|
38
|
+
/**
|
|
39
|
+
* Last update timestamp (ISO string format).
|
|
40
|
+
*/
|
|
41
|
+
dateModified: string;
|
|
42
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,53 +1,66 @@
|
|
|
1
|
+
export * from "./entities/dataspaceAppDataset.js";
|
|
1
2
|
export * from "./entities/transferProcess.js";
|
|
3
|
+
export * from "./models/controlPlane/api/ITransferContextResponse.js";
|
|
4
|
+
export * from "./models/controlPlane/IDataspaceAppDataset.js";
|
|
2
5
|
export * from "./models/controlPlane/IDataspaceControlPlaneComponent.js";
|
|
3
6
|
export * from "./models/controlPlane/IDataspaceControlPlaneResolverComponent.js";
|
|
4
7
|
export * from "./models/controlPlane/INegotiationCallback.js";
|
|
8
|
+
export * from "./models/controlPlane/ITransferContext.js";
|
|
5
9
|
export * from "./models/controlPlane/ITransferProcess.js";
|
|
6
10
|
export * from "./models/controlPlane/transferProcessRole.js";
|
|
7
|
-
export * from "./models/controlPlane/ITransferContext.js";
|
|
8
|
-
export * from "./models/controlPlane/api/ITransferContextResponse.js";
|
|
9
11
|
export * from "./models/dataPlane/IDataspaceDataPlaneComponent.js";
|
|
10
|
-
export * from "./models/IDataspaceActivity.js";
|
|
11
|
-
export * from "./models/dataspaceTypes.js";
|
|
12
12
|
export * from "./models/dataspaceContexts.js";
|
|
13
|
+
export * from "./models/dataspaceTransferFormat.js";
|
|
14
|
+
export * from "./models/dataspaceTypes.js";
|
|
15
|
+
export * from "./models/IDataspaceActivity.js";
|
|
13
16
|
export * from "./dataTypes/dataspaceDataTypes.js";
|
|
14
17
|
export * from "./factories/dataspaceAppFactory.js";
|
|
15
18
|
export * from "./models/app/IDataspaceApp.js";
|
|
19
|
+
export * from "./models/app/IProcessingGroupOptions.js";
|
|
16
20
|
export * from "./models/activityProcessingStatus.js";
|
|
17
21
|
export * from "./models/api/IActivityLogEntryGetRequest.js";
|
|
18
22
|
export * from "./models/api/IActivityLogEntryGetResponse.js";
|
|
19
23
|
export * from "./models/api/IActivityLogStatusNotificationPayload.js";
|
|
20
24
|
export * from "./models/api/IActivityLogStatusRequest.js";
|
|
21
25
|
export * from "./models/api/IActivityStreamNotifyRequest.js";
|
|
26
|
+
export * from "./models/api/IActivityStreamNotifyResponse.js";
|
|
22
27
|
export * from "./models/api/IDataAssetEntitiesResponse.js";
|
|
23
28
|
export * from "./models/api/IDataAssetGetEntitiesRequest.js";
|
|
24
29
|
export * from "./models/api/IDataAssetQueryRequest.js";
|
|
30
|
+
export * from "./models/api/controlPlane/IAppDatasetCreateRequest.js";
|
|
31
|
+
export * from "./models/api/controlPlane/IAppDatasetCreateResponse.js";
|
|
32
|
+
export * from "./models/api/controlPlane/IAppDatasetDeleteRequest.js";
|
|
33
|
+
export * from "./models/api/controlPlane/IAppDatasetGetRequest.js";
|
|
34
|
+
export * from "./models/api/controlPlane/IAppDatasetGetResponse.js";
|
|
35
|
+
export * from "./models/api/controlPlane/IAppDatasetListRequest.js";
|
|
36
|
+
export * from "./models/api/controlPlane/IAppDatasetListResponse.js";
|
|
37
|
+
export * from "./models/api/controlPlane/IAppDatasetUpdateRequest.js";
|
|
38
|
+
export * from "./models/api/controlPlane/ICompleteTransferRequest.js";
|
|
39
|
+
export * from "./models/api/controlPlane/ICompleteTransferResponse.js";
|
|
40
|
+
export * from "./models/api/controlPlane/IGetTransferProcessRequest.js";
|
|
41
|
+
export * from "./models/api/controlPlane/IGetTransferProcessResponse.js";
|
|
25
42
|
export * from "./models/api/controlPlane/IRequestTransferRequest.js";
|
|
26
43
|
export * from "./models/api/controlPlane/IRequestTransferResponse.js";
|
|
27
44
|
export * from "./models/api/controlPlane/IStartTransferRequest.js";
|
|
28
45
|
export * from "./models/api/controlPlane/IStartTransferResponse.js";
|
|
29
|
-
export * from "./models/api/controlPlane/ICompleteTransferRequest.js";
|
|
30
|
-
export * from "./models/api/controlPlane/ICompleteTransferResponse.js";
|
|
31
46
|
export * from "./models/api/controlPlane/ISuspendTransferRequest.js";
|
|
32
47
|
export * from "./models/api/controlPlane/ISuspendTransferResponse.js";
|
|
33
48
|
export * from "./models/api/controlPlane/ITerminateTransferRequest.js";
|
|
34
49
|
export * from "./models/api/controlPlane/ITerminateTransferResponse.js";
|
|
35
|
-
export * from "./models/
|
|
36
|
-
export * from "./models/api/controlPlane/IGetTransferProcessResponse.js";
|
|
50
|
+
export * from "./models/activityTaskStatus.js";
|
|
37
51
|
export * from "./models/app/dataRequestType.js";
|
|
38
52
|
export * from "./models/app/IActivityQuery.js";
|
|
39
53
|
export * from "./models/app/IDataAssetEntitiesRequest.js";
|
|
40
54
|
export * from "./models/app/IDataAssetQuery.js";
|
|
41
|
-
export * from "./models/app/IQueryDataAssetRequest.js";
|
|
42
55
|
export * from "./models/app/IDataRequest.js";
|
|
43
|
-
export * from "./models/
|
|
56
|
+
export * from "./models/app/IQueryDataAssetRequest.js";
|
|
44
57
|
export * from "./models/IActivityLogDetails.js";
|
|
45
58
|
export * from "./models/IActivityLogEntry.js";
|
|
46
59
|
export * from "./models/IActivityLogStatusNotification.js";
|
|
47
60
|
export * from "./models/IActivityTask.js";
|
|
61
|
+
export * from "./models/IActivityTaskEntry.js";
|
|
48
62
|
export * from "./models/IDataAssetItemList.js";
|
|
49
63
|
export * from "./models/IDataAssetItemListResult.js";
|
|
50
64
|
export * from "./models/IEntitySet.js";
|
|
51
65
|
export * from "./models/IExecutionPayload.js";
|
|
52
66
|
export * from "./models/IFilteringQuery.js";
|
|
53
|
-
export * from "./models/ITaskApp.js";
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { IError } from "@twin.org/core";
|
|
2
1
|
import type { ActivityProcessingStatus } from "./activityProcessingStatus.js";
|
|
3
|
-
import type { IActivityLogDates } from "./IActivityLogDates.js";
|
|
4
2
|
import type { IActivityLogDetails } from "./IActivityLogDetails.js";
|
|
5
|
-
import type {
|
|
3
|
+
import type { IActivityTaskEntry } from "./IActivityTaskEntry.js";
|
|
6
4
|
/**
|
|
7
5
|
* The details related to the processing of an Activity
|
|
8
6
|
*/
|
|
@@ -12,29 +10,7 @@ export interface IActivityLogEntry extends IActivityLogDetails {
|
|
|
12
10
|
*/
|
|
13
11
|
status: ActivityProcessingStatus;
|
|
14
12
|
/**
|
|
15
|
-
* The
|
|
13
|
+
* The tasks that have to be run to process the Activity.
|
|
16
14
|
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The running tasks that are processing the Activity.
|
|
20
|
-
*/
|
|
21
|
-
runningTasks?: (ITaskApp & IActivityLogDates)[];
|
|
22
|
-
/**
|
|
23
|
-
* The tasks that have already finalized.
|
|
24
|
-
*/
|
|
25
|
-
finalizedTasks?: (ITaskApp & IActivityLogDates & {
|
|
26
|
-
/**
|
|
27
|
-
* The task result.
|
|
28
|
-
*/
|
|
29
|
-
result: string;
|
|
30
|
-
})[];
|
|
31
|
-
/**
|
|
32
|
-
* The tasks that are in error.
|
|
33
|
-
*/
|
|
34
|
-
inErrorTasks?: (ITaskApp & {
|
|
35
|
-
/**
|
|
36
|
-
* The error that happened
|
|
37
|
-
*/
|
|
38
|
-
error: IError;
|
|
39
|
-
})[];
|
|
15
|
+
tasks?: IActivityTaskEntry[];
|
|
40
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IActivityTaskEntry } from "./IActivityTaskEntry.js";
|
|
2
2
|
/**
|
|
3
3
|
* Denotes a task associated with an Activity
|
|
4
4
|
*/
|
|
@@ -10,5 +10,5 @@ export interface IActivityTask {
|
|
|
10
10
|
/**
|
|
11
11
|
* The associated tasks
|
|
12
12
|
*/
|
|
13
|
-
associatedTasks:
|
|
13
|
+
associatedTasks: IActivityTaskEntry[];
|
|
14
14
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { IError } from "@twin.org/core";
|
|
2
|
+
import type { ActivityTaskStatus } from "./activityTaskStatus.js";
|
|
3
|
+
/**
|
|
4
|
+
* Denotes a task associated with a Dataspace App
|
|
5
|
+
*/
|
|
6
|
+
export interface IActivityTaskEntry {
|
|
7
|
+
/**
|
|
8
|
+
* Task Id.
|
|
9
|
+
*/
|
|
10
|
+
taskId: string;
|
|
11
|
+
/**
|
|
12
|
+
* Dataspace App Id.
|
|
13
|
+
*/
|
|
14
|
+
dataspaceAppId: string;
|
|
15
|
+
/**
|
|
16
|
+
* Task status.
|
|
17
|
+
*/
|
|
18
|
+
status: ActivityTaskStatus;
|
|
19
|
+
/**
|
|
20
|
+
* Processing Group Id.
|
|
21
|
+
*/
|
|
22
|
+
processingGroupId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Task processing start timestamp
|
|
25
|
+
*/
|
|
26
|
+
startDate?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Task processing end timestamp
|
|
29
|
+
*/
|
|
30
|
+
endDate?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The result of the task processing, if completed.
|
|
33
|
+
*/
|
|
34
|
+
result?: unknown;
|
|
35
|
+
/**
|
|
36
|
+
* The error occurred during task processing, if any.
|
|
37
|
+
*/
|
|
38
|
+
error?: IError;
|
|
39
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Activity task statuses.
|
|
3
|
+
*/
|
|
4
|
+
export declare const ActivityTaskStatus: {
|
|
5
|
+
/**
|
|
6
|
+
* Pending.
|
|
7
|
+
*/
|
|
8
|
+
readonly Pending: "pending";
|
|
9
|
+
/**
|
|
10
|
+
* Processing.
|
|
11
|
+
*/
|
|
12
|
+
readonly Processing: "processing";
|
|
13
|
+
/**
|
|
14
|
+
* Success.
|
|
15
|
+
*/
|
|
16
|
+
readonly Success: "success";
|
|
17
|
+
/**
|
|
18
|
+
* Failed.
|
|
19
|
+
*/
|
|
20
|
+
readonly Failed: "failed";
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Activity task statuses.
|
|
24
|
+
*/
|
|
25
|
+
export type ActivityTaskStatus = (typeof ActivityTaskStatus)[keyof typeof ActivityTaskStatus];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HeaderTypes, HttpStatusCode } from "@twin.org/web";
|
|
2
|
+
import type { IActivityLogEntry } from "../IActivityLogEntry.js";
|
|
3
|
+
/**
|
|
4
|
+
* Activity Stream Notify Response.
|
|
5
|
+
*/
|
|
6
|
+
export interface IActivityStreamNotifyResponse {
|
|
7
|
+
/**
|
|
8
|
+
* The status code indicating the result of the notification processing. It can be either:
|
|
9
|
+
* - `201 Created` if the notification was processed inline and a new activity log entry was created.
|
|
10
|
+
* - `102 Processing` if the notification was accepted for processing but has not been completed yet.
|
|
11
|
+
*/
|
|
12
|
+
statusCode: typeof HttpStatusCode.created | typeof HttpStatusCode.processing;
|
|
13
|
+
/**
|
|
14
|
+
* Optional headers.
|
|
15
|
+
*/
|
|
16
|
+
headers?: {
|
|
17
|
+
[HeaderTypes.Location]?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The Activity log entry if the notification was processed inline.
|
|
21
|
+
*/
|
|
22
|
+
body?: IActivityLogEntry;
|
|
23
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { IDataspaceProtocolDataset } from "@twin.org/standards-dataspace-protocol";
|
|
2
|
+
/**
|
|
3
|
+
* API request to register an app dataset.
|
|
4
|
+
*
|
|
5
|
+
* The owning `tenantId` is captured automatically from the request's tenant
|
|
6
|
+
* context — callers do not supply it.
|
|
7
|
+
*/
|
|
8
|
+
export interface IAppDatasetCreateRequest {
|
|
9
|
+
/**
|
|
10
|
+
* The body of the request.
|
|
11
|
+
*/
|
|
12
|
+
body: {
|
|
13
|
+
/**
|
|
14
|
+
* Optional explicit id for the stored dataset record. If omitted, the
|
|
15
|
+
* Control Plane derives the id from `dataset["@id"]` if present, or
|
|
16
|
+
* generates a UUID otherwise. The resolved id is returned via the
|
|
17
|
+
* `Location` response header.
|
|
18
|
+
*/
|
|
19
|
+
id?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The dataspace app this dataset belongs to. Matches the app's
|
|
22
|
+
* registered name in `DataspaceAppFactory` (typically the app's URI).
|
|
23
|
+
*/
|
|
24
|
+
appId: string;
|
|
25
|
+
/**
|
|
26
|
+
* The dataset payload. System-stamped fields like `dcterms:publisher`
|
|
27
|
+
* may be omitted — the Control Plane fills them in at publish time.
|
|
28
|
+
*/
|
|
29
|
+
dataset: IDataspaceProtocolDataset;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HeaderTypes, HttpStatusCode } from "@twin.org/web";
|
|
2
|
+
/**
|
|
3
|
+
* API response from registering an app dataset.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAppDatasetCreateResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The headers of the response, including the location of the new app dataset.
|
|
8
|
+
*/
|
|
9
|
+
headers: {
|
|
10
|
+
[HeaderTypes.Location]: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* HTTP status code (201 on success).
|
|
14
|
+
*/
|
|
15
|
+
statusCode: HttpStatusCode;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API request to delete a stored app dataset record.
|
|
3
|
+
*/
|
|
4
|
+
export interface IAppDatasetDeleteRequest {
|
|
5
|
+
/**
|
|
6
|
+
* Path parameters containing the stored dataset id.
|
|
7
|
+
*/
|
|
8
|
+
pathParams: {
|
|
9
|
+
/**
|
|
10
|
+
* The stored dataset id.
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API request to fetch a single app dataset record.
|
|
3
|
+
*/
|
|
4
|
+
export interface IAppDatasetGetRequest {
|
|
5
|
+
/**
|
|
6
|
+
* Path parameters containing the stored app dataset id.
|
|
7
|
+
*/
|
|
8
|
+
pathParams: {
|
|
9
|
+
/**
|
|
10
|
+
* The stored app dataset id (entity primary key).
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IDataspaceAppDataset } from "../../controlPlane/IDataspaceAppDataset.js";
|
|
2
|
+
/**
|
|
3
|
+
* API response for a single stored app dataset record.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAppDatasetGetResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The body of the response.
|
|
8
|
+
*/
|
|
9
|
+
body: IDataspaceAppDataset;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API request to list the app datasets owned by the calling tenant.
|
|
3
|
+
*/
|
|
4
|
+
export interface IAppDatasetListRequest {
|
|
5
|
+
/**
|
|
6
|
+
* Query parameters for paging. Always strings on the wire.
|
|
7
|
+
*/
|
|
8
|
+
query?: {
|
|
9
|
+
/**
|
|
10
|
+
* Cursor returned from a previous list call to fetch the next page.
|
|
11
|
+
*/
|
|
12
|
+
cursor?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Maximum number of entries to return (string-encoded; parsed on the server).
|
|
15
|
+
*/
|
|
16
|
+
limit?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IDataspaceAppDataset } from "../../controlPlane/IDataspaceAppDataset.js";
|
|
2
|
+
/**
|
|
3
|
+
* API response listing the app datasets owned by the calling tenant.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAppDatasetListResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The body of the response.
|
|
8
|
+
*/
|
|
9
|
+
body: {
|
|
10
|
+
/**
|
|
11
|
+
* The stored datasets.
|
|
12
|
+
*/
|
|
13
|
+
entities: IDataspaceAppDataset[];
|
|
14
|
+
/**
|
|
15
|
+
* Cursor to fetch the next page if more entries exist.
|
|
16
|
+
*/
|
|
17
|
+
cursor?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IDataspaceProtocolDataset } from "@twin.org/standards-dataspace-protocol";
|
|
2
|
+
/**
|
|
3
|
+
* API request to update an existing app dataset record.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAppDatasetUpdateRequest {
|
|
6
|
+
/**
|
|
7
|
+
* Path parameters containing the stored app dataset id.
|
|
8
|
+
*/
|
|
9
|
+
pathParams: {
|
|
10
|
+
/**
|
|
11
|
+
* The stored app dataset id.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The body of the request.
|
|
17
|
+
*/
|
|
18
|
+
body: {
|
|
19
|
+
/**
|
|
20
|
+
* The dataspace app this dataset belongs to. May change appId on
|
|
21
|
+
* update if the tenant wants to retarget the dataset.
|
|
22
|
+
*/
|
|
23
|
+
appId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The dataset payload.
|
|
26
|
+
*/
|
|
27
|
+
dataset: IDataspaceProtocolDataset;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -4,20 +4,34 @@ import type { IDataspaceProtocolDataset } from "@twin.org/standards-dataspace-pr
|
|
|
4
4
|
import type { IActivityQuery } from "./IActivityQuery.js";
|
|
5
5
|
import type { IDataRequest } from "./IDataRequest.js";
|
|
6
6
|
import type { IDataspaceActivity } from "../IDataspaceActivity.js";
|
|
7
|
+
import type { IProcessingGroupOptions } from "./IProcessingGroupOptions.js";
|
|
7
8
|
/**
|
|
8
9
|
* Interface describes a Dataspace App.
|
|
9
10
|
*/
|
|
10
11
|
export interface IDataspaceApp extends IComponent {
|
|
12
|
+
/**
|
|
13
|
+
* The settings for the processing groups for tasks.
|
|
14
|
+
* @returns The options for each process group.
|
|
15
|
+
*/
|
|
16
|
+
processingGroups?(): {
|
|
17
|
+
[id: string]: IProcessingGroupOptions;
|
|
18
|
+
};
|
|
11
19
|
/**
|
|
12
20
|
* The activities handled by the App.
|
|
13
21
|
* @returns A query that describes the set of activities handled by the App.
|
|
14
22
|
*/
|
|
15
23
|
activitiesHandled(): IActivityQuery[];
|
|
16
24
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
25
|
+
* Optional override called by the Control Plane when publishing a stored dataset for this app.
|
|
26
|
+
* The Control Plane always calls `populateDefaults` (e.g. `dcterms:publisher`)
|
|
27
|
+
* on every dataset returned here, so apps don't need to populate publisher themselves.
|
|
28
|
+
* @param payload The user-stored dataset payload.
|
|
29
|
+
* @param tenantId The owning tenant for this dataset. Empty string on
|
|
30
|
+
* single-tenant nodes (no `TWIN_TENANT_ENABLED`).
|
|
31
|
+
* @returns One or more datasets to publish to the catalogue. System-stamped
|
|
32
|
+
* fields like `dcterms:publisher` may be omitted — the Control Plane fills them in.
|
|
19
33
|
*/
|
|
20
|
-
datasetsHandled(): Promise<IDataspaceProtocolDataset[]>;
|
|
34
|
+
datasetsHandled?(payload: IDataspaceProtocolDataset, tenantId: string): Promise<IDataspaceProtocolDataset[]>;
|
|
21
35
|
/**
|
|
22
36
|
* The types of queries supported.
|
|
23
37
|
* @returns The types of queries supported by the Dataspace App to retrieve data.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface describes the options for a processing group, which determines how many tasks can be processed in parallel for a given group of activities.
|
|
3
|
+
*/
|
|
4
|
+
export interface IProcessingGroupOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The number of concurrent tasks that can be processed for this processing group.
|
|
7
|
+
*/
|
|
8
|
+
concurrentTasks?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Terminate the worker after it has been idle for the specified timeout in milliseconds,
|
|
11
|
+
* defaults to 0 for immediate shutdown, set to -1 to keep workers alive.
|
|
12
|
+
*/
|
|
13
|
+
idleShutdownTimeout?: number;
|
|
14
|
+
/**
|
|
15
|
+
* The number of times a task in this processing group should be retried in case of failure.
|
|
16
|
+
*/
|
|
17
|
+
retryCount?: number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IDataspaceProtocolDataset } from "@twin.org/standards-dataspace-protocol";
|
|
2
|
+
/**
|
|
3
|
+
* Stored dataset record returned by the Control Plane's dataset CRUD surface.
|
|
4
|
+
*/
|
|
5
|
+
export interface IDataspaceAppDataset {
|
|
6
|
+
/**
|
|
7
|
+
* The stored dataset id (matches the dataset's JSON-LD `@id`).
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The dataspace app this dataset belongs to.
|
|
12
|
+
*/
|
|
13
|
+
appId: string;
|
|
14
|
+
/**
|
|
15
|
+
* The dataset payload.
|
|
16
|
+
*/
|
|
17
|
+
dataset: IDataspaceProtocolDataset;
|
|
18
|
+
/**
|
|
19
|
+
* Creation timestamp (ISO string).
|
|
20
|
+
*/
|
|
21
|
+
dateCreated: string;
|
|
22
|
+
/**
|
|
23
|
+
* Last-modified timestamp (ISO string).
|
|
24
|
+
*/
|
|
25
|
+
dateModified: string;
|
|
26
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
-
import type { IDataspaceProtocolContractNegotiation, IDataspaceProtocolContractNegotiationError, IDataspaceProtocolTransferCompletionMessage, IDataspaceProtocolTransferError, IDataspaceProtocolTransferProcess, IDataspaceProtocolTransferRequestMessage, IDataspaceProtocolTransferStartMessage, IDataspaceProtocolTransferSuspensionMessage, IDataspaceProtocolTransferTerminationMessage } from "@twin.org/standards-dataspace-protocol";
|
|
2
|
+
import type { IDataspaceProtocolContractNegotiation, IDataspaceProtocolContractNegotiationError, IDataspaceProtocolDataset, IDataspaceProtocolTransferCompletionMessage, IDataspaceProtocolTransferError, IDataspaceProtocolTransferProcess, IDataspaceProtocolTransferRequestMessage, IDataspaceProtocolTransferStartMessage, IDataspaceProtocolTransferSuspensionMessage, IDataspaceProtocolTransferTerminationMessage } from "@twin.org/standards-dataspace-protocol";
|
|
3
|
+
import type { IDataspaceAppDataset } from "./IDataspaceAppDataset.js";
|
|
3
4
|
import type { INegotiationCallback } from "./INegotiationCallback.js";
|
|
4
5
|
/**
|
|
5
6
|
* Dataspace Control Plane Component interface.
|
|
@@ -177,4 +178,44 @@ export interface IDataspaceControlPlaneComponent extends IComponent {
|
|
|
177
178
|
* @returns Transfer Process (DSP compliant) with current state, or TransferError if the operation fails.
|
|
178
179
|
*/
|
|
179
180
|
getTransferProcess(pid: string, trustPayload: unknown): Promise<IDataspaceProtocolTransferProcess | IDataspaceProtocolTransferError>;
|
|
181
|
+
/**
|
|
182
|
+
* Register an app dataset for a dataspace app, owned by the calling tenant.
|
|
183
|
+
* @param id Optional explicit id. If omitted, derived from `dataset["@id"]`
|
|
184
|
+
* or generated.
|
|
185
|
+
* @param appId The dataspace app this dataset belongs to (matches
|
|
186
|
+
* `DataspaceAppFactory` registration name).
|
|
187
|
+
* @param dataset The dataset payload (may omit system-stamped fields).
|
|
188
|
+
* @returns The resolved dataset id.
|
|
189
|
+
*/
|
|
190
|
+
createAppDataset(id: string | undefined, appId: string, dataset: IDataspaceProtocolDataset): Promise<string>;
|
|
191
|
+
/**
|
|
192
|
+
* Get an app dataset record owned by the calling tenant.
|
|
193
|
+
* @param id The stored app dataset id.
|
|
194
|
+
* @returns The stored app dataset record.
|
|
195
|
+
*/
|
|
196
|
+
getAppDataset(id: string): Promise<IDataspaceAppDataset>;
|
|
197
|
+
/**
|
|
198
|
+
* List the app datasets owned by the calling tenant.
|
|
199
|
+
* @param cursor Optional pagination cursor.
|
|
200
|
+
* @param limit Optional maximum number of entries to return.
|
|
201
|
+
* @returns The stored app datasets and the next-page cursor if more exist.
|
|
202
|
+
*/
|
|
203
|
+
listAppDatasets(cursor?: string, limit?: number): Promise<{
|
|
204
|
+
entities: IDataspaceAppDataset[];
|
|
205
|
+
cursor?: string;
|
|
206
|
+
}>;
|
|
207
|
+
/**
|
|
208
|
+
* Update an app dataset record owned by the calling tenant.
|
|
209
|
+
* @param id The stored app dataset id.
|
|
210
|
+
* @param appId The dataspace app this dataset belongs to.
|
|
211
|
+
* @param dataset The dataset payload.
|
|
212
|
+
* @returns Nothing.
|
|
213
|
+
*/
|
|
214
|
+
updateAppDataset(id: string, appId: string, dataset: IDataspaceProtocolDataset): Promise<void>;
|
|
215
|
+
/**
|
|
216
|
+
* Delete an app dataset record owned by the calling tenant.
|
|
217
|
+
* @param id The stored app dataset id.
|
|
218
|
+
* @returns Nothing.
|
|
219
|
+
*/
|
|
220
|
+
deleteAppDataset(id: string): Promise<void>;
|
|
180
221
|
}
|
|
@@ -14,9 +14,9 @@ export interface IDataspaceDataPlaneComponent extends IComponent {
|
|
|
14
14
|
/**
|
|
15
15
|
* Notify an Activity to the Dataspace Data Plane Activity Stream.
|
|
16
16
|
* @param activity The Activity notified.
|
|
17
|
-
* @returns The
|
|
17
|
+
* @returns The activity's entry.
|
|
18
18
|
*/
|
|
19
|
-
notifyActivity(activity: IActivityStreamsActivity): Promise<string>;
|
|
19
|
+
notifyActivity(activity: IActivityStreamsActivity): Promise<string | IActivityLogEntry>;
|
|
20
20
|
/**
|
|
21
21
|
* Subscribes to the activity log.
|
|
22
22
|
* @param callback The callback to be called when Activity Log is called.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TWIN transfer format identifiers used in TransferRequestMessage.format.
|
|
3
|
+
* Follows the Eclipse EDC canonical pattern: <DestinationType-FlowType>.
|
|
4
|
+
* See RFC-007 Data Transfer Profile.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DataspaceTransferFormat: {
|
|
7
|
+
/**
|
|
8
|
+
* PULL mode: consumer queries data via a bearer-token-protected endpoint.
|
|
9
|
+
* Data flows: Consumer GET provider endpoint (with token).
|
|
10
|
+
*/
|
|
11
|
+
readonly HttpProxyPull: "HttpProxy-PULL";
|
|
12
|
+
/**
|
|
13
|
+
* Consumer-initiated PUSH mode: consumer supplies their /inbox endpoint in the
|
|
14
|
+
* TransferRequestMessage. Provider pushes ActivityStreams objects to that endpoint.
|
|
15
|
+
* Data flows: Provider POST to consumer's /inbox.
|
|
16
|
+
*/
|
|
17
|
+
readonly HttpProxyPush: "HttpProxy-PUSH";
|
|
18
|
+
/**
|
|
19
|
+
* Provider-initiated PUSH mode (inverted flow): consumer supplies no dataAddress.
|
|
20
|
+
* Provider returns its own /inbox URL + signed JWT. Consumer then posts data there.
|
|
21
|
+
* Data flows: Consumer POST to provider's /inbox.
|
|
22
|
+
*/
|
|
23
|
+
readonly HttpProxyPost: "HttpProxy-POST";
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Type for the DataspaceTransferFormat const values.
|
|
27
|
+
*/
|
|
28
|
+
export type DataspaceTransferFormat = (typeof DataspaceTransferFormat)[keyof typeof DataspaceTransferFormat];
|