@twin.org/dataspace-data-plane-service 0.0.3-next.24 → 0.0.3-next.26

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.
@@ -62,8 +62,15 @@
62
62
  }
63
63
  },
64
64
  "responses": {
65
- "201": {
66
- "description": "The rest request ended in created response."
65
+ "200": {
66
+ "description": "Activity Stream Notify Response.",
67
+ "content": {
68
+ "application/json": {
69
+ "schema": {
70
+ "$ref": "#/components/schemas/ActivityLogEntry"
71
+ }
72
+ }
73
+ }
67
74
  },
68
75
  "400": {
69
76
  "description": "The server cannot process the request, see the content for more details.",
@@ -184,15 +191,13 @@
184
191
  "dateModified": "2025-08-12T12:00:00Z",
185
192
  "generator": "did:iota:testnet:123456",
186
193
  "status": "pending",
187
- "pendingTasks": [
194
+ "tasks": [
188
195
  {
189
196
  "taskId": "urn:x-task-id:45678",
190
- "dataspaceAppId": "https://my-app.example.org/app1"
197
+ "dataspaceAppId": "https://my-app.example.org/app1",
198
+ "status": "pending"
191
199
  }
192
- ],
193
- "runningTasks": [],
194
- "finalizedTasks": [],
195
- "inErrorTasks": []
200
+ ]
196
201
  }
197
202
  }
198
203
  }
@@ -531,23 +536,6 @@
531
536
  },
532
537
  "components": {
533
538
  "schemas": {
534
- "ActivityLogDates": {
535
- "description": "Activity log dates.",
536
- "type": "object",
537
- "properties": {
538
- "startDate": {
539
- "type": "string",
540
- "description": "Task processing start timestamp"
541
- },
542
- "endDate": {
543
- "type": "string",
544
- "description": "Task processing end timestamp"
545
- }
546
- },
547
- "required": [
548
- "startDate"
549
- ]
550
- },
551
539
  "ActivityLogDetails": {
552
540
  "description": "The details related to the processing of an Activity",
553
541
  "type": "object",
@@ -571,10 +559,6 @@
571
559
  "dateModified": {
572
560
  "type": "string",
573
561
  "description": "The last update date of this object."
574
- },
575
- "retryCount": {
576
- "type": "number",
577
- "description": "Number of times this activity has been retried."
578
562
  }
579
563
  },
580
564
  "required": [
@@ -591,71 +575,12 @@
591
575
  "status": {
592
576
  "$ref": "#/components/schemas/ActivityProcessingStatus"
593
577
  },
594
- "pendingTasks": {
578
+ "tasks": {
595
579
  "type": "array",
596
580
  "items": {
597
- "$ref": "#/components/schemas/TaskApp"
581
+ "$ref": "#/components/schemas/ActivityTaskEntry"
598
582
  },
599
- "description": "The pending tasks that have to be run to process the Activity."
600
- },
601
- "runningTasks": {
602
- "type": "array",
603
- "items": {
604
- "type": "object",
605
- "allOf": [
606
- {
607
- "$ref": "#/components/schemas/TaskApp"
608
- },
609
- {
610
- "$ref": "#/components/schemas/ActivityLogDates"
611
- }
612
- ]
613
- },
614
- "description": "The running tasks that are processing the Activity."
615
- },
616
- "finalizedTasks": {
617
- "type": "array",
618
- "items": {
619
- "type": "object",
620
- "properties": {
621
- "result": {
622
- "type": "string",
623
- "description": "The task result."
624
- }
625
- },
626
- "required": [
627
- "result"
628
- ],
629
- "allOf": [
630
- {
631
- "$ref": "#/components/schemas/TaskApp"
632
- },
633
- {
634
- "$ref": "#/components/schemas/ActivityLogDates"
635
- }
636
- ]
637
- },
638
- "description": "The tasks that have already finalized."
639
- },
640
- "inErrorTasks": {
641
- "type": "array",
642
- "items": {
643
- "type": "object",
644
- "properties": {
645
- "error": {
646
- "$ref": "#/components/schemas/Error"
647
- }
648
- },
649
- "required": [
650
- "error"
651
- ],
652
- "allOf": [
653
- {
654
- "$ref": "#/components/schemas/TaskApp"
655
- }
656
- ]
657
- },
658
- "description": "The tasks that are in error."
583
+ "description": "The tasks that have to be run to process the Activity."
659
584
  }
660
585
  },
661
586
  "required": [
@@ -692,6 +617,67 @@
692
617
  }
693
618
  ]
694
619
  },
620
+ "ActivityTaskEntry": {
621
+ "description": "Denotes a task associated with a Dataspace App",
622
+ "type": "object",
623
+ "properties": {
624
+ "taskId": {
625
+ "type": "string",
626
+ "description": "Task Id."
627
+ },
628
+ "dataspaceAppId": {
629
+ "type": "string",
630
+ "description": "Dataspace App Id."
631
+ },
632
+ "status": {
633
+ "$ref": "#/components/schemas/ActivityTaskStatus"
634
+ },
635
+ "processingGroupId": {
636
+ "type": "string",
637
+ "description": "Processing Group Id."
638
+ },
639
+ "startDate": {
640
+ "type": "string",
641
+ "description": "Task processing start timestamp"
642
+ },
643
+ "endDate": {
644
+ "type": "string",
645
+ "description": "Task processing end timestamp"
646
+ },
647
+ "result": {
648
+ "description": "The result of the task processing, if completed."
649
+ },
650
+ "error": {
651
+ "$ref": "#/components/schemas/Error"
652
+ }
653
+ },
654
+ "required": [
655
+ "taskId",
656
+ "dataspaceAppId",
657
+ "status"
658
+ ]
659
+ },
660
+ "ActivityTaskStatus": {
661
+ "description": "Activity task statuses.",
662
+ "anyOf": [
663
+ {
664
+ "const": "pending",
665
+ "description": "Pending."
666
+ },
667
+ {
668
+ "const": "processing",
669
+ "description": "Processing."
670
+ },
671
+ {
672
+ "const": "success",
673
+ "description": "Success."
674
+ },
675
+ {
676
+ "const": "failed",
677
+ "description": "Failed."
678
+ }
679
+ ]
680
+ },
695
681
  "DataAssetItemList": {
696
682
  "description": "Interface describing a list of entities that are within a Data Asset.\nPagination is handled via HTTP Link headers.",
697
683
  "type": "object",
@@ -792,24 +778,6 @@
792
778
  "type",
793
779
  "q"
794
780
  ]
795
- },
796
- "TaskApp": {
797
- "description": "Denotes a task associated with a Dataspace App",
798
- "type": "object",
799
- "properties": {
800
- "taskId": {
801
- "type": "string",
802
- "description": "Task Id."
803
- },
804
- "dataspaceAppId": {
805
- "type": "string",
806
- "description": "Dataspace App Id."
807
- }
808
- },
809
- "required": [
810
- "taskId",
811
- "dataspaceAppId"
812
- ]
813
781
  }
