@nmshd/transport 1.2.1 → 2.0.0-alpha.1

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 (266) hide show
  1. package/dist/buildInformation.js +4 -4
  2. package/dist/core/CoreSerializable.d.ts +1 -3
  3. package/dist/core/CoreSerializable.js +4 -11
  4. package/dist/core/CoreSerializable.js.map +1 -1
  5. package/dist/core/CoreSerializableAsync.d.ts +1 -3
  6. package/dist/core/CoreSerializableAsync.js +5 -11
  7. package/dist/core/CoreSerializableAsync.js.map +1 -1
  8. package/dist/core/CoreSynchronizable.d.ts +3 -3
  9. package/dist/core/CoreSynchronizable.js +2 -2
  10. package/dist/core/CoreSynchronizable.js.map +1 -1
  11. package/dist/core/TransportController.d.ts +1 -3
  12. package/dist/core/TransportController.js +2 -20
  13. package/dist/core/TransportController.js.map +1 -1
  14. package/dist/core/TransportErrors.d.ts +1 -0
  15. package/dist/core/TransportErrors.js +3 -0
  16. package/dist/core/TransportErrors.js.map +1 -1
  17. package/dist/core/backbone/RESTClientAuthenticate.js.map +1 -1
  18. package/dist/core/backbone/RequestError.js.map +1 -1
  19. package/dist/core/types/CoreAddress.d.ts +1 -1
  20. package/dist/core/types/CoreAddress.js +7 -13
  21. package/dist/core/types/CoreAddress.js.map +1 -1
  22. package/dist/core/types/CoreDate.d.ts +4 -3
  23. package/dist/core/types/CoreDate.js +17 -14
  24. package/dist/core/types/CoreDate.js.map +1 -1
  25. package/dist/core/types/CoreHash.d.ts +1 -1
  26. package/dist/core/types/CoreHash.js +7 -7
  27. package/dist/core/types/CoreHash.js.map +1 -1
  28. package/dist/core/types/CoreId.d.ts +1 -1
  29. package/dist/core/types/CoreId.js +9 -9
  30. package/dist/core/types/CoreId.js.map +1 -1
  31. package/dist/modules/accounts/AccountController.js +5 -5
  32. package/dist/modules/accounts/AccountController.js.map +1 -1
  33. package/dist/modules/accounts/IdentityController.js.map +1 -1
  34. package/dist/modules/accounts/backbone/IdentityClient.js.map +1 -1
  35. package/dist/modules/accounts/data/Identity.d.ts +5 -4
  36. package/dist/modules/accounts/data/Identity.js +12 -11
  37. package/dist/modules/accounts/data/Identity.js.map +1 -1
  38. package/dist/modules/accounts/data/IdentitySecretCredentials.d.ts +4 -4
  39. package/dist/modules/accounts/data/IdentitySecretCredentials.js +4 -5
  40. package/dist/modules/accounts/data/IdentitySecretCredentials.js.map +1 -1
  41. package/dist/modules/certificates/CertificateIssuer.js +2 -2
  42. package/dist/modules/certificates/CertificateIssuer.js.map +1 -1
  43. package/dist/modules/certificates/data/Certificate.d.ts +4 -5
  44. package/dist/modules/certificates/data/Certificate.js +4 -8
  45. package/dist/modules/certificates/data/Certificate.js.map +1 -1
  46. package/dist/modules/certificates/data/CertificateConstraint.d.ts +4 -5
  47. package/dist/modules/certificates/data/CertificateConstraint.js +4 -8
  48. package/dist/modules/certificates/data/CertificateConstraint.js.map +1 -1
  49. package/dist/modules/certificates/data/CertificateContent.d.ts +4 -5
  50. package/dist/modules/certificates/data/CertificateContent.js +4 -8
  51. package/dist/modules/certificates/data/CertificateContent.js.map +1 -1
  52. package/dist/modules/certificates/data/CertificateItem.d.ts +4 -5
  53. package/dist/modules/certificates/data/CertificateItem.js +4 -8
  54. package/dist/modules/certificates/data/CertificateItem.js.map +1 -1
  55. package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.d.ts +1 -1
  56. package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js +4 -5
  57. package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js.map +1 -1
  58. package/dist/modules/certificates/data/constraints/CertificateCityConstraint.d.ts +1 -1
  59. package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js +4 -5
  60. package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js.map +1 -1
  61. package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts +1 -1
  62. package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js +4 -5
  63. package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js.map +1 -1
  64. package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts +1 -1
  65. package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js +4 -5
  66. package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js.map +1 -1
  67. package/dist/modules/certificates/data/items/CertificateAuthorizationItem.d.ts +1 -1
  68. package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js +4 -5
  69. package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js.map +1 -1
  70. package/dist/modules/certificates/data/items/CertificateDelegateItem.d.ts +1 -1
  71. package/dist/modules/certificates/data/items/CertificateDelegateItem.js +4 -5
  72. package/dist/modules/certificates/data/items/CertificateDelegateItem.js.map +1 -1
  73. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts +1 -1
  74. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js +4 -5
  75. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js.map +1 -1
  76. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts +1 -1
  77. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js +4 -5
  78. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js.map +1 -1
  79. package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.d.ts +1 -1
  80. package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js +4 -5
  81. package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js.map +1 -1
  82. package/dist/modules/certificates/data/items/CertificateRoleItem.d.ts +1 -1
  83. package/dist/modules/certificates/data/items/CertificateRoleItem.js +4 -5
  84. package/dist/modules/certificates/data/items/CertificateRoleItem.js.map +1 -1
  85. package/dist/modules/challenges/ChallengeController.js +5 -5
  86. package/dist/modules/challenges/ChallengeController.js.map +1 -1
  87. package/dist/modules/challenges/data/Challenge.d.ts +4 -5
  88. package/dist/modules/challenges/data/Challenge.js +4 -8
  89. package/dist/modules/challenges/data/Challenge.js.map +1 -1
  90. package/dist/modules/challenges/data/ChallengeSigned.d.ts +5 -5
  91. package/dist/modules/challenges/data/ChallengeSigned.js +7 -8
  92. package/dist/modules/challenges/data/ChallengeSigned.js.map +1 -1
  93. package/dist/modules/devices/DeviceController.js.map +1 -1
  94. package/dist/modules/devices/DeviceSecretController.js +6 -6
  95. package/dist/modules/devices/DeviceSecretController.js.map +1 -1
  96. package/dist/modules/devices/DevicesController.js +4 -4
  97. package/dist/modules/devices/DevicesController.js.map +1 -1
  98. package/dist/modules/devices/backbone/DeviceAuthClient.js.map +1 -1
  99. package/dist/modules/devices/backbone/DeviceClient.js.map +1 -1
  100. package/dist/modules/devices/local/Device.d.ts +1 -1
  101. package/dist/modules/devices/local/Device.js +4 -5
  102. package/dist/modules/devices/local/Device.js.map +1 -1
  103. package/dist/modules/devices/local/DeviceSecretCredentials.d.ts +3 -3
  104. package/dist/modules/devices/local/DeviceSecretCredentials.js +4 -5
  105. package/dist/modules/devices/local/DeviceSecretCredentials.js.map +1 -1
  106. package/dist/modules/devices/local/SendDeviceParameters.d.ts +4 -5
  107. package/dist/modules/devices/local/SendDeviceParameters.js +4 -8
  108. package/dist/modules/devices/local/SendDeviceParameters.js.map +1 -1
  109. package/dist/modules/devices/transmission/DeviceSharedSecret.d.ts +3 -4
  110. package/dist/modules/devices/transmission/DeviceSharedSecret.js +4 -8
  111. package/dist/modules/devices/transmission/DeviceSharedSecret.js.map +1 -1
  112. package/dist/modules/files/FileController.d.ts +2 -2
  113. package/dist/modules/files/FileController.js +14 -14
  114. package/dist/modules/files/FileController.js.map +1 -1
  115. package/dist/modules/files/local/CachedFile.d.ts +5 -5
  116. package/dist/modules/files/local/CachedFile.js +6 -6
  117. package/dist/modules/files/local/CachedFile.js.map +1 -1
  118. package/dist/modules/files/local/File.d.ts +2 -3
  119. package/dist/modules/files/local/File.js +10 -11
  120. package/dist/modules/files/local/File.js.map +1 -1
  121. package/dist/modules/files/local/SendFileParameters.d.ts +4 -5
  122. package/dist/modules/files/local/SendFileParameters.js +4 -8
  123. package/dist/modules/files/local/SendFileParameters.js.map +1 -1
  124. package/dist/modules/files/transmission/FileMetadata.d.ts +4 -5
  125. package/dist/modules/files/transmission/FileMetadata.js +4 -8
  126. package/dist/modules/files/transmission/FileMetadata.js.map +1 -1
  127. package/dist/modules/files/transmission/FileReference.d.ts +5 -7
  128. package/dist/modules/files/transmission/FileReference.js +6 -9
  129. package/dist/modules/files/transmission/FileReference.js.map +1 -1
  130. package/dist/modules/messages/MessageController.d.ts +2 -2
  131. package/dist/modules/messages/MessageController.js +28 -28
  132. package/dist/modules/messages/MessageController.js.map +1 -1
  133. package/dist/modules/messages/local/CachedMessage.d.ts +7 -7
  134. package/dist/modules/messages/local/CachedMessage.js +5 -6
  135. package/dist/modules/messages/local/CachedMessage.js.map +1 -1
  136. package/dist/modules/messages/local/Message.d.ts +1 -1
  137. package/dist/modules/messages/local/Message.js +4 -5
  138. package/dist/modules/messages/local/Message.js.map +1 -1
  139. package/dist/modules/messages/local/SendMessageParameters.d.ts +7 -8
  140. package/dist/modules/messages/local/SendMessageParameters.js +5 -9
  141. package/dist/modules/messages/local/SendMessageParameters.js.map +1 -1
  142. package/dist/modules/messages/transmission/MessageEnvelope.d.ts +5 -5
  143. package/dist/modules/messages/transmission/MessageEnvelope.js +6 -7
  144. package/dist/modules/messages/transmission/MessageEnvelope.js.map +1 -1
  145. package/dist/modules/messages/transmission/MessageEnvelopeRecipient.d.ts +4 -4
  146. package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js +4 -5
  147. package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js.map +1 -1
  148. package/dist/modules/messages/transmission/MessagePlain.d.ts +8 -8
  149. package/dist/modules/messages/transmission/MessagePlain.js +7 -8
  150. package/dist/modules/messages/transmission/MessagePlain.js.map +1 -1
  151. package/dist/modules/messages/transmission/MessageSignature.d.ts +4 -4
  152. package/dist/modules/messages/transmission/MessageSignature.js +4 -5
  153. package/dist/modules/messages/transmission/MessageSignature.js.map +1 -1
  154. package/dist/modules/messages/transmission/MessageSigned.d.ts +4 -5
  155. package/dist/modules/messages/transmission/MessageSigned.js +4 -9
  156. package/dist/modules/messages/transmission/MessageSigned.js.map +1 -1
  157. package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts +2 -2
  158. package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +14 -14
  159. package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -1
  160. package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts +7 -8
  161. package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js +4 -7
  162. package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js.map +1 -1
  163. package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts +1 -2
  164. package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js +4 -8
  165. package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js.map +1 -1
  166. package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.d.ts +7 -8
  167. package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js +5 -9
  168. package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js.map +1 -1
  169. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.d.ts +7 -8
  170. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js +5 -9
  171. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js.map +1 -1
  172. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.d.ts +4 -5
  173. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js +15 -24
  174. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js.map +1 -1
  175. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.d.ts +4 -5
  176. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js +4 -8
  177. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js.map +1 -1
  178. package/dist/modules/relationships/RelationshipSecretController.d.ts +6 -6
  179. package/dist/modules/relationships/RelationshipSecretController.js +7 -3
  180. package/dist/modules/relationships/RelationshipSecretController.js.map +1 -1
  181. package/dist/modules/relationships/RelationshipsController.d.ts +2 -2
  182. package/dist/modules/relationships/RelationshipsController.js +32 -32
  183. package/dist/modules/relationships/RelationshipsController.js.map +1 -1
  184. package/dist/modules/relationships/local/CachedRelationship.d.ts +4 -5
  185. package/dist/modules/relationships/local/CachedRelationship.js +4 -8
  186. package/dist/modules/relationships/local/CachedRelationship.js.map +1 -1
  187. package/dist/modules/relationships/local/Relationship.d.ts +3 -4
  188. package/dist/modules/relationships/local/Relationship.js +8 -11
  189. package/dist/modules/relationships/local/Relationship.js.map +1 -1
  190. package/dist/modules/relationships/local/SendRelationshipParameters.d.ts +7 -8
  191. package/dist/modules/relationships/local/SendRelationshipParameters.js +5 -9
  192. package/dist/modules/relationships/local/SendRelationshipParameters.js.map +1 -1
  193. package/dist/modules/relationships/transmission/changes/RelationshipChange.d.ts +5 -6
  194. package/dist/modules/relationships/transmission/changes/RelationshipChange.js +8 -12
  195. package/dist/modules/relationships/transmission/changes/RelationshipChange.js.map +1 -1
  196. package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.d.ts +6 -7
  197. package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.js +7 -11
  198. package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.js.map +1 -1
  199. package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.d.ts +8 -9
  200. package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.js +7 -11
  201. package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.js.map +1 -1
  202. package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.d.ts +5 -6
  203. package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.js +6 -10
  204. package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.js.map +1 -1
  205. package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.d.ts +7 -8
  206. package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js +5 -9
  207. package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js.map +1 -1
  208. package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.d.ts +4 -5
  209. package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.js +4 -8
  210. package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.js.map +1 -1
  211. package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.d.ts +5 -6
  212. package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.js +6 -10
  213. package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.js.map +1 -1
  214. package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.d.ts +7 -8
  215. package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js +5 -9
  216. package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js.map +1 -1
  217. package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.d.ts +4 -5
  218. package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.js +4 -8
  219. package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.js.map +1 -1
  220. package/dist/modules/secrets/SecretController.js +7 -7
  221. package/dist/modules/secrets/SecretController.js.map +1 -1
  222. package/dist/modules/secrets/data/SecretContainerCipher.d.ts +1 -1
  223. package/dist/modules/secrets/data/SecretContainerCipher.js +4 -5
  224. package/dist/modules/secrets/data/SecretContainerCipher.js.map +1 -1
  225. package/dist/modules/secrets/data/SecretContainerPlain.d.ts +7 -7
  226. package/dist/modules/secrets/data/SecretContainerPlain.js +5 -6
  227. package/dist/modules/secrets/data/SecretContainerPlain.js.map +1 -1
  228. package/dist/modules/sync/DatawalletModificationsProcessor.js +4 -4
  229. package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -1
  230. package/dist/modules/sync/SyncController.js.map +1 -1
  231. package/dist/modules/sync/SynchronizedCollection.js +2 -2
  232. package/dist/modules/sync/SynchronizedCollection.js.map +1 -1
  233. package/dist/modules/sync/local/DatawalletModification.d.ts +0 -1
  234. package/dist/modules/sync/local/DatawalletModification.js +3 -7
  235. package/dist/modules/sync/local/DatawalletModification.js.map +1 -1
  236. package/dist/modules/tokens/AnonymousTokenController.js +6 -6
  237. package/dist/modules/tokens/AnonymousTokenController.js.map +1 -1
  238. package/dist/modules/tokens/TokenController.d.ts +2 -2
  239. package/dist/modules/tokens/TokenController.js +14 -14
  240. package/dist/modules/tokens/TokenController.js.map +1 -1
  241. package/dist/modules/tokens/local/CachedToken.d.ts +7 -8
  242. package/dist/modules/tokens/local/CachedToken.js +5 -9
  243. package/dist/modules/tokens/local/CachedToken.js.map +1 -1
  244. package/dist/modules/tokens/local/SendTokenParameters.d.ts +7 -8
  245. package/dist/modules/tokens/local/SendTokenParameters.js +5 -9
  246. package/dist/modules/tokens/local/SendTokenParameters.js.map +1 -1
  247. package/dist/modules/tokens/local/Token.d.ts +3 -4
  248. package/dist/modules/tokens/local/Token.js +12 -13
  249. package/dist/modules/tokens/local/Token.js.map +1 -1
  250. package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.d.ts +4 -5
  251. package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js +4 -8
  252. package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js.map +1 -1
  253. package/dist/modules/tokens/transmission/TokenContentFile.d.ts +4 -5
  254. package/dist/modules/tokens/transmission/TokenContentFile.js +4 -8
  255. package/dist/modules/tokens/transmission/TokenContentFile.js.map +1 -1
  256. package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.d.ts +4 -5
  257. package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js +4 -8
  258. package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js.map +1 -1
  259. package/dist/modules/tokens/transmission/TokenReference.d.ts +5 -6
  260. package/dist/modules/tokens/transmission/TokenReference.js +6 -14
  261. package/dist/modules/tokens/transmission/TokenReference.js.map +1 -1
  262. package/lib-web/nmshd.transport.js +944 -979
  263. package/lib-web/nmshd.transport.js.map +1 -1
  264. package/lib-web/nmshd.transport.min.js +1 -1
  265. package/lib-web/nmshd.transport.min.js.map +1 -1
  266. package/package.json +7 -5
