@nmshd/transport 5.2.1 → 5.3.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 (433) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -2
  3. package/dist/buildInformation.js +5 -5
  4. package/dist/core/CoreCrypto.js +2 -2
  5. package/dist/core/CoreCrypto.js.map +1 -1
  6. package/dist/core/CoreIdHelper.d.ts +2 -1
  7. package/dist/core/CoreIdHelper.d.ts.map +1 -1
  8. package/dist/core/CoreIdHelper.js +11 -6
  9. package/dist/core/CoreIdHelper.js.map +1 -1
  10. package/dist/core/CoreSynchronizable.d.ts +4 -4
  11. package/dist/core/CoreSynchronizable.d.ts.map +1 -1
  12. package/dist/core/CoreSynchronizable.js +3 -4
  13. package/dist/core/CoreSynchronizable.js.map +1 -1
  14. package/dist/core/Reference.d.ts +1 -1
  15. package/dist/core/Reference.d.ts.map +1 -1
  16. package/dist/core/Reference.js +7 -7
  17. package/dist/core/Reference.js.map +1 -1
  18. package/dist/core/Transport.js +4 -4
  19. package/dist/core/Transport.js.map +1 -1
  20. package/dist/core/TransportController.d.ts +2 -2
  21. package/dist/core/TransportController.d.ts.map +1 -1
  22. package/dist/core/TransportController.js.map +1 -1
  23. package/dist/core/{CoreErrors.d.ts → TransportCoreErrors.d.ts} +3 -3
  24. package/dist/core/TransportCoreErrors.d.ts.map +1 -0
  25. package/dist/core/TransportCoreErrors.js +147 -0
  26. package/dist/core/TransportCoreErrors.js.map +1 -0
  27. package/dist/core/backbone/AuthClient.d.ts +1 -1
  28. package/dist/core/backbone/AuthClient.d.ts.map +1 -1
  29. package/dist/core/backbone/AuthClient.js +2 -2
  30. package/dist/core/backbone/AuthClient.js.map +1 -1
  31. package/dist/core/backbone/Authenticator.d.ts.map +1 -1
  32. package/dist/core/backbone/ClientResult.d.ts +1 -1
  33. package/dist/core/backbone/ClientResult.d.ts.map +1 -1
  34. package/dist/core/backbone/ClientResult.js +3 -3
  35. package/dist/core/backbone/ClientResult.js.map +1 -1
  36. package/dist/core/backbone/RESTClient.js +2 -2
  37. package/dist/core/backbone/RESTClient.js.map +1 -1
  38. package/dist/core/backbone/RequestError.d.ts.map +1 -1
  39. package/dist/core/backbone/RequestError.js +2 -2
  40. package/dist/core/backbone/RequestError.js.map +1 -1
  41. package/dist/core/index.d.ts +1 -4
  42. package/dist/core/index.d.ts.map +1 -1
  43. package/dist/core/index.js +1 -4
  44. package/dist/core/index.js.map +1 -1
  45. package/dist/core/types/CoreHash.d.ts +5 -3
  46. package/dist/core/types/CoreHash.d.ts.map +1 -1
  47. package/dist/core/types/CoreHash.js +9 -2
  48. package/dist/core/types/CoreHash.js.map +1 -1
  49. package/dist/core/types/index.d.ts +0 -3
  50. package/dist/core/types/index.d.ts.map +1 -1
  51. package/dist/core/types/index.js +0 -3
  52. package/dist/core/types/index.js.map +1 -1
  53. package/dist/events/PeerDeletedEvent.d.ts +7 -0
  54. package/dist/events/PeerDeletedEvent.d.ts.map +1 -0
  55. package/dist/events/PeerDeletedEvent.js +12 -0
  56. package/dist/events/PeerDeletedEvent.js.map +1 -0
  57. package/dist/events/PeerDeletionCancelledEvent.d.ts +7 -0
  58. package/dist/events/PeerDeletionCancelledEvent.d.ts.map +1 -0
  59. package/dist/events/PeerDeletionCancelledEvent.js +12 -0
  60. package/dist/events/PeerDeletionCancelledEvent.js.map +1 -0
  61. package/dist/events/PeerToBeDeletedEvent.d.ts +7 -0
  62. package/dist/events/PeerToBeDeletedEvent.d.ts.map +1 -0
  63. package/dist/events/PeerToBeDeletedEvent.js +12 -0
  64. package/dist/events/PeerToBeDeletedEvent.js.map +1 -0
  65. package/dist/events/RelationshipDecomposedBySelfEvent.d.ts +1 -1
  66. package/dist/events/RelationshipDecomposedBySelfEvent.d.ts.map +1 -1
  67. package/dist/events/index.d.ts +3 -0
  68. package/dist/events/index.d.ts.map +1 -1
  69. package/dist/events/index.js +3 -0
  70. package/dist/events/index.js.map +1 -1
  71. package/dist/modules/accounts/AccountController.d.ts +2 -1
  72. package/dist/modules/accounts/AccountController.d.ts.map +1 -1
  73. package/dist/modules/accounts/AccountController.js +8 -7
  74. package/dist/modules/accounts/AccountController.js.map +1 -1
  75. package/dist/modules/accounts/IdentityController.d.ts +2 -1
  76. package/dist/modules/accounts/IdentityController.d.ts.map +1 -1
  77. package/dist/modules/accounts/IdentityController.js +1 -1
  78. package/dist/modules/accounts/IdentityController.js.map +1 -1
  79. package/dist/modules/accounts/IdentityDeletionProcessController.d.ts +2 -1
  80. package/dist/modules/accounts/IdentityDeletionProcessController.d.ts.map +1 -1
  81. package/dist/modules/accounts/IdentityDeletionProcessController.js +2 -1
  82. package/dist/modules/accounts/IdentityDeletionProcessController.js.map +1 -1
  83. package/dist/modules/accounts/IdentityUtil.d.ts +1 -1
  84. package/dist/modules/accounts/IdentityUtil.d.ts.map +1 -1
  85. package/dist/modules/accounts/IdentityUtil.js +2 -2
  86. package/dist/modules/accounts/IdentityUtil.js.map +1 -1
  87. package/dist/modules/accounts/data/CachedIdentityDeletionProcess.d.ts +3 -2
  88. package/dist/modules/accounts/data/CachedIdentityDeletionProcess.d.ts.map +1 -1
  89. package/dist/modules/accounts/data/CachedIdentityDeletionProcess.js +12 -12
  90. package/dist/modules/accounts/data/CachedIdentityDeletionProcess.js.map +1 -1
  91. package/dist/modules/accounts/data/Identity.d.ts +4 -3
  92. package/dist/modules/accounts/data/Identity.d.ts.map +1 -1
  93. package/dist/modules/accounts/data/Identity.js +3 -3
  94. package/dist/modules/accounts/data/Identity.js.map +1 -1
  95. package/dist/modules/accounts/data/IdentityDeletionProcess.d.ts +2 -1
  96. package/dist/modules/accounts/data/IdentityDeletionProcess.d.ts.map +1 -1
  97. package/dist/modules/accounts/data/IdentityDeletionProcess.js +3 -2
  98. package/dist/modules/accounts/data/IdentityDeletionProcess.js.map +1 -1
  99. package/dist/modules/accounts/data/IdentitySecretCredentials.d.ts +3 -3
  100. package/dist/modules/accounts/data/IdentitySecretCredentials.d.ts.map +1 -1
  101. package/dist/modules/accounts/data/IdentitySecretCredentials.js +1 -2
  102. package/dist/modules/accounts/data/IdentitySecretCredentials.js.map +1 -1
  103. package/dist/modules/certificates/CertificateIssuer.d.ts +2 -1
  104. package/dist/modules/certificates/CertificateIssuer.d.ts.map +1 -1
  105. package/dist/modules/certificates/CertificateIssuer.js +2 -1
  106. package/dist/modules/certificates/CertificateIssuer.js.map +1 -1
  107. package/dist/modules/certificates/data/Certificate.d.ts +3 -3
  108. package/dist/modules/certificates/data/Certificate.d.ts.map +1 -1
  109. package/dist/modules/certificates/data/Certificate.js +1 -1
  110. package/dist/modules/certificates/data/Certificate.js.map +1 -1
  111. package/dist/modules/certificates/data/CertificateConstraint.d.ts +3 -3
  112. package/dist/modules/certificates/data/CertificateConstraint.d.ts.map +1 -1
  113. package/dist/modules/certificates/data/CertificateConstraint.js +1 -2
  114. package/dist/modules/certificates/data/CertificateConstraint.js.map +1 -1
  115. package/dist/modules/certificates/data/CertificateContent.d.ts +6 -5
  116. package/dist/modules/certificates/data/CertificateContent.d.ts.map +1 -1
  117. package/dist/modules/certificates/data/CertificateContent.js +6 -6
  118. package/dist/modules/certificates/data/CertificateContent.js.map +1 -1
  119. package/dist/modules/certificates/data/CertificateItem.d.ts +3 -3
  120. package/dist/modules/certificates/data/CertificateItem.d.ts.map +1 -1
  121. package/dist/modules/certificates/data/CertificateItem.js +1 -2
  122. package/dist/modules/certificates/data/CertificateItem.js.map +1 -1
  123. package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts +1 -1
  124. package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts.map +1 -1
  125. package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js +2 -2
  126. package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js.map +1 -1
  127. package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts +1 -1
  128. package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts.map +1 -1
  129. package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js +3 -3
  130. package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js.map +1 -1
  131. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts +2 -1
  132. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts.map +1 -1
  133. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js +2 -2
  134. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js.map +1 -1
  135. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts +1 -1
  136. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts.map +1 -1
  137. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js +2 -2
  138. package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js.map +1 -1
  139. package/dist/modules/challenges/ChallengeController.d.ts.map +1 -1
  140. package/dist/modules/challenges/ChallengeController.js +10 -9
  141. package/dist/modules/challenges/ChallengeController.js.map +1 -1
  142. package/dist/modules/challenges/data/Challenge.d.ts +4 -3
  143. package/dist/modules/challenges/data/Challenge.d.ts.map +1 -1
  144. package/dist/modules/challenges/data/Challenge.js +6 -6
  145. package/dist/modules/challenges/data/Challenge.js.map +1 -1
  146. package/dist/modules/challenges/data/ChallengeSigned.d.ts +3 -4
  147. package/dist/modules/challenges/data/ChallengeSigned.d.ts.map +1 -1
  148. package/dist/modules/challenges/data/ChallengeSigned.js +1 -2
  149. package/dist/modules/challenges/data/ChallengeSigned.js.map +1 -1
  150. package/dist/modules/devices/DeviceController.d.ts +2 -1
  151. package/dist/modules/devices/DeviceController.d.ts.map +1 -1
  152. package/dist/modules/devices/DeviceController.js +4 -4
  153. package/dist/modules/devices/DeviceController.js.map +1 -1
  154. package/dist/modules/devices/DeviceSecretController.d.ts.map +1 -1
  155. package/dist/modules/devices/DeviceSecretController.js +10 -9
  156. package/dist/modules/devices/DeviceSecretController.js.map +1 -1
  157. package/dist/modules/devices/DevicesController.d.ts +1 -1
  158. package/dist/modules/devices/DevicesController.d.ts.map +1 -1
  159. package/dist/modules/devices/DevicesController.js +9 -8
  160. package/dist/modules/devices/DevicesController.js.map +1 -1
  161. package/dist/modules/devices/local/Device.d.ts +1 -2
  162. package/dist/modules/devices/local/Device.d.ts.map +1 -1
  163. package/dist/modules/devices/local/Device.js +4 -5
  164. package/dist/modules/devices/local/Device.js.map +1 -1
  165. package/dist/modules/devices/local/DeviceSecretCredentials.d.ts +4 -3
  166. package/dist/modules/devices/local/DeviceSecretCredentials.d.ts.map +1 -1
  167. package/dist/modules/devices/local/DeviceSecretCredentials.js +3 -3
  168. package/dist/modules/devices/local/DeviceSecretCredentials.js.map +1 -1
  169. package/dist/modules/devices/local/SendDeviceParameters.d.ts +3 -3
  170. package/dist/modules/devices/local/SendDeviceParameters.d.ts.map +1 -1
  171. package/dist/modules/devices/local/SendDeviceParameters.js +1 -2
  172. package/dist/modules/devices/local/SendDeviceParameters.js.map +1 -1
  173. package/dist/modules/devices/transmission/DeviceSharedSecret.d.ts +4 -3
  174. package/dist/modules/devices/transmission/DeviceSharedSecret.d.ts.map +1 -1
  175. package/dist/modules/devices/transmission/DeviceSharedSecret.js +5 -5
  176. package/dist/modules/devices/transmission/DeviceSharedSecret.js.map +1 -1
  177. package/dist/modules/files/FileController.d.ts +1 -1
  178. package/dist/modules/files/FileController.d.ts.map +1 -1
  179. package/dist/modules/files/FileController.js +16 -15
  180. package/dist/modules/files/FileController.js.map +1 -1
  181. package/dist/modules/files/local/CachedFile.d.ts +6 -4
  182. package/dist/modules/files/local/CachedFile.d.ts.map +1 -1
  183. package/dist/modules/files/local/CachedFile.js +19 -18
  184. package/dist/modules/files/local/CachedFile.js.map +1 -1
  185. package/dist/modules/files/local/File.d.ts +2 -1
  186. package/dist/modules/files/local/File.d.ts.map +1 -1
  187. package/dist/modules/files/local/File.js +5 -4
  188. package/dist/modules/files/local/File.js.map +1 -1
  189. package/dist/modules/files/local/SendFileParameters.d.ts +4 -4
  190. package/dist/modules/files/local/SendFileParameters.d.ts.map +1 -1
  191. package/dist/modules/files/local/SendFileParameters.js +4 -5
  192. package/dist/modules/files/local/SendFileParameters.js.map +1 -1
  193. package/dist/modules/files/transmission/FileMetadata.d.ts +5 -3
  194. package/dist/modules/files/transmission/FileMetadata.d.ts.map +1 -1
  195. package/dist/modules/files/transmission/FileMetadata.js +3 -2
  196. package/dist/modules/files/transmission/FileMetadata.js.map +1 -1
  197. package/dist/modules/index.d.ts +1 -0
  198. package/dist/modules/index.d.ts.map +1 -1
  199. package/dist/modules/index.js +1 -0
  200. package/dist/modules/index.js.map +1 -1
  201. package/dist/modules/messages/MessageController.d.ts +1 -1
  202. package/dist/modules/messages/MessageController.d.ts.map +1 -1
  203. package/dist/modules/messages/MessageController.js +31 -30
  204. package/dist/modules/messages/MessageController.js.map +1 -1
  205. package/dist/modules/messages/local/CachedMessage.d.ts +3 -4
  206. package/dist/modules/messages/local/CachedMessage.d.ts.map +1 -1
  207. package/dist/modules/messages/local/CachedMessage.js +6 -7
  208. package/dist/modules/messages/local/CachedMessage.js.map +1 -1
  209. package/dist/modules/messages/local/CachedMessageRecipient.d.ts +4 -4
  210. package/dist/modules/messages/local/CachedMessageRecipient.d.ts.map +1 -1
  211. package/dist/modules/messages/local/CachedMessageRecipient.js +6 -7
  212. package/dist/modules/messages/local/CachedMessageRecipient.js.map +1 -1
  213. package/dist/modules/messages/local/Message.d.ts +2 -1
  214. package/dist/modules/messages/local/Message.d.ts.map +1 -1
  215. package/dist/modules/messages/local/Message.js +6 -5
  216. package/dist/modules/messages/local/Message.js.map +1 -1
  217. package/dist/modules/messages/local/SendMessageParameters.d.ts +3 -3
  218. package/dist/modules/messages/local/SendMessageParameters.d.ts.map +1 -1
  219. package/dist/modules/messages/local/SendMessageParameters.js +3 -3
  220. package/dist/modules/messages/local/SendMessageParameters.js.map +1 -1
  221. package/dist/modules/messages/transmission/MessageContentWrapper.d.ts +3 -5
  222. package/dist/modules/messages/transmission/MessageContentWrapper.d.ts.map +1 -1
  223. package/dist/modules/messages/transmission/MessageContentWrapper.js +4 -6
  224. package/dist/modules/messages/transmission/MessageContentWrapper.js.map +1 -1
  225. package/dist/modules/messages/transmission/MessageEnvelope.d.ts +4 -3
  226. package/dist/modules/messages/transmission/MessageEnvelope.d.ts.map +1 -1
  227. package/dist/modules/messages/transmission/MessageEnvelope.js +8 -8
  228. package/dist/modules/messages/transmission/MessageEnvelope.js.map +1 -1
  229. package/dist/modules/messages/transmission/MessageEnvelopeRecipient.d.ts +4 -4
  230. package/dist/modules/messages/transmission/MessageEnvelopeRecipient.d.ts.map +1 -1
  231. package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js +5 -6
  232. package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js.map +1 -1
  233. package/dist/modules/messages/transmission/MessageSignature.d.ts +4 -3
  234. package/dist/modules/messages/transmission/MessageSignature.d.ts.map +1 -1
  235. package/dist/modules/messages/transmission/MessageSignature.js +3 -3
  236. package/dist/modules/messages/transmission/MessageSignature.js.map +1 -1
  237. package/dist/modules/messages/transmission/MessageSigned.d.ts +3 -3
  238. package/dist/modules/messages/transmission/MessageSigned.d.ts.map +1 -1
  239. package/dist/modules/messages/transmission/MessageSigned.js +1 -2
  240. package/dist/modules/messages/transmission/MessageSigned.js.map +1 -1
  241. package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts +1 -1
  242. package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts.map +1 -1
  243. package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +13 -12
  244. package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -1
  245. package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts +3 -4
  246. package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts.map +1 -1
  247. package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js +6 -7
  248. package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js.map +1 -1
  249. package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts +1 -1
  250. package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts.map +1 -1
  251. package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js +5 -5
  252. package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js.map +1 -1
  253. package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.d.ts +4 -4
  254. package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.d.ts.map +1 -1
  255. package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js +3 -3
  256. package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js.map +1 -1
  257. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.d.ts +2 -3
  258. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.d.ts.map +1 -1
  259. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.js +1 -2
  260. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.js.map +1 -1
  261. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.d.ts +1 -1
  262. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.d.ts.map +1 -1
  263. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js +2 -2
  264. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js.map +1 -1
  265. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.d.ts +3 -3
  266. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.d.ts.map +1 -1
  267. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js +1 -2
  268. package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js.map +1 -1
  269. package/dist/modules/relationships/RelationshipSecretController.d.ts +1 -1
  270. package/dist/modules/relationships/RelationshipSecretController.d.ts.map +1 -1
  271. package/dist/modules/relationships/RelationshipSecretController.js +25 -24
  272. package/dist/modules/relationships/RelationshipSecretController.js.map +1 -1
  273. package/dist/modules/relationships/RelationshipsController.d.ts +4 -1
  274. package/dist/modules/relationships/RelationshipsController.d.ts.map +1 -1
  275. package/dist/modules/relationships/RelationshipsController.js +42 -32
  276. package/dist/modules/relationships/RelationshipsController.js.map +1 -1
  277. package/dist/modules/relationships/local/CachedRelationship.d.ts +3 -3
  278. package/dist/modules/relationships/local/CachedRelationship.d.ts.map +1 -1
  279. package/dist/modules/relationships/local/CachedRelationship.js +4 -4
  280. package/dist/modules/relationships/local/CachedRelationship.js.map +1 -1
  281. package/dist/modules/relationships/local/PeerDeletionInfo.d.ts +16 -0
  282. package/dist/modules/relationships/local/PeerDeletionInfo.d.ts.map +1 -0
  283. package/dist/{core/types/CoreAddress.js → modules/relationships/local/PeerDeletionInfo.js} +14 -32
  284. package/dist/modules/relationships/local/PeerDeletionInfo.js.map +1 -0
  285. package/dist/modules/relationships/local/Relationship.d.ts +5 -1
  286. package/dist/modules/relationships/local/Relationship.d.ts.map +1 -1
  287. package/dist/modules/relationships/local/Relationship.js +16 -8
  288. package/dist/modules/relationships/local/Relationship.js.map +1 -1
  289. package/dist/modules/relationships/local/RelationshipAuditLog.js +4 -4
  290. package/dist/modules/relationships/local/RelationshipAuditLog.js.map +1 -1
  291. package/dist/modules/relationships/local/RelationshipAuditLogEntry.d.ts +4 -3
  292. package/dist/modules/relationships/local/RelationshipAuditLogEntry.d.ts.map +1 -1
  293. package/dist/modules/relationships/local/RelationshipAuditLogEntry.js +5 -5
  294. package/dist/modules/relationships/local/RelationshipAuditLogEntry.js.map +1 -1
  295. package/dist/modules/relationships/local/SendRelationshipParameters.d.ts +2 -3
  296. package/dist/modules/relationships/local/SendRelationshipParameters.d.ts.map +1 -1
  297. package/dist/modules/relationships/local/SendRelationshipParameters.js +1 -2
  298. package/dist/modules/relationships/local/SendRelationshipParameters.js.map +1 -1
  299. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentCipher.d.ts +5 -3
  300. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentCipher.d.ts.map +1 -1
  301. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentCipher.js +10 -3
  302. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentCipher.js.map +1 -1
  303. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentSigned.d.ts +3 -3
  304. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentSigned.d.ts.map +1 -1
  305. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentSigned.js +1 -2
  306. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentSigned.js.map +1 -1
  307. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentWrapper.d.ts +3 -3
  308. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentWrapper.d.ts.map +1 -1
  309. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentWrapper.js +3 -3
  310. package/dist/modules/relationships/transmission/requests/RelationshipCreationContentWrapper.js.map +1 -1
  311. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentCipher.d.ts +4 -3
  312. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentCipher.d.ts.map +1 -1
  313. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentCipher.js +6 -3
  314. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentCipher.js.map +1 -1
  315. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentSigned.d.ts +3 -3
  316. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentSigned.d.ts.map +1 -1
  317. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentSigned.js +1 -2
  318. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentSigned.js.map +1 -1
  319. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentWrapper.d.ts +4 -3
  320. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentWrapper.d.ts.map +1 -1
  321. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentWrapper.js +3 -3
  322. package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentWrapper.js.map +1 -1
  323. package/dist/modules/secrets/SecretController.d.ts +1 -1
  324. package/dist/modules/secrets/SecretController.d.ts.map +1 -1
  325. package/dist/modules/secrets/SecretController.js +6 -5
  326. package/dist/modules/secrets/SecretController.js.map +1 -1
  327. package/dist/modules/secrets/data/SecretContainerCipher.d.ts +1 -1
  328. package/dist/modules/secrets/data/SecretContainerCipher.d.ts.map +1 -1
  329. package/dist/modules/secrets/data/SecretContainerCipher.js +4 -4
  330. package/dist/modules/secrets/data/SecretContainerCipher.js.map +1 -1
  331. package/dist/modules/secrets/data/SecretContainerPlain.d.ts +5 -5
  332. package/dist/modules/secrets/data/SecretContainerPlain.d.ts.map +1 -1
  333. package/dist/modules/secrets/data/SecretContainerPlain.js +6 -6
  334. package/dist/modules/secrets/data/SecretContainerPlain.js.map +1 -1
  335. package/dist/modules/sync/DatawalletModificationMapper.d.ts.map +1 -1
  336. package/dist/modules/sync/DatawalletModificationMapper.js +2 -1
  337. package/dist/modules/sync/DatawalletModificationMapper.js.map +1 -1
  338. package/dist/modules/sync/DatawalletModificationsProcessor.d.ts +1 -1
  339. package/dist/modules/sync/DatawalletModificationsProcessor.d.ts.map +1 -1
  340. package/dist/modules/sync/DatawalletModificationsProcessor.js +7 -5
  341. package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -1
  342. package/dist/modules/sync/SyncController.d.ts +2 -1
  343. package/dist/modules/sync/SyncController.d.ts.map +1 -1
  344. package/dist/modules/sync/SyncController.js +12 -21
  345. package/dist/modules/sync/SyncController.js.map +1 -1
  346. package/dist/modules/sync/SynchronizedCollection.js +2 -2
  347. package/dist/modules/sync/SynchronizedCollection.js.map +1 -1
  348. package/dist/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.d.ts.map +1 -1
  349. package/dist/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.js +6 -0
  350. package/dist/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.js.map +1 -1
  351. package/dist/modules/sync/externalEventProcessors/MessageReceivedExternalEventProcessor.js +2 -2
  352. package/dist/modules/sync/externalEventProcessors/MessageReceivedExternalEventProcessor.js.map +1 -1
  353. package/dist/modules/sync/externalEventProcessors/PeerDeletedExternalEventProcessor.d.ts +7 -0
  354. package/dist/modules/sync/externalEventProcessors/PeerDeletedExternalEventProcessor.d.ts.map +1 -0
  355. package/dist/modules/sync/externalEventProcessors/PeerDeletedExternalEventProcessor.js +35 -0
  356. package/dist/modules/sync/externalEventProcessors/PeerDeletedExternalEventProcessor.js.map +1 -0
  357. package/dist/modules/sync/externalEventProcessors/PeerDeletionCancelledExternalEventProcessor.d.ts +7 -0
  358. package/dist/modules/sync/externalEventProcessors/PeerDeletionCancelledExternalEventProcessor.d.ts.map +1 -0
  359. package/dist/modules/sync/externalEventProcessors/PeerDeletionCancelledExternalEventProcessor.js +33 -0
  360. package/dist/modules/sync/externalEventProcessors/PeerDeletionCancelledExternalEventProcessor.js.map +1 -0
  361. package/dist/modules/sync/externalEventProcessors/PeerToBeDeletedExternalEventProcessor.d.ts +7 -0
  362. package/dist/modules/sync/externalEventProcessors/PeerToBeDeletedExternalEventProcessor.d.ts.map +1 -0
  363. package/dist/modules/sync/externalEventProcessors/PeerToBeDeletedExternalEventProcessor.js +35 -0
  364. package/dist/modules/sync/externalEventProcessors/PeerToBeDeletedExternalEventProcessor.js.map +1 -0
  365. package/dist/modules/sync/local/DatawalletModification.d.ts +4 -3
  366. package/dist/modules/sync/local/DatawalletModification.d.ts.map +1 -1
  367. package/dist/modules/sync/local/DatawalletModification.js +4 -4
  368. package/dist/modules/sync/local/DatawalletModification.js.map +1 -1
  369. package/dist/modules/tokens/AnonymousTokenController.d.ts +2 -1
  370. package/dist/modules/tokens/AnonymousTokenController.d.ts.map +1 -1
  371. package/dist/modules/tokens/AnonymousTokenController.js +7 -6
  372. package/dist/modules/tokens/AnonymousTokenController.js.map +1 -1
  373. package/dist/modules/tokens/TokenController.d.ts +1 -1
  374. package/dist/modules/tokens/TokenController.d.ts.map +1 -1
  375. package/dist/modules/tokens/TokenController.js +14 -13
  376. package/dist/modules/tokens/TokenController.js.map +1 -1
  377. package/dist/modules/tokens/local/CachedToken.d.ts +3 -3
  378. package/dist/modules/tokens/local/CachedToken.d.ts.map +1 -1
  379. package/dist/modules/tokens/local/CachedToken.js +6 -6
  380. package/dist/modules/tokens/local/CachedToken.js.map +1 -1
  381. package/dist/modules/tokens/local/SendTokenParameters.d.ts +3 -3
  382. package/dist/modules/tokens/local/SendTokenParameters.d.ts.map +1 -1
  383. package/dist/modules/tokens/local/SendTokenParameters.js +3 -3
  384. package/dist/modules/tokens/local/SendTokenParameters.js.map +1 -1
  385. package/dist/modules/tokens/local/Token.d.ts +2 -1
  386. package/dist/modules/tokens/local/Token.d.ts.map +1 -1
  387. package/dist/modules/tokens/local/Token.js +5 -4
  388. package/dist/modules/tokens/local/Token.js.map +1 -1
  389. package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.d.ts +3 -3
  390. package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.d.ts.map +1 -1
  391. package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js +1 -2
  392. package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js.map +1 -1
  393. package/dist/modules/tokens/transmission/TokenContentFile.d.ts +4 -3
  394. package/dist/modules/tokens/transmission/TokenContentFile.d.ts.map +1 -1
  395. package/dist/modules/tokens/transmission/TokenContentFile.js +3 -3
  396. package/dist/modules/tokens/transmission/TokenContentFile.js.map +1 -1
  397. package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.d.ts +4 -3
  398. package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.d.ts.map +1 -1
  399. package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js +3 -3
  400. package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js.map +1 -1
  401. package/dist/util/PasswordGenerator.d.ts.map +1 -1
  402. package/dist/util/PasswordGenerator.js +1 -2
  403. package/dist/util/PasswordGenerator.js.map +1 -1
  404. package/dist/util/Random.d.ts.map +1 -1
  405. package/dist/util/Random.js +7 -8
  406. package/dist/util/Random.js.map +1 -1
  407. package/package.json +8 -8
  408. package/dist/core/CoreError.d.ts +0 -19
  409. package/dist/core/CoreError.d.ts.map +0 -1
  410. package/dist/core/CoreError.js +0 -63
  411. package/dist/core/CoreError.js.map +0 -1
  412. package/dist/core/CoreErrors.d.ts.map +0 -1
  413. package/dist/core/CoreErrors.js +0 -147
  414. package/dist/core/CoreErrors.js.map +0 -1
  415. package/dist/core/CoreSerializable.d.ts +0 -17
  416. package/dist/core/CoreSerializable.d.ts.map +0 -1
  417. package/dist/core/CoreSerializable.js +0 -37
  418. package/dist/core/CoreSerializable.js.map +0 -1
  419. package/dist/core/CoreSerializableAsync.d.ts +0 -17
  420. package/dist/core/CoreSerializableAsync.d.ts.map +0 -1
  421. package/dist/core/CoreSerializableAsync.js +0 -38
  422. package/dist/core/CoreSerializableAsync.js.map +0 -1
  423. package/dist/core/types/CoreAddress.d.ts +0 -16
  424. package/dist/core/types/CoreAddress.d.ts.map +0 -1
  425. package/dist/core/types/CoreAddress.js.map +0 -1
  426. package/dist/core/types/CoreDate.d.ts +0 -40
  427. package/dist/core/types/CoreDate.d.ts.map +0 -1
  428. package/dist/core/types/CoreDate.js +0 -152
  429. package/dist/core/types/CoreDate.js.map +0 -1
  430. package/dist/core/types/CoreId.d.ts +0 -17
  431. package/dist/core/types/CoreId.d.ts.map +0 -1
  432. package/dist/core/types/CoreId.js +0 -57
  433. package/dist/core/types/CoreId.js.map +0 -1