814
782
  },
815
783
  "securitySchemes": {
@@ -59,11 +59,3 @@ The last update date.
59
59
  > `optional` **retainUntil?**: `number`
60
60
 
61
61
  The timestamp of when to retain the entry until.
62
-
63
- ***
64
-
65
- ### retryCount? {#retrycount}
66
-
67
- > `optional` **retryCount?**: `number`
68
-
69
- Number of times this activity has been retried.
@@ -24,6 +24,6 @@ The entry Id.
24
24
 
25
25
  ### associatedTasks {#associatedtasks}
26
26
 
27
- > **associatedTasks**: `ITaskApp`[]
27
+ > **associatedTasks**: `IActivityTaskEntry`[]
28
28
 
29
29
  The tasks.
@@ -80,7 +80,7 @@ The node logging component type.
80
80
 
81
81
  ### notifyActivity() {#notifyactivity}
82
82
 
83
- > **notifyActivity**(`activity`): `Promise`\<`string`\>
83
+ > **notifyActivity**(`activity`): `Promise`\<`string` \| `IActivityLogEntry`\>
84
84
 
85
85
  Notify an Activity.
86
86
 
@@ -94,9 +94,9 @@ The Activity notified.
94
94
 
95
95
  #### Returns
96
96
 
97
- `Promise`\<`string`\>
97
+ `Promise`\<`string` \| `IActivityLogEntry`\>
98
98
 
99
- The Activity's Log Entry identifier.
99
+ The activity's id or entry.
100
100
 
101
101
  #### Implementation of
102
102
 
@@ -1,6 +1,6 @@
1
1
  # Function: activityStreamNotify()
2
2
 
3
- > **activityStreamNotify**(`baseRouteName`, `httpRequestContext`, `factoryServiceName`, `request`): `Promise`\<`ICreatedResponse`\>
3
+ > **activityStreamNotify**(`baseRouteName`, `httpRequestContext`, `factoryServiceName`, `request`): `Promise`\<`IActivityStreamNotifyResponse`\>
4
4
 
5
5
  Notify a new Activity to the Dataspace Data Plane Activity Stream.
6
6
 
@@ -32,6 +32,6 @@ The request.
32
32
 
33
33
  ## Returns
34
34
 
35
- `Promise`\<`ICreatedResponse`\>
35
+ `Promise`\<`IActivityStreamNotifyResponse`\>
36
36
 
37
37
  The response object with additional http response properties.
@@ -29,3 +29,17 @@ The interval in minutes in between activity log clean ups. -1 indicates no clean
29
29
  ```ts
30
30
  60 minutes
31
31
  ```
32
+
33
+ ***
34
+
35
+ ### retryCount? {#retrycount}
36
+
37
+ > `optional` **retryCount?**: `number`
38
+
39
+ The number of times to retry failed tasks, defaults to forever.
40
+
41
+ #### Default
42
+
43
+ ```ts
44
+ undefined.
45
+ ```
@@ -125,6 +125,20 @@ policy-enforcement-point-service
125
125
 
126
126
  ***
127
127
 
128
+ ### tenantAdminType? {#tenantadmintype}
129
+
130
+ > `optional` **tenantAdminType?**: `string`
131
+
132
+ Tenant admin component type.
133
+
134
+ #### Default
135
+
136
+ ```ts
137
+ tenant-admin
138
+ ```
139
+
140
+ ***
141
+
128
142
  ### config? {#config}
129
143
 
130
144
  > `optional` **config?**: [`IDataspaceDataPlaneServiceConfig`](IDataspaceDataPlaneServiceConfig.md)
package/locales/en.json CHANGED
@@ -6,7 +6,6 @@
6
6
  "activityStillProcessing": "Activity is still being processed",
7
7
  "noFailedTasksToRetry": "Activity has error status but no failed tasks to retry",
8
8
  "invalidActivityGeneratorIdentity": "Invalid activity. No identity specified either on 'generator' or 'actor'",
9
- "unknownActivityLogEntryId": "Unknown Activity Log Entry Id \"{activityLogEntryId}\"",
10
9
  "tooManyAppsRegistered": "There are several DS Apps registered for Dataset \"{datasetId}\"",
11
10
  "noAppRegistered": "There are no DS Apps registered for Dataset \"{datasetId}\"",
12
11
  "notExpandableType": "Entity type \"{type}\" cannot be expanded",
@@ -14,7 +13,10 @@
14
13
  "transferProcessNotFound": "Transfer Process not found for consumerPid \"{notFoundId}\"",
15
14
  "transferNotInStartedState": "Transfer Process is not in STARTED state. Current state: \"{currentState}\"",
16
15
  "transferMissingDatasetId": "Transfer Process is missing datasetId",
17
- "schemaNotFound": "Schema \"{schemaId}\" not found"
16
+ "schemaNotFound": "Schema \"{schemaId}\" not found",
17
+ "cleanupFailed": "Error occurred during cleanup of activity logs",
18
+ "invalidProcessingGroupId": "Invalid processing group id \"{processingGroupId}\" specified in activity query",
19
+ "missingHandleActivity": "Handler App \"{dataspaceAppId}\" does not export a \"handleActivity\" function"
18
20
  }
19
21
  },
20
22
  "info": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/dataspace-data-plane-service",
3
- "version": "0.0.3-next.24",
3
+ "version": "0.0.3-next.26",
4
4
  "description": "Processes activities and data requests while enforcing transfer and policy constraints in the data plane.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "@twin.org/crypto": "next",
22
22
  "@twin.org/data-core": "next",
23
23
  "@twin.org/data-json-ld": "next",
24
- "@twin.org/dataspace-app-runner": "0.0.3-next.24",
25
- "@twin.org/dataspace-models": "0.0.3-next.24",
24
+ "@twin.org/dataspace-app-runner": "0.0.3-next.26",
25
+ "@twin.org/dataspace-models": "0.0.3-next.26",
26
26
  "@twin.org/engine-models": "next",
27
27
  "@twin.org/entity": "next",
28
28
  "@twin.org/entity-storage-models": "next",