@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 @@
1
+ {"version":3,"file":"dataspaceProtocolHelper.js","sourceRoot":"","sources":["../../../src/utils/dataspaceProtocolHelper.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\nimport { GeneralError, Is, ObjectHelper, type IValidationFailure } from \"@twin.org/core\";\nimport { DataTypeHelper, JsonSchemaHelper } from \"@twin.org/data-core\";\nimport {\n\tJsonLdHelper,\n\tJsonLdProcessor,\n\ttype IJsonLdContextDefinitionRoot,\n\ttype IJsonLdNodeObject\n} from \"@twin.org/data-json-ld\";\nimport { nameof } from \"@twin.org/nameof\";\nimport { DcatContexts } from \"@twin.org/standards-w3c-dcat\";\nimport { DataspaceProtocolContexts } from \"../models/dataspaceProtocolContexts.js\";\nimport { DataspaceProtocolTransferProcessTypes } from \"../models/transferProcess/dataspaceProtocolTransferProcessTypes.js\";\n\n/**\n * Dataspace protocol helper.\n */\nexport abstract class DataspaceProtocolHelper {\n\t/**\n\t * The class name.\n\t * @internal\n\t */\n\tpublic static readonly CLASS_NAME = nameof<DataspaceProtocolHelper>();\n\n\t/**\n\t * Checks whether the object passed as parameter is conformant to the DS Protocol definitions.\n\t * @param object The object to check\n\t * @param validationFailures the Validation failures obtained during the conformance checking.\n\t * @returns true or false depending whether the object is conformant or not\n\t */\n\tpublic static async checkConformance(\n\t\tobject: IJsonLdNodeObject,\n\t\tvalidationFailures: IValidationFailure[]\n\t): Promise<boolean> {\n\t\tlet result = false;\n\n\t\tconst dcatNamespace = DcatContexts.Namespace;\n\n\t\tconst objectTypes = await JsonLdHelper.getType(object);\n\n\t\tfor (const type of objectTypes) {\n\t\t\tlet dataTypeIdentifier = type;\n\n\t\t\t// If the DCAT3 types are used, convert to the DS Protocol equivalent\n\t\t\t// which have the enhancements and constraints defined by the DS Protocol\n\t\t\tif (type.startsWith(dcatNamespace)) {\n\t\t\t\tconst nonQualifiedType = type.replace(dcatNamespace, \"\");\n\t\t\t\tdataTypeIdentifier = `${DataspaceProtocolContexts.Namespace}${nonQualifiedType}`;\n\t\t\t}\n\n\t\t\tconst schema = await DataTypeHelper.getSchemaForType(dataTypeIdentifier);\n\t\t\tif (!schema) {\n\t\t\t\tthrow new GeneralError(DataspaceProtocolHelper.CLASS_NAME, \"schemaNotRegistered\", {\n\t\t\t\t\tschemaId: dataTypeIdentifier\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst normalizedObject = await DataspaceProtocolHelper.normalize(object);\n\n\t\t\tconst validationResult = await JsonSchemaHelper.validate(schema, normalizedObject);\n\t\t\tresult = validationResult.result;\n\n\t\t\tif (!result && Is.array(validationResult.error)) {\n\t\t\t\tfor (const aError of validationResult.error) {\n\t\t\t\t\tconst validationFailure: IValidationFailure = {\n\t\t\t\t\t\tproperty: aError.instancePath,\n\t\t\t\t\t\treason: aError.message as string\n\t\t\t\t\t};\n\t\t\t\t\tvalidationFailures.push(validationFailure);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Normalizes the input object making it compliant with the DS Protocol specifications.\n\t * @param object The input object.\n\t * @returns The input object normalized.\n\t */\n\tpublic static async normalize(object: IJsonLdNodeObject): Promise<IJsonLdNodeObject> {\n\t\tconst annotatedObject = DataspaceProtocolHelper.annotateLDContextForFormat(object);\n\n\t\t// Determine if this is a message/transfer type (which expects Context) or a catalog type (which expects JsonLdContext)\n\t\tconst objectType = ObjectHelper.propertyGet<string | string[]>(object, \"@type\");\n\t\tconst isTransferProcessType =\n\t\t\tIs.string(objectType) &&\n\t\t\t(objectType.includes(\"Message\") ||\n\t\t\t\tobjectType === DataspaceProtocolTransferProcessTypes.TransferProcess ||\n\t\t\t\tobjectType === DataspaceProtocolTransferProcessTypes.TransferError);\n\n\t\tconst contextToUse = isTransferProcessType\n\t\t\t? DataspaceProtocolContexts.Context\n\t\t\t: DataspaceProtocolContexts.JsonLdContext;\n\n\t\tconst compactedObject = await JsonLdProcessor.compact(annotatedObject, [contextToUse]);\n\n\t\tif (!Is.array(compactedObject[\"@context\"])) {\n\t\t\tObjectHelper.propertySet(compactedObject, \"@context\", [\n\t\t\t\tObjectHelper.propertyGet(compactedObject, \"@context\")\n\t\t\t]);\n\t\t}\n\n\t\treturn compactedObject;\n\t}\n\n\t/**\n\t * Ensures format property has a proper LD Context.\n\t * @param object The object.\n\t * @returns a copy of the object annotated with the proper LD Context.\n\t * @internal\n\t */\n\tprivate static annotateLDContextForFormat(object: IJsonLdNodeObject): IJsonLdNodeObject {\n\t\tconst result = ObjectHelper.clone<IJsonLdNodeObject>(object);\n\n\t\t// This step is needed before compaction as 'dcterms:format' is not defined originally as '@vocab'\n\t\t// but it is in the DSP LD Context\n\t\tconst EXTRA_ANNOTATION = {\n\t\t\t\"dcterms:format\": {\n\t\t\t\t\"@id\": \"dcterms:format\",\n\t\t\t\t\"@type\": \"@vocab\"\n\t\t\t}\n\t\t};\n\t\tconst ldContext = ObjectHelper.propertyGet<IJsonLdContextDefinitionRoot>(result, \"@context\");\n\t\tif (Is.array(ldContext)) {\n\t\t\tldContext.push(EXTRA_ANNOTATION);\n\t\t} else if (Is.object(ldContext)) {\n\t\t\tObjectHelper.propertySet(result, \"@context\", { ...ldContext, ...EXTRA_ANNOTATION });\n\t\t} else if (Is.string(ldContext)) {\n\t\t\tObjectHelper.propertySet(result, \"@context\", [ldContext, EXTRA_ANNOTATION]);\n\t\t}\n\n\t\treturn result;\n\t}\n}\n"]}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Handle all the catalog data types for Dataspace Protocol.
3
+ */
4
+ export declare class CatalogDataTypes {
5
+ /**
6
+ * Register all the data types.
7
+ */
8
+ static registerTypes(): void;
9
+ }
@@ -1,11 +1,7 @@
1
1
  /**
2
- * Handle all the data types for Dataspace Protocol Contract Negotiation.
2
+ * Handle all the contract negotiation data types for Dataspace Protocol.
3
3
  */
