@twin.org/standards-dataspace-protocol 0.0.3-next.2 → 0.0.3-next.20

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 (223) hide show
  1. package/dist/es/dataTypes/catalogDataTypes.js +44 -0
  2. package/dist/es/dataTypes/catalogDataTypes.js.map +1 -0
  3. package/dist/es/dataTypes/contractNegotiationDataTypes.js +59 -71
  4. package/dist/es/dataTypes/contractNegotiationDataTypes.js.map +1 -1
  5. package/dist/es/dataTypes/dataspaceProtocolDataTypes.js +30 -0
  6. package/dist/es/dataTypes/dataspaceProtocolDataTypes.js.map +1 -0
  7. package/dist/es/dataTypes/transferProcessDataTypes.js +64 -0
  8. package/dist/es/dataTypes/transferProcessDataTypes.js.map +1 -0
  9. package/dist/es/index.js +40 -14
  10. package/dist/es/index.js.map +1 -1
  11. package/dist/es/models/catalog/IDataspaceProtocolCatalog.js +2 -0
  12. package/dist/es/models/catalog/IDataspaceProtocolCatalog.js.map +1 -0
  13. package/dist/es/models/catalog/IDataspaceProtocolCatalogError.js +2 -0
  14. package/dist/es/models/catalog/IDataspaceProtocolCatalogError.js.map +1 -0
  15. package/dist/es/models/catalog/IDataspaceProtocolCatalogRequestMessage.js +2 -0
  16. package/dist/es/models/catalog/IDataspaceProtocolCatalogRequestMessage.js.map +1 -0
  17. package/dist/es/models/catalog/IDataspaceProtocolDataService.js +2 -0
  18. package/dist/es/models/catalog/IDataspaceProtocolDataService.js.map +1 -0
  19. package/dist/es/models/catalog/IDataspaceProtocolDataset.js +2 -0
  20. package/dist/es/models/catalog/IDataspaceProtocolDataset.js.map +1 -0
  21. package/dist/es/models/catalog/IDataspaceProtocolDatasetRequestMessage.js +2 -0
  22. package/dist/es/models/catalog/IDataspaceProtocolDatasetRequestMessage.js.map +1 -0
  23. package/dist/es/models/catalog/IDataspaceProtocolDistribution.js +2 -0
  24. package/dist/es/models/catalog/IDataspaceProtocolDistribution.js.map +1 -0
  25. package/dist/es/models/catalog/dataspaceProtocolCatalogTypes.js +38 -0
  26. package/dist/es/models/catalog/dataspaceProtocolCatalogTypes.js.map +1 -0
  27. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractAgreementMessage.js +2 -0
  28. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractAgreementMessage.js.map +1 -0
  29. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractAgreementVerificationMessage.js +2 -0
  30. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractAgreementVerificationMessage.js.map +1 -0
  31. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiation.js +2 -0
  32. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiation.js.map +1 -0
  33. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationError.js +2 -0
  34. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationError.js.map +1 -0
  35. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationEventMessage.js +2 -0
  36. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationEventMessage.js.map +1 -0
  37. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationTerminationMessage.js +2 -0
  38. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractNegotiationTerminationMessage.js.map +1 -0
  39. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractOfferMessage.js +2 -0
  40. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractOfferMessage.js.map +1 -0
  41. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractRequestMessage.js +2 -0
  42. package/dist/es/models/contractNegotiation/IDataspaceProtocolContractRequestMessage.js.map +1 -0
  43. package/dist/es/models/contractNegotiation/{contractNegotiationTypes.js → dataspaceProtocolContractNegotiationTypes.js} +3 -3
  44. package/dist/es/models/contractNegotiation/dataspaceProtocolContractNegotiationTypes.js.map +1 -0
  45. package/dist/es/models/contractNegotiation/types/{contractNegotiationEventType.js → dataspaceProtocolContractNegotiationEventType.js} +3 -3
  46. package/dist/es/models/contractNegotiation/types/dataspaceProtocolContractNegotiationEventType.js.map +1 -0
  47. package/dist/es/models/contractNegotiation/types/{contractNegotiationStateType.js → dataspaceProtocolContractNegotiationStateType.js} +3 -3
  48. package/dist/es/models/contractNegotiation/types/dataspaceProtocolContractNegotiationStateType.js.map +1 -0
  49. package/dist/es/models/dataspaceProtocolContextType.js +2 -0
  50. package/dist/es/models/dataspaceProtocolContextType.js.map +1 -0
  51. package/dist/es/models/dataspaceProtocolContexts.js +21 -0
  52. package/dist/es/models/dataspaceProtocolContexts.js.map +1 -0
  53. package/dist/es/models/transferProcess/IDataspaceProtocolDataAddress.js +2 -0
  54. package/dist/es/models/transferProcess/IDataspaceProtocolDataAddress.js.map +1 -0
  55. package/dist/es/models/transferProcess/IDataspaceProtocolEndpointProperty.js +2 -0
  56. package/dist/es/models/transferProcess/IDataspaceProtocolEndpointProperty.js.map +1 -0
  57. package/dist/es/models/transferProcess/IDataspaceProtocolTransferCompletionMessage.js +2 -0
  58. package/dist/es/models/transferProcess/IDataspaceProtocolTransferCompletionMessage.js.map +1 -0
  59. package/dist/es/models/transferProcess/IDataspaceProtocolTransferError.js +2 -0
  60. package/dist/es/models/transferProcess/IDataspaceProtocolTransferError.js.map +1 -0
  61. package/dist/es/models/transferProcess/IDataspaceProtocolTransferProcess.js +2 -0
  62. package/dist/es/models/transferProcess/IDataspaceProtocolTransferProcess.js.map +1 -0
  63. package/dist/es/models/transferProcess/IDataspaceProtocolTransferRequestMessage.js +2 -0
  64. package/dist/es/models/transferProcess/IDataspaceProtocolTransferRequestMessage.js.map +1 -0
  65. package/dist/es/models/transferProcess/IDataspaceProtocolTransferStartMessage.js +2 -0
  66. package/dist/es/models/transferProcess/IDataspaceProtocolTransferStartMessage.js.map +1 -0
  67. package/dist/es/models/transferProcess/IDataspaceProtocolTransferSuspensionMessage.js +4 -0
  68. package/dist/es/models/transferProcess/IDataspaceProtocolTransferSuspensionMessage.js.map +1 -0
  69. package/dist/es/models/transferProcess/IDataspaceProtocolTransferTerminationMessage.js +2 -0
  70. package/dist/es/models/transferProcess/IDataspaceProtocolTransferTerminationMessage.js.map +1 -0
  71. package/dist/es/models/transferProcess/dataspaceProtocolTransferProcessTypes.js +46 -0
  72. package/dist/es/models/transferProcess/dataspaceProtocolTransferProcessTypes.js.map +1 -0
  73. package/dist/es/models/transferProcess/types/dataspaceProtocolTransferProcessStateType.js +30 -0
  74. package/dist/es/models/transferProcess/types/dataspaceProtocolTransferProcessStateType.js.map +1 -0
  75. package/dist/es/schemas/DataspaceProtocolCatalog.json +11 -0
  76. package/dist/es/schemas/DataspaceProtocolCatalogError.json +78 -0
  77. package/dist/es/schemas/DataspaceProtocolCatalogRequestMessage.json +73 -0
  78. package/dist/es/schemas/{ContractAgreementMessage.json → DataspaceProtocolContractAgreementMessage.json} +14 -5
  79. package/dist/es/schemas/{ContractAgreementVerificationMessage.json → DataspaceProtocolContractAgreementVerificationMessage.json} +14 -5
  80. package/dist/es/schemas/{ContractNegotiation.json → DataspaceProtocolContractNegotiation.json} +15 -6
  81. package/dist/es/schemas/{ContractNegotiationError.json → DataspaceProtocolContractNegotiationError.json} +15 -39
  82. package/dist/es/schemas/{ContractNegotiationEventMessage.json → DataspaceProtocolContractNegotiationEventMessage.json} +15 -6
  83. package/dist/es/schemas/{ContractNegotiationEventType.json → DataspaceProtocolContractNegotiationEventType.json} +1 -1
  84. package/dist/es/schemas/{ContractNegotiationStateType.json → DataspaceProtocolContractNegotiationStateType.json} +1 -1
  85. package/dist/es/schemas/{ContractNegotiationTerminationMessage.json → DataspaceProtocolContractNegotiationTerminationMessage.json} +14 -5
  86. package/dist/es/schemas/{ContractOfferMessage.json → DataspaceProtocolContractOfferMessage.json} +14 -5
  87. package/dist/es/schemas/{ContractRequestMessage.json → DataspaceProtocolContractRequestMessage.json} +14 -5
  88. package/dist/es/schemas/DataspaceProtocolDataAddress.json +33 -0
  89. package/dist/es/schemas/DataspaceProtocolDataset.json +11 -0
  90. package/dist/es/schemas/DataspaceProtocolDatasetRequestMessage.json +73 -0
  91. package/dist/es/schemas/DataspaceProtocolEndpointProperty.json +27 -0
  92. package/dist/es/schemas/DataspaceProtocolTransferCompletionMessage.json +78 -0
  93. package/dist/es/schemas/DataspaceProtocolTransferError.json +87 -0
  94. package/dist/es/schemas/DataspaceProtocolTransferProcess.json +83 -0
  95. package/dist/es/schemas/DataspaceProtocolTransferRequestMessage.json +92 -0
  96. package/dist/es/schemas/DataspaceProtocolTransferStartMessage.json +82 -0
  97. package/dist/es/schemas/DataspaceProtocolTransferSuspensionMessage.json +87 -0
  98. package/dist/es/schemas/DataspaceProtocolTransferTerminationMessage.json +87 -0
  99. package/dist/es/schemas-src/DataspaceProtocolDataService.json +11 -0
  100. package/dist/es/schemas-src/DataspaceProtocolDistribution.json +11 -0
  101. package/dist/es/utils/dataspaceProtocolHelper.js +110 -0
  102. package/dist/es/utils/dataspaceProtocolHelper.js.map +1 -0
  103. package/dist/types/dataTypes/catalogDataTypes.d.ts +9 -0
  104. package/dist/types/dataTypes/contractNegotiationDataTypes.d.ts +1 -5
  105. package/dist/types/dataTypes/dataspaceProtocolDataTypes.d.ts +13 -0
  106. package/dist/types/dataTypes/transferProcessDataTypes.d.ts +9 -0
  107. package/dist/types/index.d.ts +36 -13
  108. package/dist/types/models/catalog/IDataspaceProtocolCatalog.d.ts +63 -0
  109. package/dist/types/models/catalog/IDataspaceProtocolCatalogError.d.ts +24 -0
  110. package/dist/types/models/catalog/IDataspaceProtocolCatalogRequestMessage.d.ts +20 -0
  111. package/dist/types/models/catalog/IDataspaceProtocolDataService.d.ts +49 -0
  112. package/dist/types/models/catalog/IDataspaceProtocolDataset.d.ts +66 -0
  113. package/dist/types/models/catalog/IDataspaceProtocolDatasetRequestMessage.d.ts +20 -0
  114. package/dist/types/models/catalog/IDataspaceProtocolDistribution.d.ts +70 -0
  115. package/dist/types/models/catalog/dataspaceProtocolCatalogTypes.d.ts +38 -0
  116. package/dist/types/models/contractNegotiation/{IContractAgreementMessage.d.ts → IDataspaceProtocolContractAgreementMessage.d.ts} +5 -5
  117. package/dist/types/models/contractNegotiation/{IContractAgreementVerificationMessage.d.ts → IDataspaceProtocolContractAgreementVerificationMessage.d.ts} +5 -5
  118. package/dist/types/models/contractNegotiation/IDataspaceProtocolContractNegotiation.d.ts +29 -0
  119. package/dist/types/models/contractNegotiation/{IContractNegotiationError.d.ts → IDataspaceProtocolContractNegotiationError.d.ts} +6 -16
  120. package/dist/types/models/contractNegotiation/IDataspaceProtocolContractNegotiationEventMessage.d.ts +29 -0
  121. package/dist/types/models/contractNegotiation/{IContractNegotiationTerminationMessage.d.ts → IDataspaceProtocolContractNegotiationTerminationMessage.d.ts} +5 -5
  122. package/dist/types/models/contractNegotiation/{IContractOfferMessage.d.ts → IDataspaceProtocolContractOfferMessage.d.ts} +5 -5
  123. package/dist/types/models/contractNegotiation/{IContractRequestMessage.d.ts → IDataspaceProtocolContractRequestMessage.d.ts} +5 -5
  124. package/dist/types/models/contractNegotiation/dataspaceProtocolContractNegotiationTypes.d.ts +50 -0
  125. package/dist/types/models/contractNegotiation/types/{contractNegotiationEventType.d.ts → dataspaceProtocolContractNegotiationEventType.d.ts} +2 -2
  126. package/dist/types/models/contractNegotiation/types/{contractNegotiationStateType.d.ts → dataspaceProtocolContractNegotiationStateType.d.ts} +2 -2
  127. package/dist/types/models/dataspaceProtocolContextType.d.ts +14 -0
  128. package/dist/types/models/dataspaceProtocolContexts.d.ts +21 -0
  129. package/dist/types/models/transferProcess/IDataspaceProtocolDataAddress.d.ts +24 -0
  130. package/dist/types/models/transferProcess/IDataspaceProtocolEndpointProperty.d.ts +19 -0
  131. package/dist/types/models/transferProcess/IDataspaceProtocolTransferCompletionMessage.d.ts +24 -0
  132. package/dist/types/models/transferProcess/IDataspaceProtocolTransferError.d.ts +32 -0
  133. package/dist/types/models/transferProcess/IDataspaceProtocolTransferProcess.d.ts +29 -0
  134. package/dist/types/models/transferProcess/IDataspaceProtocolTransferRequestMessage.d.ts +39 -0
  135. package/dist/types/models/transferProcess/IDataspaceProtocolTransferStartMessage.d.ts +30 -0
  136. package/dist/types/models/transferProcess/IDataspaceProtocolTransferSuspensionMessage.d.ts +32 -0
  137. package/dist/types/models/transferProcess/IDataspaceProtocolTransferTerminationMessage.d.ts +32 -0
  138. package/dist/types/models/transferProcess/dataspaceProtocolTransferProcessTypes.d.ts +46 -0
  139. package/dist/types/models/transferProcess/types/dataspaceProtocolTransferProcessStateType.d.ts +30 -0
  140. package/dist/types/utils/dataspaceProtocolHelper.d.ts +20 -0
  141. package/docs/changelog.md +314 -0
  142. package/docs/reference/classes/CatalogDataTypes.md +25 -0
  143. package/docs/reference/classes/ContractNegotiationDataTypes.md +1 -13
  144. package/docs/reference/classes/DataspaceProtocolDataTypes.md +37 -0
  145. package/docs/reference/classes/DataspaceProtocolHelper.md +63 -0
  146. package/docs/reference/classes/TransferProcessDataTypes.md +25 -0
  147. package/docs/reference/index.md +43 -17
  148. package/docs/reference/interfaces/IDataspaceProtocolCatalog.md +96 -0
  149. package/docs/reference/interfaces/IDataspaceProtocolCatalogError.md +36 -0
  150. package/docs/reference/interfaces/IDataspaceProtocolCatalogRequestMessage.md +28 -0
  151. package/docs/reference/interfaces/{IContractAgreementMessage.md → IDataspaceProtocolContractAgreementMessage.md} +3 -3
  152. package/docs/reference/interfaces/{IContractAgreementVerificationMessage.md → IDataspaceProtocolContractAgreementVerificationMessage.md} +3 -3
  153. package/docs/reference/interfaces/{IContractNegotiation.md → IDataspaceProtocolContractNegotiation.md} +4 -4
  154. package/docs/reference/interfaces/{IContractNegotiationError.md → IDataspaceProtocolContractNegotiationError.md} +4 -28
  155. package/docs/reference/interfaces/{IContractNegotiationEventMessage.md → IDataspaceProtocolContractNegotiationEventMessage.md} +4 -4
  156. package/docs/reference/interfaces/{IContractNegotiationTerminationMessage.md → IDataspaceProtocolContractNegotiationTerminationMessage.md} +3 -3
  157. package/docs/reference/interfaces/{IContractOfferMessage.md → IDataspaceProtocolContractOfferMessage.md} +3 -3
  158. package/docs/reference/interfaces/{IContractRequestMessage.md → IDataspaceProtocolContractRequestMessage.md} +3 -3
  159. package/docs/reference/interfaces/IDataspaceProtocolDataAddress.md +36 -0
  160. package/docs/reference/interfaces/IDataspaceProtocolDataService.md +72 -0
  161. package/docs/reference/interfaces/IDataspaceProtocolDataset.md +90 -0
  162. package/docs/reference/interfaces/IDataspaceProtocolDatasetRequestMessage.md +28 -0
  163. package/docs/reference/interfaces/IDataspaceProtocolDistribution.md +98 -0
  164. package/docs/reference/interfaces/IDataspaceProtocolEndpointProperty.md +28 -0
  165. package/docs/reference/interfaces/IDataspaceProtocolTransferCompletionMessage.md +36 -0
  166. package/docs/reference/interfaces/IDataspaceProtocolTransferError.md +52 -0
  167. package/docs/reference/interfaces/IDataspaceProtocolTransferProcess.md +44 -0
  168. package/docs/reference/interfaces/IDataspaceProtocolTransferRequestMessage.md +62 -0
  169. package/docs/reference/interfaces/IDataspaceProtocolTransferStartMessage.md +45 -0
  170. package/docs/reference/interfaces/IDataspaceProtocolTransferSuspensionMessage.md +52 -0
  171. package/docs/reference/interfaces/IDataspaceProtocolTransferTerminationMessage.md +52 -0
  172. package/docs/reference/type-aliases/DataspaceProtocolCatalogTypes.md +5 -0
  173. package/docs/reference/type-aliases/DataspaceProtocolContextType.md +5 -0
  174. package/docs/reference/type-aliases/DataspaceProtocolContexts.md +5 -0
  175. package/docs/reference/type-aliases/DataspaceProtocolContractNegotiationEventType.md +5 -0
  176. package/docs/reference/type-aliases/DataspaceProtocolContractNegotiationStateType.md +5 -0
  177. package/docs/reference/type-aliases/DataspaceProtocolContractNegotiationTypes.md +5 -0
  178. package/docs/reference/type-aliases/DataspaceProtocolTransferProcessStateType.md +5 -0
  179. package/docs/reference/type-aliases/DataspaceProtocolTransferProcessTypes.md +5 -0
  180. package/docs/reference/variables/DataspaceProtocolCatalogTypes.md +50 -0
  181. package/docs/reference/variables/DataspaceProtocolContexts.md +25 -0
  182. package/docs/reference/variables/{ContractNegotiationEventType.md → DataspaceProtocolContractNegotiationEventType.md} +2 -2
  183. package/docs/reference/variables/{ContractNegotiationStateType.md → DataspaceProtocolContractNegotiationStateType.md} +2 -2
  184. package/docs/reference/variables/DataspaceProtocolContractNegotiationTypes.md +68 -0
  185. package/docs/reference/variables/DataspaceProtocolTransferProcessStateType.md +38 -0
  186. package/docs/reference/variables/DataspaceProtocolTransferProcessTypes.md +62 -0
  187. package/locales/en.json +7 -1
  188. package/package.json +3 -2
  189. package/dist/es/models/contractNegotiation/IContractAgreementMessage.js +0 -2
  190. package/dist/es/models/contractNegotiation/IContractAgreementMessage.js.map +0 -1
  191. package/dist/es/models/contractNegotiation/IContractAgreementVerificationMessage.js +0 -2
  192. package/dist/es/models/contractNegotiation/IContractAgreementVerificationMessage.js.map +0 -1
  193. package/dist/es/models/contractNegotiation/IContractNegotiation.js +0 -2
  194. package/dist/es/models/contractNegotiation/IContractNegotiation.js.map +0 -1
  195. package/dist/es/models/contractNegotiation/IContractNegotiationError.js +0 -2
  196. package/dist/es/models/contractNegotiation/IContractNegotiationError.js.map +0 -1
  197. package/dist/es/models/contractNegotiation/IContractNegotiationEventMessage.js +0 -2
  198. package/dist/es/models/contractNegotiation/IContractNegotiationEventMessage.js.map +0 -1
  199. package/dist/es/models/contractNegotiation/IContractNegotiationTerminationMessage.js +0 -2
  200. package/dist/es/models/contractNegotiation/IContractNegotiationTerminationMessage.js.map +0 -1
  201. package/dist/es/models/contractNegotiation/IContractOfferMessage.js +0 -2
  202. package/dist/es/models/contractNegotiation/IContractOfferMessage.js.map +0 -1
  203. package/dist/es/models/contractNegotiation/IContractRequestMessage.js +0 -2
  204. package/dist/es/models/contractNegotiation/IContractRequestMessage.js.map +0 -1
  205. package/dist/es/models/contractNegotiation/contractNegotiationContextType.js +0 -2
  206. package/dist/es/models/contractNegotiation/contractNegotiationContextType.js.map +0 -1
  207. package/dist/es/models/contractNegotiation/contractNegotiationContexts.js +0 -17
  208. package/dist/es/models/contractNegotiation/contractNegotiationContexts.js.map +0 -1
  209. package/dist/es/models/contractNegotiation/contractNegotiationTypes.js.map +0 -1
  210. package/dist/es/models/contractNegotiation/types/contractNegotiationEventType.js.map +0 -1
  211. package/dist/es/models/contractNegotiation/types/contractNegotiationStateType.js.map +0 -1
  212. package/dist/types/models/contractNegotiation/IContractNegotiation.d.ts +0 -29
  213. package/dist/types/models/contractNegotiation/IContractNegotiationEventMessage.d.ts +0 -29
  214. package/dist/types/models/contractNegotiation/contractNegotiationContextType.d.ts +0 -14
  215. package/dist/types/models/contractNegotiation/contractNegotiationContexts.d.ts +0 -17
  216. package/dist/types/models/contractNegotiation/contractNegotiationTypes.d.ts +0 -50
  217. package/docs/reference/type-aliases/ContractNegotiationContextType.md +0 -5
  218. package/docs/reference/type-aliases/ContractNegotiationContexts.md +0 -5
  219. package/docs/reference/type-aliases/ContractNegotiationEventType.md +0 -5
  220. package/docs/reference/type-aliases/ContractNegotiationStateType.md +0 -5
  221. package/docs/reference/type-aliases/ContractNegotiationTypes.md +0 -5
  222. package/docs/reference/variables/ContractNegotiationContexts.md +0 -19
  223. package/docs/reference/variables/ContractNegotiationTypes.md +0 -68
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolTransferError",
4
+ "description": "Interface for Dataspace Protocol Transfer Messages. https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol#error-transfer-error",
5
+ "type": "object",
6
+ "properties": {
7
+ "@context": {
8
+ "description": "The Dataspace Protocol JSON-LD context type.",
9
+ "anyOf": [
10
+ {
11
+ "type": "string",
12
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
13
+ },
14
+ {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string",
18
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
19
+ },
20
+ "minItems": 1,
21
+ "maxItems": 1
22
+ },
23
+ {
24
+ "type": "array",
25
+ "minItems": 2,
26
+ "prefixItems": [
27
+ {
28
+ "type": "string",
29
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
30
+ },
31
+ {
32
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
33
+ }
34
+ ],
35
+ "items": {
36
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
37
+ }
38
+ },
39
+ {
40
+ "type": "array",
41
+ "minItems": 2,
42
+ "prefixItems": [
43
+ {
44
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
49
+ }
50
+ ],
51
+ "items": {
52
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "@type": {
58
+ "type": "string",
59
+ "const": "TransferError",
60
+ "description": "LD Type"
61
+ },
62
+ "consumerPid": {
63
+ "type": "string",
64
+ "description": "MUST refer to the transfer identifier of the Consumer side."
65
+ },
66
+ "providerPid": {
67
+ "type": "string",
68
+ "description": "MUST refer to the transfer identifier of the Provider side."
69
+ },
70
+ "code": {
71
+ "type": "string",
72
+ "description": "The error code."
73
+ },
74
+ "reason": {
75
+ "type": "array",
76
+ "items": {},
77
+ "description": "The error reason(s)."
78
+ }
79
+ },
80
+ "required": [
81
+ "@context",
82
+ "@type",
83
+ "consumerPid",
84
+ "providerPid"
85
+ ],
86
+ "additionalProperties": false
87
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolTransferProcess",
4
+ "description": "Interface for Dataspace Protocol Transfer Messages. https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#ack-transfer-process",
5
+ "type": "object",
6
+ "properties": {
7
+ "@context": {
8
+ "description": "The Dataspace Protocol JSON-LD context type.",
9
+ "anyOf": [
10
+ {
11
+ "type": "string",
12
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
13
+ },
14
+ {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string",
18
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
19
+ },
20
+ "minItems": 1,
21
+ "maxItems": 1
22
+ },
23
+ {
24
+ "type": "array",
25
+ "minItems": 2,
26
+ "prefixItems": [
27
+ {
28
+ "type": "string",
29
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
30
+ },
31
+ {
32
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
33
+ }
34
+ ],
35
+ "items": {
36
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
37
+ }
38
+ },
39
+ {
40
+ "type": "array",
41
+ "minItems": 2,
42
+ "prefixItems": [
43
+ {
44
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
49
+ }
50
+ ],
51
+ "items": {
52
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "@type": {
58
+ "type": "string",
59
+ "const": "TransferProcess",
60
+ "description": "LD Type"
61
+ },
62
+ "consumerPid": {
63
+ "type": "string",
64
+ "description": "MUST refer to the transfer identifier of the Consumer side."
65
+ },
66
+ "providerPid": {
67
+ "type": "string",
68
+ "description": "MUST refer to the transfer identifier of the Provider side."
69
+ },
70
+ "state": {
71
+ "$ref": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolTransferProcessStateType",
72
+ "description": "The transfer process state."
73
+ }
74
+ },
75
+ "required": [
76
+ "@context",
77
+ "@type",
78
+ "consumerPid",
79
+ "providerPid",
80
+ "state"
81
+ ],
82
+ "additionalProperties": false
83
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolTransferRequestMessage",
4
+ "description": "Interface for Dataspace Protocol Transfer Messages. https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-request-message",
5
+ "type": "object",
6
+ "properties": {
7
+ "@context": {
8
+ "description": "The Dataspace Protocol JSON-LD context type.",
9
+ "anyOf": [
10
+ {
11
+ "type": "string",
12
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
13
+ },
14
+ {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string",
18
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
19
+ },
20
+ "minItems": 1,
21
+ "maxItems": 1
22
+ },
23
+ {
24
+ "type": "array",
25
+ "minItems": 2,
26
+ "prefixItems": [
27
+ {
28
+ "type": "string",
29
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
30
+ },
31
+ {
32
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
33
+ }
34
+ ],
35
+ "items": {
36
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
37
+ }
38
+ },
39
+ {
40
+ "type": "array",
41
+ "minItems": 2,
42
+ "prefixItems": [
43
+ {
44
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
49
+ }
50
+ ],
51
+ "items": {
52
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "@type": {
58
+ "type": "string",
59
+ "const": "TransferRequestMessage",
60
+ "description": "LD Type"
61
+ },
62
+ "agreementId": {
63
+ "type": "string",
64
+ "description": "MUST refer to an existing Agreement between the Consumer and Provider."
65
+ },
66
+ "callbackAddress": {
67
+ "type": "string",
68
+ "description": "MUST be a URI indicating where messages to the Consumer SHOULD be sent."
69
+ },
70
+ "consumerPid": {
71
+ "type": "string",
72
+ "description": "MUST refer to the transfer identifier of the Consumer side."
73
+ },
74
+ "format": {
75
+ "type": "string",
76
+ "description": "The format property is a format specified by a Distribution for the Dataset associated with the Agreement. This is generally obtained from the Provider's Catalog."
77
+ },
78
+ "dataAddress": {
79
+ "$ref": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolDataAddress",
80
+ "description": "If defined MUST contain a transport-specific set of properties for pushing the data. It MAY include an endpoint, a temporary authorization via the endpointProperties property - depending on the endpointType."
81
+ }
82
+ },
83
+ "required": [
84
+ "@context",
85
+ "@type",
86
+ "agreementId",
87
+ "callbackAddress",
88
+ "consumerPid",
89
+ "format"
90
+ ],
91
+ "additionalProperties": false
92
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolTransferStartMessage",
4
+ "description": "Interface for Dataspace Protocol Transfer Messages. https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-start-message",
5
+ "type": "object",
6
+ "properties": {
7
+ "@context": {
8
+ "description": "The Dataspace Protocol JSON-LD context type.",
9
+ "anyOf": [
10
+ {
11
+ "type": "string",
12
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
13
+ },
14
+ {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string",
18
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
19
+ },
20
+ "minItems": 1,
21
+ "maxItems": 1
22
+ },
23
+ {
24
+ "type": "array",
25
+ "minItems": 2,
26
+ "prefixItems": [
27
+ {
28
+ "type": "string",
29
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
30
+ },
31
+ {
32
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
33
+ }
34
+ ],
35
+ "items": {
36
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
37
+ }
38
+ },
39
+ {
40
+ "type": "array",
41
+ "minItems": 2,
42
+ "prefixItems": [
43
+ {
44
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
49
+ }
50
+ ],
51
+ "items": {
52
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "@type": {
58
+ "type": "string",
59
+ "const": "TransferStartMessage",
60
+ "description": "LD Type"
61
+ },
62
+ "consumerPid": {
63
+ "type": "string",
64
+ "description": "MUST refer to the transfer identifier of the Consumer side."
65
+ },
66
+ "providerPid": {
67
+ "type": "string",
68
+ "description": "MUST refer to the transfer identifier of the Provider side."
69
+ },
70
+ "dataAddress": {
71
+ "$ref": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolDataAddress",
72
+ "description": "MUST be provided if the current transfer is a pull transfer and contains a transport-specific endpoint address for obtaining the data."
73
+ }
74
+ },
75
+ "required": [
76
+ "@context",
77
+ "@type",
78
+ "consumerPid",
79
+ "providerPid"
80
+ ],
81
+ "additionalProperties": false
82
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolTransferSuspensionMessage",
4
+ "description": "Interface for Dataspace Protocol Transfer Messages. https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-suspension-message",
5
+ "type": "object",
6
+ "properties": {
7
+ "@context": {
8
+ "description": "The Dataspace Protocol JSON-LD context type.",
9
+ "anyOf": [
10
+ {
11
+ "type": "string",
12
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
13
+ },
14
+ {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string",
18
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
19
+ },
20
+ "minItems": 1,
21
+ "maxItems": 1
22
+ },
23
+ {
24
+ "type": "array",
25
+ "minItems": 2,
26
+ "prefixItems": [
27
+ {
28
+ "type": "string",
29
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
30
+ },
31
+ {
32
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
33
+ }
34
+ ],
35
+ "items": {
36
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
37
+ }
38
+ },
39
+ {
40
+ "type": "array",
41
+ "minItems": 2,
42
+ "prefixItems": [
43
+ {
44
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
49
+ }
50
+ ],
51
+ "items": {
52
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "@type": {
58
+ "type": "string",
59
+ "const": "TransferSuspensionMessage",
60
+ "description": "LD Type"
61
+ },
62
+ "consumerPid": {
63
+ "type": "string",
64
+ "description": "MUST refer to the transfer identifier of the Consumer side."
65
+ },
66
+ "providerPid": {
67
+ "type": "string",
68
+ "description": "MUST refer to the transfer identifier of the Provider side."
69
+ },
70
+ "code": {
71
+ "type": "string",
72
+ "description": "The suspension code."
73
+ },
74
+ "reason": {
75
+ "type": "array",
76
+ "items": {},
77
+ "description": "The suspension reason(s)."
78
+ }
79
+ },
80
+ "required": [
81
+ "@context",
82
+ "@type",
83
+ "consumerPid",
84
+ "providerPid"
85
+ ],
86
+ "additionalProperties": false
87
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolTransferTerminationMessage",
4
+ "description": "Interface for Dataspace Protocol Transfer Messages. https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/#transfer-termination-message",
5
+ "type": "object",
6
+ "properties": {
7
+ "@context": {
8
+ "description": "The Dataspace Protocol JSON-LD context type.",
9
+ "anyOf": [
10
+ {
11
+ "type": "string",
12
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
13
+ },
14
+ {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string",
18
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
19
+ },
20
+ "minItems": 1,
21
+ "maxItems": 1
22
+ },
23
+ {
24
+ "type": "array",
25
+ "minItems": 2,
26
+ "prefixItems": [
27
+ {
28
+ "type": "string",
29
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
30
+ },
31
+ {
32
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
33
+ }
34
+ ],
35
+ "items": {
36
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
37
+ }
38
+ },
39
+ {
40
+ "type": "array",
41
+ "minItems": 2,
42
+ "prefixItems": [
43
+ {
44
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "const": "https://w3id.org/dspace/2025/1/context.jsonld"
49
+ }
50
+ ],
51
+ "items": {
52
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "@type": {
58
+ "type": "string",
59
+ "const": "TransferTerminationMessage",
60
+ "description": "LD Type"
61
+ },
62
+ "consumerPid": {
63
+ "type": "string",
64
+ "description": "MUST refer to the transfer identifier of the Consumer side."
65
+ },
66
+ "providerPid": {
67
+ "type": "string",
68
+ "description": "MUST refer to the transfer identifier of the Provider side."
69
+ },
70
+ "code": {
71
+ "type": "string",
72
+ "description": "The termination code."
73
+ },
74
+ "reason": {
75
+ "type": "array",
76
+ "items": {},
77
+ "description": "The termination reason(s)."
78
+ }
79
+ },
80
+ "required": [
81
+ "@context",
82
+ "@type",
83
+ "consumerPid",
84
+ "providerPid"
85
+ ],
86
+ "additionalProperties": false
87
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://schema.twindev.org/dataspace-protocol/DsProtocolDataService",
4
+ "description": "DataService compliant with Eclipse Data Space Protocol. Validates only DS Protocol-specific requirements while allowing all optional DCAT properties.",
5
+ "title": "DataspaceProtocolDataService",
6
+ "allOf": [
7
+ {
8
+ "$ref": "https://w3id.org/dspace/2025/1/catalog/dataset-schema.json#/definitions/DataService"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://schema.twindev.org/dataspace-protocol/DsProtocolDistribution",
4
+ "description": "Distribution compliant with Eclipse Data Space Protocol. Validates only DS Protocol-specific requirements while allowing all optional DCAT properties.",
5
+ "title": "DataspaceProtocolDistribution",
6
+ "allOf": [
7
+ {
8
+ "$ref": "https://w3id.org/dspace/2025/1/catalog/dataset-schema.json#/definitions/Distribution"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,110 @@
1
+ // Copyright 2025 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { GeneralError, Is, ObjectHelper } from "@twin.org/core";
4
+ import { DataTypeHelper, JsonSchemaHelper } from "@twin.org/data-core";
5
+ import { JsonLdHelper, JsonLdProcessor } from "@twin.org/data-json-ld";
6
+ import { DcatContexts } from "@twin.org/standards-w3c-dcat";
7
+ import { DataspaceProtocolContexts } from "../models/dataspaceProtocolContexts.js";
8
+ import { DataspaceProtocolTransferProcessTypes } from "../models/transferProcess/dataspaceProtocolTransferProcessTypes.js";
9
+ /**
10
+ * Dataspace protocol helper.
11
+ */
12
+ export class DataspaceProtocolHelper {
13
+ /**
14
+ * The class name.
15
+ * @internal
16
+ */
17
+ static CLASS_NAME = "DataspaceProtocolHelper";
18
+ /**
19
+ * Checks whether the object passed as parameter is conformant to the DS Protocol definitions.
20
+ * @param object The object to check
21
+ * @param validationFailures the Validation failures obtained during the conformance checking.
22
+ * @returns true or false depending whether the object is conformant or not
23
+ */
24
+ static async checkConformance(object, validationFailures) {
25
+ let result = false;
26
+ const dcatNamespace = DcatContexts.Namespace;
27
+ const objectTypes = await JsonLdHelper.getType(object);
28
+ for (const type of objectTypes) {
29
+ let dataTypeIdentifier = type;
30
+ // If the DCAT3 types are used, convert to the DS Protocol equivalent
31
+ // which have the enhancements and constraints defined by the DS Protocol
32
+ if (type.startsWith(dcatNamespace)) {
33
+ const nonQualifiedType = type.replace(dcatNamespace, "");
34
+ dataTypeIdentifier = `${DataspaceProtocolContexts.Namespace}${nonQualifiedType}`;
35
+ }
36
+ const schema = await DataTypeHelper.getSchemaForType(dataTypeIdentifier);
37
+ if (!schema) {
38
+ throw new GeneralError(DataspaceProtocolHelper.CLASS_NAME, "schemaNotRegistered", {
39
+ schemaId: dataTypeIdentifier
40
+ });
41
+ }
42
+ const normalizedObject = await DataspaceProtocolHelper.normalize(object);
43
+ const validationResult = await JsonSchemaHelper.validate(schema, normalizedObject);
44
+ result = validationResult.result;
45
+ if (!result && Is.array(validationResult.error)) {
46
+ for (const aError of validationResult.error) {
47
+ const validationFailure = {
48
+ property: aError.instancePath,
49
+ reason: aError.message
50
+ };
51
+ validationFailures.push(validationFailure);
52
+ }
53
+ }
54
+ }
55
+ return result;
56
+ }
57
+ /**
58
+ * Normalizes the input object making it compliant with the DS Protocol specifications.
59
+ * @param object The input object.
60
+ * @returns The input object normalized.
61
+ */
62
+ static async normalize(object) {
63
+ const annotatedObject = DataspaceProtocolHelper.annotateLDContextForFormat(object);
64
+ // Determine if this is a message/transfer type (which expects Context) or a catalog type (which expects JsonLdContext)
65
+ const objectType = ObjectHelper.propertyGet(object, "@type");
66
+ const isTransferProcessType = Is.string(objectType) &&
67
+ (objectType.includes("Message") ||
68
+ objectType === DataspaceProtocolTransferProcessTypes.TransferProcess ||
69
+ objectType === DataspaceProtocolTransferProcessTypes.TransferError);
70
+ const contextToUse = isTransferProcessType
71
+ ? DataspaceProtocolContexts.Context
72
+ : DataspaceProtocolContexts.JsonLdContext;
73
+ const compactedObject = await JsonLdProcessor.compact(annotatedObject, [contextToUse]);
74
+ if (!Is.array(compactedObject["@context"])) {
75
+ ObjectHelper.propertySet(compactedObject, "@context", [
76
+ ObjectHelper.propertyGet(compactedObject, "@context")
77
+ ]);
78
+ }
79
+ return compactedObject;
80
+ }
81
+ /**
82
+ * Ensures format property has a proper LD Context.
83
+ * @param object The object.
84
+ * @returns a copy of the object annotated with the proper LD Context.
85
+ * @internal
86
+ */
87
+ static annotateLDContextForFormat(object) {
88
+ const result = ObjectHelper.clone(object);
89
+ // This step is needed before compaction as 'dcterms:format' is not defined originally as '@vocab'
90
+ // but it is in the DSP LD Context
91
+ const EXTRA_ANNOTATION = {
92
+ "dcterms:format": {
93
+ "@id": "dcterms:format",
94
+ "@type": "@vocab"
95
+ }
96
+ };
97
+ const ldContext = ObjectHelper.propertyGet(result, "@context");
98
+ if (Is.array(ldContext)) {
99
+ ldContext.push(EXTRA_ANNOTATION);
100
+ }
101
+ else if (Is.object(ldContext)) {
102
+ ObjectHelper.propertySet(result, "@context", { ...ldContext, ...EXTRA_ANNOTATION });
103
+ }
104
+ else if (Is.string(ldContext)) {
105
+ ObjectHelper.propertySet(result, "@context", [ldContext, EXTRA_ANNOTATION]);
106
+ }
107
+ return result;
108
+ }
109
+ }
110
+ //# sourceMappingURL=dataspaceProtocolHelper.js.map