@@ -1 +1 @@
1
- {"version":3,"file":"TokenContentFile.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAiE;AACjE,wCAA8F;AAQ9F,IAAa,gBAAgB,wBAA7B,MAAa,gBAAiB,SAAQ,4BAAqB;IAShD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAwB;QAC7C,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,kBAAgB,CAAC,CAAA;IACrD,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,KAAa;QACzC,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,kBAAgB,CAAC,CAAA;IAC5D,CAAC;CACJ,CAAA;AAbG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACG,aAAM;gDAAA;AAIrB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,wBAAe;mDAAA;AAPxB,gBAAgB;IAD5B,IAAA,gBAAI,EAAC,kBAAkB,CAAC;GACZ,gBAAgB,CAgB5B;AAhBY,4CAAgB"}
1
+ {"version":3,"file":"TokenContentFile.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentFile.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAiE;AACjE,wCAAoF;AAQpF,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,uBAAgB;IAS3C,MAAM,CAAC,IAAI,CAAC,KAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AATG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACG,aAAM;gDAAA;AAIrB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,wBAAe;mDAAA;AAPxB,gBAAgB;IAD5B,IAAA,gBAAI,EAAC,kBAAkB,CAAC;GACZ,gBAAgB,CAY5B;AAZY,4CAAgB"}
@@ -1,12 +1,11 @@
1
1
  import { CryptoSecretKey, ICryptoSecretKey } from "@nmshd/crypto";