4
4
  export declare class ContractNegotiationDataTypes {
5
- /**
6
- * Register the JSON-LD Redirects.
7
- */
8
- static registerRedirects(): void;
9
5
  /**
10
6
  * Register all the data types.
11
7
  */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Handle all the data types for Dataspace Protocol.
3
+ */
4
+ export declare class DataspaceProtocolDataTypes {
5
+ /**
6
+ * Register the JSON-LD Redirects.
7
+ */
8
+ static registerRedirects(): void;
9
+ /**
10
+ * Register all the data types.
11
+ */
12
+ static registerTypes(): void;
13
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Handle all the transfer process data types for Dataspace Protocol.
3
+ */
4
+ export declare class TransferProcessDataTypes {
5
+ /**
6
+ * Register all the data types.
7
+ */
8
+ static registerTypes(): void;
9
+ }
@@ -1,14 +1,37 @@
1
+ export * from "./models/dataspaceProtocolContexts.js";
2
+ export * from "./models/dataspaceProtocolContextType.js";
3
+ export * from "./dataTypes/dataspaceProtocolDataTypes.js";
4
+ export * from "./models/catalog/dataspaceProtocolCatalogTypes.js";
5
+ export * from "./models/catalog/IDataspaceProtocolCatalogError.js";
6
+ export * from "./models/catalog/IDataspaceProtocolCatalogRequestMessage.js";
7
+ export * from "./models/catalog/IDataspaceProtocolDatasetRequestMessage.js";
8
+ export * from "./models/catalog/IDataspaceProtocolDataset.js";
9
+ export * from "./models/catalog/IDataspaceProtocolCatalog.js";
10
+ export * from "./models/catalog/IDataspaceProtocolDistribution.js";
11
+ export * from "./models/catalog/IDataspaceProtocolDataService.js";
12
+ export * from "./dataTypes/catalogDataTypes.js";
13
+ export * from "./models/contractNegotiation/dataspaceProtocolContractNegotiationTypes.js";
14
+ export * from "./models/contractNegotiation/IDataspaceProtocolContractAgreementMessage.js";
15
+ export * from "./models/contractNegotiation/IDataspaceProtocolContractAgreementVerificationMessage.js";
16
+ export * from "./models/contractNegotiation/IDataspaceProtocolContractNegotiation.js";
17
+ export * from "./models/contractNegotiation/IDataspaceProtocolContractNegotiationError.js";
18
+ export * from "./models/contractNegotiation/IDataspaceProtocolContractNegotiationEventMessage.js";
19
+ export * from "./models/contractNegotiation/IDataspaceProtocolContractNegotiationTerminationMessage.js";
20
+ export * from "./models/contractNegotiation/IDataspaceProtocolContractOfferMessage.js";
21
+ export * from "./models/contractNegotiation/IDataspaceProtocolContractRequestMessage.js";
22
+ export * from "./models/contractNegotiation/types/dataspaceProtocolContractNegotiationEventType.js";
23
+ export * from "./models/contractNegotiation/types/dataspaceProtocolContractNegotiationStateType.js";
1
24
  export * from "./dataTypes/contractNegotiationDataTypes.js";
2
- export * from "./models/contractNegotiation/contractNegotiationContexts.js";
3
- export * from "./models/contractNegotiation/contractNegotiationContextType.js";
4
- export * from "./models/contractNegotiation/contractNegotiationTypes.js";
5
- export * from "./models/contractNegotiation/IContractAgreementMessage.js";
6
- export * from "./models/contractNegotiation/IContractAgreementVerificationMessage.js";
7
- export * from "./models/contractNegotiation/IContractNegotiation.js";
8
- export * from "./models/contractNegotiation/IContractNegotiationError.js";
9
- export * from "./models/contractNegotiation/IContractNegotiationEventMessage.js";
10
- export * from "./models/contractNegotiation/IContractNegotiationTerminationMessage.js";
11
- export * from "./models/contractNegotiation/IContractOfferMessage.js";
12
- export * from "./models/contractNegotiation/IContractRequestMessage.js";
13
- export * from "./models/contractNegotiation/types/contractNegotiationEventType.js";
14
- export * from "./models/contractNegotiation/types/contractNegotiationStateType.js";
25
+ export * from "./models/transferProcess/dataspaceProtocolTransferProcessTypes.js";
26
+ export * from "./models/transferProcess/IDataspaceProtocolDataAddress.js";
27
+ export * from "./models/transferProcess/IDataspaceProtocolEndpointProperty.js";
28
+ export * from "./models/transferProcess/IDataspaceProtocolTransferCompletionMessage.js";
29
+ export * from "./models/transferProcess/IDataspaceProtocolTransferError.js";
30
+ export * from "./models/transferProcess/IDataspaceProtocolTransferProcess.js";
31
+ export * from "./models/transferProcess/IDataspaceProtocolTransferRequestMessage.js";
32
+ export * from "./models/transferProcess/IDataspaceProtocolTransferStartMessage.js";
33
+ export * from "./models/transferProcess/IDataspaceProtocolTransferSuspensionMessage.js";
34
+ export * from "./models/transferProcess/IDataspaceProtocolTransferTerminationMessage.js";
35
+ export * from "./models/transferProcess/types/dataspaceProtocolTransferProcessStateType.js";
36
+ export * from "./dataTypes/transferProcessDataTypes.js";
37
+ export * from "./utils/dataspaceProtocolHelper.js";
@@ -0,0 +1,63 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { IDcatCatalog } from "@twin.org/standards-w3c-dcat";
3
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
4
+ import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
5
+ import type { IDataspaceProtocolDataService } from "./IDataspaceProtocolDataService.js";
6
+ import type { IDataspaceProtocolDataset } from "./IDataspaceProtocolDataset.js";
7
+ import type { IDataspaceProtocolDistribution } from "./IDataspaceProtocolDistribution.js";
8
+ /**
9
+ * Catalog interface compliant with Eclipse Data Space Protocol.
10
+ *
11
+ * This interface extends ICatalog and enforces DS Protocol-specific requirements
12
+ * by overriding properties with more specific types and constraints.
13
+ *
14
+ * **Requirements per DS Protocol:**
15
+ * - `@id` MUST be present for dataset identification (REQUIRED)
16
+ * - participantId MUST be present (REQUIRED)
17
+ *
18
+ * **Type System Design:**
19
+ * - Interface extension allows TypeScript to override inherited property types
20
+ * - Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
21
+ * - DS Protocol-specific constraints are defined here
22
+ *
23
+ *
24
+ * @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
25
+ * @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
26
+ *
27
+ */
28
+ export interface IDataspaceProtocolCatalog extends Omit<IDcatCatalog, "@type" | "@context" | "dcat:catalog" | "dcat:dataset" | "dcat:distribution" | "dcat:service"> {
29
+ /**
30
+ * LD Context. Required per Eclipse Data Space Protocol.
31
+ */
32
+ "@context": DataspaceProtocolContextType;
33
+ /**
34
+ * The type identifier for the Catalog.
35
+ * REQUIRED per Eclipse Data Space Protocol.
36
+ */
37
+ "@type": typeof DataspaceProtocolCatalogTypes.Catalog;
38
+ /**
39
+ * Unique identifier for the dataset.
40
+ * REQUIRED per Eclipse Data Space Protocol.
41
+ */
42
+ "@id": string;
43
+ /**
44
+ * Participant Id
45
+ */
46
+ participantId: string;
47
+ /**
48
+ * Other concerned catalogs
49
+ */
50
+ catalog?: ObjectOrArray<Omit<IDataspaceProtocolCatalog, "@context">>;
51
+ /**
52
+ * Datasets registered
53
+ */
54
+ dataset?: ObjectOrArray<Omit<IDataspaceProtocolDataset, "@context">>;
55
+ /**
56
+ * Catalog's distributions
57
+ */
58
+ distribution?: ObjectOrArray<Omit<IDataspaceProtocolDistribution, "@context">>;
59
+ /**
60
+ * Data services registered-
61
+ */
62
+ service?: ObjectOrArray<Omit<IDataspaceProtocolDataService, "@context">>;
63
+ }
@@ -0,0 +1,24 @@
1
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
2
+ import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
3
+ /**
4
+ * Interface for Dataspace Protocol Catalog Error.
5
+ * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#error-catalog-error
6
+ */
7
+ export interface IDataspaceProtocolCatalogError {
8
+ /**
9
+ * The JSON-LD context.
10
+ */
11
+ "@context": DataspaceProtocolContextType;
12
+ /**
13
+ * The type of the message.
14
+ */
15
+ "@type": typeof DataspaceProtocolCatalogTypes.CatalogError;
16
+ /**
17
+ * The error code.
18
+ */
19
+ code: string;
20
+ /**
21
+ * The error reason(s).
22
+ */
23
+ reason?: any[];
24
+ }
@@ -0,0 +1,20 @@
1
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
2
+ import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
3
+ /**
4
+ * Interface for Dataspace Protocol Catalog Request Messages.
5
+ * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#catalog-request-message
6
+ */
7
+ export interface IDataspaceProtocolCatalogRequestMessage {
8
+ /**
9
+ * The JSON-LD context.
10
+ */
11
+ "@context": DataspaceProtocolContextType;
12
+ /**
13
+ * The type of the message.
14
+ */
15
+ "@type": typeof DataspaceProtocolCatalogTypes.CatalogRequestMessage;
16
+ /**
17
+ * An implementation-specific query or filter expression.
18
+ */
19
+ filter?: unknown[];
20
+ }
@@ -0,0 +1,49 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { IDcatDataService } from "@twin.org/standards-w3c-dcat";
3
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
4
+ import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
5
+ import type { IDataspaceProtocolDataset } from "./IDataspaceProtocolDataset.js";
6
+ /**
7
+ * Data Service interface compliant with Eclipse Data Space Protocol.
8
+ *
9
+ * This interface extends IDataService and enforces DS Protocol-specific requirements
10
+ * by overriding properties with more specific types and constraints.
11
+ *
12
+ * **Requirements per DS Protocol:**
13
+ * - `@id` MUST be present for dataset identification (REQUIRED)
14
+ * - endpointURL MUST be present (REQUIRED)
15
+ *
16
+ * **Type System Design:**
17
+ * - Interface extension allows TypeScript to override inherited property types
18
+ * - Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
19
+ * - DS Protocol-specific constraints are defined here
20
+ *
21
+ *
22
+ * @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
23
+ * @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
24
+ *
25
+ */
26
+ export interface IDataspaceProtocolDataService extends Omit<IDcatDataService, "@type" | "@context" | "dcat:servesDataset" | "dcat:endpointURL"> {
27
+ /**
28
+ * LD Context. Required per Eclipse Data Space Protocol.
29
+ */
30
+ "@context": DataspaceProtocolContextType;
31
+ /**
32
+ * The type identifier for the Data Service.
33
+ * REQUIRED per Eclipse Data Space Protocol.
34
+ */
35
+ "@type": typeof DataspaceProtocolCatalogTypes.DataService;
36
+ /**
37
+ * Unique identifier for the dataset.
38
+ * REQUIRED per Eclipse Data Space Protocol.
39
+ */
40
+ "@id": string;
41
+ /**
42
+ * Endpoint URL
43
+ */
44
+ endpointURL: string;
45
+ /**
46
+ * Datasets served.
47
+ */
48
+ servesDataset?: ObjectOrArray<Omit<IDataspaceProtocolDataset, "@context">>;
49
+ }
@@ -0,0 +1,66 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { IDcatDataset } from "@twin.org/standards-w3c-dcat";
3
+ import type { IOdrlOffer } from "@twin.org/standards-w3c-odrl";
4
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
5
+ import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
6
+ import type { IDataspaceProtocolDistribution } from "./IDataspaceProtocolDistribution.js";
7
+ /**
8
+ * Dataset interface compliant with Eclipse Data Space Protocol.
9
+ *
10
+ * This interface extends IDataset and enforces DS Protocol-specific requirements
11
+ * by overriding properties with more specific types and constraints.
12
+ *
13
+ * **Requirements per DS Protocol:**
14
+ * - `@id` MUST be present for dataset identification (REQUIRED)
15
+ * - `odrl:hasPolicy` MUST be present as an array of ODRL Offers (REQUIRED)
16
+ * - Array MUST contain at least one IOdrlOffer
17
+ * - Each Offer MUST have `@type`: "Offer"
18
+ * - Each Offer MUST have `@id` or `uid` for identification
19
+ * - `dcat:distribution` MUST be present (REQUIRED)
20
+ *
21
+ * **Type System Design:**
22
+ * - W3C DCAT spec defines `odrl:hasPolicy` as optional singular `IOdrlPolicy`
23
+ * - DS Protocol requires it as a REQUIRED array of `IOdrlOffer`
24
+ * - Interface extension allows TypeScript to override inherited property types
25
+ * - Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
26
+ * - DS Protocol-specific constraints are defined here
27
+ *
28
+ * **Future Compatibility:**
29
+ * - Currently only one Offer per dataset is supported
30
+ * - Array structure allows future support for multiple offers
31
+ *
32
+ * @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
33
+ * @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
34
+ * @see IOdrlOffer from @twin.org/standards-w3c-odrl
35
+ * @see IResource.odrl:hasPolicy from @twin.org/standards-w3c-dcat
36
+ */
37
+ export interface IDataspaceProtocolDataset extends Omit<IDcatDataset, "odrl:hasPolicy" | "dcat:distribution" | "@type" | "@context"> {
38
+ /**
39
+ * LD Context. Required per Eclipse Data Space Protocol.
40
+ */
41
+ "@context": DataspaceProtocolContextType;
42
+ /**
43
+ * The type identifier for the dataset.
44
+ * REQUIRED per Eclipse Data Space Protocol.
45
+ */
46
+ "@type": typeof DataspaceProtocolCatalogTypes.Dataset;
47
+ /**
48
+ * Unique identifier for the dataset.
49
+ * REQUIRED per Eclipse Data Space Protocol.
50
+ */
51
+ "@id": string;
52
+ /**
53
+ * Array of ODRL policies (Offers) as required by DS Protocol.
54
+ *
55
+ * REQUIRED per Eclipse Data Space Protocol spec.
56
+ * Must contain at least one IOdrlOffer.
57
+ * Currently only single offer is supported, but array structure
58
+ * allows for future multi-offer support.
59
+ */
60
+ hasPolicy: ObjectOrArray<Omit<IOdrlOffer, "@context">>;
61
+ /**
62
+ * Distribution of the dataset.
63
+ * REQUIRED per Eclipse Data Space Protocol.
64
+ */
65
+ distribution: ObjectOrArray<Omit<IDataspaceProtocolDistribution, "@context">>;
66
+ }
@@ -0,0 +1,20 @@
1
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
2
+ import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
3
+ /**
4
+ * Interface for Dataspace Protocol Dataset Request Messages.
5
+ * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#dataset-request-message
6
+ */
7
+ export interface IDataspaceProtocolDatasetRequestMessage {
8
+ /**
9
+ * The JSON-LD context.
10
+ */
11
+ "@context": DataspaceProtocolContextType;
12
+ /**
13
+ * The type of the message.
14
+ */
15
+ "@type": typeof DataspaceProtocolCatalogTypes.DatasetRequestMessage;
16
+ /**
17
+ * The identifier of the dataset.
18
+ */
19
+ dataset: string;
20
+ }
@@ -0,0 +1,70 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { IDcatDistribution } from "@twin.org/standards-w3c-dcat";
3
+ import type { IOdrlOffer } from "@twin.org/standards-w3c-odrl";
4
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
5
+ import type { DataspaceProtocolCatalogTypes } from "./dataspaceProtocolCatalogTypes.js";
6
+ import type { IDataspaceProtocolDataService } from "./IDataspaceProtocolDataService.js";
7
+ /**
8
+ * Distribution interface compliant with Eclipse Data Space Protocol.
9
+ *
10
+ * This interface extends IDistribution and enforces DS Protocol-specific requirements
11
+ * by overriding properties with more specific types and constraints.
12
+ *
13
+ * **Requirements per DS Protocol:**
14
+ * - `@id` MUST be present for dataset identification (REQUIRED)
15
+ * - `odrl:hasPolicy` MIGHT be present as an array of ODRL Offers (OPTIONAL)
16
+ * - Array MUST contain at least one IOdrlOffer
17
+ * - Each Offer MUST have `@type`: "Offer"
18
+ * - `format` is REQUIRED.
19
+ *
20
+ * **Type System Design:**
21
+ * - W3C DCAT spec defines `odrl:hasPolicy` as optional singular `IOdrlPolicy`
22
+ * - DS Protocol requires it as a REQUIRED array of `IOdrlOffer`
23
+ * - Interface extension allows TypeScript to override inherited property types
24
+ * - Standards packages (@twin.org/standards-w3c-*) follow W3C specs exactly
25
+ * - DS Protocol-specific constraints are defined here
26
+ *
27
+ * **Future Compatibility:**
28
+ * - Currently only one Offer per dataset is supported
29
+ * - Array structure allows future support for multiple offers
30
+ *
31
+ * @see https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1-err1/#lower-level-types
32
+ * @see https://www.w3.org/TR/vocab-dcat-3/ - W3C DCAT v3 spec
33
+ * @see IOdrlOffer from @twin.org/standards-w3c-odrl
34
+ * @see IResource.odrl:hasPolicy from @twin.org/standards-w3c-dcat
35
+ */
36
+ export interface IDataspaceProtocolDistribution extends Omit<IDcatDistribution, "odrl:hasPolicy" | "@type" | "@context" | "dcterms:format"> {
37
+ /**
38
+ * LD Context. Required per Eclipse Data Space Protocol.
39
+ */
40
+ "@context": DataspaceProtocolContextType;
41
+ /**
42
+ * The type identifier for the Distribution.
43
+ * REQUIRED per Eclipse Data Space Protocol.
44
+ */
45
+ "@type": typeof DataspaceProtocolCatalogTypes.Distribution;
46
+ /**
47
+ * Unique identifier for the dataset.
48
+ * REQUIRED per Eclipse Data Space Protocol.
49
+ */
50
+ "@id": string;
51
+ /**
52
+ * Array of ODRL policies (Offers) as required by DS Protocol.
53
+ *
54
+ * REQUIRED per Eclipse Data Space Protocol spec.
55
+ * Must contain at least one IOdrlOffer.
56
+ * Currently only single offer is supported, but array structure
57
+ * allows for future multi-offer support.
58
+ */
59
+ hasPolicy?: ObjectOrArray<Omit<IOdrlOffer, "@context">>;
60
+ /**
61
+ * Access service.
62
+ * It can be a URI pointing to an access service or inline the access service itself
63
+ */
64
+ accessService: string | Omit<IDataspaceProtocolDataService, "@context">;
65
+ /**
66
+ * Distribution format.
67
+ * REQUIRED per Eclipse Data Space Protocol.
68
+ */
69
+ format: string;
70
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The types for Dataspace Protocol Catalog Protocol.
3
+ * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#catalog-protocol
4
+ */
5
+ export declare const DataspaceProtocolCatalogTypes: {
6
+ /**
7
+ * Catalog Request Message.
8
+ */
9
+ readonly CatalogRequestMessage: "CatalogRequestMessage";
10
+ /**
11
+ * Dataset Request Message.
12
+ */
13
+ readonly DatasetRequestMessage: "DatasetRequestMessage";
14
+ /**
15
+ * Catalog Error.
16
+ */
17
+ readonly CatalogError: "CatalogError";
18
+ /**
19
+ * Dataset.
20
+ */
21
+ readonly Dataset: "Dataset";
22
+ /**
23
+ * Data Service.
24
+ */
25
+ readonly DataService: "DataService";
26
+ /**
27
+ * Distribution.
28
+ */
29
+ readonly Distribution: "Distribution";
30
+ /**
31
+ * Catalog.
32
+ */
33
+ readonly Catalog: "Catalog";
34
+ };
35
+ /**
36
+ * The types for Dataspace Protocol Catalog Protocol.
37
+ */
38
+ export type DataspaceProtocolCatalogTypes = (typeof DataspaceProtocolCatalogTypes)[keyof typeof DataspaceProtocolCatalogTypes];
@@ -1,19 +1,19 @@
1
1
  import type { IOdrlAgreement } from "@twin.org/standards-w3c-odrl";
2
- import type { ContractNegotiationContextType } from "./contractNegotiationContextType.js";
3
- import type { ContractNegotiationTypes } from "./contractNegotiationTypes.js";
2
+ import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
3
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
4
4
  /**
5
5
  * Interface for Dataspace Protocol Contract Agreement Messages.
6
6
  * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#contract-agreement-message
7
7
  */
8
- export interface IContractAgreementMessage {
8
+ export interface IDataspaceProtocolContractAgreementMessage {
9
9
  /**
10
10
  * The JSON-LD context.
11
11
  */
12
- "@context": ContractNegotiationContextType;
12
+ "@context": DataspaceProtocolContextType;
13
13
  /**
14
14
  * The type of the message.
15
15
  */
16
- "@type": typeof ContractNegotiationTypes.ContractAgreementMessage;
16
+ "@type": typeof DataspaceProtocolContractNegotiationTypes.ContractAgreementMessage;
17
17
  /**
18
18
  * The provider id for the contract.
19
19
  */
@@ -1,18 +1,18 @@
1
- import type { ContractNegotiationContextType } from "./contractNegotiationContextType.js";
2
- import type { ContractNegotiationTypes } from "./contractNegotiationTypes.js";
1
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
2
+ import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
3
3
  /**
4
4
  * Interface for Dataspace Protocol Contract Agreement Verification Messages.
5
5
  * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#contract-agreement-verification-message
6
6
  */
7
- export interface IContractAgreementVerificationMessage {
7
+ export interface IDataspaceProtocolContractAgreementVerificationMessage {
8
8
  /**
9
9
  * The JSON-LD context.
10
10
  */
11
- "@context": ContractNegotiationContextType;
11
+ "@context": DataspaceProtocolContextType;
12
12
  /**
13
13
  * The type of the message.
14
14
  */
15
- "@type": typeof ContractNegotiationTypes.ContractAgreementVerificationMessage;
15
+ "@type": typeof DataspaceProtocolContractNegotiationTypes.ContractAgreementVerificationMessage;
16
16
  /**
17
17
  * The provider id for the contract.
18
18
  */
@@ -0,0 +1,29 @@
1
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
2
+ import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
3
+ import type { DataspaceProtocolContractNegotiationStateType } from "./types/dataspaceProtocolContractNegotiationStateType.js";
4
+ /**
5
+ * Interface for Dataspace Protocol Contract Agreement Messages.
6
+ * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#ack-contract-negotiation
7
+ */
8
+ export interface IDataspaceProtocolContractNegotiation {
9
+ /**
10
+ * The JSON-LD context.
11
+ */
12
+ "@context": DataspaceProtocolContextType;
13
+ /**
14
+ * The type of the message.
15
+ */
16
+ "@type": typeof DataspaceProtocolContractNegotiationTypes.ContractNegotiation;
17
+ /**
18
+ * The provider id for the contract.
19
+ */
20
+ providerPid: string;
21
+ /**
22
+ * The consumer id for the contract.
23
+ */
24
+ consumerPid: string;
25
+ /**
26
+ * The offer being requested.
27
+ */
28
+ state: DataspaceProtocolContractNegotiationStateType;
29
+ }
@@ -1,18 +1,18 @@
1
- import type { ContractNegotiationContextType } from "./contractNegotiationContextType.js";
2
- import type { ContractNegotiationTypes } from "./contractNegotiationTypes.js";
1
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
2
+ import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
3
3
  /**
4
4
  * Interface for Dataspace Protocol Contract Negotiation Error Messages.
5
5
  * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#error-contract-negotiation-error
6
6
  */
7
- export interface IContractNegotiationError {
7
+ export interface IDataspaceProtocolContractNegotiationError {
8
8
  /**
9
9
  * The JSON-LD context.
10
10
  */
11
- "@context": ContractNegotiationContextType;
11
+ "@context": DataspaceProtocolContextType;
12
12
  /**
13
13
  * The type of the message.
14
14
  */
15
- "@type": typeof ContractNegotiationTypes.ContractNegotiationError;
15
+ "@type": typeof DataspaceProtocolContractNegotiationTypes.ContractNegotiationError;
16
16
  /**
17
17
  * The provider id for the contract.
18
18
  */
@@ -28,15 +28,5 @@ export interface IContractNegotiationError {
28
28
  /**
29
29
  * The error reason(s).
30
30
  */
31
- reason?: {
32
- "@value": string;
33
- "@language"?: string;
34
- }[];
35
- /**
36
- * The error description(s).
37
- */
38
- description?: {
39
- "@value": string;
40
- "@language"?: string;
41
- }[];
31
+ reason?: any[];
42
32
  }
@@ -0,0 +1,29 @@
1
+ import type { DataspaceProtocolContextType } from "../dataspaceProtocolContextType.js";
2
+ import type { DataspaceProtocolContractNegotiationTypes } from "./dataspaceProtocolContractNegotiationTypes.js";
3
+ import type { DataspaceProtocolContractNegotiationEventType } from "./types/dataspaceProtocolContractNegotiationEventType.js";
4
+ /**
5
+ * Interface for Dataspace Protocol Contract Negotiation Event Messages.
6
+ * https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/2025-1/#contract-negotiation-event-message
7
+ */
8
+ export interface IDataspaceProtocolContractNegotiationEventMessage {
9
+ /**
10
+ * The JSON-LD context.
11
+ */
12
+ "@context": DataspaceProtocolContextType;
13
+ /**
14
+ * The type of the message.
15
+ */
16
+ "@type": typeof DataspaceProtocolContractNegotiationTypes.ContractNegotiationEventMessage;
17
+ /**
18
+ * The provider id for the contract.
19
+ */
20
+ providerPid: string;
21
+ /**
22
+ * The consumer id for the contract.
23
+ */
24
+ consumerPid: string;
25
+ /**
26
+ * The event type.
27
+ */
28
+ event: DataspaceProtocolContractNegotiationEventType;
29
+ }