@@ -1,147 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CoreErrors = void 0;
7
- const json_stringify_safe_1 = __importDefault(require("json-stringify-safe"));
8
- const CoreError_1 = require("./CoreError");
9
- class Relationships {
10
- operationOnlyAllowedForPeer(message) {
11
- return new CoreError_1.CoreError("error.transport.relationships.operationOnlyAllowedForPeer", message);
12
- }
13
- wrongRelationshipStatus(relationshipId, status) {
14
- return new CoreError_1.CoreError("error.transport.relationships.wrongRelationshipStatus", `The Relationship '${relationshipId}' has the wrong status '${status}' to run this operation.`);
15
- }
16
- relationshipCurrentlyExists(status) {
17
- return new CoreError_1.CoreError("error.transport.relationships.relationshipCurrentlyExists", `No new Relationship to the peer can be created as a Relationship in status '${status}' currently exists.`);
18
- }
19
- relationshipNotYetDecomposedByPeer() {
20
- return new CoreError_1.CoreError("error.transport.relationships.relationshipNotYetDecomposedByPeer", "No new Relationship can be created as the former Relationship is not yet decomposed by the peer.");
21
- }
22
- reactivationNotRequested(relationshipId) {
23
- return new CoreError_1.CoreError("error.transport.relationships.reactivationNotRequested", `The Relationship '${relationshipId}' has no reactivation Request to respond to.`);
24
- }
25
- reactivationAlreadyRequested(message) {
26
- return new CoreError_1.CoreError("error.transport.relationships.reactivationAlreadyRequested", message);
27
- }
28
- activeIdentityDeletionProcessOfOwnerOfRelationshipTemplate() {
29
- return new CoreError_1.CoreError("error.transport.relationships.activeIdentityDeletionProcessOfOwnerOfRelationshipTemplate", "The Identity who created the RelationshipTemplate is currently in the process of deleting itself. Thus, it is not possible to establish a Relationship to it.");
30
- }
31
- }
32
- class Device {
33
- alreadyOnboarded() {
34
- return new CoreError_1.CoreError("error.transport.devices.alreadyOnboarded", "The device has already been onboarded.");
35
- }
36
- couldNotDeleteDevice(reason, rootCause) {
37
- return new CoreError_1.CoreError("error.transport.devices.couldNotDeleteDevice", `Could not delete device: '${reason}'`, rootCause);
38
- }
39
- }
40
- class Messages {
41
- plaintextMismatch(ownAddress) {
42
- return new CoreError_1.CoreError("error.transport.messages.plaintextMismatch", `The own address '${ownAddress}' was not named as a recipient within the signed MessagePlaintext. A replay attack might be the cause of this.`);
43
- }
44
- signatureListMismatch(address) {
45
- return new CoreError_1.CoreError("error.transport.messages.signatureListMismatch", `The signature list didn't contain an entry for address '${address}'.`);
46
- }
47
- signatureNotValid() {
48
- return new CoreError_1.CoreError("error.transport.messages.signatureNotValid", "The digital signature on this Message for peer key is invalid. An impersonation attack might be the cause of this.");
49
- }
50
- ownAddressNotInList(messageId) {
51
- return new CoreError_1.CoreError("error.transport.messages.ownAddressNotInList", `The recipients list of Message ${messageId} didn't contain an entry for the own address. This Message should not have been received.`);
52
- }
53
- missingOrInactiveRelationship(address) {
54
- return new CoreError_1.CoreError("error.transport.messages.missingOrInactiveRelationship", `An active Relationship with the given address '${address}' does not exist.`);
55
- }
56
- }
57
- class Secrets {
58
- wrongSecretType(secretId) {
59
- return new CoreError_1.CoreError("error.transport.secrets.wrongSecretType", "The given secret type is not supported!", {
60
- secretId: secretId
61
- });
62
- }
63
- secretNotFound(type) {
64
- return new CoreError_1.CoreError("error.transport.secrets.secretNotFound", `Secret '${type}' not found.`);
65
- }
66
- }
67
- class Challenges {
68
- challengeTypeRequiresActiveRelationship() {
69
- return new CoreError_1.CoreError("error.transport.challenges.challengeTypeRequiresActiveRelationship", "The challenge type Relationship requires an active Relationship.");
70
- }
71
- }
72
- class Datawallet {
73
- unsupportedModification(type, data) {
74
- const errorCode = "error.transport.datawallet.unsupportedModification";
75
- const formattedData = data ? (0, json_stringify_safe_1.default)(data) : "";
76
- switch (type) {
77
- case "unsupportedCacheChangedModificationCollection":
78
- return new CoreError_1.CoreError(errorCode, `The following collections were received in CacheChanged datawallet modifications but are not supported by the current version of this library: '${formattedData}'.`);
79
- default:
80
- throw new Error(`Given type '${type}' is not supported.`);
81
- }
82
- }
83
- insufficientSupportedDatawalletVersion(supportedVersion, requiredVersion) {
84
- return new CoreError_1.CoreError("error.transport.datawallet.insufficientSupportedDatawalletVersion", `The SupportedDatawalletVersion '${supportedVersion}' is too low. A minimum version of '${requiredVersion}' is required.`);
85
- }
86
- currentBiggerThanTarget(current, target) {
87
- return new CoreError_1.CoreError("error.transport.datawallet.currentBiggerThanTarget", `The current datawallet version '${current}' is bigger than the target version '${target}'.`);
88
- }
89
- }
90
- class Files {
91
- plaintextHashMismatch() {
92
- return new CoreError_1.CoreError("error.transport.files.plaintextHashMismatch", "The actual hash of the plaintext does not match the given plaintextHash. Something went wrong while encrypting/decrypting the file.");
93
- }
94
- cipherMismatch() {
95
- return new CoreError_1.CoreError("error.transport.files.cipherMismatch", "The actual hash of the cipher does not match the given cipherHash. Something went wrong while storing/transmitting the file.");
96
- }
97
- invalidMetadata(id) {
98
- return new CoreError_1.CoreError("error.transport.files.invalidMetadata", `The metadata of the File with id '${id}' is invalid.`);
99
- }
100
- maxFileSizeExceeded(fileSize, platformMaxFileSize) {
101
- return new CoreError_1.CoreError("error.transport.files.maxFileSizeExceeded", `The given File content size (${fileSize}) exceeds the max File size the Backbone accepts (${platformMaxFileSize}).`);
102
- }
103
- }
104
- class Tokens {
105
- invalidTokenContent(id) {
106
- return new CoreError_1.CoreError("error.transport.tokens.invalidTokenContent", `The content of Token '${id}' is not of type TokenContent.`);
107
- }
108
- }
109
- class General {
110
- baseUrlNotSet() {
111
- return new CoreError_1.CoreError("error.transport.general.baseUrlNotSet", "The baseUrl was not set.");
112
- }
113
- platformClientSecretNotSet() {
114
- return new CoreError_1.CoreError("error.transport.general.platformClientSecretNotSet", "The platform clientSecret was not set.");
115
- }
116
- platformClientIdNotSet() {
117
- return new CoreError_1.CoreError("error.transport.general.platformClientIdNotSet", "The platform clientId was not set.");
118
- }
119
- platformClientInvalid() {
120
- return new CoreError_1.CoreError("error.transport.general.platformClientInvalid", "The combination of platform clientId and clientSecret is invalid.");
121
- }
122
- signatureNotValid(type) {
123
- return new CoreError_1.CoreError("error.transport.signatureNotValid", `The ${type ? `${type}-` : ""}signature is not valid.`);
124
- }
125
- recordNotFound(entityName, entityId) {
126
- return new CoreError_1.CoreError("error.transport.recordNotFound", `'${entityName instanceof Function ? entityName.name : entityName}' not found.`, entityId);
127
- }
128
- notSupported() {
129
- return new CoreError_1.CoreError("error.transport.notSupported", "The method is not yet supported.");
130
- }
131
- invalidTruncatedReference() {
132
- return new CoreError_1.CoreError("error.transport.files.invalidTruncatedReference", "invalid truncated reference");
133
- }
134
- }
135
- class CoreErrors {
136
- static { this.relationships = new Relationships(); }
137
- static { this.general = new General(); }
138
- static { this.messages = new Messages(); }
139
- static { this.secrets = new Secrets(); }
140
- static { this.device = new Device(); }
141
- static { this.files = new Files(); }
142
- static { this.challenges = new Challenges(); }
143
- static { this.datawallet = new Datawallet(); }
144
- static { this.tokens = new Tokens(); }
145
- }
146
- exports.CoreErrors = CoreErrors;
147
- //# sourceMappingURL=CoreErrors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreErrors.js","sourceRoot":"","sources":["../../src/core/CoreErrors.ts"],"names":[],"mappings":";;;;;;AAAA,8EAA4C;AAE5C,2CAAwC;AAExC,MAAM,aAAa;IACR,2BAA2B,CAAC,OAAe;QAC9C,OAAO,IAAI,qBAAS,CAAC,2DAA2D,EAAE,OAAO,CAAC,CAAC;IAC/F,CAAC;IAEM,uBAAuB,CAAC,cAAsB,EAAE,MAA0B;QAC7E,OAAO,IAAI,qBAAS,CAChB,uDAAuD,EACvD,qBAAqB,cAAc,2BAA2B,MAAM,0BAA0B,CACjG,CAAC;IACN,CAAC;IAEM,2BAA2B,CAAC,MAA0B;QACzD,OAAO,IAAI,qBAAS,CAChB,2DAA2D,EAC3D,+EAA+E,MAAM,qBAAqB,CAC7G,CAAC;IACN,CAAC;IAEM,kCAAkC;QACrC,OAAO,IAAI,qBAAS,CAChB,kEAAkE,EAClE,kGAAkG,CACrG,CAAC;IACN,CAAC;IAEM,wBAAwB,CAAC,cAAsB;QAClD,OAAO,IAAI,qBAAS,CAAC,wDAAwD,EAAE,qBAAqB,cAAc,8CAA8C,CAAC,CAAC;IACtK,CAAC;IAEM,4BAA4B,CAAC,OAAe;QAC/C,OAAO,IAAI,qBAAS,CAAC,4DAA4D,EAAE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AU;aACI,kBAAa,GAAG,IAAI,aAAa,EAAE,CAAC;aACpC,YAAO,GAAG,IAAI,OAAO,EAAE,CAAC;aACxB,aAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;aAC1B,YAAO,GAAG,IAAI,OAAO,EAAE,CAAC;aACxB,WAAM,GAAG,IAAI,MAAM,EAAE,CAAC;aACtB,UAAK,GAAG,IAAI,KAAK,EAAE,CAAC;aACpB,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;aAC9B,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;aAC9B,WAAM,GAAG,IAAI,MAAM,EAAE,CAAC;;AATjD,gCAUC"}
@@ -1,17 +0,0 @@
1
- import { ISerializable, Serializable } from "@js-soft/ts-serval";
2
- export interface ICoreSerializable extends ISerializable {
3
- }
4
- /**
5
- * CoreSerializable is the local pendant of the Serializable class which
6
- * automatically validates, serializes, deserializes and validates again.
7
- *
8
- * With the synchronous class, the deserialize methods (from and deserialize)
9
- * are called synchronous. Please be aware, that CoreSerializable classes should
10
- * have no CoreSerializableAsync properties.
11
- */
12
- export declare class CoreSerializable extends Serializable implements ISerializable {
13
- toBase64(): string;
14
- static fromBase64T<T>(value: string): T;
15
- static fromBase64Unknown(value: string): Serializable;
16
- }
17
- //# sourceMappingURL=CoreSerializable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreSerializable.d.ts","sourceRoot":"","sources":["../../src/core/CoreSerializable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAQ,MAAM,oBAAoB,CAAC;AAGvE,MAAM,WAAW,iBAAkB,SAAQ,aAAa;CAAG;AAE3D;;;;;;;GAOG;AAEH,qBACa,gBAAiB,SAAQ,YAAa,YAAW,aAAa;IAChE,QAAQ,IAAI,MAAM;WAIX,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;WAKhC,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;CAI/D"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CoreSerializable = void 0;
10
- const ts_serval_1 = require("@js-soft/ts-serval");
11
- const crypto_1 = require("@nmshd/crypto");
12
- /**
13
- * CoreSerializable is the local pendant of the Serializable class which
14
- * automatically validates, serializes, deserializes and validates again.
15
- *
16
- * With the synchronous class, the deserialize methods (from and deserialize)
17
- * are called synchronous. Please be aware, that CoreSerializable classes should
18
- * have no CoreSerializableAsync properties.
19
- */
20
- let CoreSerializable = class CoreSerializable extends ts_serval_1.Serializable {
21
- toBase64() {
22
- return crypto_1.CoreBuffer.fromUtf8(this.serialize()).toBase64URL();
23
- }
24
- static fromBase64T(value) {
25
- const serialized = crypto_1.CoreBuffer.fromBase64URL(value).toUtf8();
26
- return this.deserialize(serialized);
27
- }
28
- static fromBase64Unknown(value) {
29
- const serialized = crypto_1.CoreBuffer.fromBase64URL(value).toUtf8();
30
- return ts_serval_1.Serializable.deserializeUnknown(serialized);
31
- }
32
- };
33
- exports.CoreSerializable = CoreSerializable;
34
- exports.CoreSerializable = CoreSerializable = __decorate([
35
- (0, ts_serval_1.type)("CoreSerializable")
36
- ], CoreSerializable);
37
- //# sourceMappingURL=CoreSerializable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreSerializable.js","sourceRoot":"","sources":["../../src/core/CoreSerializable.ts"],"names":[],"mappings":";;;;;;;;;AAAA,kDAAuE;AACvE,0CAA2C;AAI3C;;;;;;;GAOG;AAGI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,wBAAY;IACvC,QAAQ;QACX,OAAO,mBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;IAEM,MAAM,CAAC,WAAW,CAAI,KAAa;QACtC,MAAM,UAAU,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5D,OAAQ,IAAY,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAC,KAAa;QACzC,MAAM,UAAU,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5D,OAAO,wBAAY,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC;CACJ,CAAA;AAdY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,gBAAI,EAAC,kBAAkB,CAAC;GACZ,gBAAgB,CAc5B"}
@@ -1,17 +0,0 @@
1
- import { ISerializableAsync, SerializableAsync } from "@js-soft/ts-serval";
2
- export interface ICoreSerializableAsync extends ISerializableAsync {
3
- }
4
- /**
5
- * CoreSerializableAsync is the local pendant of the SerializableAsync class which
6
- * automatically validates, serializes, deserializes and validates again.
7
- *
8
- * With the asynchronous class, the deserialize methods (from and deserialize)
9
- * are called asynchronous (returning a Promise). You should only use CoreSerializableAsync
10
- * classes if properties with CoreSerializableAsync types are used.
11
- */
12
- export declare class CoreSerializableAsync extends SerializableAsync implements ISerializableAsync {
13
- toBase64(): string;
14
- static fromBase64T<T>(value: string): Promise<T>;
15
- static fromBase64Unknown(value: string): Promise<SerializableAsync>;
16
- }
17
- //# sourceMappingURL=CoreSerializableAsync.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreSerializableAsync.d.ts","sourceRoot":"","sources":["../../src/core/CoreSerializableAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAQ,MAAM,oBAAoB,CAAC;AAGjF,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;CAAG;AAErE;;;;;;;GAOG;AACH,qBACa,qBAAsB,SAAQ,iBAAkB,YAAW,kBAAkB;IAC/E,QAAQ,IAAI,MAAM;WAIL,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;WAMzC,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAInF"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CoreSerializableAsync = void 0;
10
- const ts_serval_1 = require("@js-soft/ts-serval");
11
- const crypto_1 = require("@nmshd/crypto");
12
- /**
13
- * CoreSerializableAsync is the local pendant of the SerializableAsync class which
14
- * automatically validates, serializes, deserializes and validates again.
15
- *
16
- * With the asynchronous class, the deserialize methods (from and deserialize)
17
- * are called asynchronous (returning a Promise). You should only use CoreSerializableAsync
18
- * classes if properties with CoreSerializableAsync types are used.
19
- */
20
- let CoreSerializableAsync = class CoreSerializableAsync extends ts_serval_1.SerializableAsync {
21
- toBase64() {
22
- return crypto_1.CoreBuffer.fromUtf8(this.serialize()).toBase64URL();
23
- }
24
- static async fromBase64T(value) {
25
- const serialized = crypto_1.CoreBuffer.fromBase64URL(value).toUtf8();
26
- const deserializePromise = this.deserialize(serialized);
27
- return await deserializePromise;
28
- }
29
- static async fromBase64Unknown(value) {
30
- const serialized = crypto_1.CoreBuffer.fromBase64URL(value).toUtf8();
31
- return await ts_serval_1.SerializableAsync.deserializeUnknown(serialized);
32
- }
33
- };
34
- exports.CoreSerializableAsync = CoreSerializableAsync;
35
- exports.CoreSerializableAsync = CoreSerializableAsync = __decorate([
36
- (0, ts_serval_1.type)("CoreSerializableAsync")
37
- ], CoreSerializableAsync);
38
- //# sourceMappingURL=CoreSerializableAsync.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreSerializableAsync.js","sourceRoot":"","sources":["../../src/core/CoreSerializableAsync.ts"],"names":[],"mappings":";;;;;;;;;AAAA,kDAAiF;AACjF,0CAA2C;AAI3C;;;;;;;GAOG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,6BAAiB;IACjD,QAAQ;QACX,OAAO,mBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAI,KAAa;QAC5C,MAAM,UAAU,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5D,MAAM,kBAAkB,GAAI,IAAY,CAAC,WAAW,CAAC,UAAU,CAAe,CAAC;QAC/E,OAAO,MAAM,kBAAkB,CAAC;IACpC,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAa;QAC/C,MAAM,UAAU,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5D,OAAO,MAAM,6BAAiB,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAClE,CAAC;CACJ,CAAA;AAfY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,gBAAI,EAAC,uBAAuB,CAAC;GACjB,qBAAqB,CAejC"}
@@ -1,16 +0,0 @@
1
- import { CoreSerializable, ICoreSerializable } from "../CoreSerializable";
2
- export interface ICoreAddress extends ICoreSerializable {
3
- address: string;
4
- }
5
- /**
6
- * A CoreAddress is the primariy technical identitier of an account.
7
- */
8
- export declare class CoreAddress extends CoreSerializable {
9
- address: string;
10
- protected static preFrom(value: any): any;
11
- static from(value: ICoreAddress | string): CoreAddress;
12
- equals(address?: CoreAddress | string): boolean;
13
- toString(): string;
14
- serialize(): string;
15
- }
16
- //# sourceMappingURL=CoreAddress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreAddress.d.ts","sourceRoot":"","sources":["../../../src/core/types/CoreAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,WAAW,YAAa,SAAQ,iBAAiB;IACnD,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,qBAEa,WAAY,SAAQ,gBAAgB;IAGtC,OAAO,EAAE,MAAM,CAAC;qBAEG,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;WAQpC,IAAI,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG,WAAW;IAItD,MAAM,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,OAAO;IAMtC,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,MAAM;CAGtC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreAddress.js","sourceRoot":"","sources":["../../../src/core/types/CoreAddress.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8E;AAC9E,0DAA0E;AAM1E;;GAEG;AAGI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,mCAAgB;IAKnC,MAAM,CAAU,OAAO,CAAC,KAAU;QACxC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC9B,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,KAA4B;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAEM,MAAM,CAAC,OAA8B;QACxC,IAAI,OAAO,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAExC,OAAO,IAAI,CAAC,OAAO,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC/C,CAAC;IAEe,QAAQ;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAEe,SAAS;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CACJ,CAAA;AA9BY,kCAAW;AAGb;IAFN,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;4CACW;sBAHd,WAAW;IAFvB,IAAA,gBAAI,EAAC,aAAa,CAAC;IACnB,IAAA,yBAAa,EAAC,SAAS,EAAE,QAAQ,CAAC;GACtB,WAAW,CA8BvB"}
@@ -1,40 +0,0 @@
1
- import { DateTime, DateTimeUnit, Duration, DurationLike } from "luxon";
2
- import { CoreSerializable, ICoreSerializable } from "../CoreSerializable";
3
- export interface ICoreDate extends ICoreSerializable {
4
- date: string;
5
- }
6
- export declare class CoreDate extends CoreSerializable {
7
- private readonly _dateTime;
8
- get dateTime(): DateTime;
9
- get date(): string;
10
- constructor(dateTime?: DateTime);
11
- static utc(): CoreDate;
12
- static local(): CoreDate;
13
- equals(another: CoreDate): boolean;
14
- add(amount: number | Duration | DurationLike): CoreDate;
15
- subtract(amount: number | Duration | DurationLike): CoreDate;
16
- startOf(unitOfTime: DateTimeUnit): CoreDate;
17
- endOf(unitOfTime: DateTimeUnit): CoreDate;
18
- format(format: string): string;
19
- isWithin(rangeMinusOrBoth: number | Duration | DurationLike, rangePlus?: number | Duration | DurationLike, other?: CoreDate, granularity?: DateTimeUnit): boolean;
20
- isBefore(other: CoreDate, granularity?: DateTimeUnit): boolean;
21
- isAfter(other: CoreDate, granularity?: DateTimeUnit): boolean;
22
- isSame(other: CoreDate, granularity?: DateTimeUnit): boolean;
23
- isSameOrAfter(other: CoreDate, granularity?: DateTimeUnit): boolean;
24
- isSameOrBefore(other: CoreDate, granularity?: DateTimeUnit): boolean;
25
- isBetween(start: CoreDate, end?: CoreDate, granularity?: DateTimeUnit): boolean;
26
- isExpired(): boolean;
27
- compare(comparator: CoreDate): number;
28
- /**
29
- * Creates an ISO String.
30
- */
31
- toString(): string;
32
- toISOString(): string;
33
- toLocaleString(): string;
34
- toJSON(): string;
35
- serialize(): string;
36
- private get asValidDateTime();
37
- protected static preFrom(value: any): any;
38
- static from(value: ICoreDate | string | number): CoreDate;
39
- }
40
- //# sourceMappingURL=CoreDate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreDate.d.ts","sourceRoot":"","sources":["../../../src/core/types/CoreDate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAY,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG1E,MAAM,WAAW,SAAU,SAAQ,iBAAiB;IAChD,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,QAAS,SAAQ,gBAAgB;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAW;IACrC,IAAW,QAAQ,IAAI,QAAQ,CAE9B;IAED,IAAW,IAAI,IAAI,MAAM,CAExB;gBAEkB,QAAQ,GAAE,QAAyB;WAKxC,GAAG,IAAI,QAAQ;WAIf,KAAK,IAAI,QAAQ;IAIxB,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO;IAIlC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ;IAIvD,QAA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IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ;CAGnE"}
@@ -1,152 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var CoreDate_1;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.CoreDate = void 0;
14
- const ts_serval_1 = require("@js-soft/ts-serval");
15
- const luxon_1 = require("luxon");
16
- const CoreSerializable_1 = require("../CoreSerializable");
17
- const TransportError_1 = require("../TransportError");
18
- let CoreDate = CoreDate_1 = class CoreDate extends CoreSerializable_1.CoreSerializable {
19
- get dateTime() {
20
- return this._dateTime;
21
- }
22
- get date() {
23
- return this.asValidDateTime.toISODate();
24
- }
25
- constructor(dateTime = luxon_1.DateTime.utc()) {
26
- super();
27
- this._dateTime = dateTime;
28
- }
29
- static utc() {
30
- return new CoreDate_1(luxon_1.DateTime.utc());
31
- }
32
- static local() {
33
- return new CoreDate_1(luxon_1.DateTime.local());
34
- }
35
- equals(another) {
36
- return this.dateTime.equals(another.dateTime);
37
- }
38
- add(amount) {
39
- return new CoreDate_1(this.dateTime.plus(amount));
40
- }
41
- subtract(amount) {
42
- return new CoreDate_1(this.dateTime.minus(amount));
43
- }
44
- startOf(unitOfTime) {
45
- return new CoreDate_1(this.dateTime.startOf(unitOfTime));
46
- }
47
- endOf(unitOfTime) {
48
- return new CoreDate_1(this.dateTime.endOf(unitOfTime));
49
- }
50
- format(format) {
51
- return this.dateTime.toFormat(format);
52
- }
53
- isWithin(rangeMinusOrBoth, rangePlus, other, granularity) {
54
- if (!rangePlus)
55
- rangePlus = rangeMinusOrBoth;
56
- if (!other)
57
- other = CoreDate_1.utc();
58
- const start = other.subtract(rangeMinusOrBoth);
59
- const end = other.add(rangePlus);
60
- if (granularity) {
61
- return this.dateTime.startOf(granularity) > start.dateTime.startOf(granularity) && this.dateTime.startOf(granularity) < end.dateTime.startOf(granularity);
62
- }
63
- return this.dateTime > start.dateTime && this.dateTime < end.dateTime;
64
- }
65
- isBefore(other, granularity) {
66
- if (granularity)
67
- return this.dateTime.startOf(granularity) < other.dateTime.startOf(granularity);
68
- return this.dateTime < other.dateTime;
69
- }
70
- isAfter(other, granularity) {
71
- if (granularity)
72
- return this.dateTime.startOf(granularity) > other.dateTime.startOf(granularity);
73
- return this.dateTime > other.dateTime;
74
- }
75
- isSame(other, granularity) {
76
- if (granularity)
77
- return this.dateTime.startOf(granularity).valueOf() === other.dateTime.startOf(granularity).valueOf();
78
- return this.dateTime.valueOf() === other.dateTime.valueOf();
79
- }
80
- isSameOrAfter(other, granularity) {
81
- if (granularity)
82
- return this.dateTime.startOf(granularity) >= other.dateTime.startOf(granularity);
83
- return this.dateTime >= other.dateTime;
84
- }
85
- isSameOrBefore(other, granularity) {
86
- if (granularity)
87
- return this.dateTime.startOf(granularity) <= other.dateTime.startOf(granularity);
88
- return this.dateTime <= other.dateTime;
89
- }
90
- isBetween(start, end, granularity) {
91
- if (!end)
92
- return this.isAfter(start, granularity);
93
- return luxon_1.Interval.fromDateTimes(start.dateTime, end.dateTime).contains(this.dateTime);
94
- }
95
- isExpired() {
96
- return this.isSameOrBefore(CoreDate_1.utc());
97
- }
98
- compare(comparator) {
99
- return this.dateTime.valueOf() - comparator.dateTime.valueOf();
100
- }
101
- /**
102
- * Creates an ISO String.
103
- */
104
- toString() {
105
- return this.asValidDateTime.toISO();
106
- }
107
- toISOString() {
108
- return this.asValidDateTime.toISO();
109
- }
110
- toLocaleString() {
111
- return this.dateTime.toLocaleString();
112
- }
113
- toJSON() {
114
- return this.asValidDateTime.toISO();
115
- }
116
- serialize() {
117
- return this.asValidDateTime.toISO();
118
- }
119
- get asValidDateTime() {
120
- if (!this.dateTime.isValid)
121
- throw new TransportError_1.TransportError("The date is invalid.");
122
- return this.dateTime;
123
- }
124
- static preFrom(value) {
125
- if (!value)
126
- throw new TransportError_1.TransportError("The provided object is undefined and cannot be deserialized.");
127
- if (typeof value === "object") {
128
- if (!value.date) {
129
- if (typeof value.toISOString !== "function") {
130
- throw new TransportError_1.TransportError("The provided object doesn't have an 'toISOString' string method.");
131
- }
132
- const iso = value.toISOString();
133
- return luxon_1.DateTime.fromISO(iso, { zone: "utc" });
134
- }
135
- return luxon_1.DateTime.fromISO(value.date, { zone: "utc" });
136
- }
137
- if (typeof value === "number")
138
- return luxon_1.DateTime.fromMillis(value);
139
- if (typeof value === "string")
140
- return luxon_1.DateTime.fromISO(value, { zone: "utc" }).toUTC();
141
- throw new TransportError_1.TransportError("The provided object is invalid and cannot be deserialized.");
142
- }
143
- static from(value) {
144
- return this.fromAny(value);
145
- }
146
- };
147
- exports.CoreDate = CoreDate;
148
- exports.CoreDate = CoreDate = CoreDate_1 = __decorate([
149
- (0, ts_serval_1.type)("CoreDate"),
150
- __metadata("design:paramtypes", [luxon_1.DateTime])
151
- ], CoreDate);
152
- //# sourceMappingURL=CoreDate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreDate.js","sourceRoot":"","sources":["../../../src/core/types/CoreDate.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,kDAA0C;AAC1C,iCAAiF;AACjF,0DAA0E;AAC1E,sDAAmD;AAO5C,IAAM,QAAQ,gBAAd,MAAM,QAAS,SAAQ,mCAAgB;IAE1C,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,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KAAK,EAAE,CAAC,CAAC;QACzD,CAAC;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,gBAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAEjE,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,gBAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;QAEvF,MAAM,IAAI,+BAAc,CAAC,4DAA4D,CAAC,CAAC;IAC3F,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,KAAkC;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;CACJ,CAAA;AAhKY,4BAAQ;mBAAR,QAAQ;IADpB,IAAA,gBAAI,EAAC,UAAU,CAAC;qCAWgB,gBAAQ;GAV5B,QAAQ,CAgKpB"}
@@ -1,17 +0,0 @@
1
- import { CoreSerializable, ICoreSerializable } from "../CoreSerializable";
2
- export interface ICoreId extends ICoreSerializable {
3
- id: string;
4
- }
5
- /**
6
- * A CoreId is any kind of identifier we have in the system.
7
- */
8
- export declare class CoreId extends CoreSerializable implements ICoreId {
9
- id: string;
10
- toString(): string;
11
- equals(id: CoreId | string): boolean;
12
- static generate(prefix?: string): Promise<CoreId>;
13
- static from(value: ICoreId | string): CoreId;
14
- protected static preFrom(value: any): any;
15
- serialize(): string;
16
- }
17
- //# sourceMappingURL=CoreId.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreId.d.ts","sourceRoot":"","sources":["../../../src/core/types/CoreId.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG1E,MAAM,WAAW,OAAQ,SAAQ,iBAAiB;IAC9C,EAAE,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,qBAEa,MAAO,SAAQ,gBAAiB,YAAW,OAAO;IAGpD,EAAE,EAAE,MAAM,CAAC;IAEF,QAAQ,IAAI,MAAM;IAI3B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO;WAIvB,QAAQ,CAAC,MAAM,SAAK,GAAG,OAAO,CAAC,MAAM,CAAC;WAS5C,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM;qBAIzB,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;IAQlC,SAAS,IAAI,MAAM;CAGtC"}
@@ -1,57 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CoreId = void 0;
13
- const ts_serval_1 = require("@js-soft/ts-serval");
14
- const Random_1 = require("../../util/Random");
15
- const CoreSerializable_1 = require("../CoreSerializable");
16
- const TransportError_1 = require("../TransportError");
17
- /**
18
- * A CoreId is any kind of identifier we have in the system.
19
- */
20
- let CoreId = class CoreId extends CoreSerializable_1.CoreSerializable {
21
- toString() {
22
- return this.id;
23
- }
24
- equals(id) {
25
- return this.id === id.toString();
26
- }
27
- static async generate(prefix = "") {
28
- if (prefix.length > 6) {
29
- throw new TransportError_1.TransportError(`The prefix "${prefix}" is too long. It must not be longer than 6 characters.`);
30
- }
31
- const random = await Random_1.Random.string(20 - prefix.length, Random_1.RandomCharacterRange.Alphanumeric);
32
- return this.from(prefix.toUpperCase() + random);
33
- }
34
- static from(value) {
35
- return this.fromAny(value);
36
- }
37
- static preFrom(value) {
38
- if (typeof value === "string") {
39
- return { id: value };
40
- }
41
- return value;
42
- }
43
- serialize() {
44
- return this.id;
45
- }
46
- };
47
- exports.CoreId = CoreId;
48
- __decorate([
49
- (0, ts_serval_1.validate)(),
50
- (0, ts_serval_1.serialize)(),
51
- __metadata("design:type", String)
52
- ], CoreId.prototype, "id", void 0);
53
- exports.CoreId = CoreId = __decorate([
54
- (0, ts_serval_1.type)("CoreId"),
55
- (0, ts_serval_1.serializeOnly)("id", "string")
56
- ], CoreId);
57
- //# sourceMappingURL=CoreId.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreId.js","sourceRoot":"","sources":["../../../src/core/types/CoreId.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA8E;AAC9E,8CAAiE;AACjE,0DAA0E;AAC1E,sDAAmD;AAMnD;;GAEG;AAGI,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,mCAAgB;IAKxB,QAAQ;QACpB,OAAO,IAAI,CAAC,EAAE,CAAC;IACnB,CAAC;IAEM,MAAM,CAAC,EAAmB;QAC7B,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC;IACrC,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,EAAE;QACpC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,MAAM,IAAI,+BAAc,CAAC,eAAe,MAAM,yDAAyD,CAAC,CAAC;QAC7G,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,eAAM,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,6BAAoB,CAAC,YAAY,CAAC,CAAC;QAC1F,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,CAAC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