2
- import { CoreId, CoreSerializableAsync, ICoreId, ICoreSerializableAsync } from "../../../core";
3
- export interface ITokenContentRelationshipTemplate extends ICoreSerializableAsync {
2
+ import { CoreId, CoreSerializable, ICoreId, ICoreSerializable } from "../../../core";
3
+ export interface ITokenContentRelationshipTemplate extends ICoreSerializable {
4
4
  templateId: ICoreId;
5
5
  secretKey: ICryptoSecretKey;
6
6
  }
7
- export declare class TokenContentRelationshipTemplate extends CoreSerializableAsync implements ITokenContentRelationshipTemplate {
7
+ export declare class TokenContentRelationshipTemplate extends CoreSerializable implements ITokenContentRelationshipTemplate {
8
8
  templateId: CoreId;
9
9
  secretKey: CryptoSecretKey;
10
- static from(value: ITokenContentRelationshipTemplate): Promise<TokenContentRelationshipTemplate>;
11
- static deserialize(value: string): Promise<TokenContentRelationshipTemplate>;
10
+ static from(value: ITokenContentRelationshipTemplate): TokenContentRelationshipTemplate;
12
11
  }
@@ -8,18 +8,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var TokenContentRelationshipTemplate_1;
12
11
  Object.defineProperty(exports, "__esModule", { value: true });
13
12
  exports.TokenContentRelationshipTemplate = void 0;
14
13
  const ts_serval_1 = require("@js-soft/ts-serval");
15
14
  const crypto_1 = require("@nmshd/crypto");
16
15
  const core_1 = require("../../../core");
17
- let TokenContentRelationshipTemplate = TokenContentRelationshipTemplate_1 = class TokenContentRelationshipTemplate extends core_1.CoreSerializableAsync {
18
- static async from(value) {
19
- return await super.fromT(value, TokenContentRelationshipTemplate_1);
20
- }
21
- static async deserialize(value) {
22
- return await super.deserializeT(value, TokenContentRelationshipTemplate_1);
16
+ let TokenContentRelationshipTemplate = class TokenContentRelationshipTemplate extends core_1.CoreSerializable {
17
+ static from(value) {
18
+ return this.fromAny(value);
23
19
  }
24
20
  };
25
21
  __decorate([
@@ -32,7 +28,7 @@ __decorate([
32
28
  (0, ts_serval_1.serialize)(),
33
29
  __metadata("design:type", crypto_1.CryptoSecretKey)
34
30
  ], TokenContentRelationshipTemplate.prototype, "secretKey", void 0);
35
- TokenContentRelationshipTemplate = TokenContentRelationshipTemplate_1 = __decorate([
31
+ TokenContentRelationshipTemplate = __decorate([
36
32
  (0, ts_serval_1.type)("TokenContentRelationshipTemplate")
37
33
  ], TokenContentRelationshipTemplate);
38
34
  exports.TokenContentRelationshipTemplate = TokenContentRelationshipTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"TokenContentRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentRelationshipTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAiE;AACjE,wCAA8F;AAQ9F,IAAa,gCAAgC,wCAA7C,MAAa,gCACT,SAAQ,4BAAqB;IAWtB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAwC;QAC7D,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,kCAAgC,CAAC,CAAA;IACrE,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,KAAa;QACzC,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,kCAAgC,CAAC,CAAA;IAC5E,CAAC;CACJ,CAAA;AAbG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACO,aAAM;oEAAA;AAIzB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,wBAAe;mEAAA;AAVxB,gCAAgC;IAD5C,IAAA,gBAAI,EAAC,kCAAkC,CAAC;GAC5B,gCAAgC,CAmB5C;AAnBY,4EAAgC"}
1
+ {"version":3,"file":"TokenContentRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentRelationshipTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAAiE;AACjE,wCAAoF;AAQpF,IAAa,gCAAgC,GAA7C,MAAa,gCAAiC,SAAQ,uBAAgB;IAS3D,MAAM,CAAC,IAAI,CAAC,KAAwC;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AATG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACO,aAAM;oEAAA;AAIzB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,wBAAe;mEAAA;AAPxB,gCAAgC;IAD5C,IAAA,gBAAI,EAAC,kCAAkC,CAAC;GAC5B,gCAAgC,CAY5C;AAZY,4EAAgC"}
@@ -1,14 +1,13 @@
1
1
  import { CryptoSecretKey, ICryptoSecretKey } from "@nmshd/crypto";
2
- import { CoreId, CoreSerializableAsync, ICoreId, ICoreSerializableAsync } from "../../../core";
3
- export interface ITokenReference extends ICoreSerializableAsync {
2
+ import { CoreId, CoreSerializable, ICoreId, ICoreSerializable } from "../../../core";
3
+ export interface ITokenReference extends ICoreSerializable {
4
4
  id: ICoreId;
5
5
  key: ICryptoSecretKey;
6
6
  }
7
- export declare class TokenReference extends CoreSerializableAsync implements ITokenReference {
7
+ export declare class TokenReference extends CoreSerializable implements ITokenReference {
8
8
  id: CoreId;
9
9
  key: CryptoSecretKey;
10
10
  truncate(): string;
11
- static fromTruncated(value: string): Promise<TokenReference>;
12
- static from(value: ITokenReference | string): Promise<TokenReference>;
13
- static deserialize(value: string): Promise<TokenReference>;
11
+ static fromTruncated(value: string): TokenReference;
12
+ static from(value: ITokenReference | string): TokenReference;
14
13
  }
@@ -14,12 +14,12 @@ exports.TokenReference = void 0;
14
14
  const ts_serval_1 = require("@js-soft/ts-serval");
15
15
  const crypto_1 = require("@nmshd/crypto");
16
16
  const core_1 = require("../../../core");
17
- let TokenReference = TokenReference_1 = class TokenReference extends core_1.CoreSerializableAsync {
17
+ let TokenReference = TokenReference_1 = class TokenReference extends core_1.CoreSerializable {
18
18
  truncate() {
19
19
  const truncatedReference = crypto_1.CoreBuffer.fromUtf8(`${this.id.toString()}|${this.key.algorithm}|${this.key.secretKey.toBase64URL()}`);
20
20
  return truncatedReference.toBase64URL();
21
21
  }
22
- static async fromTruncated(value) {
22
+ static fromTruncated(value) {
23
23
  const truncatedBuffer = crypto_1.CoreBuffer.fromBase64URL(value);
24
24
  const splitted = truncatedBuffer.toUtf8().split("|");
25
25
  if (splitted.length !== 3) {
@@ -29,11 +29,11 @@ let TokenReference = TokenReference_1 = class TokenReference extends core_1.Core
29
29
  const id = core_1.CoreId.from(splitted[0]);
30
30
  const alg = parseInt(splitted[1]);
31
31
  const key = splitted[2];
32
- const secretKey = await crypto_1.CryptoSecretKey.from({
32
+ const secretKey = crypto_1.CryptoSecretKey.from({
33
33
  algorithm: alg,
34
34
  secretKey: crypto_1.CoreBuffer.fromBase64URL(key)
35
35
  });
36
- return await TokenReference_1.from({
36
+ return TokenReference_1.from({
37
37
  id: id,
38
38
  key: secretKey
39
39
  });
@@ -42,16 +42,8 @@ let TokenReference = TokenReference_1 = class TokenReference extends core_1.Core
42
42
  throw core_1.TransportErrors.tokens.invalidTruncatedReference();
43
43
  }
44
44
  }
45
- static async from(value) {
46
- return await super.fromT(value, TokenReference_1);
47
- }
48
- static async deserialize(value) {
49
- try {
50
- return await super.deserializeT(value, TokenReference_1);
51
- }
52
- catch (e) {
53
- return await this.from(value);
54
- }
45
+ static from(value) {
46
+ return this.fromAny(value);
55
47
  }
56
48
  };
57
49
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"TokenReference.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenReference.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAA6E;AAC7E,wCAA+G;AAQ/G,IAAa,cAAc,sBAA3B,MAAa,cAAe,SAAQ,4BAAqB;IAS9C,QAAQ;QACX,MAAM,kBAAkB,GAAG,mBAAU,CAAC,QAAQ,CAC1C,GAAG,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,CACpF,CAAA;QACD,OAAO,kBAAkB,CAAC,WAAW,EAAE,CAAA;IAC3C,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,KAAa;QAC3C,MAAM,eAAe,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACvD,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAEpD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YACvB,MAAM,sBAAe,CAAC,MAAM,CAAC,yBAAyB,EAAE,CAAA;SAC3D;QACD,IAAI;YACA,MAAM,EAAE,GAAG,aAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YACnC,MAAM,GAAG,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YACjC,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;YACvB,MAAM,SAAS,GAAG,MAAM,wBAAe,CAAC,IAAI,CAAC;gBACzC,SAAS,EAAE,GAAG;gBACd,SAAS,EAAE,mBAAU,CAAC,aAAa,CAAC,GAAG,CAAC;aAC3C,CAAC,CAAA;YAEF,OAAO,MAAM,gBAAc,CAAC,IAAI,CAAC;gBAC7B,EAAE,EAAE,EAAE;gBACN,GAAG,EAAE,SAAS;aACjB,CAAC,CAAA;SACL;QAAC,OAAO,CAAC,EAAE;YACR,MAAM,sBAAe,CAAC,MAAM,CAAC,yBAAyB,EAAE,CAAA;SAC3D;IACL,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAA+B;QACpD,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,gBAAc,CAAC,CAAA;IACnD,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,KAAa;QACzC,IAAI;YACA,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,gBAAc,CAAC,CAAA;SACzD;QAAC,OAAO,CAAC,EAAE;YACR,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;SAChC;IACL,CAAC;CACJ,CAAA;AAjDG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACD,aAAM;0CAAA;AAIjB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACA,wBAAe;2CAAA;AAPlB,cAAc;IAD1B,IAAA,gBAAI,EAAC,gBAAgB,CAAC;GACV,cAAc,CAoD1B;AApDY,wCAAc"}
1
+ {"version":3,"file":"TokenReference.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenReference.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA8D;AAC9D,0CAA6E;AAC7E,wCAAqG;AAQrG,IAAa,cAAc,sBAA3B,MAAa,cAAe,SAAQ,uBAAgB;IASzC,QAAQ;QACX,MAAM,kBAAkB,GAAG,mBAAU,CAAC,QAAQ,CAC1C,GAAG,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,CACpF,CAAA;QACD,OAAO,kBAAkB,CAAC,WAAW,EAAE,CAAA;IAC3C,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,KAAa;QACrC,MAAM,eAAe,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACvD,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAEpD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YACvB,MAAM,sBAAe,CAAC,MAAM,CAAC,yBAAyB,EAAE,CAAA;SAC3D;QACD,IAAI;YACA,MAAM,EAAE,GAAG,aAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YACnC,MAAM,GAAG,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YACjC,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;YACvB,MAAM,SAAS,GAAG,wBAAe,CAAC,IAAI,CAAC;gBACnC,SAAS,EAAE,GAAG;gBACd,SAAS,EAAE,mBAAU,CAAC,aAAa,CAAC,GAAG,CAAC;aAC3C,CAAC,CAAA;YAEF,OAAO,gBAAc,CAAC,IAAI,CAAC;gBACvB,EAAE,EAAE,EAAE;gBACN,GAAG,EAAE,SAAS;aACjB,CAAC,CAAA;SACL;QAAC,OAAO,CAAC,EAAE;YACR,MAAM,sBAAe,CAAC,MAAM,CAAC,yBAAyB,EAAE,CAAA;SAC3D;IACL,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,KAA+B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAzCG;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACD,aAAM;0CAAA;AAIjB;IAFC,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACA,wBAAe;2CAAA;AAPlB,cAAc;IAD1B,IAAA,gBAAI,EAAC,gBAAgB,CAAC;GACV,cAAc,CA4C1B;AA5CY,wCAAc"}